.m-wrap {
	position: relative;
	width:100%;
	height: 500px;
	min-height: 500px;
	padding-bottom: 20px;
	text-align:center;
}

.m-game {
	-webkit-transform-style: preserve-3d;
	transform-style: preserve-3d;
	-webkit-perspective: 500px;
	perspective: 500px;
	min-height: 100%;
	height: 100%;
	text-align:center;
}

@-webkit-keyframes matchAnim {
	0% {
	background: #bcffcc;
	}
	100% {
	background: white;
	}
}

@keyframes matchAnim {
	0% {
	background: #bcffcc;
	}
	100% {
	background: white;
	}
}
.card {
	float: left;
	width: 18%;
	height: 19%;
	padding: 5px;
	text-align: center;
	display: block;
	-webkit-perspective: 500px;
	perspective: 500px;
	position: relative;
	cursor: pointer;
	z-index: 50;
	-webkit-tap-highlight-color: transparent;
	text-align:center;
}
@media (max-width: 800px) {
	.card {
	width: 25%;
	height: 16.666%;
	}
}
.card .inside {
	width: 100%;
	height: 100%;
	display: block;
	-webkit-transform-style: preserve-3d;
	transform-style: preserve-3d;
	-webkit-transition: .4s ease-in-out;
	transition: .4s ease-in-out;
}
.card .inside.picked, .card .inside.matched {
	-webkit-transform: rotateY(180deg);
	transform: rotateY(180deg);
}
.card .inside.matched {
	-webkit-animation: 1s matchAnim ease-in-out;
	animation: 1s matchAnim ease-in-out;
	-webkit-animation-delay: .4s;
	animation-delay: .4s;
}
.card .front, .card .back {
	-webkit-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);
	transform: rotateY(-180deg);
}

.card .back {		
		transform: rotateY(360deg);
}

@media (max-width: 800px) {
	.card .front {
	padding: 5px;
	}
}
@media (max-width: 800px) {
	.card .back {
	padding: 10px;
	}
}

