@font-face {
	font-family: SegoeUI;
	src:
		local("Segoe UI"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.woff2) format("woff2"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.woff) format("woff"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.ttf) format("truetype");
	font-weight: 400;
}

@font-face {
	font-family: SegoeUI;
	src:
		local("Segoe UI Semilight"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.woff2) format("woff2"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.woff) format("woff"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.ttf) format("truetype");
	font-weight: 200;
}

@font-face {
	font-family: SegoeUI;
	src:
		local("Segoe UI Light"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff2) format("woff2"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff) format("woff"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.ttf) format("truetype");
	font-weight: 100;
}

@font-face {
	font-family: SegoeUI;
	src:
		local("Segoe UI Semibold"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.woff2) format("woff2"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.woff) format("woff"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.ttf) format("truetype");
	font-weight: 600;
}

@font-face {
	font-family: SegoeUI;
	src:
		local("Segoe UI Bold"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.woff2) format("woff2"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.woff) format("woff"),
		url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.ttf) format("truetype");
	font-weight: 700;
}

:root {
	--bg-color: #19054d;
	--tile-bg: rgba(255, 255, 255, 0.05);
	--tile-hover-bg: rgba(255, 255, 255, 0.12);
	--tile-active-bg: rgba(255, 255, 255, 0.2);
	--tile-border: rgba(255, 255, 255, 0.25);
	--tile-hover-border: #ffffff;
	--accent-blue: #0072c6;
	--accent-cyan: #00bcf2;
	--accent-teal: #007a99;
	--text-white: #ffffff;
	--text-dim: #c5b8e6;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	user-select: none;
	-webkit-user-select: none;
}

body {
	margin: 0;
	padding: 0;
	background: #111;
	color: #ffffff;
	font-family: SegoeUI, "Segoe UI Light", "Segoe UI", Tahoma, sans-serif;
	overflow: hidden;
	height: 100vh;
	width: 100vw;
}

#vm-window {
	display: flex;
	flex-direction: column;
	width: 100vw;
	height: 100vh;
	background: #222;
}

#vm-toolbar {
	background: #333;
	display: flex;
	align-items: center;
	padding: 6px 12px;
	gap: 8px;
	height: 44px;
	border-bottom: 1px solid #111;
	flex-wrap: nowrap;
	overflow-x: auto;
}

#vm-toolbar::-webkit-scrollbar {
	display: none;
}

.toolbar-separator {
	width: 1px;
	height: 24px;
	background: #555;
	margin: 0 4px;
}

.toolbar-btn {
	background: transparent;
	color: #ddd;
	border: 1px solid transparent;
	border-radius: 4px;
	padding: 6px 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: inherit;
	font-size: 13px;
	white-space: nowrap;
	transition: all 0.15s ease;
}

.toolbar-btn:hover {
	background: #444;
	border-color: #555;
	color: #fff;
}

.toolbar-btn:active {
	background: #555;
}

#vm-screen-wrapper {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #000;
	position: relative;
}

#screen_container {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

#screen_container canvas {
	height: 100% !important;
	width: auto !important;
	max-width: 100%;
	max-height: 100%;
	margin: 0 auto;
	object-fit: contain;
}

#vm-statusbar {
	background: #e0e0e0;
	color: #333;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 0 16px;
	font-size: 12px;
	border-top: 1px solid #ccc;
	gap: 20px;
}

.status-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

#mips-counter {
	font-family: monospace;
}

.led {
	width: 14px;
	height: 8px;
	border-radius: 2px;
	background: #999;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
	transition: background 0.05s ease;
}

.led.green {
	background: #4CAF50;
	box-shadow: 0 0 4px #4CAF50, inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.led.red {
	background: #F44336;
	box-shadow: 0 0 4px #F44336, inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

#watermark {
	color: white;
	font-family: SegoeUI, sans-serif;
	font-size: 22px;
	font-weight: 200;
	z-index: 9999;
	position: fixed;
	top: 54px;
	left: 0;
	right: 0;
	text-align: center;
	opacity: 0.4;
	pointer-events: none;
	user-select: none;
	text-shadow: 1px 1px 2px black;
}

/* Loading Overlay */
#loading_overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #000000;
	z-index: 100;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	color: white;
}

#boot_anim {
	margin-bottom: 20px;
}

#loading_status {
	margin-bottom: 12px;
	font-size: 15px;
	font-weight: 200;
}

#loading_progress {
	width: 50%;
	max-width: 380px;
	height: 6px;
	accent-color: #007a99;
}

/* Metro "License terms" & "Mode" Screen Overlays */
#license_screen,
#mode_screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: #19054d;
	z-index: 200;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 48px 80px 40px 80px;
	box-sizing: border-box;
	overflow-y: auto;
}

#license_screen {
	justify-content: space-between;
}

.license-content {
	width: 100%;
	max-width: 900px;
	display: flex;
	flex-direction: column;
}

.license-title {
	font-size: 3.2rem;
	font-weight: 100;
	letter-spacing: -0.5px;
	margin-bottom: 20px;
	color: #ffffff;
}

.license-subtitle {
	font-size: 0.95rem;
	font-weight: 400;
	margin-bottom: 16px;
	color: #ffffff;
}

.license-body {
	height: 38vh;
	min-height: 160px;
	overflow-y: auto;
	padding-right: 18px;
	font-size: 0.82rem;
	line-height: 1.45;
	font-weight: 400;
	color: #ffffff;
}

.license-body h3 {
	font-size: 0.85rem;
	font-weight: 700;
	margin-top: 14px;
	margin-bottom: 4px;
}

.license-body h4 {
	font-size: 0.85rem;
	font-weight: 700;
	margin-top: 10px;
	margin-bottom: 2px;
}

.license-body p {
	margin-bottom: 10px;
}

/* Metro Scrollbar */
.license-body::-webkit-scrollbar {
	width: 6px;
}

.license-body::-webkit-scrollbar-track {
	background: transparent;
}

.license-body::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.35);
}

/* Custom Test Input Fields */
.license-inputs {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.license-input-group {
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 0.8rem;
	color: #c5b8e6;
}

.license-input-group input[type="text"] {
	background: rgba(0, 0, 0, 0.35);
	border: 2px solid rgba(255, 255, 255, 0.35);
	color: #ffffff;
	padding: 5px 8px;
	font-family: SegoeUI, sans-serif;
	font-size: 0.82rem;
	outline: none;
	width: 100%;
	max-width: 450px;
}

.license-input-group input[type="text"]:focus {
	border-color: #00bcf2;
}

/* Footer Section */
.license-footer {
	width: 100%;
	max-width: 900px;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-top: 24px;
	padding-top: 10px;
}

.license-checkbox-container {
	display: flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
	font-size: 0.95rem;
	font-weight: 400;
	color: #ffffff;
	gap: 10px;
}

.license-checkbox-container input {
	width: 18px;
	height: 18px;
	accent-color: #007a99;
	cursor: pointer;
}

.metro-btn-accept {
	background-color: #007a99;
	border: 2px solid #ffffff;
	color: #ffffff;
	padding: 6px 36px;
	font-size: 0.95rem;
	font-family: SegoeUI, sans-serif;
	font-weight: 400;
	cursor: pointer;
	outline: none;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.metro-btn-accept:hover:not(:disabled) {
	background-color: #0099b8;
}

.metro-btn-accept:active:not(:disabled) {
	background-color: #006b85;
}

.metro-btn-accept:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Execution Mode Cards */
.mode-options {
	display: flex;
	gap: 24px;
	margin-top: 30px;
	width: 100%;
}

.mode-card {
	flex: 1;
	background: rgba(255, 255, 255, 0.05);
	border: 2px solid rgba(255, 255, 255, 0.25);
	padding: 32px 24px;
	cursor: pointer;
	transition: all 0.15s ease;
	border-radius: 4px;
}

.mode-card:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: #00bcf2;
}

.mode-card h3 {
	font-size: 1.5rem;
	margin-bottom: 16px;
	font-weight: 400;
	color: #ffffff;
	display: flex;
	align-items: center;
	gap: 10px;
}

.mode-card p {
	font-size: 0.95rem;
	margin-bottom: 12px;
	color: #e2dbf5;
	line-height: 1.5;
}

.mode-card p strong {
	color: #ffffff;
	font-weight: 600;
}

@media (max-width: 768px) {
	#license_screen,
	#mode_screen {
		padding: 24px 20px;
	}

	.license-title {
		font-size: 2.2rem;
	}

	.license-footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.metro-btn-accept {
		align-self: flex-end;
	}

	.mode-options {
		flex-direction: column;
	}
}