/* APL Design Tokens - Core design system variables */
:root {
  /* Primary Colors */
  --color-primary-50: #E8F5E9;
  --color-primary-100: #C8E6C9;
  --color-primary-500: #4CAF50;  /* Pickleball green */
  --color-primary-700: #388E3C;
  --color-primary-900: #1B5E20;
  
  /* Accent Colors */
  --color-accent-yellow: #FFD600;  /* Ball yellow */
  --color-accent-orange: #FF6F00;
  
  /* Semantic Colors */
  --color-success: #4CAF50;
  --color-error: #F44336;
  --color-warning: #FF9800;
  --color-info: #2196F3;
  
  /* Neutral Colors */
  --color-text-primary: #212121;
  --color-text-secondary: #757575;
  --color-text-disabled: #BDBDBD;
  --color-background: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-divider: #E0E0E0;
  
  /* Dark Mode (Reserved) */
  --color-dark-background: #121212;
  --color-dark-surface: #1E1E1E;
  --color-dark-text-primary: #E0E0E0;
  
  /* Spacing System - Base unit: 4px */
  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */
  --spacing-3xl: 4rem;     /* 64px */
  
  /* Font Families */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", Monaco, Consolas, monospace;
  
  /* Font Sizes */
  --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 */
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;
  
  /* Motion Guidelines - Durations */
  --duration-instant: 100ms;
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  
  /* Motion Guidelines - Easings */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  
  /* Standard Transitions */
  --transition-colors: color var(--duration-fast) var(--ease-in-out),
                      background-color var(--duration-fast) var(--ease-in-out),
                      border-color var(--duration-fast) var(--ease-in-out);
  --transition-transform: transform var(--duration-normal) var(--ease-in-out);
  --transition-opacity: opacity var(--duration-normal) var(--ease-in-out);
  
  /* Responsive Breakpoints */
  --breakpoint-sm: 640px;   /* Tablet portrait */
  --breakpoint-md: 768px;   /* Tablet landscape */
  --breakpoint-lg: 1024px;  /* Desktop */
  --breakpoint-xl: 1280px;  /* Wide desktop */
}

/* Dark Mode Support - Automatic */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text-primary: #E0E0E0;
    --color-text-secondary: #BDBDBD;
    --color-background: #121212;
    --color-surface: #1E1E1E;
    --color-divider: #333333;
    
    /* Adjust semantic colors for dark */
    --color-primary-500: #66BB6A;
    --color-error: #EF5350;
    --color-warning: #FFA726;
  }
}

/* Manual dark mode toggle */
[data-theme="dark"] {
  --color-text-primary: #E0E0E0;
  --color-text-secondary: #BDBDBD;
  --color-background: #121212;
  --color-surface: #1E1E1E;
  --color-divider: #333333;
  --color-primary-500: #66BB6A;
  --color-error: #EF5350;
  --color-warning: #FFA726;
}