:root {
  color-scheme: light;
  --ink: #24252a;
  --muted: rgba(20, 22, 28, 0.48);
  --accent: #7c6af7;
  --accent-soft: #a59aff;
  --paper: #e4e8ee;
  --light: rgba(255, 255, 255, 0.9);
  --shadow: rgba(118, 126, 139, 0.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: -0.1px;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.75), transparent 27rem),
    radial-gradient(circle at 88% 80%, rgba(124,106,247,.06), transparent 30rem);
}

.shell {
  position: relative;
  width: min(1040px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  font-size: 13px;
}

.brand,
.topbar nav {
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 7px 7px 14px var(--shadow), -7px -7px 14px var(--light);
}

.brand { padding: 13px 16px; font-weight: 700; }
.brand span, .prompt { color: var(--accent); }

.topbar nav { display: flex; gap: 4px; padding: 5px; }
.topbar nav a { padding: 9px 12px; border-radius: 13px; color: var(--muted); }
.topbar nav a:hover,
.topbar nav .active { color: var(--accent); background: rgba(255,255,255,.34); }

.hero {
  padding: clamp(56px, 10vw, 116px) 0 46px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 28px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

h1 {
  margin: 0;
  color: #202126;
  font-size: clamp(82px, 17vw, 176px);
  font-weight: 700;
  letter-spacing: -0.095em;
  line-height: 0.8;
  text-shadow: 1px 1px 0 rgba(255,255,255,.65);
}

.cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }

.lede {
  margin: 40px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 2vw, 17px);
}

code {
  padding: 3px 7px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255,255,255,.38);
}

.terminal {
  overflow: hidden;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 15px 15px 34px var(--shadow), -15px -15px 34px var(--light);
}

.terminal-line {
  display: flex;
  gap: 12px;
  padding: 17px 22px;
  color: var(--muted);
  font: 13px/1.4 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  box-shadow: inset 0 -1px rgba(92, 99, 112, .1);
}

.command { color: var(--ink); }

.player-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(170px, .58fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  padding: clamp(30px, 6vw, 60px);
}

.play {
  width: 90px;
  height: 90px;
  border: 0;
  border-radius: 50%;
  color: var(--accent);
  background: var(--paper);
  box-shadow: 9px 9px 18px var(--shadow), -9px -9px 18px var(--light);
  font-size: 25px;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.play:hover { color: #6652f3; transform: translateY(-2px); }
.play:active {
  transform: translateY(1px);
  box-shadow: inset 6px 6px 13px var(--shadow), inset -6px -6px 13px var(--light);
}
.play:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 5px; }
.pause-icon { display: none; }
.playing .play-icon { display: none; }
.playing .pause-icon { display: inline; }

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ba9b54;
  box-shadow: 0 0 0 4px rgba(186,155,84,.12);
}

.status-dot.ready { background: #59b965; box-shadow: 0 0 0 4px rgba(89,185,101,.13); }
.status-dot.offline { background: #de675f; box-shadow: 0 0 0 4px rgba(222,103,95,.13); }

.now {
  margin: 14px 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(19px, 3vw, 29px);
  font-weight: 600;
}

.next { margin: 0; color: var(--muted); font-size: 12px; }

.meter {
  height: 82px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  border-radius: 20px;
  box-shadow: inset 5px 5px 12px rgba(134,141,153,.26), inset -5px -5px 12px rgba(255,255,255,.6);
  opacity: .42;
}

.meter i {
  width: 4px;
  height: 10%;
  border-radius: 99px;
  background: var(--accent);
  transform-origin: bottom;
}

.playing .meter { opacity: 1; }
.playing .meter i { animation: meter 750ms ease-in-out infinite alternate; }
.meter i:nth-child(3n) { animation-delay: -210ms; }
.meter i:nth-child(4n) { animation-delay: -480ms; }
.meter i:nth-child(5n) { animation-delay: -330ms; }

.controls {
  display: grid;
  grid-template-columns: auto minmax(80px, 220px) 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  box-shadow: inset 0 1px rgba(255,255,255,.65);
}

.controls input { accent-color: var(--accent); }
#clock { justify-self: end; font-variant-numeric: tabular-nums; }

.message {
  margin: 0;
  padding: 13px 22px;
  color: var(--accent);
  background: rgba(255,255,255,.2);
  font: 11px/1.4 "SFMono-Regular", Consolas, monospace;
}

footer {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding: 38px 0 28px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

@keyframes blink { 50% { opacity: 0; } }
@keyframes meter { 0% { height: 8%; } 100% { height: var(--peak, 82%); } }
.meter i:nth-child(2n) { --peak: 48%; }
.meter i:nth-child(3n) { --peak: 96%; }
.meter i:nth-child(5n) { --peak: 65%; }

@media (max-width: 720px) {
  .shell { width: min(100% - 24px, 1040px); }
  .topbar nav { gap: 0; }
  .topbar nav a { padding-inline: 9px; }
  .hero { padding-top: 76px; }
  .player-grid { grid-template-columns: auto 1fr; }
  .meter { grid-column: 1 / -1; justify-content: stretch; height: 52px; }
  .meter i { flex: 1; }
  .play { width: 70px; height: 70px; }
  footer { gap: 20px; }
}

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