/* ---- PERSISTENT PLAYER ---- */
:root { --player-height: 72px; --nav-height: 64px; }

/* Top seek bar */
#player-seek-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  z-index: 2;
}
#player-seek-top-fill {
  height: 100%;
  background: var(--red);
  width: 0%;
  pointer-events: none;
  transition: width 0.1s linear;
}
#player-seek-top:hover { height: 5px; top: -2px; }
#player-seek-top:hover #player-seek-top-fill { background: var(--red-bright); }
#player-seek-top-thumb {
  position: absolute;
  top: 50%; left: 0%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px; height: 12px;
  background: white;
  border-radius: 50%;
  transition: transform 0.15s;
  pointer-events: none;
}
#player-seek-top:hover #player-seek-top-thumb { transform: translate(-50%, -50%) scale(1); }

/* ============================================================
   PLAYER — 3-column CSS Grid (YouTube Music style)
   left: prev/play/next | center: cover+info+actions | right: vol+repeat+shuffle+expand
   ============================================================ */

#player {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--player-height);
  background: rgba(10, 10, 12, 0.98);
  backdrop-filter: blur(24px);
  z-index: 850;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateY(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.4s;
}
#player.visible {
  transform: translateY(0);
  visibility: visible;
  pointer-events: all;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0s;
}

/* 3-column grid — exactly 3 children */
.player-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  width: 100%;
  padding: 0 16px;
  flex: 1;
}

/* Seek bar — fuera del grid, posición absoluta */

/* Force desktop grid columns */
.player-mobile-cover,
.player-mobile-info,
.player-mobile-actions,
.player-mobile-progress,
.player-mobile-controls,
.player-mobile-album,
.player-mobile-collapse-btn { display: none; }

/* ---- MINI PLAYER MOBILE (hidden on desktop) ---- */
#player-mini {
  display: none;
}

/* ---- COLUMNA IZQUIERDA: controles ---- */
.player-col-left {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-start;
}

.player-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 18px;
  background: none; border: none; cursor: pointer;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.player-btn:hover  { color: var(--text); background: rgba(255,255,255,0.07); }
.player-btn.active { color: var(--red); }

.player-btn-play {
  width: 40px; height: 40px;
  background: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #0a0a0b; font-size: 16px;
  border: none; cursor: pointer;
  transition: transform 0.15s, background 0.2s;
  flex-shrink: 0;
}
.player-btn-play:hover { transform: scale(1.06); background: #e0e0e0; }
.player-btn-play i     { margin-left: 2px; }

/* ---- COLUMNA CENTRAL: miniatura + info + acciones ---- */
.player-col-center {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.player-cover {
  width: 48px; height: 48px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
}

.player-info {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  max-width: 200px;
}

.player-name {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  margin-bottom: 2px;
}

.player-meta {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  font-size: 13px;
  color: var(--text-dim);
}

.player-artist { flex-shrink: 0; }

.player-plays,
#player-like-count {
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-plays:not(:empty)::before,
#player-like-count:not(:empty)::before { content: ' · '; }

.player-actions {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  margin-left: -4px;
}

.player-action-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-muted); font-size: 16px;
  background: none; border: none; cursor: pointer;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.player-action-btn:hover  { color: var(--text); background: rgba(255,255,255,0.07); }
.player-action-btn.active { color: var(--red); }

/* ---- COLUMNA DERECHA: vol + repeat + shuffle + expand ---- */
.player-col-right {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: flex-end;
}

.vol-bar {
  width: 72px; height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin: 0 4px;
  transition: height 0.15s;
}
.vol-bar:hover { height: 5px; }

.vol-fill {
  height: 100%; width: 70%;
  background: white; border-radius: 2px;
  pointer-events: none;
}

.vol-thumb {
  position: absolute;
  top: 50%; left: 70%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px; height: 12px;
  background: white; border-radius: 50%;
  transition: transform 0.15s;
  pointer-events: none;
}
.vol-bar:hover .vol-thumb { transform: translate(-50%, -50%) scale(1); }

/* Internal progress bar — hidden, used only for seek logic */
.player-progress-wrap,
#progress-bar { display: none !important; }



audio { display: none; }

/* ---- FULLSCREEN VIEW /* ---- FULLSCREEN VIEW ---- */
#player-fullscreen {
  position: fixed;
  top: 0;
  padding-top: var(--nav-height);
  bottom: var(--player-height);
  background: #0a0a0b;
  z-index: 840;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.4s;
  overflow: hidden;
}
#player-fullscreen.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: all;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0s;
}



.fs-tabs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  width: 100%;
}

.fs-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 4px;
}

.fs-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 16px;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--dim);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
}
.fs-tab.active { background: white; color: #0a0a0b; font-weight: 500; }
.fs-tab:not(.active):hover { color: var(--text); }

.fs-inner {
  display: flex;
  flex: 1;
  padding: 32px 60px 120px;
  gap: 40px;
  align-items: flex-start;
  overflow: hidden;
  justify-content: center;
}

/* Video wrap */
.fs-video-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
#fs-no-video {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  padding: 60px 0;
}
#fs-no-video i { font-size: 40px; }
#fs-no-video p { font-size: 14px; }

/* Fullscreen left — 60% */
.fs-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  flex: 0 0 60%;
  max-width: 60%;
}

.fs-cover {
  width: min(585px, 90%);
  height: auto;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  margin: 0 auto;
  display: block;
}

.fs-info { text-align: center; width: 100%; margin-top: 28px; }

.fs-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 6px;
}

.fs-artist { font-size: 14px; color: var(--text-dim); }

.fs-actions {
  display: none;
}

/* Right panel tabs */
.fs-right-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.fs-right-tab {
  padding: 10px 20px;
  font-size: 11px;
  font-family: var(--font-body);
  color: var(--dim);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.fs-right-tab:hover  { color: var(--text); }
.fs-right-tab.active { color: var(--text); border-bottom-color: var(--red); }

/* Lyrics in fullscreen */
.fs-lyrics {
  font-size: 15px;
  line-height: 2;
  color: var(--dim);
  white-space: pre-wrap;
  overflow-y: auto;
  max-height: calc(100vh - 280px);
  padding-right: 8px;
}
.fs-lyrics::-webkit-scrollbar { width: 3px; }
.fs-lyrics::-webkit-scrollbar-thumb { background: var(--red); border-radius: 2px; }

/* Fullscreen right — 40% */
.fs-right {
  flex: 0 0 40%;
  max-width: 40%;
  height: 100%;
  overflow-y: auto;
}

/* fs-progress hidden — player bar stays visible above fullscreen */
.fs-progress { display: none; }

.fs-tracklist-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.fs-tracklist { display: flex; flex-direction: column; }

.fs-track {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.fs-track:hover   { background: rgba(255,255,255,0.05); }
.fs-track.playing { background: rgba(192,57,43,0.12); }

.fs-track-num  { width: 20px; text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.fs-track.playing .fs-track-num { color: var(--red); }
.fs-track-name { flex: 1; font-size: 14px; color: var(--text); }
.fs-track.playing .fs-track-name { color: var(--red); font-weight: 500; }
.fs-track-dur  { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

/* ---- RESPONSIVE ---- */

@media (max-width: 900px) {
  nav,
  nav.scrolled { padding: 16px 20px; }

  .nav-links              { display: none; }
  .nav-burger             { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: #0a0a0b;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 895;
  }
  .nav-links.open a { font-size: 24px; }
  .nav-links.open .nav-menu-close { display: block; }

  .section-header { padding: 0 20px; flex-wrap: wrap; }
  .section-line   { display: none; }
  .about-inner    { flex-direction: column; gap: 32px; padding: 0; }
  #acerca         { padding: 60px 20px; }
  footer          { padding: 40px 20px; }
  .footer-inner   { flex-direction: column; gap: 24px; }
  .footer-socials { flex-wrap: wrap; }

  /* Hero logo smaller on mobile */
  #hero-logo { height: 104px !important; } /* 160px × 0.65 */
  .hero-eyebrow { font-size: 9px !important; letter-spacing: 0.2em; }
  .hero-sub     { font-size: 10px !important; letter-spacing: 0.2em; }
  .hero-quote   { font-size: 13px !important; }
  .hero-scroll span { font-size: 9px !important; }

  .player-mobile-collapse-btn {
    display: flex;
    position: absolute;
    top: 12px;
    right: 16px;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08);
    border: none; border-radius: 50%;
    color: var(--text-dim); font-size: 16px;
    cursor: pointer; z-index: 2;
    transition: all 0.2s;
  }
  .player-mobile-collapse-btn:hover { background: rgba(255,255,255,0.15); color: var(--text); }

  /* ---- MINI PLAYER MOBILE ---- */
  #player-mini {
    display: none; /* shown via .active class */
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: rgba(10,10,12,0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 849;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    cursor: pointer;
  }
  #player-mini.active { display: flex; }

  .mini-cover {
    width: 44px; height: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
  }
  .mini-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }
  .mini-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mini-artist {
    font-size: 11px;
    color: var(--text-dim);
  }
  .mini-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .mini-controls .player-btn { width: 36px; height: 36px; font-size: 18px; }
  .mini-controls .mini-play  { width: 38px; height: 38px; font-size: 15px; }

  /* ---- PLAYER MOBILE ---- */
  #player-seek-top   { display: none; }
  #player-fullscreen { display: none !important; }

  #player {
  top: 0;
  bottom: 0;
  height: auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 20px) 24px 28px;
  gap: 12px;
}

  /* Hide desktop grid */
  #player .player-grid { display: none; }

  /* Show mobile elements */
  #player .player-mobile-collapse-btn {
    display: flex;
    position: absolute;
    top: 12px; right: 16px;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08);
    border: none; border-radius: 50%;
    color: var(--text-dim); font-size: 16px; cursor: pointer;
  }

  #player .player-mobile-cover {
    display: block;
    width: min(320px, 80vw);
    height: min(320px, 80vw);
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  }

  #player .player-mobile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    text-align: center;
  }
  #player .player-mobile-name   { font-size: 17px; font-weight: 600; color: var(--text); }
  #player .player-mobile-artist { font-size: 13px; color: var(--text-dim); }

  #player .player-mobile-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
  }

  #player .player-mobile-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  #player #mobile-progress-bar {
    flex: 1; height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px; cursor: pointer;
    display: block !important;
  }
  #player #mobile-progress-fill {
    height: 100%; background: white;
    border-radius: 2px; width: 0%;
  }
  #player .player-mobile-time { font-size: 11px; color: var(--muted); flex-shrink: 0; }

  #player .player-mobile-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
  }
  #player .player-mobile-controls .player-btn      { font-size: 22px; width: 42px; height: 42px; color: var(--text-dim); }
  #player .player-mobile-controls .player-btn-play { width: 54px; height: 54px; font-size: 20px; }

  #player .player-mobile-album {
    display: block;
    font-size: 11px; color: var(--muted);
    text-align: center; letter-spacing: 0.05em;
    margin-top: 8px;
  }

  /* Fullscreen mobile */
  .fs-inner {
    flex-direction: column;
    padding: 24px 24px 110px;
    gap: 24px;
    overflow-y: auto;
  }
  .fs-left  { flex: 0 0 100%; max-width: 100%; }
  .fs-cover { width: min(260px, 75vw); }
  .fs-right { flex: 0 0 100%; max-width: 100%; height: auto; }
}