* {
  user-select: none;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#M {
  position: absolute;
  background: #000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

#M {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;

  width: 100vw;
  height: 66.66vw;
  background: #000;
}

@media (min-aspect-ratio: 3/2) {
  #M {
    width: 150vh;
    height: 100vh;
  }
}

#HUD {
  visibility: hidden;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 10px;
}

#T,
#L {
  font-family: monospace;
  padding: 15px;
  line-height: 70px;
  font-size: 60px;
  text-shadow: 1px 1px 3px #000;
}

#L {
  float: right;
  color: #afc;
  transition: opacity 1.2s linear;
  opacity: 0;
}

#L.a {
  opacity: 1;
}

#T {
  float: left;
  border-radius: 10px;
  width: 70px;
  text-align: center;
  transition: color 150ms linear, background-color 300ms linear;
  background: rgba(20, 0, 40, 0.3);
  border: 1px solid rgba(20, 0, 40, 0.3);
}

#T.x {
  background: red;
}

#c {
  padding: 0;
  display: block;
  visibility: hidden;
}

pre {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  color: #8fa;
  position: absolute;
  white-space: pre-wrap;
  font-size: 19px;
  padding: 1em;
}

#B {
  display: inline-block;
  background: #8fa;
  animation: B 1s linear infinite;
}

@keyframes B {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  51% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

#end {
  display: none;
}

.won #end {
  display: block;
}

.won #hud {
  display: none;
}

#intro {
  overflow: hidden;
  max-height: 0px;
  transition: max-height 1.2s linear;
}

#intro.a {
  max-height: 100%;
}

.started #intro {
  display: none;
}

.started #C,
.started #HUD {
  visibility: visible;
}

small {
  font-family: monospace;
  font-size: 13px;
  position: absolute;
  right: 0;
  bottom: 15px;
  color: #040;
}

.started small {
  display: none;
}
