/* ═══════════════════════════════════════════════════════════
   RETRO FM — PLAYER PAGE (rediseño 2026-07)
   Inspirado en: Apple Music (fondo ambiental por portada),
   Spotify (filas de cola, jerarquía), TuneIn/iHeart (EN VIVO + oyentes).
   Carga después de style.css y solo en la página pública.
   Contrato JS intacto: mismos IDs/clases que consume player.js.
   ═══════════════════════════════════════════════════════════ */

.player-page {
  --pp-bg: #0b0b0b;
  --pp-surface: rgba(255, 255, 255, 0.045);
  --pp-surface-2: rgba(255, 255, 255, 0.08);
  --pp-border: rgba(255, 255, 255, 0.09);
  --pp-text: #f7f4f0;
  --pp-text-2: rgba(247, 244, 240, 0.62);
  --pp-text-3: rgba(247, 244, 240, 0.38);
  --pp-accent: #d7191f;
  --pp-accent-2: #ff7a00;
  --pp-grad: linear-gradient(135deg, #d7191f 0%, #ff7a00 65%, #ff9a2e 100%);
  --pp-live: #ff3b30;
  --pp-radius: 22px;
  --pp-ease: cubic-bezier(0.4, 0, 0.2, 1);

  background: var(--pp-bg);
  color: var(--pp-text);
  min-height: 100vh;
}

/* ─── FONDO AMBIENTAL (portada difuminada) ─────────────────── */
.bg-art { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--pp-bg); }
.bg-art-layer {
  position: absolute; inset: -12%;
  background-size: cover; background-position: center;
  filter: blur(90px) saturate(1.45) brightness(0.9);
  transform: scale(1.15);
  opacity: 0;
  transition: opacity 1.4s ease;
}
.bg-art-layer.visible { opacity: 0.5; }
.bg-art:not(.has-art) .bg-art-layer { opacity: 0; }
/* fallback sin portada: glow de marca sutil */
.bg-art:not(.has-art)::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 46% at 22% -10%, rgba(215, 25, 31, 0.16), transparent 65%),
    radial-gradient(ellipse 60% 42% at 85% 108%, rgba(255, 122, 0, 0.10), transparent 65%);
}
.bg-vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 11, 11, 0.55) 0%, rgba(11, 11, 11, 0.28) 22%, rgba(11, 11, 11, 0.5) 68%, rgba(11, 11, 11, 0.88) 100%),
    radial-gradient(ellipse 120% 90% at 50% 42%, transparent 40%, rgba(11, 11, 11, 0.55) 100%);
}

.player-page .navbar,
.player-page .banner-wrap,
.player-page .main-layout { position: relative; z-index: 1; }

/* ─── NAVBAR ────────────────────────────────────────────────── */
.player-page .navbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 28px;
  background: transparent;
  border: 0;
}
.player-page .nav-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-page .nav-logo {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--pp-grad);
  color: #fff;
  box-shadow: 0 4px 18px rgba(255, 80, 90, 0.35);
}
.player-page .nav-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: 2.5px; line-height: 1;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0.75));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tag-decades {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--pp-text-3);
  border: 1px solid var(--pp-border);
  border-radius: 999px; padding: 5px 12px;
  white-space: nowrap;
}
.player-page .nav-right { display: flex; align-items: center; gap: 10px; }

.listeners-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--pp-text-2);
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: 999px; padding: 7px 14px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
}
.listeners-pill svg { opacity: 0.7; flex: none; }

.player-page .tag-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 1.5px;
  color: #fff;
  background: rgba(255, 59, 48, 0.16);
  border: 1px solid rgba(255, 59, 48, 0.45);
  border-radius: 999px; padding: 7px 14px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pp-live);
  box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.6);
  animation: livePulse 1.8s infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* ─── BANNER PUBLICITARIO ──────────────────────────────────── */
.banner-wrap { max-width: 1180px; margin: 4px auto 0; padding: 0 20px; }
.player-page .banner-slideshow {
  position: relative;
  display: block;
  width: 100%; height: 96px;
  overflow: hidden;
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: 16px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.player-page .banner-sizer { display: none; }
.player-page .banner-slideshow a,
.player-page .banner-slideshow .banner-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.8s ease;
  pointer-events: none;
}
.player-page .banner-slideshow a.banner-active,
.player-page .banner-slideshow .banner-slide.banner-active { opacity: 1; pointer-events: auto; }
.player-page .banner-slideshow img { max-height: 100%; max-width: 100%; object-fit: contain; }

/* ─── LAYOUT PRINCIPAL ─────────────────────────────────────── */
.player-page .main-layout {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 22px;
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 0 20px 52px;
  align-items: start;
}

/* ─── PANEL DEL REPRODUCTOR ────────────────────────────────── */
.player-page .player-panel {
  display: flex; flex-direction: column; align-items: center;
  gap: 26px;
  padding: 46px 38px 38px;
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: 28px;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

/* Portada + vinilo */
.player-page .album-art-container {
  position: relative;
  width: 280px; height: 280px;
  margin-right: 56px; /* espacio para el vinilo que asoma */
}
.player-page .album-art {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, #17171d, #101015);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
}
.player-page .album-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-page .art-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.18);
}

/* Disco de vinilo asomando detrás de la portada */
.player-page .vinyl-ring {
  position: absolute; z-index: 1;
  top: 50%; right: -56px;
  width: 252px; height: 252px;
  margin-top: -126px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      #26262c 0 11%,
      #d7191f 11% 13.5%,
      #b8237a 13.5% 24%,
      #101013 24% 26%,
      transparent 26%),
    repeating-radial-gradient(circle at center, #0c0c10 0 3px, #16161b 3px 6px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.6);
}
.player-page .vinyl-ring::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #0b0b0b;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.player-page .album-art-lg.rotating + .vinyl-ring { animation: vinylSpin 3.6s linear infinite; }
@keyframes vinylSpin { to { transform: rotate(360deg); } }
/* la portada ya no gira (era circular en el diseño anterior) */
.player-page .album-art-lg.rotating { animation: none; }

/* Info de la canción */
.player-page .song-now-playing { text-align: center; width: 100%; min-width: 0; }
.now-playing-label {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--pp-text-3);
  margin-bottom: 10px;
}
.player-page .equalizer { display: flex; align-items: flex-end; gap: 2.5px; height: 14px; }
.player-page .eq-bar {
  width: 3px; border-radius: 2px;
  background: var(--pp-grad);
  animation: eqBounce 0.9s ease-in-out infinite;
}
.player-page .eq-bar:nth-child(1) { animation-delay: 0s; }
.player-page .eq-bar:nth-child(2) { animation-delay: 0.18s; }
.player-page .eq-bar:nth-child(3) { animation-delay: 0.36s; }
.player-page .eq-bar:nth-child(4) { animation-delay: 0.12s; }
.player-page .eq-bar:nth-child(5) { animation-delay: 0.28s; }
@keyframes eqBounce { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.player-page .equalizer.paused .eq-bar { animation-play-state: paused; height: 4px; }

.player-page .track-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px; line-height: 1.04; letter-spacing: 1px;
  color: var(--pp-text);
  margin: 0 0 6px;
  white-space: nowrap; display: inline-block; will-change: transform;
}
.tt-scroll { overflow: hidden; text-align: center; max-width: 100%; }
.tt-scroll.tt-on { text-align: left; }
.player-page .track-title.tt-anim { animation: ttscroll var(--tt-dur,12s) ease-in-out infinite; }
@keyframes ttscroll { 0%,12%{transform:translateX(0);} 50%{transform:translateX(var(--tt-shift,0));} 88%,100%{transform:translateX(0);} }
.player-page .track-artist {
  font-size: 17px; font-weight: 600;
  color: var(--pp-text-2);
  margin: 0 0 3px;
  white-space: nowrap; display: inline-block; will-change: transform;
}
.player-page .track-album {
  font-size: 12.5px; color: var(--pp-text-3);
  margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Like */
.player-page .like-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px;
  font-size: 14px; font-weight: 600;
  color: var(--pp-text-2);
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.25s var(--pp-ease);
}
.player-page .like-btn:hover { background: var(--pp-surface-2); color: var(--pp-text); transform: translateY(-1px); }
.player-page .like-icon { font-size: 16px; line-height: 1; }
.player-page .like-btn.liked {
  color: #fff;
  border-color: rgba(255, 122, 0, 0.55);
  background: rgba(255, 122, 0, 0.16);
}
.player-page .like-btn.liked .like-icon { color: var(--pp-accent-2); }
.player-page .like-count { font-size: 13px; color: inherit; }

/* Controles */
.player-page .player-controls { width: 100%; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.player-page .controls-row { display: flex; align-items: center; gap: 16px; }

.player-page .play-btn-lg {
  width: 76px; height: 76px;
  border-radius: 50%;
  border: 0;
  background: var(--pp-grad);
  color: #fff;
  font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  padding-left: 5px; /* centrado óptico del ▶ */
  cursor: pointer;
  box-shadow: 0 10px 34px rgba(255, 80, 90, 0.4);
  transition: transform 0.22s var(--pp-ease), box-shadow 0.22s var(--pp-ease);
}
.player-page .play-btn-lg:hover { transform: scale(1.06); box-shadow: 0 14px 44px rgba(255, 80, 90, 0.5); }
.player-page .play-btn-lg:active { transform: scale(0.97); }
.player-page .play-btn-lg.playing { padding-left: 0; }

.player-page .mute-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  color: var(--pp-text-2);
  cursor: pointer;
  transition: all 0.22s var(--pp-ease);
}
.player-page .mute-btn:hover { background: var(--pp-surface-2); }
.player-page .mute-btn.active { border-color: rgba(255, 59, 48, 0.5); background: rgba(255, 59, 48, 0.12); }

.player-page .volume-row { display: flex; align-items: center; gap: 10px; color: var(--pp-text-3); }
.vol-icon { flex: none; opacity: 0.75; }
.player-page .volume-slider {
  -webkit-appearance: none; appearance: none;
  width: 190px; height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
}
.player-page .volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}
.player-page .volume-slider::-webkit-slider-thumb:hover { transform: scale(1.25); }
.player-page .volume-slider::-moz-range-thumb {
  width: 14px; height: 14px; border: 0; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* CTA Programar canción */
.player-page .request-row { width: 100%; display: flex; justify-content: center; margin-top: 4px; }
.player-page .request-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700;
  color: #fff;
  background: rgba(37, 211, 102, 0.14);
  border: 1px solid rgba(37, 211, 102, 0.45);
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
  transition: all 0.25s var(--pp-ease);
}
.player-page .request-btn svg { color: #25d366; flex: none; }
.player-page .request-btn:hover {
  background: rgba(37, 211, 102, 0.22);
  border-color: rgba(37, 211, 102, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.22);
}

/* ─── PANEL LATERAL: COLA + HISTORIAL ──────────────────────── */
.player-page .side-panel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.player-page .side-card {
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  padding: 18px;
}
.side-card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.player-page .section-title {
  font-size: 12px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--pp-text-2);
  margin: 0;
}
.queue-count {
  font-size: 11px; font-weight: 600;
  color: var(--pp-text-3);
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.queue-count:empty { display: none; }

.player-page .song-list {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 384px;
  overflow-y: auto;
  margin: 0 -6px; padding: 0 6px;
}

.player-page .song-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  transition: background 0.18s ease;
  min-width: 0;
}
.player-page .song-item:hover { background: var(--pp-surface-2); }

.player-page .song-thumb {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.player-page .song-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.player-page .song-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.player-page .song-title {
  font-size: 13.5px; font-weight: 600; color: var(--pp-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-page .song-artist {
  font-size: 12px; color: var(--pp-text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-page .song-duration {
  flex: none;
  font-size: 11.5px; color: var(--pp-text-3);
  font-variant-numeric: tabular-nums;
}
.player-page .song-meta-right {
  flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.player-page .song-eta {
  font-size: 10px; color: var(--pp-text-3); opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

/* Fila activa (sonando ahora) */
.player-page .song-item.now-playing,
.player-page .song-item.active {
  position: relative;
  background: linear-gradient(90deg, rgba(215, 25, 31, 0.14), rgba(255, 122, 0, 0.07));
  border: 1px solid rgba(215, 25, 31, 0.28);
}
.player-page .song-item.now-playing .song-title,
.player-page .song-item.active .song-title { color: var(--pp-accent); }

/* Comerciales y solicitadas */
.player-page .song-item.commercial-slot { opacity: 0.75; }
.player-page .queue-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--pp-text-3);
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: 999px;
  padding: 2px 8px;
  margin-top: 3px;
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-page .queue-badge.requested-badge {
  color: #7be0a3;
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.35);
}

/* Empty state */
.player-page .empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 26px 12px;
  text-align: center;
  color: var(--pp-text-3);
  font-size: 13px;
}
.player-page .empty-state span { font-size: 26px; opacity: 0.6; }
.player-page .empty-state p { margin: 0; line-height: 1.5; }

/* ─── MODAL ────────────────────────────────────────────────── */
.player-page .modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(5, 5, 9, 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.player-page .modal-overlay.modal-open { opacity: 1; visibility: visible; }

.player-page .modal-box {
  width: 100%; max-width: 430px;
  max-height: min(86vh, 640px);
  overflow-y: auto;
  background: rgba(22, 22, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.28s var(--pp-ease);
}
.player-page .modal-overlay.modal-open .modal-box { transform: translateY(0) scale(1); }

.player-page .modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.player-page .modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: 1.2px;
  margin: 0;
  background: var(--pp-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.player-page .modal-close {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--pp-border);
  background: var(--pp-surface);
  color: var(--pp-text-2);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.player-page .modal-close:hover { background: var(--pp-surface-2); color: var(--pp-text); }

/* FIX BUG: los pasos ocultos deben ganar la cascada */
.player-page .modal-step { display: flex; flex-direction: column; }
.player-page .modal-step.modal-step-hidden { display: none !important; }

.player-page .modal-desc { font-size: 13.5px; color: var(--pp-text-2); line-height: 1.55; margin: 0 0 16px; }
.player-page .modal-desc strong { color: var(--pp-text); }
.player-page .modal-desc-sm { font-size: 12px; color: var(--pp-text-3); text-align: center; margin: 0 0 8px; }

.player-page .modal-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.player-page .modal-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--pp-text-3);
}
.player-page .modal-input {
  width: 100%;
  font-family: inherit; font-size: 15px;
  color: var(--pp-text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--pp-border);
  border-radius: 13px;
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.player-page .modal-input::placeholder { color: var(--pp-text-3); }
.player-page .modal-input:focus {
  border-color: rgba(215, 25, 31, 0.6);
  box-shadow: 0 0 0 3px rgba(215, 25, 31, 0.14);
}
.player-page .modal-input-code {
  text-align: center;
  font-size: 24px; font-weight: 700; letter-spacing: 9px;
  font-variant-numeric: tabular-nums;
}

.player-page .modal-error { font-size: 12.5px; color: #ff6b6b; min-height: 16px; margin-bottom: 8px; }
.player-page .modal-error:empty { margin-bottom: 4px; }

.player-page .modal-btn-primary {
  width: 100%;
  border: 0; border-radius: 999px;
  padding: 14px 18px;
  font-family: inherit; font-size: 14.5px; font-weight: 700;
  color: #fff;
  background: var(--pp-grad);
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(255, 80, 90, 0.3);
  transition: transform 0.2s var(--pp-ease), box-shadow 0.2s var(--pp-ease), opacity 0.2s ease;
}
.player-page .modal-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(255, 80, 90, 0.4); }
.player-page .modal-btn-primary.modal-btn-disabled,
.player-page .modal-btn-primary:disabled {
  opacity: 0.4; cursor: not-allowed;
  transform: none; box-shadow: none;
}

/* Resultados de búsqueda */
.player-page .search-results {
  display: flex; flex-direction: column; gap: 3px;
  max-height: 250px; overflow-y: auto;
  margin: 2px 0 12px;
}
.player-page .search-result-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
}
.player-page .search-result-item:hover { background: var(--pp-surface-2); }
.player-page .search-result-item.selected {
  background: linear-gradient(90deg, rgba(215, 25, 31, 0.16), rgba(255, 122, 0, 0.08));
  border-color: rgba(215, 25, 31, 0.45);
}
.player-page .search-result-thumb {
  flex: none; width: 40px; height: 40px;
  border-radius: 8px; overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.player-page .search-result-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-page .search-result-info { display: flex; flex-direction: column; min-width: 0; }
.player-page .search-result-title {
  font-size: 13.5px; font-weight: 600; color: var(--pp-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-page .search-result-artist {
  font-size: 12px; color: var(--pp-text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-page .search-empty {
  padding: 18px 10px; text-align: center;
  font-size: 13px; color: var(--pp-text-3);
}

/* Éxito */
.player-page .success-icon { font-size: 44px; text-align: center; margin: 6px 0 10px; }
.player-page .success-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px; letter-spacing: 1px; text-align: center;
  margin: 0 0 8px; color: var(--pp-text);
}
.player-page #stepSuccess .modal-desc { text-align: center; }

/* ─── TOASTS ───────────────────────────────────────────────── */
.player-page .toast-container {
  position: fixed; z-index: 300;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
  width: max-content; max-width: calc(100vw - 32px);
}
.player-page .toast {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 600;
  color: var(--pp-text);
  background: rgba(24, 24, 30, 0.92);
  border: 1px solid var(--pp-border);
  border-radius: 999px;
  padding: 11px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: toastIn 0.3s var(--pp-ease);
  max-width: 100%;
}
.player-page .toast.success { border-color: rgba(37, 211, 102, 0.4); }
.player-page .toast.error { border-color: rgba(255, 90, 90, 0.45); }
.player-page .toast.removing { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ─── SCROLLBARS FINOS ─────────────────────────────────────── */
.player-page .song-list::-webkit-scrollbar,
.player-page .search-results::-webkit-scrollbar,
.player-page .modal-box::-webkit-scrollbar { width: 5px; }
.player-page .song-list::-webkit-scrollbar-thumb,
.player-page .search-results::-webkit-scrollbar-thumb,
.player-page .modal-box::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 99px; }

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 920px) {
  .player-page .navbar { padding: 13px 16px; }
  .tag-decades { display: none; }

  .player-page .main-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 14px;
    padding: 0 14px 40px;
  }
  .banner-wrap { padding: 0 14px; }
  .player-page .banner-slideshow { height: 76px; border-radius: 13px; }

  .player-page .player-panel { padding: 30px 20px 26px; gap: 20px; border-radius: 24px; }

  .player-page .album-art-container { width: 216px; height: 216px; margin-right: 42px; }
  .player-page .vinyl-ring { width: 194px; height: 194px; margin-top: -97px; right: -42px; }

  .player-page .track-title { font-size: 33px; }
  .player-page .track-artist { font-size: 15px; }
  .player-page .volume-slider { width: 150px; }
  .player-page .song-list { max-height: 300px; }
}

@media (max-width: 520px) {
  .player-page .navbar { padding: 11px 12px; }
  .player-page .nav-title { font-size: 21px; letter-spacing: 1.8px; }
  .player-page .nav-logo { width: 34px; height: 34px; border-radius: 10px; }
  .player-page .nav-logo svg { width: 21px; height: 21px; }
  .listeners-pill { padding: 6px 10px; font-size: 11px; }
  .player-page .tag-live { padding: 6px 10px; font-size: 10.5px; }

  .player-page .album-art-container { width: 178px; height: 178px; margin-right: 34px; }
  .player-page .vinyl-ring { width: 160px; height: 160px; margin-top: -80px; right: -34px; }
  .player-page .album-art { border-radius: 14px; }

  .player-page .track-title { font-size: 27px; }
  .player-page .play-btn-lg { width: 66px; height: 66px; font-size: 23px; }
  .player-page .mute-btn { width: 42px; height: 42px; }
  .player-page .request-btn { width: 100%; justify-content: center; }

  .player-page .song-thumb { width: 40px; height: 40px; }
  .player-page .modal-box { padding: 20px 16px; border-radius: 20px; }
  .player-page .modal-input-code { font-size: 21px; letter-spacing: 7px; }
}

/* ─── BARRA DE PROGRESO ────────────────────────────────────── */
.progress-row {
  display: none;
  align-items: center; gap: 10px;
  width: min(100%, 380px);
  margin: 14px auto 0;
}
.progress-row.progress-visible { display: flex; }
.progress-time {
  font-size: 11px; font-weight: 600;
  color: var(--pp-text-3);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
}
.progress-time:first-child { text-align: right; }
.progress-bar {
  flex: 1; height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  border-radius: 99px;
  background: var(--pp-grad);
  transition: width 1s linear;
}

/* ─── ACCIONES DE LA CANCIÓN (like + compartir) ───────────── */
.song-actions {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 14px;
}
.player-page .song-actions .like-btn { margin-top: 0; }
.share-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600;
  color: var(--pp-text-2);
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.25s var(--pp-ease);
}
.share-btn:hover {
  background: var(--pp-surface-2);
  color: var(--pp-text);
  transform: translateY(-1px);
}
.share-btn svg { flex: none; opacity: 0.85; }

/* ─── ECUALIZADOR EN VIVO (Web Audio) ──────────────────────── */
.player-page .equalizer.eq-live .eq-bar {
  animation: none;
  transition: height 90ms linear;
}

/* ─── TOP DE LA SEMANA ─────────────────────────────────────── */
.top-rank {
  flex: none;
  width: 22px;
  text-align: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  color: var(--pp-text-3);
}
.top-rank-1 { color: #ffd166; }
.top-rank-2 { color: #c9cdd4; }
.top-rank-3 { color: #d69a6b; }
.top-likes {
  flex: none;
  font-size: 11.5px; font-weight: 700;
  color: var(--pp-accent-2);
  background: rgba(255, 122, 0, 0.1);
  border: 1px solid rgba(255, 122, 0, 0.3);
  border-radius: 999px;
  padding: 3px 9px;
  font-variant-numeric: tabular-nums;
}

/* ─── OVERLAY DE BIENVENIDA ────────────────────────────────── */
.welcome-overlay {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(215, 25, 31, 0.14), transparent 65%),
    radial-gradient(ellipse 60% 45% at 85% 100%, rgba(255, 122, 0, 0.1), transparent 65%),
    rgba(6, 6, 10, 0.94);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  opacity: 1;
  transition: opacity 0.5s ease;
}
.welcome-overlay.welcome-hidden { opacity: 0; pointer-events: none; }

.welcome-box {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  max-width: 340px;
}
.welcome-logo {
  display: flex; align-items: center; justify-content: center;
  width: 76px; height: 76px; border-radius: 22px;
  background: var(--pp-grad, linear-gradient(135deg, #d7191f, #ff7a00));
  color: #fff;
  box-shadow: 0 12px 40px rgba(255, 80, 90, 0.4);
  margin-bottom: 18px;
}
.welcome-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 52px; letter-spacing: 4px; line-height: 1;
  margin: 0 0 6px;
  background: linear-gradient(90deg, #d7191f, #ff7a00);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.welcome-sub { font-size: 15px; color: rgba(247, 244, 240, 0.65); margin: 0 0 14px; }
.welcome-sub strong { color: #f7f4f0; }
.welcome-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  color: #fff;
  background: rgba(255, 59, 48, 0.16);
  border: 1px solid rgba(255, 59, 48, 0.45);
  border-radius: 999px; padding: 6px 14px;
  margin-bottom: 30px;
}
.welcome-play {
  width: 96px; height: 96px;
  border-radius: 50%; border: 0;
  background: var(--pp-grad, linear-gradient(135deg, #d7191f, #ff7a00));
  color: #fff; font-size: 34px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  padding-left: 7px;
  cursor: pointer;
  box-shadow: 0 14px 50px rgba(255, 80, 90, 0.45);
  animation: welcomePulse 2.2s ease-in-out infinite;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.welcome-play:hover { transform: scale(1.07); }
.welcome-play:active { transform: scale(0.96); }
@keyframes welcomePulse {
  0%, 100% { box-shadow: 0 14px 50px rgba(255, 80, 90, 0.45), 0 0 0 0 rgba(215, 25, 31, 0.35); }
  50%      { box-shadow: 0 14px 50px rgba(255, 80, 90, 0.45), 0 0 0 22px rgba(215, 25, 31, 0); }
}
.welcome-cta {
  font-size: 15px; font-weight: 700;
  color: #f7f4f0;
  margin: 18px 0 26px;
  letter-spacing: 0.4px;
}
.welcome-skip {
  background: none; border: 0;
  font-size: 13px; font-weight: 600;
  color: rgba(247, 244, 240, 0.4);
  cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
  padding: 6px 10px;
  transition: color 0.2s ease;
}
.welcome-skip:hover { color: rgba(247, 244, 240, 0.75); }

@media (max-width: 520px) {
  .welcome-title { font-size: 42px; }
  .welcome-play { width: 84px; height: 84px; font-size: 30px; }
}

/* ─── ACCESIBILIDAD: menos movimiento ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .player-page .album-art-lg.rotating + .vinyl-ring,
  .player-page .eq-bar,
  .live-dot { animation: none !important; }
  .bg-art-layer { transition: none; }
}

/* quitar recuadro azul de toque en movil */
* { -webkit-tap-highlight-color: transparent; }

/* marquee: permitir que el panel se encoja al viewport (evita overflow por titulo nowrap) */
.player-page .player-panel { min-width: 0; }
.player-page .song-now-playing { min-width: 0; }

/* Ticker: clima + noticias */
.weather-pill {
  display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--pp-text-2);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 99px; padding: 5px 11px;
}
.news-ticker {
  display: flex; align-items: center; gap: 0; background: rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.08); padding: 7px 0; overflow: hidden;
}
.news-ticker-label {
  flex: none; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; color: #ff7a00;
  padding: 0 14px; border-right: 1px solid rgba(255,255,255,0.15); white-space: nowrap;
}
.news-ticker-track { flex: 1; overflow: hidden; white-space: nowrap; position: relative; }
.news-ticker-track span { display: inline-block; padding-left: 14px; font-size: 12.5px; color: var(--pp-text-2); white-space: nowrap; will-change: transform; }

/* Nombre La Conekta en la barra del celular: no cabe junto a clima + oyentes + EN VIVO.
   En pantallas angostas se oculta la pildora de oyentes y se ajusta el titulo. */
@media (max-width: 480px) {
  .player-page .nav-brand { flex-shrink: 0; }
  .player-page .nav-title { font-size: 19px; letter-spacing: 1.2px; }
  .listeners-pill { display: none; }
}

/* Simbolo de La Conekta en barra y bienvenida (ya trae su color: sin cuadro de degradado) */
.player-page .nav-logo { background: none !important; box-shadow: none !important; border-radius: 0 !important; }
.player-page .nav-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.welcome-logo { background: none !important; box-shadow: none !important; width: 96px !important; height: 96px !important; border-radius: 0 !important; }
.welcome-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.welcome-title { letter-spacing: 0 !important; }

/* Barra en celular con el wordmark La Conekta: dejar margen a la derecha para EN VIVO */
@media (max-width: 480px) {
  .player-page .nav-right { gap: 6px; }
  .player-page .nav-title { font-size: 18px; }
  .player-page .tag-live { padding: 6px 9px; }
  .player-page .weather-pill { padding: 5px 9px; }
}


/* Barra "Instala La Conekta" (abajo; por debajo del modal z200 y de la bienvenida z400) */
.install-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 150;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; max-width: 560px; margin: 0 auto;
  background: rgba(20, 20, 28, 0.96); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.install-bar[hidden] { display: none !important; }
.install-ico { width: 40px; height: 40px; flex: none; }
.install-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.install-txt strong { font-family: 'Rajdhani', 'Inter', sans-serif; font-size: 16px; color: #fff; }
.install-txt span { font-size: 12px; color: #b9b9c4; }
.install-btn { flex: none; border: none; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(90deg, #d7191f 0%, #ff7a00 65%, #ff9a2e 100%); cursor: pointer; }
.install-close { flex: none; background: none; border: none; color: #8a8a96; font-size: 16px; cursor: pointer; padding: 4px; }

/* Con la barra de instalar visible, los avisos suben para no taparla */
body.has-install-bar .toast-container { bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }

/* botones con hidden (Instalar app en la app ya instalada) */
.player-page .share-btn[hidden], .install-btn[hidden] { display: none !important; }
.player-page .share-btn { white-space: nowrap; }

/* Pop-up al centro cuando la invitacion a instalar aparece sola (la barra de abajo queda para el boton manual) */
.install-bar.pop {
  top: 50%; bottom: auto; left: 50%; right: auto; transform: translate(-50%, -50%);
  width: min(92vw, 400px); flex-direction: column; text-align: center; gap: 12px; padding: 22px 20px 16px;
  box-shadow: 0 0 0 100vmax rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.6);
}
.install-bar.pop .install-ico { width: 72px; height: 72px; }
.install-bar.pop .install-txt strong { font-size: 22px; }
.install-bar.pop .install-txt span { font-size: 14px; margin-top: 4px; }
.install-bar.pop .install-btn { width: 100%; padding: 13px; font-size: 16px; }
.install-bar.pop .install-close { position: static; font-size: 13px; color: #9a9aa6; }
.install-bar.pop .install-close::before { content: 'Ahora no'; }
.install-bar.pop .install-close { font-size: 0; }
.install-bar.pop .install-close::before { font-size: 13px; }

/* Dedicatorias (2026-10-11): renglon propio y completo, nunca recortado */
.player-page .dedication-line {
  display: block; margin-top: 5px;
  color: #ffc08a; font-size: 13px; font-weight: 600; line-height: 1.35;
  white-space: normal; overflow-wrap: anywhere;
}
.player-page .track-dedication {
  margin: 6px auto 0; max-width: 92%;
  color: #ffc08a; font-size: 15px; font-weight: 600; text-align: center;
  overflow-wrap: anywhere;
}
.player-page .track-dedication[hidden], .player-page .btn-avisar-dedicatoria[hidden] { display: none; }
.player-page .btn-avisar-dedicatoria {
  display: block; margin-top: 14px; text-align: center; text-decoration: none;
  background: linear-gradient(135deg, #25d366, #128c7e);
}

/* Peticiones al locutor (2026-10-11) */
.player-page .aviso-programa {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 122, 0, 0.12); border: 1px solid rgba(255, 122, 0, 0.4);
  color: #ffc08a; font-size: 13px; line-height: 1.4;
}
.player-page .aviso-programa[hidden] { display: none; }

/* Donde la escuchas (2026-10-11) */
.player-page .donde-row { margin-top: 16px; text-align: center; }
.player-page .donde-label { display: block; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--pp-text-3, #8d8d9c); margin-bottom: 8px; }
.player-page .donde-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.player-page .donde-btn {
  padding: 9px 16px; border-radius: 99px; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; font-family: inherit;
}
.player-page .donde-btn:hover, .player-page .donde-btn:focus-visible { border-color: #ff7a00; background: rgba(255,122,0,0.12); outline: none; }
.player-page .donde-tip { margin: 10px auto 0; max-width: 340px; font-size: 13px; line-height: 1.45; color: #c9c9d6; }
.player-page .donde-tip[hidden] { display: none; }
.welcome-box .donde-row { margin: 14px 0 14px; }

/* Herramientas (computadora): mini reproductor, apagar en, avisos (2026-10-11) */
.player-page .tools-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0 4px; }
.player-page .tool-btn {
  padding: 7px 13px; border-radius: 99px; border: 1px solid var(--pp-border, rgba(255,255,255,.14));
  background: var(--pp-surface, rgba(255,255,255,.05)); color: var(--pp-text-2, #c9c9d6);
  font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap;
}
.player-page .tool-btn:hover { border-color: #ff7a00; color: #fff; }
.player-page .tool-btn.activo { border-color: #ff7a00; background: rgba(255,122,0,.15); color: #ffc08a; }
.player-page .tool-btn[hidden] { display: none; }
.player-page .donde-btn[hidden] { display: none; }
.welcome-box .donde-btns { flex-wrap: nowrap; }
.welcome-box .donde-btn { padding: 9px 12px; }
.welcome-box .donde-btn { white-space: nowrap; }

/* Liga personal para programar (2026-10-11): la bienvenida no tapa la ventana de programar */
html.con-liga .welcome-overlay { display: none !important; }
