
h1 {
    text-align: center;
    color: #fff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 20px 0;
    background: #6589F9;
}

.grid {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.card {
    position: relative;
    transition: all .4s linear;
    transform-style: preserve-3d;
    margin: 5px;
}

.card,
.back,
.front {
    height: 150px;
    width: 150px;
}

.back,
.front {
    position: absolute;
    backface-visibility: hidden;
}

.front {
    z-index: 2;
    background: #FAB942 url('../img/question.gif') no-repeat center center / contain;
}

.back {
    transform: rotateY(180deg);
    background-color: #6589F9;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

.selected {
    transform: rotateY(180deg);
}

.match .front {
    background: #6589F9 !important;
}