*
{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
body{
    background-color: rgb(18, 12, 73);
    color: white;
    padding: 50px;

}
h1{
    color: yellow;
}
#gameContainer{
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 40px 60px;
    flex-direction: column;
    /* gap: 100px; */
    background-color: rgb(189, 189, 7);
}



.gameCards{
    display: grid;
    grid-template-columns: repeat(5, 140px);
    grid-template-rows: repeat(2, cal(140px / 2 * 3));
    grid-gap: 14px;
    justify-content: center;
    width: 500px;
    height: 500px;
    transform-style: preserve-3d;
    cursor: pointer;

}

.item{
    width: 140px;
    height: 140px;
    background-color: rgb(127, 31, 4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.5s ease-in-out;
    position: relative;
    transform-style: preserve-3d;
    font-size: 5em;
    border-radius: 4px;
}

.item::after{
    position: absolute;
    background-color: rgb(127, 31, 4);
    content: "";
    inset: 0;
    transform: rotateY(0deg);
    transition: 0.25s;
    backface-visibility: hidden; 
   
    
}  
.item.cardOpen{
    transform: rotateY(0deg);
}
.cardOpen:after, .cardMatched:after{
    transform: rotateY(180deg);
}


.button{
    background-color: green;
    cursor: pointer;
    border-radius: 7px;
    width: 80px;
    height: 50px;
    font-size: 1em;
    color: white;
}
@media screen and (max-width: 920px){
    .item{
        width: 100px;
        height: 100px;
        font-size: 3em;
    }
    .gameCards{
    display: grid;
    grid-template-columns: repeat(2, 140px);
    grid-template-rows: repeat(5, cal(140px / 2 * 3));
    grid-gap: 10px;
    margin: 0px;
    padding: 0px;
    height: 600px;
        
    }
}