/* === Music Panel === */
.music-panel {
  flex-shrink: 0;
  max-height: 30vh;
  overflow: hidden;
  backdrop-filter: blur(12px);
  background: rgba(30, 30, 47, 0.6);
  border-radius: 20px;
  box-shadow: 0 0 20px #00ffff55;
  padding: 1.2em;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.music-panel.playing {
  animation: musicPulse 2.5s infinite;
  transition: box-shadow 0.4s ease;
  box-shadow: 0 0 28px #00ffffaa, 0 0 12px #00ffff88 inset;
}
@keyframes musicPulse {
  0%   { box-shadow: 0 0 28px #00ffffaa, 0 0 12px #00ffff88 inset; }
  50%  { box-shadow: 0 0 40px #00ffffee, 0 0 20px #00ffffcc inset; }
  100% { box-shadow: 0 0 28px #00ffffaa, 0 0 12px #00ffff88 inset; }
}
.track-info {
  font-size: 1em;
  color: #00ffff;
  margin-bottom: 0.6em;
}
.track-info::before {
  content: "🎵 ";
}
.progress-bar {
  width: 100%;
  height: 6px;
  background: #444;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.4em;
}
.progress-fill {
  height: 100%;
  background: #00ffff;
  width: 0%;
  transition: width 0.2s ease;
}
.time-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75em;
  color: #aaa;
  width: 100%;
  margin-bottom: 0.6em;
}
.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1em;
}
button.play-toggle {
  background: none;
  border: none;
  color: #00ffff;
  font-size: 1.6em;
  cursor: pointer;
  transition: transform 0.2s ease;
}
button.play-toggle:hover {
  transform: scale(1.2);
}
.volume-control {
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.volume-control span {
  font-size: 1.2em;
  color: #00ffff;
  text-shadow: 0 0 8px #00ffff88;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}
.volume-control span:hover {
  transform: scale(1.2);
  text-shadow: 0 0 12px #00ffffcc;
}
input[type="range"] {
  width: 100px;
  accent-color: #00ffff;
}

/* === Add-to-Playlist button === */
.add-to-playlist {
  margin-left: 0.5em;
  background: #1a1a1a;
  color: #00ffff;
  border: none;
  border-radius: 6px;
  padding: 0.4em 0.6em;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 1em;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.add-to-playlist:hover {
  background: #00ffff22;
}

/* === Invisible YouTube player container (prevents layout shifts) === */
#player {
  position: absolute;
  top: 0;       /* keep it anchored but out of flow */
  left: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;   /* ensure it never captures clicks */
  z-index: -1;            /* keep it behind everything */
}

#player .yt-player,
#player iframe {
  width: 0 !important;
  height: 0 !important;
  border: 0;
  display: block;         /* avoid inline gaps */
}

/* === Ambient Mixer === */
.ambient-btn {
  background: none;
  border: none;
  color: #00ffff;
  font-size: 1.4em;
  cursor: pointer;
  transition: transform 0.2s ease, text-shadow 0.2s ease;
}
.ambient-btn:hover {
  transform: scale(1.2);
  text-shadow: 0 0 8px #00ffffaa;
}

.ambient-mixer {
  display: flex;
  flex-direction: column; /* stack rows vertically */
  gap: 0.6em;
  margin-top: 0.8em;
  padding: 0.6em;
  background: rgba(20, 20, 35, 0.7);
  border-radius: 12px;
  width: 100%;
}
.ambient-mixer.hidden {
  display: none;
}
.ambient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
}
.ambient-mixer label {
  font-size: 0.85em;
  color: #00ffff;
  min-width: 70px;
}
.ambient-mixer input[type="range"] {
  flex: 1;
  accent-color: #00ffff;
}
