* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: #000;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

/* Standalone player page only */
body.player-standalone {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px;
}

.radio-player {
  position: relative;
  width: 100%;
  max-width: 380px;
  border-radius: 22px;
  padding: 24px 20px 20px;
  text-align: center;
  background-color: #000;
  border: 1px solid rgba(255,255,255,0.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

.frosted-background {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(10px);
  opacity: 0.18;
  z-index: 0;
  border-radius: 22px;
}

.radio-player > *:not(.frosted-background) {
  position: relative;
  z-index: 1;
}

.logo-wrap {
  margin-bottom: 14px;
}

.station-logo {
  display: block;
  width: auto;
  max-width: 180px;
  max-height: 64px;
  height: auto;
}

.subtitle {
  font-size: 0.98rem;
  margin-bottom: 18px;
  color: rgba(255,255,255,0.74);
}

.artwork {
  width: 100%;
  margin-bottom: 18px;
  box-shadow:
    0 10px 24px rgba(0,0,0,0.45),
    0 0 18px rgba(0,0,0,0.28);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.artwork img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.song-info {
  margin-bottom: 18px;
  color: #fff;
  min-height: 76px;
}

.now-playing-label {
  font-weight: 700;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.74);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
}

#song-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  word-break: break-word;
}

#song-artist {
  font-size: 0.98rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.4;
  word-break: break-word;
}

.fade-in {
  transition: opacity 0.5s ease-in-out;
  color: #fff;
}

.play-button {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background-color: #fff;
  border: none;
  cursor: pointer;
  margin-bottom: 20px;
  position: relative;
  box-shadow:
    0 10px 20px rgba(0,0,0,0.4),
    0 0 22px rgba(255,255,255,0.12);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  outline: none;
}

.play-button:hover {
  transform: scale(1.02);
}

.play-button.playing {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow:
      0 0 10px 2px rgba(255,255,255,0.22),
      0 0 20px 5px rgba(255,255,255,0.10);
  }
  50% {
    box-shadow:
      0 0 18px 5px rgba(255,255,255,0.30),
      0 0 36px 10px rgba(255,255,255,0.14);
  }
}

.play-button svg {
  width: 48px;
  height: 48px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.play-button .play-icon polygon,
.play-button .pause-icon rect {
  fill: #000;
}

.play-button .loading-spinner {
  position: absolute;
  width: 38px;
  height: 38px;
  border: 4px solid rgba(0, 0, 0, 0.18);
  border-top: 4px solid #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: none;
}

.play-button.loading .loading-spinner {
  display: block;
}

.play-button.loading svg {
  display: none;
}

.volume-control {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  gap: 10px;
}

.volume-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  flex: 0 0 auto;
}

#volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 180px;
  height: 5px;
  background: rgba(255,255,255,0.28);
  border-radius: 999px;
  outline: none;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #fff;
  cursor: pointer;
  border-radius: 50%;
  border: 0;
}

#volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  cursor: pointer;
  border-radius: 50%;
  border: 0;
}

.powered-by {
  font-size: 0.82rem;
  margin-top: 10px;
  color: rgba(255,255,255,0.55);
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 480px) {
  body.player-standalone {
    padding: 10px;
  }

  .radio-player {
    max-width: 100%;
    border-radius: 18px;
    padding: 18px 16px 18px;
  }

  .frosted-background {
    border-radius: 18px;
  }

  .station-logo {
    max-width: 150px;
    max-height: 54px;
  }

  .subtitle {
    font-size: 0.92rem;
  }

  .play-button {
    width: 84px;
    height: 84px;
  }

  .play-button svg {
    width: 44px;
    height: 44px;
  }
}

