* {
  box-sizing: border-box;
}

:root {
  --bg: #0b0c0f;
  --card: #15171c;
  --card-2: #1b1e24;
  --text: #f6f7f9;
  --muted: #9da3ae;
  --line: rgba(255,255,255,.09);
  --accent: #f04b45;
  --accent-2: #ff6b64;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(240,75,69,.12), transparent 32rem),
    var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

button, input {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.player {
  width: min(100%, 520px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.025), transparent), var(--card);
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 31px;
  font-weight: 900;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  color: white;
  box-shadow: 0 10px 30px rgba(240,75,69,.24);
}

.brand-text {
  min-width: 0;
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.04em;
}

.brand p {
  margin: 8px 0 0;
  color: var(--muted);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(240,75,69,.35);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #ff8d87;
  background: rgba(240,75,69,.08);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(240,75,69,.12);
}

.now-playing {
  margin-top: 30px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card-2);
}

.now-playing span,
.now-playing strong {
  display: block;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

#statusText {
  font-size: 19px;
  margin-bottom: 5px;
}

#subStatus {
  color: var(--muted);
  font-size: 14px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 26px;
}

.play-button {
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: white;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  box-shadow: 0 12px 34px rgba(240,75,69,.28);
  transition: transform .16s ease, filter .16s ease;
}

.play-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.play-button:active {
  transform: scale(.98);
}

.play-button:focus-visible {
  outline: 3px solid rgba(255,255,255,.8);
  outline-offset: 4px;
}

#playIcon {
  margin-left: 4px;
  font-size: 25px;
}

.player.is-playing #playIcon {
  margin-left: 0;
}

.level-wrap {
  height: 52px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.bar {
  width: 6px;
  height: 14px;
  border-radius: 99px;
  background: rgba(255,255,255,.22);
  transform-origin: center;
}

.player.is-playing .bar {
  background: var(--accent);
  animation: dance .85s ease-in-out infinite alternate;
}

.player.is-playing .bar:nth-child(2) { animation-delay: -.35s; }
.player.is-playing .bar:nth-child(3) { animation-delay: -.15s; }
.player.is-playing .bar:nth-child(4) { animation-delay: -.6s; }
.player.is-playing .bar:nth-child(5) { animation-delay: -.25s; }
.player.is-playing .bar:nth-child(6) { animation-delay: -.45s; }
.player.is-playing .bar:nth-child(7) { animation-delay: -.05s; }
.player.is-playing .bar:nth-child(8) { animation-delay: -.5s; }

@keyframes dance {
  from { height: 10px; opacity: .65; }
  to { height: 46px; opacity: 1; }
}

.volume-row {
  display: grid;
  grid-template-columns: auto 1fr 46px;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

#volume {
  width: 100%;
  accent-color: var(--accent);
}

#volumeValue {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.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: 520px) {
  .page {
    padding: 14px;
  }

  .player {
    padding: 22px;
    border-radius: 22px;
  }

  .logo {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    font-size: 27px;
  }

  h1 {
    font-size: 24px;
  }

  .play-button {
    width: 64px;
    height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
