@import url("https://fonts.googleapis.com/css2?family=Albert+Sans&display=swap");

* {
  margin: 0px;
  padding: 0px;
  font-family: "Albert Sans", sans-serif;
}

body {
  overflow: hidden;
}

.gameContainer {
  background-image: url("bg.png");
  height: 100vh;
  width: 100%;
  background-size: 100vw 100vh;
}

#gameStatus {
  visibility: hidden;
  right: 45px;
  color: #8d1c1c;
  font-size: 3.8rem;
  position: relative;
  top: 45px;
  text-align: center;
}

.dino {
  background-image: url("dino.png");
  background-repeat: no-repeat;
  background-size: cover;
  height: 80px;
  width: 160px;
  position: absolute;
  bottom: 0px;
  left: 50px;
}

#scoreBoard {
  position: absolute;
  border: 3px solid #9d373d;
  padding: 10px;
  top: 50px;
  right: 45px;
  color: #8d1c1c;
  font-size: 1.3rem;
  border-radius: 25px;
  font-weight: bold;
}

.obstacle {
  background-image: url("dragon.png");
  background-repeat: no-repeat;
  background-size: cover;
  height: 82px;
  width: 125px;
  position: absolute;
  bottom: 0px;
  left: 50vw;
}

.animateDino {
  animation: dinoJump 0.5s linear;
}

.animateObstacle {
  animation: moveObstacle 4s linear infinite;
}

@keyframes dinoJump {
  0% {
    bottom: 0px;
  }
  50% {
    bottom: 280px;
  }
  100% {
    bottom: 0px;
  }
}

@keyframes moveObstacle {
  0% {
    left: 100vw;
  }

  100% {
    left: -10vw;
  }
}

@media screen and (max-width: 1000px) {
  #gameStatus {
    font-size: 3rem;
    right: 35px;
    top: 43px;
  }

  .dino {
    height: 70px;
    width: 140px;
    left: 40px;
  }

  #scoreBoard {
    padding: 8px;
    top: 40px;
    right: 35px;
    font-size: 1.1rem;
    border-radius: 20px;
  }

  .obstacle {
    height: 72px;
    width: 115px;
    left: 60vw;
  }
}

@media screen and (max-width: 700px) {
  #gameStatus {
    font-size: 2.3rem;
    top: 43px;
  }

  .dino {
    height: 60px;
    width: 120px;
    left: 40px;
  }

  #scoreBoard {
    padding: 6px;
    top: 40px;
    right: 25px;
    font-size: 0.9rem;
  }

  .obstacle {
    height: 62px;
    width: 95px;
    left: 60vw;
  }
}

@media screen and (max-width: 500px) {
  #gameStatus {
    font-size: 2.2rem;
    top: 70px;
    left: 0px;
  }

  .dino {
    height: 50px;
    width: 100px;
    left: 20px;
  }

  #scoreBoard {
    top: 20px;
    right: 40vw;
    font-size: 0.8rem;
  }

  .obstacle {
    height: 50px;
    width: 75px;
  }
}

@media screen and (max-width: 350px) {
  #gameStatus {
    font-size: 2rem;
    top: 65px;
    left: 0px;
  }

  .dino {
    height: 35px;
    width: 68px;
    left: 15px;
  }

  #scoreBoard {
    padding: 4px;
    right: 35vw;
    font-size: 0.6rem;
  }

  .obstacle {
    height: 33px;
    width: 50px;
  }
}

@media screen and (max-width: 250px) {
  #gameStatus {
    font-size: 1.5rem;
  }

  .dino {
    height: 25px;
    width: 50px;
  }

  #scoreBoard {
    right: 35vw;
    font-size: 0.5rem;
  }

  .obstacle {
    height: 23px;
    width: 35px;
  }
}
