* {
  padding: 0;
  margin: 0;
}

:root {
  font-family: monospace;
  font-size: 1rem;

  color: white;
  background: black;
}

body {
  display: flex;
  flex-direction: column-reverse;
}

a {
  color: inherit;
}

button::before {
  display: inline;
  content: '> ';
}

button {
  font-family: inherit;
  font-size: inherit;
  font-weight: bold;
  color: inherit;
  text-align: start;

  background: none;
  border: none;
}

button:hover {
  text-decoration: underline;
  cursor: pointer;
}

button:disabled {
  color: gray;
}

button:disabled:hover {
  text-decoration: none;
  cursor: inherit;
}

dialog {
  width: 10rem;

  padding: 1rem;
  margin: auto;
  margin-top: 1rem;
  margin-right: 1rem;

  color: inherit;
  text-align: center;

  background-color: black;
  border: 1px solid white;
}

dialog input[type='range'],
dialog button {
  width: 100%;
}

dialog button {
  text-align: center;
}

dialog > div {
  margin: 0.5rem 0;
}

dialog > div > div {
  margin: 0.25rem 0;
}

.setting-toggle {
  display: flex;
  justify-content: space-between;
}

.setting-range > div {
  display: flex;
  justify-content: space-between;
}

#credits p {
  text-align: start;
}

#credits div > p:first-child {
  font-weight: bold;
}

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;

  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.05) 0px,
      rgba(255, 255, 255, 0.05) 1px,
      rgba(0, 0, 0, 0.15) 2px,
      rgba(0, 0, 0, 0.15) 3px
    ),
    linear-gradient(
      90deg,
      rgba(255, 0, 0, 0.03),
      rgba(0, 255, 0, 0.015),
      rgba(0, 0, 255, 0.03)
    ),
    radial-gradient(
      ellipse at center,
      transparent 60%,
      rgba(0, 0, 0, 0.25) 100%
    );

  animation: crt-flicker 5s infinite;
}

body {
  background: #000;
  filter: contrast(1.05) brightness(1.02) saturate(0.9);
}

@keyframes crt-flicker {
  0%,
  90%,
  95% {
    opacity: 1;
  }
  91% {
    opacity: 0.97;
  }
  92% {
    opacity: 0.98;
  }
  93% {
    opacity: 0.99;
  }
  94% {
    opacity: 0.96;
  }
  100% {
    opacity: 1.03;
  }
}
