/* ========================================
   fog — Styles
   Dark warm theme, self-hosted fonts
   ======================================== */

/* ---- Font Face ---- */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/static/fonts/outfit-300.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/outfit-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/outfit-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/outfit-600.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/dmserifdisplay-regular.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/dmserifdisplay-italic.ttf') format('truetype');
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #111014;
  --surface: #1e1b24;
  --surface-hover: #262330;
  --border: rgba(255, 255, 255, 0.06);
  --accent: #d4a053;
  --accent-dim: rgba(212, 160, 83, 0.15);
  --accent-glow: rgba(212, 160, 83, 0.3);
  --text: #e8e4de;
  --text-muted: #8a8490;
  --text-dim: #5c5766;
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Grain Overlay ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* ---- Ambient Glow ---- */
.ambient-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(212, 160, 83, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Page Wrap ---- */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2.5rem;
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
  40% { transform: scale(1.2); opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Header ---- */
header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
  animation: fadeUp 0.8s ease-out both;
}

header .subtitle {
  font-family: var(--font-body);
  color: var(--text-muted);
  margin-top: 0.6rem;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  animation: fadeUp 0.8s ease-out 0.1s both;
}

/* ---- Search Bar ---- */
.search-form {
  margin-bottom: 0.75rem;
  animation: fadeUp 0.8s ease-out 0.2s both;
}

.search-container {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1.1rem 6.5rem 1.1rem 3.2rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: rgba(212, 160, 83, 0.3);
  box-shadow: 0 0 0 4px rgba(212, 160, 83, 0.06);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-dim);
  pointer-events: none;
}

.search-actions {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.search-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.25s, background 0.2s, transform 0.15s;
}

.search-btn:hover {
  box-shadow: 0 0 16px var(--accent-glow);
  background: #ddb06a;
}

.search-btn:active {
  transform: scale(0.92);
}

.search-btn:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}

.search-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.research-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.research-btn:hover {
  border-color: rgba(212, 160, 83, 0.3);
  color: var(--text);
  background: rgba(212, 160, 83, 0.06);
}

.research-btn.research-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 16px rgba(212, 160, 83, 0.08);
}

.research-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* ---- Suggestion Chips ---- */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s ease-out 0.2s both;
}

.suggestion-chip {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex: 1 1 calc(50% - 0.5rem);
  text-align: center;
}

.suggestion-chip:hover {
  border-color: rgba(212, 160, 83, 0.3);
  color: var(--text);
  background: rgba(212, 160, 83, 0.06);
}

/* ---- Loading States ---- */
.loading-state {
  display: none;
  margin-bottom: 2rem;
  animation: fadeIn 0.3s ease;
}

.loading-state.visible {
  display: flex;
}

.loading-state.searching {
  align-items: center;
  gap: 0.75rem;
  color: var(--accent);
}

.loading-state.analyzing {
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.loading-state svg {
  flex-shrink: 0;
}

.loading-state.searching svg {
  width: 1.25rem;
  height: 1.25rem;
  animation: spin 1s linear infinite;
}

.loading-state .loading-text {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ---- Typing Indicator ---- */
.typing-indicator {
  display: flex;
  gap: 0.25rem;
}

.typing-indicator span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: bounce 1.5s infinite ease-in-out both;
}

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

/* ---- Search Query Display ---- */
.search-query-display {
  display: none;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(212, 160, 83, 0.06);
  border: 1px solid rgba(212, 160, 83, 0.12);
  animation: fadeIn 0.3s ease;
}

.search-query-display.visible {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search-query-display svg {
  width: 1rem;
  height: 1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.search-query-display .query-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.search-query-display .query-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ---- Section Headers ---- */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.section-icon {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-icon.answer {
  background: linear-gradient(135deg, var(--accent), #e0b870);
}

.section-icon.sources {
  background: linear-gradient(135deg, #7c9a6e, #5a7a4e);
}

.section-icon.more {
  background: linear-gradient(135deg, var(--text-dim), var(--text-muted));
}

.section-icon svg {
  width: 0.75rem;
  height: 0.75rem;
  color: white;
}

.section-title {
   font-size: 0.72rem;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.1em;
   color: var(--text-dim);
 }

 /* ---- Copy Button ---- */
 .copy-btn {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 1.5rem;
   height: 1.5rem;
   border-radius: 6px;
   border: none;
   background: transparent;
   color: var(--text-dim);
   cursor: pointer;
   transition: all 0.2s ease;
   margin-left: auto;
   flex-shrink: 0;
 }

 .copy-btn:hover {
   background: rgba(255, 255, 255, 0.05);
   color: var(--text);
 }

 .copy-btn svg {
   width: 0.85rem;
   height: 0.85rem;
 }

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

 /* ---- AI Answer Button ---- */
 .ai-answer-btn {
   display: flex;
   align-items: center;
   gap: 0.35rem;
   padding: 0.3rem 0.7rem;
   border-radius: 8px;
   border: 1px solid var(--accent-dim);
   background: var(--accent-dim);
   color: var(--accent);
   font-family: var(--font-body);
   font-size: 0.68rem;
   font-weight: 600;
   text-transform: uppercase;
   letter-spacing: 0.06em;
   cursor: pointer;
   transition: all 0.25s ease;
   margin-left: auto;
   flex-shrink: 0;
 }

 .ai-answer-btn:hover {
   background: rgba(212, 160, 83, 0.25);
   border-color: rgba(212, 160, 83, 0.4);
   box-shadow: 0 0 12px rgba(212, 160, 83, 0.1);
 }

 .ai-answer-btn svg {
   width: 0.75rem;
   height: 0.75rem;
 }

 .ai-answer-btn.ai-answer-loading {
   opacity: 0.6;
   cursor: wait;
 }

 .ai-answer-btn.ai-answer-loading svg {
   animation: spin 1s linear infinite;
 }

 /* ---- Answer Section ---- */
.answer-section {
  display: none;
  margin-bottom: 2rem;
}

.answer-section.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.streaming-dot {
  display: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 0.8s step-end infinite;
  margin-left: auto;
  flex-shrink: 0;
}

.streaming-dot.visible {
  display: block;
}

/* ---- Prose / Markdown Content ---- */
.prose-content {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.prose-content h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

.prose-content h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

.prose-content h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  margin-top: 1.25em;
  margin-bottom: 0.4em;
}

.prose-content p {
  margin-bottom: 1em;
}

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

.prose-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(212, 160, 83, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.prose-content a:hover {
  text-decoration-color: var(--accent);
}

.prose-content ul {
  list-style-type: disc;
  list-style-position: outside;
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.prose-content ol {
  list-style-type: decimal;
  list-style-position: outside;
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.prose-content li {
  margin-bottom: 0.35em;
  padding-left: 0.25em;
}

.prose-content li::marker {
  color: var(--accent);
}

.prose-content strong {
  font-weight: 500;
  color: var(--text);
}

.prose-content em {
  font-style: italic;
}

.prose-content code {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  font-size: 0.85em;
  padding: 0.2em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

.prose-content pre {
  background: #0a0a0e;
  color: #c9c5bf;
  padding: 1rem;
  border-radius: 12px;
  overflow-x: auto;
  margin-bottom: 1em;
  font-size: 0.85rem;
  line-height: 1.6;
  border: 1px solid var(--border);
}

.prose-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

.prose-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1em;
  margin-left: 0;
  margin-bottom: 1em;
  color: var(--text-dim);
  font-style: italic;
}

.prose-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5em 0;
}

.prose-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
  font-size: 0.875rem;
}

.prose-content th,
.prose-content td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.prose-content th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 500;
}

/* ---- Streaming Cursor ---- */
.streaming-cursor::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

/* ---- Sources Section ---- */
.sources-section {
  display: none;
  margin-bottom: 2rem;
}

.sources-section.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.sources-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ---- Source Cards (Side-by-Side with Favicon) ---- */
.source-card {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  opacity: 0;
  animation: slideIn 0.4s ease forwards;
  animation-delay: var(--delay, 0s);
}

.source-card:hover {
  border-color: rgba(212, 160, 83, 0.25);
  background: var(--surface-hover);
}

.source-card .card-favicon {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  padding: 3px;
  background: var(--bg);
  border: 1.5px solid rgba(124, 154, 110, 0.5);
}

.source-card .other-favicon {
  border-color: rgba(255, 255, 255, 0.15);
}

.source-card .card-body {
  flex: 1;
  min-width: 0;
}

.source-card .source-title {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.source-card .source-url {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.source-card .source-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
  margin-top: 0.3rem;
}

/* ---- More Results ---- */
.other-card {
  background: var(--surface);
}

.other-card:hover {
  border-color: rgba(212, 160, 83, 0.25);
  background: var(--surface-hover);
}



/* ---- Error Section ---- */
.error-section {
  display: none;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(180, 60, 60, 0.08);
  border: 1px solid rgba(180, 60, 60, 0.15);
  animation: fadeIn 0.3s ease;
}

.error-section.visible {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.error-section svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #c45c5c;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.error-section .error-message {
  font-size: 0.9rem;
  color: #d48080;
  font-weight: 300;
}

/* ---- No Results Section ---- */
.no-results-section {
  display: none;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(180, 140, 60, 0.08);
  border: 1px solid rgba(180, 140, 60, 0.15);
  animation: fadeIn 0.3s ease;
}

.no-results-section.visible {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.no-results-section svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #c4a050;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.no-results-section .no-results-message {
  font-size: 0.9rem;
  color: #c4a050;
  font-weight: 300;
}

/* ---- Back Button ---- */
.back-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.back-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ---- Results View ---- */
.results-view {
  display: none;
}

.results-view.visible {
  display: block;
}

/* ---- Footer ---- */
footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 300;
  letter-spacing: 0.03em;
  animation: fadeIn 1s ease-out 0.6s both;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--accent);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .page-wrap {
    padding: 2rem 1rem 3rem;
  }

  header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }

  .search-input {
    padding: 1rem 5.5rem 1rem 2.75rem;
    font-size: 1rem;
  }

  .search-actions {
    right: 0.25rem;
  }

  .search-btn {
    width: 2.5rem;
    height: 2.5rem;
  }

  .research-btn {
    width: 2rem;
    height: 2rem;
  }

  .sources-grid {
    /* single column on all screen sizes */
  }

  .source-card {
    padding: 0.75rem;
    gap: 0.65rem;
  }

  .source-card .card-favicon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .suggestions {
    gap: 0.4rem;
  }

  .suggestion-chip {
    font-size: 0.78rem;
    padding: 0.4rem 0.85rem;
    flex: 1 1 100%;
    text-align: center;
  }
}

@media (max-width: 360px) {
  header h1 {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Transition helpers ---- */
.view-enter {
  animation: fadeInUp 0.5s ease forwards;
}

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

/* ---- Smooth transitions ---- */
*, *::before, *::after {
  transition-property: background-color, border-color;
  transition-duration: 150ms;
  transition-timing-function: ease;
}

.no-transition,
.no-transition *,
.no-transition *::before,
.no-transition *::after {
  transition: none !important;
}

/* ---- Auth Modal ---- */
.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.auth-modal.visible {
  display: flex;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.auth-modal-content {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 380px;
  width: calc(100% - 2rem);
  animation: fadeUp 0.3s ease;
}

.auth-modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.auth-modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 1.25rem;
}

.auth-form {
  display: flex;
  gap: 0.5rem;
}

.auth-input {
  flex: 1;
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-input:focus {
  border-color: rgba(212, 160, 83, 0.3);
  box-shadow: 0 0 0 3px rgba(212, 160, 83, 0.06);
}

.auth-input::placeholder {
  color: var(--text-dim);
}

.auth-submit {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.25s, background 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.auth-submit:hover {
  box-shadow: 0 0 16px var(--accent-glow);
  background: #ddb06a;
}

.auth-submit:active {
  transform: scale(0.92);
}

.auth-submit svg {
  width: 1rem;
  height: 1rem;
}

.auth-error {
  font-size: 0.82rem;
  color: #c45c5c;
  margin-top: 0.75rem;
  min-height: 1.2em;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---- Selection ---- */
::selection {
  background: rgba(212, 160, 83, 0.25);
  color: inherit;
}
