* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: #ffffff;
}

html,
body {
  overflow-x: hidden;
  font-family: "Inter", "Courier New", Courier, monospace;
  background-color: #3a0f2a;
}

body {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(songs/bg2.jpg);
  max-width: 100%;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::-webkit-scrollbar {
  display: none;
}

/* ── Layout ── */
.app-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 20px 72px;
  gap: 20px;
}

/* ── Player Card ── */
.player-card {
  width: 100%;
  max-width: 420px;
  background: rgba(10, 4, 22, 0.78);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 28px;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  box-shadow: 0 0 0 1px rgba(255, 45, 120, 0.06), 0 8px 64px rgba(0, 0, 0, 0.7), 0 0 80px rgba(255, 45, 120, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ── Album Art ── */
.album-section {
  position: relative;
  width: 210px;
  height: 210px;
  flex-shrink: 0;
}

.album-glow {
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 45, 120, 0.45) 0%, rgba(139, 92, 246, 0.25) 45%, transparent 70%);
  filter: blur(22px);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.album-glow.playing {
  opacity: 1;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.album-art {
  width: 210px;
  height: 210px;
  object-fit: cover;
  border-radius: 18px;
  border: 1.5px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(139, 92, 246, 0.2);
  position: relative;
  z-index: 1;
  transition: box-shadow 0.4s ease;
}

.player-card:has(#play-icon.fa-pause) .album-art {
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.65), 0 0 50px rgba(255, 45, 120, 0.35);
}

/* ── Track Info ── */
.track-info {
  text-align: center;
  width: 100%;
}

.album-label {
  font-family: "Bungee Shade", cursive;
  font-size: 20px;
  letter-spacing: 5px;
  background: linear-gradient(90deg, #ff2d78, #8b5cf6, #00c3ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.track-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff 0%, #ddb8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2px;
  min-height: 32px;
  transition: all 0.3s ease;
}

.artist-name {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

/* ── Progress Bar ── */
.progress-section {
  width: 100%;
}

.progress-bar {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
  display: block;
}

.progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2d78, #8b5cf6);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 45, 120, 0.7);
  transition: transform 0.15s ease;
}

.progress-bar::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.progress-bar::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2d78, #8b5cf6);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(255, 45, 120, 0.7);
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 1px;
}

/* ── Controls ── */
.controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ctrl-btn {
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ctrl-btn:focus,
.ctrl-btn:active {
  outline: none;
}

.side-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.28);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
}

.side-btn:hover {
  background: rgba(139, 92, 246, 0.28);
  color: #ffffff;
  transform: scale(1.07);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
}

.side-btn:active {
  transform: scale(0.94);
}

.play-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2d78 0%, #9d4edd 100%);
  border: none;
  font-size: 22px;
  color: #ffffff;
  box-shadow: 0 0 0 0 rgba(255, 45, 120, 0.4), 0 6px 24px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 40px rgba(255, 45, 120, 0.6), 0 6px 24px rgba(0, 0, 0, 0.5);
}

.play-btn:active {
  transform: scale(0.95);
}

.play-btn.is-playing {
  animation: btn-pulse 2.5s ease-in-out infinite;
}

@keyframes btn-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 45, 120, 0.5), 0 6px 24px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 45, 120, 0), 0 6px 24px rgba(0, 0, 0, 0.5);
  }
}

/* ── Playlist ── */
.playlist-container {
  width: 100%;
  max-width: 420px;
}

.playlist-header {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 5px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  margin-bottom: 14px;
}

.playlist {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  user-select: none;
}

.playlist-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
  transform: translateX(5px);
}

.playlist-item.active {
  background: linear-gradient(90deg, rgba(255, 45, 120, 0.14) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-color: rgba(255, 45, 120, 0.35);
  box-shadow: 0 0 20px rgba(255, 45, 120, 0.08);
  transform: none;
}

.playlist-item:active {
  transform: scale(0.98);
}

.track-num {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.25);
  width: 22px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.playlist-item.active .track-num {
  color: #ff2d78;
}

.track-name-list {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-item.active .track-name-list {
  color: #ffffff;
  font-weight: 700;
}

/* EQ bars indicator */
.playing-indicator {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

.playlist-item.active .playing-indicator {
  opacity: 1;
}

.playing-indicator span {
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(to top, #ff2d78, #8b5cf6);
  transform-origin: bottom;
}

.playlist-item.active:not(.paused) .playing-indicator span:nth-child(1) {
  animation: eq-bar 1.1s ease-in-out 0s infinite;
  height: 8px;
}
.playlist-item.active:not(.paused) .playing-indicator span:nth-child(2) {
  animation: eq-bar 1.1s ease-in-out 0.25s infinite;
  height: 14px;
}
.playlist-item.active:not(.paused) .playing-indicator span:nth-child(3) {
  animation: eq-bar 1.1s ease-in-out 0.5s infinite;
  height: 10px;
}

.playlist-item.active.paused .playing-indicator span:nth-child(1) {
  height: 8px;
}
.playlist-item.active.paused .playing-indicator span:nth-child(2) {
  height: 14px;
}
.playlist-item.active.paused .playing-indicator span:nth-child(3) {
  height: 10px;
}

@keyframes eq-bar {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .player-card {
    padding: 24px 18px 22px;
    border-radius: 22px;
  }

  .album-section,
  .album-art {
    width: 175px;
    height: 175px;
  }

  .track-title {
    font-size: 22px;
  }
  .play-btn {
    width: 60px;
    height: 60px;
    font-size: 19px;
  }
  .side-btn {
    width: 44px;
    height: 44px;
    font-size: 13px;
  }
}
