/* ============================================= */
/* DEEPSEEK COLOR SCHEME - Синьо-фіолетова тема */
/* ============================================= */

:root {
  /* Primary - DeepSeek синій */
  --primary-50: #e8efff;
  --primary-100: #c5d4ff;
  --primary-200: #9eb5ff;
  --primary-300: #7795ff;
  --primary-400: #5a7bff;
  --primary-500: #4d6bfe;
  --primary-600: #4361ee;
  --primary-700: #3a56d4;
  --primary-800: #3149b5;
  --primary-900: #273c96;

  /* Gray - з легким синім відтінком */
  --gray-50: #f7f8fc;
  --gray-100: #eef0f7;
  --gray-200: #dde1ec;
  --gray-300: #c5cad9;
  --gray-400: #9299b0;
  --gray-500: #6b7394;
  --gray-600: #4d5574;
  --gray-700: #363d5a;
  --gray-800: #252a40;
  --gray-900: #171a2d;

  /* Dark - DeepSeek фон */
  --dark-50: #f0f1f7;
  --dark-100: #e0e2ed;
  --dark-200: #c4c8d9;
  --dark-300: #a3a9c0;
  --dark-400: #7980a0;
  --dark-500: #585f80;
  --dark-600: #3d4460;
  --dark-700: #1e2235;
  --dark-800: #13162a;
  --dark-900: #0d0f1c;

  /* Semantic colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.08);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.15), 0 1px 2px -1px rgb(0 0 0 / 0.15);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.15), 0 2px 4px -2px rgb(0 0 0 / 0.15);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.2), 0 4px 6px -4px rgb(0 0 0 / 0.2);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.25), 0 8px 10px -6px rgb(0 0 0 / 0.25);

  /* Radius */
  --radius-sm: 0.25rem;
  --radius: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* DeepSeek specific */
  --accent-glow: rgba(77, 107, 254, 0.15);
  --card-bg: rgba(30, 34, 53, 0.8);
  --border-subtle: rgba(255, 255, 255, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--dark-900);
  color: var(--gray-100);
  height: 100vh;
  overflow: hidden;
  line-height: 1.6;
  font-size: 14px;
}

/* App Layout */
.app-container {
  display: flex;
  height: 100vh;
  background: var(--dark-900);
}

/* Sidebar - COLLAPSIBLE з DeepSeek дизайном */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: linear-gradient(180deg, var(--dark-800) 0%, var(--dark-900) 100%);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 1px solid var(--border-subtle);
  position: relative;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.25);
}

/* Sidebar collapsed state */
.sidebar.collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-right: none;
}

.sidebar.collapsed .sidebar-header,
.sidebar.collapsed .search-bar,
.sidebar.collapsed .chat-list,
.sidebar.collapsed .sidebar-footer {
  opacity: 0;
  visibility: hidden;
}

/* Sidebar toggle button - завжди видима */
.sidebar-toggle {
  position: absolute;
  top: 16px;
  right: -40px;
  width: 32px;
  height: 32px;
  background: var(--dark-800);
  border: 1px solid var(--dark-700);
  border-radius: 8px;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 1001;
}

.sidebar-toggle:hover {
  background: var(--dark-700);
  color: var(--gray-200);
  border-color: var(--primary-600);
}

/* Коли sidebar згорнутий - кнопка зліва */
.sidebar.collapsed .sidebar-toggle {
  right: auto;
  left: 8px;
  top: 16px;
  position: fixed;
}

.sidebar-toggle svg {
  transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.sidebar-header {
  padding: 16px 14px;
  /* Прибрано border-bottom щоб не було лінії над пошуком */
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.logo {
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.3px;
}

.new-chat-btn {
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 12px rgba(77, 107, 254, 0.3);
}

.new-chat-btn:hover {
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-600) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(3, 169, 244, 0.35);
}

/* Search Bar - ПОКРАЩЕНИЙ ДИЗАЙН */
.search-bar {
  padding: 0 14px 12px 14px;
}

/* Wrapper для пошуку з прихованим полем для обману автозаповнення */
.search-wrapper {
  position: relative;
}

/* Приховане поле для обману автозаповнення паролю */
.search-wrapper input[type="text"][style*="display:none"],
.search-wrapper input[type="password"][style*="display:none"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 34px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  color: var(--gray-200);
  font-size: 13px;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-600);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.1);
}

.search-input::placeholder {
  color: var(--gray-500);
}

/* Іконка пошуку */
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  pointer-events: none;
}

/* Chat list - ПОКРАЩЕНА СІТКА */
.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}

.chat-item {
  padding: 10px 12px;
  margin-bottom: 3px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  min-height: 40px;
}

.chat-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.chat-item.active {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
  color: white;
  box-shadow: 0 2px 12px rgba(77, 107, 254, 0.25);
}

.chat-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.chat-item-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.chat-item:hover .chat-item-actions {
  opacity: 1;
}

.chat-options-btn {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-options-btn:hover {
  background: var(--dark-600);
  color: var(--gray-200);
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.user-menu {
  position: relative;
}

.user-btn {
  width: 100%;
  padding: 10px 12px;
  background: var(--dark-700);
  border: none;
  border-radius: var(--radius-md);
  color: var(--gray-200);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.user-btn:hover {
  background: var(--dark-600);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--dark-700);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  display: none;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown button {
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  color: var(--gray-200);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease;
}

.user-dropdown button:hover {
  background: var(--dark-600);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--dark-900);
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
}

.welcome-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 20px;
}

.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 600px;
  width: 100%;
}

.welcome-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-600) 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-content p {
  font-size: 16px;
  color: var(--gray-400);
  margin-bottom: 32px;
  line-height: 1.6;
  text-align: center;
}

.example-prompts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  max-width: 600px;
}

.example-btn {
  padding: 16px 20px;
  background: var(--dark-800);
  border: 1px solid var(--dark-700);
  border-radius: var(--radius-lg);
  color: var(--gray-200);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.example-btn:hover {
  background: var(--dark-700);
  border-color: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.messages {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 8px;
}

/* ПОВНІСТЮ ПЕРЕПИСАНА СІТКА ПОВІДОМЛЕНЬ - CSS Grid для правильного вирівнювання */
.message {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease;
  width: 100%;
  padding: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* АВАТАР ПОВІДОМЛЕННЯ - фіксований розмір та вирівнювання */
.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  align-self: start;
  margin-top: 2px;
}

.message.user .message-avatar {
  background: var(--primary-600);
  color: white;
  border-radius: 50%;
}

.message.assistant .message-avatar {
  background: transparent;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
}

.ai-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* КОНТЕНТ ПОВІДОМЛЕННЯ - правильні відступи та вирівнювання */
.message-content {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.7;
  padding-top: 6px;
  font-family: 'Source Sans 3', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
}

/* ВАЖЛИВО: Видалення всіх зайвих відступів для першого елемента */
.message-content > *:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Стилі для параграфів - ПОКРАЩЕНИЙ ВИГЛЯД ТЕКСТУ (шрифт збільшено на 15%) */
.message-content p {
  margin: 0 0 14px 0;
  padding: 0;
  color: #e8eaed;
  font-family: 'Source Sans 3', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px; /* було 15px, збільшено на ~15% */
  line-height: 1.75;
  letter-spacing: 0.015em;
  font-weight: 400;
}

.message-content p:last-child {
  margin-bottom: 0;
}

/* Перший параграф - без відступу зверху */
.message-content > p:first-child {
  margin-top: 0;
}

.message-files {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--gray-400);
  background: var(--dark-800);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  display: inline-block;
}

.message-files .file-icon {
  display: inline-block;
  margin-right: 6px;
}

/* Premium Code Blocks (Modern IDE Style) - ЗМЕНШЕНІ ВІДСТУПИ */
.code-block {
  margin: 10px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #27272a;
  background: #09090b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Перший кодовий блок - без відступу зверху */
.message-content > .code-block:first-child {
  margin-top: 0;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #18181b;
  border-bottom: 1px solid #27272a;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  user-select: none;
  border-radius: 12px 12px 0 0;
}

.code-language {
  font-weight: 600;
  color: #a1a1aa;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.code-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.copy-code-btn,
.download-code-btn {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.copy-code-btn:hover,
.download-code-btn:hover {
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.05);
}

.copy-code-btn.copied {
  color: var(--success);
}

.code-content {
  padding: 0;
  margin: 0;
  background: #09090b;
  overflow-x: auto;
  border-radius: 0 0 12px 12px;
}

.code-content pre {
  margin: 0 !important;
  padding: 14px 16px !important;
  background: transparent !important;
  border: none !important;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #e4e4e7;
  white-space: pre;
  word-wrap: normal;
  overflow-x: auto;
  border-radius: 0 0 12px 12px;
}

.code-content pre code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  white-space: pre;
  word-wrap: normal;
  display: block;
}

/* Legacy support for raw pre tags - ЗМЕНШЕНІ ВІДСТУПИ */
.message-content > pre {
  margin: 10px 0;
  padding: 14px;
  background: #1e1e1e;
  border-radius: 12px;
  overflow-x: auto;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 14px;
  color: #e0e0e0;
}

/* Перший pre блок без відступу зверху */
.message-content > pre:first-child {
  margin-top: 0;
}

/* VS Code Dark+ Theme Colors */
.message-content pre code .token.comment,
.message-content pre code .token.prolog,
.message-content pre code .token.doctype,
.message-content pre code .token.cdata {
  color: #6a9955;
  font-style: italic;
}

.message-content pre code .token.punctuation {
  color: #d4d4d4;
}

.message-content pre code .token.property,
.message-content pre code .token.tag,
.message-content pre code .token.boolean,
.message-content pre code .token.number,
.message-content pre code .token.constant,
.message-content pre code .token.symbol,
.message-content pre code .token.deleted {
  color: #b5cea8;
}

.message-content pre code .token.selector,
.message-content pre code .token.attr-name,
.message-content pre code .token.string,
.message-content pre code .token.char,
.message-content pre code .token.builtin,
.message-content pre code .token.inserted {
  color: #ce9178;
}

.message-content pre code .token.operator,
.message-content pre code .token.entity,
.message-content pre code .token.url,
.message-content pre code .token.variable {
  color: #d4d4d4;
}

.message-content pre code .token.atrule,
.message-content pre code .token.attr-value,
.message-content pre code .token.function,
.message-content pre code .token.class-name {
  color: #dcdcaa;
}

.message-content pre code .token.keyword {
  color: #569cd6;
}

.message-content pre code .token.regex,
.message-content pre code .token.important {
  color: #d16969;
}

.message-content pre code .token.important,
.message-content pre code .token.bold {
  font-weight: bold;
}

.message-content pre code .token.italic {
  font-style: italic;
}

.message-content pre code .token.entity {
  cursor: help;
}

/* Python specific */
.message-content pre code.language-python .token.decorator {
  color: #4ec9b0;
}

.message-content pre code.language-python .token.string {
  color: #ce9178;
}

/* JavaScript specific */
.message-content pre code.language-javascript .token.template-string {
  color: #ce9178;
}

.message-content pre code.language-javascript .token.template-punctuation {
  color: #569cd6;
}

/* HTML specific */
.message-content pre code.language-html .token.tag .token.tag {
  color: #569cd6;
}

.message-content pre code.language-html .token.tag .token.attr-name {
  color: #92c5f8;
}

.message-content pre code.language-html .token.tag .token.attr-value {
  color: #ce9178;
}

/* CSS specific */
.message-content pre code.language-css .token.selector {
  color: #d7ba7d;
}

.message-content pre code.language-css .token.property {
  color: #92c5f8;
}

.message-content pre::-webkit-scrollbar {
  height: 8px;
}

.message-content pre::-webkit-scrollbar-track {
  background: #161b22;
}

.message-content pre::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 4px;
}

/* INLINE CODE - не всередині code-block */
.message-content code:not(.code-block code):not(.code-content code) {
  background: var(--dark-800);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", monospace;
  font-size: 13px;
  color: var(--primary-300);
  border: 1px solid var(--dark-700);
}

/* Inline code class */
.inline-code {
  background: var(--dark-800);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", monospace;
  font-size: 13px;
  color: var(--primary-300);
  border: 1px solid var(--dark-700);
}

/* Table Styles - ЗМЕНШЕНІ ВІДСТУПИ */
.message-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  background: var(--dark-800);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--dark-700);
}

/* Перша таблиця без відступу зверху */
.message-content > table:first-child {
  margin-top: 0;
}

.message-content th,
.message-content td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--dark-700);
  border-right: 1px solid var(--dark-700);
}

.message-content th:last-child,
.message-content td:last-child {
  border-right: none;
}

.message-content th {
  background: var(--dark-700);
  font-weight: 600;
  color: var(--gray-100);
  font-size: 13px;
}

.message-content td {
  color: var(--gray-200);
  font-size: 13px;
}

.message-content tr:last-child td {
  border-bottom: none;
}

/* Lists - ЗМЕНШЕНІ ВІДСТУПИ */
.message-content ul,
.message-content ol {
  margin: 8px 0;
  padding-left: 24px;
}

/* Перший список без відступу зверху */
.message-content > ul:first-child,
.message-content > ol:first-child {
  margin-top: 0;
}

.message-content li {
  margin-bottom: 4px;
  color: var(--gray-200);
  line-height: 1.5;
}

.message-content li:last-child {
  margin-bottom: 0;
}

/* Blockquotes - ЗМЕНШЕНІ ВІДСТУПИ */
.message-content blockquote {
  border-left: 4px solid var(--primary-600);
  margin: 10px 0;
  padding: 10px 14px;
  background: var(--dark-800);
  border-radius: var(--radius-md);
  color: var(--gray-300);
  font-style: italic;
}

/* Перша цитата без відступу зверху */
.message-content > blockquote:first-child {
  margin-top: 0;
}

/* Horizontal rules - ЗМЕНШЕНІ ВІДСТУПИ */
.message-content hr {
  border: none;
  height: 1px;
  background: var(--dark-700);
  margin: 14px 0;
}

/* Image Display */
.message-image {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius-lg);
  margin: 12px 0;
  box-shadow: var(--shadow-lg);
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.message-image:hover {
  transform: scale(1.02);
}

.image-preview {
  position: relative;
  display: inline-block;
  margin: 12px 0;
}

.image-preview img {
  max-width: 100%;
  max-height: 350px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.image-preview .image-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
}

/* Message actions - ЗМЕНШЕНІ ВІДСТУПИ */
.message-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.message:hover .message-actions {
  opacity: 1;
}

.action-btn {
  background: var(--dark-800);
  border: 1px solid var(--dark-700);
  border-radius: var(--radius-md);
  color: var(--gray-400);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-btn:hover {
  background: var(--dark-700);
  color: var(--gray-200);
  border-color: var(--dark-600);
}

.action-btn.success {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

/* Input Container */
.input-container {
  padding: 12px 16px;
  background: var(--dark-900);
}

.input-wrapper {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--dark-800);
  border: 1px solid var(--dark-700);
  border-radius: var(--radius-xl);
  padding: 8px;
  transition: all 0.2s ease;
}

.input-wrapper:focus-within {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgb(3 105 161 / 0.1);
}

.file-upload {
  display: flex;
  align-items: center;
}

.file-btn {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  height: 36px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-btn:hover {
  background: var(--dark-700);
  color: var(--gray-200);
}

#messageInput {
  flex: 1;
  background: none;
  border: none;
  color: var(--gray-100);
  font-size: 14px;
  resize: none;
  outline: none;
  min-height: 24px;
  max-height: 150px;
  font-family: inherit;
  line-height: 1.5;
  padding: 8px 4px;
}

#messageInput::placeholder {
  color: var(--gray-500);
}

.send-btn {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(77, 107, 254, 0.25);
}

.send-btn:hover {
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-600) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(77, 107, 254, 0.35);
}

.send-btn:disabled {
  background: var(--gray-600);
  cursor: not-allowed;
  transform: none;
}

.input-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 8px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.uploaded-files {
  max-width: 800px;
  margin: 8px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.model-selector {
  position: relative;
  display: flex;
  align-items: center;
}

.model-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--gray-400);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  height: 36px;
}

.model-btn:hover {
  background: rgba(77, 107, 254, 0.1);
  color: var(--primary-400);
}

.model-btn.active {
  background: rgba(77, 107, 254, 0.15);
  color: var(--primary-400);
}

/* ============================================= */
/* MODEL DROPDOWN - ПОВНІСТЮ ПЕРЕРОБЛЕНИЙ ДИЗАЙН */
/* ============================================= */

.model-dropdown {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: linear-gradient(180deg, #1a1a2e 0%, #16162a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 8px;
  min-width: 220px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.96);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 20px 40px -10px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 1px 0 0 rgba(255, 255, 255, 0.1) inset;
  backdrop-filter: blur(20px);
}

.model-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Заголовок dropdown */
.model-dropdown-header {
  padding: 8px 12px 12px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Опції моделей */
.model-option {
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  margin-bottom: 4px;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.model-option:last-child {
  margin-bottom: 0;
}

/* Іконка моделі */
.model-option-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.model-option-icon svg {
  width: 18px;
  height: 18px;
  color: #a78bfa;
  transition: all 0.2s ease;
}

/* Hover ефект */
.model-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.model-option:hover .model-option-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
}

.model-option:hover .model-option-icon svg {
  color: #c4b5fd;
  transform: scale(1.1);
}

/* Вибрана модель */
.model-option.selected {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  color: white;
}

.model-option.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: linear-gradient(180deg, #818cf8 0%, #a78bfa 100%);
  border-radius: 0 2px 2px 0;
}

.model-option.selected .model-option-icon {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.model-option.selected .model-option-icon svg {
  color: white;
}

.model-option.selected:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
}

/* Контейнер для назви моделі */
.model-option-content {
  flex: 1;
  min-width: 0;
}

.model-name {
  display: block;
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-description {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

/* Приховуємо старі галочки */
.model-check {
  display: none !important;
}

.uploaded-file {
  background: var(--dark-700);
  border: 1px solid var(--dark-600);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-300);
}

.uploaded-file.uploading {
  background: var(--primary-700);
  border-color: var(--primary-600);
  color: white;
}

.upload-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.remove-file {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
}

.remove-file:hover {
  color: var(--error);
}

/* Auth Styles */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--dark-900);
  padding: 20px;
}

.auth-card {
  background: var(--dark-800);
  border: 1px solid var(--dark-700);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.auth-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-100);
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--gray-400);
  font-size: 14px;
}

.telegram-auth-btn {
  width: 100%;
  padding: 14px 18px;
  background: #0088cc;
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.telegram-auth-btn:hover {
  background: #0077b3;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--gray-500);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--dark-600);
}

.auth-divider span {
  padding: 0 16px;
}

.error-messages {
  background: var(--error);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 24px;
}

.error-item {
  color: white;
  font-size: 13px;
  font-weight: 500;
}

.error-item:not(:last-child) {
  margin-bottom: 8px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-200);
}

.form-group input {
  padding: 14px 16px;
  background: var(--dark-700);
  border: 1px solid var(--dark-600);
  border-radius: var(--radius-md);
  color: var(--gray-100);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgb(3 105 161 / 0.1);
}

.input-hint {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 4px;
  transition: color 0.2s ease;
}

.auth-btn {
  padding: 14px 20px;
  background: var(--primary-700);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow);
}

.auth-btn:hover:not(:disabled) {
  background: var(--primary-800);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.auth-btn:disabled {
  background: var(--gray-600);
  cursor: not-allowed;
  transform: none;
}

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.auth-footer {
  text-align: center;
  margin-top: 28px;
}

.auth-footer p {
  color: var(--gray-400);
  font-size: 13px;
}

.auth-footer a {
  color: var(--primary-500);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: var(--primary-400);
}

.auth-disclaimer {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: var(--gray-500);
  line-height: 1.5;
}

.auth-disclaimer a {
  color: var(--primary-500);
  text-decoration: none;
}

.auth-disclaimer a:hover {
  text-decoration: underline;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--dark-800);
  border: 1px solid var(--dark-700);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--dark-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-100);
}

.close-btn {
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.close-btn:hover {
  color: var(--gray-200);
  background: var(--dark-700);
}

.modal-body {
  padding: 28px;
}

.setting-group {
  margin-bottom: 28px;
}

.setting-group h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-100);
  margin-bottom: 16px;
}

.setting-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--dark-700);
  border: 1px solid var(--dark-600);
  border-radius: var(--radius-md);
  color: var(--gray-100);
  font-size: 13px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.setting-group input:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgb(3 105 161 / 0.1);
}

.setting-group button {
  padding: 12px 18px;
  background: var(--primary-700);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.setting-group button:hover {
  background: var(--primary-800);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-actions button {
  padding: 14px 16px;
  background: var(--dark-700);
  border: 1px solid var(--dark-600);
  border-radius: var(--radius-md);
  color: var(--gray-200);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-actions button:hover {
  background: var(--dark-600);
  border-color: var(--dark-500);
}

.modal-actions button.danger {
  background: var(--error);
  border-color: var(--error);
  color: white;
}

.modal-actions button.danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 500;
  font-size: 13px;
  z-index: 10000;
  box-shadow: var(--shadow-lg);
  max-width: 380px;
}

.notification.success {
  background: var(--success);
}

.notification.error {
  background: var(--error);
}

.notification.info {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
}

/* Loading Animation - DeepSeek стиль */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-600) 100%);
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Favorites */
.favorite-btn {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.favorite-btn:hover {
  color: var(--warning);
}

.favorite-btn.favorited {
  color: var(--warning);
}

.draft-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  background: var(--warning);
  border-radius: 50%;
  font-size: 8px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* =============================================== */
/* ПОВНА МОБІЛЬНА ОПТИМІЗАЦІЯ - RESPONSIVE DESIGN */
/* =============================================== */

@media (max-width: 768px) {
  /* Базові налаштування */
  body {
    font-size: 15px;
  }

  /* Sidebar - повноекранний на мобільних */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    min-width: 100%;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: none;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  /* Кнопка закриття sidebar на мобільних */
  .sidebar-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    left: auto;
    z-index: 1002;
  }

  .sidebar.collapsed .sidebar-toggle {
    position: fixed;
    left: 16px;
    right: auto;
  }

  /* Main Content - повна ширина */
  .main-content {
    width: 100%;
  }

  /* Input - адаптивний */
  .input-wrapper {
    margin: 0 8px;
    padding: 8px;
    gap: 6px;
  }

  .input-container {
    padding: 10px 8px;
  }

  /* Кнопки в input */
  .file-btn,
  .send-btn {
    width: 40px;
    height: 40px;
  }

  .model-btn {
    padding: 6px 8px;
    font-size: 12px;
  }

  .model-btn .model-icon-text {
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Model dropdown */
  .model-dropdown {
    right: 0;
    left: auto;
    min-width: 180px;
  }

  /* Chat container */
  .chat-container {
    padding: 12px 8px;
  }

  .messages {
    max-width: none;
    padding: 0 4px;
  }

  /* Welcome screen */
  .welcome-content {
    padding: 16px;
  }

  .welcome-content h2 {
    font-size: 22px;
  }

  .welcome-content p {
    font-size: 14px;
  }

  .example-prompts {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .example-btn {
    padding: 14px 16px;
    font-size: 13px;
  }

  /* Messages - адаптивна сітка */
  .message {
    grid-template-columns: 32px 1fr;
    gap: 10px;
    margin-bottom: 18px;
  }

  .message-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .message-content {
    font-size: 15px;
    padding-top: 4px;
  }

  .message-content p {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 12px;
  }

  /* Code blocks - мобільна оптимізація */
  .code-block {
    margin: 8px 0;
    border-radius: 10px;
  }

  .code-header {
    padding: 8px 12px;
  }

  .code-language {
    font-size: 10px;
  }

  .copy-code-btn,
  .download-code-btn {
    padding: 4px 6px;
    font-size: 10px;
  }

  .code-content pre {
    padding: 12px !important;
    font-size: 12px !important;
  }

  .message-content pre {
    padding: 12px !important;
    font-size: 12px !important;
    border-radius: 10px;
  }

  /* Message actions - завжди видимі на мобільних */
  .message-actions {
    opacity: 1;
    flex-wrap: wrap;
  }

  .action-btn {
    padding: 6px 8px;
    font-size: 11px;
  }

  /* Input textarea */
  #messageInput {
    font-size: 16px; /* Запобігає zoom на iOS */
    min-height: 40px;
    padding: 10px 8px;
  }

  /* Модальні вікна */
  .modal-content {
    margin: 16px;
    max-width: none;
    max-height: calc(100vh - 32px);
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-header h3 {
    font-size: 16px;
  }

  .modal-body {
    padding: 20px;
  }

  /* Auth */
  .auth-card {
    padding: 24px 16px;
    margin: 16px;
  }

  .auth-header h1 {
    font-size: 22px;
  }

  /* Sidebar elements */
  .sidebar-header {
    padding: 16px;
  }

  .logo {
    font-size: 20px;
  }

  .new-chat-btn {
    padding: 12px 16px;
    font-size: 14px;
  }

  .search-bar {
    padding: 0 16px 14px 16px;
  }

  .search-input {
    padding: 12px 12px 12px 38px;
    font-size: 15px;
  }

  .chat-list {
    padding: 8px 12px;
  }

  .chat-item {
    padding: 12px 14px;
    min-height: 48px;
  }

  .chat-title {
    font-size: 14px;
  }

  .sidebar-footer {
    padding: 16px;
  }

  .user-btn {
    padding: 12px 14px;
    font-size: 14px;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  /* Notifications - мобільна позиція */
  .notification {
    top: auto;
    bottom: 80px;
    right: 16px;
    left: 16px;
    max-width: none;
  }

  /* Uploaded files */
  .uploaded-files {
    margin: 8px 8px 0;
  }

  .uploaded-file {
    padding: 8px 10px;
    font-size: 12px;
  }

  /* Input disclaimer */
  .input-disclaimer {
    font-size: 10px;
    margin-top: 6px;
    padding: 0 8px;
  }

  /* Tables */
  .message-content table {
    font-size: 12px;
  }

  .message-content th,
  .message-content td {
    padding: 8px 10px;
  }

  /* Lists */
  .message-content ul,
  .message-content ol {
    padding-left: 20px;
  }

  .message-content li {
    font-size: 15px;
    margin-bottom: 6px;
  }

  /* Blockquotes */
  .message-content blockquote {
    padding: 8px 12px;
    font-size: 14px;
  }

  /* Images */
  .message-image {
    max-height: 300px;
    border-radius: var(--radius-md);
  }
}

/* Маленькі телефони (до 375px) */
@media (max-width: 375px) {
  .welcome-content h2 {
    font-size: 20px;
  }

  .example-btn {
    padding: 12px 14px;
    font-size: 12px;
  }

  .message {
    grid-template-columns: 28px 1fr;
    gap: 8px;
  }

  .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .message-content p {
    font-size: 14px;
  }

  .model-btn .model-icon-text {
    display: none;
  }

  .model-btn .dropdown-arrow {
    margin-left: 0;
  }

  .input-wrapper {
    padding: 6px;
    gap: 4px;
  }

  .file-btn,
  .send-btn {
    width: 36px;
    height: 36px;
  }
}

/* Landscape mode на телефонах */
@media (max-width: 768px) and (orientation: landscape) {
  .chat-container {
    padding: 8px;
  }

  .welcome-screen {
    padding: 12px;
  }

  .welcome-content h2 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .welcome-content p {
    margin-bottom: 16px;
  }

  .example-prompts {
    gap: 8px;
  }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--dark-800);
}

::-webkit-scrollbar-thumb {
  background: var(--dark-600);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-500);
}

/* Focus states */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .sidebar,
  .input-container {
    display: none;
  }

  .main-content {
    width: 100%;
  }

  .message {
    break-inside: avoid;
  }
}

/* Mobile menu toggle */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  background: var(--dark-700);
  border: 1px solid var(--dark-600);
  border-radius: var(--radius-md);
  color: var(--gray-200);
  padding: 10px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
}

/* PWA Styles */
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .sidebar {
    padding-top: env(safe-area-inset-top);
  }

  .main-content {
    padding-top: env(safe-area-inset-top);
  }
}
