@import url("https://fonts.googleapis.com/css?family=VT323&display=swap");
@import url("https://fonts.googleapis.com/css?family=Share+Tech+Mono&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap");

:root {
  --color: #5bf870;
  --bg: #05321e;
  --off: #050505;
  --dark: #111;
  --term: "> ";
}

html {
  font-size: 12px;
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  background-color: var(--bg);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
}

a {
  outline: none;
}

/* The screen itself + border */
#crt,
pre {
  font-family: "VT323", monospace;
}

#crt {
  min-width: 80ch;
  background: var(--bg);
  background-image: radial-gradient(ellipse,
      var(--bg) 0%,
      var(--off) 90%);
  animation: on 2s linear;
  transition: all 0.5s;
  overflow: hidden;
	font-size: 2rem;
	position: fixed;
	width: 100%;
  height: 100vh;
	left: 0;
	top: 0;
	z-index: 999;
}

#crt:after {
  content: " ";
  opacity: 0;
  background: #fff;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

#monitor #crt:before {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(to bottom,
      rgba(18, 16, 16, 0.1) 50%,
      rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 8px;
  z-index: 2;
  pointer-events: none;
  animation: fadeIn 2s;
}

.scanline {
  width: 100%;
  height: 100px;
  z-index: 8;
  background: linear-gradient(0deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(255, 255, 255, 0.2) 10%,
      rgba(0, 0, 0, 0.1) 100%);
  opacity: 0.1;
  position: absolute;
  bottom: 100%;
  pointer-events: none;
  animation: scanline 10s linear infinite;
}

.terminal {
  position: relative;
  height: 100%;
  padding: 2rem;
  overflow-y: auto;
  overflow-x: hidden;
  word-break: break-word;
  text-transform: uppercase;
  animation: textShadow 4s infinite;
}

.terminal {
  color: var(--color);
  text-shadow: 0 0 5px #c8c8c8;
}

::selection {
  background: var(--color);
  color: var(--bg);
  text-shadow: none;
}

#prompt {
  display: none;
}

[contenteditable] {
  caret-color: transparent;
  /** This hides the default browser caret */
  outline: none;
}

#input {
  position: relative;
  display: block;
  white-space: pre-wrap;
}

/* Inserts the > before terminal input */
#input:before {
  content: var(--term);
}

/* Puts a blinking square after the content as replacement for caret */
#input[contenteditable="true"]:after,
.typer.active:after {
  content: "■"; /* ▮ */
  animation: cursor 1s infinite;
  animation-timing-function: step-end;
  margin-left: 1px;
  line-height: 1rem;
}

#input.password .char {
  display: none;
}

#input.password:after {
  color: var(--color);
}

#input.password:before {
  color: var(--color);
  content: var(--term) attr(data-pw);
}

.typer {
  word-break: break-all;
}

.alert,
.access-granted {
  animation: flicker 2s infinite;
  position: fixed;
  text-align: center;
  background: var(--bg);
  border: 2px solid var(--color);
  padding: 10px 30px;
  left: 50%;
  top: 40%;
  transform: translateX(-50%);
  z-index: 999;
}

.fullscreen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
