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

body {
  font-family: "Press Start 2P", cursive;
  text-align: center;
  background: white;
}


/* Hyper Flapper Header Text */
h1 {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: 5;
  margin-top: 40px;
  font-size: 60px;
  color: #313131;
  font-weight: bold;
  -webkit-animation: colorchange 20s infinite alternate;
}

@-webkit-keyframes colorchange {
  0% {
    color: blue;
  }
  10% {
    color: #8e44ad;
  }
  20% {
    color: #1abc9c;
  }
  30% {
    color: #d35400;
  }
  40% {
    color: blue;
  }
  50% {
    color: #34495e;
  }
  60% {
    color: blue;
  }
  70% {
    color: #2980b9;
  }
  80% {
    color: #f1c40f;
  }
  90% {
    color: #2980b9;
  }
  100% {
    color: pink;
  }
}


/* Game Board */
#board {
  background-image: linear-gradient(white 10%, rgb(255, 157, 0));
  border: 1px dashed;
}


/* Menu */
.modal {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  overflow-y: none;
}

.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fefefe;
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 60px;
  border: 1px solid #888;
  width: 80%;
  max-width: 440px;
  text-align: center;
  background-color: rgba(0, 0, 0, 1);
}

h2 {
  color: white;
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 20px;
}

#userScore {
  display: none;
  color: white;
  font-size: 24px;
  margin: 10px;
  font-weight: 500;
}

#scoreForm {
  display: none;
  align-items: center;
  justify-content: center;
}

#playerName {
  padding: 9px;
  border: 2px solid #4caf50;
  border-radius: 5px;
  max-width: 136px;
  font-size: 14px;
}

#scoreSubmitted {
  padding: 12px 0 12px 0;
  color: #fff;
}


/* Buttons */
.modal-content button {
  padding: 12px 24px;
  margin: 10px;
  cursor: pointer;
  color: white;
  border: none;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  transition-duration: 0.4s;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

#playAgainBtn,
#leaderboardBtn {
  width: 200px;
  background-color: #888686;
}

#playAgainBtn:hover,
#leaderboardBtn:hover {
  background-color: #bbb6b6;
}

#submitBtn {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #4caf50;
  color: white;
  font-size: 16px;
  transition-duration: 0.4s;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  margin-right: 2px;
}

#submitBtn:hover {
  background-color: #45a049;
}


/* Stick Figures */
.stick-figure {
  width: 100px;
  height: 200px;
  position: absolute;
  animation: dance 1s infinite alternate;
}

.stick-figure img.face {
  position: absolute;
  top: -16%;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 80px;
}

.stick-figure div {
  position: absolute;
  background-color: #000;
}

.left-stick {
  left: 5%;
  top: 10%;
}

.right-stick {
  right: 5%;
  top: 10%;
}

.stick-figure-body {
  top: 40px;
  left: 49%;
  transform: translateX(-50%);
  width: 29px;
  height: 70px;
}

.left-leg,
.right-leg {
  width: 6px;
  height: 50px;
}

.left-leg {
  top: 110px;
  left: 50%;
  transform-origin: top right;
  transform: rotate(-20deg);
  animation: legDance 1s infinite alternate;
}

.right-leg {
  top: 110px;
  right: 50%;
  transform-origin: top left;
  transform: rotate(20deg);
  animation: legDance 1s infinite alternate-reverse;
}

.left-arm,
.right-arm {
  width: 5px;
  height: 50px;
}

.left-arm {
  top: 50px;
  left: 50%;
  transform-origin: top right;
  transform: rotate(-45deg);
  animation: armDance 1s infinite alternate-reverse;
}

.right-arm {
  top: 50px;
  right: 50%;
  transform-origin: top left;
  transform: rotate(45deg);
  animation: armDance 1s infinite alternate;
}

@keyframes dance {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes legDance {
  0%,
  100% {
    transform: rotate(-30deg);
  }
  50% {
    transform: rotate(30deg);
  }
}

@keyframes armDance {
  0%,
  100% {
    transform: rotate(-50deg);
  }
  50% {
    transform: rotate(50deg);
  }
}

/* Media Queries */
@media only screen and (max-width: 767px) {
  .stick-figure {
    display: none;
  }
  h1 {
    font-size: 40px;
  }
}