/ Restart Radio Player */
audio#audio-player {
  display: none;
}

#radio-player {
  height: 90px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-family: 'DefqonRadio', sans-serif;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  justify-content: space-between;
  background-color: rgba(18, 18, 18, 0.98);
  backdrop-filter: blur(6px);
}

.cover-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cover {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  overflow: hidden;
  background-color: transparent;
  background-image: url('/assets/radio.png'); /* fallback if image fails */
  background-size: cover;
  background-position: center;
  border-radius: 0;
  position: relative;
}

.cover-reflection {
  width: 60px;
  height: 60px;
  transform: scaleY(-1);
  opacity: 0.3;
  filter: blur(2px);
  margin-top: -5px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}

#radio-player .now-playing {
  display: flex;
  flex-direction: column;
  padding-left: 12px;
  overflow: hidden;
  flex-grow: 1;
  background-color: transparent;
}

.title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.artist {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0;
}

/* Station label above track info */
.station-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #aaa;            /* light grey, match artist text */
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 180px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.play-button {
  width: 48px;
  height: 48px;
  aspect-ratio: 1;
  line-height: 1;
  text-align: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: #fff;
  padding: 0;
  box-sizing: border-box;
}

.icon-play,
.icon-pause {
  font-size: 22px;
  color: #fff;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.volume-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-left: 4px;
  margin-right: 4px;
  margin-bottom: 1px;
}

.volume-icon svg {
  width: 14px;
  height: 14px;
  fill: #fff !important;
  color: #fff;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 6px;
  /* Прозрачный фон по умолчанию, JS полностью управляет фоном */
  background: transparent;
  border-radius: 3px;
  outline: none;
  accent-color: #fff;
  vertical-align: middle;
  margin-top: -7px;
  margin-left: 4px;
  margin-bottom: 0;
}

.volume-slider.dynamic-bg {
  background-size: var(--volume-level, 100%) 100%;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0px;
  height: 0px;
}

.volume-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: transparent;
}

.volume-slider::-moz-range-thumb {
  width: 0px;
  height: 0px;
}

/* Vinyl record spinner */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
}

.volume-slider::-moz-range-thumb {
  width: 0;
  height: 0;
}

/* Firefox: прогресс-блок и трек */
.volume-slider::-moz-range-progress {
  background: #fff;
  height: 6px;
  border-radius: 3px;
}

@media (max-width: 768px) {
  .volume-container {
    display: none;
  }
  .controls {
    position: static;
    justify-content: flex-end;
    gap: 12px;
    width: auto;
  }
  .play-button {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
  .cover {
    width: 50px;
    height: 50px;
  }
  .title {
    font-size: 14px;
  }
  .artist {
    font-size: 11px;
  }
  .station-label {
    font-size: 10px;
    margin-bottom: 2px;
  }
  .volume-icon {
    display: none !important;
  }
  .now-playing {
    max-width: calc(100% - 100px); /* account for play button and padding */
  }
}
/* Cover image spinner */
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  animation: spin 5s linear infinite paused;
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.cover img.playing {
  animation-play-state: running;
}