/* ==========================================================================
   AITube Base Styles & Themes
   Zero attention-frying noise · High intellectual signal · Calm focus
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --font-serif: "Charter", "Georgia", "Cambria", serif;

  /* Default Dark (Deep Charcoal - Clean, Calm, No glare) */
  --bg-primary: #0d0f12;
  --bg-secondary: #16191f;
  --bg-tertiary: #1f232b;
  --bg-card: #14171d;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --border-subtle: #242933;
  --border-focus: #3e4657;

  --text-main: #f0f3f6;
  --text-muted: #9aa4b2;
  --text-faint: #636e7b;

  --accent: #ff6600; /* Hacker orange / Deep saffron */
  --accent-soft: rgba(255, 102, 0, 0.12);
  --accent-hover: #ff7f24;

  --cyan: #38bdf8;
  --emerald: #34d399;
  --purple: #a78bfa;
  --amber: #fbbf24;

  --badge-bg: #1f242d;
  --badge-text: #9aa4b2;
  --chip-bg: #1a1e24;
  --chip-text: #b0b9c6;
  --chip-active-bg: #f0f3f6;
  --chip-active-text: #0d0f12;

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --modal-overlay: rgba(0, 0, 0, 0.75);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme (Clean Paper) */
:root[data-theme="light"] {
  --bg-primary: #fbfbfd;
  --bg-secondary: #f2f3f5;
  --bg-tertiary: #e5e7eb;
  --bg-card: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --border-subtle: #e2e4e8;
  --border-focus: #b8bec8;

  --text-main: #111827;
  --text-muted: #4b5563;
  --text-faint: #9ca3af;

  --accent: #ea580c;
  --accent-soft: rgba(234, 88, 12, 0.1);
  --accent-hover: #c2410c;

  --cyan: #0284c7;
  --emerald: #059669;
  --purple: #7c3aed;
  --amber: #d97706;

  --badge-bg: #e5e7eb;
  --badge-text: #374151;
  --chip-bg: #edf0f3;
  --chip-text: #374151;
  --chip-active-bg: #111827;
  --chip-active-text: #ffffff;

  --card-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  --modal-overlay: rgba(17, 24, 39, 0.55);
}

/* Amber Terminal Theme */
:root[data-theme="amber"] {
  --bg-primary: #120e09;
  --bg-secondary: #1d160f;
  --bg-tertiary: #2a2016;
  --bg-card: #18120c;
  --bg-hover: rgba(251, 191, 36, 0.08);
  --border-subtle: #382c1f;
  --border-focus: #634f37;

  --text-main: #fef3c7;
  --text-muted: #d4a373;
  --text-faint: #8d6b49;

  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.15);
  --accent-hover: #fbbf24;

  --chip-bg: #261c13;
  --chip-text: #e2c099;
  --chip-active-bg: #f59e0b;
  --chip-active-text: #120e09;
}

/* Matcha Zen Theme */
:root[data-theme="matcha"] {
  --bg-primary: #0e1411;
  --bg-secondary: #151e19;
  --bg-tertiary: #1f2b24;
  --bg-card: #131b16;
  --bg-hover: rgba(52, 211, 153, 0.06);
  --border-subtle: #25332b;
  --border-focus: #3d5347;

  --text-main: #e8f3ed;
  --text-muted: #95b3a3;
  --text-faint: #5b796a;

  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.15);
  --accent-hover: #34d399;

  --chip-bg: #19241e;
  --chip-text: #a8c7b7;
  --chip-active-bg: #10b981;
  --chip-active-text: #0e1411;
}

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

html, body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--border-focus);
}

svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

kbd {
  font-family: var(--font-mono);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--text-muted);
}

::selection {
  background: var(--accent-soft);
  color: var(--text-main);
}
