@import url('https://fonts.googleapis.com/css2?family=New+Amsterdam&display=swap');
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.stars,
.twinkling {
  position: absolute;
  display: block;
  height: 100%;
  width: 100%;
}

.stars {
  background: url("../assets/bg/stars.png") repeat;
  animation: moving-stars 8000s linear infinite;
}

.twinkling {
  background: transparent url("../assets/bg/twinkling.png") repeat;
  z-index: 2;
  animation: moving-twinkle 300s linear infinite;
}

.scoreboard {
  position: absolute;
  width: 100%;
  height: 7%;
  z-index: 6;
  font-family: "New Amsterdam", sans-serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.05rem;
  font-size: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  color: #fff;
}

.textbox,
.healthbar {
  display: flex;
  align-items: center;
}

.textbox {
  width: 30%;
  height: 90%;
  justify-content: space-evenly;
}

.healthbar {
  width: 30%;
  height: 90%;
}

.hpbar {
  width: 70%;
  height: 50%;
  margin-left: 1rem;
  border: 3.5px solid #fff;
  background-color: transparent;
  overflow: hidden;
}

.currentHealth {
  height: 100%;
  transition: width 0.3s ease-in-out;
}

.game {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 96%;
  width: 92%;
  position: absolute;
  z-index: 3;
}

.levelDisplay {
  position: absolute;
  top: 10%;
  width: 80%;
  height: 50%;
  opacity: 0;
  font-family: "VT323", monospace;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 16rem;
  font-weight: 400;
  font-style: normal;
  flex-direction: column;
  transition: opacity 2s ease-in-out;
}

.levelDisplay>br {
  display: block;
  content: "";
  margin-top: 3rem;
}

.buttonbox {
  width: 100%;
  height: 20%;
  position: absolute;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.choice-btn {
  height: 4rem;
  width: 8rem;
  background-color: transparent;
  border: 4px solid #ffffffcd;
  color: #fff;
  font-family: "VT323", monospace;
  font-size: 3rem;
  font-weight: 400;
  font-style: normal;
  cursor: pointer;
  transition: color 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

.choice-btn:hover {
  color: #000;
  background-color: #fff;
}

.space-ship {
  position: absolute;
  /* transition: left 0.05s linear; */
}

.bullet {
  background-color: yellow;
  height: 1.5rem;
  width: 0.25rem;
  position: absolute;
  /* transition: left top 0.05s linear; */
}

.bullet-enemy {
  background-color: red;
  height: 1.5rem;
  width: 0.2rem;
  position: absolute;
  /* transition: top 0.05s linear;  */
}

.enemy {
  display: inline-block;
  width: 912px;
  /*height: 40%; */
  position: absolute;
  z-index: 4;
  top: 7%;
  transition: top 0.005s linear, left 0.015s linear;
}

.alien-container {
  display: inline-block;
  margin: 0.5rem;
  height: 60px;
  aspect-ratio: 1;
}

.alien-img {
  height: 60px;
  aspect-ratio: 1;
}

.endline {
  position: absolute;
  height: 0.2rem;
  width: 100vw;
  background-color: rgba(255, 0, 0, 0.2);
  z-index: 7;
  bottom: 7%;
}

@keyframes moving-stars {
  from {
    background-position: 0px 0px;
  }

  to {
    background-position: 0px 1000000px;
  }
}

@keyframes moving-twinkle {
  from {
    background-position: 0px 0px;
  }

  to {
    background-position: 10000px 0px;
  }
}