@font-face {
	font-family: "eerie";
	src: url("assets/fonts/eerie.ttf") format("truetype");
}

@font-face {
	font-family: "ladies";
	src: url("assets/fonts/ladies.ttf") format("truetype");
}

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

body {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #0f2027;
	/* fallback for old browsers */
	background: -webkit-linear-gradient(to right, #2c5364, #203a43, #0f2027);
	background: linear-gradient(to right, #2c5364, #203a43, #0f2027);
	height: 100vh;
}

.container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: aliceblue;
	height: 100vh;
}

.container #categoryChoose {
	font-size: 1.5rem;
}

.category {
	display: flex;
	margin-top: 20px;
}

.card-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.card-btn .image-container {
	margin-bottom: 40px;
}

.card-btn button {
	padding: 10px 20px;
	background-color: #112131;
	color: #fff;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}

.card-btn button:hover {
	background-color: #152d47;
}

.image-container:hover {
	animation: shake 1s ease;
	opacity: 0.5;
	box-shadow: none;
	transition: 1s ease-in-out;
}

.image-container:not(:hover) {
	transition: 1s ease-in-out;
}

.image-container {
	width: 70%;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 10px 10px 20px 10px rgba(0, 0, 0, 0.8);
}

.categoryImg {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

.gameInfo {
	margin: 10px auto 20px auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.gameTitle:hover {
	color: #152d47;
}

.backBtn {
	cursor: pointer;
}

.backBtn:hover {
	color: #152d47;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(4, auto);
	grid-gap: 10px;
}

.memory-card {
	height: 144px;
	width: 96px;
	position: relative;
	transform-style: preserve-3d;
	perspective: 1000px;
	transition: transform 0.75s ease-in-out;
}

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

.memory-card:active {
	scale: 0.95;
}

.memory-card .front-face,
.memory-card .back-face {
	position: absolute;
	width: 100%;
	height: 100%;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	overflow: hidden;
	border-radius: 10px;
	box-shadow: #0f2027 2px 5px 3px;
}

.memory-card .front-face {
	transform: rotateY(0deg);
}

.memory-card .back-face {
	transform: rotateY(180deg);
}

.memory-card .front-face img,
.memory-card .back-face img {
	width: 100%;
}

.restartBtn {
	display: none;
	margin-bottom: 20px;
	background-color: #112131;
	color: #fff;
	border: none;
	border-radius: 5px;
	padding: 10px 10px;
	cursor: pointer;
}

.restartBtn:hover {
	background-color: #152d47;
}

@keyframes shake {
	0% {
		transform: translate(-3px, -3px);
	}
	10% {
		transform: translate(3px, -3px);
	}
	20% {
		transform: translate(-3px, -3px);
	}
	30% {
		transform: translate(3px, 3px);
	}
	40% {
		transform: translate(-3px, -3px);
	}
	50% {
		transform: translate(3px, 3px);
	}
	60% {
		transform: translate(-3px, -3px);
	}
	70% {
		transform: translate(3px, 3px);
	}
	80% {
		transform: translate(-3px, -3px);
	}
	90% {
		transform: translate(3px, 3px);
	}
	100% {
		transform: translate(0, 0);
	}
}

@media (max-width: 700px) {
	.categoryBtn {
		font-size: 0.8rem;
	}
    .memory-card {
        max-height: 22.5vw;
        max-width: 15vw;
    }
	.gameInfo {
        width: 95%;
    }
	.gameTitle {
		font-size: 1.5rem;
	}
}

@media (max-width: 500px) {
	.gameTitle {
		font-size: 1.2rem;
	}
}
