body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f8f9fa;
}

h1 {
    margin-top: 20px;
}

#sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 40px);
    grid-template-rows: repeat(9, 40px);
    gap: 2px;
    justify-content: center;
    margin: 20px auto;
}

input {
    width: 40px;
    height: 40px;
    text-align: center;
    font-size: 18px;
    border: 1px solid #ccc;
    outline: none;
}

/* Stile per le celle precompilate */
input.read-only {
    background-color: #f0f0f0;
    font-weight: bold;
}

/* Stile per i pulsanti */
button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

/* Messaggio di verifica */
#message {
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-3px); }
}

/* Evidenziazione errori e risposte corrette */
input.error {
    background-color: #f8d7da;
    border: 1px solid #721c24;
    animation: shake 0.3s ease-in-out;
}



input.correct {
    background-color: #d4edda;
}
#difficulty-container {
    margin: 10px;
}
input.highlight {
    background-color: #e0f7fa !important; /* Azzurro chiaro  */ 
    /*background-color: rgba(255, 255, 0, 0.3);  Giallo leggero */
}

input.selected {
    background-color: #80deea !important; /* Azzurro più scuro */
}
#progress-container {
    margin: 15px auto;
    width: 80%;
    text-align: center;
}

#progress-text {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

#progress-bar {
    width: 100%;
    height: 10px;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0;
    background-color: #28a745;
    transition: width 0.3s ease-in-out;
}

/* Stile per il checkbox toggle */
.theme-switch {
    display: flex;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
    margin: 10px;
}

.theme-switch input {
    display: none;
}

.theme-switch .slider {
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 20px;
    position: relative;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.theme-switch .slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

/* Quando il checkbox è selezionato, cambia il colore */
.theme-switch input:checked + .slider {
    background-color: #007bff;
}

.theme-switch input:checked + .slider::before {
    transform: translateX(20px);
}
/* Tema Scuro ----------------------------------  */
body.dark-mode {
    background-color: #333;
    color: #f0f0f0;
}

button.dark-mode {
    background-color: #444;
    color: #fff;
}

button.dark-mode:hover {
    background-color: #555;
}

input.dark-mode {
    border: 1px solid #666;
    background-color: #444;
    color: #fff;
}

input.read-only.dark-mode {
    background-color: #555;
}

#progress-bar.dark-mode {
    background-color: #555;
}
/* Fine Tema Scuro ----------------------------------  */
#pause-resume-btn.paused {
    background-color: #6c757d;
}
