:root {
  color-scheme: dark;
  --bg: #0c0d0d;
  --surface: #151716;
  --surface-light: #1d201e;
  --line: #343833;
  --line-bright: #64685f;
  --text: #f4f0e6;
  --muted: #a29f95;
  --amber: #f2b83b;
  --amber-bright: #ffd36b;
  --cyan: #63c7ce;
  --red: #ef6255;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  min-height: 78px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--amber);
  border-radius: 50%;
  color: var(--amber-bright);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.brand-name {
  font-size: 14px;
  font-weight: 650;
  text-transform: uppercase;
}

.brand-name strong {
  color: var(--amber);
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.status-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(99, 199, 206, 0.72);
}

.meta-divider {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.deck {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(36px, 7vw, 104px);
  align-items: center;
  min-height: 610px;
  padding: 48px 0 54px;
  border-bottom: 1px solid var(--line);
}

.visual-stage {
  position: relative;
  width: min(100%, 530px);
  aspect-ratio: 1 / 1;
  isolation: isolate;
}

.cover-plate {
  position: absolute;
  inset: 2% 22% 18% 0;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: #101212;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
}

.cover-art {
  position: absolute;
  inset: 0;
  background-image: url("./art/spectrum.jpg");
  background-position: center;
  background-size: cover;
  filter: grayscale(1) sepia(0.9) saturate(1.7) hue-rotate(-18deg) contrast(1.12) brightness(0.78);
  transform: scale(1.04);
}

.cover-plate::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 13, 13, 0.04), rgba(12, 13, 13, 0.84)),
    linear-gradient(90deg, rgba(242, 184, 59, 0.16), transparent 44%);
  content: "";
}

.cover-copy {
  position: absolute;
  z-index: 1;
  top: 26px;
  right: auto;
  bottom: auto;
  left: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.cover-copy span {
  max-width: 110px;
  color: rgba(244, 240, 230, 0.72);
  font-family: Consolas, monospace;
  font-size: 10px;
  line-height: 1.5;
  text-transform: uppercase;
}

.cover-copy strong {
  color: var(--amber-bright);
  font-family: Consolas, monospace;
  font-size: clamp(24px, 3vw, 38px);
}

.disc {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  width: 61%;
  aspect-ratio: 1 / 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 26%, rgba(255, 255, 255, 0.95) 0 1.2%, transparent 1.8%),
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.17) 0 1px, transparent 1px 4px),
    conic-gradient(
      from 15deg,
      #1d292b,
      #d8e8e6,
      #26383a,
      #e3b355,
      #243032,
      #f6ffff,
      #172124,
      #66bfc7,
      #1d292b
    );
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.58),
    inset 0 0 0 8px rgba(255, 255, 255, 0.08);
  animation: spin 14s linear infinite;
  animation-play-state: paused;
}

body.is-playing .disc {
  animation-play-state: running;
}

.disc-grooves {
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 22px rgba(10, 12, 12, 0.08),
    inset 0 0 0 42px rgba(255, 255, 255, 0.035);
}

.disc-label {
  position: relative;
  z-index: 1;
  display: flex;
  width: 45%;
  aspect-ratio: 1 / 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 34%),
    var(--amber);
  color: #15130e;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.24);
}

.disc-label span {
  font-family: Consolas, monospace;
  font-size: clamp(8px, 0.8vw, 11px);
  font-weight: 700;
}

.disc-label strong {
  margin: -2px 0;
  font-family: Consolas, monospace;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
}

.spindle {
  position: absolute;
  z-index: 2;
  width: 5.5%;
  aspect-ratio: 1 / 1;
  border: 2px solid #0c0d0d;
  border-radius: 50%;
  background: #d9e2df;
}

.console {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

#now-title {
  margin: 0;
  font-family: Consolas, "Segoe UI", sans-serif;
  font-size: clamp(72px, 10vw, 126px);
  font-weight: 650;
  line-height: 0.86;
}

.track-subtitle {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.signal {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 54px;
  margin: 26px 0 24px;
}

.signal span {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--line-bright);
  transform-origin: center;
}

.signal span:nth-child(3n + 1) {
  background: var(--amber);
}

.signal span:nth-child(4n + 2) {
  background: var(--cyan);
}

body.is-playing .signal span {
  animation: meter 0.78s ease-in-out infinite alternate;
}

body.is-playing .signal span:nth-child(2n) {
  animation-delay: -0.34s;
}

body.is-playing .signal span:nth-child(3n) {
  animation-delay: -0.61s;
}

.timeline {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 11px;
}

#duration {
  text-align: right;
}

.range {
  width: 100%;
  height: 18px;
  margin: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  cursor: pointer;
  appearance: none;
}

.range::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(90deg, var(--amber) var(--range-progress, 0%), var(--line) var(--range-progress, 0%));
}

.range::-moz-range-track {
  height: 3px;
  background: var(--line);
}

.range::-moz-range-progress {
  height: 3px;
  background: var(--amber);
}

.range::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--amber-bright);
  box-shadow: 0 0 0 1px var(--amber);
  appearance: none;
}

.range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--amber-bright);
  box-shadow: 0 0 0 1px var(--amber);
}

.range:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

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

.icon-button,
.play-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.icon-button {
  width: 48px;
  height: 48px;
  color: var(--muted);
}

.icon-button.compact {
  width: 38px;
  height: 38px;
}

.play-button {
  width: 68px;
  height: 68px;
  border-color: var(--amber);
  background: var(--amber);
  color: #11120f;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--text);
  color: var(--text);
}

.play-button:hover,
.play-button:focus-visible {
  background: var(--amber-bright);
  transform: scale(1.03);
}

.icon-button:focus-visible,
.play-button:focus-visible,
.track-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.icon-button svg,
.play-button svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.play-button svg {
  width: 26px;
  height: 26px;
}

.volume-control {
  display: flex;
  min-width: 150px;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.volume-range {
  width: 92px;
}

.track-section {
  padding: 42px 0 58px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-family: Consolas, monospace;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.play-state {
  margin: 0 0 3px;
  color: var(--cyan);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.tracklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.track-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(21, 23, 22, 0.84);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

.track-button:hover {
  border-color: var(--line-bright);
  color: var(--text);
}

.track-button[aria-current="true"] {
  border-color: var(--amber);
  background: var(--amber);
  color: #11120f;
}

.track-number {
  font-family: Consolas, monospace;
  font-size: 19px;
  font-weight: 700;
}

.track-lines {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  overflow: hidden;
}

.track-lines span {
  width: 2px;
  height: 6px;
  background: currentColor;
  opacity: 0.56;
}

.track-lines span:nth-child(2n) {
  height: 13px;
}

.track-lines span:nth-child(3n) {
  height: 9px;
}

.track-duration {
  font-family: Consolas, monospace;
  font-size: 11px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px 34px;
  border-top: 1px solid var(--line);
  color: #777970;
  font-family: Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes meter {
  0% {
    height: 6px;
    opacity: 0.46;
  }
  100% {
    height: 46px;
    opacity: 1;
  }
}

@media (max-width: 920px) {
  .deck {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: auto;
  }

  .visual-stage {
    width: min(82vw, 520px);
    margin: 0 auto;
  }

  .console {
    width: min(100%, 620px);
    margin: 0 auto;
  }

  .tracklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .topbar,
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    min-height: 66px;
  }

  .top-meta .meta-divider,
  .top-meta span:last-child {
    display: none;
  }

  .deck {
    padding: 30px 0 42px;
  }

  .cover-plate {
    inset: 1% 25% 18% 0;
  }

  .cover-copy {
    top: 18px;
    right: auto;
    bottom: auto;
    left: 18px;
  }

  .disc {
    width: 64%;
  }

  #now-title {
    font-size: clamp(64px, 24vw, 96px);
  }

  .controls {
    gap: 9px;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

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

  .volume-control {
    min-width: 98px;
  }

  .volume-range {
    width: 55px;
  }

  .tracklist {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}
