:root {
  --bg-deep: #0a0a2e;
  --bg-card: #12123a;
  --bg-panel: #1a1a4e;
  --accent-blue: #0055ff;
  --accent-cyan: #00e5ff;
  --accent-pink: #ff0066;
  --text-primary: #e8e8ff;
  --text-secondary: #8888cc;
  --glow-blue: 0 0 20px rgba(0, 85, 255, 0.4);
  --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.3);
}

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

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 3px; }

/* Pixel font */
.font-pixel { font-family: 'Press Start 2P', cursive; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* Glow effects */
.glow-blue { box-shadow: var(--glow-blue); }
.glow-cyan { box-shadow: var(--glow-cyan); }
.glow-border { border: 1px solid var(--accent-blue); box-shadow: var(--glow-blue), inset 0 0 20px rgba(0, 85, 255, 0.05); }
.glow-border-cyan { border: 1px solid var(--accent-cyan); box-shadow: var(--glow-cyan); }

/* Neon button */
.btn-neon {
  background: linear-gradient(135deg, var(--accent-blue), #0044cc);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 0 15px rgba(0, 85, 255, 0.3);
}
.btn-neon:hover {
  box-shadow: 0 0 30px rgba(0, 85, 255, 0.6);
  transform: translateY(-1px);
}
.btn-neon:active { transform: translateY(1px); }

.btn-danger {
  background: linear-gradient(135deg, var(--accent-pink), #cc0044);
  box-shadow: 0 0 15px rgba(255, 0, 102, 0.3);
}
.btn-danger:hover { box-shadow: 0 0 30px rgba(255, 0, 102, 0.6); }

.btn-small {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 6px;
}

/* Toggle switch */
.toggle-neon {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #2a2a5e;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}
.toggle-neon.active { background: var(--accent-blue); box-shadow: var(--glow-blue); }
.toggle-neon::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 0.3s;
}
.toggle-neon.active::after { transform: translateX(20px); }

/* Panels */
.panel {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid rgba(0, 85, 255, 0.2);
  padding: 16px;
  transition: border-color 0.3s;
}
.panel:hover { border-color: rgba(0, 85, 255, 0.4); }

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--accent-blue);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent-cyan);
  background: rgba(0, 85, 255, 0.1);
  box-shadow: var(--glow-cyan);
}

/* Slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #2a2a5e;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  border: none;
}

/* Knob */
.pitch-knob {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, #2a2a5e 40%, #1a1a3e 100%);
  border: 3px solid var(--accent-blue);
  box-shadow: var(--glow-blue), inset 0 0 30px rgba(0, 0, 0, 0.5);
  position: relative;
  cursor: grab;
  user-select: none;
}
.pitch-knob:active { cursor: grabbing; }
.pitch-knob .indicator {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 20px;
  background: var(--accent-cyan);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* Slice blocks */
.slice-block {
  min-width: 50px;
  height: 50px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  user-select: none;
}
.slice-block:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

/* Visual preset cards */
.preset-card {
  border-radius: 10px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--bg-panel);
}
.preset-card:hover { border-color: var(--accent-cyan); transform: translateY(-2px); }
.preset-card.active { border-color: var(--accent-cyan); box-shadow: var(--glow-cyan); }

/* Blob mascot */
@keyframes blobBounce {
  0%, 100% { transform: translateY(0) scaleX(1) scaleY(1); }
  30% { transform: translateY(-8px) scaleX(0.95) scaleY(1.05); }
  60% { transform: translateY(-3px) scaleX(1.02) scaleY(0.98); }
}
@keyframes blobDance {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-10deg) translateY(-5px); }
  50% { transform: rotate(0deg) translateY(0); }
  75% { transform: rotate(10deg) translateY(-5px); }
}
@keyframes blobHeadbang {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg) translateY(3px); }
  75% { transform: rotate(15deg) translateY(3px); }
}
.blob-bounce { animation: blobBounce 2s ease-in-out infinite; }
.blob-dance { animation: blobDance 0.5s ease-in-out infinite; }
.blob-headbang { animation: blobHeadbang 0.3s ease-in-out infinite; }

/* Pulsing glow */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 85, 255, 0.3); }
  50% { box-shadow: 0 0 40px rgba(0, 85, 255, 0.7), 0 0 60px rgba(0, 229, 255, 0.3); }
}
.pulse-glow { animation: pulseGlow 2s ease-in-out infinite; }

/* VHS scanline overlay */
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
.scanlines::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Timeline */
.timeline-block {
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 30px;
  flex-shrink: 0;
}

/* Canvas visualizer */
.vis-canvas {
  border-radius: 10px;
  border: 1px solid rgba(0, 85, 255, 0.3);
  background: #050520;
}

/* Tooltip */
[data-tooltip] {
  position: relative;
}
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a4e;
  color: var(--accent-cyan);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  white-space: nowrap;
  border: 1px solid var(--accent-blue);
  z-index: 100;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: var(--glow-blue);
}

/* Responsive */
@media (max-width: 768px) {
  .drop-zone { padding: 20px 10px; }
  .pitch-knob { width: 90px; height: 90px; }
}