*{
    margin: 0;
    padding: 0;
    font-family: Arial;
}
body{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;    
    background: url(background2.jfif);
    background-repeat: repeat;
    border-radius: 10px;
    
}
#game-area{ 
    background: url(background2.jfif);
    background-repeat: repeat;
    border-radius: 10px;
    box-shadow: 10px 10px 20px 20px  rgba(0, 0, 0, 0.4);
    padding: 30px;
    position: static;
    max-width: 700px;
    max-height:auto;
    display:flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
}
.card{
   margin: 7.5px;
   width: 115px;
   height: 130px; 
   position: relative;
   transform-style: preserve-3d;
   transition: transform .5s;   
}
.card-front, .card-back{
    width: 100%;
    height: 100%;
    border-radius: 20px;
    box-shadow: 10px 5px 10px  rgba(00,00, 00, 0.5);
    background-color: #5f7adb;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    backface-visibility: hidden;

}
.flip{
    transform: rotateY(180deg);
    
}
img{
    width: 80px;
    height: 80px;
}
.card-front{
    transform: rotateY(-180deg);
}
.card-back{
    background: url(background-carta.png);
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-size: cover;
}
#game-over{
    background-color: rgba(00,00, 00, 0.9);
    position: absolute;
    top: 0px;
    color: white;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-size: 25px;
    animation: fadeIn 1.5s ease-in-out;
}
#reset{
    background-color: rgb(0, 168, 168);
    border: none;
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
    font-size: 20px;
    color: black;
    font-weight: bolder;
}
#reset:active{
    background-color: rgb(201, 154, 0);
}
footer{
    background-color: rgba(0, 0, 0, 0.644);
    color: rgb(228, 228, 228);
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

@keyframes fadeIn{
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@media screen and (max-width: 700px) and (min-width: 0) {
    #game-area{
        box-shadow: none;
        border: none;
       
            
    }
    
}
@media screen and (max-width: 420px) and (min-width: 0) {
    .card{
       width: 80px ;
       height: 85px;
       margin: 5px 5px;
    }
    #game-area{
        margin-bottom: 100px;
    }
    
}
