/* ─────────────────────────────────────────────
   EXAM SYSTEM — Public Styles
   ───────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
}

.exam-wrap {
    max-width: 780px;
    margin: 32px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

/* ── Card ── */
.exam-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 36px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* ── Header da prova ── */
.exam-header {
    text-align: center;
    margin-bottom: 32px;
}

.exam-titulo {
    font-size: 24px;
    font-weight: 700;
    margin: 12px 0 6px;
    color: #1a1a1a;
}

.exam-curso {
    color: #666;
    font-size: 15px;
    margin: 0;
}

/* ── Badge de tipo ── */
.exam-tipo {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.exam-tipo-av {
    background: #e8f4f8;
    color: #0c5460;
}

.exam-tipo-rav {
    background: #fff3cd;
    color: #856404;
}

/* ── Grid de informações ── */
.exam-info-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.exam-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.exam-info-icon {
    font-size: 24px;
}

.exam-info-item strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.exam-info-item small {
    font-size: 12px;
    color: #888;
}

/* ── Regras ── */
.exam-rules {
    background: #f0f7ff;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 28px;
}

.exam-rules h3 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #2271b1;
    letter-spacing: .3px;
}

.exam-rules ul {
    margin: 0;
    padding-left: 18px;
}

.exam-rules ul li {
    font-size: 14px;
    color: #444;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ── Botões ── */
.exam-actions {
    text-align: center;
}

.exam-btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity .2s, transform .1s;
}

.exam-btn:hover {
    opacity: .88;
    transform: translateY(-1px);
}

.exam-btn:active {
    transform: translateY(0);
}

.exam-btn-primary {
    background: #2271b1;
    color: #fff;
}

.exam-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.exam-btn-finish {
    background: #1a7a1a;
    color: #fff;
}

/* ── Top bar ── */
.exam-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.exam-progress-info {
    font-size: 14px;
    color: #555;
}

/* ── Timer ── */
.exam-timer {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    background: #f8f9fa;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #ddd;
}

.exam-timer.warning {
    color: #cc0000;
    border-color: #cc0000;
    animation: pulse .8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .5; }
}

/* ── Autosave ── */
.exam-autosave-status {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.autosave-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    display: inline-block;
    transition: background .3s;
}

.autosave-dot.saved  { background: #1a7a1a; }
.autosave-dot.saving { background: #b8860b; }
.autosave-dot.error  { background: #cc0000; }

/* ── Barra de progresso ── */
.exam-progress-bar-wrap {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.exam-progress-bar {
    height: 100%;
    background: #2271b1;
    border-radius: 3px;
    transition: width .4s ease;
}

/* ── Questão ── */
.exam-question-numero {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #2271b1;
    letter-spacing: .5px;
    margin-bottom: 12px;
}

.exam-question-enunciado {
    font-size: 17px;
    line-height: 1.7;
    color: #1a1a1a;
    margin-bottom: 28px;
}

/* ── Alternativas ── */
.exam-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}

.exam-choice-label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.exam-choice-label:hover {
    border-color: #2271b1;
    background: #f0f7ff;
}

.exam-choice-label.selected {
    border-color: #2271b1;
    background: #e8f0fa;
}

.exam-choice-input {
    display: none;
}

.exam-choice-letra {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    transition: background .2s, color .2s;
}

.exam-choice-label.selected .exam-choice-letra {
    background: #2271b1;
    color: #fff;
}

.exam-choice-texto {
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    padding-top: 3px;
}

/* ── Navegação ── */
.exam-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── Mapa de questões ── */
.exam-question-map {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
    justify-content: center;
}

.exam-map-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    transition: all .2s;
}

.exam-map-btn.active {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

.exam-map-btn.answered {
    border-color: #1a7a1a;
    background: #e6f4e6;
    color: #1a7a1a;
}

/* ── Resultado ── */
.exam-result-card {
    text-align: center;
}

.exam-result-status {
    padding: 28px;
    border-radius: 8px;
    margin-bottom: 28px;
}

.exam-result-aprovado {
    background: #e6f4e6;
    color: #1a7a1a;
}

.exam-result-reprovado {
    background: #fde8e8;
    color: #cc0000;
}

.exam-result-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.exam-result-status h2 {
    font-size: 22px;
    margin: 0 0 8px;
}

.exam-result-status p {
    font-size: 14px;
    margin: 0;
    opacity: .85;
}

.exam-result-nota-wrap {
    margin-bottom: 28px;
}

.exam-result-nota {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.nota-aprovado { color: #1a7a1a; }
.nota-reprovado { color: #cc0000; }

.exam-result-nota-wrap small {
    font-size: 13px;
    color: #888;
}

.exam-result-stats {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.exam-stat {
    text-align: center;
}

.exam-stat strong {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.exam-stat small {
    font-size: 12px;
    color: #888;
}

.exam-stat-correct strong { color: #1a7a1a; }
.exam-stat-wrong   strong { color: #cc0000; }

.exam-result-bar-wrap {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    margin: 0 auto 24px;
    max-width: 400px;
    overflow: hidden;
}

.exam-result-bar {
    height: 100%;
    border-radius: 5px;
    transition: width .6s ease;
}

.bar-aprovado  { background: #1a7a1a; }
.bar-reprovado { background: #cc0000; }

.exam-result-message {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 14px 20px;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.exam-result-message p {
    margin: 0;
}

/* ── Responsivo ── */
@media (max-width: 600px) {
    .exam-card {
        padding: 20px;
    }

    .exam-info-grid {
        gap: 14px;
    }

    .exam-top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .exam-question-enunciado {
        font-size: 15px;
    }

    .exam-result-nota {
        font-size: 48px;
    }

    .exam-result-stats {
        gap: 16px;
    }
}