*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --cyan: #00f0ff;
  --magenta: #ff00aa;
  --purple: #8b5cf6;
  --deep-purple: #2a1a5e;
}

body {
  background: var(--bg);
  color: #e0e0e0;
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

#root {
  width: 100%;
  height: 100%;
}

/* Noise overlay */
.noise-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* Glow text */
.glow-cyan { text-shadow: 0 0 10px var(--cyan), 0 0 30px var(--cyan), 0 0 60px rgba(0,240,255,0.3); color: var(--cyan); }
.glow-magenta { text-shadow: 0 0 10px var(--magenta), 0 0 30px var(--magenta); color: var(--magenta); }
.glow-purple { text-shadow: 0 0 10px var(--purple), 0 0 30px var(--purple); color: var(--purple); }

/* Pulse animation for mic icon */
@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 8px var(--cyan)) drop-shadow(0 0 20px rgba(0,240,255,0.4)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 16px var(--cyan)) drop-shadow(0 0 40px rgba(0,240,255,0.6)); transform: scale(1.05); }
}

.mic-pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Hexagon clip path */
.hex-zone {
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 2px; }

/* Canvas containers */
.eq-canvas { position: fixed; z-index: 10; pointer-events: none; }
.eq-top { top: 0; left: 0; width: 100%; height: 48px; }
.eq-bottom { bottom: 0; left: 0; width: 100%; height: 48px; }
.eq-left { top: 0; left: 0; width: 48px; height: 100%; }
.eq-right { top: 0; right: 0; width: 48px; height: 100%; }

/* Tooltip */
.color-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  background: rgba(10,10,15,0.92);
  border: 1px solid var(--cyan);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  box-shadow: 0 0 12px rgba(0,240,255,0.3);
  backdrop-filter: blur(8px);
}

/* Side panel */
.side-panel {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.side-panel.closed {
  transform: translateX(100%);
  opacity: 0;
}
.side-panel.open {
  transform: translateX(0);
  opacity: 1;
}

/* Playback controls */
.retro-dial {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #333, #111);
  border: 2px solid var(--purple);
  position: relative;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(139,92,246,0.4);
}

.retro-dial::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 12px;
  background: var(--cyan);
  border-radius: 1px;
  transform-origin: bottom center;
}

/* Upload zone border animation */
@keyframes border-rotate {
  0% { border-color: var(--cyan); }
  33% { border-color: var(--magenta); }
  66% { border-color: var(--purple); }
  100% { border-color: var(--cyan); }
}

.upload-zone {
  border: 2px dashed var(--cyan);
  animation: border-rotate 4s linear infinite;
  transition: all 0.3s ease;
}

.upload-zone:hover, .upload-zone.drag-over {
  border-width: 3px;
  background: rgba(0,240,255,0.05);
}

/* Spectrogram playhead */
@keyframes sweep {
  0% { left: 0; }
  100% { left: 100%; }
}

/* Progress bar styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  margin-top: -5px;
  box-shadow: 0 0 8px var(--cyan);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  border-radius: 2px;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  border: none;
  box-shadow: 0 0 8px var(--cyan);
}

/* Algorithm panel graph */
.algo-graph {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 4px;
}

/* Footer */
.app-footer a {
  color: var(--magenta);
  text-decoration: none;
  transition: text-shadow 0.2s ease;
}
.app-footer a:hover {
  text-shadow: 0 0 10px var(--magenta);
}

@media (max-width: 768px) {
  .eq-left, .eq-right { display: none; }
  .side-panel { display: none !important; }
}