:root {
  --bg: #05070c; --cyan: #00f0ff; --magenta: #d946ef; --crimson: #f43f5e; --lime: #39ff14; --amber: #f59e0b;
  --glass: rgba(10, 14, 24, 0.72); --border: rgba(255, 255, 255, 0.11); --text: #eef3ff; --muted: #8a97b5;
}
* { box-sizing: border-box; user-select: none; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif; font-size: 12px; }
#edm-viz { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; }
.hidden { display: none !important; }

.enter-overlay { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at center, rgba(16,22,40,0.88), rgba(5,7,12,0.96)); backdrop-filter: blur(14px); }
.enter-card { text-align: center; padding: 36px 44px; border-radius: 18px; border: 1px solid rgba(0,240,255,0.28); background: rgba(12,16,28,0.9); box-shadow: 0 0 60px rgba(0,240,255,0.18); max-width: 480px; }
.enter-card h1 { margin: 0 0 8px; font-size: 34px; letter-spacing: 0.16em; }
.enter-card h1 span { color: var(--cyan); }
.enter-card p { color: var(--muted); margin: 0 0 22px; line-height: 1.5; }
.enter-btn { background: linear-gradient(90deg, var(--cyan), var(--magenta)); color: #05070c; border: none; border-radius: 99px; padding: 14px 36px; font-size: 14px; font-weight: 900; letter-spacing: 0.14em; cursor: pointer; box-shadow: 0 0 28px rgba(0,240,255,0.45); }
.safe-lbl { display: block; margin-top: 16px; color: var(--muted); font-size: 11px; cursor: pointer; }

.hud { position: relative; z-index: 10; display: flex; flex-direction: column; height: 100vh; padding: 10px; gap: 10px; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--border); backdrop-filter: blur(12px); }
.brand { font-weight: 900; letter-spacing: 0.14em; display: flex; align-items: center; gap: 7px; font-size: 13px; }
.brand em { font-style: normal; color: var(--cyan); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.hud-sel, .bpm-in { background: rgba(20,26,42,0.9); color: var(--text); border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; font-size: 11px; font-weight: 600; }
.bpm-in { width: 56px; text-align: center; color: var(--cyan); }
.hud-btn { background: rgba(20,26,42,0.88); color: var(--text); border: 1px solid var(--border); border-radius: 7px; padding: 6px 10px; font-weight: 700; font-size: 11px; cursor: pointer; }
.hud-btn.active { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 12px rgba(0,240,255,0.28); }
.hud-btn.crimson { border-color: var(--crimson); color: var(--crimson); }
.hud-btn.crimson.active { background: var(--crimson); color: #fff; }
.hud-btn.sm { padding: 3px 7px; font-size: 10px; }
.sec-pill { font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 99px; background: rgba(217,70,239,0.2); border: 1px solid var(--magenta); color: var(--magenta); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.lbl { font-size: 9px; color: var(--muted); font-weight: 800; letter-spacing: 0.08em; }

.hud-mid { flex: 1; display: flex; align-items: flex-end; gap: 10px; min-height: 0; }
.deck-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.glass-panel { background: var(--glass); border: 1px solid var(--border); border-radius: 12px; padding: 10px; backdrop-filter: blur(12px); }
.panel-hdr { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 0.08em; }
.cyan-txt { color: var(--cyan); }
.play-btn { background: rgba(57,255,20,0.16); color: var(--lime); border: 1px solid var(--lime); border-radius: 7px; padding: 5px 12px; font-weight: 900; cursor: pointer; }
.play-btn.on { background: var(--lime); color: #040805; box-shadow: 0 0 16px rgba(57,255,20,0.5); }

.seq-grid { display: flex; flex-direction: column; gap: 4px; }
.seq-row { display: grid; grid-template-columns: 58px repeat(16, 1fr); gap: 3px; align-items: center; }
.seq-lbl { font-size: 9px; font-weight: 800; color: var(--muted); letter-spacing: 0.06em; }
.step-cell { height: 22px; border-radius: 4px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); cursor: pointer; }
.step-cell.beat { background: rgba(255,255,255,0.11); }
.step-cell.on { background: var(--cyan); border-color: #fff; box-shadow: 0 0 8px rgba(0,240,255,0.5); }
.step-cell.bass.on { background: var(--magenta); box-shadow: 0 0 8px rgba(217,70,239,0.55); }
.step-cell.cur { outline: 2px solid var(--lime); }

.play-keys { display: grid; grid-template-columns: repeat(13, 1fr); gap: 4px; height: 64px; }
.pkey { border-radius: 6px; background: rgba(22,28,44,0.85); border: 1px solid var(--border); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px; font-size: 9px; color: var(--muted); cursor: pointer; }
.pkey.black { background: rgba(10,13,22,0.92); }
.pkey.active { background: linear-gradient(180deg, rgba(0,240,255,0.38), rgba(217,70,239,0.35)); border-color: var(--cyan); color: #fff; }

.dj-rail { width: 108px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; max-height: 460px; }
.dj-rail-hdr { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 900; color: var(--cyan); }
.dj-rail-knobs { flex: 1; display: flex; flex-direction: column; justify-content: space-around; align-items: center; }
.knob-u { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: ns-resize; }
.knob-u svg { width: 42px; height: 42px; }
.knob-u span { font-size: 9px; color: var(--muted); font-weight: 700; }
