:root {
  --primary-color: #6a11cb;
  --secondary-color: #3915ed;
  --dark-color: #23235c;
  --light-color: #f8f9fa;
  --gray-color: #397db9;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #141e30, #243b55);
  color: white;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

h3 {
  text-align: center;
  margin: 25px 0 15px 0;
  color: var(--light-color);
  font-size: 1.3rem;
}

h4 {
  color: var(--light-color);
  margin-bottom: 10px;
}

.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 10px;
}

.tab-btn {
  padding: 12px 25px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50px;
  color: var(--light-color);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  box-shadow: 0 4px 15px rgba(203, 17, 129, 0.4);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.file-upload {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  border: 2px dashed rgba(156, 123, 123, 0.2);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.file-upload:hover {
  border-color: var(--primary-color);
  background: rgba(106, 17, 203, 0.1);
}

.btn-upload {
  display: inline-block;
  padding: 12px 25px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(106, 17, 203, 0.4);
}

.btn-upload:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(106, 17, 203, 0.6);
}

#fileInput, #videoInput {
  display: none;
}

#songName, #videoName {
  margin-top: 15px;
  font-size: 1rem;
  color: var(--gray-color);
}

.audio-info {
  font-size: 0.8rem;
  color: var(--gray-color);
  margin-top: 5px;
}

/* Indicador Estéreo */
.stereo-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 10px;
  background: rgba(62, 14, 176, 0.2);
  border-radius: 20px;
  border: 1px solid var(--primary-color);
}

.stereo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.stereo-dot.left {
  background: #ae1010;
  animation-delay: 0s;
}

.stereo-dot.right {
  background: #0000ff;
  animation-delay: 1s;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Balance estéreo */
.stereo-balance {
  text-align: center;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(232, 114, 114, 0.05);
  border-radius: 10px;
}

.balance-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.balance-control span {
  font-weight: 600;
  min-width: 40px;
}

#balanceSlider {
  width: 200px;
}

.video-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 30px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
}

#videoPlayer {
  width: 100%;
  display: block;
  background: #000;
}

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-container:hover .video-controls {
  opacity: 1;
}

.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.control-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(106, 17, 203, 0.4);
}

.control-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(106, 17, 203, 0.6);
}

.progress-container {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.progress-bar {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

.progress {
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 3px;
  width: 0%;
}

.time-display {
  font-size: 0.9rem;
  color: var(--light-color);
  min-width: 100px;
  text-align: center;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-slider {
  width: 100px;
}

/* Visualizador Estéreo */
.stereo-visualizer {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.channel-visualizer {
  flex: 1;
  text-align: center;
}

.channel-visualizer label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--light-color);
}

.channel-visualizer canvas {
  width: 100%;
  height: 200px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

/* Preamplificador */
.preamplifier-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stereo-pream-controls {
  display: flex;
  justify-content: space-around;
  gap: 100px;
  flex-wrap: wrap;
}

.channel-controls {
  flex: 1;
  min-width: 150px;
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.channel-controls h4 {
  margin-bottom: 15px;
  color: var(--light-color);
}

.global-controls {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.pream-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.pream-control label {
  font-weight: 600;
  color: var(--light-color);
  font-size: 0.9rem;
}

.pream-control input[type="range"] {
  width: 120px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  accent-color: var(--primary-color);
}

.level-meter {
  width: 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.level-bar {
  height: 100%;
  background: linear-gradient(to right, #00ff00, #ffff00, #ff0000);
  width: 0%;
  transition: width 0.1s ease;
}

.pream-control span {
  font-size: 1.0rem;
  color: var(--gray-color);
  font-weight: 600;
}

/* Ecualizador */
.equalizer-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stereo-equalizer {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.channel-eq {
  flex: 1;
  padding: 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.channel-eq h4 {
  text-align: center;
  margin-bottom: 15px;
  color: var(--light-color);
}

.equalizer {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.band {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #f3d9d9;
  gap: 8px;
}

.band label {
  font-size: 15px;
  font-weight: 600;
}

.band input[type="range"] {
  writing-mode: bt-lr;
  -webkit-appearance: slider-vertical;
  height: 200px;
  cursor: pointer;
  accent-color: #2368b7;
}

.band-value {
  font-size: 15px;
  color: var(--gray-color);
  font-weight: 600;
  min-height: 15px;
}

.eq-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.eq-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(134, 68, 68, 0.2);
  border-radius: 20px;
  color: var(--light-color);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.eq-btn:hover {
  background: rgba(106, 17, 203, 0.3);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .stereo-visualizer,
  .stereo-pream-controls,
  .stereo-equalizer {
    flex-direction: column;
  }
  
  .channel-controls,
  .channel-eq {
    min-width: 100%;
  }
  
  .equalizer {
    gap: 8px;
  }

  .band input[type="range"] {
    height: 80px;
  }
  
  .player-controls {
    gap: 10px;
  }
  
  .progress-container {
    order: 3;
    width: 100%;
    margin-top: 15px;
  }
  
  .video-controls {
    padding: 10px;
    gap: 10px;
  }
  
  .control-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .pream-control {
    min-width: 100px;
  }
  
  .pream-control input[type="range"] {
    width: 100px;
  }
  
  .level-meter {
    width: 100px;
  }
}