/*
  theme-ember.css — cool blue-black "midnight" background (the same
  near-black GitHub/dev-tool dark uses) with a saturated red-orange
  "ember" accent. Deliberately differentiated from Classic (warm
  near-black + softer orange + literary Fraunces serif) with a cooler
  black, a hotter/more saturated accent, a sharpened "product UI"
  corner radius, and a completely different geometric font pairing
  (Space Grotesk + IBM Plex Sans) — reads as a modern SaaS/dev-tool
  theme rather than Classic's editorial one.

  Scoped under `body[data-theme="ember"]`, set at runtime by
  js/theme_switcher.js. 100% additive.
*/

body[data-theme="ember"] {
  /* ---- Brand — hot red-orange, not Classic's softer orange ---- */
  --accent:      #ff6b35;
  --accent-dark: #d8501f;
  --accent-soft: #ffae85;
  --success:     #4ade80;
  --danger:      #f4415f;
  --warning:     #fbbf24;

  --primary: var(--accent);
  --primary-dark: var(--accent-dark);

  --gradient-brand: linear-gradient(135deg, #d8501f 0%, #ff6b35 55%, #ff9a5c 100%);

  /* ---- Surfaces — cool blue-black, not warm near-black ---- */
  --bg:        #0d1117;
  --bg-alt:    #0a0d12;
  --bg-card:   #131820;
  --bg-card2:  #182029;
  --surface:   rgba(242,238,232,.045);
  --surface-hover: rgba(242,238,232,.075);
  --border:    rgba(242,238,232,.09);
  --border-strong: rgba(242,238,232,.18);

  /* ---- Text ---- */
  --text:      #f2eee8;
  --text-muted: rgba(242,238,232,.62);
  --text-dim:  rgba(242,238,232,.42);

  /* ---- Shape — sharpened, techy product-UI corners ---- */
  --radius:    10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow:    0 10px 30px rgba(0,0,0,.55), 0 0 20px rgba(255,107,53,.12);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}

body[data-theme="ember"] h1,
body[data-theme="ember"] h2,
body[data-theme="ember"] h3,
body[data-theme="ember"] h4 {
  font-weight: 700;
  letter-spacing: -.01em;
}

/* ---- Every hardcoded 999px pill in style.css, sharpened ---- */
body[data-theme="ember"] .btn,
body[data-theme="ember"] .subtab-row,
body[data-theme="ember"] .subtab,
body[data-theme="ember"] .answer-chip,
body[data-theme="ember"] .diff-badge,
body[data-theme="ember"] .marks-badge,
body[data-theme="ember"] .topic-chip,
body[data-theme="ember"] .quiz-timer,
body[data-theme="ember"] .level-tabs,
body[data-theme="ember"] .level-tab-indicator,
body[data-theme="ember"] .level-tab {
  border-radius: var(--radius-sm);
}
body[data-theme="ember"] .answer-chip-remove {
  border-radius: 4px;
}
body[data-theme="ember"] .dock-icon-btn {
  border-radius: 50%;
}

/* ---- Header / nav glass ---- */
body[data-theme="ember"] header {
  background: rgba(13,17,23,.82);
}

/* ---- Primary button ---- */
body[data-theme="ember"] .btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 18px rgba(255,107,53,.4);
}
body[data-theme="ember"] .btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 0 26px rgba(255,107,53,.55);
}
body[data-theme="ember"] .btn-secondary:hover {
  border-color: var(--accent-soft);
}

/* ---- Hero: neutralize the three.js shader with an ember-tinted wash. ---- */
body[data-theme="ember"] #hero-canvas {
  display: none;
}
body[data-theme="ember"] .hero-canvas-wrap {
  background:
    radial-gradient(900px 500px at 78% 20%, rgba(255,107,53,.16), transparent 60%),
    radial-gradient(700px 420px at 10% 100%, rgba(255,107,53,.08), transparent 55%),
    var(--bg);
}
body[data-theme="ember"] .hero-grain {
  background-image:
    linear-gradient(rgba(242,238,232,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242,238,232,.045) 1px, transparent 1px);
}
/* Monospace-tagged glow — the emphasized hero word switches to the
   mono face for a "code token" feel, distinct from every other
   theme's serif/rounded treatment. */
body[data-theme="ember"] .hero-heading em {
  font-style: normal;
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 14px rgba(255,107,53,.5);
}

/* ---- Custom cursor hover ring ---- */
body[data-theme="ember"] .custom-cursor-ring.cursor-hover {
  background: rgba(255,107,53,.12);
}

/* ---- Hero stats panel + level-tab indicator ---- */
body[data-theme="ember"] .hero-stats-panel {
  background: rgba(13,17,23,.55);
}
body[data-theme="ember"] .level-tab-indicator {
  box-shadow: 0 0 16px rgba(255,107,53,.4);
}

/* ---- Badges/chips/progress bars — light-tinted, not accent-tinted ---- */
body[data-theme="ember"] .topic-progress-bar,
body[data-theme="ember"] .quiz-progress-bar,
body[data-theme="ember"] .mini-bar-track {
  background: rgba(242,238,232,.09);
}
body[data-theme="ember"] .score-circle-bg {
  stroke: rgba(242,238,232,.09);
}
body[data-theme="ember"] .topic-progress-table th {
  background: rgba(242,238,232,.035);
}
body[data-theme="ember"] .topic-progress-table tr:hover td {
  background: rgba(242,238,232,.04);
}
body[data-theme="ember"] .answer-chip {
  background: rgba(242,238,232,.07);
}
body[data-theme="ember"] .answer-chip-remove {
  background: rgba(242,238,232,.12);
}
body[data-theme="ember"] .format-help-panel code {
  background: rgba(242,238,232,.08);
}
body[data-theme="ember"] .topic-chip {
  background: rgba(242,238,232,.07);
}
body[data-theme="ember"] .ai-points {
  border-top-color: rgba(242,238,232,.12);
}
body[data-theme="ember"] .toast {
  background: rgba(13,17,23,.92);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

/* ---- Accent-tinted glows/focus-rings ---- */
body[data-theme="ember"] .marks-badge,
body[data-theme="ember"] .option-btn:hover:not(:disabled),
body[data-theme="ember"] .setup-option:hover,
body[data-theme="ember"] .setup-option.selected,
body[data-theme="ember"] .symbol-btn:hover,
body[data-theme="ember"] .explanation-box.feedback-reveal {
  background: rgba(255,107,53,.13);
}
body[data-theme="ember"] .quiz-timer {
  border-color: rgba(255,107,53,.35);
}
body[data-theme="ember"] .explanation-box {
  background: rgba(255,107,53,.08);
  border-color: rgba(255,107,53,.32);
}
body[data-theme="ember"] .explanation-box.feedback-reveal {
  border-color: rgba(255,107,53,.42);
}
body[data-theme="ember"] .answer-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,107,53,.2);
}
body[data-theme="ember"] .quiz-progress-fill {
  box-shadow: 0 4px 16px rgba(255,107,53,.4);
}

/* Difficulty badges — generic dark-tuned triple, reused verbatim. */
body[data-theme="ember"] .diff-easy   { background: rgba(34,197,94,.18);  color: #4ade80; }
body[data-theme="ember"] .diff-medium { background: rgba(242,194,24,.18); color: #fadb5f; }
body[data-theme="ember"] .diff-hard   { background: rgba(244,65,95,.18);  color: #fb7185; }
