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

body {
    overflow: hidden;
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #ccc;
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

#error-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    color: #ff6b6b;
    font-size: 1.2rem;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    z-index: 100;
}

/* Stats overlay */
#stats {
    position: fixed;
    top: 12px;
    left: 12px;
    font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
    font-size: 13px;
    color: #4ade80;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
    z-index: 10;
    pointer-events: none;
    line-height: 1.6;
}

/* Control panel */
#controls {
    position: fixed;
    top: 12px;
    right: 12px;
    width: 240px;
    background: rgba(10, 10, 20, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(100, 100, 200, 0.2);
    border-radius: 12px;
    padding: 16px;
    z-index: 10;
    font-size: 12px;
}

#controls h2 {
    font-size: 14px;
    font-weight: 600;
    color: #a0a0ff;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.control-group {
    margin-bottom: 10px;
}

.control-group label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    color: #888;
    font-size: 11px;
}

.control-group label span {
    color: #bbb;
    font-family: 'SF Mono', monospace;
}

input[type="range"] {
    width: 100%;
    height: 4px;
    appearance: none;
    background: rgba(100, 100, 200, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #7070ff;
    border: 2px solid #a0a0ff;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #9090ff;
    transform: scale(1.1);
}

select, button {
    width: 100%;
    padding: 6px 10px;
    margin-bottom: 6px;
    background: rgba(40, 40, 80, 0.7);
    color: #ccc;
    border: 1px solid rgba(100, 100, 200, 0.3);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

select:hover, button:hover {
    background: rgba(60, 60, 100, 0.8);
    border-color: rgba(120, 120, 220, 0.5);
}

.btn-row {
    display: flex;
    gap: 6px;
}

.btn-row button {
    flex: 1;
}

.help-text {
    margin-top: 10px;
    font-size: 10px;
    color: #555;
    line-height: 1.5;
}
