/* Kazakan Tools 2.0 Design Tokens — Modern iPhone Glass Aesthetic */

:root,
[data-theme="dark"] {
  /* Eye-Friendly Dark Obsidian / Navy Palette (Default Vision Aesthetic) */
  --brand-primary: #3b82f6;
  --brand-primary-hover: #60a5fa;
  --brand-primary-light: rgba(59, 130, 246, 0.15);
  --brand-primary-border: rgba(59, 130, 246, 0.35);
  --brand-accent: #38bdf8;

  --bg-canvas: #060913;
  --bg-surface: #0e1526;
  --bg-card: rgba(14, 22, 40, 0.72);
  --bg-card-hover: rgba(22, 34, 60, 0.88);
  --bg-subtle: #141e34;
  --bg-elevated: #1a2744;
  --bg-glass: rgba(10, 16, 30, 0.75);
  --bg-glass-active: rgba(20, 30, 52, 0.95);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-on-primary: #ffffff;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-focus: #3b82f6;

  --glass-blur: blur(24px);
  --glass-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.5);
  --glass-shadow-hover: 0 24px 48px -12px rgba(0, 0, 0, 0.7);

  --status-success: #10b981;
  --status-error: #ef4444;
  --status-warning: #f59e0b;

  /* Typography: Zero-latency system font stack */
  --font-system: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Cairo", "Tajawal", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;

  /* Radii - iPhone Rounded Corners */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-card: 22px;
  --radius-lg: 26px;
  --radius-full: 9999px;
  --radius-pill: 9999px;

  /* Min Touch Target (WCAG AAA) */
  --min-touch-size: 48px;

  /* Layout widths: let desktop layouts breathe without losing readable measure. */
  --container-max: 1320px;
  --container-narrow: 900px;
  --container-tool: 1380px;
}

[data-theme="light"] {
  /* Eye-Friendly Light Palette */
  --brand-primary: #2563eb;
  --brand-primary-hover: #1d4ed8;
  --brand-primary-light: rgba(37, 99, 235, 0.08);
  --brand-primary-border: rgba(37, 99, 235, 0.2);
  --brand-accent: #0ea5e9;

  --bg-canvas: #f0f4f9;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-hover: #ffffff;
  --bg-subtle: #e9eef6;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-active: rgba(255, 255, 255, 0.95);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;
  --text-on-primary: #ffffff;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-medium: rgba(15, 23, 42, 0.14);
  --border-glass: rgba(255, 255, 255, 0.6);
  --border-focus: #2563eb;

  --glass-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  --glass-shadow-hover: 0 20px 40px -12px rgba(37, 99, 235, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-primary: #3b82f6;
    --brand-primary-hover: #60a5fa;
    --brand-primary-light: rgba(59, 130, 246, 0.15);
    --brand-primary-border: rgba(59, 130, 246, 0.35);
    --brand-accent: #38bdf8;

    --bg-canvas: #090d16;
    --bg-surface: #111827;
    --bg-card: rgba(19, 26, 42, 0.72);
    --bg-card-hover: rgba(26, 36, 58, 0.88);
    --bg-subtle: #172033;
    --bg-elevated: #1e293b;
    --bg-glass: rgba(17, 24, 39, 0.75);
    --bg-glass-active: rgba(24, 34, 53, 0.95);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.16);
    --border-glass: rgba(255, 255, 255, 0.12);
    --border-focus: #3b82f6;

    --glass-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --glass-shadow-hover: 0 20px 40px -10px rgba(59, 130, 246, 0.22);
  }
}
