/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* Colors */
  /* Primary: modern blue */
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #93c5fd;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;

  /* Feedback / status colors (light theme) */
  --color-info-soft: #dbeafe;
  --color-info-soft-strong: #bfdbfe;
  --color-info-strong: #1e40af;
  --color-info-accent-border: #60a5fa;
  --color-error-soft: #fee2e2;
  --color-error-soft-strong: #fecaca;
  --color-error-strong: #991b1b;
  --color-error-soft-border: #fca5a5;

  /* Light theme (default) */
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-light: #94a3b8;
  --color-white: #ffffff;

  /* Spacing */
  --spacing-unit: 1rem;
  --spacing-xs: calc(var(--spacing-unit) * 0.25);
  --spacing-sm: calc(var(--spacing-unit) * 0.5);
  --spacing-md: calc(var(--spacing-unit) * 0.75);
  --spacing-lg: var(--spacing-unit);
  --spacing-xl: calc(var(--spacing-unit) * 1.5);
  --spacing-2xl: calc(var(--spacing-unit) * 2);
  --spacing-3xl: calc(var(--spacing-unit) * 3);

  /* Border Radius */
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;

  /* Layout */
  --max-width: 1200px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-transform: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="dark"],
body[data-theme="dark"] {
  --color-background: #020617;
  --color-surface: #0f172a;
  --color-border: #1e293b;
  --color-border-light: #0b1120;
  --color-text: #e2e8f0;
  --color-text-secondary: #94a3b8;
  --color-text-light: #64748b;
  --color-white: #ffffff;

  /* Feedback / status colors (dark theme overrides) */
  --color-info-soft: #1d283a;
  --color-info-soft-strong: #1d4ed8;
  --color-info-strong: #e0f2fe;
  --color-error-soft: #450a0a;
  --color-error-soft-strong: #7f1d1d;
  --color-error-strong: #fee2e2;
  --color-error-soft-border: #fca5a5;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --color-background: #020617;
    --color-surface: #0f172a;
    --color-border: #1e293b;
    --color-border-light: #0b1120;
    --color-text: #e2e8f0;
    --color-text-secondary: #94a3b8;
    --color-text-light: #64748b;
    --color-white: #ffffff;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-unit: 0.875rem;
  }
}
