/*================== FITUR AUDIO MASPRAM ===================*/
/* ===== BASE STYLES ===== */
.custom-audio-player {
  --primary-color: #0E447C;
  --secondary-color: #1a5a9e;
  --text-color: white;
  --control-bg: rgba(255, 255, 255, 0.9);
  --control-hover: #f0f0f0;
  --progress-bg: rgba(255, 255, 255, 0.3);
  --progress-fill: white;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.15);

  
  background-color: var(--primary-color);
  border-radius: 15px;
  padding: 15px;
  color: var(--text-color);
  box-shadow: var(--shadow);
  font-family: 'Helvetica Neue', sans-serif;
  position: relative;
  overflow: hidden;
}

/* ===== AUDIO INFO ===== */
.audio-info-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.audio-title {
  font-size: 14px;
  white-space: nowrap;
}

.audio-desc {
  font-size: 14px;
  opacity: 0.9;
  white-space: nowrap;
  margin-bottom: 0px;

}


/* ===== MARQUEE ANIMATION ===== */

.marquee-text {
  display: block; 
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin: 0;         
  padding: 0;       
  line-height: 1.2; 
}


.marquee-animate {
  display: inline-block;
  animation: marqueeScroll 15s linear infinite;
  padding-left: 100%;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ===== MAIN CONTROLS ===== */
.audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ===== BUTTON STYLES ===== */
.play-btn,
.loop-btn,
.volume-toggle,
.speed-toggle {
  background: var(--control-bg);
  color: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.play-btn:hover,
.loop-btn:hover,
.volume-toggle:hover,
.speed-toggle:hover {
  background: var(--control-hover);
  transform: scale(1.05);
}

.play-btn:active,
.loop-btn:active,
.volume-toggle:active,
.speed-toggle:active {
  transform: scale(0.95);
}

.loop-btn.active {
  background: var(--primary-color);
  color: white;
}

/* ===== PROGRESS BAR ===== */
.progress-wrapper {
  position: relative;
  flex-grow: 1;
  height: 4px;
  background: var(--progress-bg);
  border-radius: 4px;
  cursor: pointer;
}

.progress-bar {
  width: 100%;
  height: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
}

.progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--progress-fill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.progress-bar::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* ===== TIME TOOLTIP ===== */
.time-tooltip {
  position: absolute;
  bottom: 120%;
  left: 0;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  display: none;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.2s ease;
}

/* ===== TIME LABELS ===== */
.time {
  font-size: 12px;
  width: 45px;
  text-align: center;
  opacity: 0.8;
}

/* ===== VOLUME CONTROL ===== */
.volume-wrapper {
  position: relative;
}

.volume-control {
  position: absolute;
  bottom: 45px;
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: bottom;
  background: white;
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 20;
  min-width: 120px;
  pointer-events: none;
}

.volume-control.show {
  opacity: 1;
  transform: translateX(-50%) scaleY(1);
  pointer-events: auto;
}

.volume-bar {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #e0e0e0;
  border-radius: 4px;
  outline: none;
  margin-bottom: 8px;
}

.volume-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.volume-bar::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-percent {
  font-size: 12px;
  color: var(--primary-color);
  text-align: center;
  display: block;
}

/* ===== SPEED CONTROL ===== */
.speed-wrapper {
  position: relative;
}

.speed-control {
  position: absolute;
  bottom: 45px;
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: bottom;
  background: white;
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 20;
  pointer-events: none;
   width: 100px; 
}

.speed-control.show {
  opacity: 1;
  transform: translateX(-50%) scaleY(1);
  pointer-events: auto;
}

.speed-select {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  background-color: #fff;
  color: var(--primary-color);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.speed-select:focus {
  border-color: var(--primary-color);
}

.volume-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.volume-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-grow: 1;
}

.volume-bar {
  width: 100px;
  height: 4px;
}

.volume-percent {
  font-size: 11px;
  color: var(--primary-color);
}

.mute-button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: var(--primary-color);
  font-size: 14px;
  padding: 4px;
  transition: color 0.2s ease;
}

.mute-button:hover {
  color: var(--secondary-color);
}


.stop-btn {
  background: var(--control-bg);
  color: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.stop-btn:hover {
  background: var(--control-hover);
  transform: scale(1.05);
}

.stop-btn:active {
  transform: scale(0.95);
}


.download-btn {
  background: var(--control-bg);
  color: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  text-decoration: none;
}

.download-btn:hover {
  background: var(--control-hover);
  transform: scale(1.05);
  color: var(--primary-color);
}


.download-btn:active {
  transform: scale(0.95);
}


@media (max-width: 576px) {

  .custom-audio-player {
    padding: 10px;
  }

  .audio-info-wrapper {
    margin-bottom: 8px;
  }

  .audio-title,
  .audio-desc {
    font-size: 13px;
  }
  
  .audio-controls {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .play-btn,
  .stop-btn,
  .loop-btn,
  .volume-toggle,
  .speed-toggle,
  .download-btn {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .volume-control,
  .speed-control {
    bottom: 35px;
    min-width: 90px;
    padding: 6px;
  }

  .speed-select {
    font-size: 11px;
  }

  .volume-percent {
    font-size: 10px;
  }

  .volume-bar {
    width: 80px;
  }

  .time {
    font-size: 10px;
    width: 35px;
  }

  .progress-wrapper {
    height: 3px;
  }

  .progress-bar::-webkit-slider-thumb {
    width: 10px;
    height: 10px;
  }
}



 @keyframes audioWave {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.audio-icon-animated {
  color: #0E447C;
  animation: audioWave 1s infinite ease-in-out;
}