:root {
  color-scheme: dark;
  --bg: #050505;
  --card: #121212;
  --card-deep: #0b0b0b;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.46);
  --line: rgba(255, 255, 255, 0.075);
  --accent: #ff3e3e;
  --accent-soft: rgba(255, 62, 62, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -18%, rgba(255, 62, 62, 0.08), transparent 34rem),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.player-shell {
  width: min(100%, 70rem);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(17rem, 0.75fr);
  grid-template-areas:
    "brand brand"
    "eq eq"
    "controls sections";
  align-content: center;
  gap: clamp(1rem, 2.4vw, 1.6rem);
}

.brand-header {
  grid-area: brand;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 0.15rem 1rem 0.35rem;
}

.brand-header img {
  display: block;
  width: clamp(5.5rem, 10vw, 7.5rem);
  height: clamp(5.5rem, 10vw, 7.5rem);
  object-fit: contain;
  filter: drop-shadow(0 0 1.25rem rgba(255, 62, 62, 0.28));
}

.brand-header h1 {
  margin: 0;
  font-size: clamp(1.15rem, 2.6vw, 1.85rem);
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.2;
  background: linear-gradient(to bottom, #fff 15%, #8d8d8d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.js .reveal {
  opacity: 0;
  transform: translateY(2rem) scale(0.98);
  filter: blur(0.5rem);
  transition:
    opacity 1150ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 1150ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 1150ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.equalizer-panel,
.controls-panel,
.sections-panel {
  border: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.92);
  box-shadow: 0 1.8rem 4.5rem rgba(0, 0, 0, 0.45);
}

.equalizer-panel {
  grid-area: eq;
  min-height: clamp(14rem, 32vw, 23rem);
  overflow: hidden;
  border-radius: 1.5rem;
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 52%),
    var(--card-deep);
}

.equalizer-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.12), transparent 25%, transparent 78%, rgba(5, 5, 5, 0.3));
}

#equalizer {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.controls-panel {
  grid-area: controls;
  border-radius: 1.5rem;
  padding: clamp(1.35rem, 4vw, 2.25rem);
  display: grid;
  align-content: center;
  gap: 1.45rem;
}

.transport-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.2rem, 4vw, 2.2rem);
}

.play-button,
.icon-button,
.volume-button {
  border: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.play-button {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0.85rem 2.2rem rgba(255, 62, 62, 0.28);
}

.play-button:hover {
  transform: scale(1.055);
  box-shadow: 0 0.95rem 2.7rem rgba(255, 62, 62, 0.4);
}

.play-button:active,
.icon-button:active,
.volume-button:active {
  transform: scale(0.94);
}

.play-button svg {
  width: 1.65rem;
  height: 1.65rem;
  fill: currentColor;
}

.play-button .play-icon {
  margin-left: 0.18rem;
}

.play-button .pause-icon,
.play-button.is-playing .play-icon {
  display: none;
}

.play-button.is-playing .pause-icon {
  display: block;
}

.icon-button,
.volume-button {
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
}

.icon-button {
  width: 2.7rem;
  height: 2.7rem;
}

.icon-button:hover,
.volume-button:hover {
  color: #fff;
}

.icon-button svg,
.volume-button svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button text {
  fill: currentColor;
  stroke: none;
  font-size: 6.5px;
  font-weight: 800;
}

.timeline-row,
.volume-row {
  display: flex;
  align-items: center;
}

.timeline-row {
  gap: 0.8rem;
}

.volume-row {
  width: min(12rem, 55%);
  margin: -0.25rem auto 0;
  gap: 0.55rem;
}

.volume-button {
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
}

.volume-button.is-muted .volume-on,
.volume-button:not(.is-muted) .volume-off {
  display: none;
}

.time {
  min-width: 2.8rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.time:last-child {
  text-align: right;
}

.range {
  --progress: 0%;
  width: 100%;
  height: 1rem;
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.range::-webkit-slider-runnable-track {
  height: 0.24rem;
  border-radius: 99px;
  background: linear-gradient(to right, var(--accent) 0 var(--progress), rgba(255, 255, 255, 0.13) var(--progress) 100%);
}

.range::-moz-range-track {
  height: 0.24rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.13);
}

.range::-moz-range-progress {
  height: 0.24rem;
  border-radius: 99px;
  background: var(--accent);
}

.range::-webkit-slider-thumb {
  width: 0.88rem;
  height: 0.88rem;
  margin-top: -0.32rem;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0.25rem rgba(255, 62, 62, 0.14);
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}

.range:hover::-webkit-slider-thumb,
.range:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}

.range::-moz-range-thumb {
  width: 0.88rem;
  height: 0.88rem;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0.25rem rgba(255, 62, 62, 0.14);
}

.volume {
  height: 0.8rem;
}

.volume::-webkit-slider-runnable-track,
.volume::-moz-range-track,
.volume::-moz-range-progress {
  height: 0.18rem;
}

.sections-panel {
  grid-area: sections;
  border-radius: 1.5rem;
  overflow: hidden;
  padding: 1.5rem 0 0.55rem;
}

.sections-panel h1 {
  margin: 0 1.5rem 0.85rem;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.section-list li {
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.section-button {
  width: 100%;
  min-height: 3.7rem;
  padding: 0.8rem 1.5rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.43);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  text-align: left;
  font-size: 1rem;
  font-weight: 400;
  transition: color 240ms ease, background 240ms ease;
}

.section-button::before {
  content: "";
  position: absolute;
  top: 24%;
  bottom: 24%;
  left: 0;
  width: 0.2rem;
  border-radius: 0 99px 99px 0;
  background: var(--accent);
  box-shadow: 0 0 1rem var(--accent);
  transform: scaleY(0);
  opacity: 0;
}

.section-button:hover {
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.018);
}

.section-button time {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  transition: color 240ms ease;
}

.section-button.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 62, 62, 0.11), transparent 72%);
  font-weight: 800;
  animation: section-in 430ms var(--ease) both;
}

.section-button.is-active::before {
  animation: marker-in 430ms var(--ease) both;
}

.section-button.is-active time {
  color: var(--accent);
  font-weight: 700;
}

.section-button.is-exiting {
  animation: section-out 360ms ease both;
}

.player-status {
  min-height: 0;
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  text-align: center;
}

.player-status:empty {
  display: none;
}

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

button:focus-visible,
input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@keyframes section-in {
  from { opacity: 0.5; transform: translateX(-0.55rem); letter-spacing: 0.015em; }
  to { opacity: 1; transform: translateX(0); letter-spacing: 0; }
}

@keyframes section-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0.43; transform: translateX(0.35rem); }
}

@keyframes marker-in {
  from { opacity: 0; transform: scaleY(0); }
  to { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 720px) {
  .player-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "eq"
      "controls"
      "sections";
    align-content: start;
    padding: 0.85rem;
  }

  .equalizer-panel {
    min-height: 34dvh;
    border-radius: 1.25rem;
  }

  .brand-header {
    padding-top: 0.5rem;
  }

  .brand-header h1 {
    letter-spacing: 0.09em;
  }

  .controls-panel,
  .sections-panel {
    border-radius: 1.25rem;
  }

  .volume-row {
    width: min(14rem, 70%);
  }
}

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

  .js .reveal,
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
