/* ========================================
   CSS Variables - Design Tokens
   ======================================== */

:root {
    /* Colors - Dark Theme */
    --color-bg-primary: #0e0e0e;
    --color-bg-secondary: #1a1a1a;
    --color-bg-tertiary: #252525;
    --color-bg-input: #121212;

    /* Accent Colors — Electric Sunset Orange */
    --color-primary: #FF6B2C;
    --color-primary-dark: #E55A1B;
    --color-primary-light: #FF8A55;

    --color-success: #34d399;
    --color-success-dark: #2ab885;

    --color-warning: #fbbf24;
    --color-warning-dark: #e5ac1c;

    --color-danger: #f87171;
    --color-danger-dark: #ef4444;

    /* Text Colors */
    --color-text-primary: #f0f0f0;
    --color-text-secondary: #8e8e8e;
    --color-text-muted: #777777;

    /* Border Colors */
    --color-border: #2a2a2a;
    --color-border-light: #3a3a3a;

    /* Workout Day Colors — REMOVED: unused, all using primary variants now */

    /* Page Section Colors — REMOVED: all identical, unused in CSS.
       If per-page theming is needed, add back with actual distinct values. */

    /* Primary color opacity variants — used for glows, backgrounds, borders */
    --color-primary-40: rgba(255, 107, 44, 0.4);
    --color-primary-30: rgba(255, 107, 44, 0.3);
    --color-primary-15: rgba(255, 107, 44, 0.15);
    --color-primary-12: rgba(255, 107, 44, 0.12);
    --color-primary-10: rgba(255, 107, 44, 0.10);
    --color-primary-06: rgba(255, 107, 44, 0.06);

    /* Semantic color opacity variants */
    --color-warning-15: rgba(251, 191, 36, 0.15);
    --color-warning-25: rgba(255, 215, 0, 0.25);
    --color-warning-10: rgba(255, 193, 7, 0.1);

    /* Glow shorthand — reusable for slider thumbs, dots, interactive elements */
    --glow-primary: 0 0 8px var(--color-primary-30), 0 0 3px var(--color-primary-40);

    /* Spacing */
    --space-thin: 2px;
    --space-xs: 4px;
    --space-xs-plus: 6px;
    --space-sm: 8px;
    --space-sm-plus: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Typography — 3+1 Scale
       MICRO  12px  badges, timestamps, fine print
       BODY   14px  everything: labels, buttons, descriptions, inputs
       HEAD   18px  card titles, section names, emphasis
       TITLE  24px  page headers, wizard questions, hero text
    */
    --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-family-display: 'Unbounded', 'DM Sans', sans-serif;
    --font-size-xs: 0.75rem;      /* 12px — MICRO */
    --font-size-sm: 0.875rem;     /* 14px — BODY */
    --font-size-base: 0.875rem;   /* 14px — BODY (alias) */
    --font-size-md: 0.875rem;     /* 14px — BODY (alias) */
    --font-size-lg: 1.125rem;     /* 18px — HEAD */
    --font-size-xl: 1.125rem;     /* 18px — HEAD (alias) */
    --font-size-2xl: 1.5rem;      /* 24px — TITLE */

    /* Display sizes — timer, icons, large numbers */
    --font-size-display: 3rem;    /* 48px — large display numbers */
    --font-size-icon: 4rem;       /* 64px — hero icons, welcome logo */
    --font-size-timer: 5rem;      /* 80px — countdown timer */

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

    /* Line Heights */
    --line-height-compact: 1.1;   /* display text, large numbers */
    --line-height-tight: 1.2;     /* headings */
    --line-height-snug: 1.3;      /* subheadings, hero text */
    --line-height-base: 1.5;      /* body text */
    --line-height-relaxed: 1.6;   /* longer prose, tips */
    --line-height-loose: 1.7;     /* marketing copy */

    /* Surfaces — transparent layers over background */
    --color-surface: rgba(255, 255, 255, 0.04);
    --color-surface-hover: rgba(255, 255, 255, 0.08);

    /* Glass */
    --glass-bg: rgba(0, 0, 0, 0.25);
    --glass-bg-heavy: rgba(0, 0, 0, 0.30);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-light: rgba(255, 255, 255, 0.2);
    --glass-blur: blur(2px);

    /* Shadows */
    --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px var(--color-primary-15), 0 0 8px var(--color-primary-10);
    --shadow-glow-strong: 0 0 32px var(--color-primary-30), 0 0 12px var(--color-primary-15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-modal: 0.4s ease-out;

    /* Z-Index */
    --z-header: 100;
    --z-nav: 100;
    --z-modal: 200;
    --z-toast: 300;
    --z-timer: 250;

    /* Layout */
    --header-height: 56px;
    --nav-height: 64px;
    --max-width: 600px;
}

/* Light theme */
[data-theme="light"] {
    /* Backgrounds */
    --color-bg-primary: #ebebeb;
    --color-bg-secondary: #f5f5f5;
    --color-bg-tertiary: #e0e0e0;
    --color-bg-input: #eeeeee;

    /* Text Colors */
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #525252;
    --color-text-muted: #7a7a7a;

    /* Border Colors */
    --color-border: #cccccc;
    --color-border-light: #bbbbbb;

    /* Page Section Colors — REMOVED: unused, all identical */

    /* Surfaces */
    --color-surface: rgba(0, 0, 0, 0.04);
    --color-surface-hover: rgba(0, 0, 0, 0.08);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-bg-heavy: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-border-light: rgba(255, 255, 255, 0.8);
    --glass-blur: blur(2px);

    /* Shadows - softer for light theme */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
}
