*,
*::before,
*::after {
	box-sizing: border-box;
}

@keyframes shake {
	0%,
	100% {
		transform: translatex(0);
	}
	20%,
	80% {
		transform: translatex(-8px);
	}
	40%,
	60% {
		transform: translatex(8px);
	}
}

@keyframes slide-off {
	0% {
		transform: translatey(0);
		opacity: 1;
	}
	100% {
		transform: translatey(120%);
		opacity: 0;
	}
}

@keyframes rush {
	0% {
		transform: perspective(800px) translateZ(0);
		opacity: 1;
	}
	75% {
		transform: perspective(800px) translateZ(650px);
		opacity: 0.9;
	}

	100% {
		transform: perspective(800px) translateZ(800px);
		opacity: 0;
	}
}

@keyframes fadein {
	0% {
		opacity: 0
	}
	100% {
		opacity: 1
	}
}

body {
	background-color: #011f3f;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}

body.is-transitioning {
	overflow: hidden;
}

.hidden {
	display: none !important;
}

.game-start {
	display: flex;
	flex-direction: column;
	width: 100%;
	align-items: center;
	gap: 24px;
}

h1 {
	margin: 0;
	margin-top: 4%;
	margin-bottom: 2%;
	font-family: "Pixelify Sans", monospace;
	color: #fef2bf;
	font-size: clamp(2rem, 10vh, 4.5rem);
	max-width: 85%;
}

#title-rounds {
	margin: 0;
	margin-bottom: 3%;
}

.rounds input[type="radio"] {
	display: none;
}

.round-presets {
	display: flex;
	justify-content: space-around;
	gap: 2%;
	flex-wrap: wrap;
}

.rounds {
	border: 5px solid #fff4bab8;
	border-radius: 15px;
	font-family: "Jersey 25", monospace;
	font-weight: 400;
	font-size: clamp(1rem, 5vh, 4rem);
	color: #fff9e0;
	padding: 3% 3%;
	margin-bottom: 3%;
	width: 60%;
	height: auto;
	box-shadow: 0px 0px 20px #fff9e0;
}

.rounds label {
	min-width: 1.5em;
	display: flex;
	gap: 10px;
	justify-content: center;
	align-items: center;
	line-height: 1;
	border: 3px solid #ffeb9bb6;
	border-radius: 10px;
	padding: 1.5%;
}

.rounds label:hover {
	border: 3px solid #ffeb9b;
}

.rounds label:active {
	transform: translatey(4px);
}

.rounds label:has(input:checked) {
	border: 3px solid #ffeb9b;
	box-shadow: 0px 0px 20px #ffeb9b;
}

#custom-rounds {
	vertical-align: middle;
	font: inherit;
	background: #ffe47700;
	border: 3px solid #cab560;
	border-radius: 6px;
	color-scheme: dark;
	color: #ffefad;
	padding: 0.2em 0.3em;
	font-size: 3rem;
}

.checked-box {
	border: 3px solid #ffeb9b !important;
	box-shadow: 0px 0px 20px #ffeb9b !important;
}

.play {
	background-color: #cab56000;
	font-family: "Pixelify Sans", monospace;
	font-size: clamp(2rem, 10vh, 3.5rem);
	border: 5px solid #ffeb9c;
	border-radius: 10px;
	color: rgb(255, 224, 121);
	padding: 0.3em 0.5em;
}

.play:hover {
	box-shadow: 0px 0px 20px #ffeb9c;
	color: rgb(255, 210, 61);
}

.play:active {
	transform: translatey(4px);
}

.is-shaking {
	animation: shake 0.4s ease;
}

.is-sliding {
	position: absolute;
	inset: 0;
	pointer-events: none;
	animation: slide-off 0.5s ease-in forwards;
}

.box {
	background: black;
	width: 25vmin;
	min-width: 35%;
	aspect-ratio: 1/1;
	margin: 3%;
	border-radius: 10%;
	border: 7px solid black;
}

.box:active {
	transform: translatey(8px);
}

.row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.red {
	background: red;
}

.yellow {
	background: yellow;
	margin-bottom: 50px;
}

.blue {
	background: blue;
	margin-bottom: 50px;
}

.green {
	background: green;
}

.rush-out {
	animation: rush 1s ease-in forwards;
}

.glow {
	box-shadow: 0px 0px 22px rgb(255, 239, 211);
}

.round-counter {
	position: absolute;
	top: 10px;
	right: 10px;
	border: 5px solid rgb(255, 249, 211);
	border-radius: 10px;
	padding: 5px 5px;
	margin: 10px 10px;
	font-size: clamp(1rem, 10vw, 1.5rem);
	font-family: "Jersey 25", monospace;
	color: rgb(255, 224, 121);
	width: clamp(150px, 10vw, 300px);
}

.round-counter h2 {
	margin: 2px;
	padding: 2px;
}

.fade-in {
	animation: fadein 2.5s ease-in forwards;
}