/* ============================================
   MELODY LIMNOS — Sticky Player Bar (bottom)
   ============================================ */

.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: var(--player-h);
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 -4px 30px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  gap: 1.2rem;
}

/* Station identity */
.player-station {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.player-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  background: white;
  padding: 2px;
  box-shadow: 0 0 0 2px rgba(204,26,26,0.4);
  flex-shrink: 0;
}

.player-station-text {
  min-width: 0;
}

.player-station-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.player-station-freq {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* Divider */
.player-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* Play/Pause button */
.player-btn-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
}

.player-btn-play:hover {
  background: var(--red-light);
  transform: scale(1.07);
  box-shadow: 0 0 0 6px rgba(204,26,26,0.22);
}

.player-btn-play:active { transform: scale(0.95); }

.player-btn-play svg {
  width: 20px;
  height: 20px;
  fill: white;
  flex-shrink: 0;
}

.player-btn-play .icon-pause { display: none; }
.player-btn-play.playing .icon-play  { display: none; }
.player-btn-play.playing .icon-pause { display: block; }

/* Track / now playing */
.player-track {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-track-label {
  font-size: 0.65rem;
  color: var(--red-light);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player-track-name {
  font-size: 0.875rem;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Waveform animation */
.player-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.25;
  transition: opacity 0.4s;
}

.player-wave.active { opacity: 1; }

.player-wave .wb {
  width: 3px;
  background: var(--red-light);
  border-radius: 2px;
  animation: wbar var(--ws) ease-in-out infinite alternate;
}

@keyframes wbar {
  from { height: 3px; opacity: 0.5; }
  to   { height: var(--wh); opacity: 1; }
}

/* Status */
.player-status {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
  white-space: nowrap;
  transition: color 0.3s;
}

.player-status.on  { color: #4cdf90; }
.player-status.err { color: #f07070; }

/* Volume */
.player-volume {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.player-vol-icon {
  font-size: 14px;
  color: rgba(255,255,255,0.3);
  user-select: none;
}

.player-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.player-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  transition: background 0.2s;
}

.player-vol-slider::-webkit-slider-thumb:hover { background: var(--red-light); }

.player-vol-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: none;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
}

/* Vinyl spin indicator */
.player-vinyl {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, #2a2a2a 28%, #111 50%, #1e1e1e 52%, #0a0a0a 100%);
  border: 2px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: vinyl-spin 4s linear infinite;
  animation-play-state: paused;
}

.player-vinyl.playing { animation-play-state: running; }

.player-vinyl::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--navy);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
}

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── RESPONSIVE ─── */

/* Hide less critical elements on smaller screens */
@media (max-width: 900px) {
  .player-volume { display: none; }
  .player-station-text { display: none; }
  .player-divider:first-of-type { display: none; }
}

@media (max-width: 600px) {
  .player-bar {
    height: var(--player-h-mob);
    padding: 0 1rem;
    gap: 0.8rem;
  }
  .player-vinyl { display: none; }
  .player-status { display: none; }
  .player-wave { gap: 1.5px; }
  .player-btn-play { width: 40px; height: 40px; }
  .player-btn-play svg { width: 17px; height: 17px; }
}

@media (max-width: 380px) {
  .player-track-label { display: none; }
  .player-wave { display: none; }
  .player-logo { width: 34px; height: 34px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .player-vinyl { animation: none !important; }
  .player-wave .wb { animation: none !important; height: 8px !important; }
}
