.music-player {
  background: rgba(20, 33, 61, 0.58);
  color: #e5d9b6;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(212, 163, 115, 0.65);
  backdrop-filter: blur(12px);
  width: 100%;
  position: relative;
  z-index: 5;
  cursor: default;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  user-select: none;
}
.dv-player-head,
.dv-player-times,
.dv-player-controls,
.dv-player-meta {
  display: flex;
  align-items: center;
}
.dv-player-head { justify-content: space-between; margin-bottom: 0.4rem; }
.dv-player-meta { gap: 0.75rem; }
.dv-player-times { justify-content: space-between; font-size: 0.75rem; }
.dv-player-controls { justify-content: center; gap: 0.5rem; margin: 0.45rem 0; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }

.album-art {
  width: 60px;
  height: 60px;
  border-radius: 5px;
  object-fit: cover;
  border: 2px solid #d4a373;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.album-art.playing {
  animation: pulse 2.5s ease-in-out infinite;
  box-shadow: 0 0 12px 3px #d4a373aa;
}
@keyframes pulse {
  0%   { transform: scale(1); box-shadow: 0 0 10px 2px #d4a37388; }
  50%  { transform: scale(1.05); box-shadow: 0 0 18px 4px #d4a373ee; }
  100% { transform: scale(1); box-shadow: 0 0 10px 2px #d4a37388; }
}

.music-player button {
  background: #d4a373;
  color: #14213d;
  padding: 0.3rem 0.5rem;
  border-radius: 5px;
  border: 0;
  cursor: pointer;
}
.music-player button:hover { background: #e6b800; }

#visualizer, .visualizer {
  width: 100%;
  height: 40px;
  border-radius: 5px;
  background: rgba(20, 33, 61, 0.3);
  margin-top: 0.5rem;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  margin-top: 0.25rem;
  background: #d4a373;
  border-radius: 3px;
  appearance: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  background: #f5e6cc;
  border-radius: 50%;
  border: none;
  appearance: none;
}

#tracklistToggle {
  font-size: 0.6rem;
  color: #facc15;
  margin-top: 0.5rem;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
}
#tracklistContainer {
  max-height: 120px;
  overflow-y: auto;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0.25rem;
  font-size: 0.6rem;
  scrollbar-width: thin;
  scrollbar-color: #d4a373 rgba(15, 24, 42, 0.45);
}
.track-row {
  display: block;
  padding: 4px 6px;
  text-decoration: none;
  color: #e5d9b6;
}
.track-row:hover { background-color: rgba(255, 255, 255, 0.05); color: #f5e6cc; }
.track-row.now-playing { font-weight: bold; color: #facc15; }

.music-player button.is-active {
  background: #e6b800;
  box-shadow: 0 0 0 1px #f5e6cc inset;
}
#tracklistContainer::-webkit-scrollbar { width: 8px; }
#tracklistContainer::-webkit-scrollbar-track {
  background: rgba(15, 24, 42, 0.45);
  border-radius: 8px;
}
#tracklistContainer::-webkit-scrollbar-thumb {
  background: #d4a373;
  border-radius: 8px;
}

#mini-player {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: rgba(20,33,61,0.58);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 163, 115, 0.65);
  border-radius: 12px;
  z-index: 5;
  color: #e5d9b6;
}
#mini-player.hidden { display: none !important; }
#mini-player .album-art { width: 32px; height: 32px; }
.mini-info { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
#miniTitle { font-size: 0.75rem; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-controls button {
  background: transparent;
  border: none;
  color: #e5d9b6;
  cursor: pointer;
}

@media (max-width: 640px) {
  .music-player { display: none; }
  #mini-player { display: flex !important; }
  #mini-player.hidden { display: flex !important; }
}
