@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Mono:wght@500&display=swap');

/* -------- GERAL --------- */
body {
    margin: 0;
    padding: 0;
    background-blend-mode: darken;
    background-color: #1c1c1c;
    color: #c9d1d9;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    position: relative;
    overflow-x: hidden;
}

body::after {
    content: "CODE SAFE™";
    position: fixed;
    top: 2vh;
    left: 0.7vw;
    z-index: 0;
    color: #2386e6;
    font-family: 'Fira Mono', 'Consolas', 'Courier New', monospace;
    font-size: 1.5vw;
    opacity: 0.22;
    letter-spacing: 0.13em;
    pointer-events: none;
    text-shadow: 0 0 8px #2386e6, 0 0 16px #2386e6;
    user-select: none;
    white-space: nowrap;
    text-transform: uppercase;
    writing-mode: vertical-lr;
    text-align: left;
    line-height: 1.1;
}

.terminal-bg-typing {
    position: fixed;
    top: 05%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    color: #2386e6;
    font-family: 'Fira Mono', 'Consolas', 'Courier New', monospace;
    font-size: 3vw;
    opacity: 0.12;
    letter-spacing: 0.25em;
    text-shadow: 0 0 10px #2386e6, 0 0 20px #2386e6;
    user-select: none;
    white-space: nowrap;
    text-transform: uppercase;
    pointer-events: none;
}
.terminal-bg-typing .blinker {
    animation: blink 1s steps(2, start) infinite;
    font-weight: bold;
}
@keyframes blink {
    to { visibility: hidden; }
}

/* ----------------- CARD STYLES ------------------ */
.card-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    margin-bottom: 40px;
    margin-top: 10vh;
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #202837;
    border: 1.5px solid #28345a;
    border-radius: 12px;
    padding: 32px 22px 36px 22px;
    text-align: center;
    width: 320px;
    min-height: 440px;
    box-shadow: 0 4px 18px 0 #13204255;
    transition: box-shadow 0.25s, border 0.25s, transform 0.18s;
    cursor: pointer;
    position: relative;
    overflow: visible;
    opacity: 1;
}

.card.selected,
.card:hover {
    border: 2px solid #2386e6;
    box-shadow: 0 0 20px 0 #2386e644;
    transform: translateY(-4px) scale(1.018);
}

.card h2 {
    color: #58a6ff;
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card p {
    color: #bfc9d1;
    font-size: 1.05em;
    margin-bottom: 16px;
}

.card .price {
    font-size: 1.5em;
    font-weight: 700;
    color: #2386e6;
    margin: 0 0 12px 0;
    background: #232e42;
    display: inline-block;
    padding: 10px 24px;
    border-radius: 10px;
    box-shadow: 0 2px 8px #2386e622;
    letter-spacing: 1px;
}

.card .scans {
    font-size: 1em;
    font-weight: 600;
    color: #dbeafe;
    background: #253257;
    border-radius: 20px;
    display: inline-block;
    padding: 6px 18px;
    margin-bottom: 12px;
    margin-top: 4px;
}

.card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: center;
    color: #c9d1d9;
    font-size: 1em;
}

.card ul li {
    margin-bottom: 10px;
    font-size: 1em;
}

.card ul li.positive {
    color: #58a6ff;
}

.card ul li.negative {
    color: #728199;
}

.card button {
    padding: 14px 0;
    width: 100%;
    font-size: 1.09em;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(90deg, #1b61b3, #2386e6 85%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 14px;
    transition: background 0.3s, filter 0.2s;
    box-shadow: 0 2px 8px #0f223b33;
    letter-spacing: 1px;
}

.card button:hover {
    background: linear-gradient(90deg, #2386e6, #1b61b3 85%);
    color: #fff;
    filter: brightness(1.12);
}

/* ----------------- FORM PAGE & FORM STYLES ------------------ */
.form-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 20px;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}

/* FORMULÁRIO DE PAGAMENTO/REGISTRO - 70% DA TELA, CENTRALIZADO */
.form-container {
    background: #fff;
    border: 1.5px solid #2386e6;
    border-radius: 18px;
    box-shadow: 0 8px 48px 0 #2386e644, 0 1.5px 0 #2386e6;
    padding: 48px 48px 40px 48px;
    width: 70vw;
    max-width: 950px;
    min-width: 340px;
    margin: 4vh auto 0 auto;
    text-align: left;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    position: relative;
    transition: width 0.3s;
}

.form-container::before {
    content: "";
    display: block;
    height: 4px;
    width: 64px;
    background: linear-gradient(90deg, #1b61b3, #2386e6 85%);
    border-radius: 4px 4px 0 0;
    position: absolute;
    top: -6px;
    left: 48px;
    z-index: 3;
}

.form-container h1 {
    color: #2386e6;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    font-weight: 700;
}
.form-container .subtitle {
    color: #40506b;
    font-size: 15px;
    margin-bottom: 28px;
    text-align: left;
}

.form-container label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1b355d;
    letter-spacing: 0.03em;
    margin-top: 10px;
}
.form-container input {
    width: 100%;
    padding: 13px 12px;
    margin-bottom: 16px;
    border: 1.5px solid #d2e3f7;
    border-radius: 8px;
    background: #f7fbff;
    color: #132042;
    font-size: 1.02em;
    transition: border-color 0.25s, box-shadow 0.2s;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    outline: none;
    letter-spacing: 0.03em;
}
.form-container input:focus {
    border-color: #2386e6;
    box-shadow: 0 0 0 2px #2386e644;
    background: #f3f9ff;
}

/* Campos agrupados para um visual mais "cartão" */
.form-container .input-row {
    display: flex;
    gap: 12px;
}
.form-container .input-row > div {
    flex: 1;
}

.form-container .selected-plan-info {
    background: #eaf3fc;
    color: #2386e6;
    border-radius: 7px;
    padding: 10px 14px;
    font-weight: bold;
    font-size: 1.08em;
    margin-bottom: 18px;
    border-left: 4px solid #2386e6;
    margin-top: -6px;
}

#g-recaptcha, .g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 10px 0 18px 0;
}

#paymentBrick_container {
    background: #f4faff;
    border: 1.5px solid #d2e3f7;
    border-radius: 9px;
    margin: 18px 0 10px 0;
    padding: 18px 8px 10px 8px;
    box-shadow: 0 2px 10px #2386e622;
    min-height: 80px;
    display: none;
}

.form-container button[type="submit"] {
    width: 100%;
    padding: 14px 0;
    font-size: 1.14em;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #1b61b3, #2386e6 85%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 6px;
    margin-bottom: 0;
    box-shadow: 0 2px 8px #2386e622;
    letter-spacing: 0.08em;
    transition: background 0.26s, filter 0.19s;
}
.form-container button[type="submit"]:disabled {
    background: #adbfd1;
    color: #dde7f1;
    cursor: not-allowed;
    opacity: 0.6;
}
.form-container button[type="submit"]:hover:not(:disabled) {
    background: linear-gradient(90deg, #2386e6, #1b61b3 85%);
    color: #fff;
    filter: brightness(1.12);
}

.form-container .extra-instructions {
    font-size: 0.97em;
    color: #40506b;
    margin-top: 14px;
    margin-bottom: 8px;
    background: #f4faff;
    border-left: 3px solid #2386e6;
    border-radius: 0 8px 8px 0;
    padding: 8px 14px;
}

.form-container .or-separator {
    width: 100%;
    text-align: center;
    margin: 24px 0 18px 0;
    position: relative;
}
.form-container .or-separator span {
    display: inline-block;
    background: #fff;
    color: #2386e6;
    font-weight: 500;
    padding: 0 12px;
    position: relative;
    z-index: 2;
}
.form-container .or-separator::before {
    content: "";
    display: block;
    border-top: 1.5px solid #d2e3f7;
    width: 100%;
    height: 1px;
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 1;
}

/* ----------------- TOASTS & MESSAGES ------------------ */
.toast-message {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #1e90ff;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    z-index: 9999;
    box-shadow: 0 8px 32px #1e90ff44;
    opacity: 0;
    pointer-events: none;
    animation: toast-in 0.5s forwards, toast-out 0.5s 1.5s forwards;
}
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-60px);}
    to   { opacity: 1; transform: translateY(0);}
}
@keyframes toast-out {
    to   { opacity: 0; transform: translateY(-60px);}
}

#register-message {
    display: none;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.1em;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}
.success-message {
    color: #238636;
    background: #e7faee;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #238636;
}
.error-message {
    color: #f85149;
    background: #fdeaea;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #f85149;
}

/* ----------------- BACK LINK ------------------ */
.back-link {
    text-align: center;
    margin-top: 20px;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}
.back-link a {
    color: #58a6ff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
.back-link a:hover {
    color: #238636;
}

/* ----------- RESPONSIVIDADE & AJUSTES ----------- */
.active_final {
    display: none;
}

@media (max-width: 1300px) {
    .form-container {
        width: 90vw;
        max-width: 98vw;
        padding: 30px 10vw 30px 10vw;
    }
}
@media (max-width: 1020px) {
    .card-container {
        flex-direction: column;
        align-items: center;
    }
    .form-container {
        width: 98vw;
        max-width: 99vw;
        padding: 24px 4vw;
    }
}
@media (max-width: 768px) {
    .form-container {
        width: 100vw;
        max-width: 100vw;
        padding: 18px 2vw;
    }
    .card {
        width: 250px;
        min-height: 0;
    }
    .card-container {
        margin-top: 6vh;
    }
}
@media (max-width: 480px) {
    .form-container {
        width: 100vw;
        max-width: 100vw;
        padding: 12px 1vw;
    }
    .card {
        width: 100%;
        min-height: 0;
        padding: 18px 6px 22px 6px;
    }
    .card-container {
        margin-top: 3vh;
    }
    body::after {
        font-size: 3vw;
        left: 2vw;
        top: 3vh;
    }
}

/* Para forçar o botão do Mercado Pago Brick a ficar maior */
#paymentBrick_container button,
#paymentBrick_container .mp-btn,
#paymentBrick_container [class*="mercadopago"] button,
#paymentBrick_container [class*="mp-"] button {
    min-width:400px;
    min-height: 54px;
    font-size: 1.17em;
    font-weight: 700;
    padding: 14px 0;
    border-radius: 8px !important;
    background: linear-gradient(90deg, #1b61b3, #2386e6 85%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px #2386e622;
}

/* Se ainda assim não pegar, use: */
#paymentBrick_container button {
    min-width: 230px !important;
    min-height: 54px !important;
    font-size: 1.17em !important;
    font-weight: bold !important;
}