:root {
  --bg-1: #06294c;
  --bg-2: #96bee6;
  --bg-3: #0753ac;
  --text: #ffffff;
  --soft-text: rgba(255,255,255,0.78);
  --glass: rgba(255,255,255,0.13);
  --glass-border: rgba(255,255,255,0.28);
  --shadow: rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 15%, rgba(214,235,255,0.98) 0%, rgba(148,190,231,0.96) 28%, rgba(49,110,181,0.94) 54%, rgba(6,73,151,0.98) 80%, rgba(4,39,73,1) 100%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3));
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  background: repeating-radial-gradient(circle at center, rgba(255,255,255,0.12) 0 2px, transparent 3px 46px);
  opacity: .22;
  animation: bgPulse 9s ease-in-out infinite;
}

body::after {
  background: radial-gradient(circle at 55% 35%, rgba(255,255,255,0.28), transparent 26%), radial-gradient(circle at 72% 76%, rgba(0,130,255,0.28), transparent 30%);
  opacity: .75;
  animation: softMove 12s ease-in-out infinite alternate;
}

.bg-orb,
.bg-wave {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
}

.orb-one {
  width: 42vw;
  height: 42vw;
  top: -12vw;
  right: -10vw;
  background: radial-gradient(circle, rgba(255,255,255,.23), transparent 62%);
  animation: floatOrb 11s ease-in-out infinite alternate;
}

.orb-two {
  width: 34vw;
  height: 34vw;
  left: -12vw;
  bottom: -10vw;
  background: radial-gradient(circle, rgba(0,93,200,.28), transparent 65%);
  animation: floatOrb 13s ease-in-out infinite alternate-reverse;
}

.bg-wave {
  width: 620px;
  height: 620px;
  border: 1px solid rgba(255,255,255,.12);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: radioWave 5.5s linear infinite;
}

.wave-b { animation-delay: 2.75s; }

.radio-page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.player-card {
  width: min(980px, 96vw);
  display: grid;
  grid-template-columns: 370px 1fr;
  align-items: center;
  gap: 48px;
  transform: translateY(-8px);
}

.cover-wrap {
  position: relative;
  width: 370px;
  aspect-ratio: 1 / 1;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,0.28);
  box-shadow: 0 18px 34px var(--shadow), 0 0 45px rgba(126,191,255,.48);
  animation: coverGlow 3.2s ease-in-out infinite alternate;
}

.cover-glow {
  position: absolute;
  inset: -35px;
  background: radial-gradient(circle, rgba(132,202,255,.45), transparent 58%);
  opacity: .75;
  z-index: -1;
}

.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.controls-wrap {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.22);
  color: var(--soft-text);
  font-size: 18px;
  letter-spacing: .6px;
  text-shadow: 0 1px 2px rgba(0,0,0,.24);
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.58);
}

.status-dot.online {
  background: #fff;
  animation: dotPulse 1.4s infinite;
}

.status-dot.connecting {
  background: #fff;
  animation: blink 0.7s infinite alternate;
}

.status-dot.offline {
  background: rgba(255,255,255,.36);
  box-shadow: none;
}

.play-button {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.92);
  background: linear-gradient(145deg, #ffffff, #dbeeff);
  color: #174a82;
  font-size: 48px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 14px 28px rgba(0,0,0,.36), inset 0 -8px 22px rgba(4,67,130,.16);
  transition: transform .16s ease, box-shadow .16s ease;
  -webkit-tap-highlight-color: transparent;
}

.play-button:hover { transform: scale(1.04); }
.play-button:active { transform: scale(.98); }
.play-button.playing { box-shadow: 0 16px 32px rgba(0,0,0,.38), 0 0 36px rgba(255,255,255,.32), inset 0 -8px 22px rgba(4,67,130,.16); }
.play-button.playing .icon { transform: translateY(-2px); }

.play-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  opacity: 0;
}

.play-button.playing .ring-one { animation: ringPulse 1.6s infinite; }
.play-button.playing .ring-two { animation: ringPulse 1.6s .8s infinite; }

.icon {
  position: relative;
  z-index: 2;
  margin-left: 5px;
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}

.play-button.playing .icon { margin-left: 0; }

.visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 52px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  opacity: .45;
  transition: opacity .2s ease;
}

.visualizer span {
  width: 5px;
  height: 13px;
  border-radius: 99px;
  background: rgba(255,255,255,.92);
  transform-origin: center;
}

.visualizer.is-playing { opacity: 1; }
.visualizer.is-playing span { animation: equalizer 1s ease-in-out infinite; }
.visualizer.is-playing span:nth-child(2) { animation-delay: .12s; }
.visualizer.is-playing span:nth-child(3) { animation-delay: .24s; }
.visualizer.is-playing span:nth-child(4) { animation-delay: .36s; }
.visualizer.is-playing span:nth-child(5) { animation-delay: .48s; }
.visualizer.is-playing span:nth-child(6) { animation-delay: .18s; }
.visualizer.is-playing span:nth-child(7) { animation-delay: .30s; }
.visualizer.is-playing span:nth-child(8) { animation-delay: .42s; }
.visualizer.is-playing span:nth-child(9) { animation-delay: .54s; }
.visualizer.is-playing span:nth-child(10) { animation-delay: .66s; }

.volume-box {
  width: min(430px, 100%);
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
}

.volume-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.speaker {
  font-size: 28px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}

.volume-text {
  font-size: 18px;
  text-shadow: 0 1px 2px rgba(0,0,0,.38);
}

input[type="range"] {
  width: 100%;
  height: 34px;
  accent-color: #ffffff;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
}

input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -10px;
}

input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
}

.install-button {
  min-width: 190px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,.20);
  backdrop-filter: blur(12px);
}

.install-button:hover { background: rgba(255,255,255,.26); }

.error-box {
  max-width: 460px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
  color: #fff;
  line-height: 1.35;
}

@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); }
  70% { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

@keyframes blink { from { opacity: .38; } to { opacity: 1; } }

@keyframes ringPulse {
  0% { transform: scale(.8); opacity: .68; }
  100% { transform: scale(1.38); opacity: 0; }
}

@keyframes equalizer {
  0%, 100% { transform: scaleY(.45); }
  50% { transform: scaleY(2.25); }
}

@keyframes bgPulse {
  0%, 100% { transform: scale(1); opacity: .14; }
  50% { transform: scale(1.08); opacity: .25; }
}

@keyframes softMove {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 1%, 0) scale(1.06); }
}

@keyframes floatOrb {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(28px, -22px, 0) scale(1.08); }
}

@keyframes radioWave {
  from { transform: translate(-50%, -50%) scale(.55); opacity: .28; }
  to { transform: translate(-50%, -50%) scale(1.55); opacity: 0; }
}

@keyframes coverGlow {
  from { box-shadow: 0 18px 34px var(--shadow), 0 0 34px rgba(126,191,255,.32); }
  to { box-shadow: 0 18px 34px var(--shadow), 0 0 60px rgba(162,215,255,.62); }
}

@media (max-width: 820px) {
  .radio-page { padding: 20px 16px; }

  .player-card {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 28px;
    transform: none;
  }

  .cover-wrap {
    width: min(360px, 84vw);
  }

  .controls-wrap {
    min-height: auto;
    width: min(430px, 92vw);
    align-items: center;
    gap: 18px;
  }

  .live-pill { font-size: 16px; }
  .play-button { width: 104px; height: 104px; font-size: 44px; }
  .error-box { text-align: center; }
}

@media (max-width: 460px) {
  .cover-wrap { width: min(310px, 82vw); }
  .play-button { width: 96px; height: 96px; font-size: 40px; }
  .volume-box { padding: 16px; }
  .volume-head { margin-bottom: 10px; }
  .speaker { font-size: 25px; }
  .volume-text { font-size: 16px; }
  .visualizer { height: 46px; }
}
