* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: white;
  font-family: "Joti One", cursive;
  /* font-family: "Audiowide", cursive; */
  /* font-family: 'Jim Nightshade', cursive; */
}

html {
  background-color: black;
}

body {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#game-board {
  width: 95%;
  height: 95%;
  background-image: url("./images/stars.gif");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-blend-mode: soft-light;
  background-color: rgb(59, 59, 59);
  box-shadow: 0 0 30px 10px chartreuse;
  border-radius: 30px;
}

#health-bar {
  position: absolute;
  top: 72vh;
  left: 8vw;
  font-size: 25pt;
  color: rgb(251, 255, 0);
  text-shadow: 2px 3px 2px rgb(106, 14, 192), -2px -3px 10px black,
    4px 6px 15px black;
}

#health-bar:hover {
  z-index: 2;
  transform: scale(1.2);
}

header {
  width: 100%;
  max-width: 100%;
  height: 20%;
  max-height: 20%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

@keyframes title-wobble {
  0% {
    transform: scale(1.5);
  }
  33% {
    transform: translateX(2px) translateY(2px) scale(1.7);
  }
  66% {
    transform: translateX(-2px) rotate(-1deg) scale(1.7);
  }
  100% {
    transform: translateX(0px) scale(1.7);
  }
}

h1 {
  font-size: 40pt;
  color: chartreuse;
  text-shadow: 2px 3px 2px red, -1px -1px 2px red, -2px -3px 10px black,
    4px 6px 15px black;
  animation-name: title-wobble;
  animation-duration: 0.2s;
  animation-iteration-count: 3;
  animation-delay: 1.5s;
}

h1:hover {
  position: relative;
  z-index: 2;
  transform-origin: top;
  transform: scale(1.2);
}

h2 {
  font-size: 25pt;
  font-style: italic;
  color: black;
  text-shadow: 1px 2px 2px red, -1px -1px 2px chartreuse, -1px -2px 8px black,
    3px 5px 10px black;
}

h2:hover {
  position: relative;
  z-index: 2;
  transform-origin: top;
  transform: scale(1.2);
}

main {
  width: 100%;
  height: 80%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@keyframes mother-ship-wobble {
  0% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(5px);
  }
  75% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
}

#invasion {
  width: 100%;
  height: 70%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  animation-name: mother-ship-wobble;
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-direction: alternate-reverse;
  text-align: center;
}

#leader {
  width: 100%;
  height: fit-content;
  display: flex;
  justify-content: center;
  align-items: center;
  animation-name: mother-ship-wobble;
  animation-duration: 3.4s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-direction: alternate-reverse;
}

#mother-ship {
  width: 320px;
  height: 6em;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  font-size: 20pt;
  border-radius: 30px;
  margin: 10px 10px 5vh 10px;
  padding: 40px 40px 0 40px;
  color: chartreuse;
  text-shadow: 1px 2px 2px red, -1px -1px 2px red, -1px -1px 5px black,
    1px 1px 5px black;
  background-image: url("./images/mother-ship.png");
  background-position: top;
  background-size: cover;
  background-repeat: no-repeat;
}

#mother-ship:hover {
  text-shadow: 0px 8px 5px red, 0px -8px 5px red, 8px 0px 5px red,
    -8px 0px 5px red;
}

@keyframes alien-wobble {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(2px);
  }
  75% {
    transform: translateX(-2px);
  }
  100% {
    transform: translateX(0);
  }
}

#swarm {
  width: 80%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  animation-name: alien-wobble;
  animation-duration: 1s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

#alien {
  width: 120px;
  height: 3.5em;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  color: chartreuse;
  text-shadow: 1px 2px 2px red, -1px -1px 2px red, -1px -1px 5px black,
    1px 1px 5px black;
  font-size: 13pt;
  border-radius: 10px;
  padding: 10px 10px 0 10px;
  margin: 10px;
  background-image: url("./images/alien.png");
  background-position: center;
  background-size: cover;
}

#alien:hover {
  text-shadow: 0px 8px 5px red, 0px -8px 5px red, 8px 0px 5px red,
    -8px 0px 5px red;
}

#buttons {
  width: 100%;
  height: 30%;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

button {
  width: auto;
  height: auto;
  font-size: 15pt;
  background: none;
  border-radius: 15px;
  padding: 20px;
  cursor: pointer;
  font-family: "Audiowide", cursive;
  font-weight: bold;
  transition-duration: 0.1s;
}

button:hover {
  transform: scale(1.1);
}

.attack {
  border: red solid 3pt;
}

.attack:hover {
  box-shadow: 0px 0px 10px 2px red;
  text-shadow: 0px 6px 5px rgb(145, 145, 145);
}

.attack:active {
  transform: scale(1);
  box-shadow: none;
}

.heal {
  border: chartreuse solid 3pt;
}

.heal:hover {
  box-shadow: 0px 0px 10px 2px chartreuse;
  text-shadow: 0px 6px 5px rgb(145, 145, 145);
}

.heal:active {
  transform: scale(1);
  box-shadow: none;
}

#reset {
  top: 85vh;
  left: 5vw;
  font-size: 10pt;
  padding: 10px;
}

.hide {
  visibility: hidden;
  z-index: -1;
}

#game-end {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(133, 67, 5, 0.8);
}

#loser {
  font-size: 45pt;
  color: red;
  text-shadow: 0px 8px 5px black, 0px -8px 5px black, 8px 0px 5px black,
    -8px 0px 5px black;
  margin: 50px;
}

#winner {
  font-size: 45pt;
  color: chartreuse;
  text-shadow: 0px 8px 5px blueviolet, 0px -8px 5px blueviolet,
    8px 0px 5px blueviolet, -8px 0px 5px blueviolet;
  margin: 50px;
}

@media only screen and (max-width: 426px) {
  #game-board {
    width: 97%;
    height: 99%;
    border-radius: 10px;
  }

  #health-bar {
    position: absolute;
    width: 100vw;
    top: 77vh;
    left: 0;
    text-align: center;
    font-size: 12.5pt;
    color: rgb(251, 255, 0);
    text-shadow: 2px 3px 2px rgb(106, 14, 192), -2px -3px 10px black,
      4px 6px 15px black;
  }
  main {
    width: 100%;
    height: 80%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }
  #invasion {
    width: 100%;
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    animation-name: mother-ship-wobble;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    animation-direction: alternate-reverse;
    text-align: center;
  }

  #mother-ship {
    width: 115px;
    height: 5em;
    font-size: 15pt;
    margin: 10px 10px 10px 10px;
    padding: 40px 40px 0 40px;
  }

  #swarm {
    width: 100%;
    height: 50vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    animation-name: alien-wobble;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
  }

  #alien {
    width: 75px;
    height: 32m;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    color: chartreuse;
    text-shadow: 1px 2px 2px red, -1px -1px 2px red, -1px -1px 5px black,
      1px 1px 5px black;
    font-size: 10pt;
    border-radius: 10px;
    padding: 5px 5px 0 5px;
    margin: 2px;
  }

  header {
    width: 100%;
    max-width: 100%;
    height: 10%;
    max-height: 20%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5px 5px 0px 5px;
  }

  h1 {
    font-size: 15pt;
  }

  h2 {
    font-size: 15pt;
  }

  #buttons {
    width: 95%;
    height: 10%;
    flex-wrap: wrap;
  }

  button {
    width: auto;
    height: auto;
    font-size: 8pt;
    padding: 10px;
    margin: 5px;
  }

  #reset {
    top: 85vh;
    left: 8vw;
    font-size: 5pt;
    padding: 10px;
  }
}
