body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f0f0f0;
}

nav {
    background-color: #333;
    padding: 10px;
    text-align: center;
    flex-shrink: 0;
}

nav button {
    background-color: #555;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1em;
}

nav button.active {
    background-color: #007bff;
}

/* --- Controls Styling --- */
#controls-container button {
    padding: 6px 10px;
    margin: 2px;
    font-size: 1em;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
}

#controls-container fieldset {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
}

.reset-button {
    background-color: #dc3545 !important; /* Use !important to override base style */
    color: white;
    border: none !important;
    padding: 8px 15px !important;
}

/* Media Query for mobile devices to make controls more compact */
@media (max-width: 600px) {
    #controls-container button {
        padding: 4px 6px; /* Smaller padding */
        font-size: 0.85em; /* Smaller font */
        margin: 1px;
    }
}

.content-section {
    padding: 20px;
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
}

/* --- Tutorial Section Styling --- */
#tutorial-content {
    width: 100%;
    max-width: 800px;
}

.tutorial-case {
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tutorial-case h4 {
    margin-top: 0;
    color: #0056b3;
}

.algorithm-display {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.algorithm-display code {
    font-family: monospace;
    font-size: 1.2em;
    font-weight: bold;
    color: #c7254e;
}

.setup-button {
    background-color: #ffc107;
    color: #212529;
}

