*{
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	font-family: 'Spartan', sans-serif;
}

body{
	height: 100%;
	width: 100%;
	margin: auto;
	background: rgb(155, 155, 155);
	display: block;
}
h1{
	text-align: center;
	font-size: 50px;
	display: flex;
	justify-content: center;
}
.memory-game{
	width: 640px;
	height: 640px;
	margin: auto;
	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
	perspective: 1000px;
	float: left;
}

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

.card:active{
	transform: scale(.97);
	transition: transform .2s;
}

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

.front,
.back{
	width: 100%;
	height: 100%;
	border-radius: 5px;
	position: absolute;
	border: 2 solid pink;
	backface-visibility: hidden;
}

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


