body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #000000;
    margin: 0;
    font-family: 'klavika', sans-serif;
}

header {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    margin-top: 40px;
    max-width: 400px; 
}

.message {
    margin-bottom: 20px;
    color: #ecf0f1;
    font-size: 1.5rem;
    text-align: center;
}

.memory-game {
    width: 600px; 
    height: 500px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    perspective: 1000px;
    max-width: 520px;
    margin-bottom: auto;
}

.memory-card {
    width: calc(33.33% - 10px); 
    height: calc((33.33% - 10px) * 1.36);
    margin: 5px;
    position: relative;
    transform: scale(1);
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.mensaje-suerte{
    width: 500px;
    height: 100px;
    margin: 5px;
    position: relative;
    transform: scale(1);
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.memory-card:active {
    transform: scale(0.97);
    transition: transform 0.2s;
}

.memory-card.flip {
    transform: rotateY(180deg);
}

.front-face,
.back-face {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    border-radius: 5px;
}

.front-face {
    transform: rotateY(180deg);
}

.back-face {
    background: #ecf0f1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.front-face img,
.back-face img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 5px;
}

.prize-banner {
    position: fixed;
    bottom: 20px; 
    left: 50%; 
    transform: translateX(-50%);
    display: none; 
    z-index: 1000; 
    animation: pulsate 1.5s infinite; 
}

@keyframes pulsate {
    0% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.1);
    }
    100% {
        transform: translateX(-50%) scale(1);
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999; 
}

.prize-image {
    display: block;
    max-width: 100%; 
    margin: auto; 
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5); 
}

@media (max-width: 600px) {
    .memory-card {
        width: calc(33.33% - 10px); 
        height: calc((33.33% - 10px) * 1.384); 
    }
}