/* ==========================================================
   TypingTutor.Online
   Theme Variables
   File: css/variables.css
   Version: 4.0
========================================================== */

:root {
    color-scheme: light;

    /* Brand */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;

    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    /* Surfaces */
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-alt: #f1f5f9;
    --surface-soft: #f8fafc;
    --surface-elevated: #ffffff;

    /* Borders and text */
    --border: #cbd5e1;
    --border-soft: #e5eaf1;
    --text: #0f172a;
    --text-light: #475569;
    --text-muted: #94a3b8;

    /* Keyboard */
    --key-bg: #ffffff;
    --key-border: #cbd5e1;
    --key-text: #111827;
    --key-current: #14b8a6;
    --key-next: #8b5cf6;
    --key-pressed: #2563eb;
    --key-correct: #22c55e;
    --key-wrong: #ef4444;
    --key-disabled: #cbd5e1;

    /* Fingers */
    --finger-thumb: #60a5fa;
    --finger-left-index: #4ade80;
    --finger-left-middle: #facc15;
    --finger-left-ring: #fb923c;
    --finger-left-little: #ec4899;
    --finger-right-index: #4ade80;
    --finger-right-middle: #facc15;
    --finger-right-ring: #fb923c;
    --finger-right-little: #ec4899;

    /* Typography */
    --font-heading: "Poppins", sans-serif;
    --font-body: "Inter", sans-serif;
    --font-mono: "JetBrains Mono", monospace;

    --font-xs: .75rem;
    --font-sm: .875rem;
    --font-md: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.5rem;
    --font-2xl: 2rem;
    --font-3xl: 3rem;

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

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-round: 999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow-sm: 0 2px 6px rgba(15, 23, 42, .08);
    --shadow-md: 0 8px 25px rgba(15, 23, 42, .08);
    --shadow-lg: 0 12px 35px rgba(15, 23, 42, .12);
    --shadow-xl: 0 18px 50px rgba(15, 23, 42, .18);
    --shadow-key: 0 3px 8px rgba(15, 23, 42, .10);
    --shadow-key-pressed: inset 0 3px 8px rgba(15, 23, 42, .22);

    /* Transitions */
    --transition-fast: 120ms;
    --transition-normal: 180ms;
    --transition-medium: 250ms;
    --transition-slow: 400ms;
    --ease: cubic-bezier(.2, .8, .2, 1);

    /* Component sizes */
    --hand-scale: 1;
    --finger-press-distance: 6px;
    --finger-glow-size: 18px;
    --finger-animation-speed: 180ms;
    --key-width: 60px;
    --key-height: 60px;
    --key-gap: 6px;
    --header-height: 72px;
    --lesson-height: 120px;
    --hands-height: 260px;
    --keyboard-height: 320px;
    --footer-height: 60px;

    /* Layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;

    /* Breakpoints (documentation values) */
    --mobile: 576px;
    --tablet: 768px;
    --laptop: 1024px;
    --desktop: 1280px;
    --wide: 1600px;
}

/* Explicit dark mode */
html[data-theme="dark"] {
    color-scheme: dark;

    --primary: #4f8cff;
    --primary-hover: #75a5ff;
    --primary-light: #172a4d;

    --background: #0b1120;
    --surface: #111827;
    --surface-alt: #182235;
    --surface-soft: #151f31;
    --surface-elevated: #1a2538;

    --border: #334155;
    --border-soft: #263449;

    --text: #f1f5f9;
    --text-light: #cbd5e1;
    --text-muted: #94a3b8;

    --key-bg: #172033;
    --key-border: #3a4960;
    --key-text: #f8fafc;
    --key-disabled: #475569;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .24);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, .28);
    --shadow-lg: 0 16px 38px rgba(0, 0, 0, .34);
    --shadow-xl: 0 22px 55px rgba(0, 0, 0, .42);
}

/* System mode follows the operating system. */
@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        color-scheme: dark;

        --primary: #4f8cff;
        --primary-hover: #75a5ff;
        --primary-light: #172a4d;

        --background: #0b1120;
        --surface: #111827;
        --surface-alt: #182235;
        --surface-soft: #151f31;
        --surface-elevated: #1a2538;

        --border: #334155;
        --border-soft: #263449;

        --text: #f1f5f9;
        --text-light: #cbd5e1;
        --text-muted: #94a3b8;

        --key-bg: #172033;
        --key-border: #3a4960;
        --key-text: #f8fafc;
        --key-disabled: #475569;

        --shadow-xs: 0 1px 2px rgba(0, 0, 0, .18);
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, .24);
        --shadow-md: 0 10px 28px rgba(0, 0, 0, .28);
        --shadow-lg: 0 16px 38px rgba(0, 0, 0, .34);
        --shadow-xl: 0 22px 55px rgba(0, 0, 0, .42);
    }
}
