* {
  border: 0;
  padding: 0;
  margin: 0;
}

.main {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100vw;
}

.bg {
width: 1042px;
height: 546px;
background: url(../images/background.jpg);
border: 1px solid #999;
position: relative;
overflow: hidden;
}

.car {
  background: url(../images/car_body.png);
  width: 629px;
  height: 202px;
  position: relative;
  left: 200px;
  top: 300px;
  z-index: 10;
  animation: car 15s ease alternate infinite;
}

@keyframes car {
  40%, 60% {
    transform: matrix(1.1, 0, 0, 1.1, 10, 5);
  }

  80%, 100% {
    transform: matrix(1, 0, 0, 1, 25, -5);
  }
}

.car::before, .car::after {
  content: "";
  position: absolute;
  padding: 48px;
  background: url(../images/wheel.png) no-repeat center / contain;
  left:90px;
  top:105px;
  animation: wheel 0.7s linear infinite;
}

.car::after {
  left: 466px;
}

@keyframes wheel {
  100% {
    transform: rotate(360deg);
  }
}

.moto {
  background: url(../images/moto.png);
  width: 350px;
  height: 271px;
  position: absolute;
  left: -350px;
  bottom: 30px;
  z-index: 8;
  animation: moto 15s linear normal infinite;
  transform-origin: 0 0;
}

@keyframes moto {
  30% {transform: translate(0);}
  50% {transform: translate(180px, 0);}
  55% {transform: matrix(1.02, 0, 0, 1.02, 178, 5);}
  60% {transform: matrix(1, 0, 0, 1, 180, -10);}
  65% {transform: matrix(1.02, 0, 0, 1.02, 176, 5);}
  85% {transform: matrix(0.8, 0, 0, 0.8, 245, -5);}
  93% {transform: matrix(0.8, -0.3, 0.3, 0.8, 800, 0);}
  97% {transform: matrix(0.8, 0, 0, 0.8, 1200, -5);}
  100% {transform: matrix(0.8, 0, 0, 0.8, 1400, -5);}
}

.cloud_1, .cloud_2, .cloud_3, .cloud_4 {
  position: absolute;
  left: 1050px;
  padding: 30px 87px;
}

.cloud_1 {
  top: 150px;
  background: url(../images/cloud1.png) no-repeat center / contain;
  animation: cloud 50s linear infinite -25s;
}

.cloud_2 {
  top: 180px;
  background: url(../images/cloud2.png) no-repeat center / contain;
  animation: cloud 45s linear infinite -5s;
}

.cloud_3 {
  top: 220px;
  background: url(../images/cloud3.png) no-repeat center / contain;
  animation: cloud 35s linear infinite -24s;
}

.cloud_4 {
  top: 250px;
  background: url(../images/cloud4.png) no-repeat center / contain;
  animation: cloud 30s linear infinite -6s;
}

@keyframes cloud {
  100% {
    transform: translateX(-1200px);
  }
}

.tree_1, .tree_2, .tree_3, .tree_4 {
  position: absolute;
  left: 1050px;
  background: url(../images/tree.png) no-repeat center / contain;
  z-index: 5;
}

.tree_1 {
  bottom: 150px;
  padding: 24px 12px;
  animation: tree 30s linear infinite 6s;
}

.tree_2 {
  bottom: 140px;
  padding: 36px 18px;
  animation: tree 26s linear infinite 3s;
}

.tree_3 {
  bottom: 130px;
  padding: 50px 25px;
  animation: tree 20s linear infinite;
}

.tree_4 {
  bottom: 120px;
  padding: 70px 35px;
  animation: tree 16s linear infinite -3s;
}

div.trees div:nth-child(odd) {
  animation-delay: -13s;
}

@keyframes tree {
  20% {transform: translateX(0);}
  100% {transform: translateX(-1150px);}
}

.mountains {
  background: url(../images/mountains.png) no-repeat center / contain;
  padding: 100px 200px;
  position: absolute;
  left: 1050px;
  top: 202px;
  animation: mountains 60s linear infinite;
  z-index: 3;
}

@keyframes mountains {
  30% {transform: translateX(0);}
  100% {
    transform: translateX(-1500px);
  }
  }