html, body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  background: #010101;
}

canvas {
  max-width: 100%;
  max-height: 100%;
  background: #000;
  position: fixed;
}

@media screen and (orientation:portrait) {
  canvas {
    /* center vertically */
    margin-top: calc(50vh - 50vw);
    width: 100%;
  }
}

@media screen and (orientation:landscape) {
  canvas {
    width: 100%;
    height: 100%;
  }

  body.polar canvas {
    /* center horizontally */
    margin-left: calc(50vw - 50vh);
    width: 100vh;
  }
}

#buttons {
  position: fixed;
  left: 0;
  bottom: 0;
}

button {
  cursor: pointer;
  background: #444;
  color: #fff;
  padding: 1em;
  font-family: monospace;
  border: none;
  outline: none;
}

#stats:not(:empty) {
  position: fixed;
  left: 0;
  top: 0;
  background: #000;
  color: #0f0;
  padding: 1em;
  font-family: monospace;
}

#error:not(:empty) {
  position: fixed;
  left: 0;
  bottom: 0;
  background: #f00;
  color: #fff;
  padding: 1em;
  font-family: monospace;
}

.selected-area {
  position: fixed;
  outline: 1px solid #444;
  background: #080;
  opacity: 0.2;
}

#vtimebar {
  position: fixed;
  visibility: hidden;
}

body:not(.polar) #vtimebar {
  width: 1px;
  height: 100%;
  top: 0;
  background: #0f0;
}

body.polar #vtimebar {
  left: 50vw;
  top: 50vh;
  transform: translateX(-50%) translateY(-50%);
  border: 1px solid #0f0;
  border-radius: 50%;
}
