/* Reset e Font */
body { margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f4f7f4; display: flex; height: 100vh; overflow: hidden; }

/* VARIABILI TEMA VERDE SALVIA */
:root {
    --sage-dark: #556b2f;
    --sage-main: #8fbc8f;
    --sage-light: #e8f5e9;
    --sage-accent: #6b8e23;
    --white: #ffffff;
}

/* --- PANNELLO SINISTRO (50% - COMPATTO) --- */
#left-panel {
    width: 50%;
    height: 100vh;
    background-color: var(--sage-main);
    padding: 20px; /* Ridotto padding per guadagnare spazio */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Meno spazio tra gli elementi */
    border-right: 5px solid var(--white);
    overflow-y: auto; /* Scorre se lo schermo è troppo piccolo in altezza */
}

/* BANNER COMPATTO */
.banner-wrapper {
    background: var(--white);
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Impedisce al banner di schiacciarsi troppo */
}

#sidebar-banner {
    width: 100%;
    height: 80px; /* ALTEZZA FISSA RIDOTTA */
    object-fit: contain; /* Mantiene le proporzioni del logo */
    object-position: center;
    display: block;
}

/* DATI STUDENTE (AFFIANCATI) */
.student-data { 
    background: var(--white); 
    padding: 15px; 
    border-radius: 10px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    flex-shrink: 0;
}

.student-data h2 { 
    margin: 0 0 10px 0; 
    color: var(--sage-dark); 
    font-size: 1.1rem; 
    border-bottom: 1px solid var(--sage-light); 
    padding-bottom: 5px; 
}

/* Flexbox per mettere input sulla stessa riga */
.input-row {
    display: flex;
    gap: 15px;
}

.input-group {
    flex: 1; /* Ognuno occupa il 50% */
}

.student-data label { 
    display: block; 
    font-size: 0.85rem; 
    font-weight: bold; 
    color: #444; 
    margin-bottom: 4px; 
}

.student-data input, .student-data select { 
    width: 100%; 
    padding: 8px; 
    border: 2px solid var(--sage-light); 
    border-radius: 6px; 
    box-sizing: border-box; 
    font-size: 0.95rem; 
}

.student-data input:focus, .student-data select:focus { 
    border-color: var(--sage-accent); 
    outline: none; 
}

/* VIDEO */
.video-wrapper h3 { 
    margin: 0 0 5px 0; 
    color: #fff; 
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2); 
}

.video-responsive { 
    position: relative; 
    padding-bottom: 56.25%; 
    height: 0; 
    overflow: hidden; 
    border-radius: 10px; 
    border: 3px solid var(--white); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); 
}

.video-responsive iframe { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
}

/* PUNTEGGIO */
.score-box { 
    background: var(--sage-dark); 
    color: var(--white); 
    padding: 15px; 
    border-radius: 10px; 
    text-align: center; 
    margin-top: auto; /* Spinge il box in fondo */
    box-shadow: 0 3px 8px rgba(0,0,0,0.2); 
}

#score-display { 
    font-size: 1.8rem; 
    font-weight: bold; 
    line-height: 1.2; 
    color: #f1c40f; 
}

#score-subtitle { 
    margin: 0; 
    font-size: 0.85rem; 
    opacity: 0.9; 
}

/* --- PANNELLO DESTRO (50%) --- */
#right-panel {
    width: 50%;
    height: 100vh;
    overflow-y: auto;
    padding: 30px;
    box-sizing: border-box;
    background-color: var(--sage-light);
}

#right-panel header { margin-bottom: 25px; text-align: center; }
#right-panel header h1 { color: var(--sage-dark); margin: 0; font-size: 2rem; }
#right-panel header p { color: #666; font-style: italic; font-size: 1rem; }

/* Card Domanda */
.question-card {
    background: var(--white);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border-left: 6px solid var(--sage-accent);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.question-card h4 { margin-top: 0; color: #2c3e50; font-size: 1.1rem; line-height: 1.4; }

.question-card label {
    display: block;
    padding: 8px 12px;
    margin: 6px 0;
    background: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.question-card label:hover { background: var(--sage-light); border-color: var(--sage-main); }
.question-card input { margin-right: 10px; }

/* Bottone */
.btn-submit {
    background: var(--sage-accent);
    color: white;
    font-size: 1.2rem;
    padding: 15px;
    width: 100%;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 50px;
    box-shadow: 0 4px 0 #556b2f;
    transition: all 0.1s;
}
.btn-submit:active { transform: translateY(4px); box-shadow: 0 0 0 #556b2f; }
.btn-submit:hover { background: var(--sage-dark); }
/* Questa regola rende le domande sfocate e NON cliccabili */
.offuscato {
    filter: blur(6px); /* Crea l'effetto sfocato/illeggibile */
    pointer-events: none; /* Questa è la vera magia: impedisce FISICAMENTE qualsiasi clic! */
    user-select: none; /* Impedisce agli studenti di selezionare il testo per leggerlo */
    opacity: 0.6; /* Rende il blocco leggermente trasparente */
    transition: all 0.5s ease; /* Fa apparire le domande in modo morbido quando si sbloccano */
}

/* Rende il pulsante grigio e non cliccabile finché il video non finisce */
#btn-consegna:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}