/* =======================
   General Styles
======================= */
body {
	margin: 0;
	padding: 0;
	height: 100vh;
	display: flex;
	flex-direction: column;
	background: #4b96cf;
	font-family: "Chalkduster", "Comic Sans MS", cursive;
	text-align: center;
}

/* =======================
   Dashboard
======================= */
.dashboard {
	background: #2f5d3a;
	border: 10px solid #8b5a2b;
	border-radius: 6px;
	box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
	color: #f5f5dc;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 20px;
	height: 15%;
}

.scoreboard {
	font-size: 1.6rem;
	font-weight: bold;
	text-align: center;
	flex-grow: 1;
}

.menu-btn {
	background: transparent;
	border: 2px solid #f5f5dc;
	border-radius: 5px;
	padding: 8px 18px;
	font-size: 1.3rem;
	color: #f5f5dc;
	cursor: pointer;
	transition: background 0.3s ease, transform 0.2s ease;
}

.menu-btn:hover {
	background: rgba(245, 245, 220, 0.2);
	transform: scale(1.05);
}

/* =======================
   Playbench
======================= */
.playbench {
	flex: 1;
	background: #4b96cf;
	/* box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.3); */
	position: relative;
}

/* =======================
   Menu Popup
======================= */
.menu-popup {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #2f5d3a;
	color: #f5f5dc;
	border: 4px solid #8b5a2b;
	border-radius: 12px;
	padding: 25px;
	display: none; /* hidden initially */
	flex-direction: column;
	align-items: center;
	gap: 15px;
	text-align: center;
	box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
	width: 280px;
	animation: fadeIn 0.3s ease;
	z-index: 10;
}

.menu-popup h2 {
	margin: 0 0 12px;
	font-size: 1.8rem;
	text-decoration: underline;
}

.menu-popup .stats {
	font-size: 1.2rem;
	margin-bottom: 10px;
	line-height: 1.6;
	padding: 10px;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	width: 100%;
}

.menu-popup button {
	background: transparent;
	border: 2px solid #f5f5dc;
	border-radius: 8px;
	padding: 10px 18px;
	font-size: 1.1rem;
	color: #f5f5dc;
	cursor: pointer;
	width: 100%;
	transition: background 0.3s ease, transform 0.2s ease;
}

.menu-popup button:hover {
	background: rgba(245, 245, 220, 0.2);
	transform: scale(1.05);
}

/* =======================
   Game Over Popup
   (same style as menu)
======================= */
.game-over-screen {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #2f5d3a;
	color: #f5f5dc;
	border: 4px solid #8b5a2b;
	border-radius: 12px;
	padding: 25px;
	display: none; /* hidden initially */
	flex-direction: column;
	align-items: center;
	gap: 15px;
	text-align: center;
	box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
	width: 280px;
	animation: fadeIn 0.3s ease;
	z-index: 20; /* above everything */
}

.game-over-screen h1 {
	margin: 0 0 12px;
	font-size: 1.8rem;
	text-decoration: underline;
}

.game-over-screen button {
	background: transparent;
	border: 2px solid #f5f5dc;
	border-radius: 8px;
	padding: 10px 18px;
	font-size: 1.1rem;
	color: #f5f5dc;
	cursor: pointer;
	width: 100%;
	transition: background 0.3s ease, transform 0.2s ease;
}

.game-over-screen button:hover {
	background: rgba(245, 245, 220, 0.2);
	transform: scale(1.05);
}

.menu-popup.active,
.game-over-screen.active {
	display: flex;
}

/* =======================
   Canvas
======================= */
canvas {
	display: block;
	margin: 0 auto;
	/* background: #111; */
	background-image: url("../assets/sprite/bg.jpg");
	border: 6px solid #0f0a1a;
	border-radius: 6px;
}

/* =======================
   Animations
======================= */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translate(-50%, -55%);
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}
