@import url("https://fonts.googleapis.com/css2?family=Nunito:ital@1&display=swap");

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

html * {
    font-family: "Nunito", sans-serif;
    font-weight: 500;
}

.logo {
    max-width: 40px;
}

.container-fluid {
    margin-top: -0.5rem;
    background-color: #7c4599;
}

.nav-link-custom {
    color: #ffffff;
    font-size: 20px;
    font-weight: 500;
}

.nav-link-custom:hover {
    color: #ffa500;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0.2rem 7rem 0.2rem;
}

.container-principal {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 0 1rem;
}

.container-game {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.container-game-instrucao {
    width: 100%;
    padding-left: 20px;
}

.buttons-e-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.tempo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

#millisecond {
    display: none;
}

.memory-game {
    max-height: max-content;
    max-width: 1300px;
    display: flex;
    gap: 7px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    perspective: 1000px;
    /* perspectiva do usuario no eixo z, quanto maior, maior o efeito da perspectiva */
}

.card {
    width: 250px;
    height: 170px;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transform: scale(1);
    transform-style: preserve-3d;
    transition: transform 0.9s;
}

.card:active {
    transform: scale(0.97);
    transition: transform 0.2s;
}

.card-front,
.card-back {
    width: 100%;
    height: 100%;
    padding: 20px;
    position: absolute;
    border-radius: 5px;
    background: #d56a00;
    backface-visibility: hidden;
}

.card-front {
    transform: rotateY(180deg);
    /* antes, o verso aparecia transparente, pois ambas as imagens tem position absolute, ao girar no eixo Y, elas ficaram com os versos virados */
}

.card.flip {
    transform: rotateY(180deg);
}

#card-win {
    background-color: #10b552;
    padding: 0.5rem;
    color: #fff;
    border-radius: 6px;
    font-size: 22px;
    max-width: max-content;
    position: absolute;
    top: 10rem;
    opacity: 96%;
}

#start {
    color: #fff;
    background-color: #1ac241;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: 0.3s all ease-in-out;
}

#start:hover {
    background-color: #88e759;
    transform: scale(1.1);
}

#refresh {
    text-decoration: none;
    color: #fff;
    background-color: #7c4599;
    padding: 0.5rem;
    border-radius: 8px;
    transition: 0.3s all ease-in-out;
}

#refresh:hover {
    background-color: #9b5fbb;
    transform: scale(1.1);
}


/* _______Footer______________ */

footer {
    background-color: #1D0426;
    padding: 0.7rem 2rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    color: #fff;
}

.footer-cabecario {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-cabecario a {
    background-color: #FFA500;
    padding: 10px 14px;
    border-radius: 5px;
}

.seta-topo {
    max-width: 15px;
}

.footer-container-1 {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.8rem;
}

.footer-container-1-social {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-icone-social {
    max-width: 30px;
    transition: 0.3s all ease-in-out;
}

.footer-icone-social:hover {
    transform: scale(1.1);
}

.footer-container-2 {
    display: flex;
    justify-content: center;
}

@media (max-width: 1121px) {
    .card {
        width: 200px;
        height: 130px;
    }
}

@media (max-width: 921px) {
    .card {
        width: 160px;
        height: 130px;
    }
}

@media (max-width: 761px) {
    .card {
        width: 130px;
        height: 110px;
    }
}

@media (max-width: 641px) and (min-width: 400px) {
    .card {
        width: 110px;
        height: 100px;
    }
}

@media (max-width: 412px) {
    .card {
        width: 80px;
        height: 90px;
    }
}

@media (max-width: 322px) {
    .card {
        width: 70px;
        height: 80px;
    }

    #card-win {
        max-width: 200px;
    }
}

@media (max-width: 292px) {
    .card {
        width: 90px;
        height: 100px;
    }
}

@media (max-width: 260px) {
    .footer-cabecario a {
        display: none;
    }
}