/* === STYLE CORRETTO PER LEZIONE INTERATTIVA === */

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    color: #222;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100%;
}

/* Barra di progresso */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.progress-bar {
    height: 6px;
    background-color: #4caf50;
    width: 0%;
    transition: width 0.2s ease;
}

/* Contenitore principale */
.container {
    max-width: 1200px;
    margin: 80px auto;
    padding: 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    overflow-y: visible;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.4em;
    margin-bottom: 10px;
}

.subtitle {
    color: #555;
    font-size: 1.2em;
}

.reading-time {
    color: #888;
    font-size: 0.9em;
}

/* Tabelle */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
}

table, th, td {
    border: 1px solid #ddd;
}

th {
    background: #4caf50;
    color: white;
    text-align: left;
    padding: 10px;
}

td {
    padding: 10px;
}

/* Box informativi */
.info-box, .intro-box, .prerequisites-box, .success-box, .definition-box {
    padding: 20px;
    border-left: 6px solid #4caf50;
    background: #f9fff9;
    margin: 20px 0;
    border-radius: 10px;
}

.intro-box h3, .prerequisites-box h4 {
    margin-top: 0;
}

/* Link indice */
.back-to-index {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    background: #4caf50;
    color: white;
    text-decoration: none;
}

.back-to-index:hover {
    background: #3b9141;
}

/* Quiz interattivi */
.quiz-box {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #ccc;
}

.quiz-question {
    font-weight: bold;
    margin-bottom: 15px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.quiz-option:hover {
    background: #e8f5e9;
}

.quiz-option.correct {
    background-color: #c8e6c9;
    border-color: #4caf50;
}

.quiz-option.wrong {
    background-color: #ffcdd2;
    border-color: #f44336;
}

.quiz-feedback {
    display: none;
    margin-top: 10px;
}

.quiz-feedback.show {
    display: block;
}

.quiz-feedback.correct {
    color: #4caf50;
}

.quiz-feedback.wrong {
    color: #f44336;
}

/* Tabelle responsive */
@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    th {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    tr {
        margin-bottom: 10px;
        border-bottom: 2px solid #eee;
    }
    td {
        border: none;
        position: relative;
        padding-left: 50%;
    }
    td:before {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 45%;
        white-space: nowrap;
        font-weight: bold;
    }
}

/* Footer */
.footer {
    margin-top: 60px;
    text-align: center;
    font-size: 0.9em;
    color: #666;
}

.professor-banner {
    background: #f0f7f0;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.ai-disclaimer {
    background: #fff3e0;
    border-left: 6px solid #ff9800;
    padding: 15px;
    border-radius: 8px;
}
