
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
input, button{
    background: none;
    border: none;

}

body{
    font-family: 'Roboto', sans-serif;
    position: relative;
    height: 100vh;
    display: flex;

    background-color: #ededed;
    justify-content: center;
    align-items: center;

}

#interaçaoInicial{
    z-index: 10;
    width: 100%;
    height: 100vh;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.9);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}

#interaçaoInicial div{
    padding: 2rem;                                    
    background-color: #ededed;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 2rem;
    border-radius: .8rem;
}

#interaçaoInicial div h1{
    margin-bottom: 1.3rem;
}
#interaçaoInicial div button{
    width: 300px;
    margin-top: 1rem;
    border-radius: 0.5rem;
    font-size: 1.5rem;
    padding: 20px;
    background: yellow;    
    cursor: pointer;
}




.card{
    width: 130px;
    height: 130px;
    position: relative;

    transform-style: preserve-3d;

    transition: transform .5s;
}

.front, .back{
    width: 100%;
    height: 100%;

    position: absolute;

    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.45);
    backface-visibility: hidden;
}

.flip{
    transform: rotateY(180deg);
}
.front{
    background-color: #101c2c;

    transform: rotateY(180deg);
}
.back{
    background-color:  #800080;

    cursor: pointer;

   
}


#gameOver{
    position: absolute;  
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 40px;

    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#game{ 
    max-width: 700px;
    display: grid;
    grid-template: 1fr 1fr 1fr 1fr  / 1fr 1fr 1fr 1fr 1fr;
    gap: 20px;

    
}
#gameOver span{
    font-weight: bold;
    font-size: 3rem;
    margin-bottom: 10px;

    width: 100%;
    text-align: center;
}

.btnGameOver{
    width: 300px;
    margin-top: 1rem;
    border-radius: 0.5rem;
    font-size: 2rem;
    padding: 20px;
    background: yellow;    
    cursor: pointer;
}
@media(max-width: 700px ){
    #game{
        width: 500px;
        height: 90vh;
        padding-inline: 10px;
        grid-template: 1fr 1fr 1fr 1fr 1fr / 1fr 1fr 1fr 1fr;
        gap: 8px;
    }
    .card{
        width: 90%;
        height: 90%;
        justify-self: center;
    }

    #gameOver{
        font-size: 30px;
        width: 100%;
    }
    #gameOver, span{
        font-size: 18px;
    }

    #gameOver #btn{
        padding: 10px;
        font-weight: bold;
    }
}

@media(max-width: 560px){
    #game{
        height: 80%;
    }
    .card{
        width: 100%;
        height: 90%;

    }

    #gameOver{
        font-size: 30px;
        width: 100%;
    }

    #gameOver #btn{
        padding: 10px;
        font-weight: bold;
    }
}
