body {
    margin: 0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: white;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#ui-container {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 300px;
}

h1 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    text-align: center;
    color: #4facfe;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #aaa;
}

select,
input[type="number"],
button {
    width: 100%;
    padding: 8px;
    background: #333;
    /* Dark gray */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    font-size: 0.9rem;
    box-sizing: border-box;
}

select option {
    background: #333;
    color: white;
}

button {
    background: #4facfe;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 5px;
}

button:hover {
    background: #00f2fe;
}

.spawn-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
}

#time-scale-val {
    float: right;
    font-size: 0.8rem;
    color: #4facfe;
}

#ui-container.collapsed #controls {
    display: none;
}

#ui-container.collapsed {
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ui-toggle-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101;
}

#ui-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#ui-container.collapsed #ui-toggle-btn {
    position: static;
}