/* ========= THEME TOKENS ========= */
/* Deep blue + neon accents | Geist font */

/* Dark Theme (default) */
:root,
[data-theme="dark"] {
  /* Backgrounds - deep blue/navy */
  --bg: #080b14;
  --bg-secondary: #0d1120;
  --surface: #111827;
  --surface-2: #1a2035;
  --surface-3: #222940;

  /* Borders */
  --border: #1e2a42;
  --border-light: #2a3a58;

  /* Text */
  --text: #e2e8f0;
  --text-secondary: #b0bdd0;
  --text-muted: #64748b;

  /* Accent - neon cyan/electric blue */
  --accent: #00d4ff;
  --accent-hover: #33ddff;
  --accent-light: rgba(0, 212, 255, 0.12);

  /* Status - neon tones */
  --green: #00ffaa;
  --red: #ff3366;
  --orange: #ffaa00;

  /* Sidebar - deep navy */
  --sidebar-bg: #0a0f1e;
  --sidebar-border: #162038;
  --sidebar-text: #64748b;
  --sidebar-text-active: #e2e8f0;
  --sidebar-active-bg: rgba(0, 212, 255, 0.1);
  --sidebar-hover-bg: rgba(255, 255, 255, 0.04);
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;

  /* Header */
  --header-bg: #0d1120;
  --header-height: 64px;

  /* Shared */
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow: 0 1px 4px rgba(0,0,0,0.4);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.5);
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  --transition: 0.2s ease;

  /* Syntax Highlighting - neon palette */
  --syn-keyword: #c084fc;
  --syn-string: #34d399;
  --syn-number: #fb923c;
  --syn-bool: #f472b6;
  --syn-null: #f472b6;
  --syn-comment: #475569;
  --syn-function: #60a5fa;
  --syn-type: #fbbf24;
  --syn-operator: #22d3ee;
  --syn-brace: #22d3ee;
  --syn-paren: #facc15;
  --syn-field: #fb7185;
  --syn-directive: #c084fc;
  --syn-argument: #fbbf24;
}

/* Light Theme - clean with blue undertone */
[data-theme="light"] {
  --bg: #f0f4f8;
  --bg-secondary: #e4eaf0;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #eef2f6;

  --border: #d8e0ea;
  --border-light: #c4cfde;

  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #94a3b8;

  /* Sidebar stays dark in light mode */
  --sidebar-bg: #0a0f1e;
  --sidebar-border: #162038;
  --sidebar-text: #64748b;
  --sidebar-text-active: #e2e8f0;
  --sidebar-active-bg: rgba(0, 212, 255, 0.12);
  --sidebar-hover-bg: rgba(255, 255, 255, 0.04);

  --header-bg: #ffffff;

  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);

  /* Syntax Highlighting (light) */
  --syn-keyword: #7c3aed;
  --syn-string: #059669;
  --syn-number: #ea580c;
  --syn-bool: #db2777;
  --syn-null: #db2777;
  --syn-comment: #94a3b8;
  --syn-function: #2563eb;
  --syn-type: #ca8a04;
  --syn-operator: #0891b2;
  --syn-brace: #0891b2;
  --syn-paren: #b45309;
  --syn-field: #e11d48;
  --syn-directive: #7c3aed;
  --syn-argument: #ca8a04;
}

/* TC-001 Theme - Charcoal & Light Gray */
[data-theme="tc001"] {
  --bg: #F4F4F4;
  --bg-secondary: #EAEAEA;
  --surface: #FFFFFF;
  --surface-2: #F9F9F9;
  --surface-3: #F0F0F0;

  --border: #D4D4D4;
  --border-light: #BFBFBF;

  --text: #2E2E2E;
  --text-secondary: #4A4A4A;
  --text-muted: #8A8A8A;

  /* Accent - charcoal primary */
  --accent: #2E2E2E;
  --accent-hover: #444444;
  --accent-light: rgba(46, 46, 46, 0.08);

  /* Status */
  --green: #2E7D32;
  --red: #C62828;
  --orange: #EF6C00;

  /* Sidebar - charcoal dark */
  --sidebar-bg: #2E2E2E;
  --sidebar-border: #3D3D3D;
  --sidebar-text: #9E9E9E;
  --sidebar-text-active: #FFFFFF;
  --sidebar-active-bg: rgba(255, 255, 255, 0.1);
  --sidebar-hover-bg: rgba(255, 255, 255, 0.05);

  --header-bg: #FFFFFF;

  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);

  /* Syntax Highlighting - muted tones */
  --syn-keyword: #6A1B9A;
  --syn-string: #2E7D32;
  --syn-number: #E65100;
  --syn-bool: #AD1457;
  --syn-null: #AD1457;
  --syn-comment: #9E9E9E;
  --syn-function: #1565C0;
  --syn-type: #F57F17;
  --syn-operator: #00838F;
  --syn-brace: #00838F;
  --syn-paren: #E65100;
  --syn-field: #C62828;
  --syn-directive: #6A1B9A;
  --syn-argument: #F57F17;
}

/* Smooth theme transition */
*,
*::before,
*::after {
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

/* Disable transition on page load to prevent flash */
.no-transition *,
.no-transition *::before,
.no-transition *::after {
  transition: none !important;
}
