body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 2em;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 1em;
}

p {
    text-align: center;
    margin-bottom: 2em;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 0.5em;
    font-weight: bold;
    color: #555;
}

textarea,
input[type="number"],
select {
    padding: 10px;
    margin-bottom: 1.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box; /* Important */
}

textarea {
    resize: vertical;
    min-height: 100px;
}

button {
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 1.5em;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

.checkbox-container label {
    margin-bottom: 0;
    font-weight: normal;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 2em;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

code {
    background-color: #eee;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: "Courier New", Courier, monospace;
}

@media (max-width: 576px) {
    body {
        padding: 0.5em;
    }
    .container {
        padding: 1em;
    }
} 

/* Stili specifici per l'esercizio di riconoscimento tonalità */

/* Container immagine armature di chiave */
.key-signature-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #dee2e6;
}

.key-signature-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.key-signature-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Controlli esercizio */
.exercise-controls {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
}

/* Risultato */
.result-container {
    animation: fadeIn 0.5s ease-in-out;
}

.result-container .alert {
    border-radius: 10px;
    border: none;
    font-weight: 500;
    padding: 20px;
    margin: 0;
}

.result-container .alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 5px solid #28a745;
}

.result-container .alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 5px solid #dc3545;
}

/* Statistiche */
.stats-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-card {
    text-align: center;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pulsanti */
#verifyBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#newExerciseBtn {
    transition: all 0.3s ease;
}

#newExerciseBtn:hover {
    transform: scale(1.05);
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Effetti hover per le opzioni del select */
.accordi-select option {
    padding: 8px;
    transition: background-color 0.2s ease;
}

.accordi-select option:hover {
    background-color: #007bff;
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .key-signature-container {
        padding: 20px;
    }
    
    .key-signature-image-wrapper {
        min-height: 150px;
        padding: 15px;
    }
    
    .key-signature-image {
        max-height: 200px;
    }
    
    .exercise-controls {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .key-signature-container {
        padding: 15px;
    }
    
    .key-signature-image-wrapper {
        min-height: 120px;
        padding: 10px;
    }
    
    .key-signature-image {
        max-height: 150px;
    }
    
    .exercise-controls {
        padding: 15px;
    }
    
    .stat-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}

/* Stili per il loading dell'immagine */
.key-signature-image-wrapper::before {
    content: "Caricamento immagine...";
    position: absolute;
    color: #6c757d;
    font-style: italic;
    display: none;
}

.key-signature-image-wrapper.loading::before {
    display: block;
}

.key-signature-image-wrapper.loading .key-signature-image {
    opacity: 0.3;
}

/* Stili per il feedback visivo */
.correct-answer {
    animation: pulse 0.6s ease-in-out;
}

.wrong-answer {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Stili per il select con optgroup */
.accordi-select optgroup {
    font-weight: bold;
    color: #495057;
    background-color: #f8f9fa;
}

.accordi-select option {
    font-weight: normal;
    color: #212529;
    background-color: white;
}

/* Effetti per il pulsante verifica quando abilitato */
#verifyBtn:not(:disabled) {
    animation: pulse 2s infinite;
}

#verifyBtn:not(:disabled):hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
} 