/* =============================================================
   MusicSmash — style.css
   Sections:
     1.  Reset & base
     2.  Splash screen
     3.  Loading / error screens
     4.  Theme layer (backgrounds)
     5.  Animal character
     6.  Note flash (Boomwhacker colours)
     7.  Percussion ripple
     8.  Burst canvas
     9.  HUD (octave & theme indicators)
    10.  Parent panel
    11.  Animations & keyframes
============================================================= */


/* ── 1. Reset & base ──────────────────────────────────────── */

/* Restore the HTML hidden attribute — CSS display rules override the
   UA stylesheet otherwise, making hidden elements visible. */
[hidden] { display: none !important; }

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: system-ui, sans-serif;
  background: #0d0d1a;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
}


/* ── 2. Splash screen ─────────────────────────────────────── */

#splash-screen {
  position: fixed;
  inset: 0;
  /* Semi-transparent so the sparkle canvas behind it glows through */
  background: rgba(8, 8, 20, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

/* Sparkle canvas lives inside splash and covers it */
#splash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#splash-inner {
  position: relative;   /* above splash-canvas */
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

#splash-title {
  font-size: clamp(3.5rem, 11vw, 8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  background: linear-gradient(135deg, #7B61FF 0%, #E040FB 45%, #F7C948 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 32px rgba(123, 97, 255, 0.6));
}

#splash-subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  opacity: 0.55;
  letter-spacing: 0.06em;
}

#splash-btn {
  margin-top: 0.8rem;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 800;
  padding: 0.85em 2.2em;
  border: none;
  border-radius: 100px;
  background: linear-gradient(135deg, #7B61FF, #E040FB);
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 0 40px rgba(123, 97, 255, 0.55), 0 4px 24px rgba(0,0,0,0.4);
  animation: splashPulse 1.8s ease-in-out infinite;
  transition: transform 0.1s, box-shadow 0.1s;
}

#splash-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 0 60px rgba(123, 97, 255, 0.75), 0 4px 24px rgba(0,0,0,0.4);
}

#splash-btn:active {
  transform: scale(0.97);
}


/* ── 3. Loading / error screens ───────────────────────────── */

#loading-screen,
#no-audio-message {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #0d0d1a;
  z-index: 100;
}

#no-audio-message {
  text-align: center;
  line-height: 1.6;
}


/* ── 4. Theme layer ───────────────────────────────────────── */

#theme-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  transition: background 0.9s ease;
}

/* All themes share the same gradient structure — top glow + corner accent + linear base —
   so the browser can interpolate smoothly between them on theme switch. */

/* Night Sky — rich violet/amethyst, like a clear dark sky with the Milky Way */
.theme-night {
  background:
    radial-gradient(ellipse at 50% -5%, #7020c0 0%, transparent 55%),
    radial-gradient(ellipse at 88% 95%, #40108a 0%, transparent 40%),
    linear-gradient(180deg, #160840 0%, #0c0628 55%, #070516 100%);
}

/* Space — cold deep-blue, like outer space far from any star */
.theme-space {
  background:
    radial-gradient(ellipse at 50% -5%, #0a5acc 0%, transparent 55%),
    radial-gradient(ellipse at 12% 88%, #003878 0%, transparent 40%),
    linear-gradient(180deg, #030a2e 0%, #02061a 55%, #010208 100%);
}

/* Jungle — lush emerald greens with a warm amber sunlight glow from above */
.theme-jungle {
  background:
    radial-gradient(ellipse at 50% -5%, #78a010 0%, transparent 55%),
    radial-gradient(ellipse at 82% 82%, #20680e 0%, transparent 40%),
    linear-gradient(180deg, #082412 0%, #041608 55%, #020a04 100%);
}

/* Ocean — bright aquamarine light from the surface, deepening into dark teal below */
.theme-ocean {
  background:
    radial-gradient(ellipse at 50% -5%, #00c8e0 0%, transparent 55%),
    radial-gradient(ellipse at 14% 72%, #006080 0%, transparent 40%),
    linear-gradient(180deg, #031e3c 0%, #02142c 55%, #010a1a 100%);
}


/* ── 5. Animal character ──────────────────────────────────── */

#main-app {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#animal-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

#animal-img {
  font-size: 160px;
  line-height: 1;
  text-align: center;
  display: block;
  cursor: none;  /* hide cursor in play area */
}


/* ── 6. Note flash (Boomwhacker colours) ──────────────────── */

#note-flash {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.note-letter {
  font-size: clamp(160px, 28vw, 340px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  /* 4-layer glow: tight core, mid bloom, wide halo, soft fill */
  text-shadow:
    0 0 12px  #fff,
    0 0 30px  currentColor,
    0 0 80px  currentColor,
    0 0 160px currentColor;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.15);
}

.note-instrument-name {
  font-size: clamp(24px, 3.5vw, 48px);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  margin-top: -0.05em;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.25);
}


/* ── 6b. Emoji flash (Zone 3 — comedy keys) ──────────────── */

#emoji-flash {
  font-size: clamp(64px, 11vw, 130px);
  line-height: 1;
  text-align: center;
  pointer-events: none;
  position: fixed;
  /* top/left overridden inline by JS on each keypress */
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  z-index: 10;
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.35));
}

#emoji-flash.emoji-flash-active {
  animation: emojiPop 620ms cubic-bezier(0.22, 1.4, 0.36, 1) forwards;
}


/* ── 7. Percussion ripple ─────────────────────────────────── */

#percussion-ripple {
  position: fixed;
  top: 50%;
  left: 50%;
  pointer-events: none;
  z-index: 2;
}

.ripple-ring {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%) scale(0);
  animation: rippleExpand 700ms ease-out forwards;
}


/* ── 8. Burst canvas ──────────────────────────────────────── */

#burst-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  cursor: none;
}

/* Hide the system cursor everywhere during play */
body.playing {
  cursor: none;
}


/* ── 9. HUD ───────────────────────────────────────────────── */

#hud {
  position: fixed;
  bottom: 1rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 1.5rem;
  font-size: 0.7rem;
  opacity: 0.3;
  pointer-events: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 3;
}


/* ── Settings button ──────────────────────────────────────── */

#settings-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  padding: 0;
  line-height: 1;
}

#settings-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: rotate(20deg);
}

/* Restore pointer on settings button when cursor is hidden */
body.playing #settings-btn {
  cursor: pointer;
}


/* ── 10. Parent panel ─────────────────────────────────────── */

#parent-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  cursor: default;
}

#parent-panel[hidden] {
  display: none;
}

#parent-panel-inner {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.2rem;
  padding: 2rem;
  min-width: 320px;
  max-width: 480px;
  width: 90%;
  position: relative;
}

#parent-panel-inner h2 {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

#parent-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.5;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  border-radius: 0.3rem;
  transition: opacity 0.15s;
}

#parent-close:hover { opacity: 1; }

.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.panel-row label {
  font-size: 0.85rem;
  opacity: 0.75;
  flex-shrink: 0;
}

.panel-row select,
.panel-row button {
  flex: 1;
  background: #2a2a40;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.4rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.panel-row input[type="range"] {
  flex: 1;
  cursor: pointer;
  accent-color: #7B61FF;
}

.panel-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
  accent-color: #7B61FF;
}

.panel-row select:focus,
.panel-row button:focus {
  outline: 2px solid #7B61FF;
  outline-offset: 2px;
}

.panel-launch-btn {
  display: block;
  width: 100%;
  margin-top: 1.2rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #7B61FF 0%, #E040FB 100%);
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.panel-launch-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.panel-launch-btn:active {
  transform: scale(0.98);
}


/* ── Fullscreen recovery overlay ─────────────────────────── */

#fullscreen-recover {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 20, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

#fullscreen-recover-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#fullscreen-recover-emoji {
  font-size: clamp(4rem, 15vw, 8rem);
  animation: recoverBounce 1.2s ease-in-out infinite;
}

@keyframes recoverBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-18px); }
}

#fullscreen-recover-title {
  font-size: clamp(1.8rem, 6vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #7B61FF, #E040FB);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#fullscreen-recover-subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  opacity: 0.6;
  margin-top: -0.4rem;
}

#fullscreen-recover-btn {
  margin-top: 0.5rem;
  padding: 1rem 2.5rem;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #7B61FF 0%, #E040FB 100%);
  color: #fff;
  border: none;
  border-radius: 99px;
  cursor: pointer;
  animation: splashPulse 2s ease-in-out infinite;
  transition: transform 0.1s ease;
}

#fullscreen-recover-btn:hover { transform: scale(1.06); }
#fullscreen-recover-btn:active { transform: scale(0.97); }


/* ── 11. Animations & keyframes ───────────────────────────── */

/* Splash button pulse */
@keyframes splashPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(123, 97, 255, 0.55), 0 4px 24px rgba(0,0,0,0.4); }
  50%       { box-shadow: 0 0 70px rgba(224, 64, 251, 0.75), 0 4px 24px rgba(0,0,0,0.4); }
}

/* Emoji pop — Zone 3 comedy keys */
@keyframes emojiPop {
  0%   { opacity: 0;   transform: translate(-50%, -50%) scale(0.3)  rotate(-8deg); }
  18%  { opacity: 1;   transform: translate(-50%, -50%) scale(1.18) rotate(4deg);  }
  38%  { opacity: 1;   transform: translate(-50%, -50%) scale(0.94) rotate(-2deg); }
  55%  { opacity: 1;   transform: translate(-50%, -50%) scale(1.0)  rotate(0deg);  }
  80%  { opacity: 0.8; transform: translate(-50%, -50%) scale(1.0);                }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(0.7)  translateY(-30px); }
}

/* Note flash — slam in, hold, fade out */
@keyframes noteFlashFade {
  0%   { opacity: 0;   transform: scale(0.55); }   /* starts small                    */
  8%   { opacity: 1;   transform: scale(1.12); }   /* slams into oversize             */
  18%  { opacity: 1;   transform: scale(0.96); }   /* slight settle                   */
  28%  { opacity: 1;   transform: scale(1.0);  }   /* lock at full size               */
  65%  { opacity: 1;   transform: scale(1.0);  }   /* hold clearly visible            */
  100% { opacity: 0;   transform: scale(1.06); }   /* gentle fade out + float up tiny */
}

#note-flash.note-flash-active {
  animation: noteFlashFade 750ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Animal bounce — Zone 1 */
@keyframes animalBounce {
  0%   { transform: scale(1)    translateY(0);    }
  35%  { transform: scale(1.28) translateY(-22px);}
  65%  { transform: scale(0.95) translateY(4px);  }
  100% { transform: scale(1)    translateY(0);    }
}

/* Animal spin — Zone 3 */
@keyframes animalSpin {
  0%   { transform: rotate(0deg)   scale(1);   }
  50%  { transform: rotate(180deg) scale(1.15);}
  100% { transform: rotate(360deg) scale(1);   }
}

#animal-img.anim-bounce { animation: animalBounce 220ms ease-out forwards; }
#animal-img.anim-spin   { animation: animalSpin   320ms ease-out forwards; }

/* Animal spacebar transition */
@keyframes animalFadeOut {
  from { opacity: 1; transform: scale(1)   translateY(0); }
  to   { opacity: 0; transform: scale(0.6) translateY(20px); }
}

@keyframes animalFadeIn {
  from { opacity: 0; transform: scale(0.6) translateY(-20px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

#animal-img.animal-exit  { animation: animalFadeOut 180ms ease-in  forwards; }
#animal-img.animal-enter { animation: animalFadeIn  250ms ease-out forwards; }

/* Percussion ripple rings */
@keyframes rippleExpand {
  0%   { transform: translate(-50%, -50%) scale(0);  opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(10); opacity: 0;   }
}


/* ── 12. Celebration overlay ──────────────────────────────── */

#celebration-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  pointer-events: none;
}

#celebration-text {
  font-size: clamp(3rem, 10vw, 6.5rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.3;
  background: linear-gradient(135deg, #F7C948 0%, #E040FB 50%, #7B61FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(247, 201, 72, 0.65));
  opacity: 0;
}

#celebration-text.celebration-active {
  animation: celebrationPop 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes celebrationPop {
  0%   { opacity: 0; transform: scale(0.3) rotate(-6deg); }
  12%  { opacity: 1; transform: scale(1.25) rotate(3deg); }
  22%  { opacity: 1; transform: scale(0.95) rotate(-1deg); }
  32%  { opacity: 1; transform: scale(1.0)  rotate(0deg); }
  72%  { opacity: 1; transform: scale(1.0); }
  100% { opacity: 0; transform: scale(0.9) translateY(-20px); }
}


/* ── 13. Instrument strip ─────────────────────────────────── */

#instrument-strip {
  position: fixed;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  z-index: 20;
}

.instrument-strip-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0.3em 0.45em 0.25em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
  color: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease,
              border-color 0.14s ease, box-shadow 0.14s ease;
}

.instrument-strip-btn .strip-emoji {
  font-size: clamp(22px, 3.8vw, 36px);
  line-height: 1;
}

.instrument-strip-btn .strip-label {
  font-size: clamp(8px, 1.1vw, 11px);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.75;
  line-height: 1;
}

.instrument-strip-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.1) translateY(-3px);
}

.instrument-strip-btn.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.2) translateY(-4px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 6px rgba(255, 255, 255, 0.15);
}

.instrument-strip-btn.active .strip-label {
  opacity: 1;
}

/* Restore pointer cursor on strip even when body.playing hides it */
body.playing .instrument-strip-btn {
  cursor: pointer;
}

/* -------------------------------------------------------
   STRIP HINT  — fades in above the instrument strip
------------------------------------------------------- */
#strip-hint {
  position: fixed;
  bottom: 7.2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.38em 1em;
  border-radius: 99px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 21;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#strip-hint.hint-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
}

#strip-hint kbd {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  padding: 0.05em 0.4em;
  font: inherit;
  font-size: 0.9em;
}

/* =======================================================
   LISTEN MODE OVERLAY
======================================================= */

#listen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 28, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  animation: listen-fade-in 0.3s ease;
}

#listen-overlay[hidden] {
  display: none;
}

@keyframes listen-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#listen-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  width: min(520px, 94vw);
  padding: 2rem 1.5rem 2.5rem;
  position: relative;
}

#listen-close {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.3rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s;
}
#listen-close:hover { background: rgba(255,255,255,0.22); }

#listen-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: rgba(255,255,255,0.75);
  font-weight: 600;
}
#listen-instrument-emoji { font-size: clamp(1.5rem, 3vw, 2rem); }

#listen-prompt {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  color: #fff;
  text-align: center;
}

#listen-replay {
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  font-weight: 700;
  padding: 0.5em 1.4em;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
#listen-replay:hover  { background: rgba(255,255,255,0.22); }
#listen-replay:active { transform: scale(0.95); }

/* Choice button grid — columns driven by data-count on the container */
#listen-choices {
  display: grid;
  gap: 0.9rem;
  width: 100%;
  grid-template-columns: repeat(2, 1fr);
}
#listen-choices[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
#listen-choices[data-count="4"] { grid-template-columns: repeat(2, 1fr); }

.listen-choice-btn {
  background: var(--btn-color, #7B61FF);
  border: 3px solid transparent;
  border-radius: 20px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}
.listen-choice-btn:hover  { transform: scale(1.07) translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.listen-choice-btn:active { transform: scale(0.95); }

.listen-choice-btn .choice-letter {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  line-height: 1;
}

/* Correct / wrong states */
.listen-choice-btn.correct {
  border-color: #fff;
  animation: choice-correct 0.5s ease;
}
.listen-choice-btn.wrong {
  filter: brightness(0.55);
  animation: choice-wrong 0.4s ease;
}

@keyframes choice-correct {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  70%  { transform: scale(0.96); }
  100% { transform: scale(1.07) translateY(-3px); }
}
@keyframes choice-wrong {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-8px); }
  60%     { transform: translateX(8px); }
}

#listen-result {
  font-size: clamp(1.2rem, 2.8vw, 1.6rem);
  font-weight: 800;
  min-height: 2rem;
  text-align: center;
}
#listen-result.result-correct { color: #57CC99; }
#listen-result.result-wrong   { color: #ff8a80; }

#listen-streak {
  font-size: clamp(0.75rem, 1.4vw, 0.9rem);
  color: rgba(255,255,255,0.45);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
