@import url("https://fonts.googleapis.com/css2?family=Staatliches&display=swap");
@import url("https://fonts.googleapis.com/css2?family=VT323&display=swap");

* {
  padding: 0;
  margin: 0;
  font-family: "Staatliches", cursive;
}

/*Game*/
#game {
  width: 400px;
  height: 500px;
  margin: auto;
  overflow: hidden;
  position: relative;
  background-image: url("./images/game_background.png");
  background-size: 200%;
  background-repeat: no-repeat;
  background-position: bottom;
}

/*Top Flower*/
#block-top {
  width: 50px;
  height: 100px;
  background-image: url("./images/flower_top.png");
  background-repeat: no-repeat;
  background-position: bottom;
  position: absolute;
  top: 0;
  left: 400px;
}

/*Bottom FLower*/
#block-bottom {
  width: 50px;
  height: 250px;
  background-image: url("./images/flower_bottom.png");
  background-repeat: no-repeat;
  background-position: top;
  position: absolute;
  left: 400px;
  bottom: 0;
}

/*Animation right to left*/
@keyframes block {
  0% {
    left: 400px;
  }
  100% {
    left: -50px;
  }
}

/*Animate the flowers when enabled*/
.animate {
  animation: block 4s infinite linear;
}

/*Transparent hole between flowers*/
#hole {
  width: 50px;
  height: 150px;
  position: absolute;
  top: 100px;
  left: 400px;
}

/*Player 1*/
#player1 {
  width: 20px;
  height: 20px;
  background-image: url("./images/bee_pink.png");
  background-size: 20px;
  background-repeat: no-repeat;
  background-position: top;
  position: absolute;
  top: 200px;
  left: 40px;
  border-radius: 50px;
}
/*Player 2*/
#player2 {
  width: 20px;
  height: 20px;
  background-image: url("./images/bee_yellow.png");
  background-size: 20px;
  background-repeat: no-repeat;
  background-position: top;
  position: absolute;
  top: 200px;
  left: 140px;
  border-radius: 50px;
}

/*Animation for player 1 bee on waiting screen*/
@keyframes fly {
  0% {
    top: 200px;
  }
  50% {
    top: 300px;
  }
  100% {
    top: 200px;
  }
}
/*Animation for player 2 bee on waiting screen*/
@keyframes fly2 {
  0% {
    top: 300px;
  }
  50% {
    top: 200px;
  }
  100% {
    top: 300px;
  }
}

/*Animate the player 1 bee when enabled*/
.fly {
  animation: fly 2s infinite cubic-bezier(0.65, 0, 0.35, 1);
}
/*Animate the player 2 bee when enabled*/
.fly2 {
  animation: fly2 2s infinite cubic-bezier(0.34, 1.56, 0.64, 1);
}

/*Player 1 zone tap to jump*/
#player1-zone {
  height: 100%;
  width: 50%;
  position: absolute;
  left: 0;
  display: flex;
  align-items: flex-end;
}
/*Player 2 zone tap to jump*/
#player2-zone {
  height: 100%;
  width: 50%;
  position: absolute;
  right: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

/*Disable clicking on count and flowers to prevent from blocking the jumping ability*/
#count,
#block-top,
#block-bottom {
  pointer-events: none;
}

/*Game count*/
#count {
  width: 100%;
  top: 75px;
  position: absolute;
  text-align: center;
  color: white;
  font-size: 44px;
  -webkit-text-stroke: 3px black;
}

/*Interface below the game*/
#playerresult,
#actions,
#title {
  width: 400px;
  margin: auto;
  display: flex;
  justify-content: space-around;
}

/*Flappy Bees title*/
#title {
  text-align: center;
  margin-top: 20px;
}
#title h1 {
  font-family: "VT323", monospace;
  font-size: 48px;
  background-image: url("./images/game_background.png");
  background-size: cover;
  background-position: bottom;
  background-repeat: repeat;
  background-clip: content-box;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/*Player count*/
#playerresult > span {
  display: flex;
  width: 100%;
  justify-content: space-around;
}
/*Player picture*/
#playerresult img {
  position: absolute;
  top: 30px;
  width: 100px;
}
/*Player name*/
.playername {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/*Play button*/
#play {
  margin-top: 30px;
  padding: 14px 48px;
  border-radius: 14px;
  border: black 4px solid;
  background-image: url("./images/game_background.png");
  background-size: 200%;
  background-repeat: no-repeat;
  background-position: bottom;
  color: white;
  cursor: pointer;
}
