/* Shared look for the home page, dashboard and 404: black screen, wide
   heading font, white hairlines, yellow links, static over everything. */

:root {
	--yellow: #ff0;
	--lime: #0f0;
	--font-heading: "Michroma", "Arial Black", sans-serif;
	--font-body: "Chakra Petch", "Segoe UI", sans-serif;
	--font-button: "Orbitron", "Michroma", sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, monospace;
	--font-pixel: "Silkscreen", "Pixelify Sans", monospace;
}

*, *::before, *::after {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

html {
	background-color: #000;
	color: #fff;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.35;
}

body {
	margin: 0;
	min-height: 100vh;
}

a {
	color: inherit;
	text-decoration: none;
}

h1 {
	font-family: var(--font-heading);
	font-weight: 400;
	font-size: 2em;
	margin: 0.67em 0;
}

h2, h3 {
	font-family: var(--font-heading);
	font-weight: 400;
}

p {
	margin: 1em 0;
}

::selection {
	color: #000;
	background-color: #fff;
}

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: #fff;
}

.y { color: var(--yellow); }
.lime { color: var(--lime); }
.dim { color: #888; }

.link {
	color: var(--yellow);
}

.link:hover {
	background-color: var(--yellow);
	color: #000;
}

/* ------------------------------------------------ static and scanlines */

.static::before,
.static::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 1000;
}

.static::before {
	background-image: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.28) 0, rgba(0, 0, 0, 0.28) 1px, transparent 1px, transparent 3px);
	box-shadow: inset 0 0 10em rgba(0, 0, 0, 0.45);
	animation: staticShift 2s steps(4) infinite;
}

.static::after {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
	animation: staticNoise 0.8s steps(4) infinite;
}

@keyframes staticShift {
	0% { background-position: 0 0; }
	100% { background-position: 0 4px; }
}

@keyframes staticNoise {
	0% { background-position: 0 0; }
	25% { background-position: -40px 20px; }
	50% { background-position: 30px -50px; }
	75% { background-position: -70px -10px; }
	100% { background-position: 0 0; }
}

/* ------------------------------------------------ loader */

#contentloader {
	position: fixed;
	inset: 0;
	background-color: #000;
	z-index: 10000;
	transition: 0.2s;
}

#loadicon,
#loadspin {
	position: absolute;
	left: 50%;
	top: 50%;
	transition: 0.5s ease-in;
}

#loadicon {
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border-radius: 50%;
	box-shadow: inset -9px 5px 0 0 #fff;
	transform: rotate(-20deg);
}

#loadspin {
	width: 92px;
	height: 92px;
	margin: -46px 0 0 -46px;
	border: 2px dashed #fff;
	border-radius: 50%;
	animation: loaderSpin 2s infinite linear;
}

@keyframes loaderSpin {
	to { transform: rotate(360deg); }
}

.destroyedloader {
	opacity: 0;
	pointer-events: none;
	transition: 0.5s !important;
}

.destroyedloader #loadicon,
.destroyedloader #loadspin {
	top: calc(50% - 60px);
}

/* ------------------------------------------------ header bar */

#headerbar {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 20px;
	z-index: 50;
	background-color: #000;
	box-shadow: 0 1px #fff, 0 2px #000;
	overflow: hidden;
	display: flex;
	align-items: center;
}

#headerstatus {
	position: relative;
	z-index: 1;
	flex: none;
	height: 20px;
	padding: 0 10px 0 8px;
	background: linear-gradient(to right, #000 80%, transparent);
	font-family: var(--font-heading);
	font-size: 10px;
	line-height: 20px;
	letter-spacing: 1px;
	color: var(--lime);
	text-shadow: 0 0 6px var(--lime);
	white-space: nowrap;
}

#headerstatus.off {
	color: var(--yellow);
	text-shadow: 0 0 6px var(--yellow);
}

#headernews {
	flex: 1;
	overflow: hidden;
	white-space: nowrap;
	mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

#headernews .track {
	display: inline-block;
	padding-left: 100%;
	animation: marquee 40s linear infinite;
	font-family: var(--font-heading);
	font-size: 11px;
	line-height: 20px;
	letter-spacing: 0.5px;
}

#headernews .track > span {
	margin-right: 2.5em;
}

#headernews .track > span::before {
	content: "\25C6";
	margin-right: 2.5em;
	color: #555;
}

@keyframes marquee {
	to { transform: translateX(-100%); }
}

/* Tabs hanging off the header bar. */
.knobs {
	position: fixed;
	top: 20px;
	left: 0;
	right: 0;
	z-index: 49;
	display: flex;
	justify-content: space-between;
	pointer-events: none;
}

.knobs > div {
	display: flex;
}

.knob {
	pointer-events: auto;
	display: inline-block;
	height: 17px;
	padding: 0 9px;
	margin-right: 6px;
	background-color: #000;
	border: 1px solid #fff;
	border-top: 0;
	color: #fff;
	font-family: var(--font-heading);
	font-size: 10px;
	line-height: 16px;
	letter-spacing: 1px;
	cursor: pointer;
	white-space: nowrap;
}

.knob:hover {
	background-color: #fff;
	color: #000;
}

.knob.brand {
	height: 26px;
	padding: 0 12px;
	font-size: 13px;
	line-height: 25px;
	letter-spacing: 3px;
	margin-right: 10px;
	border-left: 0;
}

.knob.brand::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 8px;
	vertical-align: -1px;
	border-radius: 50%;
	box-shadow: inset -3px 1px 0 0 currentColor;
	transform: rotate(-20deg);
}

.knob.brand.has-icon::before {
	display: none;
}

.knob.brand img {
	width: 18px;
	height: 18px;
	margin-right: 8px;
	vertical-align: -4px;
	border-radius: 50%;
	object-fit: cover;
}

.knob.yellow {
	color: var(--yellow);
	border-color: var(--yellow);
}

.knob.yellow:hover {
	background-color: var(--yellow);
	color: #000;
}

.knob[aria-pressed="false"] {
	color: #888;
}

.knob.waiting {
	color: var(--yellow);
	border-color: var(--yellow);
	animation: blink 1.2s steps(2) infinite;
}

.knob-form {
	display: inline;
	margin: 0;
}

.knobs .right .knob:last-child {
	margin-right: 0;
	border-right: 0;
}

@keyframes blink {
	0% { opacity: 1; }
	100% { opacity: 0.3; }
}

/* ------------------------------------------------ page parts */

.seperator {
	width: 100%;
	height: 32px;
	border-top: 1px solid #fff;
	border-bottom: 1px solid #fff;
	background-image: repeating-linear-gradient(-45deg, #fff 0 2px, transparent 2px 10px);
	opacity: 0.9;
}

.seperate {
	width: 100%;
	height: 32px;
	background:
		linear-gradient(#fff, #fff) center / 100% 1px no-repeat,
		repeating-linear-gradient(to right, #666 0 1px, transparent 1px 16px) center / 100% 9px no-repeat;
	opacity: 0.6;
}

.padded {
	padding: 1em 10vw;
	text-align: center;
}

.pane {
	background-color: rgba(0, 0, 0, 0.72);
}

.homebutton {
	display: inline-block;
	font-family: var(--font-button);
	font-size: 1.4em;
	font-weight: 700;
	letter-spacing: 1px;
	color: var(--yellow);
	background: none;
	border: 1px solid var(--yellow);
	box-shadow: 0 6px var(--yellow), 0 0 32px rgba(255, 255, 0, 0.3);
	padding: 0.25em 0.9em;
	margin: 0.5em 0.3em 0.8em;
	cursor: pointer;
	transition: 0.2s;
}

.homebutton:hover {
	background-color: var(--yellow);
	color: #000;
}

.homebutton:active {
	transform: translateY(4px);
	box-shadow: 0 2px var(--yellow), 0 0 32px rgba(255, 255, 0, 0.3);
}

.homebutton.white {
	color: #fff;
	border-color: #fff;
	box-shadow: 0 6px #fff, 0 0 32px rgba(255, 255, 255, 0.2);
}

.homebutton.white:hover {
	background-color: #fff;
	color: #000;
}

.homebutton.small {
	font-size: 0.9em;
	box-shadow: 0 4px var(--yellow), 0 0 20px rgba(255, 255, 0, 0.25);
}

.homebutton.white.small {
	box-shadow: 0 4px #fff, 0 0 20px rgba(255, 255, 255, 0.15);
}

.homebutton:disabled {
	opacity: 0.4;
	pointer-events: none;
}

/* ------------------------------------------------ footer index */

#index {
	padding: 4em 10vw;
	background:
		radial-gradient(ellipse at 50% 120%, rgba(60, 60, 255, 0.35), transparent 60%),
		repeating-linear-gradient(to right, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 48px),
		repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 48px),
		#000;
}

.overload {
	margin: 0 auto;
	max-width: 900px;
	display: flex;
	align-items: center;
	gap: 1.5em;
	padding: 1em 1.5em;
	background-color: rgba(0, 0, 0, 0.75);
	border-left: 1px solid #fff;
}

.overload .wordmark {
	flex: none;
	font-family: var(--font-heading);
	font-size: 1.1em;
	letter-spacing: 3px;
	padding-right: 1.5em;
	border-right: 1px solid #555;
}

.indexlist {
	font-family: var(--font-heading);
	font-size: 0.72em;
	line-height: 2.2;
	color: #555;
}

.indexlist a {
	color: var(--yellow);
	padding: 0 0.15em;
}

.indexlist a:hover {
	background-color: var(--yellow);
	color: #000;
}

/* Shown to admins while maintenance mode is on. */
#maintenancebar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9000;
	padding: 0.5em 1em;
	background-color: var(--yellow);
	color: #000;
	font-size: 12px;
	text-align: center;
}

#maintenancebar:hover {
	background-color: #fff;
}

@media (max-width: 700px) {
	.padded {
		padding: 1em 5vw;
	}

	.padded h1 {
		font-size: 1.4em;
	}

	#index {
		padding: 2em 4vw;
	}

	.overload {
		flex-direction: column;
		text-align: center;
		border-left: 0;
		border-top: 1px solid #fff;
	}

	.overload .wordmark {
		border-right: 0;
		padding-right: 0;
	}

	.knob {
		font-size: 9px;
		padding: 0 6px;
		margin-right: 3px;
	}

	.knob.brand {
		font-size: 11px;
		letter-spacing: 2px;
	}
}

/* ------------------------------------------------ viewer preferences */

/* PREFS → Scanlines off (set on <html> by the head partial and effects.js). */
.no-scanlines .static::before,
.no-scanlines .static::after {
	display: none;
}
