body {
  animation: dayTime 40s linear infinite;
}


.stage:after {
  content: ' ';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 3px solid #ff00a2;
  border-bottom: 3px dashed #ff00a2;
}


/*TRAIN*/

.train {
  display:flex;
  position: absolute;
  bottom: 10px;
  z-index: 100;
}

.wagon,
.cabin,
.chimney {
  border-radius: 4px 4px 0 0;
  border-top: 4px solid #b1e8e3;
}

.wagon,
.motor {
  border-bottom: 2px solid #b1e8e3;
}

.wagon,
.locomotive {
  display: inline-block;
  width: 70px;
  height: 55px;
  background-color: #ff00a2;
  position: relative;
  margin-top:-20px;
}


/*WHEELS*/

.wagon:before,
.wagon:after,
.motor:before,
.motor:after,
.cabin:after {
  content: ' ';
  color: #fff;
  padding: 6px;
  position: absolute;
  border-radius: 46%;
  border: 6px solid #333;
  bottom: -10px;
  background-color: #666;
  -webkit-animation: spin 4s linear infinite;
  -moz-animation: spin 4s linear infinite;
  animation: spin 4s linear infinite;
}

.wagon:before {
  left: 6px;
}

.wagon:after {
  right: 6px;
}

.motor:before {
  left: 32px;
}

.motor:after {
  right: 4px;
}

.cabin:after {
  bottom: -50px;
  padding: 8px;
  left: 3px;
}

.wagon {
  margin: 0 2px;
}

.wagon_text {
  display:flex;
  justify-content:center;
  align-items:center;
  color: #fff;
  font-size: 1.1em;
  text-transform: uppercase;
  font-weight: bold;
  padding-top: 15px;
}

.wagon1 {
  width:300px;
}

.wagon2 {
  width:200px;
}

.wagon3 {
  width:400px;
}


/*LOCOMOTIVE*/

.locomotive {
  background-color: transparent;
  transform: scale(-1,1);
}

.locomotive .cabin {
  width: 58px;
  height: 35px;
  background-color: #ff00a2;
  position: relative;
  z-index: 1;
  border-radius: 8px 8px 0 0;
}


/*locomotive window*/

.locomotive .cabin:before {
  content: ' ';
  width: 25px;
  height: 18px;
  position: absolute;
  top: 10px;
  left: 15px;
  border-radius: 3px;
  border: 3px solid pink;
  background-color: #f1f1f1;
}

.locomotive .motor {
  display: inline-block;
  width: 85px;
  height: 40px;
  background-color: #ff00a2;
  position: relative;
  border-radius: 0 8px 0px 0px;
}

.locomotive .chimney {
  position: absolute;
  width: 15px;
  height: 15px;
  background-color: #ff00a2;
  right: -6px;
  bottom: 10px;
  -webkit-animation: puf 4s 2;
  animation: puf 4s 2;
}

.locomotive .light {
  content: " ";
  position: absolute;
  right: -10px;
  bottom: 0;
  border-radius: 50%;
  border: 3px solid pink;
}

.train {
  -webkit-animation: voyage 20s linear infinite;
  animation: voyage 20s linear infinite;
    display:none;
}







/* NEW TRAIN */

#train_anim {
    position: fixed;
    width:365px;
    -webkit-animation: train_animation 23s linear infinite;
    animation: train_animation 23s linear infinite;
    z-index: 120;
    cursor:pointer;
}

.stage:hover .train_tooltip {
    display: block;
    opacity:1;
    transform:scale(1);
}


.train_tooltip {
    display:block;
    opacity:0;
    background: #a5d7d3;
    margin-left: 28px;
    padding: 10px;
    position: absolute;
    z-index: 1000;
    width:200px;
    height:100px;
    color: #ff00a2;
    text-align: center;
    border: 5px solid #ff00a2;
    font-weight: bold;
    transform:scale(0);
}

@-webkit-keyframes train_animation {
  0% {
    right: 100%;
  }
  100% {
    right: -500px;
  }
}


@keyframes train_animation {
  0% {
    right: 100%;
  }
  100% {
    right: -500px;
  }
}







/*ANIMATIONS*/


@-webkit-keyframes voyage {
  0% {
    left: 100%;
  }
  100% {
    left: -1700px;
  }
}

@keyframes voyage {
  0% {
    left: 100%;
  }
  100% {
    left: -1700px;
  }
}

@-webkit-keyframes spin {
  100% {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes spin {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}