:root {
  --cream: #FFF8EE;
  --ink: #2D2A5E;
  --ink-soft: #5A5690;
  --lavender: #C9C6E8;
  --muted-dot: #8F8BBF;
  --amber: #F5A33A;
  --amber-light: #F8B24E;
  --sun: #FFD58A;
  --orange: #E0622A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
}

@keyframes eq { from { transform: scaleY(0.12); } to { transform: scaleY(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Layout ---------- */
.root {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
}

.glow { position: absolute; border-radius: 50%; pointer-events: none; }
.glow--top {
  top: -34vh; right: -14vw;
  width: 78vh; height: 78vh;
  background: radial-gradient(circle at 50% 50%, var(--sun) 0%, var(--amber-light) 38%, rgba(245,163,58,0) 70%);
  opacity: .7;
}
.glow--bottom {
  bottom: -30vh; left: -12vw;
  width: 64vh; height: 64vh;
  background: radial-gradient(circle at 50% 50%, var(--sun) 0%, rgba(245,163,58,0) 68%);
  opacity: .55;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  padding: 24px 40px 40px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 24px 56px;
}

/* ---------- Footer ---------- */
.foot {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  z-index: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.foot a { color: var(--orange); text-decoration: none; font-weight: 800; }
.foot a:hover, .foot a:focus-visible { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.logo {
  width: 100%;
  max-width: 620px;
  max-height: 44vh;
  height: auto;
  object-fit: contain;
}
.tag {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.sub {
  margin: 0;
  max-width: 440px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- Player card ---------- */
.card {
  flex: 0 1 440px;
  width: 440px;
  max-width: 100%;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 32px;
  padding: 28px 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 30px 60px -20px rgba(45,42,94,.55);
}

.card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; letter-spacing: .12em; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted-dot); }
.card.is-live .dot { background: var(--amber); animation: pulse 1.4s ease-in-out infinite; }
.freq { font-size: 14px; font-weight: 700; color: var(--lavender); }

.eqbox {
  height: 92px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
}
.eq {
  flex: 1;
  min-width: 0;
  height: 100%;
  border-radius: 999px;
  transform-origin: bottom;
  background: linear-gradient(to top, var(--orange), var(--amber-light));
  transform: scaleY(0.12);
  opacity: .7;
}
.card.is-live .eq {
  opacity: 1;
  animation: eq var(--dur) ease-in-out var(--delay) infinite alternate;
}

.stn { font-size: 26px; font-weight: 900; line-height: 1.15; }
.stat {
  margin-top: 4px;
  min-height: 40px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--lavender);
}

/* ---------- Controls ---------- */
button { font-family: inherit; cursor: pointer; border: 0; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

.ctrls { display: flex; align-items: center; justify-content: center; gap: 28px; }

.ghost {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
}
.ghost:hover { background: rgba(255,255,255,.18); }

.play {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
  box-shadow: 0 12px 28px -8px rgba(224,98,42,.7);
}
.play:hover { transform: scale(1.05); }
.play:active { transform: scale(.97); }
.icon-play { margin-left: 4px; }
.spin { animation: spin .9s linear infinite; }

/* Icon visibility driven by card state */
.icon-loading, .icon-pause, .icon-muted { display: none; }
.card.is-loading .icon-loading { display: block; }
.card.is-loading .icon-play { display: none; }
.card.is-live .icon-pause { display: block; }
.card.is-live .icon-play { display: none; }
.card.is-muted .icon-muted { display: block; }
.card.is-muted .icon-sound { display: none; }

/* ---------- Volume ---------- */
.vol { display: flex; align-items: center; gap: 14px; padding-top: 2px; }
.vol label { font-size: 13px; font-weight: 800; letter-spacing: .1em; color: var(--lavender); }
.vol__text { width: 40px; text-align: right; font-size: 14px; font-weight: 800; color: #FFFFFF; }

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 8px;
  margin: 0;
  border-radius: 999px;
  outline-offset: 6px;
  --pct: 80%;
  background: linear-gradient(to right, var(--amber) var(--pct), rgba(255,255,255,.22) var(--pct));
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 4px solid var(--amber);
  cursor: pointer;
}
input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 4px solid var(--amber);
  cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .wrap { padding: 20px 24px 36px; gap: 20px 32px; }
  .card { flex: 0 0 380px; width: 380px; }
  .tag { font-size: 28px; }
  .sub { font-size: 16px; }
}
@media (max-width: 700px) {
  .wrap { flex-wrap: wrap; }
  .hero { flex: 1 1 auto; width: 100%; }
  .card { flex: 0 1 auto; width: min(440px, 100%); }
  .logo { max-height: 32vh; }
}
@media (max-width: 520px) {
  .wrap { padding: 16px 16px 36px; }
  .tag { font-size: 24px; }
  .sub { display: none; }
  .card { padding: 20px; gap: 12px; border-radius: 26px; }
  .eqbox { height: 64px; }
  .stn { font-size: 22px; }
  .stat { min-height: 36px; font-size: 14px; }
  .ctrls { gap: 20px; }
  .play { width: 72px; height: 72px; }
}
@media (max-height: 700px) {
  .logo { max-height: 30vh; }
  .sub { display: none; }
  .eqbox { height: 64px; }
  .card { padding: 20px 28px; gap: 12px; }
  .tag { font-size: 26px; }
}
@media (max-height: 560px) {
  .root { height: auto; min-height: 100vh; overflow-y: auto; }
  .logo { max-height: 200px; }
  .tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .eq, .dot, .spin { animation: none !important; }
}
