/* --- CONFIGURACIÓN GENERAL --- */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #e8f5e9; /* Verde muy clarito de fondo */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.quiz-container {
    background: #ffffff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 95%;
    max-width: 600px;
}

h1 {
    text-align: center;
    margin-top: 10px;
    font-size: 1.5rem;
    color: #2e7d32;
}

h2 {
    color: #2e7d32;
    font-size: 1.3rem;
    line-height: 1.4;
    margin-bottom: 25px;
}

/* --- LOGO (OPCIÓN 1: Fondo circular para logo blanco) --- */
.logo-wrapper {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

.quiz-logo {
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
    background-color: #1b5e20; /* Verde oscuro para resaltar el logo blanco */
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* --- SELECTOR DE TEST --- */
.selector-box {
    margin: 30px 0;
    text-align: center;
}

select {
    width: 100%;
    padding: 15px;
    border: 2px solid #2e7d32;
    border-radius: 10px;
    background: #f1f8e9;
    font-size: 1.1rem;
    color: #1b5e20;
    outline: none;
    cursor: pointer;
}

/* --- ENCABEZADO DEL TEST (TÍTULO Y NOTA) --- */
.quiz-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.quiz-badge {
    background-color: #f1f8e9;
    color: #2e7d32;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid #c8e6c9;
    text-transform: uppercase;
}

.live-score {
    font-size: 0.9rem;
    font-weight: bold;
    color: #555;
}

.live-score span {
    color: #2e7d32;
    font-size: 1.1rem;
    background: #e8f5e9;
    padding: 2px 8px;
    border-radius: 5px;
    margin-left: 5px;
}

/* --- PROGRESO --- */
.progress-bar-container {
    background: #eee;
    height: 8px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.progress-fill {
    background: #2e7d32;
    height: 100%;
    border-radius: 10px;
    transition: 0.3s;
}

/* --- OPCIONES DE RESPUESTA --- */
.options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.btn-opcion {
    background-color: #f1f8e9;
    color: #1b5e20;
    border: 2px solid #a5d6a7;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-opcion:hover:not(:disabled) {
    background-color: #c8e6c9;
    border-color: #4caf50;
    transform: translateY(-2px);
}

.btn-opcion:disabled {
    cursor: default;
    opacity: 0.8;
}

.correct {
    background-color: #4caf50 !important;
    color: white !important;
    border-color: #2e7d32 !important;
}

.wrong {
    background-color: #ef5350 !important;
    color: white !important;
    border-color: #c62828 !important;
}

/* --- FEEDBACK Y EXPLICACIÓN --- */
.hidden { display: none; }

#feedback-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e8f5e9;
    animation: fadeIn 0.5s ease;
}

.explicacion-box {
    background-color: #fff9c4;
    padding: 15px;
    border-left: 5px solid #fbc02d;
    border-radius: 5px;
    margin: 15px 0;
    color: #5d4037;
    font-size: 0.95rem;
    line-height: 1.5;
}

.msg-wrong { color: #c62828; font-weight: bold; margin: 0; }

#next-btn {
    width: 100%;
    background-color: #2e7d32;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 0 #1b5e20;
}

#next-btn:active { transform: translateY(2px); box-shadow: none; }

/* --- RESULTADOS FINALES --- */
.results { text-align: center; }

.results h1 { color: #2e7d32; }

.results small {
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-circle {
    width: 100px;
    height: 100px;
    background: #2e7d32;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 20px auto;
}

.btn-restart {
    background: #2e7d32;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
