:root {
    --blue: #2F7DD1;
    --blue-light: #EAF3FC;
    --blue-mid: #BFE0FF;
    --black: #0F1114;
    --white: #FFFFFF;
    --gray: #6B7280;
    --danger: #C0392B;
    --success: #1E7A46;
    --radius: 16px;
    --shadow: 0 12px 30px rgba(15, 17, 20, 0.10);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--white);
    color: var(--black);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 48px;
}

header.top {
    width: 100%;
    max-width: 640px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.15;
}

.brand .eyebrow {
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--blue);
    font-weight: 700;
}

.brand .title {
    font-size: 20px;
    font-weight: 800;
    color: var(--black);
}

.score-pill {
    background: transparent;
    color: transparent;
    border-radius: 999px;
    padding: 7px 14px 7px 10px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    flex-shrink: 0;
    min-width: 80px;
}

.progress-track {
    width: 100%;
    max-width: 640px;
    height: 6px;
    background: var(--blue-light);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 28px;
}

.progress-fill {
    height: 100%;
    background: var(--blue);
    width: 0%;
    transition: width .35s ease;
}

/* ---------- Setup screen ---------- */
.screen {
    width: 100%;
    max-width: 640px;
}

.setup-card {
    background: var(--blue-light);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
}

.setup-card h1 {
    font-size: 24px;
    margin: 0 0 8px;
    color: var(--black);
}

.setup-card p {
    margin: 0 0 20px;
    color: var(--gray);
    font-size: 14px;
    line-height: 1.5;
}

.field-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

@media (max-width: 480px) {
    .field-list {
        grid-template-columns: 1fr;
    }
}

.input-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--black);
    margin: 18px 0 8px;
}

.input-label:first-of-type {
    margin-top: 4px;
}

.text-input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--blue-mid);
    background: var(--white);
    font-size: 15px;
    color: var(--black);
    font-family: inherit;
}

.text-input:focus {
    outline: none;
    border-color: var(--blue);
}

.level-toggle {
    display: flex;
    gap: 8px;
    background: var(--white);
    border: 1.5px solid var(--blue-mid);
    border-radius: 12px;
    padding: 5px;
}

.level-btn {
    flex: 1;
    padding: 11px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--blue);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.level-btn.active {
    background: var(--black);
    color: var(--white);
}

.stepper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-btn {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid var(--blue-mid);
    background: var(--white);
    color: var(--black);
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
}

.step-btn:hover {
    background: var(--blue-light);
}

.stepper-input {
    text-align: center;
    font-weight: 800;
    -moz-appearance: textfield;
    appearance: textfield;
}

.stepper-input::-webkit-inner-spin-button,
.stepper-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.round-total {
    text-align: center;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gray);
    margin: -6px 0 16px;
}

.result-card .hello {
    font-size: 15px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 6px;
}

.field-chip {
    background: var(--white);
    border: 1.5px solid var(--blue-mid);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--black);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-chip span.count {
    color: var(--blue);
    font-weight: 800;
    font-size: 11px;
}

.start-btn {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    background: var(--blue);
    color: var(--white);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .12s ease, background .2s ease;
}

.start-btn:hover {
    background: #266cb5;
}

.start-btn:active {
    transform: scale(0.98);
}

/* ---------- Quiz screen ---------- */
.quiz-wrap {
    position: relative;
    width: 100%;
    max-width: 640px;
    min-height: 460px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 12.5px;
    color: var(--gray);
    font-weight: 700;
}

.meta-row .tag {
    background: var(--black);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: .04em;
}

.card-stack {
    position: relative;
    width: 100%;
    min-height: 420px;
}

.qcard {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    border: 1.5px solid var(--blue-mid);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 22px;
    transition: transform .38s cubic-bezier(.2, .8, .2, 1), opacity .38s ease;
}

.qcard.enter {
    transform: translateY(100%);
    opacity: 0;
}

.qcard.active {
    transform: translateY(0);
    opacity: 1;
}

.qcard.exit {
    transform: translateY(-100%);
    opacity: 0;
}

.qcard .cat {
    display: inline-block;
    background: var(--blue-light);
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.qcard .question {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--black);
    margin-bottom: 20px;
}

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

.option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1.5px solid var(--blue-mid);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
    font-size: 14.5px;
    color: var(--black);
    text-align: left;
    transition: border-color .15s ease, background .15s ease;
}

.option:hover {
    background: var(--blue-light);
}

.option .letter {
    flex: 0 0 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--black);
    color: var(--white);
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option.correct {
    border-color: var(--success);
    background: #E9F7EF;
}

.option.correct .letter {
    background: var(--success);
}

.option.wrong {
    border-color: var(--danger);
    background: #FBEAE8;
}

.option.wrong .letter {
    background: var(--danger);
}

.option[disabled] {
    cursor: default;
}

/* ---------- Result screen ---------- */
.result-card {
    background: var(--blue-light);
    border-radius: var(--radius);
    padding: 34px 26px;
    text-align: center;
    box-shadow: var(--shadow);
}

.result-card .pct {
    font-size: 52px;
    font-weight: 900;
    color: var(--blue);
    margin-bottom: 4px;
}

.result-card .sub {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 24px;
}

.breakdown {
    text-align: left;
    background: var(--white);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 22px;
    border: 1.5px solid var(--blue-mid);
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 7px 0;
    border-bottom: 1px solid var(--blue-light);
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-row b {
    color: var(--black);
}

.again-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: var(--black);
    color: var(--white);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

footer.note {
    max-width: 640px;
    width: 100%;
    text-align: center;
    color: var(--gray);
    font-size: 11.5px;
    margin-top: 22px;
    line-height: 1.5;
}


.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EAF3FC;
    border: 1.5px solid #BFE0FF;
    color: #2F7DD1;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 14px 7px 10px;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, transform 0.15s;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.back-btn:hover {
    background: #2F7DD1;
    color: #fff;
    transform: translateX(-3px);
}

.back-btn:hover svg {
    stroke: #fff;
}

.back-btn svg {
    flex-shrink: 0;
    transition: stroke 0.18s;
}

header.top {
    margin-top: 15px;
}

footer.note {
    margin-top: 20px;
}

.divisa {
    display: none;
}

@media (max-width: 768px) {
    .divisa {
        margin-left: 8px;
        margin-right: 8px;
    }

    .back-btn {
        padding: 7px 8px;
        margin-right: 8px;
    }

    .back-btn-text {
        display: none !important;
    }

    .score-pill {
        min-width: 36px;
    }
}
/* Feedback Card Exatas */
.feedback-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    color: #fff;
    min-height: 250px;
}
.feedback-correct {
    background: #113c2b !important; /* Verde selva escuro */
    border: 1px solid #1a5c42 !important;
}
.feedback-wrong {
    background: #660000 !important; /* Vermelho escuro */
    border: 1px solid #8b0000 !important;
}
.feedback-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}
.feedback-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 10px;
}
.feedback-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    width: 100%;
}
.feedback-timer {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.7;
}
.feedback-timer span {
    font-weight: 700;
}
