* {
  margin: 0;
  box-sizing: border-box;
}
body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  span.crosshair {
    display: block;
    position: absolute;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: black;
    border-radius: 50%;
  }
}
canvas#canvas {
  width: 100vw;
  height: 100vh;
  display: block;
  position: absolute;
}
div.stats {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 200px;
  min-height: 80px;
  background: rgba(0, 0, 0, 0.9);
  outline: 1px solid white;
  color: white;
  div.data {
    display: grid;
    grid-template-columns: auto auto auto auto;
    > span {
      padding: 5px;
      outline: 1px solid white;
    }
  }
}
div.popup {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5em;
  border: 5px solid white;
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  cursor: pointer;
  padding: 25px;
  pointer-events: none;
  opacity: 0.5;
  transition: all 0.3s linear;
  box-shadow: 0 0 2px 4px rgba(0, 0, 0, 0.5);
}
div.settings {
  background: rgba(0, 0, 0, 0.9);
  min-width: 200px;
  min-height: 200px;
  outline: 1px solid white;
  color: white;
  position: absolute;
  top: 0;
  right: 0;
  opacity: 0;
  transition: all 0.3s linear;
  h2 {
    text-align: center;
  }
  div.textinputs {
    * {
      margin: 5px;
      padding: 5px;
    }
    input[type="text"] {
      background: transparent;
      outline: 1px solid white;
      border: none;
      margin: 5px;
      color: white;
    }
  }
  div.controls {
    margin: 5px;
    padding: 5px;
    > div > div {
      display: flex;
      > * {
        margin: 3px;
      }
    }
  }
  div.savelocally {
    display: flex;
  }
}
div.movement {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 150px;
  height: 150px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  div.movementbutton {
    display: flex;
    width: 45px;
    height: 45px;
    margin: auto;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    font-weight: 900;
    background-color: rgba(255, 255, 255, 0.3);
    color: rgba(0, 0, 0, 0.5);
    box-shadow: 1px 1px 0 1px rgba(0, 0, 0, 0.5),
      -1px -1px 0 1px rgba(255, 255, 255, 0.5);
    user-select: none;
    transition: all 0.1s linear;
    &:active {
      background-color: rgba(0, 0, 0, 0.5);
    }
    &.none {
      box-shadow: none;
      background: transparent;
      touch-action: none;
    }
    &.active {
      background-color: rgba(0, 0, 0, 0.3);
    }
  }
}
div.menu {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 255, 255, 0.3);
  color: black;
  padding: 5px;
  font-size: 1.3em;
  z-index: 2;
}
div.keybinds {
  position: absolute;
  bottom: 0;
  left: 0;
  min-width: 200px;
  height: 300px;
  transition: all 0.3s ease-in-out;
  transform: translateY(270px);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  h3 {
    text-align: center;
  }
  div.keys {
    display: grid;
    grid-template-columns: 1fr 3fr;
  }
  * {
    padding: 3px;
  }
  &:hover {
    transform: translateY(0);
  }
}
