/* Refined Dark-Mode + Spotify Green Highlights */
:root {
  --primary-color: #1DB954;        /* Spotify green */
  --bg-dark: #121212;              /* Main background */
  --bg-light: #1E1E1E;             /* Secondary section background */
  --card-bg: #282828;              /* Playlist cards background */
  --text-main: #E1E1E1;            /* Primary text color */
  --text-secondary: #A0A0A0;       /* Secondary text color */
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  color: var(--text-main);
}

body {
  background-color: var(--bg-dark);
  overflow-x: hidden;
}

.player {
  max-width: 480px;
  margin: 0 auto;
  padding-top: 70px; /* space for fixed header */
}

/* Fixed Now Playing Header */
.dashboard header {
  position: fixed;
  top: 0;
  width: 100%;
  max-width: 480px;
  padding: 16px;
  background-color: var(--bg-dark);
  border-bottom: 1px solid #333;
  z-index: 100;
}

header h4 {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

header h2 {
  font-size: 20px;
  margin-top: 4px;
}

/* CD Thumbnail */
.cd {
  margin: 80px auto 24px;
  width: 200px;
  transition: width var(--transition-speed), opacity var(--transition-speed);
}

.cd-thumb {
  width: 100%;
  padding-top: 100%;
  border-radius: 50%;
  background-color: #444;
  background-size: cover;
}

/* Controls */
.control {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px;
  background: var(--bg-light);
  margin-bottom: 16px;
}

.btn {
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  transition: color var(--transition-speed), transform var(--transition-speed);
}

.btn:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

/* Highlight active random/repeat buttons */
.btn-random.active,
.btn-repeat.active {
  /* Increase wrapper scale */
  transform: scale(1.2);
}

/* Color icons inside active buttons */
.btn-random.active i,
.btn-repeat.active i {
  color: var(--primary-color);
}

.btn-toggle-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Progress Bar */
.progress {
  width: 100%;
  height: 6px;
  background: #444;
  border-radius: 3px;
  outline: none;
  margin: 0 12px;
}

.progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background-color: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  margin-top: -4px;
}

/* Volume */
.volume-control {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--bg-light);
  margin-bottom: 16px;
}

.volume-control i {
  margin-right: 8px;
}

.volume-control input[type="range"] {
  width: 100px;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  border-radius: 50%;
}

/* Playlist */
.playlist {
  padding: 0 12px 24px;
  max-height: calc(100vh - 360px);
  overflow-y: auto;
}

.playlist::-webkit-scrollbar {
  width: 6px;
}

.playlist::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}

.song {
  display: flex;
  align-items: center;
  background-color: var(--card-bg);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.song:hover {
  background-color: #3a3a3a;
  transform: translateY(-2px);
}

/* Active song highlight */
.song.active {
  background-color: var(--primary-color);
}

.song.active .title,
.song.active .author {
  color: var(--bg-dark);
}

.song .thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-size: cover;
}

.song .body {
  flex: 1;
  padding: 0 16px;
}

.song .title {
  font-size: 16px;
  color: var(--text-main);
}

.song .author {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.song .option i {
  font-size: 18px;
  color: var(--text-secondary);
}

.song .option:hover i {
  color: var(--primary-color);
}

@media (max-width: 500px) {
  .player { max-width: 100%; }
  .cd { width: 160px; margin-top: 80px; }
  .btn-toggle-play { width: 48px; height: 48px; }
  header h2 { font-size: 18px; }
}
