:root {
	--gradient-color: rgba(255,255,255,.8);
}
* {
	box-sizing: border-box;
	margin: 0;
	font-size: 12px;
	font-family: 'Arial', sans-serif;
}
body {
	background-color: white;
	font-weight: 100;
	width: 100vw;
	height: 100dvh;
	overflow: hidden;
	cursor: crosshair;
}
#container {
	width: 100vw;
	height: 100dvh;
	overflow: hidden;
	background-color: black;
	transform: translate3d(0,0,0);
}
#container[data-blur="1"] {
	filter: blur(40px);
}

/* Overlays */
.vignette {
	z-index: 99;
	pointer-events: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100px), linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100px), linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100px), linear-gradient(270deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100px);
}

/* UI Elements */
#ui {
	display: flex;
	position: absolute;
	left: 50%;
	bottom: 80px;
	max-width: 700px;
	width: 100%;
	z-index: 9999999;
	transform: translateX(-50%);
	pointer-events: none;
}
#ui div {
	flex-grow: 1;
	flex-basis: 100px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
	font-size: 12px;
	outline: 1px solid black;
	height: 20px;
}
.ui0 {
	background-color: white;
	color: black;
}
.ui1 {
	background-color: black;
	color: white;
}
@media only screen and (max-width: 800px) {
	#ui {
		max-width: 60vw;
		flex-wrap: wrap;
	}
}
@media only screen and (max-width: 500px) {
	#ui {
		flex-direction: column;
	}
	#ui div {
		flex-grow: 0;
		flex-basis: unset;
	}
}
.background-gradient {
	width: 100vw;
	height: 100vh;
	position: fixed;
	z-index: 1000;
	transition-timing-function: linear;
	pointer-events: none;
}
#background-n {
	opacity: 0;
	width: 100%;
	height: 100px;
	left: 0;
	top: 0;
	background: linear-gradient(180deg, var(--gradient-color) 0%, rgba(0,0,0,0) 100%);
}
#background-e {
	opacity: 0;
	width: 100px;
	height: 100%;
	right: 0;
	top: 0;
	background: linear-gradient(270deg, var(--gradient-color) 0%, rgba(0,0,0,0) 100%);
}
#background-s {
	opacity: 0;
	width: 100%;
	height: 100px;
	left: 0;
	bottom: 0;
	background: linear-gradient(0deg, var(--gradient-color) 0%, rgba(0,0,0,0) 100%);
}
#background-w {
	opacity: 0;
	width: 100px;
	height: 100%;
	left: 0;
	top: 0;
	background: linear-gradient(90deg, var(--gradient-color) 0%, rgba(0,0,0,0) 100%);
}
#vignette {
	width: 100vw;
	height: 100vh;
	position: absolute;
	top: 0;
	left: 0;
	background: linear-gradient(0deg, black 0%, rgba(0,0,0,0) 100px), linear-gradient(90deg, black 0%, rgba(0,0,0,0) 100px), linear-gradient(180deg, black 0%, rgba(0,0,0,0) 100px), linear-gradient(270deg, black 0%, rgba(0,0,0,0) 100px);
	z-index: 999;
	opacity: 8;
	pointer-events: none;
}
#container[data-ui="0"] #ui {
	display: none;
}

/* Trackers */
#trackers {
	width: 100vw;
	height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	pointer-events: none;
	z-index: 9999;
}
.tracker {
	position: absolute;
	padding: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.tracker-dot {
	width: 100%;
	height: 100%;
	border: 2px solid white;
}
#container[data-ui="0"] #trackers {
	display: none;
}

/* Paths */
#paths {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 9999999;
	pointer-events: none;
	mix-blend-mode: difference;
}
.path {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(20);
	fill: none;
	stroke: white;
	stroke-width: .05px;
	stroke-dasharray: 1;
	stroke-dashoffset: 0;
	animation: path 200s linear forwards;
	filter: url(#displacementFilter);
}
@keyframes path {
	from {
		stroke-dashoffset: 1;
	}
	to {
		stroke-dashoffset: 0;
	}
}

/* Main content */
#content {
	width: 400vw;
	height: 400vh;
	position: absolute;
	top: 50%;
	left: 50%;
	background-image: url("assets/ui/grid.svg");
	background-position: center;
	background-size: 100px;
	transform: translate(-50%, -50%) scale(1);
	transform-origin: center;
	overflow: hidden;
}
.floater {
	background-color: black;
	position: absolute;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transform-origin: center;
	-webkit-user-select: none; /* Safari */
	-ms-user-select: none; /* IE 10 and IE 11 */
	user-select: none; /* Standard syntax */
	cursor: grab;
}
.floater[data-wikipedia="1"] {
	outline: 1px solid white;
}
.floater:hover {
	outline: 2px solid white;
}
.floater:active {
	cursor: grabbing;
}
.floater iframe {
	width: 100%;
	height: 100%;
	border: unset;
	pointer-events: none;
	animation: iframe 1s .5s forwards;
	opacity: 0;
}
@keyframes iframe {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Mobile notice */
.url {
	position: fixed;
	top: 50dvh;
	left: 50vw;
	font-size: 12px;
	z-index: 99999;
	transform: translate(-50%, -50%);
	animation: url 1s infinite steps(1);
	padding: 5px;
	display: none;
	text-wrap: pretty;
	text-align: center;
}
@keyframes url {
	0% {
		border: 1px solid white;
		background-color: black;
		color: white;
	}
	50% {
		border: 1px solid black;
		background-color: white;
		color: black;
	}
}
/* @media only screen and (max-width: 600px) {
	.url {
		display: block;
	}
} */

/* Intro and controls */
.intro {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100dvh;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	transition: opacity .5s .2s, background-color .2s;
	--white: white;
	--black: black;
	background-color: var(--black);
}
.intro[data-active="0"] {
	pointer-events: none;
	opacity: 0;
	--white: black;
	--black: white;
}
.intro[data-active="0"] * {
	display: none;
}
.info {
	border-bottom: 1px solid var(--white);
	width: 100%;
	max-width: 280px;
	margin-bottom: 10px;
	padding-bottom: 10px;
	color: var(--white);
}
.info h1 {
	font-size: 12px;
	font-weight: normal;
	font-family: inherit;
	color: var(--white);
	width: 100%;
	margin-bottom: 10px;
}
.info a {
	color: var(--white);
	font: inherit;
}
.info a:hover {
	text-decoration: none;
}
.info a:active {
	opacity: .25;
}
.info p {
	font-size: 12px;
}
.controls {
	display: flex;
	flex-direction: column;
	gap: 10px;
	color: var(--white);
}
.controls-group {
	display: grid;
	grid-template-columns: 100px 1fr;
	align-items: center;
}
.controls-label {
	font-size: 12px;
	text-transform: uppercase;
}
.controls-toggles {
	display: grid;
	grid-template-columns: 60px;
	grid-auto-flow: column;
	grid-auto-columns: 60px;
}
.controls-toggle {
	background-color: var(--black);
	outline: 1px solid var(--white);
	border: unset;
	font-size: 12px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: normal;
	font-family: inherit;
	color: var(--white);
	cursor: pointer;
}
.controls-toggle:hover {
	opacity: .5;
}
.controls-toggle:active {
	opacity: .25;
}
.controls-toggle[data-active="1"] {
	background-color: var(--white);
	color: var(--black);
}
.controls-start {
	border: unset;
	font-size: 12px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	font-weight: normal;
	font-family: inherit;
	background-color: var(--black);
	outline: 1px solid var(--white);
	color: var(--white);
	cursor: pointer;
}
.controls-start:hover {
	background-color: var(--white);
	outline: 1px solid var(--black);
	color: var(--black);
}
.controls-start:active {
	opacity: .25;
}