/* ==========================================================================
   Design Tokens - GymTracker Elite UI
   CSS Custom Properties for the entire design system
   ========================================================================== */

:root {
    /* ── Background Colors ────────────────────────────────────────────────── */
    --color-bg-primary: #0A0E14;
    --color-bg-secondary: #0F1319;
    --color-bg-card: #1A1F2E;
    --color-bg-card-hover: #1E2436;
    --color-bg-input: #141825;
    --color-bg-elevated: #222840;

    /* ── Accent Colors ────────────────────────────────────────────────────── */
    --color-cyan: #00D4FF;
    --color-cyan-dark: #00A3CC;
    --color-cyan-glow: rgba(0, 212, 255, 0.15);
    --color-cyan-glow-strong: rgba(0, 212, 255, 0.3);

    --color-green: #39FF14;
    --color-green-dark: #2BD10F;
    --color-green-glow: rgba(57, 255, 20, 0.15);

    --color-purple: #8B5CF6;
    --color-purple-dark: #7C3AED;
    --color-purple-glow: rgba(139, 92, 246, 0.15);

    --color-orange: #F97316;
    --color-orange-glow: rgba(249, 115, 22, 0.15);

    --color-red: #EF4444;
    --color-red-glow: rgba(239, 68, 68, 0.15);

    --color-yellow: #FBBF24;
    --color-yellow-glow: rgba(251, 191, 36, 0.15);

    --color-blue: #3B82F6;
    --color-blue-glow: rgba(59, 130, 246, 0.15);

    /* ── Text Colors ──────────────────────────────────────────────────────── */
    --color-text-primary: #F9FAFB;
    --color-text-secondary: #9CA3AF;
    --color-text-muted: #6B7280;
    --color-text-disabled: #4B5563;

    /* ── Border Colors ────────────────────────────────────────────────────── */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-light: rgba(255, 255, 255, 0.12);
    --color-border-focus: var(--color-cyan);

    /* ── Glass Morphism ───────────────────────────────────────────────────── */
    --glass-bg: rgba(26, 31, 46, 0.7);
    --glass-bg-light: rgba(26, 31, 46, 0.5);
    --glass-bg-dark: rgba(10, 14, 20, 0.85);
    --glass-blur: 12px;
    --glass-border: rgba(255, 255, 255, 0.08);

    /* ── Typography ───────────────────────────────────────────────────────── */
    --font-primary: 'Inter', 'Cairo', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-arabic: 'Cairo', 'Inter', sans-serif;

    /* ── Spacing ──────────────────────────────────────────────────────────── */
    --space-xs: 0.25rem;   /* 4px */
    --space-sm: 0.5rem;    /* 8px */
    --space-md: 1rem;      /* 16px */
    --space-lg: 1.5rem;    /* 24px */
    --space-xl: 2rem;      /* 32px */
    --space-2xl: 3rem;     /* 48px */

    /* ── Sizing ───────────────────────────────────────────────────────────── */
    --btn-height: 2.75rem;          /* 44px - min touch target */
    --btn-height-mobile: 3.5rem;    /* 56px - mobile buttons */
    --input-height: 2.75rem;        /* 44px */
    --input-height-workout: 4rem;   /* 64px - workout inputs */
    --bottom-nav-height: 4.5rem;    /* 72px */
    --header-height: 4rem;          /* 64px */
    --increment-btn-size: 3rem;     /* 48px */

    /* ── Border Radius ────────────────────────────────────────────────────── */
    --radius-sm: 0.375rem;  /* 6px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.25rem;  /* 20px */
    --radius-full: 9999px;

    /* ── Shadows ──────────────────────────────────────────────────────────── */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-cyan: 0 4px 20px rgba(0, 212, 255, 0.2);
    --shadow-green: 0 4px 20px rgba(57, 255, 20, 0.2);
    --shadow-purple: 0 4px 20px rgba(139, 92, 246, 0.2);

    /* ── Z-Index Scale ────────────────────────────────────────────────────── */
    --z-base: 1;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-fixed: 30;
    --z-overlay: 40;
    --z-modal: 50;
    --z-toast: 60;

    /* ── Transitions ──────────────────────────────────────────────────────── */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ── Base Styles ──────────────────────────────────────────────────────────── */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* ── Focus Ring Styles (Accessibility) ────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--color-cyan);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ── Scrollbar Styling ────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ── Selection Color ──────────────────────────────────────────────────────── */
::selection {
    background: var(--color-cyan-glow-strong);
    color: var(--color-text-primary);
}

/* ── Utility: Font Mono ───────────────────────────────────────────────────── */
.font-mono {
    font-family: var(--font-mono) !important;
}
