:root {
	color-scheme: dark;
	font-family: Inter, system-ui, sans-serif;
	--bg: #040814;
	--bg-panel: rgba(10, 16, 30, 0.72);
	--border: rgba(150, 190, 255, 0.16);
	--text: #eef4ff;
	--muted: #8da4c7;
	--accent: #6cc8ff;
	--accent-strong: #9e7bff;
	--success: #6ef7c8;
	--warning: #ffd06b;
	--shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
	background:
		radial-gradient(circle at top, rgba(80, 124, 255, 0.22), transparent 30%),
		radial-gradient(circle at 80% 20%, rgba(122, 84, 255, 0.2), transparent 24%),
		linear-gradient(180deg, #07101f 0%, #040814 48%, #02050d 100%);
	color: var(--text);
}

body {
	min-height: 100vh;
	overflow: hidden;
	overflow-y: auto;
}

canvas {
	display: block;
}

.flight-app {
	display: grid;
	grid-template-columns: 360px minmax(0, 1fr);
	min-height: 100vh;
}

.panel {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	padding: 1.5rem;
	background: linear-gradient(180deg, rgba(6, 12, 24, 0.92), rgba(7, 12, 22, 0.72));
	border-right: 1px solid var(--border);
	backdrop-filter: blur(24px);
	box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
	max-height: 100vh;
	scrollbar-width: thin;
	scrollbar-color: rgba(140, 180, 255, 0.35) transparent;
}

.panel__brand,
.panel__section,
.stat-card,
.pill,
.info-strip,
.tooltip {
	border: 1px solid var(--border);
	background: var(--bg-panel);
	box-shadow: var(--shadow);
	backdrop-filter: blur(18px);
}

.panel__brand {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	border-radius: 1.5rem;
}

.panel__brand-mark {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: 1rem;
	color: var(--bg);
	background: linear-gradient(135deg, var(--accent), #b2f1ff);
}

.panel__brand-mark i,
.legend-list i,
.pill i {
	width: 1.1rem;
	height: 1.1rem;
}

.panel__eyebrow,
.info-strip__label,
.stat-card__label {
	margin: 0 0 0.25rem;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}

.panel__title {
	margin: 0;
	font-size: 1.5rem;
}

.panel__section {
	padding: 1rem;
	border-radius: 1.5rem;
}

.panel__section--status {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem;
}

.stat-card {
	padding: 0.9rem;
	border-radius: 1.1rem;
}

.stat-card__value {
	display: block;
	font-size: 1rem;
}

.panel__section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.9rem;
}

.panel__section-head h2 {
	margin: 0;
	font-size: 0.98rem;
}

.panel__badge {
	padding: 0.3rem 0.6rem;
	border-radius: 999px;
	font-size: 0.72rem;
	color: var(--success);
	background: rgba(110, 247, 200, 0.12);
	border: 1px solid rgba(110, 247, 200, 0.2);
}

.details-list {
	margin: 0;
}

.details-list__row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.7rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.details-list__row:last-child {
	border-bottom: 0;
}

.details-list__row dt {
	color: var(--muted);
}

.details-list__row dd {
	margin: 0;
	text-align: right;
	font-weight: 600;
}

.legend-list {
	display: grid;
	gap: 0.9rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.legend-list li {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	color: var(--text);
}

.legend-list i {
	color: var(--accent);
	flex: 0 0 auto;
}

.flight-app__main,
.scene-shell {
	position: relative;
	min-width: 0;
}

.scene-shell {
	height: 100vh;
	overflow: hidden;
	touch-action: none;
}

#sceneCanvas {
	width: 100%;
	height: 100%;
}

.scene-shell__overlay {
	position: absolute;
	left: 1.5rem;
	right: 1.5rem;
	z-index: 3;
	pointer-events: none;
}

.scene-shell__overlay--top {
	top: 1.5rem;
	display: flex;
	justify-content: flex-end;
}

.scene-shell__overlay--bottom {
	bottom: 1.5rem;
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.8rem 1rem;
	border-radius: 999px;
}

.pill--glow {
	box-shadow: 0 0 0 1px rgba(108, 200, 255, 0.16), 0 0 40px rgba(108, 200, 255, 0.12), var(--shadow);
}

.pill i {
	color: var(--accent);
}

.info-strip {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	padding: 1rem 1.15rem;
	border-radius: 1.35rem;
}

.info-strip strong {
	display: block;
	font-size: 0.95rem;
}

.tooltip {
	position: absolute;
	z-index: 4;
	min-width: 220px;
	max-width: min(280px, calc(100vw - 2rem));
	padding: 0.85rem 0.95rem;
	border-radius: 1rem;
	transform: translate(14px, 14px);
	pointer-events: none;
}

.tooltip__title {
	margin: 0 0 0.25rem;
	font-size: 0.92rem;
}

.tooltip__meta {
	margin: 0.15rem 0 0;
	color: var(--muted);
	font-size: 0.8rem;
}

.tooltip__meta strong {
	color: var(--text);
}

@media (max-width: 980px) {
	.panel::-webkit-scrollbar {
		width: 10px;
	}

	.panel::-webkit-scrollbar-track {
		background: transparent;
	}

	.panel::-webkit-scrollbar-thumb {
		background: rgba(140, 180, 255, 0.28);
		border-radius: 999px;
		border: 2px solid transparent;
		background-clip: padding-box;
	}

	.panel::-webkit-scrollbar-thumb:hover {
		background: rgba(140, 180, 255, 0.4);
		border: 2px solid transparent;
		background-clip: padding-box;
	}

	body {
		overflow: auto;
	}

	.flight-app {
		grid-template-columns: 1fr;
	}

	.panel {
		border-right: 0;
		border-bottom: 1px solid var(--border);
	}

	.flight-app__main,
	.scene-shell {
		height: 70vh;
		min-height: 540px;
	}

	.info-strip {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.panel__section--status {
		grid-template-columns: 1fr 1fr;
	}

	.scene-shell__overlay {
		left: 1rem;
		right: 1rem;
	}

	.scene-shell__overlay--top {
		justify-content: flex-start;
		top: 1rem;
	}

	.scene-shell__overlay--bottom {
		bottom: 1rem;
	}

	.tooltip {
		transform: translate(10px, -110%);
	}
}