/**
 * Design tokens and CSS variables.
 * All color, spacing, typography, and other design values are defined here.
 * Theme overrides only redefine these variables.
 */

:root {
  /* Colors - Light Theme */
  --color-bg: #ffffff;
  --color-bg-muted: #f5f5f5;
  --color-bg-elevated: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --color-text-inverse: #ffffff;
  
  --color-primary: #0066cc;
  --color-primary-hover: #0052a3;
  --color-primary-light: #e6f2ff;
  
  --color-border: #e0e0e0;
  --color-border-muted: #f0f0f0;
  
  --color-success: #28a745;
  --color-success-bg: #dcfce7;
  --color-success-text: #166534;
  --color-warning: #ffc107;
  --color-error: #dc3545;
  --color-accent: #cc0000; /* Red accent for active/highlighted items */
  --color-accent-hover: #ff6b6b; /* Brighter red for dark mode */

  /* Surface colors (card/panel backgrounds) */
  --color-surface: #ffffff;
  --color-surface-variant: #f5f5f5;

  /* Secondary text (less prominent than --color-text, more than --color-text-muted) */
  --color-text-secondary: #555555;

  /* Play button (shared green play/pause control) */
  --color-play-button: #4caf50;
  --color-play-button-hover: #45a049;
  --color-play-button-playing: #e53935;
  --color-play-button-playing-hover: #c62828;

  /* Ad colors */
  --color-ad-bg: #ffcccc;
  --color-ad-text: #cc0000;
  
  /* Badge colors */
  --color-badge-bg: #e0e0e0;
  --color-badge-text: #555555;
  
  /* Switch colors */
  --color-switch-bg: #e0e0e0;
  
  /* Border hover */
  --color-border-hover: #bbbbbb;
  
  /* 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 */
  --space-3xl: 4rem;     /* 64px */
  
  /* Typography */
  --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;    /* 18px */
  --font-size-xl: 1.25rem;     /* 20px */
  --font-size-2xl: 1.5rem;     /* 24px */
  --font-size-3xl: 1.875rem;   /* 30px */
  --font-size-4xl: 2.25rem;    /* 36px */

  --h1-size: var(--font-size-3xl);         /* 1.875rem / 30px */
  --h1-size-mobile: var(--font-size-2xl);  /* 1.5rem / 24px */
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Border Radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Z-index layers */
  --z-base: 0;
  --z-popup-installer: 256;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  /* Transitions */
  --transition-fast: 600ms ease-in-out;
  --transition-base: 800ms ease-in-out;
  --transition-slow: 1000ms ease-in-out;
  
  /* Layout */
  --container-max-width: 1280px;
  --container-padding: var(--space-md);
  --header-height: 60px;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --color-bg: #0f1115;
  --color-bg-muted: #1a1d24;
  --color-bg-elevated: #252932;
  --color-text: #e4e4e7;
  --color-text-muted: #a1a1aa;
  --color-text-inverse: #0f1115;
  
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-light: #1e3a5f;
  
  --color-border: #2d2d33;
  --color-border-muted: #1f1f23;
  
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.2);
  --color-success-text: #86efac;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-accent: #ff6b6b; /* Brighter red for dark mode */
  --color-accent-hover: #ff8787;

  /* Surface colors */
  --color-surface: #252932;
  --color-surface-variant: #1a1d24;

  /* Secondary text */
  --color-text-secondary: #a1a1aa;

  /* Play button */
  --color-play-button: #4caf50;
  --color-play-button-hover: #45a049;
  --color-play-button-playing: #e53935;
  --color-play-button-playing-hover: #c62828;

  /* Ad colors */
  --color-ad-bg: #3a1c1c;
  --color-ad-text: #ffcccc;
  
  /* Badge colors */
  --color-badge-bg: #333333;
  --color-badge-text: #e0e0e0;
  
  /* Switch colors */
  --color-switch-bg: #404040;
  
  /* Border hover */
  --color-border-hover: #666666;
  
  --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 -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

