* {
  box-sizing: border-box;
  position: relative;
}

:root {
  --border: 3px solid #1A237E;
  --white: #fae3c6;
}

*::after, *::before {
  content: '';
  position: absolute;
}

.canvas {
	position: absolute;
	width: 50px;
	height: 50px;
    right: 5px;
	top:10px;
}

.train {
  -webkit-animation: train 1.0s infinite ease-in-out;
          animation: train 1.0s infinite ease-in-out;
  background-color: #092E20;
  border-radius: 5px;
  height: 29px;
  position: relative;
  top: -50px;
  width: 60px;
  left:0px;
}

.base {
  background-color: #092E20;
  border-radius: 4px;
  height: 10px;
  margin: 1px auto 0 auto;
  position: relative;
  top: 8px;
  width: 100%;
}
.base:before {
  background-color: #bbb4ab;
  border-radius: 3px;
  content: "";
  display: block;
  height: 5px;
  left: calc(50% - 7.5px);
  position: absolute;
  top: -8px;
  width: 15px;
}


.hinge {
  background-color: #092E20;
  border-radius: 1px;
  height: 10px;
  margin: 1px auto 0 auto;
  position: relative;
  top: -101px;
  width: 1px;
  left:-12px;
  border: solid #bbb4ab 0.5px;
}
.hinge:before {
  background-color: #092E20;
  border-radius: 3px;
  content: "";
  display: block;
  height: 4px;
  left: 40px;
  position: absolute;
  top: -11px;
  width: 10px;
  
}



.boiler {
  background-color: #092E20;
  border-radius: 6px;
  height: 40px;
  margin: 1px auto 0 auto;
  position: relative;
  top: -50px;
  width: 100%;
}
.boiler2:before {
  background-color: #092E20;
  border-radius: 3px;
  content: "";
  display: block;
  height: 25px;
  left: 62px;
  position: absolute;
  top: -83px;
  width: 8px;
}

.boiler:after {
  background-color: #bbb4ab;
  border-radius: 5px;
  content: "";
  display: block;
  height: 75%;
  left: 5%;
  position: absolute;
  top: 14%;
  width: 90%;
}

.boilerplate {
  background-color: #092E20;
  border-radius: 2px;
  height: 24px;
  margin: 1px auto 0 auto;
  position: relative;
  top: -83px;
  left: -36px;
  width: 8px;
}
.boilerplate:before {
  background-color: #092E20;
  border-radius: 3px;
  content: "";
  display: block;
  height: 4px;
  left: 20%;
  position: absolute;
  top: -3px;
  width: 9px;
}

.lights:before,
.lights:after {
  background-color: yellow;
  border-radius: 25%;
  content: "";
  display: block;
  height: 8px;
  left: 5%;
  position: absolute;
  top: -84px;
  width: 15px;
}

.lights2:before,
.lights2:after {
  background-color: orange;
  border-radius: 25%;
  content: "";
  display: block;
  height: 3px;
  left: 5%;
  position: absolute;
  top: -74px;
  width: 15px;
}
.wheels:before,
.wheels:after {
  background-color: #092E20;
  border-radius: 3px;
  content: "";
  display: block;
  height: 15px;
  left: 7%;
  position: absolute;
  top: -70px;
  width: 10px;
}

.wheels:after {
  left: 76%;
}

.lights:after {
  left: 69%;
}
.lights2:after {
  left: 69%;
}

@-webkit-keyframes train {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(0.5deg);
  }
  50% {
    transform: rotate(-0.5deg);
  }
  75% {
    transform: rotate(0.5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes train {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(1deg);
  }
  50% {
    transform: rotate(-1deg);
  }
  75% {
    transform: rotate(1.5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@-webkit-keyframes track {
  0% {
    opacity: 0;
    top: 48%;
    width: 90%;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    top: 0;
	height: 0.5px;
  }
}
@keyframes track {
  0% {
    opacity: 0;
    top: 48%;
    width: 80%;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    top: 0;
    width: 40%;
	height: 1px;
  }
}

@-webkit-keyframes showtrain {
  0% {
    opacity: 0;
	scale:0;
  }
  10% {
    opacity: 0.2;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
	scale:0.5;
  }
}
@keyframes showtrain {
  0% {
	  scale:0;
    opacity: 0;
  }
  10% {
    opacity: 0.2;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
	scale:0.5;
  }
}

.traintainer{
  position: absolute;
  right:10px;
  top:36px;
  transform: scale(0);
  opacity: 1; 
}
.showtrain {
  -webkit-animation: showtrain 1.0s 1 ease-in-out;
  animation: showtrain 1.0s 1 ease-in-out;
  transform: scale(1) translate(0,0px);
  opacity: 1;
  scale:0.5;
}
