body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.container {
    text-align: center;
    background: #2c2c2c;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    width: 95%;
    max-width: 1300px;
}

h1 {
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 700;
    color: #ffffff;
    font-size: 2.2em;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.preset-control, .speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #3a3a3a;
    padding: 8px 12px;
    border-radius: 6px;
}

label {
    font-weight: 500;
}

button, select {
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid #555;
    background-color: #4a4a4a;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.2s, border-color 0.2s;
}

button:hover, select:hover {
    background-color: #5a5a5a;
    border-color: #777;
}

#rotateBtn {
    font-weight: bold;
    padding: 10px;
}

#randomBtn {
    background-color: #2196F3; /* Blue */
    border-color: #2196F3;
    color: white;
}

#randomBtn:hover {
    background-color: #1976D2;
}

#clearBtn {
    background-color: #f44336; /* Red */
    border-color: #f44336;
    color: white;
}

#clearBtn:hover {
    background-color: #d32f2f;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 8px;
    background: #555;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #2196F3;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #2196F3;
    border-radius: 50%;
    cursor: pointer;
}

#gridCanvas {
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: crosshair;
    max-width: 100%;
    height: auto;
}

.preset-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 1rem;
}
