*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080808;
  --box-bg:    #101010;
  --box-border:#1e1e1e;
  --amber:     #e8a040;
  --amber-dim: #8a5a18;
  --text:      #c8c8c8;
  --muted:     #555;
  --radius:    18px;
}

body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: 'Space Mono', monospace;
  color: var(--text);
  user-select: none;
}

/* ── scene ── */
.scene {
  perspective: 800px;
}

/* ── box ── */
.box {
  width: 280px;
  background: var(--box-bg);
  border: 1px solid var(--box-border);
  border-radius: var(--radius);
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow:
    0 0 0 1px #000,
    0 24px 64px rgba(0,0,0,.8),
    inset 0 1px 0 rgba(255,255,255,.04);
}

/* ── header ── */
.box__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.box__brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--amber);
  opacity: .9;
}

.box__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  transition: background .4s, box-shadow .4s;
}
.box__dot.live {
  background: #e84040;
  box-shadow: 0 0 6px #e84040aa;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* ── speaker ── */
.box__speaker {
  position: relative;
  height: 148px;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
}

.box__grille {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #282828 1.2px, transparent 1.2px);
  background-size: 10px 10px;
  background-position: 5px 5px;
}

.box__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(232,160,64,.07) 0%, transparent 70%);
  transition: opacity .6s;
  opacity: 0;
}
.box--playing .box__glow {
  opacity: 1;
  animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%,100% { opacity: .6; }
  50%      { opacity: 1; }
}

/* ── eq bars ── */
.box__eq {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 36px;
}

.eq-bar {
  width: 5px;
  border-radius: 2px 2px 0 0;
  background: var(--amber-dim);
  height: 4px;
  transition: background .3s;
}
.box--playing .eq-bar {
  background: var(--amber);
  animation: eq-dance var(--dur, .8s) ease-in-out infinite alternate;
}
@keyframes eq-dance {
  from { transform: scaleY(1);   }
  to   { transform: scaleY(var(--peak, 3)); }
}

/* ── info ── */
.box__info {
  text-align: center;
  min-height: 38px;
}

.box__station {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .04em;
}

.box__genre {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ── controls ── */
.box__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn {
  background: none;
  border: 1px solid var(--box-border);
  color: var(--muted);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, border-color .2s, box-shadow .2s;
  font-family: inherit;
  line-height: 1;
}
.btn:hover {
  color: var(--text);
  border-color: #333;
}
.btn--play {
  width: 48px;
  height: 48px;
  font-size: 16px;
  border-color: var(--amber-dim);
  color: var(--amber);
}
.btn--play:hover {
  border-color: var(--amber);
  box-shadow: 0 0 12px rgba(232,160,64,.2);
}

/* ── station dots ── */
.box__stations {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.s-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--box-border);
  border: 1px solid #2a2a2a;
  cursor: pointer;
  transition: background .25s, box-shadow .25s, transform .15s;
}
.s-dot:hover {
  background: var(--amber-dim);
  transform: scale(1.2);
}
.s-dot.active {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(232,160,64,.5);
}

/* ── volume ── */
.box__volume {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vol-icon {
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--box-border);
  outline: none;
  cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 6px rgba(232,160,64,.4);
  transition: transform .15s;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}
