:root {
  --terminalbg: #050505;
  --terminalprimary: #74d6ff;
  --terminalprimarydark: #2f5d8f;
  --terminalframe: #7a3dff;
  --terminalframedark: #5a2bc4;
  --terminalsecondary: #ef00ef;
  --terminalsecondarydark: #830083;
  --terminaltertiary: #00e58a;
  --terminallight: #f3e3ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {

  height: 100dvh;
	margin: 0;
	background-color: #000;
	overflow: hidden;

  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  text-transform: uppercase;

  color: var(--terminalprimary);
  text-shadow: none;

}

::selection {
  background: var(--terminalprimary);
}

.c1 {
  color: var(--terminalprimary);
  text-shadow: 0 0 1px var(--terminalprimary);
}
.c2 {
  color: var(--terminalsecondary);
  text-shadow: 0 0 1px var(--terminalsecondary);
}
.c3 {
  color: var(--terminaltertiary);
  text-shadow: 0 0 1px var(--terminaltertiary);
}
.c4 {
  color: var(--terminallight);
  text-shadow: 0 0 1px var(--terminallight);
}
.c5 {
  color: #ffd84d;
  text-shadow: 0 0 1px #ffd84d;
}
#cursor {
  color: var(--terminallight);
  text-shadow: 0 0 1px var(--terminallight);
}

.g1 {
  color: #fe435f;
  text-shadow: 0 0 1px #fe435f;
}
.g2 {
  color: #fd308e;
  text-shadow: 0 0 1px #fd308e;
}
.g3 {
  color: #e531b5;
  text-shadow: 0 0 1px #e531b5;
}
.g4 {
  color: #a936db;
  text-shadow: 0 0 1px #a936db;
}
.g5 {
  color: #653bf7;
  text-shadow: 0 0 1px #653bf7;
}

#blocker {

  position: fixed;
  inset: 0;

  width: 100%;
  height: 100%;
  padding: 4rem;

  z-index: 999;

  display: flex;
  justify-content: center;
  align-items: center;

  background-color: var(--terminalbg);
  background-image: url('../img/scanline.png');
  background-repeat: repeat;
  backdrop-filter: blur(6px);

}
#blocker::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  background-image:
    radial-gradient(ellipse at 14% 84%, rgba(58, 42, 122, 0.34) 0 19%, transparent 52%),
    radial-gradient(ellipse at 50% 79%, rgba(76, 54, 150, 0.28) 0 18%, transparent 50%),
    radial-gradient(ellipse at 86% 81%, rgba(54, 44, 128, 0.3) 0 19%, transparent 52%),
    linear-gradient(to top, rgba(38, 24, 86, 0.24) 0%, rgba(30, 20, 70, 0.15) 38%, transparent 76%);
  background-size: 165% 185%, 175% 185%, 165% 185%, 100% 100%;
  background-position: 0% 0%, 22% 0%, 50% 0%, 0 0;
  filter: blur(2.2px);
  animation: particleWave 32s cubic-bezier(.35,.05,.2,1) infinite;
}
#blocker::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(116deg, transparent 0%, transparent 38%, rgba(107, 76, 255, 0.16) 50%, transparent 62%, transparent 100%),
    linear-gradient(74deg, transparent 0%, transparent 42%, rgba(90, 65, 214, 0.13) 50%, transparent 58%, transparent 100%),
    linear-gradient(98deg, transparent 0%, transparent 45%, rgba(72, 100, 220, 0.1) 50%, transparent 55%, transparent 100%);
  background-size: 160% 140%, 170% 150%, 155% 135%;
  background-position: 0 100%, 0 100%, 0 100%;
  filter: blur(1px);
  animation: particleFlow 36s cubic-bezier(.33,.01,.21,1) infinite;
}
#blocker.hide {
  display: none;
}

#container {
  width: 100%;
  height: 100%;
  max-width: 1000px;
  max-height: 640px;
  border: 1px solid var(--terminalframe);
  border-radius: 2px;
  display: flex;
  position: relative;
  z-index: 1;
  -webkit-animation: startupFade 0.2s ease-out;
  animation: startupFade 0.2s ease-out;
}

#crashMessage {
  z-index: 500;
  width: 100%;
  height: 100%;
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  background-color: #000000d7;
  background-image: url('../img/scanline.png');
  background-repeat: repeat;
  backdrop-filter: blur(10px);
}

#terminal, #resources, #controls {
  height: calc(100% - 23px);
  overflow-y: scroll;
  padding: 5px;
}

#canvas {
  display: block;
  position: fixed;
  inset: 0;
}

#terminal {
  line-break: auto;
  background-color: #000;
  line-height: 1.1;
  text-shadow: none;
  font-variant-ligatures: none;
  white-space: pre;
  overflow-x: auto;
  text-align: left;
}

#terminal * {
  text-shadow: none !important;
}

#terminal .logoLine {
  text-shadow: none !important;
  line-height: 1.1;
  letter-spacing: 0;
  font-feature-settings: normal;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1em;
  font-weight: 400;
  text-rendering: auto;
}

#resources {
  font-size: 0.8rem;
  overflow-x: hidden;
  overflow-y: auto;
  text-wrap:nowrap;
  background-color: #000;
  min-height: 0;
}
#settings {
  padding: 5px;
  background-color: #000;
  height: calc(100% - 23px);
  overflow-y: auto;
}

#settings.locked {
  opacity: 0.5;
  pointer-events: none;
}

.tCol {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tRow {
  border: 1px solid var(--terminalframe);
  box-shadow: 0 0 2px var(--terminalframedark), 0 0 2px var(--terminalframedark) inset;
  flex-grow: 1;
  padding: 5px;
  min-height: 0;
}
.launchRow {
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  padding: 0;
}
.tHeader {
  background: var(--terminalframedark);
  box-shadow: 0 0 1px var(--terminalframedark);
  text-shadow: none;
  color: var(--terminallight);
  font-weight: 700;
  padding: 5px;
  width: 100%;
}

.leftCol {
  flex: 1 1 auto;
  min-width: 0;
}

.rightCol {
  width: 360px;
  flex: 0 0 360px;
  min-height: 0;
}

.rightCol .tRow:first-child {
  flex: 1 1 auto;
  min-height: 0;
}

.rightCol .tRow:nth-child(2) {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 120px;
  background-color: #000;
}

.rightCol .launchRow {
  flex: 0 0 72px !important;
  height: 72px !important;
}

@media only screen and (max-width: 850px) {
  #blocker {
    padding: 1rem;
  }
  .leftCol {
    width:100%;
  }
  .rightCol {
    display: none !important;
  }
}

#enterBtn {
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  width: 100%;
  height: 100%;
  min-width: 0;
  border: none;
  background: #ff0000;
  padding: 0.8rem;
  color: #ffffff;
  box-shadow: 0 0 3px 0px #ff0000;
  border-radius: 2px;
  transition: box-shadow 0.2s;
  border-radius: 0;
}
#enterBtn:hover {
  box-shadow: 0 0 5px 0px #cc0000;
}

/* settings form */

.formCheckContainer {
  display: inline-block;
  position: relative;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.formCheckContainer input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}
.checkmark {
  color: var(--terminalprimary);
  text-shadow: none;
}

.formCheckContainer input:checked ~ .checkmark {
  background-color: var(--terminalprimary);
  color: var(--terminalprimarydark);
  box-shadow: 0 0 3px var(--terminalprimary);
  text-shadow: none;
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

input[type=number] {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  border: 2px solid var(--terminalprimary);
  box-shadow: 0 0 4px var(--terminalprimarydark), 0 0 4px var(--terminalprimarydark) inset;
  text-shadow: 0 0 2px var(--terminalprimary);
  background: none;
  color: var(--terminalprimary);
  width: 33%;
}

/* scrollbar */

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent; 
}
::-webkit-scrollbar-thumb {
  background: var(--terminalprimary); 
  box-shadow: 0 0 8px 0px var(--terminalprimarydark);
}

/* startup */

@-webkit-keyframes startupFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes startupFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@-webkit-keyframes startup {
  0% {
    transform: scaleX(8) scaleY(0.02) translateX(500px) translateY(500px);
  }
  25% {
    transform: scaleX(4) scaleY(0.02) translateX(-200px) translateY(-200px);
  }
  75% {
    transform: scaleX(2) scaleY(0.02) translateX(100px) translateY(100px);
  }
  100% {
    transform: scaleX(1) scaleY(1);
  }
}

@keyframes startup {
  0% {
    transform: scaleX(8) scaleY(0.02) translateX(500px) translateY(500px);
  }
  25% {
    transform: scaleX(4) scaleY(0.02) translateX(-200px) translateY(-200px);
  }
  75% {
    transform: scaleX(2) scaleY(0.02) translateX(100px) translateY(100px);
  }
  100% {
    transform: scaleX(1) scaleY(1);
  }
}

/* flicker */

@-webkit-keyframes flicker {
  0% {
    opacity: .86139;
    transform: translateX(0);
  }
  5% {
    opacity: .893;
    transform: translateX(0);
  }
  10% {
    opacity: .859;
    transform: translateX(0);
  }
  15% {
    opacity: .9766;
    transform: translateX(0);
  }
  20% {
    opacity: .81364;
    transform: translateX(0);
  }
  25% {
    opacity: .94477;
    transform: translateX(0);
  }
  30% {
    opacity: .8811;
    transform: translateX(0);
  }
  35% {
    opacity: .8416;
    transform: translateX(0);
  }
  40% {
    opacity: .835;
    transform: translateX(0);
  }
  45% {
    opacity: .82054;
    transform: translateX(0);
  }
  50% {
    opacity: .89452;
    transform: translateX(0);
  }
  55% {
    opacity: .89997;
    transform: translateX(0);
  }
  60% {
    opacity: .8872;
    transform: translateX(0);
  }
  65% {
    opacity: .929;
    transform: translateX(0);
  }
  70% {
    opacity: .8732;
    transform: translateX(0);
  }
  75% {
    opacity: .8512;
    transform: translateX(1px);
  }
  80% {
    opacity: .84701;
    transform: translateX(0);
  }
  85% {
    opacity: .85952;
    transform: translateX(0);
  }
  90% {
    opacity: .86553;
    transform: translateX(0);
  }
  95% {
    opacity: .91372;
    transform: translateX(0);
  }
  100% {
    opacity: .8536;
    transform: translateX(1px);
  }
}

@keyframes flicker {
  0% {
    opacity: .86139;
    transform: translateX(0);
  }
  5% {
    opacity: .893;
    transform: translateX(0);
  }
  10% {
    opacity: .859;
    transform: translateX(0);
  }
  15% {
    opacity: .9766;
    transform: translateX(0);
  }
  20% {
    opacity: .81364;
    transform: translateX(0);
  }
  25% {
    opacity: .94477;
    transform: translateX(0);
  }
  30% {
    opacity: .8811;
    transform: translateX(0);
  }
  35% {
    opacity: .8416;
    transform: translateX(0);
  }
  40% {
    opacity: .835;
    transform: translateX(0);
  }
  45% {
    opacity: .82054;
    transform: translateX(0);
  }
  50% {
    opacity: .89452;
    transform: translateX(0);
  }
  55% {
    opacity: .89997;
    transform: translateX(0);
  }
  60% {
    opacity: .8872;
    transform: translateX(0);
  }
  65% {
    opacity: .929;
    transform: translateX(0);
  }
  70% {
    opacity: .8732;
    transform: translateX(0);
  }
  75% {
    opacity: .8512;
    transform: translateX(1px);
  }
  80% {
    opacity: .84701;
    transform: translateX(0);
  }
  85% {
    opacity: .85952;
    transform: translateX(0);
  }
  90% {
    opacity: .86553;
    transform: translateX(0);
  }
  95% {
    opacity: .91372;
    transform: translateX(0);
  }
  100% {
    opacity: .8536;
    transform: translateX(1px);
  }
}

@keyframes particleDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(-28px, -18px, 0);
  }
  50% {
    transform: translate3d(-56px, -36px, 0);
  }
  75% {
    transform: translate3d(-24px, -10px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes particleDriftSlow {
  0% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(20px, -26px, 0);
  }
  50% {
    transform: translate3d(44px, -62px, 0);
  }
  75% {
    transform: translate3d(16px, -24px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes particleWave {
  0% {
    transform: translate3d(0, 0, 0) scale(1.01);
    background-position: 0% 0%, 24% 0%, 54% 0%, 0 0;
  }
  35% {
    transform: translate3d(-6px, -4px, 0) scale(1.03);
    background-position: 4% -4%, 28% -3%, 58% -5%, 0 0;
  }
  70% {
    transform: translate3d(-12px, -7px, 0) scale(1.04);
    background-position: 8% -8%, 34% -7%, 64% -9%, 0 0;
  }
  100% {
    transform: translate3d(-16px, -10px, 0) scale(1.05);
    background-position: 12% -12%, 40% -10%, 70% -13%, 0 0;
  }
}

@keyframes particleFlow {
  0% {
    transform: translate3d(0, 0, 0);
    background-position: 0% 100%, 0% 100%, 0% 100%;
  }
  33% {
    transform: translate3d(-8px, -4px, 0);
    background-position: 5% 97%, 9% 96%, 7% 97%;
  }
  66% {
    transform: translate3d(-16px, -8px, 0);
    background-position: 12% 92%, 18% 91%, 15% 92%;
  }
  100% {
    transform: translate3d(-24px, -12px, 0);
    background-position: 18% 87%, 26% 86%, 22% 87%;
  }
}