/*qu.css modelo*/

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Base ──────────────────────────────────────── */
body {
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    background: #0f0f0f;
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

/* ── Page Wrapper ──────────────────────────────── */
.page-wrapper {
    width: 100%;
    max-width: 860px;
    padding: 2.5rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

/* ── Header ────────────────────────────────────── */
.quiz-header {
    text-align: center;
    animation: fadeInDown 0.7s ease-out both;
    margin-bottom: 0.5rem;
}

.back-button {
    text-align: left;
    margin-bottom: 1.8rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    padding: 0.5rem 1.1rem;
    border-radius: 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateX(-3px);
}

.btn-back i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.btn-back:hover i {
    transform: translateX(-3px);
}

.header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transform: translateX(-0.5rem);
}

.header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
}

/* ── Ícone roxo ────────────────────────────────── */
.icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.3rem;
}

.icon-wrapper i {
    font-size: 1.6rem;
    color: #a855f7;
}

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
    line-height: 1;
    text-transform: uppercase;
}

.subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 300;
    letter-spacing: 1.2px;
    text-align: left;
}

/* ── Quiz Container ────────────────────────────── */
.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Subject Title ─────────────────────────────── */
.subject-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: #a855f7;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 1.8rem 0 0.9rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.25);
    margin-bottom: 0.2rem;
    animation: fadeInUp 0.6s ease-out both;
}

/* ── Question Container ────────────────────────── */
.question-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 1.6rem 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
    animation: fadeInUp 0.6s ease-out both;
}

.question-container:hover {
    border-color: rgba(168, 85, 247, 0.18);
}

/* ── Question Number ───────────────────────────── */
.question-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #a855f7;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

/* ── Question Texto ────────────────────────────── */
.question-texto {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 0.85rem;
    padding: 0.75rem 1rem;
    background: rgba(168, 85, 247, 0.04);
    border-left: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: 0 8px 8px 0;
    text-align: left;
}

/* ── Question Enunciado ────────────────────────── */
.question-enunciado {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.65;
    margin-bottom: 1.2rem;
    text-align: left;
}

/* ── Question Text ─────────────────────────────── */
.question-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.65;
    margin-bottom: 1.2rem;
    text-align: left;
}

/* ── Options ───────────────────────────────────── */
.options {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    align-items: stretch;
}

.option {
    padding: 0.8rem 1.1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    text-align: left;
    line-height: 1.5;
}

.option:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.35);
    color: white;
    transform: translateX(3px);
}

.option.selected {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.5);
    color: white;
}

.option.correct {
    background: rgba(29, 158, 117, 0.18);
    border-color: rgba(29, 158, 117, 0.5);
    color: #3ecfa0;
}

.option.incorrect {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.4);
    color: #e07a73;
}

.option.locked {
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Feedback ──────────────────────────────────── */
.feedback {
    margin-top: 1rem;
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.84rem;
    line-height: 1.6;
    font-weight: 400;
}

.correct-feedback {
    background: rgba(29, 158, 117, 0.12);
    border: 1px solid rgba(29, 158, 117, 0.3);
    color: rgba(255, 255, 255, 0.75);
}

.incorrect-feedback {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: rgba(255, 255, 255, 0.75);
}

/* ── Question Image ────────────────────────────── */
.question-image {
    text-align: center;
    margin: 1rem 0;
}

.question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Submit Container ──────────────────────────── */
.submit-container {
    padding: 0.5rem 0 0.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.buttons-container {
    display: flex;
    gap: 0.7rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Action Buttons ────────────────────────────── */
.action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.action-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: white;
}

.submit-button {
    background: rgba(29, 158, 117, 0.15);
    border-color: rgba(29, 158, 117, 0.4);
    color: #3ecfa0;
}

.submit-button:hover {
    background: rgba(29, 158, 117, 0.28);
    border-color: rgba(29, 158, 117, 0.65);
    color: white;
}

.restart-button {
    background: rgba(29, 158, 117, 0.12);
    border-color: rgba(29, 158, 117, 0.35);
    color: #3ecfa0;
}

.restart-button:hover {
    background: rgba(29, 158, 117, 0.22);
    border-color: rgba(29, 158, 117, 0.55);
    color: white;
}

.clear-button {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
    color: #e07a73;
}

.clear-button:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.5);
    color: white;
}

.reveal-button {
    background: rgba(243, 156, 18, 0.1);
    border-color: rgba(243, 156, 18, 0.3);
    color: #f5c46a;
}

.reveal-button:hover {
    background: rgba(243, 156, 18, 0.2);
    border-color: rgba(243, 156, 18, 0.5);
    color: white;
}

.action-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Results ───────────────────────────────────── */
.results {
    display: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    animation: fadeInUp 0.6s ease-out both;
}

.results h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
}

.score {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.percentage {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #a855f7;
    line-height: 1;
    margin: 0.5rem 0 1rem;
}

.results p {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

/* ── Footer ────────────────────────────────────── */
.page-footer {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: 0.5px;
    padding-top: 1rem;
}

/* ══════════════════════════════════════════════════
   NAV FLOAT UNIFICADO
   ══════════════════════════════════════════════════ */
.nav-float {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1000;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2px 0;
}

/* ── Botão base ────────────────────────────────── */
.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.4);
    color: #a855f7;
    transform: scale(1.08);
}

/* ── Botão Step — laranja ───────────────────────── */
.nav-btn-step {
    color: #f97316;
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.35);
}

.nav-btn-step:hover {
    background: rgba(249, 115, 22, 0.22);
    border-color: rgba(249, 115, 22, 0.55);
    color: #fb923c;
    transform: scale(1.08);
}

.nav-btn-step.modo-step-active {
    background: rgba(249, 115, 22, 0.25);
    border-color: rgba(249, 115, 22, 0.6);
    color: #fb923c;
}

.nav-btn-step.modo-step-active:hover {
    background: rgba(249, 115, 22, 0.35);
    color: white;
}

/* ── Botão IA — fallback visual (sobrescrito pelo <style> no HTML) ── */
.nav-btn-ia {
    font-size: 1.1rem;
    color: #c4b8ff;
    background: rgba(124, 58, 237, 0.1);
    border: 1.5px solid rgba(124, 58, 237, 0.35);
    border-radius: 12px;
    width: 38px;
    height: 38px;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Animations ────────────────────────────────── */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ── Responsive ────────────────────────────────── */
@media (max-width: 600px) {
    .page-wrapper {
        padding: 1.5rem 1rem 3rem;
    }
    h1 {
        font-size: 1.8rem;
        letter-spacing: 3px;
    }
    .question-container {
        padding: 1.2rem 1rem;
    }
    .buttons-container {
        flex-direction: column;
        align-items: center;
    }
    .action-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    .nav-float {
        right: 10px;
    }
    .nav-btn {
        width: 34px;
        height: 34px;
        font-size: 0.78rem;
    }
}

/* ══════════════════════════════════════════════════
   RESULTADO POR AULA
   ══════════════════════════════════════════════════ */
.subject-result {
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    margin: 0.5rem 0 1.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: fadeInUp 0.5s ease-out both;
    transition: all 0.4s ease;
}

.subject-result--progress {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.9rem 1.2rem;
}

.sr-progress-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

.sr-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    overflow: hidden;
}

.sr-progress-fill {
    height: 100%;
    background: rgba(55, 138, 221, 0.5);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.subject-result--good {
    background: rgba(29, 158, 117, 0.1);
    border: 1px solid rgba(29, 158, 117, 0.3);
}

.subject-result--mid {
    background: rgba(243, 156, 18, 0.08);
    border: 1px solid rgba(243, 156, 18, 0.25);
}

.subject-result--bad {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.25);
}

.sr-icon {
    font-size: 1.7rem;
    line-height: 1;
    flex-shrink: 0;
}

.sr-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
}

.sr-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.sr-score {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

.sr-pct {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.subject-result--good .sr-pct { color: #3ecfa0; }
.subject-result--mid  .sr-pct { color: #f5c46a; }
.subject-result--bad  .sr-pct { color: #e07a73; }

/* ══════════════════════════════════════════════════
   MODO STEP
   ══════════════════════════════════════════════════ */
.step-hidden            { display: none !important; }
.step-structural-hidden { display: none !important; }

#quiz-container { display: block; }
#quiz-container.modo-step { overflow: hidden; display: block; }

.step-quiz-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    will-change: transform;
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-quiz-wrapper > .question-container {
    min-width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    margin-bottom: 0;
}

#step-shell-header,
#step-shell-footer {
    width: 100%;
    max-width: 860px;
}

.step-header {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding-bottom: 0.6rem;
}

.step-subject-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #a855f7;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.step-counter {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.32);
    letter-spacing: 1px;
    white-space: nowrap;
    min-width: 42px;
}

.step-progress-bar {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    overflow: hidden;
}

.step-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.6), #a855f7);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-score-badges {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.18rem 0.5rem;
    border-radius: 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
}

.step-badge-correct {
    background: rgba(29, 158, 117, 0.14);
    border: 1px solid rgba(29, 158, 117, 0.28);
    color: #3ecfa0;
}

.step-badge-incorrect {
    background: rgba(231, 76, 60, 0.11);
    border: 1px solid rgba(231, 76, 60, 0.25);
    color: #e07a73;
}

.step-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.75rem;
    margin-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.step-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    justify-content: center;
}

.step-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.11);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.22s ease;
    flex-shrink: 0;
}

.step-dot:hover    { background: rgba(255, 255, 255, 0.28); transform: scale(1.35); }
.step-dot-active   { width: 20px; border-radius: 4px; background: #a855f7; }
.step-dot-correct  { background: rgba(29, 158, 117, 0.55); }
.step-dot-wrong    { background: rgba(231, 76, 60, 0.48); }

.step-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.58rem 1.25rem;
    border-radius: 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
}

.step-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.45);
}

.step-btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
    color: white;
}

.step-btn-primary {
    background: rgba(168, 85, 247, 0.16);
    border: 1px solid rgba(168, 85, 247, 0.38);
    color: #a855f7;
}

.step-btn-primary:hover:not(:disabled) {
    background: rgba(168, 85, 247, 0.26);
    border-color: rgba(168, 85, 247, 0.58);
    color: white;
}

.step-btn:disabled { opacity: 0.2; cursor: not-allowed; pointer-events: none; }

@media (max-width: 600px) {
    .step-footer { gap: 0.5rem; }
    .step-btn    { padding: 0.5rem 0.85rem; font-size: 0.78rem; }
}

.modo-step-wrapper #quiz-container.modo-step {
    flex: 0 0 auto;
}

/* ══════════════════════════════════════════════════
   BOTÃO VER ERROS
   ══════════════════════════════════════════════════ */
.errors-button {
    background: rgba(231, 76, 60, 0.12);
    border-color: rgba(231, 76, 60, 0.38);
    color: #e07a73;
    display: none;
}

.errors-button:hover {
    background: rgba(231, 76, 60, 0.24);
    border-color: rgba(231, 76, 60, 0.6);
    color: white;
}

.errors-button.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.45);
    color: #93c5fd;
}

.errors-button.active:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.65);
    color: white;
}

.errors-button.visible {
    display: inline-flex;
}
.errors-button i {
    display: flex;
    align-items: center;
    line-height: 1;
}