@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow-x: hidden;
}
h1 {
  margin: 10px;
}

.box {
  background-color: darkblue;
  color: white;
  border-radius: 10px;
  width: 400px;
  height: 200px;
  margin: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 3px 4px 5px black;
  font-size: 35px;
  transform: translateX(400%);
  transition: 0.6s ease;
}

.box:nth-of-type(even) {
  transform: translateX(-400%);
  transition: 0.6s ease;
}
.box.show {
  transform: translateX(0);
  transition: 0.6s ease;
}
