body { 
  margin: 0; 
  overflow: hidden;
  opacity: 0.8;
  background-color: darkviolet;
  position: relative;
}

canvas { 
  width: 640px; 
  height: 360px;
  background: rgba(0,0,0,0.9);
}

#die,
#loading {
  position: absolute;
  top: 0;
  left: 0;
  background-color: darkviolet;
  opacity: 0.6;
  width: 100vw;
  height: 100vh;
  z-index: 999;
}

#countdown {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  font-family: 'Press Start 2P', cursive;
  font-size: 120;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
}

button {
  padding: 20px 40px;
  font-family: 'Press Start 2P', cursive;
  background: aqua;
  border: 0px;
  border-radius: 10px;
  margin-top: 40px;
  cursor: pointer;
}

#score {
  font-family: 'Press Start 2P', cursive;
  position: absolute;
  top: 10;
  right: 10;
  z-index: 99999999999999999999999999999999999999999999;
  color: white;
}

#die .content,
#loading .content {
  max-width: 500px;
  width: 100%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-weight: 2em;
  font-size: 2em;
  color: aqua;
  font-family: 'Press Start 2P', cursive;
}

/**
 * Audio
 */
.audio {
  position: absolute;
  top: 10;
  left: 10;
  z-index: 99999999999999999999999999999999999999999999;
  transition: ease 0.3s;
}

.audio iframe {
  height: 19.6px;
  transition: ease 0.3s;
}

.audio.init iframe,
.audio:hover iframe {
  height: 300px;
  transition: ease 0.3s;
}

/**
 * @see https://www.youtube.com/watch?v=llWMlHrTwqQ&feature=youtu.be
 */
body::after,
body::before {
  content: '';
  position: absolute;
  top: 0%;
  left: 0%;
  width: 100vw;
  height: 100vh;
  background-image: url(../img/rain.png);
  background-size: 50%;
  background-position: center;
  filter: opacity(0.5);
  animation: rainAnimation 0.2s infinite;
  -webkit-animation: rainAnimation 0.2s infinite;
  -moz-animation: rainAnimation 0.2s infinite;
  -o-animation: rainAnimation 0.2s infinite;
  background-repeat: repeat;
}

body::after {
  background-size: 25%;
  filter: opacity(0.4);
  animation: rainAnimation 0.4s infinite;
  -webkit-animation: rainAnimation 0.4s infinite;
  -moz-animation: rainAnimation 0.4s infinite;
  -o-animation: rainAnimation 0.4s infinite;
}

@-webkit-keyframes rainAnimation {
  0% {
    transform: translate(0%, 0%);
  }
  50% {
    transform: translate(10px, 50%);
  }
  100% {
    transform: translate(20px, 100%);
  }
}

@-moz-keyframes rainAnimation {
  0% {
    transform: translate(0%, 0%);
  }
  50% {
    transform: translate(10px, 50%);
  }
  100% {
    transform: translate(20px, 100%);
  }
}

@-o-keyframes rainAnimation {
  0% {
    transform: translate(0%, 0%);
  }
  50% {
    transform: translate(10px, 50%);
  }
  100% {
    transform: translate(20px, 100%);
  }
}

@keyframes rainAnimation {
  0% {
    transform: translate(0%, 0%);
  }
  50% {
    transform: translate(10px, 50%);
  }
  100% {
    transform: translate(20px, 100%);
  }
}
