/* ============================================
   WPMRace — Design System Variables
   ============================================ */

/* ---- Theme: Midnight (Default) ---- */
:root {
  /* Primary palette */
  --bg-primary: #0d0b14;
  --bg-secondary: #161320;
  --bg-tertiary: #201c2e;
  --bg-surface: rgba(22, 19, 32, 0.7);
  --bg-surface-hover: rgba(32, 28, 46, 0.8);

  /* Text */
  --text-primary: #e8e6f0;
  --text-secondary: #a39ebc;
  --text-tertiary: #787394;
  --text-muted: #534e70;

  /* Accent */
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-glow: rgba(139, 92, 246, 0.3);
  --accent-subtle: rgba(139, 92, 246, 0.1);

  /* Typing states */
  --color-correct: #a78bfa;
  --color-incorrect: #f87171;
  --color-incorrect-bg: rgba(248, 113, 113, 0.12);
  --color-extra: #fb923c;
  --color-cursor: #c4b5fd;
  --color-word-active: #e8e6f0;
  --color-word-pending: #534e70;

  /* Functional */
  --color-success: #34d399;
  --color-warning: #fbbf24;
  --color-error: #f87171;
  --color-info: #60a5fa;

  /* Glassmorphism */
  --glass-bg: rgba(13, 11, 20, 0.6);
  --glass-border: rgba(139, 92, 246, 0.12);
  --glass-blur: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.5rem;
  --fs-4xl: 3rem;
  --fs-5xl: 4rem;

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

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.75;

  /* 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;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index */
  --z-base: 1;
  --z-dropdown: 10;
  --z-modal: 100;
  --z-tooltip: 200;
  --z-notification: 300;

  /* Container */
  --container-max: 1000px;
  --test-area-max: 900px;
}

/* ---- Theme: Ocean ---- */
[data-theme="ocean"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-surface: rgba(30, 41, 59, 0.7);
  --bg-surface-hover: rgba(51, 65, 85, 0.8);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-muted: #64748b;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.3);
  --accent-subtle: rgba(56, 189, 248, 0.1);
  --color-correct: #7dd3fc;
  --color-cursor: #bae6fd;
  --color-word-active: #f8fafc;
  --color-word-pending: #64748b;
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(56, 189, 248, 0.12);
}

/* ---- Theme: Forest ---- */
[data-theme="forest"] {
  --bg-primary: #0d1712;
  --bg-secondary: #182c22;
  --bg-tertiary: #244233;
  --bg-surface: rgba(24, 44, 34, 0.7);
  --bg-surface-hover: rgba(36, 66, 51, 0.8);
  --text-primary: #f2f9f5;
  --text-secondary: #b2d8c5;
  --text-tertiary: #84bda2;
  --text-muted: #558b70;
  --accent: #34d399;
  --accent-hover: #10b981;
  --accent-glow: rgba(52, 211, 153, 0.3);
  --accent-subtle: rgba(52, 211, 153, 0.1);
  --color-correct: #6ee7b7;
  --color-cursor: #a7f3d0;
  --color-word-active: #f2f9f5;
  --color-word-pending: #558b70;
  --glass-bg: rgba(13, 23, 18, 0.6);
  --glass-border: rgba(52, 211, 153, 0.12);
}

/* ---- Theme: Sunset ---- */
[data-theme="sunset"] {
  --bg-primary: #16110f;
  --bg-secondary: #251c18;
  --bg-tertiary: #362a24;
  --bg-surface: rgba(37, 28, 24, 0.7);
  --bg-surface-hover: rgba(54, 42, 36, 0.8);
  --text-primary: #faf6f5;
  --text-secondary: #dfcfc7;
  --text-tertiary: #c4ab9d;
  --text-muted: #8d7568;
  --accent: #fb923c;
  --accent-hover: #f97316;
  --accent-glow: rgba(251, 146, 60, 0.3);
  --accent-subtle: rgba(251, 146, 60, 0.1);
  --color-correct: #fde047;
  --color-cursor: #fef08a;
  --color-word-active: #faf6f5;
  --color-word-pending: #8d7568;
  --glass-bg: rgba(22, 17, 15, 0.6);
  --glass-border: rgba(251, 146, 60, 0.12);
}

/* ---- Theme: Sakura ---- */
[data-theme="sakura"] {
  --bg-primary: #170e13;
  --bg-secondary: #281b22;
  --bg-tertiary: #3b2b34;
  --bg-surface: rgba(40, 27, 34, 0.7);
  --bg-surface-hover: rgba(59, 43, 52, 0.8);
  --text-primary: #faf4f7;
  --text-secondary: #e5ccd8;
  --text-tertiary: #cca3ba;
  --text-muted: #996e87;
  --accent: #f472b6;
  --accent-hover: #ec4899;
  --accent-glow: rgba(244, 114, 182, 0.3);
  --accent-subtle: rgba(244, 114, 182, 0.1);
  --color-correct: #fbcfe8;
  --color-cursor: #fde2f3;
  --color-word-active: #faf4f7;
  --color-word-pending: #996e87;
  --glass-bg: rgba(23, 14, 19, 0.6);
  --glass-border: rgba(244, 114, 182, 0.12);
}

/* ---- Theme: Neon ---- */
[data-theme="neon"] {
  --bg-primary: #0f1016;
  --bg-secondary: #1b1e2a;
  --bg-tertiary: #282c3e;
  --bg-surface: rgba(27, 30, 42, 0.7);
  --bg-surface-hover: rgba(40, 44, 62, 0.8);
  --text-primary: #f0fdf4;
  --text-secondary: #b4e3be;
  --text-tertiary: #84cb95;
  --text-muted: #538e64;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-glow: rgba(16, 185, 129, 0.3);
  --accent-subtle: rgba(16, 185, 129, 0.1);
  --color-correct: #34d399;
  --color-cursor: #a7f3d0;
  --color-word-active: #f0fdf4;
  --color-word-pending: #538e64;
  --glass-bg: rgba(15, 16, 22, 0.6);
  --glass-border: rgba(16, 185, 129, 0.12);
}

/* ---- Theme: Aurora ---- */
[data-theme="aurora"] {
  --bg-primary: #0c1020;
  --bg-secondary: #151c33;
  --bg-tertiary: #202a4d;
  --bg-surface: rgba(21, 28, 51, 0.7);
  --bg-surface-hover: rgba(32, 42, 77, 0.8);
  --text-primary: #f1f3f9;
  --text-secondary: #cbd2e6;
  --text-tertiary: #a1adcc;
  --text-muted: #6e7a9e;
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-glow: rgba(129, 140, 248, 0.3);
  --accent-subtle: rgba(129, 140, 248, 0.1);
  --color-correct: #a5b4fc;
  --color-cursor: #c7d2fe;
  --color-word-active: #f1f3f9;
  --color-word-pending: #6e7a9e;
  --glass-bg: rgba(12, 16, 32, 0.6);
  --glass-border: rgba(129, 140, 248, 0.12);
}
