/**
 * CSS Variables / Design Tokens
 * DLE 2025 Modern Template
 * Mobile-first, Dark theme default
 */

:root {
  /* ========================================
     COLOR PALETTE
     ======================================== */
  
  /* Background colors */
  --bg-main: #0F1420;
  --bg-secondary: #1A2232;
  --bg-tertiary: #243047;
  --color-bg-primary: var(--bg-main);
  --color-bg-secondary: var(--bg-secondary);
  --color-bg-tertiary: var(--bg-tertiary);
  --color-bg-elevated: #2A3850;
  
  /* Surface colors */
  --color-surface: var(--bg-secondary);
  --color-surface-hover: #223049;
  --color-surface-active: var(--bg-tertiary);
  
  /* Border colors */
  --border-ghost: #33415C;
  --color-border: var(--border-ghost);
  --color-border-hover: #445577;
  --color-border-focus: #6D4AFF;
  
  /* Text colors */
  --text-primary: #E8EEF8;
  --text-secondary: #A9B6CC;
  --text-muted: #8391A8;
  --text-link: #B9C9FF;
  --color-text-primary: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-tertiary: #95A5BE;
  --color-text-muted: var(--text-muted);
  
  /* Accent colors */
  --accent-primary: #6D4AFF;
  --accent-hover: #7C5CFA;
  --color-accent: var(--accent-primary);
  --color-accent-hover: var(--accent-hover);
  --color-accent-active: #5936E6;
  --color-accent-subtle: rgba(109, 74, 255, 0.12);
  --color-accent-secondary: #F4B740;
  
  /* Semantic colors */
  --status-ongoing: #38C793;
  --status-rating: #C9A45F;
  --color-success: var(--status-ongoing);
  --color-warning: #F4B740;
  --color-error: #ef4444;
  --color-info: var(--text-link);
  
  /* Rating colors */
  --color-rating-high: var(--status-rating);
  --color-rating-medium: #B89055;
  --color-rating-low: #D15A6A;
  
  /* ========================================
     TYPOGRAPHY
     ======================================== */
  
  /* Font families */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  
  /* Font sizes - Major Third scale (1.25) */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  
  /* Font weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Line heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Letter spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  
  /* ========================================
     SPACING
     ======================================== */
  
  /* Space scale - 4px base */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */
  
  /* ========================================
     LAYOUT
     ======================================== */
  
  /* Container */
  --container-max: 1400px;
  --container-padding: var(--space-4);
  
  /* Grid gaps */
  --gap-xs: var(--space-2);
  --gap-sm: var(--space-3);
  --gap-md: var(--space-4);
  --gap-lg: var(--space-6);
  --gap-xl: var(--space-8);
  
  /* ========================================
     BORDERS & SHADOWS
     ======================================== */
  
  /* Border radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(124, 92, 250, 0.22);
  
  /* ========================================
     TRANSITIONS
     ======================================== */
  
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* ========================================
     Z-INDEX SCALE
     ======================================== */
  
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
}

/* ========================================
   LIGHT THEME (optional toggle)
   ======================================== */

[data-theme="light"] {
  --bg-main: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f4;
  --color-bg-primary: var(--bg-main);
  --color-bg-secondary: var(--bg-secondary);
  --color-bg-tertiary: var(--bg-tertiary);
  --color-bg-elevated: #ffffff;
  
  --color-surface: #ffffff;
  --color-surface-hover: #f8f9fa;
  --color-surface-active: #e8eaed;
  
  --border-ghost: #c7d0dc;
  --color-border: var(--border-ghost);
  --color-border-hover: #bdc1c6;
  --color-border-focus: #6366f1;
  
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-muted: #80868b;
  --text-link: #4f6cf0;
  --color-text-primary: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-tertiary: #80868b;
  --color-text-muted: var(--text-muted);
  
  --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(60, 64, 67, 0.15), 0 2px 4px -2px rgba(60, 64, 67, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(60, 64, 67, 0.2), 0 4px 6px -4px rgba(60, 64, 67, 0.15);
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
    --transition-bounce: 0ms;
  }
}
