body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  font-family: 'Montserrat', sans-serif;
}
.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* width: 100%; */
  text-align: center;
  padding: 1em;
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  visibility: hidden;
}
.header a {
  color: whitesmoke;
  text-decoration: none;
  z-index: 200;
}
.header .input {
  display: flex;
  flex-flow: column;
  margin: 0.5em;
  width: 250px;
  position: absolute;
  right: 0;
  top: 0;
}
/*  PLAYER GUI  */
.player-robot-interface {
  overflow: hidden;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  /* position: relative;
  width: 100%;
  height: 100%; */
  /* border: 1px solid red; */
}
.player-robot-interface .up{
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  /* align-self: flex-start; */
  /* border: 1px solid black; */
}
.player-robot-interface .up .compass{
  position: absolute;
  top: 0;
  background-image: url('../img/compass-ruler.svg');
  width: 3600px;
  height: 60px;
  background-position: 0 0;
  background-repeat: repeat-x;
}
.player-robot-interface .bottom{
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  margin: 0.75rem;
  font-size: 3rem;
  color: #ffffffbb;
  /* align-self: flex-end; */
  /* border: 1px solid yellow; */
}
.player-robot-interface .health{
  /* position: absolute; */
  display: inline-block;
  top: 0;
  left: 0;
}
.player-robot-interface .health .bar{
  padding: 0.1em;
  height: 1rem;
  background-color: #777777;
  position: absolute;
  bottom: 120%;
  width: 100px;
  /* left: 0; */
}
.player-robot-interface .health .bar .line{
  background-color: #45da00;
  position: absolute;
  height: 1rem;
  /* left: 0.25em; */
  /* top: 0.25em; */
  width: 100% ;
  transition: width 0.25s ease-out;
  /* left: 0; */
}
.player-robot-interface .speed{
  position: absolute;
  top: 0;
  left: calc( 50% - 120px );
}
/* WARNING SCREEN */
.warning-screen {
  position: absolute;
  top: 0;
  right: 0;
  /* bottom: 0; */
  left: 0;
  padding: 1em 2em;
  background-color: #00000050;
  visibility: hidden;
}
.warning-screen .title{
  margin: 0 auto;
  text-align: center;
  font-size: 3em;
  font-weight: 700;
  color: red;
}
.warning-screen .content{
  margin: 0.5em auto;
  text-align: center;
  font-size: 1.5em;
  font-weight: 100;
  color: white;
}
.warning-screen #distance{
  font-size: 2rem;
  font-weight: 700;
  color: white;
}
.restart-screen {
  display: flex;
  justify-content: center;
  align-items: center;

  visibility: hidden;
  position: absolute;
  top: 0;
  right: 0;
  /* bottom: 0; */
  left: 0;
  height: 100vh;
  background-color: #790000aa;
  z-index: 9999;
}
.restart-screen #restart-btn{
  padding: 1em 2em;
  color: white;
  background-color: #a80000;
  font-size: 2em;
  text-align: center;
  margin: auto;
}


.show {
  visibility: visible;
  z-index: 9999;
}

/*  LOADER */
#loading-screen {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  opacity: 1;
  transition: 1s opacity;
}

#loading-screen.fade-out {
    opacity: 0;
}
#loader {
    display: block;
    position: relative;
    left: 50%;
    top: 50%;
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #9370DB;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
}
#loader:before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #BA55D3;
    -webkit-animation: spin 3s linear infinite;
    animation: spin 3s linear infinite;
}
#loader:after {
    content: "";
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #FF00FF;
    -webkit-animation: spin 1.5s linear infinite;
    animation: spin 1.5s linear infinite;
}
@-webkit-keyframes spin {
    0%   {
        -webkit-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}
@keyframes spin {
    0%   {
        -webkit-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}