/* players.css — high-tech HUD skins for the W33ZY players (PlayerForge, Nov 22 2026).
   Pure restyle: no engine JS is touched. Red glow on dark glass,
   big touch-friendly controls, glowing progress, animated level meters.
   Meters animate only while an ancestor carries .hud-playing (toggled by
   players.js from the real play state), so a paused player sits still. */

:root{
  --hud-red:#e53238;
  --hud-bright:#ff5b68;
  --hud-gray:#9aa0a8;
  --hud-panel:linear-gradient(160deg, rgba(13,20,31,.92), rgba(7,11,18,.96));
  --hud-line:rgba(229,50,56,.38);
  --hud-glow-red:0 0 18px rgba(229,50,56,.45), 0 0 42px rgba(229,50,56,.14);
  --hud-glow-bright:0 0 18px rgba(255,91,104,.45), 0 0 42px rgba(255,91,104,.14);
}

/* ---------- glass HUD panels ---------- */
.hud-panel{
  background:var(--hud-panel);
  border:1px solid var(--hud-line);
  border-radius:16px;
  box-shadow:var(--hud-glow-red), inset 0 1px 0 rgba(255,255,255,.06);
}
.audio-player-card{
  background:var(--hud-panel);
  border:1px solid var(--hud-line);
  box-shadow:var(--hud-glow-red), inset 0 1px 0 rgba(255,255,255,.06);
}
.audio-player-card.hud-playing{
  border-color:rgba(255,91,104,.55);
  box-shadow:var(--hud-glow-bright), inset 0 1px 0 rgba(255,255,255,.06);
}

/* ---------- transport rows ---------- */
.hud-transport{
  background:rgba(10,16,26,.75);
  border:1px solid var(--hud-line);
  border-radius:14px;
  padding:.7rem .8rem;
  box-shadow:inset 0 0 24px rgba(229,50,56,.06);
}
.hud-transport .gbtn{ min-height:3.25rem; font-size:1.05rem; border-radius:12px; }
.hud-transport .gbtn.primary{
  background:linear-gradient(135deg, var(--hud-red), #a11f24);
  border-color:var(--hud-red);
  box-shadow:0 0 16px rgba(229,50,56,.55), 0 0 34px rgba(229,50,56,.18);
}
.hud-transport .gbtn.primary:hover{ box-shadow:0 0 22px rgba(229,50,56,.75), 0 0 44px rgba(229,50,56,.25); }

/* big round play/pause (audiobooks HUD transport) */
.hud-big-play{
  flex:0 0 auto;
  width:3.5rem; height:3.5rem;
  border-radius:50%;
  border:2px solid var(--hud-red);
  background:radial-gradient(circle at 35% 30%, #ff6b73, #a11f24 70%);
  color:#ffffff;
  font-size:1.35rem; font-weight:900;
  cursor:pointer;
  box-shadow:0 0 18px rgba(229,50,56,.6), 0 0 40px rgba(229,50,56,.2);
  display:grid; place-items:center;
}
.hud-big-play:hover{ box-shadow:0 0 26px rgba(229,50,56,.85), 0 0 52px rgba(229,50,56,.3); }
.hud-big-play:active{ transform:scale(.94); }

/* ---------- glowing progress / seek / sliders ---------- */
.vd-progress{
  height:12px;
  background:rgba(229,50,56,.12);
  border:1px solid rgba(229,50,56,.3);
  box-shadow:inset 0 0 10px rgba(0,0,0,.5);
}
.vd-progress i{
  background:linear-gradient(90deg, var(--hud-red), var(--hud-bright));
  box-shadow:0 0 12px rgba(229,50,56,.8), 0 0 22px rgba(255,91,104,.5);
}
input[type=range].hud-seek{
  flex:1; min-width:120px;
  accent-color:var(--hud-red);
  height:28px; cursor:pointer;
}
input[type=range].hud-seek::-webkit-slider-runnable-track{
  height:10px; border-radius:99px;
  background:linear-gradient(90deg, var(--hud-red), var(--hud-bright));
  box-shadow:0 0 10px rgba(229,50,56,.6);
}
input[type=range].hud-seek::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none;
  width:26px; height:26px; margin-top:-8px; border-radius:50%;
  background:#fff; border:3px solid var(--hud-red);
  box-shadow:0 0 14px rgba(229,50,56,.9);
}
input[type=range].hud-seek::-moz-range-track{
  height:10px; border-radius:99px;
  background:linear-gradient(90deg, var(--hud-red), var(--hud-bright));
  box-shadow:0 0 10px rgba(229,50,56,.6);
}
input[type=range].hud-seek::-moz-range-thumb{
  width:20px; height:20px; border-radius:50%;
  background:#fff; border:3px solid var(--hud-red);
  box-shadow:0 0 14px rgba(229,50,56,.9);
}
/* glow the existing sliders on the player pages too */
.mm-controls input[type=range], .vd-side input[type=range], .ig-side input[type=range]{
  accent-color:var(--hud-red);
}

/* ---------- video preview HUD frame ---------- */
.vd-preview{
  border:1px solid var(--hud-line);
  box-shadow:var(--hud-glow-red), 0 0 0 4px rgba(7,11,18,.6);
  max-width:380px;
}
.vd-preview::after{ /* scanline sweep, only while previewing */
  content:""; position:absolute; left:0; right:0; height:64px; top:-64px;
  background:linear-gradient(180deg, transparent, rgba(229,50,56,.22), transparent);
  pointer-events:none;
}
.vd-preview.hud-playing::after{ animation:hudScan 2.4s linear infinite; }
@keyframes hudScan{ from{ top:-64px; } to{ top:100%; } }
.vd-preview.hud-playing{
  border-color:rgba(255,91,104,.55);
  box-shadow:var(--hud-glow-bright), 0 0 0 4px rgba(7,11,18,.6);
}
.vd-status{
  color:var(--hud-red);
  text-shadow:0 0 10px rgba(229,50,56,.5);
  font-weight:700;
}

/* ---------- animated level meters ---------- */
.hud-meter{
  display:flex; align-items:flex-end; gap:3px;
  height:30px; padding:0 .2rem;
}
.hud-meter i{
  flex:1; min-width:3px; border-radius:2px;
  background:linear-gradient(180deg, var(--hud-bright), var(--hud-red));
  box-shadow:0 0 8px rgba(229,50,56,.6);
  height:22%;
  opacity:.35;
  animation:hudMeter .7s ease-in-out infinite alternate;
  animation-play-state:paused;
}
.hud-meter i:nth-child(2n){ animation-duration:.55s; animation-delay:.08s; }
.hud-meter i:nth-child(3n){ animation-duration:.85s; animation-delay:.16s; }
.hud-meter i:nth-child(4n){ animation-duration:.5s;  animation-delay:.05s; }
.hud-meter i:nth-child(5n){ animation-duration:.95s; animation-delay:.22s; }
@keyframes hudMeter{ from{ height:14%; } to{ height:100%; } }
.hud-playing .hud-meter i{ animation-play-state:running; opacity:1; }
.hud-meter-video{ margin:.6rem auto 0; max-width:360px; }
.hud-meter-music{ flex:1 1 160px; min-width:140px; }
.hud-meter-audio{ flex:0 0 110px; }

/* ---------- music sequencer HUD ---------- */
#mmSequencer.hud-playing .mm-controls .gbtn.primary{
  box-shadow:0 0 22px rgba(255,91,104,.7), 0 0 44px rgba(255,91,104,.25);
  border-color:var(--hud-bright);
}
.mm-cell{
  background:linear-gradient(180deg, rgba(20,30,44,.9), rgba(10,16,26,.9));
  border-color:rgba(229,50,56,.28);
}
.mm-cell:hover{ border-color:var(--hud-red); box-shadow:0 0 10px rgba(229,50,56,.4); }
.mm-cell.on{
  background:linear-gradient(135deg, var(--hud-red), #a11f24);
  border-color:var(--hud-red);
  box-shadow:0 0 12px rgba(229,50,56,.75);
  color:#ffffff;
}
.mm-cell.now{
  outline:3px solid var(--hud-bright);
  outline-offset:1px;
  box-shadow:0 0 14px rgba(255,91,104,.65);
}
.mm-cell.beat0{ border-left:2px solid rgba(255,91,104,.6); }
.mm-status{ color:var(--hud-red); text-shadow:0 0 10px rgba(229,50,56,.5); font-weight:700; }
#mmPlay, #mmExport{ min-height:3.25rem; font-size:1.05rem; border-radius:12px; }
#mmPlay{
  background:linear-gradient(135deg, var(--hud-red), #a11f24);
  border-color:var(--hud-red);
  box-shadow:0 0 16px rgba(229,50,56,.55), 0 0 34px rgba(229,50,56,.18);
}

/* ---------- audiobook waveform + time ---------- */
#waveform{
  border:1px solid rgba(229,50,56,.35);
  border-radius:12px;
  padding:.5rem .4rem;
  background:rgba(7,11,18,.7);
  box-shadow:inset 0 0 24px rgba(229,50,56,.08), 0 0 16px rgba(229,50,56,.18);
}
.audio-player-card.hud-playing #waveform{
  border-color:rgba(255,91,104,.55);
  box-shadow:inset 0 0 24px rgba(255,91,104,.08), 0 0 18px rgba(255,91,104,.3);
}
.ws-time{
  color:var(--hud-red);
  font-weight:800;
  letter-spacing:.06em;
  text-shadow:0 0 10px rgba(229,50,56,.45);
}
.audio-player-card audio{ accent-color:var(--hud-red); }
.ep.playing{
  border-color:var(--hud-bright);
  box-shadow:0 0 16px rgba(255,91,104,.35);
}
.ep-play{ min-height:3rem; border-radius:12px; }

/* ---------- image studio stage glow ---------- */
.ig-stage{
  border:1px solid var(--hud-line);
  box-shadow:var(--hud-glow-red);
}
.ig-status{ color:var(--hud-red); text-shadow:0 0 10px rgba(229,50,56,.5); font-weight:700; }

/* ---------- shared top Play button (site-player.js) ---------- */
.top-play.playing{
  border-color:var(--hud-bright);
  box-shadow:0 0 16px rgba(255,91,104,.6), 0 0 34px rgba(255,91,104,.25);
}
.top-play.playing .tp-label{ color:var(--hud-bright); }

@media (prefers-reduced-motion: reduce){
  .hud-meter i, .vd-preview.hud-playing::after{ animation:none; }
}
