/* ============================================================
 * GENERATETUBE — DESIGN TOKENS
 * Single source of truth for all colors, spacing, typography,
 * shadows and motion. Reference these via var(--token-name).
 * ============================================================ */

:root {
    /* ── SURFACE (background hierarchy) ─────────────────────── */
    --surface-base:     #08080C;            /* page background */
    --surface-raised:   #131319;            /* card */
    --surface-overlay:  #1C1C24;            /* modal, popover */
    --surface-elevated: #25252F;            /* input, hover state */
    --surface-glass:    rgba(20, 20, 28, 0.72);
    --surface-tint:     rgba(255, 255, 255, 0.04);

    /* ── BORDERS ──────────────────────────────────────────── */
    --border-subtle:    rgba(255, 255, 255, 0.06);
    --border-default:   rgba(255, 255, 255, 0.10);
    --border-strong:    rgba(255, 255, 255, 0.18);
    --border-focus:     #A855F7;

    /* ── TEXT ─────────────────────────────────────────────── */
    --text-primary:     #FFFFFF;
    --text-secondary:   rgba(255, 255, 255, 0.72);
    --text-tertiary:    rgba(255, 255, 255, 0.52);
    --text-muted:       rgba(255, 255, 255, 0.36);
    --text-disabled:    rgba(255, 255, 255, 0.22);

    /* ── BRAND (violet → fuchsia AI identity) ─────────────── */
    --brand-50:         #FAF5FF;
    --brand-200:        #E9D5FF;
    --brand-400:        #C084FC;
    --brand-500:        #A855F7;            /* primary */
    --brand-600:        #9333EA;
    --brand-700:        #7C3AED;
    --accent-pink:      #EC4899;            /* secondary brand */
    --accent-pink-600:  #DB2777;

    --brand-primary:        var(--brand-500);
    --brand-primary-hover:  var(--brand-600);
    --brand-primary-active: var(--brand-700);

    --brand-gradient:        linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #EC4899 100%);
    --brand-gradient-hover:  linear-gradient(135deg, #7C3AED 0%, #9333EA 50%, #DB2777 100%);
    --brand-gradient-soft:   linear-gradient(135deg, rgba(139,92,246,0.16) 0%, rgba(168,85,247,0.16) 50%, rgba(236,72,153,0.16) 100%);
    --brand-gradient-text:   linear-gradient(135deg, #A78BFA 0%, #C084FC 40%, #F472B6 100%);

    /* ── SEMANTIC ─────────────────────────────────────────── */
    --color-success:    #10B981;
    --color-success-bg: rgba(16, 185, 129, 0.14);
    --color-warning:    #F59E0B;
    --color-warning-bg: rgba(245, 158, 11, 0.14);
    --color-error:      #EF4444;
    --color-error-bg:   rgba(239, 68, 68, 0.14);
    --color-info:       #06B6D4;
    --color-info-bg:    rgba(6, 182, 212, 0.14);

    /* ── SPACING (4px base) ───────────────────────────────── */
    --space-0:  0;
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-7:  32px;
    --space-8:  40px;
    --space-9:  48px;
    --space-10: 64px;
    --space-11: 80px;
    --space-12: 96px;

    /* ── RADII ────────────────────────────────────────────── */
    --radius-xs:    4px;
    --radius-sm:    6px;
    --radius-md:    10px;
    --radius-lg:    14px;
    --radius-xl:    20px;
    --radius-2xl:   28px;
    --radius-pill:  9999px;
    --radius-circle: 50%;

    /* ── TYPOGRAPHY ───────────────────────────────────────── */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Monaco, monospace;

    --text-2xs:  10px;
    --text-xs:   11px;
    --text-sm:   13px;
    --text-base: 15px;
    --text-md:   17px;
    --text-lg:   20px;
    --text-xl:   24px;
    --text-2xl:  30px;
    --text-3xl:  38px;
    --text-4xl:  48px;

    --font-normal:    400;
    --font-medium:    500;
    --font-semibold:  600;
    --font-bold:      700;
    --font-extrabold: 800;
    --font-black:     900;

    --leading-none:    1;
    --leading-tight:   1.2;
    --leading-snug:    1.4;
    --leading-normal:  1.5;
    --leading-relaxed: 1.65;

    --tracking-tighter: -0.03em;
    --tracking-tight:   -0.015em;
    --tracking-normal:  0;
    --tracking-wide:    0.015em;
    --tracking-widest:  0.08em;

    /* ── SHADOWS ──────────────────────────────────────────── */
    --shadow-xs:  0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm:  0 2px 6px rgba(0, 0, 0, 0.5);
    --shadow-md:  0 6px 16px rgba(0, 0, 0, 0.55);
    --shadow-lg:  0 12px 32px rgba(0, 0, 0, 0.62);
    --shadow-xl:  0 24px 64px rgba(0, 0, 0, 0.7);

    --shadow-glow:        0 0 24px rgba(168, 85, 247, 0.35);
    --shadow-glow-strong: 0 0 32px rgba(168, 85, 247, 0.55), 0 0 60px rgba(236, 72, 153, 0.22);
    --shadow-glow-pink:   0 0 28px rgba(236, 72, 153, 0.40);

    --shadow-focus-ring:  0 0 0 3px rgba(168, 85, 247, 0.35);

    /* ── MOTION ───────────────────────────────────────────── */
    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in:      cubic-bezier(0.4, 0, 1, 1);
    --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
    --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);

    --duration-instant: 80ms;
    --duration-fast:    140ms;
    --duration-default: 220ms;
    --duration-slow:    320ms;
    --duration-slower:  480ms;

    /* ── Z-INDEX SCALE ────────────────────────────────────── */
    --z-base:     0;
    --z-raised:   10;
    --z-dropdown: 50;
    --z-sticky:   100;
    --z-overlay:  500;
    --z-modal:    1000;
    --z-toast:    2000;
    --z-lightbox: 9999;

    /* ── LAYOUT ───────────────────────────────────────────── */
    --container-sm: 640px;
    --container-md: 820px;
    --container-lg: 1024px;
    --container-xl: 1280px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
