body {
    margin: 0;
    padding: 0;
    background-color: #111;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

canvas {
    display: block;
    /* Ensure canvas is behind controls */
    z-index: 1;
}

/* --- Controls Container --- */
#controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%); /* Center horizontally */
    width: 90%;
    max-width: 1000px;

    /* Glassmorphism */
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    padding: 15px 25px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: #eee;
    font-size: 13px;
    z-index: 100;

    /* Transition for hover effect */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hover: Slight lift */
#controls:hover {
    background: rgba(20, 20, 20, 0.85);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- Individual Groups --- */
.ctrl-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.ctrl-group span {
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1px;
}

/* --- Sliders --- */
input[type=range] {
   appearance: none;
   width: 120px;
   height: 4px;
   background: rgba(255,255,255,0.2);
   border-radius: 2px;
   outline: none;
}
input[type=range]::-webkit-slider-thumb {
   appearance: none;
   width: 14px;
   height: 14px;
   background: #fff;
   border-radius: 50%;
   cursor: pointer;
   transition: transform 0.1s;
}
input[type=range]::-webkit-slider-thumb:hover {
   transform: scale(1.2);
}

/* --- Selects --- */
select {
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    outline: none;
}
select:hover {
    border-color: rgba(255,255,255,0.4);
}

/* --- Toggles Section --- */
#ctrl-toggles {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(255,255,255,0.05);
    padding: 8px 15px;
    border-radius: 10px;
}

/* p5 createCheckbox adds a div wrapper, or label logic.
   Usually: <label><input checkbox> Text</label> or similar
*/
#ctrl-toggles input[type=checkbox] {
    margin-right: 6px;
    cursor: pointer;
    accent-color: #00d1ff; /* Cyberpunk blue */
}

/* --- Snapshot Button --- */
#ctrl-snap {
    background: linear-gradient(135deg, #ff0055, #ff5500);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
#ctrl-snap:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 85, 0, 0.5);
}
#ctrl-snap:active {
    transform: scale(0.95);
}

/* --- Identifiers Specifics (Optional Tweaks) --- */
#ctrl-size input { width: 100px; }
#ctrl-trails input { width: 80px; }

/* Mobile Response */
@media (max-width: 600px) {
    #controls {
        width: 100%;
        bottom: 0;
        border-radius: 16px 16px 0 0;
        padding: 15px 10px;
        gap: 15px;
    }
    #ctrl-toggles {
        flex-wrap: wrap;
        justify-content: center;
    }
}
