:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(8, 15, 48, 0.94);
  --line: rgba(75, 132, 255, 0.28);
  --text: #eef3ff;
  --muted: #9daed3;
  --cyan: #75dcff;
  --brand: #245bff;
  --amber: #ffc857;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 15% -10%, rgba(36, 91, 255, 0.24), transparent 34rem),
    radial-gradient(circle at 86% 0%, rgba(77, 111, 255, 0.2), transparent 36rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

a { color: inherit; }

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
}

.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.stage-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

#stage {
  display: block;
  width: 100%;
  height: 100%;
}

.stage-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 82px;
  height: 82px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(117, 220, 255, 0.7);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.86);
  color: white;
  font-size: 28px;
  box-shadow: 0 0 44px rgba(36, 91, 255, 0.5);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.stage-play.hidden { display: none; }

.caption-region {
  display: grid;
  place-items: center;
  padding: 12px 24px;
  min-height: 96px;
  border-top: 1px solid var(--line);
  background: #04081b;
}
.caption-region[hidden] { display: none; }
.caption-text {
  margin: 0;
  width: 100%;
  max-width: 68ch;
  min-height: 2.8em;
  color: #eef3ff;
  font-size: clamp(16px, 1.7vw, 21px);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}
.caption-word.is-active {
  color: #fff;
  background: rgba(117, 220, 255, 0.18);
  text-decoration: underline;
  text-decoration-color: var(--cyan);
  text-underline-offset: 4px;
  border-radius: 3px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
}

.control-button {
  min-height: 40px;
  border: 1px solid rgba(75, 132, 255, 0.32);
  border-radius: 11px;
  background: rgba(8, 15, 48, 0.96);
  color: var(--text);
  font: 600 13px Inter, sans-serif;
}

.control-button { padding: 0 14px; cursor: pointer; }
.control-button.primary { border-color: rgba(117, 220, 255, 0.46); }
.content-timeline { padding: 7px 16px 0; border-top: 1px solid var(--line); }
.scrub-wrap { display: flex; width: 100%; }
.scrub-wrap input { appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer; }
.scrub-wrap input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--cyan) 0 var(--progress), #303b63 var(--progress) 100%); }
.scrub-wrap input::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--cyan) 0 var(--progress), #303b63 var(--progress) 100%); }
.scrub-wrap input::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%; background: var(--cyan); }
.scrub-wrap input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--cyan); }
.scrub-wrap input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.time-readout { min-width: 108px; margin-right: auto; color: var(--muted); font: 600 12px/1 Space Grotesk, sans-serif; }
.playback-error {
  margin: 0;
  padding: 0 16px 13px;
  color: var(--amber);
  font-size: 12px;
  line-height: 1.4;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .shell { width: min(100% - 18px, 1480px); padding-top: 18px; }
  .stage-play { width: 62px; height: 62px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
