body {
  background: #000;
  color: #fff;
  cursor: default;
  user-select: none;
  margin: 0;
  overflow: hidden;
  font-family: monospace;
}

canvas {
  vertical-align: middle;
}

#cursor {
  display: none;
  opacity: 0.3;
}

body.pointerlock #cursor {
  display: block;
}

#cursor::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 4px solid #fff;
  width: 8px;
  height: 8px;
  border-radius: 8px;
}

#help {
  position: absolute;
  top: 50%;
  left: 2rem;
  opacity: 0.8;
  transform: translate(0, -50%);
  text-align: center;
  display: none;
}

@keyframes help {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; } 
} 

body.pointerlock #help {
  display: block;
  animation-name: help;
  animation-duration: 6s;
  animation-fill-mode: both;
}

#help > div {
  margin: 2rem 0;
}

#help > div > svg {
  width: 80px;
  height: 80px;
  fill: #ddd;
}

#help .keys {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 126px;
}

#help .keys > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  background: #222;
  border: 1px solid #000;
  border-radius: 4px;
  width: 40px;
  height: 40px;
}

#help .keys > div:first-child {
  margin: 0 2rem;
}

#info {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  opacity: 0.4;
}

#info > a {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

#light {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  opacity: 0.8;
  display: flex;
}

body.pointerlock #light {
  display: none;
}

#light > svg {
  padding: 0.5rem 1rem;
  width: 24px;
  height: 24px;
  fill: #fff;
  background: #000;
  cursor: pointer;
  transition: background ease-out .3s;
}

#light > svg:nth-child(1) {
  border-radius: 16px 0 0 16px;
  padding-right: 0.75rem;
}

#light > svg:nth-child(2) {
  border-radius: 0 16px 16px 0;
  padding-left: 0.75rem;
}

#light.day > svg:nth-child(1) {
  background: #aa0;
  cursor: default;
}

#light.night > svg:nth-child(2) {
  background: #00a;
  cursor: default;
}

#loading {
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0.5;
  transform: translate(-50%, -50%);
  line-height: 1rem;
}

#renderer {
  cursor: pointer;
}

#ribbon {
  width: 12.1em;
  height: 12.1em;
  position: absolute;
  overflow: hidden;
  top: 0;
  right: 0;
  z-index: 9999;
  pointer-events: none;
  font-size: 13px;
  text-decoration: none;
  text-indent: -999999px;
}

body.pointerlock #ribbon {
  display: none;
}

#ribbon:hover, #ribbon:active {
  background-color: rgba(0, 0, 0, 0.0);
}

#ribbon:before, #ribbon:after {
  position: absolute;
  display: block;
  width: 15.38em;
  height: 1.54em;
  top: 3.23em;
  right: -3.23em;
  -webkit-box-sizing: content-box;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}

#ribbon:before {
  content: "";
  padding: .38em 0;
  background-color: #393;
  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.15)));
  background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
  background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
  background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
  background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
  -webkit-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
  -moz-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
  box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

#ribbon:after {
  content: attr(data-ribbon);
  color: #fff;
  font: 700 1em monospace;
  line-height: 1.54em;
  text-decoration: none;
  text-shadow: 0 -.08em rgba(0, 0, 0, 0.5);
  text-align: center;
  text-indent: 0;
  padding: .15em 0;
  margin: .15em 0;
  border-width: .08em 0;
  border-style: dotted;
  border-color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
