/* 
===================
FlatRead Modern CSS Variables
===================
Modern theming system with CSS custom properties
*/

:root {
  /* Color System - Clean Design */
  --color-primary: #0ea5e9;
  --color-primary-hover: #0284c7;
  --color-secondary: #1e293b;
  --color-text: #1e293b;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-background: #ffffff;
  --color-background-secondary: #f8fafc;
  --color-background-tertiary: #f1f5f9;
  --color-surface: #f8fafc;
  --color-border: #e2e8f0;
  --color-border-light: #f3f4f6;
  --color-accent: #059669;
  --color-accent-hover: #047857;
  --color-warning: #d97706;
  --color-error: #dc2626;
  --color-success: #059669;
  
  /* Gradient Colors */
  --gradient-primary: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  --gradient-background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  --gradient-surface: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);

  /* Typography */
  --font-family-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'Fira Code', 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', Consolas, monospace;

  /* Font Sizes - Responsive */
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-size-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --font-size-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --font-size-4xl: clamp(2.25rem, 1.8rem + 2.25vw, 3rem);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --max-width-content: 65ch;
  --max-width-full: 1600px;
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;

  /* 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);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #f9fafb;
    --color-text-secondary: #d1d5db;
    --color-text-muted: #9ca3af;
    --color-background: #111827;
    --color-background-secondary: #1f2937;
    --color-background-tertiary: #374151;
    --color-border: #374151;
    --color-border-light: #4b5563;
    --color-secondary: #0a0a0a;
    --color-surface: #16213e;
    
    /* Update gradients for dark mode */
    --gradient-background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    --gradient-surface: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  }
}

/* Responsive breakpoints as CSS variables */
:root {
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
}
