:root {
	--screen-width: 960px;
	--screen-height: 540px;
	--true-canvas-width: 896px;
	--true-canvas-height: 512px;
	--gradient-speed: 50s;
}

html {
	background: #020102;
	background-repeat: no-repeat;
	min-height: 100vh;
	opacity: 1;
	cursor: none;
	height: 100vh;
}

html.bg-1 {
	background: linear-gradient(-45deg, #1c102c, #2b0e2b, #0d3641, #003334);
	background-size: 400% 400%;
	animation:
		gradientBG 30s ease-in-out infinite,
		filterFadeIn 0.3s ease-in-out forwards;
}
html.bg-2 {
	background: linear-gradient(-45deg, #1c102c, #2b0e2b, #0d3641, #003334);
	background-size: 200% 200%;
	animation: gradientBG 20s ease-in-out infinite;
}
html.bg-3 {
	background: linear-gradient(-45deg, #1c102c, #2b0e2b, #0d3641, #003334);
	background-size: 300% 300%;
	animation: gradientBG 18s ease-in-out infinite;
}
html.bg-4 {
	background: linear-gradient(-45deg, #1c102c, #2b0e2b, #0d3641, #003334);
	background-size: 400% 400%;
	animation: gradientBG 30s ease-in-out infinite;
}
html.bg-5 {
	background: linear-gradient(-45deg, #1c102c, #2b0e2b, #0d3641, #003334);
	background-size: 130% 130%;
	animation: gradientBG 30s ease-in-out infinite;
}
html.bg-6 {
	background: linear-gradient(-45deg, #3a1743, #331026, #173c46, #033c2f);
	background-size: 130% 130%;
	animation: gradientBG 30s ease-in-out infinite;
}
html.bg-7 {
	background: linear-gradient(-45deg, #3a1743, #331026, #173c46, #033c2f);
	background-size: 200% 200%;
	animation: gradientBG 30s ease-in-out infinite;
}
html.bg-8 {
	background: linear-gradient(-45deg, #3a1743, #331026, #173c46, #033c2f);
	background-size: 300% 300%;
	animation: gradientBG 30s ease-in-out infinite;
}
html.bg-9 {
	background: linear-gradient(-45deg, #3a1743, #331026, #173c46, #033c2f);
	background-size: 350% 350%;
	animation: gradientBG 25s ease-in-out infinite;
}
html.bg-10 {
	background: linear-gradient(-45deg, #3a1743, #331026, #173c46, #033c2f);
	background-size: 400% 400%;
	animation: gradientBG 20s ease-in-out infinite;
}

/* Make the background red for Level 100+ */
html.bg-11 {
	background: linear-gradient(-45deg, #aa0000, #5e0a0a, #2b1003, #431905);
	background-size: 200% 200%;
	animation: gradientBG 20s ease-in-out infinite;
}


@keyframes gradientBG {
	0% {
		background-position: 50% 30%;
	}
	50% {
		background-position: 100% 80%;
	}
	100% {
		background-position: 50% 30%;
	}
}

@keyframes gradient {
	0% {
		background-position: 50% 50%;
	}
	50% {
		background-position: 50% 60%;
	}
	75% {
		background-position: 50% 50%;
	}
	100% {
		background-position: 50% 50%;
	}
}

@keyframes filterFadeIn {
	from {
		filter: opacity(90%);
	}
	to {
		filter: opacity(100%);
	}
}


@font-face {
	font-family: "Silkscreen";
	src: url("./fonts/Silkscreen-Regular.ttf") format("truetype");
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: "Silkscreen";
	src: url("./fonts/Silkscreen-Bold.ttf") format("truetype");
	font-weight: bold;
	font-style: normal;
}

body {
	font-family: "Silkscreen" !important;
	margin: 0;
	padding: 0;
}

canvas {
	outline: 0px solid #333;
	z-index: 0;
	position: absolute;
	top: calc(50vh - var(--true-canvas-height) / 2);
	left: calc(50% - var(--true-canvas-width) / 2);
	filter: blur(0);
}

canvas#prerender-sprites-canvas {
	position: absolute;
	visibility: hidden;
	top: 0;
	left: 0;
}

button.copy-to-clipboard {
	position: absolute;
	background-color: #27a8f4;
	outline: 0px;
	border: 0px solid red;
	color: #111;
	top: 64px;
	padding: 0.5rem;
}

.instructions {
	background-color: #111;
	color: #A4A4A4;
	z-index: 1;
	position: absolute;
	top: calc(50vh + var(--screen-height) / 2);
	left: calc(50% - var(--screen-width) / 2 - 1px);
	width: 960px;
	text-align: center;
	padding: 0.5rem 0;
}
.instructions code {
	color: #EEE;
	background-color: #222;
	padding: 0.25rem;
}

#game-title-container {
	position: absolute;
	left: 0;
	width: 100%;
	text-align: center;
	animation: titleMove 2s cubic-bezier(0.66, 0, 0.34, 1) forwards;
	animation-delay: 0.86s;
	top: 50%;
	transform: translateY(-50%);
	opacity: 0;
	z-index: 99999;
}

#hud {
  opacity: 0;
  animation: hudFadeIn 0.5s ease forwards;
  animation-delay: 3s;
}

@keyframes hudFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes titleMove {
	0% {
		top: 50%;
		transform: translateY(-50%);
		opacity: 0;
	}
	17%, 55% {
		top: 50%;
		transform: translateY(-50%);
		opacity: 1;
	}
	100% {
		top: 0;
		transform: translateY(0);
		opacity: 1;
	}
}

/* Tutorial is the blurb of text that floats over your cursor to tell you how to play */
#tutorial {
	pointer-events: none;
	opacity: 0;
	transition: 0.05s;
	position: absolute;
	top: calc(50vh - var(--screen-height) / 2 - 20px);
	left: calc(50vw - var(--screen-width) / 2 + 30px);
	transform: translate(0, 0);
	z-index: 99999;
}

.text {
	color: #FFF;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}
.control {
	width: 40px;
}

#fps.text {
	position: absolute;
	bottom: 8px;
	right: 8px;
	z-index: 99999;
}

.control-panel {
	position: absolute;
	visibility: hidden;
}

.credits {
	position: absolute;
	top: calc(50vh + var(--screen-height) / 2 - 20px);
	width: 100%;
	text-align: center;
	opacity: 0;
	pointer-events: none;
}

.credits p {
	font-weight: 100;
	margin: 0.5rem 0;
	padding: 0;
	color: #444;
}

.credits a {
	color: #b36200;
	text-decoration: underline;
}

/* Game Over Text Display */
#game-over-text {
	position: absolute;
	visibility: hidden;
	top: calc(50vh - 2rem);
	left: calc(0%);
	width: 100%;
	text-align: center;
	font-weight: 900;
	pointer-events: none;
	z-index: 99999;
	background-color: #000;
	padding: 1rem 0 !important;
	box-shadow: 0 4px 4px 8px rgba(0, 0, 0, 0.2);
}
.game-over-text-title {
	font-size: 3rem;
	font-weight: 900
}
.game-over-text-subtitle {
	font-size: 1.5rem;
}
.keyboard-keys {
	color: #FFE100;
}
