body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #222;
}

#board {
    perspective: 1000px;
    display:flex;
    justify-content:center;
    flex-wrap: wrap;

}

.card {
    position: relative;
    width: 128px;
    height: 192px;
    cursor: pointer;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    image-rendering: pixelated;
}

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

.card img {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.back-face {
    z-index: 2;
    transform: rotateY(0deg);
}

.front-face {
    transform: rotateY(180deg);
}