* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

.container {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
}
.music-player {
  width: 300px;
  min-height: 400px;
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.2),
    0 0 30px rgba(102, 126, 234, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  text-align: center;
  transition: 0.3s ease;
  position: relative;
}
/* .music-player:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
} */
nav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

nav .circle {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  line-height: 40px;
  color: #f53192;
  box-shadow: 0 5px 10px rgba(102, 126, 234, 0.3);
}
nav .circle:hover {
  transform: scale(1.1);
  transition: 0.3s;
}

.song-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 20px;
  margin-top: 15px;
  border: 8px solid #fff;
  box-shadow:
    0 5px 15px rgba(102, 126, 234, 0.3),
    0 0 20px rgba(245, 49, 146, 0.2);

  animation: rotate 10s linear infinite;
  animation-play-state: paused;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.music-player.playing {
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.2),
    0 0 40px rgba(245, 49, 146, 0.25);
}
.music-player.playing .song-img {
  animation-play-state: running;
}
.music-player h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
}
.music-player p {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}
#progress-bar {
  -webkit-appearance: none;
  width: 80%;
  height: 5px;
  background: #ddd;
  border-radius: 4px;
  margin-bottom: 40px;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: 0 1px 10px rgba(245, 49, 146, 0.3);
}

/* Chrome, Safari */
#progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: #f53192;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 4px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

#progress-bar::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

#progress-bar::-webkit-slider-thumb:active {
  transform: scale(1.3);
}

/* Firefox */
#progress-bar::-moz-range-track {
  background: #ddd;
  height: 5px;
  border-radius: 4px;
}

#progress-bar::-moz-range-thumb {
  background: #f53192;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 4px solid #fff;
}
#progress-bar:hover {
  box-shadow: 0 0 10px rgba(245, 49, 146, 0.5);
}
.time {
  width: 80%;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #555;
  margin-top: -30px;
  margin-bottom: 20px;
}
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.controls i {
  pointer-events: none;
}
.controls div {
  width: 40px;
  height: 40px;
  padding: 4px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #f53192;
  cursor: pointer;
  box-shadow: 0 5px 10px rgba(102, 126, 234, 0.3);
}

.controls div:nth-child(2) {
  transform: scale(1.5);
  background: #f53192;
  color: #fff;
}
.controls div:not(:nth-child(2)):hover {
  transform: scale(1.1);
}

.playlist {
  position: absolute;
  right: 10px;
  bottom: 100px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: 12px;
  width: 200px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);

  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 1000;
}

.playlist.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.playlist ul {
  max-height: 150px;
  overflow-y: auto;
  list-style: none;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #f53192 transparent;
}

.playlist li {
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
}

.playlist li:hover {
  background: rgba(245, 49, 146, 0.1);
  color: #f53192;
}

.playlist li.active {
  color: #f53192;
  font-weight: 600;
}

.controls div:active {
  transform: scale(0.95);
}

.controls div,
.song-img,
.playlist,
nav .circle {
  transition: 0.2s ease;
}

.playlist ul::-webkit-scrollbar {
  width: 5px;
}

.playlist ul::-webkit-scrollbar-thumb {
  background: #f53192;
  border-radius: 10px;
}

.playlist ul::-webkit-scrollbar-track {
  background: transparent;
}

nav .circle:focus-visible,
.controls div:focus-visible,
.playlist li:focus-visible,
#progress-bar:focus-visible {
  outline: 2px solid #f53192;
  outline-offset: 3px;
}                           

@media (prefers-reduced-motion: reduce) {
  .song-img {
    animation: none;
  }
  .controls div,
  .song-img,
  .playlist,
  nav .circle {
    transition: none;
  }
}
