
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}
.container{
    margin: auto;
    width: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    
    margin: 30px auto;

    width: 500px;
    position: relative;
}
.score-cont{
    position: absolute;
    left: 10px;
    top: 28px;
}

.game {
  width: 500px;
  height: 300px;
  border: 1px solid black;
  /* background-image: url(./background.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center; */
  /* margin-left: 10px; */

  /* display: flex;
    justify-content: space-between;
    align-items: end; */
}
.bgc{
width: 498px;
height: 298px;
object-fit: cover;
position: absolute;
top: 57px;
z-index: 0;
/* animation: bgc 1s infinite linear; */
}
/* @keyframes bgc{
  0% {
    left: -10px;
  }
  100% {
    left: -470px;
  }
} */
.character {
  /* background-color: red; */
  background-image: url(./dino.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  width: 50px;
  height: 65px;
  position: relative;
  top: 236px;
  position: relative;
  z-index: 1;
}
@keyframes jump {
  0% {
    top: 236px;
  }
  30% {
    top: 186px;
  }
  70% {
    top: 186px;
  }
  100% {
    top: 236px;
  }
}

.block {
  /* background-color: blue; */
  background-image: url(./block.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  width: 30px;
  height: 30px;
  top: 200px;
  left: 470px;
  position: relative;
  z-index: 1;

}
.animated-char {
  animation: jump 500ms ;
}

.animated-block {
  animation: block 1s infinite linear;
}
@keyframes block {
  0% {
    left: 470px;
  }
  100% {
    left: -40px;
  }
}


.game-over,
.score-cont-result{
display: none;
}


@media(max-width: 510px){
.container{
  align-items: start;

    margin-left: 10px;
    
}
.game {
    width: 350px;
    border-right: none;
    margin-top: 20px;
  }
  .score-cont{
    position: absolute;
    left: 10px;
    top: 45px;
}
.bgc{
  top: 77px;
}
}