/* Page shell (formerly inline style="" attributes) */
html {
	width: 100%;
	height: 100%;
	background-color: black;
}
body {
	position: fixed;
	inset: 0;
	margin: 0;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	background-color: black;
}
#loading_screen {
	margin: 0px;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483646;
	background-color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	user-select: none;
	-webkit-user-select: none;
}
#loading_screen > div {
	text-align: center;
}
#game_frame {
	position: fixed;
	inset: 0;
	margin: 0;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	background-color: black;
}

/* Loading screen / boot UI */
#loading_screen {
	transition: opacity 180ms linear;
}
#loading_screen.is-ready {
	opacity: 0;
	pointer-events: none;
}
#boot_image {
	display: block;
	width: min(100vmin, 512px);
	height: min(100vmin, 512px);
	object-fit: contain;
	image-rendering: pixelated;
}
#boot_status {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: max(18px, 4vh);
	text-align: center;
	font: 14px/1.35 ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", monospace;
	color: #4a4a4a;
}
#mojang_stage {
	display: none;
	width: min(75vw, 640px);
	aspect-ratio: 4 / 1;
}
#mojang_stage .half {
	display: block;
	width: calc(50% + 1px);
	height: 100%;
	background-image: url("../img/mojang_stage.png");
	background-repeat: no-repeat;
	background-size: 100% 200%;
	image-rendering: pixelated;
}
#mojang_stage .left { background-position: center top; }
#mojang_stage .right {
	margin-left: -2px;
	background-position: center bottom;
}
#loading_screen.minecraft-stage { background: #ef323d !important; }
#loading_screen.minecraft-stage #boot_image,
#loading_screen.minecraft-stage #boot_status { display: none; }
#loading_screen.minecraft-stage #mojang_stage { display: flex; }
#rotate_device {
	display: none;
}
@media (orientation: portrait) and (pointer: coarse) {
	#rotate_device {
		position: fixed;
		z-index: 2147483647;
		inset: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 22px;
		padding: 32px;
		box-sizing: border-box;
		background: #111;
		color: #fff;
		text-align: center;
		font: 16px/1.45 ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", monospace;
	}
	#rotate_device .phone {
		width: 42px;
		height: 70px;
		border: 4px solid #fff;
		border-radius: 7px;
		box-sizing: border-box;
		transform: rotate(90deg);
	}
	#rotate_device strong {
		display: block;
		margin-bottom: 5px;
		font-size: 19px;
	}
}
@media (prefers-reduced-motion: reduce) {
	#loading_screen { transition: none; }
}
