@import url("https://fonts.googleapis.com/css?family=Orbitron:400,700|Roboto+Mono:400,700");

html,
body {
	margin: 0;
	overflow: hidden;
	height: 100%;
	width: 100%;
	position: relative;
	font-family: "Roboto Mono", monospace;
}

#container {
	width: 100%;
	height: 100%;
	background-color: #1a1a2e;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

#container #title {
	position: absolute;
	top: 5vh;
	width: 100%;
	text-align: center;
	font-size: 8vmin;
	color: #e94560;
	text-shadow: 0 0 5px #e94560, 0 0 10px #e94560, 0 0 15px #e94560;
	font-family: "Orbitron", sans-serif;
	z-index: 10;
	margin: 0;
	opacity: 0;
	transition: opacity 0.5s ease;
}

#container #game {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

#container #score {
	position: absolute;
	top: 20px;
	width: 100%;
	text-align: center;
	font-size: 10vh;
	transition: transform 0.5s ease, opacity 0.5s ease;
	color: #53d9e0;
	text-shadow: 0 0 5px #53d9e0, 0 0 10px #53d9e0;
	font-family: "Orbitron", sans-serif;
	transform: translatey(-200px) scale(1);
	opacity: 0;
}

/* New styles for the instructions box */
.instructions-box {
	position: absolute;
	top: 20px;
	left: 20px;
	background-color: rgba(26, 26, 46, 0.7);
	padding: 15px;
	border: 2px solid #53d9e0;
	color: #fff;
	text-shadow: 0 0 5px #53d9e0;
	font-family: "Roboto Mono", monospace;
	z-index: 10;
	max-width: 250px;
	font-size: 14px;
	transition: opacity 0.5s ease;
	pointer-events: none;
}

.instructions-box h2 {
	margin-top: 0;
	font-family: "Orbitron", sans-serif;
	color: #e94560;
	text-shadow: 0 0 5px #e94560;
}

/* New styles for the credit text */
.credit-box {
	position: absolute;
	top: 20px;
	right: 20px;
	color: #fff;
	text-shadow: 0 0 5px #53d9e0;
	font-family: "Roboto Mono", monospace;
	font-size: 14px;
	z-index: 10;
}

#container .game-over {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	background-color: rgba(26, 26, 46, 0.9);
	z-index: 5;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.5s ease;
}

#container .game-over * {
	opacity: 0;
	transform: translatey(-50px);
	transition: opacity 0.5s ease, transform 0.5s ease;
	color: #fff;
}

#container .game-over h2 {
	margin: 0;
	padding: 0;
	font-size: 40px;
	color: #e94560;
	text-shadow: 0 0 5px #e94560, 0 0 10px #e94560, 0 0 15px #e94560;
	font-family: "Orbitron", sans-serif;
}

#container .game-over #new-high-score {
	color: #53d9e0;
	font-family: "Orbitron", sans-serif;
	text-shadow: 0 0 5px #53d9e0, 0 0 10px #53d9e0;
}

#container .game-over button {
	margin-top: 20px;
	border: 3px solid #53d9e0;
	padding: 10px 20px;
	background-color: transparent;
	color: #53d9e0;
	text-shadow: 0 0 5px #53d9e0;
	font-size: 20px;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease, text-shadow 0.3s ease;
	font-family: "Roboto Mono", monospace;
}

#container .game-over button:hover {
	background-color: #53d9e0;
	color: #1a1a2e;
	text-shadow: none;
}

#container .game-ready {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-around;
	z-index: 5;
}

#container .game-ready #start-button {
	transition: opacity 0.5s ease, transform 0.5s ease;
	opacity: 0;
	transform: translatey(-50px);
	border: 3px solid #53d9e0;
	padding: 10px 20px;
	background-color: transparent;
	color: #53d9e0;
	text-shadow: 0 0 5px #53d9e0;
	font-size: 30px;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease, text-shadow 0.3s ease;
	font-family: "Orbitron", sans-serif;
}

#container .game-ready #start-button:hover {
	background-color: #53d9e0;
	color: #1a1a2e;
	text-shadow: none;
}

#container #instructions {
	position: absolute;
	width: 100%;
	top: 16vh;
	left: 0;
	text-align: center;
	transition: opacity 0.5s ease, transform 0.5s ease;
	opacity: 0;
	color: #fff;
}

#container #instructions.hidden {
	opacity: 0 !important;
}

#container .hidden {
	display: none;
}

#container.playing #title,
#container.resetting #title {
	opacity: 1;
}

#container.playing #score,
#container.resetting #score {
	transform: translatey(0px) scale(1);
	opacity: 1;
}

#container.ready .game-ready #start-button {
	opacity: 1;
	transform: translatey(0);
}

#container.ended #title {
	opacity: 1;
}

#container.ended .game-over {
	opacity: 1;
	pointer-events: auto;
}

#container.ended .game-over * {
	opacity: 1;
	transform: translatey(0);
}

#container.ended .game-over p {
	transition-delay: 0.3s;
}

#container.ended .game-over button {
	transition-delay: 0.6s;
}
