/* 🚀 Ultimate Chat UI - Best Design & Performance of All Time */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  min-height: 100vh;
  transition: background 0.3s ease-in-out;
  overflow: hidden;
}

/* 🌙 Dark Mode */
body.dark-mode {
  background: #121212;
  color: white;
}
.chat-container.dark-mode {
  background: #1e1e1e;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
}
.chat-input input.dark-mode {
  background: #333;
  color: white;
  border: 1px solid #555;
}

/* 🔥 Chat Container */
.chat-container {
  width: 90%;
  max-width: 700px;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  height: 85vh;
  backdrop-filter: blur(8px);
}

.chat-container:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* 💬 Chat Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  border-bottom: 2px solid #ddd;
  background: #f1f1f1;
  scrollbar-width: thin;
  scrollbar-color: #007bff #f1f1f1;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #007bff;
  border-radius: 10px;
}

/* ✨ Typing Indicator */
.typing-indicator {
  font-size: 14px;
  font-style: italic;
  color: #666;
  padding: 10px;
}

/* 📝 Chat Input */
.chat-input {
  display: flex;
  gap: 10px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
  align-items: center;
  border-top: 2px solid #ddd;
}

.chat-input input {
  flex: 1;
  padding: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  outline: none;
}

.chat-input input:focus {
  border-color: #007bff;
  box-shadow: 0 0 12px rgba(0, 123, 255, 0.6);
  transform: scale(1.02);
}

/* 🎨 Buttons - Interactive & Smooth */
.chat-input button {
  padding: 14px 22px;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease-in-out;
  font-weight: 600;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.2);
}

.chat-input button:hover {
  transform: scale(1.1);
  box-shadow: 4px 6px 15px rgba(0, 0, 0, 0.3);
}

.chat-input button:active {
  transform: scale(0.95);
}

/* 🎭 Emoji Picker */
.emoji-picker {
  display: none;
  position: absolute;
  bottom: 70px;
  background: white;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.emoji-picker button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

.emoji-picker button:hover {
  transform: scale(1.2);
}

/* 🎛️ Dark Mode Toggle */
#darkModeToggle {
  position: fixed;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background 0.3s ease;
  font-weight: bold;
}

#darkModeToggle:hover {
  background: #0056b3;
}

/* 📱 Responsive Design */
@media (max-width: 1024px) {
  .chat-container {
    width: 85%;
  }
}

@media (max-width: 768px) {
  .chat-container {
    width: 95%;
  }
  .chat-messages {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .chat-container {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }
  .chat-messages {
    height: 80vh;
  }
  .chat-input {
    flex-direction: column;
  }
  .chat-input input, .chat-input button {
    width: 100%;
    font-size: 14px;
    padding: 14px;
  }
}

@media (max-width: 320px) {
  .chat-container {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }
  .chat-messages {
    height: 75vh;
    padding: 10px;
  }
  .chat-input {
    flex-direction: column;
    gap: 8px;
  }
  .chat-input input, .chat-input button {
    font-size: 12px;
    padding: 12px;
  }
}
