/* Custom Styles & Micro-animations for Thai Voice Studio */

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.8);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(45, 212, 191, 0.6);
}

/* Voice Selector Cards */
.voice-card {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(51, 65, 85, 0.5);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.voice-card:hover {
  border-color: rgba(45, 212, 191, 0.4);
  background: rgba(30, 41, 59, 0.6);
  transform: translateY(-1px);
}

.voice-card.active {
  border-color: rgba(45, 212, 191, 0.8);
  background: rgba(20, 184, 166, 0.08);
  box-shadow: 0 0 20px -5px rgba(20, 184, 166, 0.25);
}

/* Waveform Bars */
.wave-bar {
  flex: 1;
  min-width: 3px;
  background-color: #334155;
  border-radius: 9999px;
  transition: height 0.15s ease, background-color 0.2s ease;
}

.wave-bar.played {
  background-color: #2dd4bf;
}

.is-playing .wave-bar.played {
  animation: pulse-wave 1s ease-in-out infinite alternate;
}

@keyframes pulse-wave {
  0% {
    transform: scaleY(0.7);
  }
  100% {
    transform: scaleY(1.3);
  }
}

/* Slider custom styling */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2dd4bf;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.5);
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Loading Spin Animation */
@keyframes spin-pulse {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  animation: spin-pulse 0.8s linear infinite;
}
