body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

header {
    width: 100%;
    padding: 1rem 0;
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

h1 {
    margin: 0;
    color: #bb86fc;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    width: 95%;
    max-width: 1200px;
}

#controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.control-group label {
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #cfcfcf;
}

.control-group input[type="range"] {
    width: 80%;
    cursor: pointer;
}

.control-group span {
    margin-top: 0.25rem;
    min-width: 40px;
    text-align: center;
    background-color: #333;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    background-color: #bb86fc;
    color: #121212;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

button:hover {
    background-color: #a06cd5;
}

#simulation-canvas {
    border: 2px solid #bb86fc;
    background-color: #000;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

footer {
    width: 100%;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 1px solid #333;
    font-size: 0.9em;
}

footer a {
    color: #bb86fc;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    #controls {
        grid-template-columns: 1fr;
    }

    button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}