/*
  theme-bloom-dark.css — dark mode for the Bloom theme: deep plum-
  berry background instead of near-black, brighter pink for contrast,
  soft pink glow instead of a hard shadow.

  Scoped under `body[data-theme="bloom"].theme-dark` (compound
  selector, always beats theme-bloom.css's single-attribute rules on
  specificity). Toggled at runtime by js/color_scheme.js.
*/

body[data-theme="bloom"].theme-dark {
  --accent:      #f472b6;
  --accent-dark: #ec4899;
  --accent-soft: #fbcfe8;
  --success:     #4ade80;
  --danger:      #fb7185;
  --warning:     #fbbf24;

  --gradient-brand: linear-gradient(135deg, #f9a8d4 0%, #f472b6 55%, #ec4899 100%);

  --bg:        #2a1128;
  --bg-alt:    #341530;
  --bg-card:   #3a1836;
  --bg-card2:  #421d3d;
  --surface:   rgba(249,168,212,.06);
  --surface-hover: rgba(249,168,212,.1);
  --border:    rgba(249,168,212,.18);
  --border-strong: rgba(249,168,212,.32);

  --text:      #fce7f3;
  --text-muted: rgba(252,231,243,.62);
  --text-dim:  rgba(252,231,243,.42);

  --shadow: 0 10px 30px rgba(0,0,0,.4), 0 0 24px rgba(244,114,182,.15);
}

/* ---- Header / hero-stats glass — dark, not light ---- */
body[data-theme="bloom"].theme-dark header {
  background: rgba(42,17,40,.82);
}
body[data-theme="bloom"].theme-dark .hero-stats-panel {
  background: rgba(42,17,40,.6);
}

/* ---- Primary button — brighter pink glow for a dark surface ---- */
body[data-theme="bloom"].theme-dark .btn-primary {
  box-shadow: 0 0 20px rgba(244,114,182,.4);
}
body[data-theme="bloom"].theme-dark .btn-primary:hover {
  box-shadow: 0 0 28px rgba(244,114,182,.55);
}

/* ---- Hero: brighter glow, light-tint grain ---- */
body[data-theme="bloom"].theme-dark .hero-canvas-wrap {
  background:
    radial-gradient(900px 500px at 78% 20%, rgba(244,114,182,.18), transparent 60%),
    radial-gradient(700px 420px at 10% 100%, rgba(251,207,232,.1), transparent 55%),
    var(--bg);
}
body[data-theme="bloom"].theme-dark .hero-grain {
  background-image:
    linear-gradient(rgba(252,231,243,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(252,231,243,.04) 1px, transparent 1px);
}
body[data-theme="bloom"].theme-dark .hero-heading em {
  color: var(--accent-soft);
  background: linear-gradient(to right, rgba(244,114,182,.25), rgba(251,207,232,.18));
}

/* ---- Badges/chips/progress bars/toast — light-tint, not dark-tint ---- */
body[data-theme="bloom"].theme-dark .topic-progress-bar,
body[data-theme="bloom"].theme-dark .quiz-progress-bar,
body[data-theme="bloom"].theme-dark .mini-bar-track {
  background: rgba(252,231,243,.09);
}
body[data-theme="bloom"].theme-dark .score-circle-bg {
  stroke: rgba(252,231,243,.09);
}
body[data-theme="bloom"].theme-dark .topic-progress-table th {
  background: rgba(252,231,243,.035);
}
body[data-theme="bloom"].theme-dark .topic-progress-table tr:hover td {
  background: rgba(252,231,243,.04);
}
body[data-theme="bloom"].theme-dark .answer-chip {
  background: rgba(252,231,243,.07);
}
body[data-theme="bloom"].theme-dark .answer-chip-remove {
  background: rgba(252,231,243,.12);
}
body[data-theme="bloom"].theme-dark .format-help-panel code {
  background: rgba(252,231,243,.08);
}
body[data-theme="bloom"].theme-dark .topic-chip {
  background: rgba(252,231,243,.07);
}
body[data-theme="bloom"].theme-dark .ai-points {
  border-top-color: rgba(252,231,243,.12);
}
body[data-theme="bloom"].theme-dark .toast {
  background: rgba(58,24,54,.92);
  color: var(--text);
  border-color: var(--border-strong);
}

/* ---- Accent-tinted glows — brighter pink for a dark surface ---- */
body[data-theme="bloom"].theme-dark .marks-badge,
body[data-theme="bloom"].theme-dark .option-btn:hover:not(:disabled),
body[data-theme="bloom"].theme-dark .setup-option:hover,
body[data-theme="bloom"].theme-dark .setup-option.selected,
body[data-theme="bloom"].theme-dark .symbol-btn:hover,
body[data-theme="bloom"].theme-dark .explanation-box.feedback-reveal {
  background: rgba(244,114,182,.14);
}
body[data-theme="bloom"].theme-dark .quiz-timer {
  border-color: rgba(244,114,182,.32);
}
body[data-theme="bloom"].theme-dark .explanation-box {
  background: rgba(244,114,182,.08);
  border-color: rgba(244,114,182,.32);
}
body[data-theme="bloom"].theme-dark .explanation-box.feedback-reveal {
  border-color: rgba(244,114,182,.42);
}
body[data-theme="bloom"].theme-dark .answer-input:focus {
  box-shadow: 0 0 0 4px rgba(244,114,182,.2);
}
body[data-theme="bloom"].theme-dark .quiz-progress-fill {
  box-shadow: 0 4px 16px rgba(244,114,182,.4);
}

/* ---- Difficulty badges — bright-on-dark pair, reusing the same
   values css/style.css's original dark theme already proved work. ---- */
body[data-theme="bloom"].theme-dark .diff-easy   { background: rgba(34,197,94,.18);  color: #4ade80; }
body[data-theme="bloom"].theme-dark .diff-medium { background: rgba(242,194,24,.18); color: #fadb5f; }
body[data-theme="bloom"].theme-dark .diff-hard   { background: rgba(244,65,95,.18);  color: #fb7185; }
