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

button {
  box-sizing: border-box;
  background: #333;
  color: #fff;
  margin: 0;
  padding: 0.5rem 1rem;
  border: 0;
  outline: 0;
  border: 1px solid #222;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  text-shadow: rgba(0, 0, 0, .4) 1px 2px;
}

button.primary, a.button.primary {
  background: #393;
}

button:disabled {
  opacity: 0.5;
}

canvas {
  vertical-align: middle;
}

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

body.pointerlock #cursor.enabled {
  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;
}

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

body.pointerlock #info {
  display: none;
}

#info > a {
  color: inherit;
}

#enterVR {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translate(-50%, 0);
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  text-transform: uppercase;
  box-shadow: 0 1px 6px rgba(0,0,0,.117647), 0 1px 4px rgba(0,0,0,.117647);
}

#enterVR > svg {
  margin-right: 0.75rem;
  filter: drop-shadow(1px 2px rgba(0, 0, 0, .4));
}

body.pointerlock #enterVR {
  display: none;
}

#light, #rain, .tools {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  opacity: 0.8;
  display: none;
}

#light.enabled, #rain.enabled, .tools {
  display: flex;
}

#rain.light {
  right: 8rem;
}

body.pointerlock #light, body.pointerlock #rain, body.pointerlock .tools {
  display: none;
}

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

#rain > svg {
  border-radius: 16px;
}

#rain.active > svg {
  background: #55a;
}

#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;
}

.tools > button {
  margin: 0 0.125rem;
}

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

#renderer {
  position: relative;
  width: 100vw;
  height: 100vh;
  cursor: pointer;
}

#ribbon {
  width: 12.1em;
  height: 12.1em;
  position: absolute;
  overflow: hidden;
  top: 0;
  right: 0;
  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);
}
