
/* Styles reset  */

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

body {
    height: 100vh;
    background: #1E1E1E;
}

.container {
    width: 800px;
    height: 600px;
    display: flex;
    flex-wrap: wrap;
    perspective: 1000px;
}

.card{
    margin: 5px;
    width: 20%;
    height: 30%;
    position: relative;
    transform: scale(1);
    transform-style: preserve-3d;
    transition: transform .5s;
    transform: rotateY(180deg);

}

.card:active{
    transform: scale(.82);
}

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

.front {
    width: 100%;
    height: 100%;
    padding: 20px;
    position: absolute;
    background: whitesmoke;
    backface-visibility: hidden;
    transform: rotateY(180deg);
}

.flipped {
    width: 100%;
    height: 100%;
    padding: 20px;
    position: absolute;
    background: whitesmoke;
    backface-visibility: hidden;
}
