/* Reset básico e responsividade */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Tela de Login */
body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* <-- Ajuste aqui */
    align-items: center;
    min-height: 100vh;
    background: #1b0707;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

footer.rodape {
    width: 100%;
    padding: 10px 0;
    color: var(--cor-titulos, #c5c2c2); 
    background-color: #0d4223;
    text-align: center;
    font-family: var(--fonte-principal, Arial);
    font-size: 1rem;
    
}

/* Tela de mensagem */
.mensagem {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(169, 255, 191, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: #e74c3c;
    font-size: 2em;
    text-align: center;
    flex-direction: column;
}

#close-message {
    width: 150px;
    height: 50px;
    font-size: 20px;
}



/* Campos de entrada */
input {
    padding: 10px;
    width: 80%;
    height: 40px;
    margin-top: 30px;
    border: 2px solid #2ecc71;
    border-radius: 5px;
}

/* Botões */
button, #close-message {
    width: 150px;
    height: 50px;
    margin-top: 20px;
    padding: 10px;
    background: #e74c3c;
    color: white;
    border:none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
}

button:hover,
#close-message:hover {
    background: #2ecc71;
}

/* Tela do Jogo */
.game-container {
    flex: 1;
    margin-top: 70px;
    margin-bottom:70px;
    width: 95%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    grid-gap: 10px 60px;
    justify-content: center;
    text-align: center;
    background: rgba(131, 134, 136, 0.2);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.9);
    z-index: 1;
    position: relative;
}

.container {
    width: 90%;
    max-width: 500px;
    color: #e74c3c;
    text-align: center;
    background: rgba(131, 134, 136, 0.2);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
}

.card {
    width: 100%;
    aspect-ratio: 6 / 7;
    background-color: #2ecc71;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    border-radius: 10px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border: solid #2ecc71;
}

/* Frente da carta */
.card::before {
    content: "❤️";
    font-size: 60px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    backface-visibility: hidden;
}

/* Verso da carta */
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transform: rotateY(180deg);
    backface-visibility: hidden;
    position: absolute;
}

/* Quando a carta é virada */
.card.flipped {
    transform: rotateY(180deg);
}

/* Responsividade */
@media (max-width: 768px) {
    .msg {
        margin-top: 200px;
        font-size: 1.2em;
    }

    button, #close-message {
        width: 120px;
        height: 40px;
        font-size: 16px;
    }

    .card::before {
        font-size: 40px;
    }

    .container {
        margin-top: 160px; 
        margin-bottom: 50px;
        padding: 15px;
    }

    .rodape {
        font-size: 0.9rem;
    }

    .game-container {
        margin-top: 30px;
    }
}

@media (min-width: 769px) {
    .container {
        margin-top: 270px;
    }
}




