/* ==========================================================================
   REPRODUCTOR DE MÚSICA — Ada & Ade
   ========================================================================== */

:root {
  --mp-gold: #e5c158;
  --mp-gold-hover: #f3d070;
  --mp-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

.music-player {
  position: fixed;
  top: 72px;
  right: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Botón toggle */
.mp-toggle {
  width: 44px;
  height: 44px;
  border-radius: 12px 0 0 12px;
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-right: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--mp-gold);
  font-size: 1rem;
  transition: background 0.2s;
}
.mp-toggle:hover { background: #22203a; }

.mp-toggle-icon { display: block; }

.mp-eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}
.mp-eq span {
  width: 3px;
  background: var(--mp-gold);
  border-radius: 2px;
  animation: eq-bar 0.8s ease-in-out infinite alternate;
}
.mp-eq span:nth-child(1) { height: 6px;  animation-delay: 0s;    }
.mp-eq span:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.mp-eq span:nth-child(3) { height: 10px; animation-delay: 0.3s;  }
.mp-eq span:nth-child(4) { height: 16px; animation-delay: 0.45s; }

@keyframes eq-bar {
  from { transform: scaleY(0.3); }
  to   { transform: scaleY(1);   }
}

.music-player.playing .mp-toggle-icon { display: none; }
.music-player.playing .mp-eq          { display: flex; }

/* Panel */
.mp-panel {
  width: 300px;
  background: #121212;
  border: 1px solid rgba(255,255,255,0.08);
  border-right: none;
  border-radius: 16px 0 0 16px;
  padding: 1.2rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
  box-shadow: -8px 8px 40px rgba(0,0,0,0.6);
  margin-top: 6px;
}
.mp-panel.open { display: flex; }

/* Now playing */
.mp-now-playing {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.mp-disc {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
  border: 2px solid var(--mp-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mp-gold);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.music-player.playing .mp-disc { animation: disc-spin 4s linear infinite; }
@keyframes disc-spin { to { transform: rotate(360deg); } }

.mp-info { overflow: hidden; }
.mp-title {
  display: block;
  font-family: var(--mp-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-artist {
  display: block;
  font-family: var(--mp-sans);
  font-size: 0.72rem;
  color: #b3b3b3;
}

/* Progress */
.mp-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mp-time {
  font-size: 0.68rem;
  color: #b3b3b3;
  font-family: var(--mp-sans);
  min-width: 28px;
}
.mp-progress-bar {
  flex: 1;
  height: 4px;
  background: #333;
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: height 0.15s;
}
.mp-progress-bar:hover { height: 6px; }
.mp-progress-fill {
  height: 100%;
  background: var(--mp-gold);
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s linear;
}
.mp-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.mp-progress-bar:hover .mp-progress-thumb { opacity: 1; }

/* Controls */
.mp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}
.mp-btn {
  background: none;
  border: none;
  color: #b3b3b3;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.1s;
  padding: 0.3rem;
}
.mp-btn:hover { color: #fff; transform: scale(1.1); }
.mp-btn-play {
  width: 40px;
  height: 40px;
  background: var(--mp-gold);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.mp-btn-play:hover { background: var(--mp-gold-hover); color: #000; transform: scale(1.06); }

/* Playlist */
.mp-playlist {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.mp-track {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.mp-track:hover { background: rgba(255,255,255,0.06); }
.mp-track.active { background: rgba(229,193,88,0.12); }
.mp-track-num {
  font-size: 0.72rem;
  color: #b3b3b3;
  min-width: 18px;
  text-align: center;
  font-family: var(--mp-sans);
}
.mp-track.active .mp-track-num { color: var(--mp-gold); }
.mp-track-name {
  font-size: 0.8rem;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--mp-sans);
}
.mp-track.active .mp-track-name { color: #fff; font-weight: 600; }
