body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	max-height: 100vh;
	background-color: blanchedalmond;
	color: #000000;
	font-family: "Press Start 2P", cursive;
	margin: 0;
	padding: 10px;
	box-sizing: border-box;
	overflow: hidden;
}

.gameContainer {
	background-color: transparent;
	padding: 20px;
	border-radius: 10px;
	box-shadow: none;
	text-align: center;
	margin-bottom: 20px;
}

h1 {
	margin-top: 0;
	color: #000000;
}

#gameBoard {
	display: grid;
	grid-template-columns: repeat(20, 20px);
	grid-template-rows: repeat(20, 20px);
	width: 400px;
	height: 400px;
	border: 20px solid black;
	background-color: DarkRed;
	margin: 20px auto;
}

.snake {
	background-color: lightgreen;
	border: 1px solid black;
}

.food {
	background-color: white;
	border: 1px solid black;
	border-radius: 0;
}

#scoreBoard {
	font-size: 1.2em;
	margin-bottom: 15px;
	color: #000000;
}

#startButton {
	background-color: #ffffff;
	color: #000000;
	border: 3px solid black;
	padding: 10px 20px;
	font-size: 1em;
	border-radius: 5px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

#startButton:hover {
	background-color: #e0e0e0;
}

/* Mobile Controls */
#mobile-controls {
	display: none;
	flex-direction: column;
	align-items: center;
	margin-top: 20px;
	width: 100%;
	max-width: 300px;
}

.middle-controls {
	display: flex;
	justify-content: space-between;
	width: 100%;
	margin: 10px 0;
}

.control-button {
	background-color: #ffffff;
	color: #000000;
	border: 3px solid black;
	padding: 15px 25px;
	font-size: 1.2em;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.3s ease;
	flex: 1;
	margin: 0 5px;
	min-width: 80px;
}

.control-button:hover {
	background-color: #e0e0e0;
}

#up-button,
#down-button {
	width: calc(100% - 10px); /* Adjust for margin */
	margin: 5px;
}

/* Media Queries for Responsiveness */
@media (max-width: 600px) {
	body {
		padding: 5px;
		justify-content: flex-start;
		min-height: 100vh;
	}

	#gameBoard {
		width: 280px; /* Smaller board for mobile */
		height: 280px;
		grid-template-columns: repeat(20, 14px);
		grid-template-rows: repeat(20, 14px);
		margin: 10px auto;
	}

	.gameContainer {
		width: calc(100vw - 20px);
		max-width: 320px;
		padding: 10px;
		margin-bottom: 10px;
	}

	h1 {
		font-size: 1.3em;
		margin-bottom: 10px;
	}

	#scoreBoard {
		font-size: 0.9em;
		margin-bottom: 10px;
	}

	#startButton {
		padding: 8px 12px;
		font-size: 0.8em;
	}

	#mobile-controls {
		display: flex;
		max-width: 280px;
		margin-top: 10px;
	}

	.control-button {
		padding: 12px 15px;
		font-size: 0.9em;
		min-width: unset;
		margin: 0 3px;
	}

	.middle-controls {
		margin: 5px 0;
	}

	#up-button,
	#down-button {
		width: calc(100% - 10px);
		margin: 3px 5px;
	}
}
