        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
            padding: 20px;
            min-height: 100vh;
            align-items: center;
            justify-content: center;
        }

        .audio-player-container {
            position: relative;
            bottom: -5px;
            right: -5px;
            width: 650px;
            height: 120px;
            background: rgba(18, 18, 18, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1000;
        }

        .audio-player-container:hover {
            transform: translateY(-5px);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
        }

        .audio-player {
            display: flex;
            align-items: center;
            padding: 15px;
            height: 100%;
            position: relative;
        }

        .album-art {
            width: 90px;
            height: 90px;
            border-radius: 12px;
            object-fit: cover;
            border: 2px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
        }

        .album-art.playing {
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .player-content {
            flex: 1;
            margin-left: 15px;
            display: flex;
            flex-direction: column;
  justify-content: flex-start;
            height: 90px;
        }

        .track-info {
            margin-bottom: 10px;
        }

        .track-title {
            font-size: 16px;
            font-weight: 600;
            color: #ffffff;
            margin-bottom: 4px;
            line-height: 1.2;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .track-artist {
            font-size: 14px;
            color: #b3b3b3;
            font-weight: 400;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

.progress-section {
  margin-top: -8px; /* <-- this moves the entire section upward */
  margin-bottom: 6px; /* spacing from next element */
  position: relative;
}


        .progress-bar {
            width: 92%;
            top: -10px;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
            cursor: pointer;
            transition: height 0.2s ease;
        }
.time-tooltip {
  bottom: 1%; /* increase distance above the bar */
}

        .progress-bar:hover {
            height: 6px;
        }

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e4e4e4, #c9c9c9);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}



        .progress-fill::after {
            content: '';
            position: absolute;
            right: -6px;
            top: 50%;
            transform: translateY(-50%);
            width: 12px;
            height: 12px;
            background: #ffffff;
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .progress-bar:hover .progress-fill::after {
            opacity: 1;
        }

        .time-display {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: #b3b3b3;
            margin-top: 4px;
        }

        .controls {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .control-btn {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            font-size: 16px;
        }

        .control-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.1);
        }

        .play-btn {
            background: var(--primary-color);
            width: 45px;
            height: 45px;
            font-size: 18px;
        }

        .play-btn:hover {
            background: linear-gradient(135deg, #616161, #c4c4c4);
        }

        .volume-control {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .volume-slider {
            width: 60px;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            outline: none;
            cursor: pointer;
            -webkit-appearance: none;
        }

        .volume-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 12px;
            height: 12px;
            background: #ffffff;
            border-radius: 50%;
            cursor: pointer;
        }

        .volume-slider::-moz-range-thumb {
            width: 12px;
            height: 12px;
            background: #ffffff;
            border-radius: 50%;
            cursor: pointer;
            border: none;
        }

        .wave-animation {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transform: translateX(-100%);
            animation: wave 2s infinite;
            opacity: 0;
        }

        .wave-animation.active {
            opacity: 1;
        }

        @keyframes wave {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .minimize-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 24px;
            height: 24px;
            border: none;
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            transition: all 0.2s ease;
        }

        .minimize-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .eq-bars {
            display: flex;
            align-items: center;
            gap: 2px;
            margin-right: 10px;
        }

.eq-bar {
  width: 3px;
  height: 6px;
  background: #c2c2c2;
  border-radius: 2px;
  transition: height 0.3s ease;
  animation: none; /* default static */
}

/* Active state: apply custom wave animation */
.eq-bars.active .eq-bar {
  animation: eqWave 1s ease-in-out infinite;
  transform-origin: bottom;
}

/* Offset delays for wave-like timing */
.eq-bars.active .eq-bar:nth-child(1) {
  animation-delay: 0s;
}
.eq-bars.active .eq-bar:nth-child(2) {
  animation-delay: 0.2s;
}
.eq-bars.active .eq-bar:nth-child(3) {
  animation-delay: 0.4s;
}
.eq-bars.active .eq-bar:nth-child(4) {
  animation-delay: 0.6s;
}

@keyframes eqGlow {
  0%, 100% {
    height: 6px;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    height: 20px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  }
}

.eq-bars.active .eq-bar {
  animation: eqGlow 1.2s infinite ease-in-out;
  transition: box-shadow 0.3s ease;
}

.eq-bars.active .eq-bar:nth-child(1) { animation-delay: 0s; }
.eq-bars.active .eq-bar:nth-child(2) { animation-delay: 0.2s; }
.eq-bars.active .eq-bar:nth-child(3) { animation-delay: 0.4s; }
.eq-bars.active .eq-bar:nth-child(4) { animation-delay: 0.6s; }




        .eq-bar:nth-child(1) { animation-delay: 0s; }
        .eq-bar:nth-child(2) { animation-delay: 0.1s; }
        .eq-bar:nth-child(3) { animation-delay: 0.2s; }
        .eq-bar:nth-child(4) { animation-delay: 0.3s; }

        @keyframes eq {
            0%, 100% { height: 5px; }
            50% { height: 20px; }
        }

.visualizer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #ececec, #f7f7f7, #929292);
  opacity: 0;
  transform: scaleY(0.5);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.visualizer {
  will-change: opacity, transform;
}

.visualizer.active {
  opacity: 1;
  transform: scaleY(1);
  animation: visualize 0.5s infinite ease-in-out;
}


        @keyframes visualize {
            0%, 100% { transform: scaleX(1); }
            50% { transform: scaleX(1.2); }
        }

        .minimized {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            bottom: 20px;
            right: 20px;
        }

        .minimized .audio-player {
            padding: 10px;
            justify-content: center;
        }

        .minimized .album-art {
            width: 40px;
            height: 40px;
        }

        .minimized .player-content,
        .minimized .controls,
        .minimized .minimize-btn {
            display: none;
        }

        /* Demo songs for testing */
        .demo-controls {
            position: fixed;
            top: 20px;
            left: 20px;
            display: flex;
            gap: 10px;
            z-index: 1001;
        }

        .demo-btn {
            padding: 10px 20px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            color: #ffffff;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .demo-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        /* Custom Volume Slider with Percentage Style */

/* --- Modern Volume Control with Animation --- */
/* 🔊 Modern volume with fade and animation */

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

#volumeBtn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.volume-icon {
  font-size: 1.2rem;
  color: #ccc;
  transition: transform 0.2s ease, color 0.2s ease;
}

.volume-icon.pulse {
  animation: pulse-volume 0.4s ease;
}

@keyframes pulse-volume {
  0% { transform: scale(1); color: #ccc; }
  50% { transform: scale(1.3); color: #fff; }
  100% { transform: scale(1); color: #ccc; }
}

.volume-slider {
  width: 100px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  background: #fff;
  border-radius: 50%;
  margin-top: -5px;
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  height: 14px;
  width: 14px;
  background: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.volume-percent {
  font-size: 0.75rem;
  color: #aaa;
  transition: transform 0.2s ease, color 0.2s ease;
}

.volume-percent.animate {
  transform: scale(1.2);
  color: #fff;
}
/* Modern Play/Stop Button */
.modern-play-btn {
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}

.modern-play-btn:hover {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.1));
}

.modern-play-btn .icon-container {
  color: #ffffff;
  font-size: 22px;
  transition: transform 0.3s ease;
}

.modern-play-btn:active .icon-container {
  transform: scale(0.85);
}

/* Pulse animation when playing */
.modern-play-btn.playing {
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(255,255,255,0.2);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255,255,255,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255,255,255,0);
  }
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(50%, -50%);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.progress-fill::after {
  opacity: 1;
}
.audio-player-container.playing .progress-fill::after {
  animation: thumbPulse 1.5s ease-in-out infinite;
}

@keyframes thumbPulse {
  0%, 100% {
    transform: translate(50%, -50%) scale(1);
    box-shadow: 0 0 0 rgba(255,255,255,0);
  }
  50% {
    transform: translate(50%, -50%) scale(1.2);
    box-shadow: 0 0 6px rgba(255,255,255,0.4);
  }
}

/* By default, hidden */
.progress-fill::after {
  opacity: 0;
}

/* When playing, show thumb */
.audio-player-container.playing .progress-fill::after {
  opacity: 1;
}
.modern-play-btn .icon-container i {
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.modern-play-btn.playing .icon-container i.fa-play {
  opacity: 0;
  transform: scale(0.5);
}

.modern-play-btn:not(.playing) .icon-container i.fa-pause {
  opacity: 0;
  transform: scale(0.5);
}
.modern-play-btn::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  opacity: 0;
  transition: width 0.4s ease, height 0.4s ease, opacity 0.6s ease;
}

.modern-play-btn:active::after {
  width: 100px;
  height: 100px;
  opacity: 0;
  transition: none;
}
.icon-container {
  position: relative;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-container i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-size: 22px;
}


.audio-player-container.dragging .progress-fill::after {
  transform: translate(50%, -50%) scale(1.4);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}


.play-icon {
  opacity: 1;
  transform: scale(1);
}

.pause-icon {
  opacity: 0;
  transform: scale(0.5);
}

.modern-play-btn.playing .play-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}

.modern-play-btn.playing .pause-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.time-tooltip {
  position: absolute;
  bottom: 100%;
  transform: translateX(-50%);
  padding: 2px 6px;
  background: #222;
  color: #fff;
  font-size: 11px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, left 0.2s ease;
  z-index: 10;
}

.progress-bar:hover .time-tooltip {
  opacity: 1;
}
.volume-slider-wrapper {
  position: relative;
  width: 100px;
}

.volume-tooltip {
  position: absolute;
  bottom: 120%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 2px 5px;
  font-size: 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease, left 0.2s ease;
  pointer-events: none;
}

.volume-slider-wrapper:hover .volume-tooltip {
  opacity: 1;
}
