.item-1 {
  width: 2em;
}

.cube:nth-child(1),
.cube:nth-child(1) div {
  z-index: 1;
  animation-delay: 0.08333s;
}

.item-2 {
  width: 4em;
}

.cube:nth-child(2),
.cube:nth-child(2) div {
  z-index: 2;
  animation-delay: 0.16667s;
}

.item-3 {
  width: 6em;
}

.cube:nth-child(3),
.cube:nth-child(3) div {
  z-index: 3;
  animation-delay: 0.25s;
}

.item-4 {
  width: 8em;
}

.cube:nth-child(4),
.cube:nth-child(4) div {
  z-index: 4;
  animation-delay: 0.33333s;
}

.item-5 {
  width: 10em;
}

.cube:nth-child(5),
.cube:nth-child(5) div {
  z-index: 5;
  animation-delay: 0.41667s;
}

.item-6 {
  width: 12em;
}

.cube:nth-child(6),
.cube:nth-child(6) div {
  z-index: 6;
  animation-delay: 0.5s;
}

.item-7 {
  width: 14em;
}

.cube:nth-child(7),
.cube:nth-child(7) div {
  z-index: 7;
  animation-delay: 0.58333s;
}

.item-8 {
  width: 16em;
}

.cube:nth-child(8),
.cube:nth-child(8) div {
  z-index: 8;
  animation-delay: 0.66667s;
}
#vignette {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 4;
  background: rgba(0,0,0,0);
}

#pos {
 z-index: 100000;
 position: fixed;
 margin-left: 45%;
 margin-top: 20%;
}

#container {  
  width: 100%;
  z-index:999;
  perspective: 800px;
  padding: 20px 60px;
  position: relative;
  display: table-cell;
  vertical-align: middle;
}

.cube {
	z-index:999;
  width: 10px;
  height: 40px;
  position: relative;
  margin-right: 8px;
  float: left;
  transform-style: preserve-3d;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  animation: animCube;
  /* Safari and Chrome */
  animation-iteration-count: infinite;
  opacity: .75;
}

.cube div {
  position: absolute;
  display: block;
  width: 10px;
  height: 40px;
}

.cube .center {
  width: 10px;
  /*box-shadow: 0 0 3px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.05);*/
  animation: animCenter;
  animation-iteration-count: infinite;
}

.cube .bottom {
  width: 10px;
  height: 40px;
  bottom: 0;
  transform: rotateX(90deg);
  transform-origin: center bottom;
  animation: animBottom;
  animation-iteration-count: infinite;
}

.cube .left {
  left: 0;
  transform: rotateY(90deg);
  transform-origin: left center;
  animation: animSide;
  animation-iteration-count: infinite;
}

.cube .right {
  right: 0;
  transform: rotateY(-90deg);
  transform-origin: right center;
  animation: animSide;
  animation-iteration-count: infinite;
}

.cube .left,
.cube .center,
.cube .right,
.cube .bottom,
.cube {
  animation-duration: 1s;
  animation-timing-function: ease-in-out;
}

.left,
.right {
  /*background-color: #2b2830;*/
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
}

.center {
  background-color: #2b2830;
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
}

.bottom {
  background-color: #1f1d23;
  background-image: linear-gradient(to top, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
}

@keyframes animCube {
  30% {
    transform: translateZ(10px) translatex(0px) translateY(0px) rotatex(0deg) rotatey(0deg) rotateZ(0deg);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 12px 20px 1px rgba(0, 0, 0, 0.5);
  }
  100% {
    transform: translateZ(0px) rotatez(0deg);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), 0 0 0 0 transparent;
  }
}
@keyframes animSide {
  30% {
    width: 20px;
    background-color: #1d1c1f;
  }
  95% {
    width: 10px;
  }
}
@keyframes animBottom {
  30% {
    height: 20px;
  }
  95% {
    height: 10px;
  }
}
@keyframes animCenter /* Safari and Chrome */ {
  20% {
    background-color: #d1d0fa;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.15), inset 0 1px rgba(255, 255, 255, 0.5);
  }
  65% {
    box-shadow: 0 0 3px rgba(255, 255, 255, 0), inset 0 1px rgba(255, 255, 255, 0.25);
  }
}