@font-face {
  font-family: 'MEKsans-Italic';
  font-style: normal;
  src: url('./fonts/MEKSans-Italic.woff') format('woff');
}

body {
  background-color: #000;
  margin: 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  max-width:  95vw;
  max-height:  95vh;
  object-fit: contain;
}

.overlay {
  color: #fff;
  background: rgba(0,0,0,0.8);
	display: flex;
  z-index: 2;
	font-family: 'MEKsans-Italic', monospace;
  text-transform: uppercase;
	font-size: 2.5em;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 15vmin;
}

.overlay p {
	max-width: 800px;
}

#loading {
  background: #000;
  z-index: 4;
}

#loading img {
  image-rendering: pixelated;
  width: 180px;
  height: 180px;
  object-fit: contain;
}

/* 
Big thanks to
https://codepen.io/lbebber/pen/XJRdrV
https://aleclownes.com/2017/02/01/crt-display.html 
*/

@keyframes flicker {
  0% {
  opacity: 0.27861;
  }
  5% {
  opacity: 0.34769;
  }
  10% {
  opacity: 0.23604;
  }
  15% {
  opacity: 0.90626;
  }
  20% {
  opacity: 0.18128;
  }
  25% {
  opacity: 0.83891;
  }
  30% {
  opacity: 0.65583;
  }
  35% {
  opacity: 0.67807;
  }
  40% {
  opacity: 0.26559;
  }
  45% {
  opacity: 0.84693;
  }
  50% {
  opacity: 0.96019;
  }
  55% {
  opacity: 0.08594;
  }
  60% {
  opacity: 0.20313;
  }
  65% {
  opacity: 0.71988;
  }
  70% {
  opacity: 0.53455;
  }
  75% {
  opacity: 0.37288;
  }
  80% {
  opacity: 0.71428;
  }
  85% {
  opacity: 0.70419;
  }
  90% {
  opacity: 0.7003;
  }
  95% {
  opacity: 0.36108;
  }
  100% {
  opacity: 0.24387;
  }
}

.dsu {
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 3;
  background-size: 100% 2px, 3px 100%;
  backdrop-filter: blur(1px) brightness(120%);
  -webkit-backdrop-filter: blur(1px) brightness(120%);
}

.dsu::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: rgba(18, 16, 16, 0.1);
  opacity: 0;
  z-index: 3;
  animation: flicker 0.15s infinite;
}

.no-cursor {
	cursor: none;
}
