/* Import Google font */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	text-decoration: none;
	font-family: 'Open Sans', sans-serif;
}

body {
	display: flex;
	align-items: center;
	text-align: center;
	justify-content: center;
	min-height: 100vh;
	background: #212837;
}

/* Styling of Author of the Website 😎 */
a {
	color: #c73664;
}

.title {
	font-size: 2rem;
	color: aquamarine;
}

.author {
	font-size: 1rem;
	font-weight: 400;
	text-align: center;
	transition: all 0.85s;
}

.wrapper {
	width: 210vmin;
	height: 100vmin;
	display: flex;
	overflow: hidden;
	flex-direction: column;
	justify-content: center;
	background: #293447;
	box-shadow: 0 20px 40px rgba(52, 87, 220, 0.2);
}

.game-details {
	color: #B8C6DC;
	font-weight: 500;
	font-size: 1.2rem;
	padding: 20px 27px;
	display: flex;
	justify-content: space-between;
}

/* Styling of game board */
.play-board {
	height: 100%;
	width: 100%;
	display: grid;
	background: #212837;
	grid-template: repeat(30, 1fr) / repeat(60, 1fr);
}

.play-board .headRight {
	background: url('./images/headRight.png');
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

.play-board .headLeft {
	background: url('./images/headLeft.png');
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

.play-board .headUp {
	background: url('./images/headUp.png');
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

.play-board .headDown {
	background: url('./images/headDown.png');
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

.play-board .tail {
	background: url('./images/tail.png');
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

/* Styling of controls */
.controls {
	display: none;
	justify-content: space-between;
}

.controls i {
	padding: 25px 0;
	text-align: center;
	font-size: 1.3rem;
	color: #B8C6DC;
	width: calc(100% / 4);
	cursor: pointer;
	border-right: 1px solid #171B26;
}

/* Styling of game over */
p {
	font-family: 'VT323';
	font-size: 8em;
	text-align: center;
	animation-name: example;
	animation-duration: 1s;
	animation-iteration-count: infinite;
}

@keyframes example {
	0% {
		color: lime;
		text-shadow: 0 0 20px green;
	}

	25% {
		color: green;
		text-shadow: 2px 2px 2px lime;
		transform: translate(-2px, 1px);
	}

	40% {
		color: lime;
		text-shadow: none;
		transform: translate(0, 0);
	}

	50% {
		color: green;
		text-shadow: 5px 5px 2px blue, -5px -5px 2px red;
		transform: translate(0px, 5px);
	}

	70% {
		color: lime;
		text-shadow: none;
		transform: translate(0, 0);
	}

	80% {
		color: lime;
		text-shadow: 0 0 20px green;
		transform: translate(-2px, 1px);
	}

	100% {
		color: lime;
		text-shadow: none;
	}
}

/* Adding responsiveness */
@media screen and (max-width: 800px) {
	.author {
		font-size: calc(5px + 0.7vw);
	}

	.title {
		font-size: calc(2rem - 1.2rem);
	}

	.wrapper {
		width: 90vmin;
		height: 215vmin;
	}

	img {
		width: 80%;
		height: 40%;
	}

	.game-details {
		font-size: 1rem;
		padding: 15px 27px;
	}

	.controls {
		display: flex;
	}

	.controls i {
		padding: 15px 0;
		font-size: 1rem;
	}
}