/* Fonte responsiva e reset básico */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #00109d, #00aeff);
    color: white;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(14px, 2vw, 18px);
}

.botao-voltar {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #406697;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    z-index: 9999;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.botao-voltar:hover {
    background-color: #003080;
}

/* Container principal com responsividade */
.container {
    background-color: rgba(0, 0, 0, 0.6);
    padding: clamp(20px, 5vw, 40px);
    border-radius: 12px;
    width: clamp(300px, 90vw, 400px);
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(0, 78, 146, 0.5);
}

/* Logo adaptável */
.logo-ndap {
    width: clamp(50px, 10vw, 80px);
    margin-bottom: 20px;
    height: auto;
}

/* Título escalável */
h1 {
    color: #ff0000;
    font-size: clamp(20px, 4vw, 28px);
    font-weight: bold;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

/* Labels e inputs com escalabilidade */
label {
    display: block;
    margin: 10px 0 5px;
    font-weight: bold;
    color: #f0f0f0;
    font-size: 1em;
}

input,
select,
textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin-bottom: 15px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}

input::placeholder {
    color: #ddd;
}

input:focus,
select:focus {
    background: rgba(0, 0, 0, 0.475);
}

/* Botão responsivo */
button {
    width: 100%;
    padding: 12px;
    background: #ff0000;
    color: white;
    border: none;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s;
}

button:hover {
    background: #d32323;
}

/* Mensagens */
.mensagem {
    padding: 1rem;
    background-color: rgba(0, 195, 255, 0.8);
    color: white;
    text-align: center;
    font-size: 1em;
    font-weight: bold;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.mensagem.erro {
    background-color: rgba(255, 66, 66, 0.8);
}

.mensagem.sucesso {
    background-color: rgba(0, 195, 100, 0.8);
}

/* Cartão animado com frente e verso */
.card-visual {
    perspective: 1000px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
    height: 200px;
    position: relative;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-visual.virado .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Frente do cartão */
.card-front {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-chip {
    width: 40px;
    height: 30px;
    background: gold;
    border-radius: 5px;
    margin-bottom: 20px;
}

.card-number {
    font-size: 1.4em;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.card-holder,
.card-expiration {
    font-size: 0.9em;
    text-transform: uppercase;
}

/* Verso do cartão */
.card-back {
    background: linear-gradient(135deg, #1f1f1f, #444);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding-right: 30px;
}

.cvv-label {
    font-size: 0.9em;
    margin-bottom: 5px;
    opacity: 0.7;
}

.cvv-preview {
    font-size: 1.4em;
    letter-spacing: 2px;
}

/* Responsividade para telas pequenas */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    button {
        font-size: 1em;
    }
}