/* ============================================================
   NoobieAI Design System — CSS Custom Properties (Tokens)
   ============================================================ */

:root {
  /* ── Colors — Base Palette ──────────────────────────────── */
  --color-brand-50:  hsl(248, 100%, 97%);
  --color-brand-100: hsl(248, 96%, 93%);
  --color-brand-200: hsl(248, 93%, 85%);
  --color-brand-300: hsl(248, 88%, 74%);
  --color-brand-400: hsl(248, 84%, 64%);
  --color-brand-500: hsl(248, 80%, 56%);  /* Primary */
  --color-brand-600: hsl(248, 76%, 48%);
  --color-brand-700: hsl(248, 72%, 40%);
  --color-brand-800: hsl(248, 68%, 32%);
  --color-brand-900: hsl(248, 64%, 24%);

  --color-accent-400: hsl(196, 100%, 55%);  /* Cyan accent */
  --color-accent-500: hsl(196, 100%, 45%);

  /* ── Semantic Colors (Light) ────────────────────────────── */
  --color-bg:          hsl(240, 10%, 98%);
  --color-bg-subtle:   hsl(240, 8%, 95%);
  --color-surface:     hsl(0, 0%, 100%);
  --color-surface-2:   hsl(240, 8%, 97%);
  --color-border:      hsl(240, 6%, 88%);
  --color-border-subtle: hsl(240, 6%, 93%);

  --color-text:        hsl(240, 10%, 10%);
  --color-text-muted:  hsl(240, 8%, 46%);
  --color-text-subtle: hsl(240, 6%, 64%);

  --color-primary:     var(--color-brand-500);
  --color-primary-hover: var(--color-brand-600);
  --color-primary-fg:  hsl(0, 0%, 100%);

  --color-success:     hsl(142, 76%, 36%);
  --color-warning:     hsl(38, 92%, 50%);
  --color-error:       hsl(0, 84%, 60%);
  --color-error-bg:    hsl(0, 84%, 97%);

  /* ── Sidebar ─────────────────────────────────────────────── */
  --sidebar-bg:        hsl(240, 12%, 97%);
  --sidebar-width:     260px;

  /* ── Typography ─────────────────────────────────────────── */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;

  --leading-tight:  1.25;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --font-normal:   400;
  --font-medium:   500;
  --font-semibold: 600;
  --font-bold:     700;

  /* ── Spacing ─────────────────────────────────────────────── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* ── Border Radius ───────────────────────────────────────── */
  --radius-sm:  0.25rem;
  --radius-md:  0.5rem;
  --radius-lg:  0.75rem;
  --radius-xl:  1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* ── Shadows ─────────────────────────────────────────────── */
  --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md:  0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lg:  0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl:  0 20px 25px rgba(0, 0, 0, 0.1), 0 8px 10px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(99, 79, 230, 0.3);

  /* ── Transitions ─────────────────────────────────────────── */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast:   100ms;
  --duration-normal: 200ms;
  --duration-slow:   300ms;

  /* ── Z-index ─────────────────────────────────────────────── */
  --z-dropdown: 100;
  --z-modal:    200;
  --z-toast:    300;
  --z-overlay:  400;
}

/* ── Dark Mode ───────────────────────────────────────────────── */
[data-theme="dark"],
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]),
  [data-theme="dark"] {
    --color-bg:           hsl(240, 10%, 8%);
    --color-bg-subtle:    hsl(240, 10%, 11%);
    --color-surface:      hsl(240, 8%, 13%);
    --color-surface-2:    hsl(240, 8%, 16%);
    --color-border:       hsl(240, 6%, 22%);
    --color-border-subtle: hsl(240, 6%, 18%);

    --color-text:         hsl(240, 10%, 94%);
    --color-text-muted:   hsl(240, 8%, 60%);
    --color-text-subtle:  hsl(240, 6%, 44%);

    --sidebar-bg:         hsl(240, 10%, 10%);
    --color-error-bg:     hsl(0, 30%, 12%);

    --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md:  0 4px 6px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg:  0 10px 15px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(99, 79, 230, 0.4);
  }
}
