/* Centered Audio Player Wrapper with Animated Background */
.audio-player-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding-top: 100px; /* space for navbar if fixed */
  z-index: 1;
  overflow: hidden;
}

/* Retro Pulsing Visualizer Background */
.visualizer-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
}

.visualizer-bg span {
  display: block;
  width: 5px;
  height: 40px;
  background: linear-gradient(to top, hotpink, rebeccapurple);
  margin: 0 3px;
  border-radius: 5px;
  animation: pulseBar 1.2s infinite ease-in-out;
}

.visualizer-bg span:nth-child(2) { animation-delay: 0.1s; }
.visualizer-bg span:nth-child(3) { animation-delay: 0.2s; }
.visualizer-bg span:nth-child(4) { animation-delay: 0.3s; }
.visualizer-bg span:nth-child(5) { animation-delay: 0.4s; }
.visualizer-bg span:nth-child(6) { animation-delay: 0.5s; }
.visualizer-bg span:nth-child(7) { animation-delay: 0.6s; }

@keyframes pulseBar {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(2.5); }
}

/* Audio Player Box */
.audio-player {
  position: relative;
  top: 5%;
  z-index: 1;
  background: linear-gradient(to bottom, hotpink, rebeccapurple);
  color: white;
  max-width: 1280px;
  width: 60%;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  font-family: 'Open Sans', sans-serif;
}

/* Responsive Audio Element */
.audio-player audio {
  width: 100%;
  margin-top: 1rem;
}

/* Loop Buttons with Fun Hover Effects */
.loop-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.loop-controls button {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid white;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s, color 0.3s;
  font-weight: bold;
}

.loop-controls button.active,
.loop-controls button:hover {
  background: white;
  color: rebeccapurple;
  transform: scale(1.1) rotate(-1deg);
}

/* Currently Playing Info */
.now-playing {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  color: #ffe6f7;
  text-shadow: 1px 1px 2px #000;
}

/* Responsive Tweaks */
@media (max-width: 480px) {
  .loop-controls {
    flex-direction: column;
    gap: 0.5rem;
  }

  .audio-player {
    padding: 1.5rem;
  }

  .visualizer-bg span {
    width: 3px;
    margin: 0 2px;
  }
}
.audio-player-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  position: relative;
  z-index: 1;
}

.audio-player {
  background: linear-gradient(to bottom, hotpink, rebeccapurple);
  padding: 2rem;
  border-radius: 1rem;
  color: white;
  text-align: center;
  position: relative;
  z-index: 2;
}

.controls button,
.loop-controls button {
  background-color: transparent;
  border: 2px solid white;
  color: white;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.controls button:hover,
.loop-controls button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.loop-controls .active {
  background-color: rgba(255, 255, 255, 0.3);
}

#visualizer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

