/* ==========================================================
   MiYouTube Music - Reproductor Persistente (Bottom Player)
   & Drawer Expandido (A continuación, Letras, Relacionados)
   ========================================================== */

.bottom-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  background: var(--bg-player);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 500;
}

/* Barra de Progreso Superior en el Reproductor */
.player-progress-bar-container {
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: height 0.15s ease;
}

.player-progress-bar-container:hover {
  height: 6px;
  top: -4px;
}

.player-progress-filled {
  height: 100%;
  width: 0%;
  background: var(--ytm-red);
  position: relative;
  transition: width 0.1s linear;
}

.player-progress-scrubber {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

.player-progress-bar-container:hover .player-progress-scrubber {
  transform: translateY(-50%) scale(1);
}

/* Sección Izquierda: Información de la Pista */
.player-left {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 30%;
  min-width: 220px;
}

.player-thumb-wrap {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #111;
  cursor: pointer;
}

.player-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-track-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.player-title:hover {
  text-decoration: underline;
}

.player-artist {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.player-artist:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.player-like-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.player-like-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.player-like-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.player-like-btn.active-like {
  color: var(--ytm-red);
}

.player-like-btn.active-dislike {
  color: #888888;
}

/* Sección Central: Controles de Reproducción */
.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 40%;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.control-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.control-btn:hover {
  color: var(--text-primary);
}

.control-btn.active {
  color: var(--ytm-red);
  position: relative;
}

.control-btn.active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ytm-red);
}

.play-pause-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #030303;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.play-pause-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

.play-pause-btn svg {
  fill: #030303;
  width: 22px;
  height: 22px;
}

.player-time-display {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* Sección Derecha: Volumen y Vistas */
.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 30%;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 88px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  cursor: pointer;
}

/* Drawer Expandido (Cola de Reproducción & Letras) */
.player-drawer {
  position: fixed;
  inset: 0;
  bottom: var(--player-height);
  background: #0D0D0D;
  z-index: 450;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpDrawer 0.3s cubic-bezier(0.2, 0, 0, 1) forwards;
}

.player-drawer.active {
  display: flex;
}

@keyframes slideUpDrawer {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.drawer-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-tabs {
  display: flex;
  gap: 24px;
}

.drawer-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 0;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.drawer-tab-btn:hover {
  color: var(--text-primary);
}

.drawer-tab-btn.active {
  color: var(--text-primary);
  font-weight: 600;
}

.drawer-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #FFFFFF;
  border-radius: 2px;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 6px;
  border-radius: 50%;
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.drawer-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Vista Dividida: Carátula Grande + Cola / Letras */
.drawer-left-art {
  width: 45%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: radial-gradient(circle at center, rgba(255, 0, 0, 0.08), transparent 70%);
}

.drawer-big-cover {
  width: min(360px, 75%);
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}

.drawer-info-block {
  text-align: center;
  margin-top: 24px;
}

.drawer-info-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.drawer-info-artist {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

.drawer-right-panel {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  border-left: 1px solid var(--border-subtle);
}

/* Cola de Reproducción (Queue) */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.queue-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.queue-item.current-playing {
  background: rgba(255, 0, 0, 0.15);
  border-left: 3px solid var(--ytm-red);
}

.queue-item-thumb {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
}

.queue-item-info {
  flex: 1;
  min-width: 0;
}

.queue-item-title {
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-artist {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.queue-item-duration {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Letras de Canción (Lyrics) */
.lyrics-view {
  font-size: 1.4rem;
  line-height: 2.2;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 0;
}

.lyrics-line.active {
  color: #FFFFFF;
  transform: scale(1.02);
}
