.stage {
  block-size: 7rem;
  padding: 0.5rem;
  background: whitesmoke;
}

.ball {
  inline-size: 2rem;
  block-size: 2rem;
  margin-inline: auto;
  background: tomato;
  border-radius: 50%;
  animation: bounce 1.1s infinite;
}

@keyframes bounce {
  0%,
  100% {
    translate: 0 0;
    animation-timing-function: ease-out;
  }
  50% {
    translate: 0 -3.5rem;
    animation-timing-function: ease-in;
  }
}