:root {
    --bg-black: #050505;
    --color-purple-neon: #9d4edd;
    --color-lime-green: #39ff14;
    --color-white: #ffffff;
}

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

body {
    background: var(--bg-black);
    font-family: 'Montserrat', sans-serif;
    color: var(--color-white);
    padding: 40px 0;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--color-purple-neon);
    text-shadow: 0 0 15px rgba(157, 78, 221, 0.4);
}

.subtitle {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.2rem;
    opacity: 0.9;
}

.checkout-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.checkout-form {
    background: #0f0f0f;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 0 25px rgba(157, 78, 221, 0.15);
    border: 2px solid var(--color-purple-neon);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 0.95rem;
}

input,
select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid var(--color-purple-neon);
    background: #1a1a1a;
    color: var(--color-white);
    font-size: 1rem;
}

input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 12px rgba(157, 78, 221, 0.5);
}

.btn-submit {
    margin-top: 10px;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 50px;
    background: var(--color-purple-neon);
    color: var(--color-white);
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.5);
}

.btn-submit:hover {
    box-shadow: 0 0 25px rgba(157, 78, 221, 0.8);
    transform: translateY(-3px);
}

/* QR CODE BOX - CORRIGIDO */
.payment-box {
    background: #0f0f0f;
    border-radius: 20px;
    border: 2px solid var(--color-lime-green);
    box-shadow: 0 0 25px rgba(57, 255, 20, 0.25);
    text-align: center;

    /* APLICAÇÃO DO FLEXBOX PARA ORGANIZAR O CONTEÚDO DINAMICAMENTE */
    display: flex;
    flex-direction: column;
    height: 500px;
    padding: 30px;
}

.payment-box h3 {
    color: var(--color-lime-green);
    font-size: 1.6rem;
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

/* ESTILOS PARA O CONTEÚDO PIX (INSERIDO PELO JS) */

/* Estilo para a imagem do QR Code em si */
.qr-code-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    border: 5px solid var(--color-lime-green);
    border-radius: 10px;
}

/* Estilo para a caixa do código Pix (o texto copiável) */
.pix-code-container {
    background: #1a1a1a;
    border: 1px solid var(--color-lime-green);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    word-break: break-all;
    /* Permite quebra de linha em qualquer caractere para evitar overflow */
    text-align: left;
    font-size: 0.85rem;
    color: var(--color-white);
    position: relative;
}

.pix-code-container::before {
    content: "CÓDIGO PIX COPIA E COLA";
    position: absolute;
    top: -10px;
    left: 10px;
    background: var(--bg-black);
    color: var(--color-lime-green);
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 5px;
}

.details-link {
    display: block;
    margin-top: 15px;
    color: var(--color-lime-green);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.details-link:hover {
    color: var(--color-white);
}

/* PLACEHOLDER INICIAL */
.qr-placeholder {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    border: 2px dashed var(--color-lime-green);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    margin-bottom: 20px;
}

/* SETA DE VOLTAR */
.back-arrow {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-purple-neon);
    transition: 0.3s ease;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.6);
}

.back-arrow:hover {
    transform: translateX(-5px);
    text-shadow: 0 0 18px rgba(157, 78, 221, 1);
    color: var(--color-white);
}

/* -------- RESPONSIVO -------- */
@media (min-width: 900px) {
    .checkout-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }

    .checkout-form {
        flex: 1;
    }

    .payment-box {
        flex: 1;
    }
}


/* FUNDO ESCURO DO MODAL */
.modal-overlay {
    display: none;
    /* Escondido por padrão */
    position: fixed;
    z-index: 1000;
    /* Fica por cima de tudo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    /* Fundo preto transparente */
    backdrop-filter: blur(5px);
    /* Efeito de desfoque chique */
    align-items: center;
    justify-content: center;
}

/* CAIXA DO CONTRATO */
.modal-content {
    background-color: #111;
    border: 2px solid var(--color-purple-neon);
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    /* Largura máxima no PC */
    padding: 20px;
    box-shadow: 0 0 30px rgba(157, 78, 221, 0.3);
    position: relative;
    text-align: center;
}

.modal-content h2 {
    color: var(--color-purple-neon);
    margin-bottom: 20px;
}

/* BOTÃO DE FECHAR (X) */
.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--color-lime-green);
}

/* BOTÃO INFERIOR */
.btn-fechar-modal {
    margin-top: 20px;
    background: transparent;
    border: 2px solid var(--color-lime-green);
    color: var(--color-lime-green);
    padding: 10px 30px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.btn-fechar-modal:hover {
    background: var(--color-lime-green);
    color: #000;
}

.contrato-texto {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    max-height: 400px;
    /* Garante que não estica a tela */
    overflow-y: auto;
    /* Cria a barra de rolagem */
    margin-bottom: 20px;
    border: 1px solid #333;
}

.contrato-texto h4 {
    color: var(--color-lime-green);
    margin-top: 20px;
    margin-bottom: 10px;
}

.contrato-texto p {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}