/* =====================================================================
   Quiz Reward Wall 1.9 (mobailes) — cartão branco sobre a página borrada.
   Cores vêm das variáveis do painel; os efeitos são fixos.
   ===================================================================== */

#qrw-overlay {
    --qrw-primary-color: #33437b;
    --qrw-secondary-color: #ffffff;
    --qrw-bg-color: #ffffff;
    --qrw-text-color: #333333;
    --qrw-header-color: #fafafa;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    /* Véu claro levemente transparente (84%), com um toque da cor do quiz no topo.
       O painel pode trocar por um fundo escuro em "Escurecer o fundo (%)". */
    background: rgba(248, 250, 252, .84);
    background: var(--qrw-overlay-bg, radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--qrw-primary-color) 12%, rgba(248, 250, 252, .84)) 0%, rgba(248, 250, 252, .84) 60%));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    animation: qrw-fadeIn .4s ease forwards;
}

#qrw-overlay *,
#qrw-overlay *::before,
#qrw-overlay *::after {
    box-sizing: border-box;
}

@keyframes qrw-fadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes qrw-fadeOut {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

#qrw-overlay.qrw-fade-out {
    animation: qrw-fadeOut .3s ease-out forwards;
}

/* Cartão */
#qrw-overlay #qrw-modal {
    position: relative;
    width: calc(100% - 24px);
    max-width: 600px;
    max-height: calc(100vh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--qrw-bg-color);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
}

/* X discreto: fecha o quiz sem anúncio e sem redirecionar */
#qrw-overlay .qrw-close {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 3;
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #9a9a9a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px !important;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    opacity: .55;
    transition: opacity .2s ease, color .2s ease;
}

#qrw-overlay .qrw-close:hover,
#qrw-overlay .qrw-close:focus-visible {
    opacity: .9;
    color: #777777;
    outline: none;
}

#qrw-overlay .qrw-close[hidden] {
    display: none;
}

/* Topo com a logo do site */
#qrw-overlay .qrw-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    background: var(--qrw-header-color);
    border-bottom: 1px solid #f0f0f0;
}

#qrw-overlay .qrw-header.is-dark {
    border-bottom-color: rgba(255, 255, 255, .08);
}

#qrw-overlay .qrw-header img {
    display: block;
    max-width: 120px;
    max-height: 22px;
    margin: 0;
    object-fit: contain;
}

/* Logo branca num topo claro: vira silhueta cinza-escura, discreta */
#qrw-overlay .qrw-header img.is-tinted {
    filter: brightness(0);
    opacity: .72;
}

#qrw-overlay .qrw-header .qrw-sitename {
    font-size: 18px;
    font-weight: bold;
    color: var(--qrw-text-color);
}

#qrw-overlay .qrw-header.is-dark .qrw-sitename {
    color: #ffffff;
}

#qrw-overlay .qrw-body {
    padding: 0 30px 30px;
}

/* Progresso */
#qrw-overlay .qrw-progress-bar-container {
    width: 100%;
    height: 5px;
    margin: 20px 0 30px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
}

#qrw-overlay .qrw-progress-bar {
    width: 0;
    height: 100%;
    background: var(--qrw-primary-color);
    border-radius: 2px;
    transition: width .5s ease;
}

/* Pergunta e respostas */
#qrw-overlay .qrw-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 300px;
}

#qrw-overlay .qrw-question {
    margin: 0 0 30px;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 24px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    text-align: center;
    color: var(--qrw-text-color);
}

#qrw-overlay .qrw-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

#qrw-overlay .qrw-option {
    width: 100%;
    margin: 0;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    background: var(--qrw-primary-color);
    color: var(--qrw-secondary-color);
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    line-height: 1.6 !important;
    text-transform: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .15);
    transition: all .3s ease;
    -webkit-tap-highlight-color: transparent;
}

#qrw-overlay .qrw-option:not(.selected):hover {
    filter: brightness(.9);
    transform: translateY(-2px);
}

#qrw-overlay .qrw-option:active {
    transform: scale(.98);
}

#qrw-overlay .qrw-option.selected {
    filter: brightness(.85);
    pointer-events: none;
}

#qrw-overlay .qrw-option:focus-visible {
    outline: 2px solid var(--qrw-text-color);
    outline-offset: 2px;
}

/* Carregando */
#qrw-overlay .qrw-loading-screen {
    display: none;
    text-align: center;
    animation: qrw-fadeUp .5s ease-in;
}

#qrw-overlay .qrw-loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    font-size: 40px;
}

#qrw-overlay .qrw-loading-dots span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--qrw-primary-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, .2);
    animation: qrw-bounce 1.4s ease-in-out infinite both;
}

#qrw-overlay .qrw-loading-dots span:nth-child(2) { animation-delay: .16s; }
#qrw-overlay .qrw-loading-dots span:nth-child(3) { animation-delay: .32s; }

#qrw-overlay .qrw-loading-text {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--qrw-text-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .1);
    animation: qrw-pulse 2s ease-in-out infinite;
}

/* Tela final */
#qrw-overlay .qrw-result-screen {
    display: none;
    text-align: center;
}

#qrw-overlay .qrw-result-title {
    margin: 0 0 30px;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 22px !important;
    line-height: 1.35 !important;
    color: var(--qrw-text-color);
}

#qrw-overlay .qrw-result-text {
    margin: -16px 0 24px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--qrw-text-color);
    opacity: .85;
}

#qrw-overlay .qrw-reward-button {
    display: inline-block;
    margin: 0;
    padding: 15px 40px;
    border: none;
    border-radius: 12px;
    background: var(--qrw-primary-color);
    color: var(--qrw-secondary-color);
    font-family: inherit;
    font-size: 18px !important;
    font-weight: bold !important;
    line-height: 1.4 !important;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
    transition: all .3s ease;
}

#qrw-overlay .qrw-reward-button:hover {
    filter: brightness(.92);
    transform: translateY(-2px);
}

#qrw-overlay .qrw-reward-button:focus-visible {
    outline: 2px solid var(--qrw-text-color);
    outline-offset: 3px;
}

#qrw-overlay .qrw-button-subtext {
    display: block;
    margin-top: 14px;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #666666;
}

/* Rodapé com termos e privacidade, bem pequeno */
#qrw-overlay .qrw-footer {
    padding: 12px 30px;
    background: #fafafa;
    border-top: 1px solid rgba(0, 0, 0, .06);
    text-align: center;
    font-size: 10px;
    line-height: 1.5;
    color: #aaaaaa;
}

#qrw-overlay .qrw-footer p {
    margin: 0;
    font-size: 10px !important;
    line-height: 1.5 !important;
    color: #aaaaaa;
}

#qrw-overlay .qrw-footer a {
    color: #aaaaaa;
    text-decoration: underline;
}

#qrw-overlay .qrw-footer a:hover {
    color: #888888;
}

@keyframes qrw-bounce {
    0%, 80%, 100% { transform: scale(.8); opacity: .5; }
    40%           { transform: scale(1.2); opacity: 1; }
}

@keyframes qrw-pulse {
    0%   { opacity: .8; transform: scale(1); }
    50%  { opacity: 1; transform: scale(1.02); }
    100% { opacity: .8; transform: scale(1); }
}

@keyframes qrw-fadeUp {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    #qrw-overlay .qrw-body { padding: 0 20px 24px; }
    #qrw-overlay .qrw-content { min-height: 0; }
    #qrw-overlay .qrw-header { padding: 11px 20px; }
    #qrw-overlay .qrw-footer { padding: 10px 20px; }
}

@media (max-width: 360px) {
    #qrw-overlay .qrw-question { font-size: 21px !important; }
    #qrw-overlay .qrw-option { padding: 14px 18px; }
    #qrw-overlay .qrw-reward-button { padding: 14px 28px; }
}

@media (prefers-reduced-motion: reduce) {
    #qrw-overlay,
    #qrw-overlay *,
    #qrw-overlay *::before,
    #qrw-overlay *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Tela de espera do 2º acesso (falha com redirecionamento) */
#qrw-spinner-overlay {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2147483000;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: qrw-fadeIn .5s forwards;
}

#qrw-spinner-overlay.qrw-fade-out {
    animation: qrw-fadeOut .3s ease-out forwards;
}

.qrw-spinner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qrw-spinner-svg {
    width: 7rem;
    height: 7rem;
    animation: qrw-spin 1s linear infinite;
}

.qrw-spinner-svg .qrw-spinner-track {
    opacity: .25;
}

.qrw-spinner-svg .qrw-spinner-fill {
    opacity: .75;
}

@keyframes qrw-spin {
    to { transform: rotate(360deg); }
}

.qrw-spinner-text {
    font-family: Verdana, Geneva, sans-serif;
    color: transparent;
    padding: .5rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 1.15rem;
    animation: qrw-spinnerTextIn 1s ease-in-out forwards, qrw-pulse 2s ease-in-out infinite 1s;
}

@keyframes qrw-spinnerTextIn {
    0%   { color: transparent; }
    100% { color: var(--qrw-text-color, #333333); }
}

html.qrw-page-blocked,
body.qrw-page-blocked {
    overflow: hidden !important;
    overscroll-behavior: contain;
}

/* 26/10/2026: o aviso de consentimento do Google (UE) fica sempre por cima do quiz; sem ele o rewarded não dispara. */
.fc-consent-root, .fc-dialog-overlay, .fc-dialog-container { z-index: 2147483647 !important; }

/* =====================================================================
   1.12.0 — anúncios atrás do quiz. Véu semitransparente com desfoque: a página (e o bloco do topo)
   aparece em volta do cartão. "Escurecer o fundo (%)" do painel continua valendo.
   A classe dobrada vence o fundo de cada estilo (roblox, freefire, shein), que carrega depois.
   ===================================================================== */
#qrw-overlay.qrw-ads-behind.qrw-ads-behind {
    background: var(--qrw-overlay-bg, rgba(0, 0, 0, .35));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
/* 1.12.1 — Roblox neste modo: sem os pontinhos e sem os enfeites soltos do fundo; só o véu, com o cartão por cima. */
#qrw-overlay.qrw-ads-behind[data-qrw-theme="roblox"] .qrw-fx-decor {
    display: none;
}

/* =====================================================================
   1.12.7 — botão final esperando o anúncio. Mostra que o toque valeu: o texto some (a largura fica) e entra
   um anel girando. Sem texto novo, para valer em qualquer idioma. Dura no máximo ~3 s.
   ===================================================================== */
#qrw-overlay#qrw-overlay .qrw-reward-button.is-loading {
    position: relative;
    pointer-events: none;
    cursor: progress;
    animation: none;
    transform: none;
    filter: saturate(.8);
}
#qrw-overlay#qrw-overlay .qrw-reward-button.is-loading #qrw-button-label {
    visibility: hidden;
}
#qrw-overlay#qrw-overlay .qrw-reward-button.is-loading::after {
    display: none;
}
#qrw-overlay#qrw-overlay .qrw-reward-button.is-loading::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 3px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: qrw-spin .7s linear infinite;
}
