body {
    margin: 0;
    overflow: hidden;
    background-color: #e0e0e0;
    /* Light grey base */
    color: #000000;
    /* Black text */
    font-family: 'Courier New', Courier, monospace;
    /* Monospace font */
    text-transform: uppercase;
    /* All caps */
}

/* Vignette Effect */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 2;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #000;
    pointer-events: auto;
    z-index: 10;

    /* Brutalist Panel */
    background: #f0f0f0;
    padding: 3rem;
    border: 1px solid #000;
    border-radius: 0;
    /* No radius */
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.2);
    /* Hard shadow */
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 2rem;
    color: #000;
}

p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
}

button {
    background: transparent;
    color: #000;
    border: 1px solid #000;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0;
    /* No radius */
    transition: all 0.1s ease;
}

button:hover {
    background: #000;
    color: #fff;
}

button:active {
    transform: translate(2px, 2px);
}

#fullscreen-btn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 20;
    padding: 0.5rem 0.75rem;
    font-size: 1.2rem;
    line-height: 1;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.4);
    color: #fff;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

#fullscreen-btn:hover {
    background: rgba(0,0,0,0.8);
    color: #fff;
    opacity: 1;
}

/* ── Sequencer toggle button ─────────────────────────────────────────────── */
#seq-toggle-btn {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 20;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.4);
    color: #fff;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}
#seq-toggle-btn:hover  { opacity: 1; background: rgba(0,0,0,0.8); color: #fff; }
#seq-toggle-btn.active { border-color: #ff00c1; color: #ff00c1; opacity: 1; background: rgba(0,0,0,0.6); }

/* ── Sequencer panel ─────────────────────────────────────────────────────── */
.seq-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 15;
    background: #f0f0f0;
    border-top: 2px solid #000;
    padding: 8px 12px 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 42vh;
    overflow-y: auto;
    transition: transform 0.2s ease;
}
.seq-panel.seq-hidden {
    transform: translateY(100%);
    pointer-events: none;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.seq-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
    margin-bottom: 2px;
}
.seq-transport { display: flex; gap: 4px; }

.seq-param-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.seq-param-group label { font-weight: 700; font-size: 10px; }
.seq-param-group input[type=number] {
    width: 48px;
    border: 1px solid #000;
    background: #fff;
    padding: 2px 4px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 700;
}
.seq-param-group input[type=range] { width: 70px; }

.seq-slots {
    display: flex;
    align-items: center;
    gap: 4px;
}
.seq-slots span { font-weight: 700; font-size: 10px; }

/* ── Generic seq buttons ─────────────────────────────────────────────────── */
.seq-btn {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    padding: 3px 7px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.05s, color 0.05s;
    border-radius: 0;
}
.seq-btn:hover          { background: #000; color: #fff; }
.seq-btn.active         { background: #000; color: #fff; }
.seq-btn.seq-play.playing { background: #ff00c1; color: #fff; border-color: #ff00c1; }

.seq-slot-btn {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    padding: 3px 7px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    cursor: pointer;
    border-radius: 0;
}
.seq-slot-btn.active { background: #000; color: #fff; }

/* ── Track row ───────────────────────────────────────────────────────────── */
.seq-track {
    display: flex;
    align-items: center;
    gap: 6px;
}
.seq-track-label {
    width: 46px;
    font-weight: 700;
    font-size: 9px;
    flex-shrink: 0;
    letter-spacing: 1px;
}
.seq-steps {
    display: flex;
    gap: 2px;
    flex-wrap: nowrap;
    align-items: center;
}
.seq-track-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
}
.seq-len-sel {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    border: 1px solid #000;
    background: #fff;
    padding: 1px 2px;
}

/* ── Step button ─────────────────────────────────────────────────────────── */
.seq-step {
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid #000;
    cursor: pointer;
    position: relative;
    transition: background 0.04s;
    flex-shrink: 0;
    padding: 0;
    border-radius: 0;
}
/* Beat boundary separator every 4 steps */
.seq-step:nth-child(4n+1) { margin-left: 5px; }
.seq-step:nth-child(1)    { margin-left: 0 !important; }

.seq-step.active          { background: #000; }
.seq-step.playing         { background: #ff00c1 !important; border-color: #ff00c1; }

/* Trig condition indicator */
.seq-step.has-cond::after {
    content: attr(data-cond);
    position: absolute;
    bottom: 2px; right: 2px;
    font-size: 6px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #999;
    line-height: 1;
}
.seq-step.active.has-cond::after { color: #ccc; }

/* Condition dot for never */
.seq-step.has-cond:not([data-cond])::after {
    content: '∅';
}

/* ── Page nav ────────────────────────────────────────────────────────────── */
.seq-page-btn {
    width: 16px;
    height: 24px;
    font-size: 10px;
    padding: 0;
    border: 1px solid #000;
    background: #fff;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    border-radius: 0;
    line-height: 1;
}
.seq-page-btn:hover { background: #000; color: #fff; }

/* ── Step edit popover ───────────────────────────────────────────────────── */
.seq-popover {
    position: fixed;
    z-index: 100;
    background: #f0f0f0;
    border: 1px solid #000;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    padding: 8px 10px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}
.seq-pop-title {
    font-weight: 700;
    font-size: 9px;
    letter-spacing: 1px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4px;
    margin-bottom: 2px;
}
.seq-popover label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 9px;
}
.seq-popover input[type=range]  { width: 80px; }
.seq-popover select {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    border: 1px solid #000;
    background: #fff;
    padding: 1px 2px;
    cursor: pointer;
}
.seq-popover input[type=number] {
    width: 48px;
    border: 1px solid #000;
    background: #fff;
    padding: 2px 4px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
}

/* GUI Tweaks (optional, if you want to brutalize lil-gui) */
.lil-gui {
    --background-color: #f0f0f0;
    --text-color: #000;
    --title-background-color: #ccc;
    --widget-color: #e0e0e0;
    --hover-color: #fff;
    --focus-color: #fff;
    --number-color: #000;
    --string-color: #000;
    font-family: 'Courier New', monospace !important;
}