@font-face {
	font-family: "Uni Sans";
	src: url("../fonts/unisans.otf") format("opentype");
	font-display: swap;
	font-style: normal;
	font-weight: 400;
}

:root {
	color-scheme: dark;
	--blue: #3f78ff;
	--blue-bright: #62a8ff;
	--blue-soft: rgba(73, 132, 255, 0.22);
	--navy: #061022;
	--ink: #020712;
	--white: #f5f8ff;
	--muted: rgba(224, 233, 255, 0.64);
	--line: rgba(129, 174, 255, 0.2);
	--panel: rgba(3, 10, 25, 0.76);

	/* Logo positioning: edit these six values, or use logo-positioner.html. */
	--flame-x: 0px;
	--flame-y: 0px;
	--flame-scale: 1;
	--wordmark-x: 0px;
	--wordmark-y: 0px;
	--wordmark-scale: 1;
}

* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	height: 100%;
}

body {
	margin: 0;
	overflow: hidden;
	background: var(--ink);
	color: var(--white);
	font-family: "Uni Sans", "Segoe UI", Arial, sans-serif;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: geometricPrecision;
}

.loading-screen {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	min-height: 100vh;
	padding: clamp(18px, 3vw, 42px);
	overflow: hidden;
}

.city-background,
.city-treatment,
.particles,
.scanlines {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	pointer-events: none;
}

.city-background {
	z-index: -5;
	top: -2%;
	right: -2%;
	bottom: -2%;
	left: -2%;
	background: url("../images/background.jpg") center center / cover no-repeat;
	filter: saturate(1.04) contrast(1.06) brightness(0.9);
	transform: scale(1.02);
	animation: city-breathe 18s ease-in-out infinite alternate;
}

.city-treatment {
	z-index: -4;
	background:
		radial-gradient(circle at 50% 43%, rgba(35, 99, 226, 0.09), transparent 34%),
		linear-gradient(180deg, rgba(1, 5, 14, 0.38) 0%, rgba(2, 7, 18, 0.18) 42%, rgba(1, 5, 14, 0.82) 100%),
		linear-gradient(90deg, rgba(0, 4, 12, 0.58) 0%, transparent 28%, transparent 72%, rgba(0, 4, 12, 0.58) 100%);
}

.particles {
	z-index: -2;
	top: auto;
	height: 46%;
	background: url("../images/particles.gif") center bottom / 720px 100% repeat-x;
	opacity: 0.16;
	mix-blend-mode: screen;
	-webkit-mask-image: linear-gradient(to bottom, transparent, #000 36%, #000 100%);
	mask-image: linear-gradient(to bottom, transparent, #000 36%, #000 100%);
}

.scanlines {
	z-index: -1;
	opacity: 0.035;
	background-image: linear-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px);
	background-size: 100% 4px;
}

.topbar {
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.server-identity {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.server-identity strong {
	display: block;
	margin-top: 3px;
	font-size: clamp(15px, 1.15vw, 19px);
	letter-spacing: 0.14em;
	white-space: nowrap;
}

.eyebrow,
.discord-link small,
.phase,
.meta-chip span,
.tip-label,
.file-count {
	font-size: 10px;
	line-height: 1;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--muted);
}

.live-dot {
	position: relative;
	display: block;
	width: 10px;
	height: 10px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--blue-bright);
	box-shadow: 0 0 16px rgba(78, 151, 255, 0.95);
}

.live-dot::after {
	content: "";
	position: absolute;
	top: -6px;
	right: -6px;
	bottom: -6px;
	left: -6px;
	border: 1px solid rgba(103, 163, 255, 0.48);
	border-radius: inherit;
	animation: pulse 2.2s ease-out infinite;
}

.discord-link {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 14px 10px 12px;
	border: 1px solid rgba(126, 169, 255, 0.22);
	border-radius: 12px;
	background: rgba(4, 12, 29, 0.48);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: var(--white);
	text-decoration: none;
	transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.discord-link:hover,
.discord-link:focus-visible {
	border-color: rgba(126, 169, 255, 0.58);
	background: rgba(16, 35, 76, 0.68);
	transform: translateY(-1px);
	outline: none;
}

.discord-link img {
	width: 31px;
	height: 25px;
	object-fit: contain;
}

.discord-link span,
.discord-link strong {
	display: block;
}

.discord-link strong {
	margin-top: 4px;
	font-size: 13px;
	letter-spacing: 0.05em;
}

.hero {
	z-index: 1;
	display: flex;
	min-height: 0;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 10px 0;
}

.logo-stage {
	position: relative;
	width: min(50vw, 53vh, 610px);
	min-width: 290px;
	/* GMod Chromium 86 does not support aspect-ratio. */
	height: min(50vw, 53vh, 610px);
	min-height: 290px;
	flex-shrink: 0;
}

.logo-aura {
	position: absolute;
	top: 20%;
	right: 16%;
	bottom: 16%;
	left: 16%;
	border-radius: 50%;
	background: rgba(34, 94, 221, 0.25);
	filter: blur(64px);
	animation: aura 5s ease-in-out infinite alternate;
}

.hero-logo {
	position: absolute;
	display: block;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transform-origin: center;
	pointer-events: none;
	will-change: transform;
}

.logo-flame {
	z-index: 1;
	transform: translate3d(var(--flame-x), var(--flame-y), 0) scale(var(--flame-scale));
	filter: drop-shadow(0 18px 30px rgba(13, 77, 224, 0.24)) drop-shadow(0 28px 46px rgba(0, 5, 18, 0.62));
}

.logo-wordmark {
	z-index: 2;
	transform: translate3d(var(--wordmark-x), var(--wordmark-y), 0) scale(var(--wordmark-scale));
	filter: drop-shadow(0 10px 20px rgba(0, 5, 18, 0.48));
}

.server-meta {
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: clamp(16px, 2vw, 28px);
	margin-top: clamp(-70px, -5.5vh, -42px);
	padding: 12px 18px;
	border: 1px solid rgba(117, 164, 255, 0.16);
	border-radius: 12px;
	background: rgba(2, 8, 20, 0.55);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.meta-chip {
	min-width: 96px;
	text-align: center;
}

.meta-chip strong {
	display: block;
	max-width: 180px;
	margin-top: 6px;
	overflow: hidden;
	font-size: 12px;
	letter-spacing: 0.12em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.meta-divider {
	width: 1px;
	background: var(--line);
}

.loading-panel {
	z-index: 2;
	width: min(100%, 1020px);
	margin: 0 auto;
	padding: clamp(17px, 2vw, 24px);
	border: 1px solid rgba(121, 169, 255, 0.23);
	border-radius: 18px;
	background:
		linear-gradient(135deg, rgba(16, 36, 78, 0.19), transparent 54%),
		var(--panel);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.035);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}

.panel-heading,
.download-row,
.tip-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}

.phase {
	color: var(--blue-bright);
}

.panel-heading p {
	margin: 6px 0 0;
	font-size: clamp(14px, 1.2vw, 17px);
	letter-spacing: 0.045em;
}

.percentage {
	font-size: clamp(20px, 2vw, 29px);
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.04em;
	color: #dfe9ff;
}

.progress-track {
	position: relative;
	height: 5px;
	margin-top: 16px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(143, 177, 255, 0.11);
}

.progress-bar {
	position: absolute;
	top: 0;
	right: auto;
	bottom: 0;
	left: 0;
	width: 0%;
	border-radius: inherit;
	background: linear-gradient(90deg, #315fd8, #4c8dff 58%, #8fd0ff);
	box-shadow: 0 0 18px rgba(74, 143, 255, 0.74);
	transition: width 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress-bar::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.52), transparent);
	transform: translateX(-100%);
	animation: shimmer 2.2s ease-in-out infinite;
}

.progress-track.is-indeterminate .progress-bar {
	width: 28%;
	animation: indeterminate 1.65s ease-in-out infinite;
}

.download-row {
	margin-top: 11px;
}

.current-file {
	max-width: 72%;
	overflow: hidden;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: rgba(218, 229, 255, 0.54);
}

.file-count {
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
}

.tip-row {
	justify-content: flex-start;
	margin-top: 15px;
	padding-top: 14px;
	border-top: 1px solid rgba(129, 174, 255, 0.12);
}

.tip-label {
	flex: 0 0 auto;
	padding: 6px 8px;
	border: 1px solid rgba(88, 145, 255, 0.25);
	border-radius: 6px;
	background: rgba(52, 103, 218, 0.12);
	color: rgba(137, 183, 255, 0.9);
}

.tip-row p {
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	letter-spacing: 0.04em;
	color: rgba(220, 230, 252, 0.66);
	transition: opacity 220ms ease, transform 220ms ease;
}

.tip-row p.is-changing {
	opacity: 0;
	transform: translateY(3px);
}

@keyframes city-breathe {
	from { transform: scale(1.02); }
	to { transform: scale(1.055); }
}

@keyframes pulse {
	0% { opacity: 0.9; transform: scale(0.55); }
	75%, 100% { opacity: 0; transform: scale(1.35); }
}

@keyframes aura {
	from { opacity: 0.55; transform: scale(0.94); }
	to { opacity: 0.9; transform: scale(1.07); }
}

@keyframes shimmer {
	0%, 32% { transform: translateX(-100%); }
	72%, 100% { transform: translateX(100%); }
}

@keyframes indeterminate {
	0% { left: -30%; }
	55% { left: 58%; }
	100% { left: 105%; }
}

@media (max-height: 820px) {
	.loading-screen {
		padding-block: 18px;
	}

	.logo-stage {
		width: min(44vw, 48vh, 450px);
		height: min(44vw, 48vh, 450px);
	}

	.server-meta {
		margin-top: -50px;
	}

	.loading-panel {
		padding-block: 15px;
	}

	.tip-row {
		margin-top: 11px;
		padding-top: 11px;
	}
}

@media (max-width: 760px) {
	.loading-screen {
		padding: 16px;
	}

	.topbar {
		align-items: flex-start;
	}

	.discord-link {
		padding: 9px;
	}

	.discord-link img {
		width: 26px;
		height: 21px;
	}

	.discord-link span {
		display: none;
	}

	.logo-stage {
		width: min(78vw, 48vh);
		min-width: 250px;
		height: min(78vw, 48vh);
		min-height: 250px;
	}

	.server-meta {
		width: min(100%, 520px);
		gap: 10px;
		padding-inline: 10px;
	}

	.meta-chip {
		min-width: 0;
		flex: 1;
	}

	.meta-chip strong {
		font-size: 10px;
	}

	.panel-heading p {
		max-width: 72vw;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.tip-row p {
		font-size: 11px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
	}

	.particles {
		display: none;
	}
}
