@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap");

body {
  font-family: "Montserrat", sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: all 0.3s ease;
}

body[data-theme="dark"] #theme-toggle {
  color: white;
}
body[data-theme="light"] #theme-toggle {
  color: #333;
}

/* Dark theme */
body[data-theme="dark"] {
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: white;
}

/* Light theme */
body[data-theme="light"] {
  background: linear-gradient(135deg, #f5f7fa, #e4e8f0, #d5d9e2);
  color: #333;
}

body[data-theme="light"] .player-container {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

body[data-theme="light"] .control-btn {
  background: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .control-btn:hover {
  background: rgba(0, 0, 0, 0.2);
}

body[data-theme="light"] .progress-container {
  background: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .time-display,
body[data-theme="light"] .track-artist,
body[data-theme="light"] .playlist-item-artist {
  color: rgba(0, 0, 0, 0.6);
}

body[data-theme="light"] .playlist-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

.player-container {
  width: 420px;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  padding: 25px;
}

.cd-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 25px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cd {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.1), 0 0 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cd-hole {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  position: absolute;
  z-index: 2;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.7);
}

.cd-image {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 1;
  transition: transform 0.5s ease;
}

.cd-reflection {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0.15;
  z-index: 3;
}

.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  margin: 25px 0;
  cursor: pointer;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff8a00, #e52e71);
  border-radius: 10px;
  position: relative;
  width: 0%;
  transition: width 0.1s linear;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
}

.control-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.play-btn {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff8a00, #e52e71);
}

.play-btn:hover {
  box-shadow: 0 0 20px rgba(255, 138, 0, 0.5);
}

.repeat-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
}

.repeat-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.repeat-btn.active {
  background: rgba(255, 255, 255, 0.3);
  color: #ff8a00;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.volume-control {
  width: 100%;
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.track-info {
  text-align: center;
  margin: 20px 0;
}

.track-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 5px;
}

.track-artist {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.playlist {
  margin-top: 30px;
  max-height: 200px;
  overflow-y: auto;
}

.playlist-item {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.playlist-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.playlist-item.active {
  background: linear-gradient(
    90deg,
    rgba(255, 138, 0, 0.5),
    rgba(229, 46, 113, 0.5)
  );
}

.playlist-item img {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  object-fit: cover;
}

.playlist-info {
  flex: 1;
}

.playlist-item-title {
  font-size: 14px;
  font-weight: 500;
}

.playlist-item-artist {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 5px;
}

/* Name badge shadow */
.relative:hover .absolute {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

/* Glow effect */
.glow {
  animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
  from {
    box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #e60073, 0 0 40px #e60073;
  }
  to {
    box-shadow: 0 0 20px #fff, 0 0 30px #ff4da6, 0 0 40px #ff4da6,
      0 0 50px #ff4da6;
  }
}

/* Animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.playing .cd {
  animation: rotate 20s linear infinite;
}
