:root {
  /* Colors - Semantic (Dark theme default) */
  --color-bg: #0a0a0a;
  --color-surface: #141414;
  --color-surface-elevated: #1a1a1a;
  --color-text: #fafafa;
  --color-text-muted: #888888;
  --color-text-subtle: #555555;
  --color-border: #2a2a2a;

  /* Colors - Mood */
  --color-focus: #3b82f6;
  --color-focus-dim: #1e40af;
  --color-calm: #8b5cf6;
  --color-calm-dim: #5b21b6;
  --color-late-night: #f59e0b;
  --color-late-night-dim: #b45309;
  --color-energize: #ef4444;
  --color-energize-dim: #b91c1c;

  /* Dynamic accent (set by JS via data-mood) */
  --color-accent: var(--color-focus);
  --color-accent-dim: var(--color-focus-dim);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-hero: 2.5rem;

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Layout */
  --player-height: 108px; /* Mobile: two-row player bar */
  --mood-size-mobile: 140px;
  --mood-size-tablet: 160px;
  --mood-size-desktop: 180px;
  --touch-target: 44px;

  /* Motion */
  --duration-instant: 100ms;
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-ambient: 4000ms;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px var(--color-accent);

  /* Overlay System - Blur Levels */
  --blur-subtle: 8px;
  --blur-medium: 16px;
  --blur-heavy: 24px;

  /* Overlay System - Glass Surfaces (Dark theme) */
  --surface-glass: rgba(10, 10, 10, 0.8);
  --surface-glass-elevated: rgba(26, 26, 26, 0.85);
  --surface-scrim: rgba(0, 0, 0, 0.4);

  /* Overlay System - Text Shadows for Legibility */
  --text-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3);
  --text-shadow-strong: 0 2px 4px rgba(0, 0, 0, 0.5);

  /* Overlay System - Z-Index Layers */
  /* Panels slide up behind player - player stays on top for continuous control */
  --z-header: 10;
  --z-panel: 50;
  --z-drawer: 60;
  --z-player: 100;
  --z-toast: 400;
  --z-modal: 500;
}

/* Mood-specific accent colors */
body[data-mood="focus"] {
  --color-accent: var(--color-focus);
  --color-accent-dim: var(--color-focus-dim);
}

body[data-mood="calm"] {
  --color-accent: var(--color-calm);
  --color-accent-dim: var(--color-calm-dim);
}

body[data-mood="late_night"] {
  --color-accent: var(--color-late-night);
  --color-accent-dim: var(--color-late-night-dim);
}

body[data-mood="energize"] {
  --color-accent: var(--color-energize);
  --color-accent-dim: var(--color-energize-dim);
}

/* Light theme overrides */
[data-theme="light"] {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-surface-elevated: #f5f5f5;
  --color-text: #1a1a1a;
  --color-text-muted: #6b7280;
  --color-text-subtle: #9ca3af;
  --color-border: #e5e7eb;

  /* Lighter shadows for light theme */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

  /* Overlay System - Glass Surfaces (Light theme) */
  --surface-glass: rgba(255, 255, 255, 0.75);
  --surface-glass-elevated: rgba(250, 250, 250, 0.85);
  --surface-scrim: rgba(255, 255, 255, 0.4);

  /* Text shadows lighter for light theme */
  --text-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.15);
  --text-shadow-strong: 0 2px 4px rgba(0, 0, 0, 0.25);
}
