* { margin: 0; padding: 0; box-sizing: border-box; }

body {
	background: #1a1a2e;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
	font-family: 'Courier New', monospace;
	overflow: hidden;
}

#gameContainer {
	position: relative;
	width: 1024px;
	height: 576px;
	border: 4px solid #333;
	box-shadow: 0 0 20px rgba(255, 100, 0, 0.3);
}

#gameCanvas {
	display: block;
	background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 70%, #90EE90 70%, #228B22 100%);
	image-rendering: pixelated;
}

#ui {
	position: absolute;
	top: 10px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: space-between;
	padding: 0 20px;
	font-size: 20px;
	color: white;
	text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
	pointer-events: none;
	z-index: 10;
}

#ui div {
	background: rgba(0, 0, 0, 0.5);
	padding: 5px 10px;
	border-radius: 4px;
}

#score { color: #FFD700; }
#water { color: #00BFFF; }
#wave { color: #FF6347; }

.overlay {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0, 0, 0, 0.85);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 100;
}

.overlay.hidden { display: none; }

#startScreen h1, #gameOverScreen h1, #winScreen h1 {
	font-size: 48px;
	color: #FF6347;
	text-shadow: 3px 3px 0 #8B0000, -2px -2px 0 #000;
	margin-bottom: 20px;
	letter-spacing: 3px;
}

.overlay p {
	color: white;
	font-size: 18px;
	margin: 10px 0;
	text-shadow: 1px 1px 0 #000;
}

button {
	margin-top: 20px;
	padding: 15px 30px;
	font-size: 24px;
	font-family: 'Courier New', monospace;
	background: #FF6347;
	color: white;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	text-shadow: 1px 1px 0 #000;
	box-shadow: 0 4px 0 #8B0000;
	transition: transform 0.1s;
}

button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 0 #8B0000;
}

button:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #8B0000;
}

#message {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 36px;
	color: white;
	text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
	pointer-events: none;
	z-index: 20;
	opacity: 0;
	transition: opacity 0.3s;
}

#message.show {
	opacity: 1;
}
