/* ======================================================
   Mascot — Cartoon TV Video Player
   player.css
   ====================================================== */

/* ── TOKENS ── */
:root {
  --clr-bg:          #1A1035;   /* deep dreamy night sky */
  --clr-bg2:         #241848;
  --clr-pink:        #FF8FAB;
  --clr-pink-soft:   #FFD6E7;
  --clr-mint:        #52D9A4;
  --clr-mint-soft:   #B8F0D8;
  --clr-yellow:      #FFCF47;
  --clr-yellow-soft: #FFEAA7;
  --clr-lavender:    #9C7AF5;
  --clr-lavender-soft:#C8B6FF;
  --clr-peach:       #FFB347;
  --clr-teal:        #68D8D6;
  --clr-white:       #FFFFFF;
  --clr-text:        #3D2C5A;
  --clr-text-soft:   #8A7AAA;

  --tv-purple:       #B09FE8;
  --tv-purple-dark:  #7B62D9;
  --tv-pink:         #F4A8C7;
  --tv-pink-dark:    #E07BA0;

  --r-sm:   0.75rem;
  --r-md:   1.25rem;
  --r-lg:   2rem;
  --r-xl:   3rem;
  --r-full: 100vmax;

  --shadow-glow-pink:    0 0 32px 6px rgba(255,143,171,0.35);
  --shadow-glow-purple:  0 0 40px 8px rgba(156,122,245,0.3);
  --shadow-card:         0 10px 32px rgba(0,0,0,0.28);

  --font-display: 'Baloo 2', cursive;
  --font-body:    'Nunito', sans-serif;

  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: radial-gradient(ellipse at 30% 0%, #2D1B6B 0%, #1A1035 55%, #0F0825 100%);
  color: var(--clr-white);
  min-height: 100vh;
  overflow-x: hidden;
  animation: pageIn 0.28s ease both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
body.page-exit {
  animation: pageOut 0.2s ease forwards;
}
@keyframes pageOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

/* ── STARFIELD ── */
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
/* Stars injected by JS */
.star-dot {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: twinkle ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; scale: 1; }
  50%       { opacity: 1;    scale: 1.4; }
}

/* ── AMBIENT FLOATS ── */
.ambient-floats {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.amb {
  position: absolute;
  left: var(--x, 50%);
  font-size: 1.6rem;
  opacity: 0.55;
  animation: ambFloat var(--dur, 6s) ease-in-out var(--delay, 0s) infinite;
}
.amb-moon { bottom: -60px; }
.amb-star { bottom: -60px; font-size: 1.1rem; }

@keyframes ambFloat {
  0%   { translate: 0 0;        opacity: 0; }
  10%  { opacity: 0.55; }
  90%  { opacity: 0.55; }
  100% { translate: 0 -105vh;   opacity: 0; }
}

/* ── HEADER ── */
.player-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.65rem 2rem;
  background: rgba(26, 16, 53, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid rgba(156,122,245,0.3);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.1rem;
  background: rgba(255,143,171,0.18);
  border: 2px solid var(--clr-pink);
  border-radius: var(--r-full);
  color: var(--clr-pink);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  translate: 0px;
  scale: 1;
  transition: scale 0.2s var(--ease-bounce), background 0.2s ease;
}
.back-btn:hover { scale: 1.08; background: rgba(255,143,171,0.3); }
.back-arrow { font-size: 1.1rem; }

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.4rem;
}
.header-logo span:first-child { font-size: 1.6rem; animation: bounce 2s ease-in-out infinite; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  background: linear-gradient(135deg, var(--clr-pink), var(--clr-lavender));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-title-wrap { margin-left: auto; text-align: right; }
.now-playing-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--clr-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.header-video-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--clr-yellow);
}

@keyframes bounce {
  0%, 100% { translate: 0 0; }
  50%       { translate: 0 -5px; }
}

/* ── MAIN LAYOUT ── */
.player-main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
  align-items: start;
}

/* ══════════════════════════════════
   TV WRAPPER
══════════════════════════════════ */
.tv-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.tv-wrapper {
  position: relative;
  width: 100%;
  max-width: 680px;
  /* Give space for antennas above */
  padding-top: 60px;
  filter: drop-shadow(0 24px 60px rgba(156,122,245,0.4))
          drop-shadow(0 8px 20px rgba(0,0,0,0.5));
}

/* ANTENNAS */
.antenna {
  position: absolute;
  top: 0;
  width: 16px;
  z-index: 3;
}
.antenna-l { left: 25%; }
.antenna-r { right: 25%; }
.antenna::before {
  content: '';
  display: block;
  width: 5px;
  height: 56px;
  background: linear-gradient(to top, var(--tv-purple), var(--tv-pink));
  border-radius: 4px;
  margin: 0 auto;
  box-shadow: 0 0 10px rgba(176,159,232,0.5);
}
.antenna-ball {
  font-size: 1.2rem;
  text-align: center;
  margin-top: -6px;
  animation: antennaBounce 3s ease-in-out infinite;
}
.antenna-r .antenna-ball { animation-delay: -1.2s; }

@keyframes antennaBounce {
  0%, 100% { translate: 0 0; rotate: -5deg; }
  50%       { translate: 0 -7px; rotate: 5deg; }
}

/* TV BODY */
.tv-body {
  position: relative;
  background: linear-gradient(160deg, #D4B8F8 0%, #B09FE8 40%, #E8A8C8 100%);
  border-radius: 3rem 3rem 2.5rem 2.5rem;
  padding: 20px 28px 36px;
  border: 6px solid #7B62D9;
  box-shadow:
    inset 0 4px 16px rgba(255,255,255,0.25),
    inset 0 -6px 20px rgba(80,40,140,0.3),
    0 8px 0 #5A3FA0;
}

/* Corner sparkles on bezel */
.tv-sparkle {
  position: absolute;
  font-size: 1.1rem;
  color: rgba(255,255,200,0.7);
  animation: sparkSpin 4s linear infinite;
}
.tv-sparkle-tl { top: 14px; left: 20px; animation-delay: 0s; }
.tv-sparkle-tr { top: 14px; right: 20px; animation-delay: -2s; }
@keyframes sparkSpin {
  0%   { rotate: 0deg;   scale: 1; opacity: 0.6; }
  50%  { rotate: 180deg; scale: 1.4; opacity: 1; }
  100% { rotate: 360deg; scale: 1; opacity: 0.6; }
}

/* SCREEN WRAP */
.tv-screen-wrap {
  position: relative;
  border-radius: 1.6rem;
  overflow: hidden;
  border: 5px solid #5A3FA0;
  box-shadow:
    inset 0 0 30px rgba(0,0,0,0.7),
    0 0 0 3px rgba(255,255,255,0.1);
  aspect-ratio: 16/9;
}

.tv-screen {
  width: 100%;
  height: 100%;
  background: #0A0515;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Simulated video content */
.video-sim { width: 100%; height: 100%; position: relative; }

.video-bg {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.8s ease;
}

.video-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.scene-emoji {
  font-size: 5rem;
  animation: sceneBounce 1.8s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
}
@keyframes sceneBounce {
  0%, 100% { translate: 0 0;    scale: 1;    rotate: -3deg; }
  50%       { translate: 0 -16px; scale: 1.1;  rotate: 3deg; }
}

.scene-bouncing {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.8rem;
  color: var(--clr-white);
  text-shadow: 0 4px 16px rgba(0,0,0,0.5);
  letter-spacing: 0.3em;
  animation: textPulse 2.4s ease-in-out infinite;
}
@keyframes textPulse {
  0%, 100% { scale: 1; opacity: 1; }
  50%       { scale: 1.06; opacity: 0.9; }
}

/* PLAY OVERLAY */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 5, 21, 0.55);
  backdrop-filter: blur(2px);
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
  z-index: 4;
  cursor: pointer;
}
.play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.play-overlay-img {
  width: 140px; height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(255,207,71,0.6));
  translate: 0px;
  scale: 1;
  transition: scale 0.2s var(--ease-bounce);
}
.play-overlay:hover .play-overlay-img,
.play-overlay:focus .play-overlay-img { scale: 1.12; }
.play-overlay:active .play-overlay-img { scale: 0.95; }
.play-overlay:focus { outline: 4px solid var(--clr-yellow); outline-offset: -4px; }

/* Tap hint */
.tap-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  translate: -50% 0;
  background: rgba(255,207,71,0.9);
  color: var(--clr-text);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  border-radius: var(--r-full);
  z-index: 5;
  animation: tapHintPop 1.4s ease-in-out infinite;
  pointer-events: none;
}
.tap-hint.gone { display: none; }
@keyframes tapHintPop {
  0%, 100% { scale: 1;    opacity: 1; }
  50%       { scale: 1.05; opacity: 0.85; }
}

/* Scan lines */
.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.06) 3px,
    rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
  z-index: 10;
  border-radius: inherit;
}

/* Screen reflection */
.screen-reflection {
  position: absolute;
  top: 6px; left: 10px; right: 10px;
  height: 35%;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  border-radius: 1rem 1rem 50% 50%;
  pointer-events: none;
  z-index: 11;
}

/* BEZEL FACE */
.tv-bezel-face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  margin-top: 12px;
  height: 28px;
}
.bezel-eye {
  font-size: 0.95rem;
  color: rgba(80,40,140,0.7);
  font-weight: 900;
  font-family: monospace;
  transition: content 0.3s ease;
}
.bezel-mouth {
  font-size: 1.2rem;
  color: rgba(80,40,140,0.7);
  font-weight: 900;
  transition: all 0.3s ease;
}
.tv-bezel-face.playing .bezel-mouth { content: 'D'; }

/* TV FEET */
.tv-feet {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin-top: 6px;
}
.tv-foot {
  width: 36px; height: 16px;
  background: linear-gradient(160deg, var(--tv-pink) 0%, var(--tv-pink-dark) 100%);
  border-radius: 0 0 1rem 1rem;
  border: 3px solid #C06090;
  border-top: none;
  box-shadow: 0 6px 0 #A04070;
}

/* ══════════════════════════════════
   CONTROL BAR
══════════════════════════════════ */
.control-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 680px;
}

.ctrl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clr-white);
  font-family: var(--font-body);
  translate: 0px;
  scale: 1;
  transition: scale 0.18s var(--ease-bounce);
}
.ctrl-btn:hover  { scale: 1.12; }
.ctrl-btn:active { scale: 0.94; }
.ctrl-btn:focus-visible {
  outline: 3px solid var(--clr-yellow);
  outline-offset: 6px;
  border-radius: var(--r-md);
}

.ctrl-icon {
  font-size: 2.2rem;
  line-height: 1;
}
.ctrl-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
}

/* PREV / NEXT special */
.ctrl-prev .ctrl-icon,
.ctrl-next .ctrl-icon {
  background: rgba(255,255,255,0.1);
  border: 3px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ctrl-prev:hover .ctrl-icon,
.ctrl-next:hover .ctrl-icon {
  background: rgba(255,143,171,0.25);
  border-color: var(--clr-pink);
}

/* NEXT — bouncing arrow animation */
.next-icon {
  animation: nextBounce 1.2s ease-in-out infinite;
}
@keyframes nextBounce {
  0%, 100% { translate: 0 0; }
  50%       { translate: 6px 0; }
}

/* PLAY/PAUSE — giant smiley */
.ctrl-play-pause {
  position: relative;
}
.play-face {
  font-size: 5.5rem;
  line-height: 1;
  filter: drop-shadow(0 6px 20px rgba(255,207,71,0.6));
  display: block;
  animation: playBounce 2s ease-in-out infinite;
}
@keyframes playBounce {
  0%, 100% { translate: 0 0;    scale: 1;    rotate: 0deg; }
  30%       { translate: 0 -10px; scale: 1.07; rotate: -4deg; }
  60%       { translate: 0 -5px;  scale: 1.04; rotate: 3deg; }
}
.ctrl-play-pause:hover .play-face {
  animation: none;
  scale: 1.1;
  filter: drop-shadow(0 10px 30px rgba(255,207,71,0.8));
}

.play-state-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--clr-yellow);
}

/* Ripple ring on play */
.ctrl-play-pause::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -60%;
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 3px solid var(--clr-yellow);
  opacity: 0;
  scale: 1;
  pointer-events: none;
}
.ctrl-play-pause.playing::after {
  animation: playRipple 1.5s ease-out infinite;
}
@keyframes playRipple {
  0%   { scale: 1;   opacity: 0.7; }
  100% { scale: 2;   opacity: 0; }
}

/* ══════════════════════════════════
   PROGRESS BAR
══════════════════════════════════ */
.progress-wrap {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.progress-track {
  position: relative;
  height: 16px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--r-full);
  overflow: visible;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.1);
}
.progress-track:hover { border-color: rgba(255,255,255,0.25); }

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--clr-pink), var(--clr-yellow));
  border-radius: var(--r-full);
  transition: width 0.25s linear;
  box-shadow: 0 0 12px rgba(255,207,71,0.4);
}

.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  translate: -50% -50%;
  font-size: 1.2rem;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(255,207,71,0.7));
  transition: left 0.25s linear;
  z-index: 2;
}

.progress-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
}

/* ══════════════════════════════════
   VOLUME ROW
══════════════════════════════════ */
.volume-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 680px;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: var(--r-xl);
  padding: 0.7rem 1.4rem;
  backdrop-filter: blur(10px);
}

.vol-bear-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  translate: 0px;
  scale: 1;
  transition: scale 0.2s var(--ease-bounce);
  border-radius: 50%;
}
.vol-bear-btn:hover { scale: 1.15; }
.vol-bear-btn:active { scale: 0.9; }
.vol-bear-btn:focus-visible {
  outline: 3px solid var(--clr-pink);
  outline-offset: 4px;
}

.vol-bear-img {
  width: 52px; height: 52px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 4px 12px rgba(255,143,171,0.4));
}
.vol-bear-btn.muted .vol-bear-img {
  filter: grayscale(0.8) drop-shadow(0 4px 12px rgba(255,143,171,0.2));
}

.vol-slider-wrap {
  flex: 1;
  position: relative;
}

.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.15);
  outline: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clr-pink), var(--clr-lavender));
  border: 3px solid var(--clr-white);
  box-shadow: 0 4px 12px rgba(255,143,171,0.5);
  cursor: pointer;
  translate: 0px;
  scale: 1;
  transition: scale 0.15s var(--ease-bounce);
}
.vol-slider::-webkit-slider-thumb:hover { scale: 1.3; }
.vol-slider::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clr-pink), var(--clr-lavender));
  border: 3px solid var(--clr-white);
  cursor: pointer;
}

/* Volume bubbles (musical notes) */
.vol-bubbles {
  position: absolute;
  top: -36px; left: 30%;
  display: flex;
  gap: 0.6rem;
  pointer-events: none;
}
.vbub {
  font-size: 0.95rem;
  color: var(--clr-pink);
  opacity: 0;
  animation: volNote 1.8s ease-out infinite;
}
.vbub:nth-child(2) { animation-delay: 0.4s; }
.vbub:nth-child(3) { animation-delay: 0.8s; }

.vol-bubbles.active .vbub { opacity: 1; }

@keyframes volNote {
  0%   { translate: 0 0;     opacity: 0; scale: 0.7; }
  20%  { opacity: 1; }
  100% { translate: 0 -28px; opacity: 0; scale: 1.2; }
}

.vol-label {
  font-size: 1.5rem;
  min-width: 2ch;
  text-align: center;
}

/* ══════════════════════════════════
   SIDEBAR
══════════════════════════════════ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 80px;
}

.sidebar-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--clr-yellow);
  padding-left: 0.2rem;
}

/* VIDEO QUEUE */
.video-queue {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255,255,255,0.07);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: var(--r-lg);
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  position: relative;
  translate: 0px;
  scale: 1;
  transition: scale 0.18s var(--ease-bounce), background 0.2s ease, border-color 0.2s ease;
}
.queue-item:hover {
  scale: 1.03;
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,143,171,0.4);
}
.queue-item:focus-visible {
  outline: 3px solid var(--clr-yellow);
  outline-offset: 3px;
}
.queue-item--active {
  background: rgba(156,122,245,0.2);
  border-color: var(--clr-lavender);
  box-shadow: 0 0 20px rgba(156,122,245,0.2);
}

.qi-thumb {
  flex-shrink: 0;
  width: 72px; height: 52px;
  border-radius: var(--r-sm);
  background: var(--bg, #444);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.15);
}
/* Apply the CSS variable background */
.queue-item .qi-thumb { background: var(--bg); }

.qi-emoji {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.qi-duration {
  position: absolute;
  bottom: 3px; right: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.qi-info { flex: 1; min-width: 0; }
.qi-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--clr-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qi-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--clr-text-soft);
  margin-top: 0.1rem;
}

.qi-playing-badge {
  font-size: 0.85rem;
  color: var(--clr-yellow);
  animation: bounce 1.4s ease-in-out infinite;
}

/* Sidebar reward nudge */
.sidebar-reward {
  background: linear-gradient(135deg, rgba(255,207,71,0.12), rgba(255,143,171,0.12));
  border: 2px solid rgba(255,207,71,0.3);
  border-radius: var(--r-lg);
  padding: 0.9rem 1rem;
}
.reward-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}
.reward-fire {
  font-size: 1.8rem;
  animation: bounce 1.6s ease-in-out infinite;
}
.reward-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--clr-yellow);
}
.reward-sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
}
.reward-pip-row {
  display: flex;
  gap: 0.5rem;
}
.reward-pip {
  flex: 1;
  height: 8px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.1);
}
.pip-done {
  background: linear-gradient(90deg, var(--clr-yellow), var(--clr-pink));
  border-color: transparent;
  box-shadow: 0 0 8px rgba(255,207,71,0.4);
}

/* ── CELEBRATION OVERLAY ── */
.celebrate-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.celebrate-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.celebrate-inner {
  background: rgba(26,16,53,0.92);
  border: 4px solid var(--clr-yellow);
  border-radius: var(--r-xl);
  padding: 2.5rem 3.5rem;
  text-align: center;
  box-shadow: 0 0 60px rgba(255,207,71,0.4);
  animation: celebPop 0.4s var(--ease-bounce) both;
}
@keyframes celebPop {
  from { scale: 0.5; opacity: 0; }
  to   { scale: 1;   opacity: 1; }
}
.celebrate-emoji {
  font-size: 4.5rem;
  animation: bounce 0.8s ease-in-out infinite;
  display: block;
  margin-bottom: 0.5rem;
}
.celebrate-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  color: var(--clr-yellow);
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .scene-emoji, .scene-bouncing, .antenna-ball, .play-face,
  .next-icon, .vbub, .amb, .star-dot, .tv-sparkle,
  .reward-fire, .qi-playing-badge, .celebrate-emoji { animation: none !important; }
}

/* ── RESPONSIVE ── */

/* Tablet */
@media (max-width: 960px) {
  .player-main {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1.8rem;
  }
  .sidebar {
    position: static;
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
  }
  .tv-column { max-width: 680px; margin: 0 auto; width: 100%; }
}

/* Small phone */
@media (max-width: 520px) {
  .player-main   { padding: 0.5rem; gap: 1.2rem; }
  .player-header { padding: 0.5rem 0.75rem; gap: 0.5rem; }
  .header-title-wrap { display: none; }

  /* Back btn + logo compact */
  .back-btn   { padding: 0.4rem 0.85rem; font-size: 0.82rem; }
  .logo-text  { font-size: 1rem; }

  /* TV frame */
  .tv-wrapper { padding-top: 40px; }
  .tv-body    { padding: 8px 10px 18px; border-radius: 1.8rem 1.8rem 1.2rem 1.2rem; border-width: 4px; }
  .antenna    { width: 11px; }
  .antenna::before { height: 36px; width: 3px; }
  .antenna-ball    { font-size: 0.9rem; }
  .tv-feet  { gap: 36px; margin-top: 3px; }
  .tv-foot  { width: 24px; height: 10px; }

  /* Controls */
  .control-bar { gap: 0.6rem; padding: 0.6rem 0.5rem; flex-wrap: wrap; justify-content: center; }
  .play-face   { font-size: 3rem; }
  .ctrl-icon   { font-size: 1.3rem; }
  .ctrl-prev .ctrl-icon,
  .ctrl-next .ctrl-icon { width: 44px; height: 44px; font-size: 1.2rem; }
  .volume-row  { flex-direction: column; gap: 0.4rem; padding: 0.4rem 0.8rem; }

  /* Sidebar / queue */
  .sidebar-title { font-size: 1rem; padding: 0.6rem 0.8rem; }
  .qi-thumb      { width: 60px; height: 44px; }
  .qi-title      { font-size: 0.85rem; }
  .qi-meta       { font-size: 0.72rem; }
  .qi-item       { gap: 0.6rem; padding: 0.6rem 0.75rem; }

  /* Scene / transcript */
  .scene-emoji   { font-size: 3.5rem; }
  .vbub          { font-size: 0.9rem; max-width: 200px; }
}

/* Extra-small phone (≤ 380px) */
@media (max-width: 380px) {
  .player-header { padding: 0.4rem 0.6rem; }
  .back-btn      { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
  .tv-body       { padding: 6px 8px 14px; }
  .control-bar   { gap: 0.5rem; }
  .ctrl-prev .ctrl-icon,
  .ctrl-next .ctrl-icon { width: 38px; height: 38px; font-size: 1rem; }
}

/* ════════════════════════════════════════════════════
   MOBILE PERFORMANCE OPTIMIZATIONS
   Disabling GPU-heavy effects on mobile devices
════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Hide starfield and floaters — kill hundreds of animated elements */
  #starfield,
  .starfield,
  .ambient-floats {
    display: none !important;
  }

  /* Remove backdrop-filter — biggest GPU drain on mobile */
  * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Make header fully opaque now that blur is gone */
  .player-header {
    background: rgba(26, 16, 53, 0.98) !important;
  }

  /* Make volume row opaque */
  .volume-row {
    background: rgba(255, 255, 255, 0.1) !important;
  }

  /* Stop the looping play button bounce animation to save CPU */
  .play-face {
    animation: none !important;
  }

  /* Simplify the next-arrow bounce */
  .next-icon {
    animation: none !important;
  }
}



