html,
body,
#game-root {
	width: 100%;
	height: 100%;
	margin: 0;
	overflow: hidden;
	background: #000;
	font-family: Inter, sans-serif;
}

#street_canvas {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	z-index: 0;
}

#overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.35);
	z-index: 1;
	pointer-events: none;

	display: flex;
	justify-content: center;
	align-items: center;
}
.ui-card,
.controls-panel,
.score-panel {
	z-index: 20;
}

.hidden {
	display: none !important;
}

#answerbox.faded {
	opacity: 0.25;
	transition: opacity 0.25s ease;
}

#answerbox.faded:hover {
	opacity: 1;
}

.glass-panel,
.ui-card {
	background: rgba(20,20,20,.65);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);

	border: 1px solid rgba(255,255,255,.1);

	border-radius: 24px;

	box-shadow:
		0 8px 32px rgba(0,0,0,.35);

	color: white;
}

.glass-controls {
	background: rgba(20,20,20,0.55);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);

	padding: 12px;
	border-radius: 20px;

	border: 1px solid rgba(255,255,255,0.08);
	box-shadow: 0 8px 24px rgba(0,0,0,0.35);

	display: flex;
	flex-direction: column;
	gap: 10px;
}

.centered-card {
	position: fixed;
	top: 50%;
	left: 50%;

	transform: translate(-50%, -50%);

	width: min(90vw, 440px);

	z-index: 30;
}

.card-header-modern,
.card-footer-modern {
	padding: 1rem 1.5rem;
}

.card-body-modern {
	padding: 1.5rem;
}

.control-btn {
	display: flex;
	align-items: center;
	justify-content: center;

	gap: 8px;

	background: rgba(255,255,255,0.12);
	border: 1px solid rgba(255,255,255,0.15);

	color: white;
	font-weight: 600;

	padding: 0.75rem 1rem;
	border-radius: 14px;

	transition: all .18s ease-out;
}

.control-btn .icon {
	font-size: 1.1rem;
}

.modern-btn {
	border-radius: 14px;
	padding: .75rem 1rem;
	font-weight: 600;
}

.control-btn:hover:not(.disabled) {
	background: rgba(255,255,255,0.18);
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.control-btn:active:not(.disabled) {
	transform: translateY(0);
	background: rgba(255,255,255,0.22);
}

.control-btn.disabled {
	opacity: 0.45;
	pointer-events: none;
}

.modern-input {
	border-radius: 12px;
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.12);
	color: white;
}

#map-wrapper {
	border-radius: 24px;
	height: 90vh;
	left: 50%;
	opacity: 0;
	pointer-events: none;
	position: fixed;
	top: 50%;
	translate: -50% -50%;
	visibility: visible;
	width: min(135vw, 900px);
	z-index: 1000;
	z-index: 25;
}

#map-canvas {
	width: 100%;
	height: 100%;
	border-radius: 24px;
	pointer-events: auto;
}

#map-close-btn { transform: scale(1.6); }

.controls-panel {
	position: fixed;

	left: 24px;
	bottom: 24px;

	display: flex;
	flex-direction: column;
	gap: 12px;
}

.round-pill {
	background: rgba(0,0,0,0.45);
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.85rem;
	border: 1px solid rgba(255,255,255,0.15);
}

.score-panel {
	position: fixed;

	right: 24px;
	bottom: 24px;
}

.score-pill,
.info-pill {
	background: rgba(255,255,255,.1);

	padding: .75rem 1rem;

	border-radius: 999px;

	backdrop-filter: blur(10px);
}

.position-tip {
	position: relative;
}

.position-tip::after {
	content: "Go back to initial location";
	position: absolute;
	top: -35px;
	left: 50%;
	transform: translateX(-50%);
	background: #000;
	color: #fff;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s;
}

.position-tip:hover::after {
	opacity: 1;
}

.final-subsection {
	margin-top: 0.5rem;
	margin-bottom: 0.5rem;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	background: rgba(255, 255, 255, 0.05);
}

.final-subtitle {
	font-size: 1.1rem;
	margin-bottom: 0.25rem;
	font-weight: 600;
}

.final-distance {
	margin: 0;
	opacity: 0.9;
}

#answerbox {
	transition: box-shadow 0.4s ease-out, transform 0.4s ease-out;
}

.glow-low {
	animation: glowLow 1.2s ease-out forwards;
}
@keyframes glowLow {
	0%   { box-shadow: 0 0 0px rgba(255, 0, 0, 0.0); }
	40%  { box-shadow: 0 0 25px rgba(255, 0, 0, 0.6); }
	100% { box-shadow: 0 0 10px rgba(255, 0, 0, 0.3); }
}

.glow-mid {
	animation: glowMid 1.2s ease-out forwards;
}
@keyframes glowMid {
	0%   { box-shadow: 0 0 0px rgba(255, 165, 0, 0.0); }
	40%  { box-shadow: 0 0 25px rgba(255, 165, 0, 0.6); }
	100% { box-shadow: 0 0 10px rgba(255, 165, 0, 0.3); }
}

.glow-high {
	animation: glowHigh 1.2s ease-out forwards;
}
@keyframes glowHigh {
	0%   { box-shadow: 0 0 0px rgba(0, 255, 150, 0.0); }
	40%  { box-shadow: 0 0 30px rgba(0, 255, 150, 0.7); }
	100% { box-shadow: 0 0 15px rgba(0, 255, 150, 0.4); }
}

@media (max-width: 1300px) {
	.centered-card {
		width: calc(100vw - 24px);
	}

	#map-wrapper {
		height: 50vh;
		width: calc(100vw - 24px);
		z-index: 1000;
	}

	.controls-panel {
		left: 12px;
		right: 12px;
		bottom: 12px;
	}

	.glass-controls {
		flex-direction: row;
		justify-content: center;
		width: calc(100vw - 24px);
		left: 12px;
		right: 12px;
		bottom: 12px;
	}

	.control-btn {
		flex: 1;
		padding: 0.65rem 0.5rem;
	}

	.score-panel {
		position: fixed;
		top: 10px;
		left: 10px;
		right: auto;
		bottom: auto;
	}

}