* {
    margin: 0;
    padding: 0;  
}

body {
	font-family: 'Open Sans', sans-serif;
	font-size: 18px;	
	background-size: cover;
	background: url("../img/fon.gif");
}

body:before {
	width: 100%;
	height: 100%;
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	z-index: -1;
	background-image: -moz-linear-gradient(top left, rgba(29, 38, 113, 0.60), rgba(195, 55, 100, 0.60));
	background-image: -ms-linear-gradient(top left, rgba(29, 38, 113, 0.60), rgba(195, 55, 100, 0.60));
	background-image: -webkit-linear-gradient(top left, rgba(29, 38, 113, 0.60), rgba(195, 55, 100, 0.60));
	background-image: -o-linear-gradient(top left, rgba(29, 38, 113, 0.60), rgba(195, 55, 100, 0.60));
	background-image: linear-gradient(to bottom right, rgba(29, 38, 113, 0.60), rgba(195, 55, 100, 0.60));
	background-size: auto;
}

.container {
	display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 80vw;
    height: 80vh;
    padding-right: 10%;
    padding-left: 10%;
    padding-top: 5%;
    padding-bottom: 2%;
}

.header {
	text-align: center;
}

h1, h3 {
	color: #fff;
	font-family: 'Monoton', cursive;
}

.game, .front_card, .back_card {
	display: inherit;	
	flex-flow: row wrap;
	justify-content: center;
	perspective: 1000px;
}

.card {
	position: relative;	
	width: 15vw;
    height: 25vh;
    margin: 0.3em;
	border: 3px solid #8f489b;
	border-radius: 5px;
	box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.30);
	cursor: pointer;
    perspective: 1000px;
	transition: 0.9s;
	transform-style: preserve-3d;	
}

.front_card, .back_card  {
	position: absolute;
	width: 100%; 
	height: 100%; 
	top: 0;
	left: 0;
	margin: 0;
	backface-visibility: hidden;	
	z-index: -1;	
}
   
.back_card:hover {
	box-shadow: 0 0 15px #b7afbd;
}

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

.back_card{
	transform: rotateY(0deg);
}

.img-front_card, .img-back_card  {
	width: 100%; 
	height: 100%; 
}
  
.hidden {
	visibility: hidden;
}
  
 .flipped {
	transform: rotateY(180deg);
}
