/* Layout for the gitmatrix canvas embedded in Forgejo's landing page.
   gitmatrix's own matrix.css targets a standalone document (body-level
   sizing, its own chrome), so the embed brings its own geometry instead. */

#gm-stage {
	position: relative;
	height: 100vh;
	/* 100vh includes the mobile browser URL bar, which can hide content
	   underneath it. 100dvh accounts for the actual visible viewport;
	   supporting browsers (all current major engines) pick this up as an
	   override, everything else keeps the 100vh above as a fallback. */
	height: 100dvh;
	width: 100%;
	overflow: hidden;
}

#gm-stage #matrix {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	background: #000;
}

/* Overlay is real DOM, not painted into the canvas, so Forgejo's theme and
   fonts keep applying and the text stays selectable. */
#gm-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	pointer-events: none;
	/* Keeps the hero legible over moving glyphs. */
	background: radial-gradient(ellipse at center, rgba(0,0,0,.85) 0%, rgba(0,0,0,.55) 100%);
}

#gm-overlay .logo { width: 220px; height: 220px; }

/* gitmatrix writes a boot message here; unstyled it lands wherever. */
#gm-stage #status {
	position: absolute;
	bottom: 1rem;
	left: 1rem;
	opacity: .6;
	font-family: monospace;
}

@media (prefers-reduced-motion: reduce) {
	#gm-stage #matrix { display: none; }
}
