/*
  theme-screenity.css — optional light theme inspired by screenity.io's
  visual language (soft lavender-white background, saturated blue brand
  gradient, Bricolage Grotesque display type, big rounded pill buttons).

  This file is 100% additive: every rule is scoped under
  `body[data-theme="screenity"]`, set at runtime by js/theme_switcher.js.
  Nothing in css/style.css is modified — with a different theme active
  (or the default), this stylesheet has zero effect.

  Most of the app already reads its colors/fonts/radii from CSS custom
  properties defined in style.css's :root, so redefining those same
  variables here re-skins the vast majority of components for free.
  The rest of this file is a short, deliberate list of components that
  hardcode a literal color (found by grepping style.css for
  rgba(255,255,255,...) and rgba(255,90,31,...) — white-tint overlays
  and orange-tint glows that assume the original dark/orange theme and
  would look wrong or low-contrast against a light background).

  The brand blue is deepened from the literal reference #3582f6
  (2.92:1 fails WCAG AA as accent-text — quiz timer, mark badges — at
  the original brightness) to #2a68c5; the brighter tone survives as
  --accent-soft and the middle of the hero gradient instead.
*/

body[data-theme="screenity"] {
  /* ---- Brand ---- */
  --accent:      #2a68c5;
  --accent-dark: #1f4f99;
  --accent-soft: #7b9aea;
  --success:     #16a34a;
  --danger:      #dc2626;
  --warning:     #b45309;

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

  --gradient-brand: radial-gradient(127% 128% at 35% 0%, #2baef8 23%, #2a68c5 46%, #486def 74%, #7b9aea 100%);

  /* ---- Surfaces — soft lavender-white, not warm near-black ---- */
  --bg:        #f6f7fb;
  --bg-alt:    #edeff6;
  --bg-card:   #ffffff;
  --bg-card2:  #f3f4f9;
  --surface:   rgba(20,22,27,.045);
  --surface-hover: rgba(20,22,27,.075);
  --border:    rgba(20,22,27,.09);
  --border-strong: rgba(20,22,27,.16);

  /* ---- Text ---- */
  --text:      #14161b;
  --text-muted: rgba(20,22,27,.58);
  --text-dim:  rgba(20,22,27,.38);

  /* ---- Shape / motion ---- */
  --radius:    16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --shadow:    0 10px 30px rgba(20,22,27,.08), 0 2px 10px rgba(20,22,27,.04);

  --font-display: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
  --font-body: 'Satoshi', 'Public Sans', system-ui, -apple-system, sans-serif;
}

/* h1-h4 in the original theme lean serif/italic-friendly (Fraunces); the
   Screenity look is chunky sans display type, so drop the extra letter-
   spacing squeeze that was tuned for Fraunces. */
body[data-theme="screenity"] h1,
body[data-theme="screenity"] h2,
body[data-theme="screenity"] h3,
body[data-theme="screenity"] h4 {
  letter-spacing: -.01em;
  font-weight: 600;
}

/* ---- Header / nav glass (was a hardcoded near-black rgba) ---- */
body[data-theme="screenity"] header {
  background: rgba(255,255,255,.75);
}

/* ---- Primary button — Screenity's glossy blue gradient pill ---- */
body[data-theme="screenity"] .btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    inset 0 -1px 0 rgba(0,0,0,.08),
    0 2px 10px rgba(42,104,197,.35);
}
body[data-theme="screenity"] .btn-primary:hover {
  background: var(--gradient-brand);
  color: #fff;
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.4),
    0 4px 16px rgba(42,104,197,.45);
}
body[data-theme="screenity"] .btn-secondary:hover {
  border-color: rgba(20,22,27,.28);
}
body[data-theme="screenity"] .option-btn:hover:not(:disabled) .option-letter,
body[data-theme="screenity"] .subtab.active,
body[data-theme="screenity"] .level-tab.active {
  color: #fff;
}

/* ---- Hero: neutralize the three.js shader (hardcoded dark/orange in
   hero-scene.js) and its CSS gradient wash, with a light blue/lavender
   one instead. The canvas itself is hidden — its own pause-when-not-
   visible logic (already in hero-scene.js) means this also stops the
   render loop, not just hides it. ---- */
body[data-theme="screenity"] #hero-canvas {
  display: none;
}
body[data-theme="screenity"] .hero-canvas-wrap {
  background:
    radial-gradient(900px 500px at 78% 20%, rgba(42,104,197,.14), transparent 60%),
    radial-gradient(700px 420px at 10% 100%, rgba(123,154,234,.12), transparent 55%),
    var(--bg);
}
body[data-theme="screenity"] .hero-grain {
  background-image:
    linear-gradient(rgba(20,22,27,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,22,27,.035) 1px, transparent 1px);
}

/* Screenity-style framed word chip for the hero's emphasised word,
   replacing the italic-orange treatment (still driven by the same
   <em> markup — see js/animations.js's splitIntoWords). */
body[data-theme="screenity"] .hero-heading em {
  font-style: normal;
  color: var(--accent);
  display: inline-block;
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 0 .28em;
  box-shadow: 0 3px 0 rgba(42,104,197,.2);
}

/* ---- Custom cursor hover ring (hardcoded orange glow) ---- */
body[data-theme="screenity"] .custom-cursor-ring.cursor-hover {
  background: rgba(42,104,197,.1);
}

/* ---- Hero stats panel + level-tab indicator (hardcoded near-black
   glass / orange glow) ---- */
body[data-theme="screenity"] .hero-stats-panel {
  background: rgba(255,255,255,.6);
}
body[data-theme="screenity"] .level-tab-indicator {
  box-shadow: 0 4px 16px rgba(42,104,197,.4);
}

/* ---- Badges/chips/progress bars — hardcoded white-tint fills that
   need a dark-tint equivalent to read on a light background ---- */
body[data-theme="screenity"] .topic-progress-bar,
body[data-theme="screenity"] .quiz-progress-bar,
body[data-theme="screenity"] .mini-bar-track {
  background: rgba(20,22,27,.09);
}
body[data-theme="screenity"] .score-circle-bg {
  stroke: rgba(20,22,27,.1);
}
body[data-theme="screenity"] .topic-progress-table th {
  background: rgba(20,22,27,.03);
}
body[data-theme="screenity"] .topic-progress-table tr:hover td {
  background: rgba(20,22,27,.035);
}
body[data-theme="screenity"] .answer-chip {
  background: rgba(20,22,27,.055);
}
body[data-theme="screenity"] .answer-chip-remove {
  background: rgba(20,22,27,.1);
}
body[data-theme="screenity"] .format-help-panel code {
  background: rgba(20,22,27,.07);
}
body[data-theme="screenity"] .topic-chip {
  background: rgba(20,22,27,.06);
}
body[data-theme="screenity"] .ai-points {
  border-top-color: rgba(20,22,27,.1);
}
body[data-theme="screenity"] .toast {
  background: rgba(255,255,255,.95);
  color: var(--text);
  border-color: rgba(20,22,27,.1);
}

/* ---- Accent-tinted glows/focus-rings (hardcoded orange rgba) ---- */
body[data-theme="screenity"] .marks-badge,
body[data-theme="screenity"] .option-btn:hover:not(:disabled),
body[data-theme="screenity"] .setup-option:hover,
body[data-theme="screenity"] .setup-option.selected,
body[data-theme="screenity"] .symbol-btn:hover,
body[data-theme="screenity"] .explanation-box.feedback-reveal {
  background: rgba(42,104,197,.1);
}
body[data-theme="screenity"] .quiz-timer {
  border-color: rgba(42,104,197,.22);
}
body[data-theme="screenity"] .explanation-box {
  background: rgba(42,104,197,.06);
  border-color: rgba(42,104,197,.22);
}
body[data-theme="screenity"] .explanation-box.feedback-reveal {
  border-color: rgba(42,104,197,.3);
}
body[data-theme="screenity"] .answer-input:focus {
  box-shadow: 0 0 0 4px rgba(42,104,197,.15);
}
body[data-theme="screenity"] .quiz-progress-fill {
  box-shadow: 0 4px 16px rgba(42,104,197,.35);
}

/* ---- Difficulty badges — hardcode both bg and text; the original
   values are tuned for a dark background and are too low-contrast on
   a light one, so these need their own light-theme pair rather than
   just following --success/--warning/--danger. ---- */
body[data-theme="screenity"] .diff-easy   { background: rgba(22,163,74,.12);  color: #15803d; }
body[data-theme="screenity"] .diff-medium { background: rgba(180,83,9,.14);  color: #92400e; }
body[data-theme="screenity"] .diff-hard   { background: rgba(220,38,38,.12); color: #b91c1c; }
