* {
  margin: 0;
  padding: 0;
}

/* 禁止系统默认滚动条 */
html, body{
  height: 100%;
  overflow: hidden;
}

body {
  background: url(./images/bg.jpg);
  background-color: black;
}

img {
  width: 100%;
}

.starwars-demo {
  width: 34em;
  position: absolute;
  left: 50%;
  top: 50%;
  height: 17em;
  transform: translate3d(-50%, -50%, 0);
  perspective: 800px;
  transform-style: preserve-3d;
}

.star, .wars, .byline {
  position: absolute;
}

.star {
  top: -0.75em;
  animation: star 10s ease-out infinite;
}

.wars {
  bottom: -0.5em;
  animation: wars 10s ease-out infinite;
}

.byline {
  width: 130%;
  color: white;
  font: bold 50px serif;
  letter-spacing: 15px;
  top: 37%;
  left: -12%;
  animation: byline 10s ease-out infinite;
  transform-style: preserve-3d;
}

.huojian {
  width: 100px;
  position: fixed;
  top: 30px;
  right: 10px;
}

.huojian_play {
  animation: huojian 1s infinite linear;
}

#huojian:hover {
  cursor: pointer;
}

@keyframes huojian {
  0% {
    transform: translateY(0);
  }

  25% {
  transform: translateY(10px);
  }

  50% {
    transform: translateY(0);
  }

  75% {
  transform: translateY(10px);
  }

  100% {
  transform: translateY(0);
  }
}

@keyframes byline {
  0% {
    opacity: 0;
    transform: scale(1.5);
  }

  15% {
    opacity: 1;
    transform: translateZ(10em) rotateY(180deg);
  }

  80% {
    opacity: 1;
    transform: translateZ(10em);
  }

  95% {
    opacity: 1;
    transform: translateZ(0em);
  }

  100% {
    opacity: 0;
  }
}

@keyframes star {
  0% {
    opacity: 0;
    transform: scale(1.5);
  }

  20% {
    opacity: 1;
  }

  89% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: translateZ(-400em)
  }
}

@keyframes wars {
  0% {
    opacity: 0;
    transform: scale(1.5) translateY(0.5em);
  }

  20% {
    opacity: 1;
  }

  90% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: translateZ(-400em)
  }
}
