body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a2e; /* Dark background */
    color: #e0e0e0; /* Light text */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden; /* Prevent scrollbars */
}

.container {
    background-color: #2a2a4a; /* Slightly lighter dark container */
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    text-align: center;
    width: 90%;
    max-width: 1200px;
    margin: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-weight: 700;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap; /* Allow controls to wrap on smaller screens */
    gap: 15px; /* Space between controls */
    justify-content: center;
    align-items: center;
}

label {
    font-weight: 400;
}

select, button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #4a4a7a; /* Darker control background */
    color: #e0e0e0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

select:hover, button:hover {
    background-color: #6a6ad0; /* Lighter on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

select:focus, button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 106, 208, 0.5); /* Focus outline */
}

#glCanvas {
    width: 100%;
    height: 600px; /* Default height */
    background-color: #000;
    border: 2px solid #5a5a8a;
    border-radius: 8px;
    display: block; /* Remove extra space below canvas */
    touch-action: none; /* Prevent browser touch actions */
}

.status-message {
    margin-top: 15px;
    font-size: 0.9em;
    color: #aaa;
}

.error-message {
    margin-top: 15px;
    font-size: 0.95em;
    color: #ff6b6b; /* Red for errors */
    font-weight: bold;
    word-break: break-all; /* Break long error messages */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }
    .controls {
        flex-direction: column;
        width: 100%;
    }
    select, button {
        width: 100%;
    }
    #glCanvas {
        height: 400px; /* Adjust height for smaller screens */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }
    #glCanvas {
        height: 300px;
    }
}
