@font-face {
    font-family: 'Palanquin';
    src: url('./fonts/palanquin/palanquin-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.memoryGame * {
    box-sizing: border-box;
}

.memoryGame {
    position: relative;
    height: 100%;
}

.playArea {
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    -ms-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-perspective: 500px;
    -moz-perspective: 500px;
    -ms-perspective: 500px;
    perspective: 500px;
    height: 100%;
}

@-webkit-keyframes matchAnim {
    0% {
        background: white;
    }
    100% {
        background: transparent;
    }
}

@keyframes matchAnim {
    0% {
        background: white;
    }
    100% {
        background: transparent;
    }
}

.card {
    float: left;
    text-align: center;
    display: block;
    -webkit-perspective: 500px;
    -moz-perspective: 500px;
    -ms-perspective: 500px;
    perspective: 500px;
    position: relative;
    cursor: pointer;
    z-index: 50;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 800px) {
    .card {
        width: 25%;
        height: 16.666%;
    }
}

.card .inside {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    -ms-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transition: .4s ease-in-out;
    -moz-transition: .4s ease-in-out;
    -ms-transition: .4s ease-in-out;
    transition: .4s ease-in-out;
    background: white;
}

.card .inside > .front,
.card .inside > .back {
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    -ms-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transition: .4s ease-in-out;
    -moz-transition: .4s ease-in-out;
    -ms-transition: .4s ease-in-out;
    transition: .4s ease-in-out;
    background: white;
    border-radius: 3px;
}

.card .inside.picked, .card .inside.matched {
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
    -ms-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.card .inside.matched > .front > .highlight {
    -webkit-animation: 1s matchAnim ease-in-out;
    -moz-animation: 1s matchAnim ease-in-out;
    -ms-animation: 1s matchAnim ease-in-out;
    animation: 1s matchAnim ease-in-out;
    -webkit-animation-delay: .4s;
    -moz-animation-delay: .4s;
    -ms-animation-delay: .4s;
    animation-delay: .4s;
    height: 100%;
    width: 100%;
}

.card .front,
.card .back {
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card .front img, .card .back img {
    max-width: 100%;
    display: block;
    margin: 0 auto;
    max-height: 100%;
}

.card .front {
    -webkit-transform: rotateY(-180deg);
    -moz-transform: rotateY(-180deg);
    transform: rotateY(-180deg);
}

.card > .front {
    z-index: 1;
}

.card > .back {
    z-index: 2;
}

.card .inside.picked > .front,
.card .inside.matched > .front {
    -ms-backface-visibility: visible;
    z-index: 2;
}

.card .inside.picked > .back,
.card .inside.matched > .back {
    -ms-backface-visibility: visible;
    z-index: 1;
}
