/* Editor chrome themes. styles.css and elements.css only ever read these
   variables, so a new theme is just a new block here. The design canvas is
   deliberately not themed (see js/theme.js). */

:root,
html[data-theme="light"] {
  color-scheme: light;
  --font-ui: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, Menlo, monospace;
  --radius: 6px;
  --radius-lg: 10px;

  --bg-app: #f3f4f6;
  --bg-surface: #ffffff;
  --bg-subtle: #f9fafb;
  --bg-muted: #f3f4f6;
  --bg-hover: #eef2ff;

  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --border-accent: #c7d2fe;

  --text: #1f2430;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-active: #3730a3;
  --accent-contrast: #ffffff;
  --accent-soft: #eef2ff;
  --accent-text: #4338ca;
  --focus-ring: rgba(79, 70, 229, 0.15);

  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-bg-hover: #fee2e2;
  --danger-border: #fecaca;

  --ok: #047857;
  --ok-bg: #ecfdf5;
  --ok-border: #a7f3d0;

  --select: #007AFF;
  --select-soft: rgba(0, 122, 255, 0.4);

  --gate-bg: #1f2430;
  --overlay: rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 30px 80px rgba(0, 0, 0, 0.35);

  --canvas-border: #d1d5db;
  --canvas-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --canvas-wrap-image: none;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg-app: #0f1115;
  --bg-surface: #181b21;
  --bg-subtle: #1e222a;
  --bg-muted: #242933;
  --bg-hover: #252a44;

  --border: #2a2f3a;
  --border-strong: #3a4150;
  --border-accent: #4a4f8f;

  --text: #e6e8ee;
  --text-muted: #9aa3b2;
  --text-faint: #6b7385;

  --accent: #6366f1;
  --accent-hover: #7c7ff5;
  --accent-active: #5558e0;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(99, 102, 241, 0.16);
  --accent-text: #a5b4fc;
  --focus-ring: rgba(129, 140, 248, 0.3);

  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.1);
  --danger-bg-hover: rgba(248, 113, 113, 0.18);
  --danger-border: rgba(248, 113, 113, 0.35);

  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.1);
  --ok-border: rgba(52, 211, 153, 0.35);

  --select: #3b9bff;
  --select-soft: rgba(59, 155, 255, 0.5);

  --gate-bg: #090a0d;
  --overlay: rgba(0, 0, 0, 0.6);
  --shadow-pop: 0 30px 80px rgba(0, 0, 0, 0.7);

  --canvas-border: #3a4150;
  --canvas-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

html[data-theme="cyber"] {
  color-scheme: dark;
  --font-ui: "JetBrains Mono", "Fira Code", "Cascadia Mono", ui-monospace, Consolas, monospace;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Mono", ui-monospace, Consolas, monospace;
  --radius: 2px;
  --radius-lg: 3px;

  --bg-app: #060913;
  --bg-surface: #0c1120;
  --bg-subtle: #101730;
  --bg-muted: #141c38;
  --bg-hover: rgba(0, 240, 255, 0.09);

  --border: #1b2a52;
  --border-strong: #24407e;
  --border-accent: #00a9b5;

  --text: #d6f6ff;
  --text-muted: #7fb3c9;
  --text-faint: #4b7088;

  --accent: #00f0ff;
  --accent-hover: #67f6ff;
  --accent-active: #00c2cf;
  --accent-contrast: #031018;
  --accent-soft: rgba(0, 240, 255, 0.1);
  --accent-text: #00f0ff;
  --focus-ring: rgba(0, 240, 255, 0.3);

  --danger: #ff4d7d;
  --danger-bg: rgba(255, 77, 125, 0.1);
  --danger-bg-hover: rgba(255, 77, 125, 0.2);
  --danger-border: rgba(255, 77, 125, 0.45);

  --ok: #39ff9c;
  --ok-bg: rgba(57, 255, 156, 0.08);
  --ok-border: rgba(57, 255, 156, 0.4);

  --select: #ff2bd6;
  --select-soft: rgba(255, 43, 214, 0.55);

  --gate-bg: #02040a;
  --overlay: rgba(2, 4, 10, 0.75);
  --shadow-pop: 0 0 0 1px rgba(0, 240, 255, 0.35), 0 0 60px rgba(0, 240, 255, 0.18);

  --canvas-border: #00f0ff;
  --canvas-shadow: 0 0 0 1px rgba(0, 240, 255, 0.5), 0 0 28px rgba(0, 240, 255, 0.28), 0 0 80px rgba(255, 43, 214, 0.12);
  --canvas-wrap-image:
    linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
}

/* Cyber-only flourishes: glow, caps, neon focus. */
html[data-theme="cyber"] body {
  letter-spacing: 0.01em;
}
html[data-theme="cyber"] .btn-primary {
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.45);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
html[data-theme="cyber"] .btn-primary:hover {
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.75);
}
html[data-theme="cyber"] .btn:not(.btn-primary):hover {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}
html[data-theme="cyber"] .palette h3,
html[data-theme="cyber"] .properties h3 {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
}
html[data-theme="cyber"] .palette-item:hover,
html[data-theme="cyber"] .template-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}
html[data-theme="cyber"] .screen-tab.active {
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}
html[data-theme="cyber"] .license-gate-box h1,
html[data-theme="cyber"] .project-name-input {
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}
html[data-theme="cyber"] .license-gate-box {
  border: 1px solid var(--accent);
}
