/**
 * Voice Transformer — The Magic Slider
 * "Turn any vocal into something nobody's ever heard."
 */

/* Modal Container */
.voice-transformer-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: vt-fade-in 0.3s ease forwards;
}

@keyframes vt-fade-in {
  to { opacity: 1; }
}

.vt-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
}

.vt-content {
  position: relative;
  background: linear-gradient(145deg, #1a0a2e 0%, #0d0515 50%, #0a0510 100%);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 24px;
  padding: 2rem;
  width: 90%;
  max-width: 480px;
  box-shadow: 
    0 0 80px rgba(168, 85, 247, 0.25),
    0 0 40px rgba(139, 92, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: scale(0.9) translateY(20px);
  animation: vt-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes vt-slide-up {
  to { 
    transform: scale(1) translateY(0); 
  }
}

/* Header */
.vt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.vt-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #a855f7;
  /* Gradient animation removed (Jobs audit: decorative) */
}

/* vt-gradient animation - REMOVED (Jobs audit: decorative) */

.vt-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #666;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.vt-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: rotate(90deg);
}

/* Stem Info */
.vt-stem-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.vt-stem-icon {
  font-size: 1.5rem;
}

.vt-stem-details {
  flex: 1;
}

.vt-stem-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #f0f0f5;
}

.vt-stem-type {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* The Magic Slider */
.vt-slider-section {
  margin: 2rem 0;
}

.vt-slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1rem;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(168, 85, 247, 0.05));
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 16px;
}

.vt-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  width: 70px;
  text-align: center;
  transition: color 0.3s;
}

.vt-label-left {
  color: #555;
}

.vt-label-right {
  color: #a855f7;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.vt-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: linear-gradient(90deg, 
    #2a2a3a 0%, 
    #4a3a5a 30%, 
    #7c3aed 60%, 
    #a855f7 100%
  );
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

.vt-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  background: linear-gradient(145deg, #c084fc, #7c3aed);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 
    0 0 20px rgba(168, 85, 247, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.4);
  cursor: grab;
  transition: transform 0.15s, box-shadow 0.15s;
}

.vt-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 
    0 0 30px rgba(168, 85, 247, 0.8),
    0 4px 16px rgba(0, 0, 0, 0.5);
}

.vt-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
}

.vt-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: linear-gradient(145deg, #c084fc, #7c3aed);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 
    0 0 20px rgba(168, 85, 247, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.4);
  cursor: grab;
}

.vt-intensity-value {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #888;
}

.vt-intensity-value strong {
  color: #a855f7;
  font-weight: 600;
}

/* Preset Grid */
.vt-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  max-height: 280px;
  overflow-y: auto;
}

.vt-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.vt-preset::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.3), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.vt-preset:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-3px);
}

.vt-preset:hover::before {
  opacity: 1;
}

.vt-preset.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: #a855f7;
  box-shadow: 
    0 0 25px rgba(168, 85, 247, 0.35),
    inset 0 0 20px rgba(168, 85, 247, 0.1);
}

.vt-preset.active::before {
  opacity: 1;
}

.preset-icon {
  font-size: 1.6rem;
  position: relative;
  z-index: 1;
  transition: transform 0.2s;
}

.vt-preset:hover .preset-icon {
  transform: scale(1.15);
}

.vt-preset.active .preset-icon {
  transform: scale(1.05);
  /* Pulse animation removed (Jobs audit: ambient movement) */
}

.preset-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #888;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}

.vt-preset:hover .preset-name,
.vt-preset.active .preset-name {
  color: #fff;
}

/* Action Buttons */
.vt-actions {
  display: flex;
  gap: 0.75rem;
}

.vt-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #ddd;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s;
}

.vt-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.vt-btn:active {
  transform: translateY(0);
}

.vt-btn.primary {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  border: none;
  color: #fff;
}

.vt-btn.primary:hover {
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
}

.vt-btn.playing {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.vt-btn.playing:hover {
  background: rgba(239, 68, 68, 0.3);
}

.vt-btn .btn-icon {
  font-size: 1.1rem;
}

/* Processing Overlay */
.vt-processing {
  position: absolute;
  inset: 0;
  background: rgba(10, 5, 16, 0.97);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10;
}

.vt-processing.hidden {
  display: none;
}

.processing-spinner {
  width: 56px;
  height: 56px;
  border: 3px solid rgba(168, 85, 247, 0.2);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: vt-spin 0.7s linear infinite;
}

@keyframes vt-spin {
  to { transform: rotate(360deg); }
}

.processing-text {
  font-size: 1rem;
  color: #a855f7;
  font-weight: 500;
}

.processing-subtext {
  font-size: 0.8rem;
  color: #666;
}

/* Loading Tone.js */
.vt-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
}

.vt-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(168, 85, 247, 0.2);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: vt-spin 0.7s linear infinite;
}

.vt-loading-text {
  font-size: 0.9rem;
  color: #888;
}

/* Mobile Adjustments */
@media (max-width: 500px) {
  .vt-content {
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 20px;
  }
  
  .vt-header h2 {
    font-size: 1.2rem;
  }
  
  .vt-presets {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  
  .vt-preset {
    padding: 0.75rem 0.25rem;
  }
  
  .preset-icon {
    font-size: 1.4rem;
  }
  
  .preset-name {
    font-size: 0.65rem;
  }
  
  .vt-slider-container {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .vt-label {
    width: auto;
    flex: 0 0 auto;
  }
  
  .vt-slider {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
  }
  
  .vt-actions {
    flex-direction: column;
  }
}

/* Random shake animation - REMOVED (Jobs audit: easter egg/decorative) */
