:root {
    --bg-deep: #0d0d1a;
    --bg-card: rgba(26, 26, 46, 0.7);
    --purple: #7b2ff7;
    --pink: #ff2e97;
    --cyan: #00f5d4;
    --yellow: #ffe156;
}

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

body {
    background: var(--bg-deep);
    color: #e0e0f0;
    font-family: 'Bricolage Grotesque', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(123, 47, 247, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 46, 151, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(0, 245, 212, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#root { position: relative; z-index: 1; }

.font-mono { font-family: 'JetBrains Mono', monospace !important; }

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(123, 47, 247, 0.2);
    border-radius: 16px;
}

.neon-glow { box-shadow: 0 0 20px rgba(123, 47, 247, 0.4), 0 0 60px rgba(123, 47, 247, 0.1); }
.neon-glow-pink { box-shadow: 0 0 20px rgba(255, 46, 151, 0.4), 0 0 60px rgba(255, 46, 151, 0.1); }
.neon-glow-cyan { box-shadow: 0 0 15px rgba(0, 245, 212, 0.3), 0 0 40px rgba(0, 245, 212, 0.1); }

.drop-zone {
    border: 2px dashed rgba(123, 47, 247, 0.5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.drop-zone::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(123,47,247,0.03), rgba(255,46,151,0.03));
    opacity: 0; transition: opacity 0.3s;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--cyan); box-shadow: 0 0 30px rgba(0, 245, 212, 0.2); }
.drop-zone:hover::before, .drop-zone.drag-over::before { opacity: 1; }

.glitch-title {
    position: relative;
    text-shadow: 2px 0 var(--pink), -2px 0 var(--cyan);
    animation: glitch 3s infinite;
}
@keyframes glitch {
    0%, 90%, 100% { text-shadow: 2px 0 var(--pink), -2px 0 var(--cyan); }
    92% { text-shadow: -3px 1px var(--pink), 3px -1px var(--cyan); }
    94% { text-shadow: 3px -2px var(--pink), -3px 2px var(--cyan); }
    96% { text-shadow: -1px 3px var(--pink), 1px -3px var(--cyan); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(123, 47, 247, 0.4), 0 0 60px rgba(123, 47, 247, 0.15); }
    50% { box-shadow: 0 0 30px rgba(123, 47, 247, 0.6), 0 0 80px rgba(123, 47, 247, 0.25), 0 0 120px rgba(255, 46, 151, 0.1); }
}
.pulse-btn { animation: pulse-glow 2s ease-in-out infinite; }

.scanlines::after {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.15) 2px, rgba(0, 0, 0, 0.15) 4px);
    pointer-events: none;
    border-radius: inherit;
}

.progress-step { transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

.clip-thumb { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.clip-thumb:hover { transform: scale(1.04); box-shadow: 0 0 20px rgba(123, 47, 247, 0.3); }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin 1s linear infinite; }

@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-slide-in { animation: fadeSlideIn 0.5s ease-out forwards; }

@keyframes confetti-fall { 0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; } 100% { transform: translateY(110vh) rotate(720deg); opacity: 0; } }
.confetti-piece { position: fixed; width: 10px; height: 10px; z-index: 9999; pointer-events: none; animation: confetti-fall 3s ease-in forwards; }

.piano-roll-container { overflow-x: auto; overflow-y: hidden; }
.piano-roll-container::-webkit-scrollbar { height: 8px; }
.piano-roll-container::-webkit-scrollbar-track { background: rgba(13, 13, 26, 0.5); border-radius: 4px; }
.piano-roll-container::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 4px; }

.toast-enter { animation: fadeSlideIn 0.3s ease-out; }

/* ── Trim editor ── */
.trim-overlay {
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(5, 5, 12, 0.85);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: fadeSlideIn 0.25s ease-out;
}
.trim-modal {
    width: 100%; max-width: 560px;
    padding: 20px;
    max-height: 92vh; overflow-y: auto;
}
.trim-track { touch-action: none; }
.trim-handle {
    position: absolute; top: -3px; bottom: -3px; width: 16px;
    border-radius: 4px; cursor: ew-resize;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
    touch-action: none;
    z-index: 5;
}
.trim-handle::after {
    content: ''; position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 2px; height: 18px; background: rgba(255,255,255,0.8); border-radius: 2px;
}

/* ── Layout editor tiles ── */
.layout-editor { touch-action: none; user-select: none; }
.layout-tile { transition: box-shadow 0.15s ease; touch-action: none; }
.layout-tile:hover { box-shadow: 0 0 24px currentColor; }

@media (max-width: 768px) {
    .glitch-title { font-size: 1.9rem !important; }
    .trim-modal { padding: 14px; }
}
</parameter>
</function>