* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}


body {

    font-family: 'Righteous', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
  
    background-color: #9091ef;

}

.card {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .5s;

}

.card_front,
.card_back {
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    box-shadow: 10px 10px 10px rgb(0, 0, 0, 0.45);
    backface-visibility: hidden;

}

.flip {
    transform: rotateY(180deg);
}


.card_front {
    transform: rotateY(180deg);
    background-color: #4B0082;

}

.card_back {
    color: #4B0082;
    background-color: #9370DB;
    font-size: 30px;


}

#gameOver {

    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 30px;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    top: 0;

}

#restar {
    padding: 20px;
    font-size: 20px;
    background-color: rgba(255, 240, 0, 0.8);
    border-radius: 10px;


}

.text {
    margin-bottom: 30px;
}

#gameBoard {
    display: flex;
    display: grid;
    grid-template: 1fr 1fr 1fr 1fr 1fr/ 1fr 1fr 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

@media screen and (max-width: 500px) {


    .card {
        width: 80px;
        height: 80px;
        position: relative;
        transform-style: preserve-3d;
        transition: transform .5s;
    
    }

#gameBoard {
  
    gap: 10px;
}

#gameOver {
 
    font-size: 20px;
   
}

}
