:root {
  --area-width: 80vw;
  --area-height: 70vh;
  --footer-height: 3vh;
  --text-size: 1.4em;
}
* {
  margin: 0;
  padding: 0;
}
body {
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Standard syntax */
  caret-color: transparent;
  transform-origin: center;
  background: fixed;
  color: rgb(255, 255, 255);
  background-color: rgb(79, 104, 108);
  text-align: justify;
}
p {
  font-size: var(--text-size);
}
h1,
h2 {
  text-align: center;
}
#menu {
  height: fit-content;
  width: 60%;
  padding: 50px;
  margin: auto;
  display: block;
  background-color: rgb(23, 82, 109);
  border-radius: 20px;
  margin-bottom: calc(var(--footer-height) + 2vh);
}
.menuBtn {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

#menu button:hover,
#options button:hover {
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 10px 10px 20px rgb(0, 0, 0);
}
#closeBtn {
  position: absolute;
  top: -50px;
  right: -25px;
  color: rgb(255, 255, 255);
  font-size: calc(var(--text-size) + 2em);
}

.message {
  position: relative;
  font-size: var(--text-size);
  height: fit-content;
  text-align: center;
  z-index: 1;
  margin: auto;
  padding: 50px;
  margin-top: 10vh;
  box-shadow: rgb(137, 137, 137) 0px 0px 200px;
  background-color: rgb(23, 82, 109);
  border-radius: 20px;
}

#msgOverlay {
  position: fixed;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  display: none;
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.571);
}
.Displaying {
  display: block;
}

#options {
  position: fixed;
  display: flex;
  height: auto;
  align-items: center;
  width: 100%;
  justify-content: center;
  gap: 10vw;
  bottom: 5vh;
}
button {
  font-size: calc(var(--text-size) - 0.4em);
  border: 2px solid rgba(255, 255, 255, 0.636);
  background-color: rgb(38, 120, 142);
  border-radius: 10px;
  padding: 5px;

  margin-bottom: 0px;
  color: white;
}
.on {
  background-color: rgb(5, 184, 233);
}

.area {
  position: relative;
  height: var(--area-height);
  width: var(--area-width);
  background-color: black;
  margin: auto;
  z-index: -1;
  top: 10vh;
  background-image: url(./Assets/space.jpg);
  background-repeat: repeat-x;
  background-size: auto 100%;
  animation: slideBackground 20s linear infinite;
}
#navBtn {
  display: none;
  position: fixed;
  align-items: center;
  justify-content: center;
  background-color: red;
  height: 6px;
  width: 100%;
  bottom: 14vh;
}
#navVert {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 10px;
  left: 4vw;
}
#navHorz {
  display: flex;
  gap: 10px;
  position: fixed;
  right: 4vw;
}
.virtualController {
  background-image: url(./Assets/arrowW.png);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  height: 55px;
  width: 55px;
}

#down {
  transform: rotate(180deg);
}
#left {
  transform: rotate(-90deg);
}
#right {
  transform: rotate(90deg);
}
#game {
  display: none;
}
.score,
.highScore {
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  font-size: var(--text-size);
  padding: 20px;
  border: 3px solid white;
  border-radius: 20px;
}
#scoreVal,
#hiScorVal {
  text-align: center;
}
.score {
  position: fixed;
  left: 5vw;
  top: 5vh;
}
.highScore {
  position: fixed;
  right: 5vw;
  top: 5vh;
}
@keyframes slideBackground {
  0% {
    background-position: 0% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.paused {
  animation-play-state: paused !important;
}
#ship {
  background-image: url(./Assets/spaceship.png);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 95px;
  height: 125px;
  transform: rotate(90deg);
  display: block;
  border-radius: 50%;
}
#enemy {
  height: 99px;
  position: absolute;
  transition: 4s;
}
.asteroids,
.coins {
  position: absolute;
  transform: translate(-50%, -50%);
}
.asteroids {
  height: 50px;
  animation: slider 7s linear 1;
}
.coins {
  height: 20px;
  animation: slider 5s linear 1;
}

footer {
  position: fixed;
  bottom: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: calc(var(--text-size) - 0.6em);
  background-color: rgb(66, 113, 150);
  width: 100%;
  height: var(--footer-height);
  z-index: 2;
}
a {
  color: black;
  font-weight: bold;
  text-decoration: none;
}
@keyframes slider {
  0% {
    transform: translateX(-2);
    opacity: 0%;
  }
  6% {
    opacity: 100%;
  }
  94% {
    opacity: 100%;
  }
  99% {
    opacity: 4%;
  }
  100% {
    transform: translateX(calc(-1 * var(--area-width)));
    opacity: 0%;
  }
}
@media only screen and (max-width: 800px) {
  .area {
    position: fixed;
    top: 20vh;
    margin-left: 10vw;
    height: 60vh;
    animation: slideBackground 20s linear infinite;
  }
  #options {
    position: fixed;
    top: 16vh;
    right: 1vw;
    transform: rotate(90deg);
    width: 32px;
  }

  #ship {
    width: 75px;
    height: 105px;
  }
  .asteroids img {
    width: 25px;
    height: 25px;
  }
  .score,
  .highScore {
    margin-top: 5vh;
    font-size: 1.2em;
  }

  @keyframes slider {
    0% {
      transform: translateX(-2);
      opacity: 0%;
    }
    6% {
      opacity: 100%;
    }
    94% {
      opacity: 100%;
    }
    99% {
      opacity: 4%;
    }
    100% {
      transform: translateX(calc(-1 * 100vw));
      opacity: 0%;
    }
  }
}
