body {
    margin: 0;
    padding: 0;
    background: #000;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', Courier, monospace;
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: -ms-auto-crisp-edge;
    image-rendering: pixelated;
}

.hidden {
    display: none !important;
}

/* Sound Design Board */
#soundBoard {
    position: absolute;
    top: 5vh;
    left: 5vw;
    width: 90vw;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(10, 12, 18, 0.96);
    border: 2px solid #33ff33;
    box-shadow: 0 0 20px rgba(51, 255, 51, 0.3);
    color: #33ff33;
    z-index: 10;
    padding: 16px;
    box-sizing: border-box;
}

.sb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #33ff33;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.sb-header h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#sbClose {
    background: transparent;
    border: 1px solid #33ff33;
    color: #33ff33;
    cursor: pointer;
    font-size: 16px;
    width: 28px;
    height: 28px;
}

#sbClose:hover {
    background: #33ff33;
    color: #000;
}

.sb-token {
    font-size: 12px;
    margin-bottom: 14px;
    opacity: 0.8;
}

.sb-section {
    margin-bottom: 16px;
}

.sb-section h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sb-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sb-buttons button {
    background: transparent;
    border: 1px solid #33ff33;
    color: #33ff33;
    padding: 6px 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
}

.sb-buttons button:hover {
    background: #33ff33;
    color: #000;
}

.sb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.sb-row label {
    font-size: 12px;
    min-width: 130px;
}

.sb-row input[type="range"] {
    flex: 1;
    cursor: pointer;
}

.sb-row input[type="number"] {
    width: 80px;
    background: #000;
    border: 1px solid #33ff33;
    color: #33ff33;
    padding: 4px;
    font-family: inherit;
    font-size: 12px;
}

#sbValues {
    width: 100%;
    background: #000;
    border: 1px solid #33ff33;
    color: #33ff33;
    padding: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    box-sizing: border-box;
    resize: vertical;
}

.sb-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.sb-actions button {
    background: transparent;
    border: 1px solid #33ff33;
    color: #33ff33;
    padding: 6px 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
}

.sb-actions button:hover {
    background: #33ff33;
    color: #000;
}

.sb-preview-btn {
    background: transparent;
    border: 1px solid #33ff33;
    color: #33ff33;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sb-preview-btn:hover {
    background: #33ff33;
    color: #000;
}

.sb-row select {
    flex: 1;
    background: #000;
    border: 1px solid #33ff33;
    color: #33ff33;
    padding: 4px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

/* Token Modal */
#tokenModal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.modal-box {
    background: rgba(10, 12, 18, 0.98);
    border: 2px solid #33ff33;
    padding: 20px;
    width: 300px;
    color: #33ff33;
    text-align: center;
}

.modal-box h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    text-transform: uppercase;
}

#tokenInput {
    width: 100%;
    background: #000;
    border: 1px solid #33ff33;
    color: #33ff33;
    padding: 8px;
    font-family: inherit;
    font-size: 14px;
    text-transform: uppercase;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.modal-actions button {
    background: transparent;
    border: 1px solid #33ff33;
    color: #33ff33;
    padding: 6px 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
}

.modal-actions button:hover {
    background: #33ff33;
    color: #000;
}

#tokenError {
    color: #ff3333;
    font-size: 12px;
    margin: 8px 0 0 0;
}