html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;        /* sem scroll */
    touch-action: manipulation; /* melhora toque */
    -webkit-user-select: none;
    user-select: none;
}

@font-face {
    font-family: 'ComercioSansBook';
    src: url('../fonts/ComercioSans/ComercioSans-Book.woff2') format('woff2');
    font-weight: 400; /* normal */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ComercioSansBold';
    src: url('../fonts/ComercioSans/ComercioSans-Bold.woff2') format('woff2');
    font-weight: 700; /* bold */
    font-style: normal;
    font-display: swap;
}

button, .btn {
    touch-action: manipulation;
}

#appViewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #000;
}

#appStage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1080px;
    height: 1920px;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    overflow: hidden;
}

#app {
    position: relative;
    width: 1080px;
    height: 1920px;
    overflow: hidden;
}

.quiz_background {
    background-image: url(../images/quiz_bg_001.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}
.quiz_background.active {
    opacity: 1;
}
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;

    z-index: 1;
    pointer-events: none; /* não bloqueia toque */
}
#feaduaneirosLogo {
    background-image: url(../images/feaduaneiros_logo.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 743px;
    height: 250px;
}
#parceirosLogo {
    background-image: url(../images/parceiros_logo.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 710px;
    height: 247px;
}
.quizElements-top {
    top: var(--top);
}
.quizElementsMaxWidth {
    max-width: var(--maxWidth)!important;
}
#quizStartText {
    width: 550px;
    height: auto;
    font-family: 'ComercioSansBold', serif;
    font-size: 55px;
    text-align: center;
}
#quizEndText {
    width: 750px;
    height: auto;
    font-family: 'ComercioSansBold', serif;
    font-size: 55px;
    text-align: center;
}
#quizFinalScore {
    width: 750px;
    height: auto;
    font-family: 'ComercioSansBold', serif;
    font-size: 105px;
    text-align: center;
}
#quizBrinde, #quizSemBrinde {
    width: 750px;
    height: auto;
    font-family: 'ComercioSansBold', serif;
    font-size: 55px;
    text-align: center;
}
#quizSemBrinde {
    width: 1000px;
    font-size: 50px;
}
#qrcodeData {
    width: 500px;
    height: 500px;
}
#qrcodeDataBorder {
    width: 540px;
    height: 540px;
    border: 15px solid #0a58ca;
    border-radius: 30px;
    background-color: #0a58ca;
}
#userTokenSkip {
    width: 50px;
    height: 50px;
}
#quizRestart {
    width: 50px;
    height: 50px;
}
#quizQuestion {
    width: 1000px;
    max-width: 1000px;
    height: 400px;

    display: flex;              /* <- troca block por flex */
    align-items: center;        /* <- centraliza vertical */
    justify-content: center;    /* <- centraliza horizontal (texto) */

    box-sizing: border-box;
    font-family: 'ComercioSansBold', serif;
    font-size: 44px;
    text-align: center;
    line-height: 1.2;
    text-wrap: balance;
}

/* Botões de resposta */
.quizAnswerBtn{
    width: 900px;
    height: 200px;

    /* aparência */
    background: rgba(0, 74, 141, 0.55); /* transparência */
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;

    /* texto */
    color: #fff;
    font-family: 'ComercioSansBold', serif;
    font-size: 44px;
    line-height: 1.1;
    text-align: center;

    /* layout interno */
    display: flex;
    align-items: center;    /* centraliza vertical */
    justify-content: center;
    text-wrap: balance;
    padding: 18px 26px;

    /* sombra */
    box-shadow:
            0 10px 25px rgba(0,0,0,0.28),
            0 0 10px rgba(126,200,255,0.18),
            inset 0 1px 0 rgba(255,255,255,0.08);

    /* suavidade */
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
    position: relative;
    overflow: hidden; /* necessário pro brilho */
    user-select: none;

    /* vidro (opcional, fica ótimo com particles) */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    animation: quizGlow 3.5s ease-in-out infinite;
    will-change: transform, box-shadow;
}

.quizAnswerBtn{
    cursor: pointer;
}
/**/
/* Hover / foco (para mouse / teclado) */
.quizAnswerBtn:hover,
.quizAnswerBtn:focus-visible{
    transform: translateY(-2px);
    background: rgba(0, 74, 141, 0.65);
    box-shadow:
            0 14px 30px rgba(0,0,0,0.33),
            inset 0 1px 0 rgba(255,255,255,0.10);
    outline: none;
}

/* Clique */
.quizAnswerBtn:active{
    transform: scale(0.97);
}

/* “Highlight” suave passando pela borda */
.quizAnswerBtn::before{
    content: "";
    position: absolute;
    inset: -2px;                 /* cobre a borda */
    border-radius: inherit;
    padding: 2px;                /* espessura do brilho */

    background: linear-gradient(
            120deg,
            rgba(255,255,255,0.00) 0%,
            rgba(160,220,255,0.22) 20%,
            rgba(255,255,255,0.00) 40%,
            rgba(255,255,255,0.00) 100%
    );

    /* máscara para aparecer só como borda */
    -webkit-mask:
            linear-gradient(#000 0 0) content-box,
            linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    opacity: .55;
    transform: translateX(-40%);
    animation: quizBorderShine 4.2s ease-in-out infinite;
    pointer-events: none;
}

/* brilho mais discreto quando não está hover */
.quizAnswerBtn:not(:hover)::before{
    opacity: .40;
}

/* Animação do brilho */
@keyframes quizBorderShine{
    0%   { transform: translateX(-55%); }
    50%  { transform: translateX(55%); }
    100% { transform: translateX(-55%); }
}

@keyframes quizGlow{
    0% {
        box-shadow:
                0 10px 25px rgba(0,0,0,0.28),
                0 0 8px rgba(126,200,255,0.16),
                inset 0 1px 0 rgba(255,255,255,0.08);
    }
    50% {
        box-shadow:
                0 14px 30px rgba(0,0,0,0.33),
                0 0 22px rgba(126,200,255,0.34),
                inset 0 1px 0 rgba(255,255,255,0.12);
    }
    100% {
        box-shadow:
                0 10px 25px rgba(0,0,0,0.28),
                0 0 8px rgba(126,200,255,0.16),
                inset 0 1px 0 rgba(255,255,255,0.08);
    }
}

#quizFeedback{
    width: 400px;
    height: 400px;
    z-index: 9999;
    pointer-events: none;
    transform-origin: 50% 50%;
    opacity: 0; /* começa escondido */
}

.correctAnswer {
    background-image: url(../images/feedbak_ok.svg);
    background-repeat: no-repeat;
    background-size: contain;
}
.wrongAnswer {
    background-image: url(../images/feedbak_nok.svg);
    background-repeat: no-repeat;
    background-size: contain;
}

#quizScore {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

#quizScore svg {
    width: 100%;
    height: 100%;
    display: block;
}

#quizQuestionTimer {
    width: 100px;
    height: 100px;
    background-color: #0dcaf0;
}

/* glow especial quando terminar com 4 de 4 */
#quizScore.score-perfect::after {
    content: "";
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 1;
    background: radial-gradient(
            circle,
            rgba(212,178,58,0) 52%,
            rgba(212,178,58,0.22) 64%,
            rgba(255,226,120,0.55) 72%,
            rgba(212,178,58,0.18) 82%,
            rgba(212,178,58,0) 100%
    );
    filter: blur(10px);
    transform: scale(0.96);
    animation: scorePerfectHalo 1.1s ease-in-out infinite alternate;
}

@keyframes scorePerfectHalo {
    from {
        opacity: 0.45;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1.03);
    }
}