body {
  font-family: sans-serif;
  background: #f4f4f4;
  overflow: hidden;
  text-align: center;
}

#game {
  position: relative;
  width: 600px;
  height: 200px;
  margin: 50px auto;
  background: #fff;
  border: 2px solid #000;
}

#dino {
  position: absolute;
  bottom: 0;
  left: 50px;
  width: 40px;
  height: 40px;
  background: green;
}

#block {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 30px;
  background: red;
  animation: moveBlock 2s linear infinite;
}

@keyframes moveBlock {
  0% { right: -30px; }
  100% { right: 630px; }
}

.jump {
  animation: jump 0.5s ease-out;
}

@keyframes jump {
  0% { bottom: 0; }
  50% { bottom: 100px; }
  100% { bottom: 0; }
}
