* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Righteous', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: linear-gradient(160deg, rgb(0, 0, 0), rgb(0, 0, 0), rgb(71, 71, 71));
    color: white;
    flex-direction: column;
}

#score div {
    font-family: monospace;
    display: inline-block;
    text-align: center;
    padding: 10px;
    font-size: 2rem;
}

.card {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .5s;
}

.card_back,
.card_front {
    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);
}

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

.card_back {
    color: white;
    background-color: #354963;
    font-size: 2rem;
}

#gameOver {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 2.5rem;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#restart {
    padding: 20px;
    font-size: 1.3rem;
    background-color: yellow;
    border: none;
    border-radius: 10px;
    margin-top: 10px;
}

#gameBoard {
    max-width: 700px;
    display: grid;
    grid-template: repeat(5, 1fr) / repeat(4, 1fr);
    gap: 20px;
}

a{
    color: white;
    text-decoration: none;
}

footer{
    margin-top: 10px;
    padding: 10px;
}

/* RESPONSIVIDADE */
@media screen and (max-width: 1400px) {
    .card {
        width: 85px;
        height: 85px;
    }

    .icon {
        width: 60%;
    }

    .card_back {
        font-size: 1.8rem;
    }

}

@media screen and (max-width: 800px) {
    .card {
        width: 80px;
        height: 80px;
    }

    .card_back {
        font-size: 1.5rem;
    }

    #gameOver {
        font-size: 1.6rem;
    }

    #restart {
        padding: 10px;
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 380px) {
    .card {
        width: 60px;
        height: 60px;
    }

    #score div {
        font-size: 1.3rem;
    }

    .card_back {
        font-size: 1.2rem;
    }

    .card_back,
    .card_front {
        border-radius: 10px;
    }

    #gameOver {
        font-size: 1.2rem;
    }

    #restart {
        padding: 8px;
        font-size: 0.9rem;
    }

    footer{
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 310px) {
    .card {
        width: 50px;
        height: 50px;
    }

    #gameOver {
        font-size: 1rem;
    }

    #restart {
        padding: 10px;
        font-size: 0.8rem;
    }

    footer{
        font-size: 0.7rem;
    }
}