@import url('/lib/crt-effects.css');

:root { --su-accent: #d9a441; }

body { background: #0a0710; margin: 0; overflow: hidden; }
#app { width: 100vw; height: calc(100vh - 48px); }
@media (max-width: 768px) { #app { height: calc(100vh - 40px); } }

* { box-sizing: border-box; }

.su-root {
    position: relative; width: 100%; height: 100%;
    font-family: 'Space Grotesk', 'IBM Plex Mono', sans-serif;
    color: #f2e6cc; overflow: hidden;
}
.su-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }

/* ---- Overlay ---- */
.su-overlay {
    position: absolute; inset: 0; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10, 7, 16, 0.55); backdrop-filter: blur(3px);
}
.su-panel {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    max-width: 540px; padding: 34px 40px; text-align: center;
    background: linear-gradient(180deg, rgba(38, 26, 18, 0.95), rgba(20, 14, 10, 0.95));
    border: 1px solid rgba(217, 164, 65, 0.2); border-radius: 6px;
    box-shadow: 0 24px 70px -30px #000;
    animation: su-reveal 0.2s ease;
}
@keyframes su-reveal { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.su-title {
    font-family: 'Space Mono', monospace; font-size: clamp(24px, 5vw, 38px); font-weight: 700;
    letter-spacing: 6px; color: #fff3e4;
    text-shadow: 0 0 28px rgba(217, 164, 65, 0.55);
}
.su-tag { font-size: 13px; color: #c9a98d; letter-spacing: 0.5px; line-height: 1.55; max-width: 440px; }

.su-start {
    display: inline-flex; align-items: center; justify-content: center;
    height: 44px; padding: 0 26px; border-radius: 3px;
    border: 1px solid var(--su-accent); background: rgba(217, 164, 65, 0.14);
    color: var(--su-accent); font-size: 15px; font-family: inherit; cursor: pointer; transition: all 0.15s;
}
.su-start:hover { background: var(--su-accent); color: #140f08; box-shadow: 0 0 22px -6px var(--su-accent); }

/* ---- Bottom control bar (house style) ---- */
.su-controls {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 11;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
    padding: 7px 12px;
    background: rgba(10, 7, 16, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    font-family: 'Space Mono', 'IBM Plex Mono', monospace;
}
.su-play {
    display: inline-flex; align-items: center; justify-content: center;
    height: 30px; min-width: 40px; padding: 0 12px; border-radius: 3px;
    border: 1px solid var(--su-accent); background: transparent;
    color: var(--su-accent); font-size: 12px; font-family: inherit; cursor: pointer;
    line-height: 1; transition: all 0.15s;
}
.su-play:hover { background: rgba(217, 164, 65, 0.16); }
.su-play.playing { background: var(--su-accent); color: #140f08; }
.su-play.loading { font-size: 11px; cursor: default; }
.su-play.idle { animation: su-play-pulse 1.9s ease-in-out infinite; }
@keyframes su-play-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 164, 65, 0); } 50% { box-shadow: 0 0 12px -3px var(--su-accent); } }

.su-swatches { display: inline-flex; align-items: center; gap: 5px; padding: 0 2px; }
.su-swatch {
    width: 20px; height: 20px; border-radius: 3px; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.12s; padding: 0;
}
.su-swatch:hover { transform: translateY(-1px); }
.su-swatch.active { border-color: #fff3e4; box-shadow: 0 0 8px -1px var(--su-accent); transform: translateY(-1px); }

.su-btn {
    display: inline-flex; align-items: center; height: 30px; padding: 0 10px;
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.12);
    color: #9a8875; border-radius: 3px; cursor: pointer; font-size: 11px;
    font-family: inherit; line-height: 1; transition: all 0.12s; white-space: nowrap;
}
.su-btn:hover:not(:disabled) { border-color: var(--su-accent); color: var(--su-accent); }
.su-btn:disabled { opacity: 0.3; cursor: default; }
.su-btn.active { border-color: var(--su-accent); color: var(--su-accent); }

.su-tempo {
    display: inline-flex; align-items: center; gap: 8px;
    height: 30px; padding: 0 10px; border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.12); background: transparent;
}
.su-tempo-lbl { font-size: 10px; color: #776655; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.su-tempo-val { color: var(--su-accent); font-weight: 700; }

.su-slider {
    -webkit-appearance: none; appearance: none; display: block;
    width: 84px; height: 3px; outline: none; border-radius: 2px;
    background: #241a12; cursor: pointer;
}
.su-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 11px; height: 11px; border-radius: 2px;
    background: var(--su-accent); box-shadow: 0 0 6px var(--su-accent); cursor: pointer;
}
.su-slider::-moz-range-thumb {
    width: 11px; height: 11px; border-radius: 2px; border: none;
    background: var(--su-accent); box-shadow: 0 0 6px var(--su-accent); cursor: pointer;
}

@media (max-width: 640px) {
    .su-panel { padding: 24px 20px; margin: 0 14px; }
    .su-controls { gap: 6px; }
}
