h1 {
  margin-top: 2rem;
}

.wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Dino */
.dino {
  position: relative;
  width: 140px;
  height: 80px;
  animation: walk 10s linear infinite;
}

/* Body */
.body {
  position: absolute;
  width: 90px;
  height: 60px;
  background: #4caf50;
  border-radius: 50px;
  left: 20px;
  top: 10px;
}

/* Tail */
.tail {
  position: absolute;
  width: 50px;
  height: 20px;
  background: #4caf50;
  border-radius: 20px;
  left: -30px;
  top: 25px;
  transform-origin: right;
  animation: tailWag 1s infinite alternate;
}

/* Head */
.head {
  position: absolute;
  width: 50px;
  height: 40px;
  background: #4caf50;
  border-radius: 20px;
  right: 0;
  top: 0;
  animation: bite 1s infinite;
}

/* Eye */
.eye {
  position: absolute;
  width: 6px;
  height: 6px;
  background: black;
  border-radius: 50%;
  top: 10px;
  right: 10px;
}

/* Teeth */
.teeth {
  position: absolute;
  bottom: -5px;
  right: 5px;
  width: 20px;
  height: 10px;
  background: white;
  clip-path: polygon(
    0 0, 10% 100%, 20% 0,
    30% 100%, 40% 0,
    50% 100%, 60% 0,
    70% 100%, 80% 0,
    90% 100%, 100% 0
  );
}

/* Legs */
.leg {
  position: absolute;
  bottom: -10px;
  width: 10px;
  height: 20px;
  background: #388e3c;
  border-radius: 5px;
  transform-origin: top;
}

.leg1 {
  left: 30px;
  animation: legMove 0.3s infinite alternate;
}

.leg2 {
  left: 70px;
  animation: legMove 0.3s infinite alternate-reverse;
}

/* Animations */
@keyframes walk {
  0% {
    transform: translateX(-150px);
  }
  100% {
    transform: translateX(100vw);
  }
}

@keyframes legMove {
  0% {
    transform: rotate(20deg);
  }
  100% {
    transform: rotate(-20deg);
  }
}

@keyframes tailWag {
  0% {
    transform: rotate(10deg);
  }
  100% {
    transform: rotate(-10deg);
  }
}

@keyframes bite {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(10deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
