html,
body {
	margin: 0;
	padding: 0;
	width: 100vw;
	height: 100vh;
	overflow: hidden;
	background: #000;
	/* Prevent rubber-band scroll on iOS */
	overscroll-behavior: none;
}

body {
	display: flex;
	justify-content: center;
	align-items: center;
}

/* Force-center the Phaser canvas in the safe area of the viewport.
   Without this, on Android landscape the software nav bar (right side)
   shifts "50%" off-center relative to the visible content area.
   env(safe-area-inset-*) compensates for nav bar / notch on any side. */
canvas {
	position: fixed !important;
	left: calc(50% + (env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) / 2) !important;
	top: calc(50% + (env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) / 2) !important;
	transform: translate(-50%, -50%) !important;
	margin: 0 !important;
}

canvas {
	display: block;
	image-rendering: auto;
	-webkit-font-smoothing: antialiased;
	/* Let Phaser Scale.FIT control canvas size — no CSS override */
	touch-action: none;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	-webkit-user-select: none;
}

/* Rotate overlay — shown on landscape mobile */
#rotate-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: #000010;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 24px;
	color: #00eeff;
	font-family: 'Orbitron', sans-serif;
	text-align: center;
	padding: 32px;
}

#rotate-overlay .icon {
	font-size: 64px;
	animation: spin-rock 1.4s ease-in-out infinite alternate;
}

#rotate-overlay p {
	font-size: 16px;
	letter-spacing: 0.08em;
	color: #aaddff;
	margin: 0;
}

@keyframes spin-rock {
	from { transform: rotate(-30deg); }
	to   { transform: rotate(30deg); }
}

/* Show rotate overlay when portrait on a touch device */
@media (orientation: portrait) and (max-width: 1024px) {
	#rotate-overlay { display: flex; }
}

a {
	color: rgb(0, 100, 200);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

a:visited {
	color: rgb(0, 80, 160);
}

label {
	display: block;
}

input,
button,
select,
textarea {
	font-family: inherit;
	font-size: inherit;
	-webkit-padding: 0.4em 0;
	padding: 0.4em;
	margin: 0 0 0.5em 0;
	box-sizing: border-box;
	border: 1px solid #ccc;
	border-radius: 2px;
}

input:disabled {
	color: #ccc;
}

button {
	color: #333;
	background-color: #f4f4f4;
	outline: none;
}

button:disabled {
	color: #999;
}

button:not(:disabled):active {
	background-color: #ddd;
}

button:focus {
	border-color: #666;
}