*,
*::before,
*::after {
	box-sizing: border-box;
}

:root {
	--space-color: #000;
	--rocket-color: #fff;
	--tank1-color: #fff;
	--tank2-color: #fff;
}

@font-face {
	font-family: Hyperspace;
	src: url("./font/Hyperspace.ttf");
}

html {
	font-size: clamp(0.4rem, 0.3793rem + 0.5517vw, 1rem);
}

body {
	margin: 0;
	overflow: hidden;
	/* background-color: rgb(52, 50, 50); */
	background-color: black;
	/* font-family: Arial, Helvetica, sans-serif; */
	font-family: Hyperspace, monospace, Courier, "Courier New";
}

#gameCanvas {
	/* border: 4px dashed purple; */
	background-color: var(--space-color);
}

.scoreArea {
	display: flex;
	justify-content: space-between;
	padding: 2rem;
	position: fixed;
	width: 100%;
	top: 0;
	left: 0;
	color: white;
	font-size: 3rem;
	font-weight: bold;
}

.p1stat {
	color: var(--tank1-color);
}

.p2stat {
	color: var(--tank2-color);
}

.scoreArea .lives {
	display: flex;
	justify-content: center;
}

.scoreArea .lives img {
	height: 2.5rem;
	margin-right: 0.25rem;
}

/* ============================= Text Overlay ================================ */

.textOverlay {
	display: flex;
	align-items: center;
	justify-content: center;
	/* gap: 1rem; */
	flex-direction: column;
	position: fixed;
	overflow: auto;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	color: white;
	background-color: rgba(0, 0, 0, 0.7);
}

.textOverlay .title {
	font-size: 2.75rem;
}

.textOverlay .subTitle {
	font-size: 1.75rem;
}

.textOverlay .instructions {
	margin-top: 0.2rem;
	text-align: center;
	font-size: 1rem;
}

footer {
	display: flex;
	width: 100%;
	justify-content: space-between;
	position: fixed;
	bottom: 0;
	padding: 1rem;
	color: white;
	font-size: 1.25rem;
}

/* ============================= Toast ================================ */
.toastBackdrop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: fixed;
	overflow: auto;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	color: white;
	background-color: rgba(0, 0, 0, 0.7);
}

.toast {
	color: white;
	text-align: center;
	font-size: 4rem;
}

.roundStat {
	display: flex;
	width: 100%;
	justify-content: space-around;
	color: white;
	text-align: center;
	font-size: 2rem;
	margin-top: 2rem;
}

.roundStat .name {
	font-weight: bold;
}

/* ============================= help ================================ */
.helpBackdrop {
	display: flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	overflow: auto;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	color: white;
	background-color: rgba(0, 0, 0, 1);
}

.help {
	margin: 1rem;
	max-width: 1000px;
	max-height: 100vh;
	color: white;
	font-size: 2rem;
}

/* ============================= Pause ================================ */
.pauseBackdrop {
	display: flex;
	/* align-items: center; */
	justify-content: center;
	position: fixed;
	overflow: auto;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	color: white;
}

.pauseMsg {
	position: absolute;
	top: 25%;
	font-size: 5rem;
	font-weight: bolder;
	text-align: center;
	animation-duration: 1s;
	animation-name: pulsePause;
	animation-iteration-count: infinite;
	animation-direction: alternate;
	transition-timing-function: ease-in-out;
}

@keyframes pulsePause {
	from {
		opacity: 0.3;
	}
	to {
		opacity: 1;
	}
}

/* ============================= Leaderboard ================================ */

.textOverlay .leaderboard {
	font-size: 1.25rem;
	margin-bottom: 0.5rem;
}

.textOverlay .leaderboard table {
	border-collapse: collapse;
}

.textOverlay .leaderboard table th,
.textOverlay .leaderboard table td {
	padding: 0.1rem 0.5rem;
	border: 1px solid;
	text-align: center;
}

/* ============================= Hall of Fame ================================ */

.textOverlay .hallOfFame {
	font-size: 1.25rem;
}

.textOverlay .hallOfFame table {
	border-collapse: collapse;
}

.textOverlay .hallOfFame table th,
.textOverlay .hallOfFame table td {
	padding: 0.2rem 0.5rem;
	border: 1px solid;
	text-align: center;
}

/* ============================= Replay ================================ */
#replayControl {
	display: grid;
	gap: 1rem;
	grid-template-columns: auto 1fr auto;
	position: fixed;
	left: 0;
	bottom: 4rem;
	width: 100%;
	padding: 1rem;
	font-size: 1.5rem;
	color: white;
}

#replayControl button {
	font-size: inherit;
}

#replayControl #replayRange {
	width: 100%;
}

/* ============================= Utility ================================ */

.d-none {
	display: none !important;
}

.opacity-0 {
	opacity: 0 !important;
}

/* @media (max-width: 768px) {
	html {
		font-size: 8px;
	}
} */
