:root {
  color-scheme: dark;
  --bg: #08070d;
  --panel: rgba(18, 16, 29, .86);
  --line: rgba(255, 255, 255, .12);
  --text: #f8f6ff;
  --muted: #9d98aa;
  --pink: #ff2ca8;
  --cyan: #20d7ff;
  --yellow: #ffd22e;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); overflow-x: hidden; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Avenir Next", Kanit, sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(63, 42, 255, .2), transparent 32rem),
    radial-gradient(circle at 88% 78%, rgba(255, 32, 155, .14), transparent 34rem),
    #08070d;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 100% 5px;
}

button, input { font: inherit; }
button { color: inherit; }

.shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  justify-items: center;
  padding: clamp(24px, 5vw, 72px);
}

.station {
  width: min(820px, calc(100vw - 48px));
  max-width: 100%;
  margin-inline: auto;
}

.identity {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
}

.copy { width: 100%; text-align: center; }

.logo {
  display: block;
  width: min(290px, 68vw);
  height: auto;
  border-radius: 24px;
  box-shadow:
    0 35px 90px rgba(0,0,0,.55),
    0 0 70px rgba(80, 55, 255, .13);
}

.label {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  max-width: 720px;
  margin: 0 auto;
  font-family: Kanit, "Avenir Next", sans-serif;
  font-size: clamp(48px, 7vw, 94px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: .008em;
}

.intro {
  max-width: 600px;
  margin: 22px auto 0;
  color: #bbb6c7;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.player-card {
  position: relative;
  margin-top: clamp(42px, 7vw, 80px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(24px, 4vw, 42px);
  background: linear-gradient(135deg, rgba(24, 21, 38, .94), rgba(10, 9, 18, .9));
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
  text-align: left;
}

.player-card::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 180px;
  top: -130px;
  right: -40px;
  background: var(--pink);
  filter: blur(110px);
  opacity: .2;
  pointer-events: none;
}

.now-playing {
  position: relative;
  min-width: 0;
  padding: clamp(18px, 3vw, 28px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background:
    linear-gradient(105deg, rgba(255, 44, 168, .12), rgba(32, 215, 255, .055) 65%, transparent),
    rgba(255, 255, 255, .025);
}

.now-playing::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--pink), var(--cyan));
}

.label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
  color: #fff;
}

.label::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 15px var(--pink);
  animation: now-playing-pulse 1.7s ease-in-out infinite;
}

@keyframes now-playing-pulse {
  0%, 100% { opacity: .55; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

.track-window {
  width: 100%;
  overflow: hidden;
}

.track {
  display: flex;
  align-items: baseline;
  gap: clamp(32px, 4vw, 48px);
  width: max-content;
  max-width: none;
  margin: 0;
  color: #fff;
  font-family: "Avenir Next", Kanit, sans-serif;
  font-size: clamp(27px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: .012em;
  white-space: nowrap;
  will-change: transform;
}

.track-copy {
  flex: 0 0 auto;
}

.context {
  min-height: 24px;
  margin: 9px 0 0;
  color: #89eaff;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 800;
  letter-spacing: .035em;
}

.player-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(18px, 3vw, 32px);
  margin-top: 34px;
}

.play {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #08070d;
  cursor: pointer;
  font-family: Kanit, "Avenir Next", sans-serif;
  background: #fff;
  box-shadow: 0 10px 34px rgba(255,255,255,.18);
  transition: transform .18s ease, background .18s ease;
}

.play:hover { transform: scale(1.05); background: #f7eaff; }
.play:active { transform: scale(.96); }
.play:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.play-symbol {
  margin-left: 4px;
  font-size: 24px;
}

.playing .play-symbol { margin-left: 0; }

.vu-meter {
  display:block;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: #08070d;
}
.vu-lines { min-width:0; display:grid; grid-template-columns:12px minmax(110px, 1fr); align-items:center; gap:5px 8px; }
.vu-label { color:#9d98aa; font:800 10px/1 Kanit, sans-serif; text-align:center; }
.vu-channel { height:12px; display:grid; grid-template-columns:repeat(24, 1fr); gap:2px; }
.vu-horizontal-scale { grid-column:2; display:flex; justify-content:space-between; margin-top:-2px; color:#a7a1ae; font:700 8px/1 Kanit, sans-serif; }
.vu-segment { border-radius:2px; background:#25303d; opacity:.35; transition:opacity .06s linear, background .06s linear; }
.vu-segment.active { opacity:1; background:#25db72; box-shadow:0 0 7px rgba(37,219,114,.45); }
.vu-segment.warn.active { background:#ffd22e; box-shadow:0 0 7px rgba(255,210,46,.5); }
.vu-segment.peak.active { background:#ff396c; box-shadow:0 0 8px rgba(255,57,108,.6); }

.player-state {
  min-width: 125px;
  display: flex;
  flex-direction: column;
  text-align: right;
}

.player-state strong { font-size: 14px; }
.player-state strong:empty { display: none; }
.player-state span { margin-top: 5px; color: var(--muted); font-size: 12px; }

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.quality {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.2);
}

.quality-option {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  font-family: Kanit, "Avenir Next", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.quality-option span { font-weight: 500; }
.quality-option.active { color: #090810; background: #fff; }

.volume {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume button {
  width: 30px;
  border: 0;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
}

.volume input {
  width: min(150px, 28vw);
  accent-color: var(--pink);
}

.external-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 22px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, .025);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.external-player:hover {
  border-color: rgba(32, 215, 255, .5);
  background: rgba(32, 215, 255, .07);
  transform: translateY(-1px);
}

.external-player strong {
  font-family: Kanit, "Avenir Next", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
}

.external-arrow {
  color: var(--cyan);
  font-size: 22px;
}

@media (max-width: 760px) {
  .shell {
    min-height: auto;
    place-items: start center;
    padding: 18px 14px 32px;
  }

  .station,
  .player-card,
  .now-playing,
  .track-window,
  .player-main,
  .vu-meter {
    min-width: 0;
  }

  .station { width: 100%; }
  .identity { grid-template-columns: 1fr; gap: 22px; }
  .logo {
    width: min(64vw, 250px);
    margin: 0 auto;
    border-radius: 18px;
  }
  .copy { text-align: center; }
  h1 {
    max-width: 520px;
    margin-inline: auto;
    font-size: clamp(40px, 11.5vw, 62px);
    line-height: .96;
  }
  .intro {
    max-width: 480px;
    margin: 18px auto 0;
    font-size: 16px;
    line-height: 1.45;
  }
  .player-card {
    width: 100%;
    margin-top: 34px;
    padding: 18px;
    border-radius: 20px;
  }
  .now-playing { padding: 18px 16px; }
  .track { font-size: clamp(25px, 7.4vw, 34px); }
  .context { font-size: 16px; }
  .player-main {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 16px;
    margin-top: 22px;
  }
  .play {
    width: 58px;
    height: 58px;
  }
  .vu-meter {
    width: 100%;
  }
  .player-state {
    min-width: 0;
    grid-column: 1 / -1;
    text-align: left;
  }
  .controls {
    align-items: flex-start;
    margin-top: 22px;
    padding-top: 20px;
  }
  .external-player { margin-top: 18px; }
}

@media (max-width: 440px) {
  .logo { width: min(58vw, 220px); }
  h1 { font-size: clamp(38px, 11vw, 48px); }
  .player-card {
    padding: 14px;
    border-radius: 18px;
  }
  .quality {
    width: 100%;
  }
  .quality-option {
    flex: 1 1 50%;
    padding-inline: 8px;
  }
  .controls {
    flex-direction: column;
    gap: 18px;
  }
  .volume { width: 100%; }
  .volume input { width: 100%; }
  .external-player {
    padding: 13px 14px;
  }
}

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

  .track {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
