:root {
    /* Paleta Escola Náutica Paulo Afonso (logo) */
    --navy: #1a2b4c;
    --navy-deep: #0f1d33;
    --navy-soft: #243d66;
    --gold: #fdb913;
    --gold-dark: #e5a50f;
    --green: #009639;
    --green-dark: #007a2f;

    --primary: var(--navy);
    --primary-soft: var(--navy-soft);
    --accent: var(--gold);
    --accent-muted: rgba(253, 185, 19, 0.4);
    --surface: #ffffff;
    --surface-2: #f4f6fa;
    --text: #0f172a;
    --text-muted: #4a5568;
    --correct-color: var(--green);
    --incorrect-color: #c41e3a;
    --white: #ffffff;
    --ring: rgba(253, 185, 19, 0.45);

    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;

    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 40px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 24px 60px rgba(8, 47, 73, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: clamp(16px, 4vw, 32px);
    background-color: #e8edf5;
    background-image:
        linear-gradient(180deg, rgba(232, 237, 245, 0.95) 0%, rgba(244, 246, 250, 0.98) 55%, rgba(226, 232, 242, 0.95) 100%),
        url('background_wave_pattern.png');
    background-repeat: no-repeat, repeat;
    background-size: auto, auto;
    background-attachment: fixed, fixed;
}

#quiz-app {
    width: 100%;
    max-width: 880px;
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.65);
}

/* ——— Header ——— */
.site-header {
    position: relative;
    color: var(--white);
    padding: 0;
    border-bottom: none;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 42%, var(--navy-soft) 100%);
}

.site-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 120% 80% at 10% -20%, rgba(253, 185, 19, 0.22), transparent 50%),
        radial-gradient(ellipse 90% 60% at 100% 100%, rgba(0, 150, 57, 0.18), transparent 45%);
    pointer-events: none;
}

.site-header__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2rem);
}

@media (min-width: 640px) {
    .site-header__inner {
        flex-direction: row;
        text-align: left;
        align-items: center;
        justify-content: center;
        gap: 1.75rem;
    }
}

.site-header__logo-wrap {
    flex-shrink: 0;
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
}

.site-header__logo {
    display: block;
    width: clamp(88px, 22vw, 120px);
    height: auto;
    aspect-ratio: 1;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.site-header__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0.35rem;
}

.site-header__title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.02em;
}

.site-header__subtitle {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.88);
    max-width: 36ch;
}

/* ——— Main ——— */
main#quiz-container {
    padding: clamp(1.25rem, 4vw, 2rem);
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.screen.active {
    display: flex;
}

#start-screen h2,
#end-screen h2 {
    color: var(--primary);
    font-family: var(--font-display);
    margin-bottom: 0.5rem;
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

#start-screen p,
#end-screen p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 42ch;
}

.simulado-grid {
    width: 100%;
    justify-content: center;
}

.simulado-section {
    margin-bottom: 2rem;
    width: 100%;
}

.simulado-section__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 1rem;
    text-align: left;
    padding-bottom: 0.35rem;
    border-bottom: 3px solid var(--gold);
    display: inline-block;
}

.simulado-card__meta {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--surface);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.simulado-card {
    background: var(--surface-2);
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--radius-md) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.simulado-card:hover {
    border-color: var(--gold) !important;
    box-shadow: 0 8px 24px rgba(26, 43, 76, 0.12);
}

.quiz-button {
    background: linear-gradient(180deg, var(--navy-soft) 0%, var(--navy) 100%);
    color: var(--white);
    border: none;
    padding: 0.85rem 1.75rem;
    font-size: 1.05rem;
    font-family: var(--font-display);
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 14px rgba(26, 43, 76, 0.35);
    margin-top: 0.5rem;
}

.quiz-button:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 43, 76, 0.45);
}

.quiz-button--gold {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--navy-deep);
    box-shadow: 0 4px 14px rgba(253, 185, 19, 0.45);
}

.quiz-button--gold:hover {
    box-shadow: 0 8px 24px rgba(253, 185, 19, 0.55);
    color: var(--navy-deep);
}

.quiz-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.quiz-button--ghost {
    margin-top: 0.75rem;
    background: var(--surface-2);
    color: var(--primary);
    border: 2px solid #cbd5e1;
    box-shadow: var(--shadow-sm);
}

.quiz-button--ghost:hover {
    border-color: var(--gold);
    background: #fffbeb;
    box-shadow: var(--shadow-md);
}

#progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: #e2e8f0;
    border-radius: 999px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--green));
    transition: width 0.3s ease-in-out;
    border-radius: 999px;
}

#question-counter {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

#question-area {
    width: 100%;
    margin-bottom: 1.25rem;
    text-align: left;
}

#question-text {
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-family: var(--font-display);
    color: var(--primary);
    margin-bottom: 1.25rem;
    line-height: 1.45;
}

#options-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

#options-list li {
    background-color: var(--surface);
    border: 2px solid #e2e8f0;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 1rem;
}

#options-list li:hover {
    background-color: #fffbeb;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--ring);
}

#options-list li.selected {
    background-color: #fef9e7;
    color: var(--navy);
    font-weight: 600;
    border-color: var(--gold);
}

#options-list li.correct {
    background-color: var(--correct-color);
    color: var(--white);
    border-color: var(--correct-color);
}

#options-list li.incorrect {
    background-color: var(--incorrect-color);
    color: var(--white);
    border-color: var(--incorrect-color);
}

#options-list li.disabled {
    pointer-events: none;
    opacity: 0.72;
}

#feedback-area {
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    min-height: 1.5rem;
}

#feedback-area.correct {
    color: var(--correct-color);
}

#feedback-area.incorrect {
    color: var(--incorrect-color);
}

#score-text {
    font-size: 1.45rem;
    font-family: var(--font-display);
    color: var(--primary);
    font-weight: 600;
}

#summary-area {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    text-align: left;
}

.summary-question {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    background-color: #f8fafc;
    border-left: 4px solid;
}

.summary-question.correct {
    border-left-color: var(--correct-color);
}

.summary-question.incorrect {
    border-left-color: var(--incorrect-color);
}

.summary-question p {
    font-size: 0.9rem;
    margin: 0 0 0.35rem 0;
}

.summary-question strong {
    font-size: 0.8em;
}

/* ——— Footer ——— */
.site-footer {
    text-align: center;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    border-top: 4px solid var(--gold);
}

.site-footer__inner {
    max-width: 36rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.site-footer__copy {
    color: var(--white);
    font-weight: 500;
}

.site-footer__address {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
}

.site-footer__dev {
    margin-top: 0.25rem;
}

.site-footer__link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.site-footer__link:hover {
    color: var(--white);
    border-bottom-color: var(--green);
}

.site-footer__capitao-btn {
    margin-top: 1rem;
}

.site-footer__qr {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: linear-gradient(145deg, #fb7185 0%, #f97316 100%);
    border-radius: var(--radius-md);
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-footer__qr:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.site-footer__qr-img {
    display: block;
    width: clamp(140px, 40vw, 180px);
    height: auto;
    border-radius: 12px;
    background: var(--white);
    padding: 0.35rem;
}

.site-footer__qr-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--white);
    letter-spacing: 0.04em;
}

/* ——— WhatsApp ——— */
.whatsapp-button {
    position: fixed;
    width: 56px;
    height: 56px;
    bottom: 24px;
    right: 20px;
    background: linear-gradient(180deg, #25d366 0%, #128c7e 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 28px rgba(18, 140, 126, 0.45);
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-button:hover {
    color: #fff;
    transform: scale(1.06);
    box-shadow: 0 12px 32px rgba(18, 140, 126, 0.55);
}

@media (min-width: 900px) {
    .whatsapp-button {
        right: max(24px, calc(50% - 440px - 80px));
    }
}

.hover-shadow:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ——— Capitã Jaci: carrossel e modal ——— */
.capitao-carousel-section {
    width: 100%;
    margin: 2rem 0 0;
    padding: 1.5rem;
    background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(26, 43, 76, 0.1);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.capitao-carousel-section__title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 0.35rem;
}

.capitao-carousel-section__lead {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.capitao-carousel-section__text {
    margin-top: 1rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.65;
}

.capitao-slider {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: linear-gradient(180deg, #e8edf5 0%, var(--navy-deep) 100%);
}

.capitao-slider__viewport {
    position: relative;
    min-height: 280px;
}

.capitao-slider__slide {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    min-height: 280px;
}

.capitao-slider__slide.is-active {
    display: flex;
}

.capitao-slider__img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(480px, 62vh);
    margin: 0 auto;
    object-fit: contain;
    object-position: center center;
    border-radius: 8px;
}

.capitao-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(26, 43, 76, 0.75);
    color: var(--white);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.capitao-slider__arrow:hover {
    background: var(--navy);
    transform: translateY(-50%) scale(1.05);
}

.capitao-slider__arrow--prev {
    left: 10px;
}

.capitao-slider__arrow--next {
    right: 10px;
}

.capitao-slider__dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.capitao-slider__dot {
    width: 28px;
    height: 6px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

.capitao-slider__dot.is-active {
    background: var(--gold);
    width: 36px;
}

.capitao-modal__content {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.capitao-modal__header {
    background: linear-gradient(135deg, var(--navy-deep), var(--navy));
    color: var(--white);
    border-bottom: 3px solid var(--gold);
}

.capitao-modal__title {
    font-family: var(--font-display);
    font-weight: 700;
}

.capitao-modal__body {
    background: var(--surface);
}

.capitao-modal__text {
    color: var(--text);
    line-height: 1.65;
    font-size: 0.98rem;
}

.capitao-modal__text strong {
    color: var(--navy);
}

.capitao-modal__footer {
    background: var(--surface-2);
    border-top: 1px solid #e2e8f0;
    justify-content: center;
}

@media (min-width: 600px) {
    #options-list {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    #question-text {
        font-size: 1.55rem;
    }
}
