:root {
	--sx-pixel-border-width: 2px;
  }

body {
    background-color: #000000; /* Fallback color */
    margin: 0;
    padding: 0;
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
    text-align: center;
    color: #FFFFFF;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-image: url('./menu_background.png'); /* Verify this path */
    background-size: cover; /* Ensure it covers the full area */
    background-position: center; /* Center the image */
    background-repeat: no-repeat; /* Prevent tiling */
    position: relative;
    z-index: 0; /* Ensure it’s the base layer */
}

#interactive {
	display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    background: transparent; /* Ensure no black background */
    z-index: 1; /* Above body but transparent */
	}

	#game-ui {
		position: absolute;
    	top: 0;
    	left: 0;
    	width: 100%;
    	height: 100%;
    	visibility: hidden;
    	background: transparent;
		}

		#high-score {
			display: inline-block;
			position: absolute;
			top: 15px;
			left: 50%;
			transform: translateX(-50%);
			color: white;
			text-align: center;
			user-select: none;
			-webkit-touch-callout: none;

			visibility: hidden;
			}

			#high-score .title {
				font-size: 12px;
			}

			#high-score .value {
				margin-top: 10px;
				font-size: 24px;
			}

		.marker {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 2px;
			background-color: white;
		}

		#fuel,
		#altitude {
			position: absolute;
			bottom: 120px;
			width: 25px;
			height: 150px;
			background-color: rgba(0, 0, 0, 0.5);
			user-select: none;
			-webkit-touch-callout: none;
			}

		#altitude {
			left: 900px;
			left: 902px;
			}

			#altitude .marker {
				transform: translateY(98px);
				transform: translateY(123px);
				transform: translateY(148px);
			}

		#fuel {
			right: 900px;
			right: 902px;
			}

			#fuel .low {
				position: absolute;
				bottom: 0;
				left: 0;
				width: 100%;
				height: 25%;
				background-color: red;
				opacity: 0.25;
			}

			.label {
				display: block;
				text-align: center;
				position: absolute;
				top: -12px;
				left: 50%;
				transform: translate(-50%, -50%);
				font-size: 10px;
			}

		#power {
			position: absolute;
			top: 40%;
			bottom: auto;
			left: 50%;
			width: 150px;
			height: 25px;
			transform: translate(-50%,-50%);
			background-color: rgba(0, 0, 0, 0.5);
			border: solid 1px gray;

			visibility: hidden;
			}

			#power .bar {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background-color: white;
			}

			#power .limit {
				position: absolute;
				top: 0;
				left: 80%;
				width: var(--sx-pixel-border-width);
				height: 100%;
				background-color: rgba(0, 0, 0, 0.25);
			}

		#btn-launch,
		#btn-raptors,
		#btn-shield {
			position: absolute;
			bottom: 15px;
			right: 900px;
			width: 60px;
			height: 60px;
			background-color: black;
			border-radius: 10px;
			cursor: pointer;
			user-select: none;
			-webkit-touch-callout: none;
			line-height: 60px;
			font-size: 24px;

			visibility: hidden;
			}

			#btn-shield {
				right: 80px;
				font-size: 8px;
				display: none;
			}

			#btn-launch img,
			#btn-raptors img,
			#btn-shield img {
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%,-50%);
				width: 30px;
				height: 30px;
			}

		#btn-menu,
		#btn-audio {
			position: absolute;
			top: 15px;
			left: 900px;
		}

		#btn-menu {
			left: auto;
			right: 900px;
			}

			.btn {
				width: 100px;
				font-size: 12px;
				line-height: 16px;
				color: white;
				text-align: center;
				text-transform: uppercase;
				user-select: none;
				-webkit-touch-callout: none;
				cursor: pointer;
				}

	.pixelborder {
		position: absolute;
		left: calc(var(--sx-pixel-border-width) * -1);
		top: 0;
		width: var(--sx-pixel-border-width);
		height: 100%;
		background-color: #222222;
		}
		.pixelborder.right {
			left: auto;
			right: calc(var(--sx-pixel-border-width) * -1);
		}
		.pixelborder.top {
			left: 0;
			top: calc(var(--sx-pixel-border-width) * -1);
			width: 100%;
			height: var(--sx-pixel-border-width);
		}
		.pixelborder.bottom {
			left: 0;
			top: auto;
			bottom: calc(var(--sx-pixel-border-width) * -1);
			width: 100%;
			height: var(--sx-pixel-border-width);
		}

	#controls-move {
		box-sizing: border-box;
		position: absolute;
		left: 900px;
		bottom: 15px;
		width: 120px;
		height: 60px;
		background-color: rgba(0, 0, 0, 0.25);
		border-radius: 8px;

		visibility: hidden;
		}
		.control-container {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			}

			#btn-move {
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%,-50%);
				width: 60px;
				height: 60px;
				background-color: black;
				border-radius: 10px;
				cursor: pointer;
				user-select: none;
				-webkit-touch-callout: none;
				line-height: 60px;
				font-size: 24px;
			}

				#btn-move img {
					position: absolute;
					top: 50%;
					left: 50%;
					transform: translate(-50%,-50%);
					width: 30px;
					height: 30px;
				}

	.overlay {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.6);
		visibility: hidden;
		}

		.overlay-inner {
			position: absolute;
			top: 30%;
			left: 50%;
			width: 80%;
			transform: translate(-50%, -50%);
		}

		#gameover-title {
			font-size: 24px;
			text-transform: uppercase;
		}

		#gameover-message {
			margin: 25px 0;
			line-height: 20px;
			font-size: 12px;
			text-transform: uppercase;
		}

		#gameover-play-again {
			display: inline-block;;
			font-size: 16px;
			line-height: 24px;
			padding: 10px;
			color: white;
			text-align: center;
			text-transform: uppercase;
			user-select: none;
			-webkit-touch-callout: none;
			cursor: pointer;
		}

	.section {
		display: none;
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-color: black;
		}
		.section-inner {
			position: absolute;
			top: 50%;
			left: 50%;
			width: 100%;
			max-width: 400px;
			transform: translate(-50%,-50%);
			}

	#preloader {
		display: block;
		}

		#preloader .section-inner {
			visibility: hidden;
			opacity: 0;
			}

			#preloader-status {
				display: block;
				position: relative;
				width: 80%;
				height: 5px;
				margin-left: 10%;
				background-color: #333333;
				}

			#preloader-bar {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background-color: white;
			}

			#preloader-text,
			#preloader-percent {
				display: block;
				font-size: 12px;
				line-height: 18px;
				text-align: center;
				margin: 10px 0;
				visibility: hidden;
				opacity: 0;
			}

	#rotate {
		display: none;
		background-color: black;
		font-size: 12px;
		text-align: center;
		}

		#rotate svg {
			fill: white;
			margin: 25px 0;
			width: 48px;
			height: 48px;
		}

		/* Portrait orientation */
		@media screen and (orientation: portrait) {

		}
		/* Landscape orientation */
		@media screen and (orientation: landscape) {
			body.isMobile #rotate {
				display: block;
				}
		}