: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: radial-gradient(ellipse at top, #14145a 0%, var(--bg-deep) 60%);
  color: var(--text-primary);
  font-family: 'Bricolage Grotesque', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 3px; }
.font-pixel { font-family: 'Press Start 2P', cursive; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

.btn-neon {
  background: linear-gradient(135deg, var(--accent-blue), #0044cc);
  color: white; border: none; padding: 10px 20px; border-radius: 8px;
  cursor: pointer; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  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-small { padding: 6px 12px; font-size: 0.75rem; border-radius: 6px; min-height: 32px; }

.toggle-neon { width: 44px; height: 24px; border-radius: 12px; background: #2a2a5e; position: relative; cursor: pointer; transition: background 0.3s; flex-shrink: 0; }
.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); }

.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); }
.panel-yugh { border-color: rgba(255,0,102,0.35); background: linear-gradient(160deg, #1a0f3a, #12123a); }

.drop-zone { border: 2px dashed var(--accent-blue); border-radius: 12px; padding: 32px 16px; text-align: center; transition: all 0.3s; cursor: pointer; }
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--accent-cyan); background: rgba(0,85,255,0.1); box-shadow: var(--glow-cyan); }
.drop-zone.small { padding: 16px 10px; border-color: var(--accent-pink); }

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; }
select { background: #1a1a4e; color: #e8e8ff; border: 1px solid #0055ff; border-radius: 6px; padding: 4px 6px; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; }

.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; touch-action: none; }
.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-block { min-width: 44px; height: 50px; border-radius: 6px; display: flex; flex-direction: column; 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; position: relative; overflow: hidden; }
.slice-block:hover, .slice-block.drop-hot { transform: scale(1.05); box-shadow: 0 0 15px rgba(0,229,255,0.4); }
.slice-block img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; pointer-events: none; }
.slice-block span { position: relative; z-index: 1; text-shadow: 0 1px 2px #000; }

.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); }

.img-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; border: 2px solid #2a2a5e; cursor: grab; transition: all .2s; }
.img-thumb.sel { border-color: var(--accent-pink); box-shadow: 0 0 12px rgba(255,0,102,.6); }

@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(0) translateY(0); } 25% { transform: rotate(-10deg) translateY(-5px); } 75% { transform: rotate(10deg) translateY(-5px); } }
@keyframes blobHeadbang { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-15deg) translateY(3px); } 75% { transform: rotate(15deg) translateY(3px); } }
@keyframes blobYugh { 0%,100% { transform: scale(1,1); } 50% { transform: scale(1.25,0.75); } }
.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; }
.blob-yugh { animation: blobYugh 0.4s ease-in-out infinite; }

@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(255,0,102,0.3); } }
.pulse-glow { animation: pulseGlow 2s ease-in-out infinite; }

@keyframes glitch { 0%,92%,100% { transform: none; text-shadow: 0 0 20px rgba(0,229,255,.5); } 94% { transform: translateX(-2px); text-shadow: 2px 0 #ff0066, -2px 0 #00e5ff; } 97% { transform: translateX(2px); text-shadow: -2px 0 #ff0066, 2px 0 #00e5ff; } }
.glitch { animation: glitch 3s infinite; }

.scanlines::after { content: ''; position: fixed; inset: 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-block { height: 36px; 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; overflow: hidden; position: relative; }
.timeline-block.now { outline: 2px solid #fff; box-shadow: 0 0 12px #fff; }
.timeline-block img { width: 100%; height: 100%; object-fit: cover; }

.vis-canvas { border-radius: 10px; border: 1px solid rgba(0,85,255,0.3); background: #050520; touch-action: none; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1a1a4e; border: 1px solid var(--accent-pink); padding: 12px 16px; border-radius: 10px; z-index: 10000; max-width: 92vw; box-shadow: 0 0 30px rgba(255,0,102,.4); }

[data-tooltip] { position: relative; }
@media (hover: hover) {
  [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); pointer-events: none; }
}
@media (max-width: 768px) { .drop-zone { padding: 20px 10px; } .pitch-knob { width: 90px; height: 90px; } }