/* ── PLAYER PAGE CSS ──────────────────────────────── */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* NAVBAR */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  width: 100%;
  min-width: 0;
}
.nav-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav-logo { font-size: 24px; }
.nav-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  letter-spacing: 2px;
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 0;
  white-space: nowrap;
}
.nav-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.listeners-count {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* MAIN LAYOUT */
.main-layout {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  width: 100%;
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 24px 60px;
}

/* PLAYER PANEL */
.player-panel {
  display: flex; flex-direction: column; align-items: center;
  gap: 28px; padding: 40px 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  width: 100%;
  min-width: 0;
}

/* Album Art Container */
.album-art-container {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%;
  margin: 0 auto;
}
.album-art-lg {
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 3px solid var(--border-accent);
  box-shadow: var(--shadow-glow), 0 20px 60px rgba(0,0,0,0.5);
  transition: all 0.5s var(--ease);
  overflow: hidden;
}
.album-art-lg.rotating {
  animation: spinAlbum 20s linear infinite;
}
@keyframes spinAlbum {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.vinyl-ring {
  position: absolute;
  width: 290px; height: 290px;
  border-radius: 50%;
  border: 2px solid rgba(255,107,53,0.2);
  box-shadow:
    0 0 0 8px rgba(255,107,53,0.05),
    0 0 0 16px rgba(255,107,53,0.03),
    0 0 0 24px rgba(255,107,53,0.015);
  pointer-events: none;
  transition: opacity 0.5s;
}
.vinyl-ring.active { opacity: 1; }

/* Song Now Playing Info */
.song-now-playing { text-align: center; width: 100%; }
.track-title {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 700;
  letter-spacing: 1px;
  margin-top: 6px;
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.track-artist {
  font-size: 16px; font-weight: 500;
  color: var(--text-secondary); margin-top: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.track-album {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Player Controls */
.player-controls { width: 100%; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.controls-row { display: flex; align-items: center; gap: 12px; }
.volume-row { display: flex; align-items: center; gap: 10px; opacity: 0.8; }

/* SIDE PANEL */
.side-panel { display: flex; flex-direction: column; gap: 18px; width: 100%; min-width: 0; }
.side-card {
  border-radius: var(--radius-xl);
  padding: 20px;
  width: 100%;
  min-width: 0;
}
.song-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 260px; overflow-y: auto;
}

.song-item {
  width: 100%;
  min-width: 0;
}

/* Empty state */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 30px 0;
  color: var(--text-muted); font-size: 13px; text-align: center;
}
.empty-state span { font-size: 28px; }

/* Active song row highlight */
.song-item.now-playing .song-title {
  color: var(--primary);
}
.song-item.now-playing .song-thumb {
  border-color: var(--border-accent);
}

.song-item.commercial-slot {
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.song-item.commercial-slot .song-title {
  color: #fbbf24;
}

.song-item.requested-slot {
  border: 1px solid rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.09);
}

.song-item.requested-slot .song-title {
  color: #c4b5fd;
}

.queue-badge {
  margin-top: 2px;
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.queue-badge.requested-badge {
  color: #a78bfa;
}

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 860px) {
  .navbar {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-brand { gap: 8px; }
  .nav-title { font-size: 18px; letter-spacing: 1px; }
  .tag-decade { display: none; }

  .nav-right {
    width: 100%;
    justify-content: space-between;
    min-width: 0;
  }

  .main-layout {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 14px auto;
    padding: 0 12px 28px;
  }

  .player-panel {
    padding: 20px 14px;
    gap: 18px;
    border-radius: var(--radius-lg);
  }

  .album-art-lg { width: 186px; height: 186px; }
  .vinyl-ring { width: 214px; height: 214px; }

  .track-title { font-size: 24px; }
  .track-artist { font-size: 14px; }
  .volume-slider { width: 140px; }

  .song-now-playing {
    min-width: 0;
  }

  .song-now-playing .flex.items-center {
    justify-content: center;
    flex-wrap: wrap;
  }

  .side-panel { display: flex; gap: 12px; }
  .side-card {
    padding: 14px;
    border-radius: var(--radius-lg);
  }
  .song-list { max-height: 210px; }
}

@media (max-width: 520px) {
  .navbar { padding: 10px 12px; }
  .nav-title { font-size: 16px; }
  .nav-logo { font-size: 20px; }
  .nav-right { gap: 8px; }

  .album-art-lg { width: 154px; height: 154px; }
  .vinyl-ring { width: 178px; height: 178px; }

  .track-title {
    font-size: 20px;
    letter-spacing: 0.4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .track-artist {
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .track-album {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .play-btn-lg {
    width: 62px;
    height: 62px;
    font-size: 22px;
  }

  .song-item { padding: 8px 10px; gap: 10px; }
  .song-thumb { width: 38px; height: 38px; font-size: 16px; }
}

/* ── BOTÓN PROGRAMAR CANCIÓN ────────────────────────── */
.request-row {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.request-btn {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.3px;
}
.request-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.request-btn:active { transform: translateY(0); }

/* ── MODAL OVERLAY ──────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.modal-open {
  opacity: 1; pointer-events: auto;
}

.modal-box {
  width: 100%; max-width: 420px;
  border-radius: 20px;
  padding: 28px 28px 24px;
  display: flex; flex-direction: column; gap: 0;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.25s;
}
.modal-overlay.modal-open .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.modal-title {
  font-size: 18px; font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 8px;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--surface-hover, rgba(255,255,255,0.08)); }

.modal-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.modal-desc-sm { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; text-align: center; }

.modal-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.modal-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.modal-input {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.modal-input:focus { border-color: #7c3aed; }
.modal-input-code { text-align: center; font-size: 20px; letter-spacing: 6px; font-weight: 700; }

.modal-error {
  min-height: 18px;
  font-size: 12px;
  color: #f87171;
  margin-bottom: 10px;
}

.modal-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  border: none; border-radius: 12px;
  padding: 12px;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}
.modal-btn-primary:hover { opacity: 0.88; }
.modal-btn-primary:disabled,
.modal-btn-disabled { opacity: 0.45; cursor: not-allowed; }

/* Código de verificación */
.code-display {
  background: rgba(124,58,237,0.15);
  border: 2px solid rgba(124,58,237,0.4);
  border-radius: 14px;
  text-align: center;
  padding: 18px 10px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 10px;
  color: #a78bfa;
  font-family: monospace;
  margin-bottom: 14px;
  user-select: all;
}

/* Resultados de búsqueda */
.search-results {
  max-height: 210px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(124,58,237,0.1); }
.search-result-item.selected {
  background: rgba(124,58,237,0.22);
  border-color: rgba(124,58,237,0.4);
}
.search-result-thumb {
  width: 36px; height: 36px; border-radius: 6px;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0; overflow: hidden;
}
.search-result-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.search-result-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-result-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-artist { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* Éxito */
.success-icon { font-size: 48px; text-align: center; margin-bottom: 12px; }
.success-title { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 10px; }

/* Modal step hidden */
.modal-step-hidden { display: none; }

.modal-step { display: flex; flex-direction: column; }

/* ── LIKE BUTTON ──────────────────────────────────── */
.like-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 6px 16px;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.like-btn:hover {
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  transform: scale(1.05);
}
.like-btn.liked {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
}
.like-btn.liked .like-icon {
  animation: likePopIn 0.3s ease;
}
.like-icon {
  font-size: 20px;
  line-height: 1;
}
.like-count {
  font-size: 13px;
  font-weight: 600;
  min-width: 14px;
}

@keyframes likePopIn {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

@media (max-width: 480px) {
  .modal-box { padding: 22px 18px 20px; }
  .code-display { font-size: 28px; letter-spacing: 7px; }
  .like-btn { font-size: 16px; padding: 5px 12px; }
}

/* ── BANNER SLIDESHOW ──────────────────────────────── */
.banner-slideshow {
  position: relative;
  z-index: 50;
  width: 100%;
  height: 90px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
}

.banner-slideshow a,
.banner-slideshow .banner-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.banner-slideshow a.banner-active,
.banner-slideshow .banner-slide.banner-active {
  opacity: 1;
  pointer-events: auto;
}

/* Sizer oculto — ya no se necesita con altura fija */
.banner-slideshow .banner-sizer {
  display: none;
}

.banner-slideshow img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

@media (max-width: 768px) {
  .banner-slideshow {
    height: auto;
    max-height: none;
  }
  .banner-slideshow .banner-sizer {
    display: block;
    width: 100%;
    height: auto;
    visibility: hidden;
  }
  .banner-slideshow img {
    width: 100%;
    max-height: none;
    object-fit: cover;
  }
}
}
