.button,
[class*='button-'] {
  background: #00B6E9;
  display: inline-block;
  padding: 1rem 2rem;
  color: #fff;
  font: 1.5rem "Source Sans Pro";
  text-decoration: none;
  text-align: left;
  transition: 0.5s linear all;
}
.button:hover,
[class*='button-']:hover {
  background: #50d9ff;
}

#download-wrap {
  perspective: 80rem;
  perspective-origin: 50% 50% 0;
  width: 18rem;
  height: 4rem;
  margin: 0 auto;
}

#download-wrap *, :before, :after {
  box-sizing: border-box;
}

.download {
  position: relative;
  width: 18rem;
  height: 4rem;
  transform-style: preserve-3d;
  transform-origin: 50% 50% 0;
  transform: rotateX(0deg);
  transition: 0.2s linear all;
}
.download.is-active {
  transform: rotateX(90deg) translateZ(2rem);
}
.download.is-active .meter-progress {
  right: 0%;
}

.button-download,
.meter {
  position: relative;
  width: 18rem;
  height: 4rem;
  font-size: 1.4rem;
  font-weight: 200;
  line-height: 4rem;
  padding: 0 1rem;
  transform-origin: top center;
}

.meter {
  background: #0D0;
  overflow: hidden;
  transform: rotateX(270deg);
}
.meter:before, .meter:after {
  display: block;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}
.meter:before {
  content: 'downloading...';
  animation: white-pulse 1s infinite alternate;
}
.meter:after {
  content: 'refresh again please';
  display: none;
  color: #fff;
}
.meter.is-done:before {
  display: none;
}
.meter.is-done:after {
  display: block;
}
.meter .meter-progress {
  display: block;
  width: 100%;
  position: absolute;
  right: 100%;
  top: 0;
  bottom: 0;
  background-image: linear-gradient(-45deg, rgba(0, 0, 0, 0.15) 10%, rgba(0, 0, 0, 0.3) 10%, rgba(0, 0, 0, 0.3) 20%, rgba(0, 0, 0, 0.15) 20%, rgba(0, 0, 0, 0.15) 30%, rgba(0, 0, 0, 0.3) 30%, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0.15) 70%, rgba(0, 0, 0, 0.3) 70%, rgba(0, 0, 0, 0.3) 80%, rgba(0, 0, 0, 0.15) 80%, rgba(0, 0, 0, 0.15) 90%, rgba(0, 0, 0, 0.3) 90%, rgba(0, 0, 0, 0.3));
  transition: 4s linear all;
}

.icon-wrap {
  position: absolute;
  right: 0.5rem;
  top: 0;
  bottom: 0;
  width: 4rem;
  padding-top: 1.66rem;
  background: rgba(0, 0, 0, 0.1);
}

.icon-download {
  position: relative;
  display: block;
  width: 2.5rem;
  height: 1rem;
  margin: auto;
  border: solid 0.5rem #fff;
  border-top: none;
}
.icon-download:before, .icon-download:after {
  content: '';
  display: block;
  position: absolute;
  animation: icon-bounce .5s infinite alternate;
}
.icon-download:before {
  left: 0.5rem;
  top: -0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background: #fff;
}
.icon-download:after {
  left: 0.25rem;
  top: -0.125rem;
  width: 0;
  height: 0;
  border-left: solid 0.5rem transparent;
  border-right: solid 0.5rem transparent;
  border-top: solid 0.5rem #fff;
}

@keyframes icon-bounce {
  from {
    transform: translateY(-5px);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes white-pulse {
  from {
    color: rgba(255, 255, 255, 0.2);
  }
  to {
    color: rgba(255, 255, 255, 0.5);
  }
}
