body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}
.container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 800px;
    width: 100%;
}
h1 {
    text-align: center;
    color: #333;
}
.controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}
input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}
button:hover {
    opacity: 0.9;
}
#generateButton {
    background-color: #3498db;
}
#saveButton {
    background-color: #2ecc71;
}
#mazeContainer {
    overflow: auto;
    max-height: 60vh;
    border: 1px solid #ccc;
    margin-bottom: 20px;
}
#maze {
    display: inline-block;
}
.row {
    display: flex;
}
.cell {
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
}
.legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.legend-item {
    display: flex;
    align-items: center;
}
.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
}