/* CSS Variables for Theme Support */
:root {
  /* Dark Theme (Default) */
  --bg-primary: #1a1a1a;
  --bg-secondary: #2a2a2a;
  --bg-tertiary: #333333;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #808080;
  --border-color: #404040;
  --user-message-bg: #007bff;
  --user-message-text: #ffffff;
  --bot-message-bg: #2a2a2a;
  --bot-message-text: #ffffff;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.2);
  --shadow-strong: rgba(0, 0, 0, 0.3);
  --accent-color: #007bff;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --user-message-bg: #007bff;
  --user-message-text: #ffffff;
  --bot-message-bg: #f8f9fa;
  --bot-message-text: #212529;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-medium: rgba(0, 0, 0, 0.1);
  --shadow-strong: rgba(0, 0, 0, 0.15);
}

/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

/* Header Styles */
.chat-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bot-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bot-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-color), #0056b3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px var(--shadow-medium);
  overflow: hidden;
}

.bot-avatar .bot-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.bot-details h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.bot-status {
  font-size: 0.875rem;
  color: var(--success-color);
  font-weight: 500;
}

.header-controls {
  display: flex;
  gap: 0.5rem;
}

.control-btn {
  width: 40px;
  height: 40px;
  border: none;
  background-color: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.control-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  transform: scale(1.05);
}

/* Chat Container */
.chat-container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 1.5rem 1rem;
  scroll-behavior: smooth;
}

/* Message Styles */
.message {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  animation: messageSlide 0.3s ease-out;
}

.message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.user-avatar {
  background: linear-gradient(135deg, var(--user-message-bg), #0056b3);
  color: white;
}

.bot-avatar-msg {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  overflow: hidden;
}

.bot-avatar-msg .bot-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.message-content {
  max-width: 70%;
  padding: 0.875rem 1.125rem;
  border-radius: 1.125rem;
  font-size: 0.95rem;
  line-height: 1.5;
  word-wrap: break-word;
  position: relative;
}

.user .message-content {
  background-color: var(--user-message-bg);
  color: var(--user-message-text);
  border-bottom-right-radius: 0.375rem;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.bot .message-content {
  background-color: var(--bot-message-bg);
  color: var(--bot-message-text);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 0.375rem;
  box-shadow: 0 2px 8px var(--shadow-light);
}

/* Typing Indicator */
.typing-indicator {
  display: none;
  padding: 0 1.5rem 1rem;
  animation: messageSlide 0.3s ease-out;
}

.typing-indicator.show {
  display: flex;
  gap: 0.75rem;
}

.typing-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
  overflow: hidden;
}

.typing-avatar .bot-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.typing-content {
  background-color: var(--bot-message-bg);
  border: 1px solid var(--border-color);
  border-radius: 1.125rem;
  border-bottom-left-radius: 0.375rem;
  padding: 0.875rem 1.125rem;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.typing-dots {
  display: flex;
  gap: 0.25rem;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
  animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

/* Input Container */
.input-container {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  position: sticky;
  bottom: 0;
}

.input-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background-color: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 1.5rem;
  padding: 0.75rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-wrapper:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Dropdowns Row */
.dropdowns-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* Dropdowns Row */
.dropdowns-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Tools Dropdown */
.tools-dropdown {
  position: relative;
  align-self: flex-start;
}

.tools-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.tools-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.tools-toggle.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.dropdown-arrow {
  transition: transform 0.2s ease;
}

.tools-toggle.active .dropdown-arrow {
  transform: rotate(180deg);
}

.tools-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px var(--shadow-strong);
  padding: 0.5rem;
  min-width: 200px;
  display: none;
  z-index: 1000;
  bottom: 100%;
  top: auto;
  transform: translateY(-10px);
}

.tools-menu.show {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  width: 100%;
  text-align: left;
}

.tool-option:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.tool-option.active {
  background: var(--accent-color);
  color: white;
}

.tool-option svg {
  flex-shrink: 0;
}

.tool-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0.75rem;
}

/* File Upload Dropdown */
.file-upload-dropdown {
  position: relative;
  align-self: flex-start;
}

.file-upload-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: scale(1.05);
}

.file-upload-toggle.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.file-upload-toggle.has-files {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
}

.file-upload-toggle svg {
  stroke-width: 2.5;
}

.file-upload-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px var(--shadow-strong);
  padding: 0.5rem;
  min-width: 180px;
  display: none;
  z-index: 1000;
  bottom: 100%;
  top: auto;
  transform: translateY(-10px);
}

.file-upload-menu.show {
  display: block;
  animation: slideDown 0.2s ease;
}

.file-upload-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  width: 100%;
  text-align: left;
}

.file-upload-option:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.file-upload-option svg {
  flex-shrink: 0;
}

/* File Upload Dropdown */
.file-dropdown {
  position: relative;
  align-self: flex-start;
  margin-left: 0.5rem;
}

.file-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: scale(1.05);
}

.file-toggle.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.file-toggle.has-files {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
}

.file-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px var(--shadow-strong);
  padding: 0.5rem;
  min-width: 180px;
  display: none;
  z-index: 1000;
  bottom: 100%;
  top: auto;
  transform: translateY(-10px);
}

.file-menu.show {
  display: block;
  animation: slideDown 0.2s ease;
}

.file-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  width: 100%;
  text-align: left;
}

.file-option:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.file-option svg {
  flex-shrink: 0;
}

/* File Previews */
.file-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.file-preview-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-primary);
  max-width: 200px;
  position: relative;
}

.file-preview-item.image {
  flex-direction: column;
  padding: 0.25rem;
  max-width: 120px;
}

.file-preview-image {
  width: 100px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.25rem;
  margin-bottom: 0.25rem;
}

.file-preview-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
  text-align: center;
  font-size: 0.6rem;
}

.file-preview-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--accent-color);
}

.remove-file {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.remove-file:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* File Previews in Messages */
.message-file-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.message-file-previews .file-preview-item {
  border: none;
  background: rgba(255, 255, 255, 0.1);
}

.user .message-file-previews .file-preview-item {
  background: rgba(255, 255, 255, 0.2);
}

.bot .message-file-previews .file-preview-item {
  background: var(--bg-tertiary);
}

/* Input Row */
.input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

#user-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  resize: none;
  line-height: 1.5;
  max-height: 120px;
  min-height: 24px;
}

#user-input::placeholder {
  color: var(--text-muted);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.action-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  transform: scale(1.05);
}

.action-btn svg {
  stroke: currentColor;
  fill: none;
  color: inherit;
}

#mic-btn svg {
  stroke: currentColor !important;
  fill: none !important;
}

/* Microphone Button Specific Styling */
#mic-btn {
  color: #666 !important;
  background-color: #f1f3f4 !important;
  border: 1px solid #dadce0 !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

[data-theme="dark"] #mic-btn {
  color: #e8eaed !important;
  background-color: #303134 !important;
  border-color: #5f6368 !important;
}

#mic-btn:hover {
  color: #202124 !important;
  background-color: #e8f0fe !important;
  transform: scale(1.05) !important;
}

[data-theme="dark"] #mic-btn:hover {
  color: #ffffff !important;
  background-color: #3c4043 !important;
}

#mic-btn svg {
  stroke: currentColor !important;
  fill: none !important;
  width: 18px !important;
  height: 18px !important;
}

#mic-btn svg path,
#mic-btn svg line {
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2 !important;
}

.action-btn.recording {
  background-color: #ef4444;
  color: white;
  border-color: #ef4444;
  animation: pulse 1.5s infinite;
}

.action-btn.recording svg {
  stroke: white;
}

.action-btn.stop-btn {
  background-color: #ef4444;
  color: white;
  border-color: #ef4444;
}

.action-btn.stop-btn:hover {
  background-color: #dc2626;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.send-button {
  width: 40px;
  height: 40px;
  border: none;
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.send-button:hover {
  background: linear-gradient(45deg, #0056b3, #004494);
  transform: scale(1.05);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.stop-button {
  width: 40px;
  height: 40px;
  border: none;
  background: linear-gradient(45deg, #ef4444, #dc2626);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  animation: pulse 1.5s infinite;
}

.stop-button:hover {
  background: linear-gradient(45deg, #dc2626, #b91c1c);
  transform: scale(1.05);
}

.send-button {
  width: 36px;
  height: 36px;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
  background-color: #0056b3;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #6c757d;
}

/* Combined Send-Stop Button */
.send-stop-button {
  width: 36px;
  height: 36px;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
}

.send-stop-button:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.send-stop-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #6c757d;
}

/* Send Mode */
.send-stop-button[data-mode="send"] {
  background-color: #007bff;
}

.send-stop-button[data-mode="send"]:hover {
  background-color: #0056b3;
}

/* Stop Mode */
.send-stop-button[data-mode="stop"] {
  background-color: #ef4444;
}

.send-stop-button[data-mode="stop"]:hover {
  background-color: #dc2626;
}

.send-stop-button .send-icon,
.send-stop-button .stop-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .input-wrapper {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .tools-toggle {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .tools-toggle span {
    display: none;
  }
  
  .tool-option {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .action-btn {
    width: 32px;
    height: 32px;
  }
  
  .send-button {
    width: 32px;
    height: 32px;
  }
}

.send-button::before {
  content: "➤";
  font-size: 14px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

.developer-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.developer-link:hover {
  color: #0056b3;
}

/* Scrollbar Styling */
.messages-container::-webkit-scrollbar {
  width: 6px;
}

.messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-muted);
}

/* Animations */
@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typingAnimation {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* Welcome Message */
.welcome-message {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.welcome-message h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.welcome-message p {
  font-size: 1rem;
  margin-bottom: 2rem;
}

.welcome-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.suggestion-chip {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.suggestion-chip:hover {
  background-color: var(--bg-tertiary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--shadow-medium);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .chat-header {
    padding: 0.75rem 1rem;
  }
  
  .header-content {
    gap: 1rem;
  }
  
  .bot-details h1 {
    font-size: 1.125rem;
  }
  
  .bot-status {
    font-size: 0.8125rem;
  }
  
  .messages-container {
    padding: 1rem;
  }
  
  .message-content {
    max-width: 85%;
    font-size: 0.9rem;
  }
  
  .input-container {
    padding: 0.75rem 1rem;
  }
  
  .input-wrapper {
    border-radius: 1.25rem;
  }
  
  #user-input {
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
  }
  
  .send-button {
    width: 32px;
    height: 32px;
  }
  
  .welcome-suggestions {
    flex-direction: column;
    align-items: center;
  }
  
  .suggestion-chip {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .message-content {
    max-width: 90%;
  }
  
  .header-controls {
    gap: 0.25rem;
  }
  
  .control-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* Additional Input Styling */
#messageInput {
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
}

#user-input::placeholder {
  color: #777;
}

#user-input:focus {
  border-color: #00ffab;
}

button {
  margin-left: 10px;
  padding: 12px 20px;
  background-color: #00ffab;
  color: #0b0f19;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #00e699;
}

/* Scrollbar Styling */
#chat-box::-webkit-scrollbar {
  width: 6px;
}

#chat-box::-webkit-scrollbar-thumb {
  background-color: #00ffab;
  border-radius: 4px;
}

#chat-box::-webkit-scrollbar-thumb:hover {
  background-color: #00e699;
}

/* Footer */
footer {
  padding: 12px;
  background-color: #101521;
  text-align: center;
  font-size: 14px;
  color: #777;
  border-top: 1px solid #00ffab;
}

.developer {
  color: #00ffab;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .chat-container {
    width: 95%;
    height: 70vh;
  }

  .chat-title {
    font-size: 24px;
  }

  #user-input,
  button {
    font-size: 14px;
    padding: 10px;
  }

  .user-message,
  .bot-message {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .chat-container {
    height: 75vh;
  }

  .chat-title {
    font-size: 20px;
  }

  button {
    padding: 10px 16px;
  }
}

/* Settings Modal */
.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.settings-content {
  background: var(--bg-primary);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px var(--shadow-strong);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 12px 12px 0 0;
}

.settings-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
}

.close-settings {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.close-settings:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.settings-body {
  padding: 24px;
}

.setting-group {
  margin-bottom: 32px;
}

.setting-group:last-child {
  margin-bottom: 0;
}

.setting-group h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item label {
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-control {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 14px;
  min-width: 120px;
}

.setting-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.setting-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.setting-btn:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--shadow-light);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.settings-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 0 0 12px 12px;
  text-align: right;
}

.save-settings {
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-settings:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

/* Responsive settings modal */
@media (max-width: 768px) {
  .settings-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .settings-header {
    padding: 16px 20px;
  }
  
  .settings-body {
    padding: 20px;
  }
  
  .setting-item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .setting-control {
    min-width: auto;
  }
  
  .settings-footer {
    padding: 16px 20px;
  }
}

/* Enhanced Thinking Animation */
.enhanced-thinking {
  animation: messageSlide 0.3s ease-out;
}

.thinking-content {
  padding: 12px 16px !important;
  background-color: var(--bot-message-bg);
  border: 1px solid var(--border-color);
  border-radius: 1.125rem;
  border-bottom-left-radius: 0.375rem;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.thinking-animation {
  display: flex;
  align-items: center;
  gap: 8px;
}

.thinking-text {
  color: var(--accent-color);
  font-weight: 500;
  font-size: 0.95rem;
}

.thinking-dots {
  display: flex;
  gap: 4px;
}

.thinking-dots span {
  width: 8px;
  height: 8px;
  background: var(--accent-color);
  border-radius: 50%;
  animation: thinkingPulse 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes thinkingPulse {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}
