*{
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

body{
    height: 100vh;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: 16px;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.header{
    height: 10%;
    background-color: brown;
    width: 100%;
    display: flex;
    color: white;
    justify-content: center;
    align-items: center;
    margin-bottom: 2em;
}

.main{
    height: 80%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.moves{
    height: 10%;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: .5em;
}

.main__grid{
    height: 80%;
    width: 60%;
    display: grid;
    grid-template-columns: repeat(4, 80px);
    grid-template-rows: repeat(4, 80px);
    gap: 1em;
    place-content: center;
    border-radius: 10px;
    background-color: rgb(0, 0, 0);
}

.card__container{
    width: 80px;
    height: 80px;
    position: relative;
    perspective: 1000px;
}

.card{
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: all 500ms ease-in-out;
}

.card__front{
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: brown;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reveal{
    transform: rotateY(180deg);
}

.card__back{
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: white;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

.card__back i{
    color: brown;
    font-size: 3rem;
}

.footer{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 10%;
    width: 100%;
    background-color: brown;
    color: white;
    font-size: 1.2rem;
}

@media screen and (max-width:900px){
    .main__grid{
        width: 80%;
    }
}


@media screen and (max-width:700px){
    .main__grid{
        grid-template-columns: repeat(4, 70px);
        grid-template-rows: repeat(4, 70px);
    }

    .card{
        width: 70px;
        height: 70px;
    }

    .card__back i{
        font-size: 2rem;
    }
}
@media screen and (max-width:550px){
    .main__grid{
        width: 90%;
        grid-template-columns: repeat(4, 60px);
        grid-template-rows: repeat(4, 60px);
    }

    .card{
        width: 60px;
        height: 60px;
    }

    .card__back i{
        font-size: 1.5rem;
    }
}

@media screen and (max-width:400px){
    .main__grid{
        width: 100%;
        border-radius: 0;
    }
}