* {
	margin:0; padding:0; border:none;
}
body {
	background-image: url('../images/memory/background.jpg');
	min-height: 100vh!important;
	position: relative;
	background-repeat: no-repeat;

}

body {

}


.gamecontainer {
	display: flex;
	justify-content: center;
	align-items: center;
margin:0px auto;
	flex-direction: column;
}

/*
* Styles for the deck of cards
*/


.deck {
	width: 100%;
	/*padding: 1rem;*/
	display: flex;
	flex-wrap: wrap;
	/*justify-content: space-around;*/
	/*margin: 0 0 3em;*/
	margin:0 auto;
}

.deck .card {
	height: 120px;
	width: 120px;
	/* background: #141214; */
	font-size: 0;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	/* box-shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.5); */
	background-image: url('../images/memory/backcover.png');
	background-size: cover;
	animation-duration: .75s;
}

.deck .card.open {
	transform: rotateY(0);
	background:#4ea830;
	cursor: default;
	animation-name: flipInY;
	-webkit-backface-visibility: visible !important;
	backface-visibility: visible !important;
	animation-duration: .75s;
}

.deck .card.show {
	font-size: 33px;
}

.deck .card.match {
	cursor: default;
	background: #E5F720;
	font-size: 33px;
	animation-name: rubberBand;
	-webkit-backface-visibility: visible !important;
	backface-visibility: visible !important;
	animation-duration: .75s;
}

.deck .card.unmatched {
	animation-name: pulse;
	-webkit-backface-visibility: visible !important;
	backface-visibility: visible !important;
	animation-duration: .75s;
	background: #e2043b;
}

.game-charakter {
	position: absolute;
	right: 30px;
	bottom: 0;
}

@media (max-width:1600px) {
	.game-charakter {
		display: none;
	}
}

.deck .card.disabled {
	pointer-events: none;
	opacity: 0.9;
}


/*
* Styles for the Score Panel
*/


.score-panel {
	position: relative;
	color: #fff;
	height:60px;
	max-width:720px;
}
.score-panel img {max-height: 40px;margin-left: 10px;margin-bottom:5px}
.score-panel .moves-wrap {
	background-color:#4ea830;
	width:105px;
	font-size: 24px;
	text-align:center;
	position:absolute; right:10px; top:50%; transform:translateY(-50%);
	display:flex; flex-direction:column; justify-content:center;
	height:40px;
}

.timer {display: inline;}


.score-panel .timer-wrap {
	background-color:#4ea830;
	font-size: 24px;
	width:105px;
	text-align:center;
	position:absolute; left:5px; top:50%; transform:translateY(-50%);
	display:flex; flex-direction:column; justify-content:center;
	height:40px;
}

.score-panel .restart {
	float: right;
	cursor: pointer;
}

.fa-star {
	color: #FFD700;
}



/*
* Styles for congratulations modal
*/


.overlay {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.7);
	transition: opacity 500ms;
	visibility: hidden;
	opacity: 0;
}

.overlay:target {
	visibility: visible;
	opacity: 1;
}

.popup {
	margin: 70px auto;
	padding: 20px;
	background: #ffffff;
	border-radius: 5px;
	width: 85%;
	position: relative;
	transition: all 5s ease-in-out;
}

.popup h2 {
	margin-top: 0;
	color: #333;
}

.popup .close {
	position: absolute;
	top: 20px;
	right: 30px;
	transition: all 200ms;
	font-size: 30px;
	font-weight: bold;
	text-decoration: none;
	color: #333;
}

.popup .close:hover {
	color: #E5F720;
}

.popup .content-1,
.content-2 {
	max-height: 30%;
	overflow: auto;
	text-align: center;
}

.show {
	visibility: visible !important;
	opacity: 100 !important;
}

#play-again {
	background-color: #141214;
	padding: 0.7rem 1rem;
	font-size: 1.1rem;
	display: block;
	margin: 0 auto;
	width: 50%;
	font-family: 'Gloria Hallelujah', cursive;
	color: #ffffff;
	border-radius: 5px;
}


/* Wohnzimmer */

body .card.open[type='diamond'],
body .card.match[type='diamond'] {
	background-image: url('../images/memory/card1.png');
	background-size: cover;
}

body .card.open[type='bomb'],
body .card.match[type='bomb'] {
	background-image: url('../images/memory/card2.png');
	background-size: cover;
}

body .card.open[type='plane'],
body .card.match[type='plane'] {
	background-image: url('../images/memory/card3.png');
	background-size: cover;
}

body .card.open[type='anchor'],
body .card.match[type='anchor'] {
	background-image: url('../images/memory/card4.png');
	background-size: cover;
}

body .card.open[type='leaf'],
body .card.match[type='leaf'] {
	background-image: url('../images/memory/card5.png');
	background-size: cover;
}

body .card.open[type='bicycle'],
body .card.match[type='bicycle'] {
	background-image: url('../images/memory/card6.png');
	background-size: cover;
}

body .card.open[type='cube'],
body .card.match[type='cube'] {
	background-image: url('../images/memory/card7.png');
	background-size: cover;
}

body .card.open[type='bolt'],
body .card.match[type='bolt'] {
	background-image: url('../images/memory/card8.png');
	background-size: cover;
}

body .card.open[type='cat'],
body .card.match[type='cat'] {
	background-image: url('../images/memory/card9.png');
	background-size: cover;
}
body .card.open[type='fox'],
body .card.match[type='fox'] {
	background-image: url('../images/memory/card10.png');
	background-size: cover;
}
body .card.open[type='dog'],
body .card.match[type='dog'] {
	background-image: url('../images/memory/card11.png');
	background-size: cover;
}
body .card.open[type='mouse'],
body .card.match[type='mouse'] {
	background-image: url('../images/memory/card12.png');
	background-size: cover;
}
body .card.open[type='fish'],
body .card.match[type='fish'] {
	background-image: url('../images/memory/card13.png');
	background-size: cover;
}
body .card.open[type='bird'],
body .card.match[type='bird'] {
	background-image: url('../images/memory/card14.png');
	background-size: cover;
}
body .card.open[type='horse'],
body .card.match[type='horse'] {
	background-image: url('../images/memory/card15.png');
	background-size: cover;
}


/* animations */
@keyframes flipInY {
	from {
		transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
		animation-timing-function: ease-in;
		opacity: 0;
	}

	40% {
		transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
		animation-timing-function: ease-in;
	}

	60% {
		transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
		opacity: 1;
	}

	80% {
		transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
	}

	to {
		transform: perspective(400px);
	}
}

@keyframes rubberBand {
	from {
		transform: scale3d(1, 1, 1);
	}

	30% {
		transform: scale3d(1.25, 0.75, 1);
	}

	40% {
		transform: scale3d(0.75, 1.25, 1);
	}

	50% {
		transform: scale3d(1.15, 0.85, 1);
	}

	65% {
		transform: scale3d(.95, 1.05, 1);
	}

	75% {
		transform: scale3d(1.05, .95, 1);
	}

	to {
		transform: scale3d(1, 1, 1);
	}
}

@keyframes pulse {
	from {
		transform: scale3d(1, 1, 1);
	}

	50% {
		transform: scale3d(1.2, 1.2, 1.2);
	}

	to {
		transform: scale3d(1, 1, 1);
	}
}


/****** Media queries
***************************/


@media (max-width: 320px) {
	.deck {
		width: 100%;
	}

}


/* For Tablets and larger screens
****************/

@media (min-width: 768px) {
	.gamecontainer {
		font-size: 22px;
	}

	.deck {
		max-width: 720px;
		/*max-height: 680px;*/
	}


}


@media (max-width:1200px) {

	.score-panel {
		position: relative;
		text-align: left;
		margin-bottom: 10px;
		color: #fff;
		margin-top: 30px;;
		height: 100px;
		width: 620px;
	}

	.score-panel .moves-wrap {
		background-color:#4ea830;
		position: absolute;
		bottom:0;
		width:100px;
		font-size:34px;
		right: 0;
	}

	.timer {display: inline;}


	.score-panel .timer-wrap {
		background-color:#4ea830;
		position: absolute;
		bottom:0;
		font-size:34px;
		width:100px;
		left: 0;
	}
}

@media (max-width:768px) {

	.score-panel .moves-wrap {
		position: absolute;
		bottom: 0;
		width:200px;
		font-size: 34px;
		right:5px;
	}

	.score-panel .timer-wrap {
		position: absolute;
		bottom:0;
		font-size: 34px;
		width:200px;
		left:5px;
	}

	.deck .card {
		height: 130px;
		width: 130px;
		margin: 0.2rem 0.2rem;
		/* background: #141214; */
		font-size: 0;
		color: #ffffff;
		border-radius: 5px;
		cursor: pointer;
		display: flex;
		justify-content: center;
		align-items: center;
		/* box-shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.5); */
		background-image: url('../images/memory/backcover.png');

		background-size: cover;
		animation-duration: .75s;
	}

	.score-panel {
		position: relative;
		text-align: left;
		margin-bottom: 10px;
		color: #fff;
		margin-top: 10px;;
		height: 80px;
		width: 100%;
	}
}

@media (max-width:645px) {



	.deck .card {
		height: 125px;
		width: 125px;
		margin: 0.2rem 0.2rem;
		/* background: #141214; */
		font-size: 0;
		color: #ffffff;
		border-radius: 5px;
		cursor: pointer;
		display: flex;
		justify-content: center;
		align-items: center;
		/* box-shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.5); */
		background-image: url('../images/memory/backcover.png');
		background-size: cover;
		animation-duration: .75s;
	}

}

@media (max-width:568px) {


	.deck .card {
		height: 110px;
		width: 110px;
	}

}

@media (max-width:545px) {

	.deck .card {
		height: 110px;
		width: 110px;
		margin: 0.2rem 0.2rem;
		/* background: #141214; */
		font-size: 0;
		color: #ffffff;
		border-radius: 5px;
		cursor: pointer;
		display: flex;
		justify-content: center;
		align-items: center;
		/* box-shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.5); */
		background-image: url('../images/memory/backcover.png');
		background-size: cover;
		animation-duration: .75s;
	}

}


@media (max-width:505px) {

	.deck .card {
		height: 100px;
		width: 100px;
	}

}


@media (max-width:490px) {

	.deck .card {
		height:90px;
		width: 90px;
	}
	.score-panel .moves-wrap {
		position: absolute;
		bottom: 0;
		width:180px;
		font-size: 34px;
		right:5px;
	}

	.score-panel .timer-wrap {
		position: absolute;
		bottom:0;
		font-size: 34px;
		width:180px;
		left:5px;
	}
	.score-panel img {max-height:45px}


	@media (max-width:450px) {

		.score-panel {height: 75px;}
		.score-panel .timer-wrap {
			position: absolute;
			bottom:0;
			font-size: 40px;
			width:160px;
			left: 15px;
		}
		.score-panel .moves-wrap {
			position: absolute;
			bottom: 0;
			width:160px;
			font-size: 40px;
			right: 15px;
		}
		.score-panel img {max-height:30px}
	}

	@media (max-width:410px) {
		.score-panel {height: 55px;}
		.score-panel .timer-wrap {
			position: absolute;
			bottom:0;
			font-size: 28px;
			width:130px;
			left:5px;
		}
		.score-panel .moves-wrap {
			position: absolute;
			bottom: 0;
			width:130px;
			font-size: 28px;
			right:5px;
		}
		.score-panel img {max-height:25px}
	}


	@media (max-width:428px) {

		.deck .card {
			height:85px;
			width: 85px;
		} }


		@media (max-width:405px) {

			.deck .card {
				height: 60px;
				width: 60px;
			}

		}

		.timer {display: inline;}



		@media (max-width:385px) {

			.deck .card {
				height:60px;
				width:60px;
			}
			.score-panel img {max-height:25px}
			´

			@media (max-width:368px) {

				.deck .card {
					height: 60px;
					width: 60px;
				}

			}

			@media (max-width:349px) {

				.deck .card {
					height: 60px;
					width: 60px;
				}

			}


			@media (max-width:335px) {

				.deck .card {
					height: 60px;
					width: 60px;
				}

				@media (max-width:330px) {
					.score-panel {height: 40px;}
					.score-panel .timer-wrap {
						position: absolute;
						bottom:0;
						font-size: 20px;
						width:110px;
						left:5px;
					}
					.score-panel .moves-wrap {
						position: absolute;
						bottom: 0;
						width:110px;
						font-size: 20px;
						right:5px;
					}
					.score-panel img {max-height:20px}
				}

				@media (max-width:310px) {

					.deck .card {
						height: 55px;
						width: 55px;
					}
				}

				@media (max-width:290px) {
					.score-panel {height: 48px;}
					.score-panel .timer-wrap {
						position: absolute;
						bottom:0;
						font-size: 16px;
						width:90px;
						left:5px;
					}
					.score-panel .moves-wrap {
						position: absolute;
						bottom: 0;
						width:90px;
						font-size: 16px;
						right:5px;
					}
					.score-panel img {max-height:15px}
				}


				@media (max-width:287px) {

					.deck .card {
						height: 50px;
						width: 50px;
					}
				}

				@media (max-width:269px) {
					.score-panel {height: 40px;}
					.deck .card {
						height: 43px;
						width: 43px;
					}
				}