
/* TODO: add an animation that goes from hidden, to first cabinet, to 2nd, 3rd, then hidden again */
/* 
then for the first visible ones, apply a negative value for the animation-delay
By default, a CSS animation starts at the first keyframe (0%), but you can manipulate this start point using the animation-delay property. A positive value will delay the start of the animation, while a negative value will cause the animation to start partway through
*/

html, body {
  width: 100vw;
  height: 100vh;
  margin: 0 auto;
  background: #1c1c1c66;
  overflow: hidden;
  font-family: 'Orbitron', sans-serif;
}

.title {
  width: 100%;
  text-align: center;
  color: #ffffffd9;
  font-size: 64px;
  padding: 40px 0;
  text-shadow: 3px 4px #a6a6a6;
}

.cabinets {
  display: flex;
  height: 600px;
  width: 100vw;
  justify-content: left;
  top: calc(100% - 660px);
  position: fixed;
}

.cabinet-holder {
  margin: 0 14px;
  flex: none;
  transition: margin-left 0.5s ease;
}

.cabinet-holder.leaving {
  margin-left: -434px;
  /* 420 (width) + 14 (margin) */
}

.cabinet {
  width: 420px;
  transition: all 0.5s ease;
}


.logo-holder {
  width: 100%;
  height: 84px;
  border-top: 8px solid #090615;
  border-bottom: 8px solid #090615;
  position: relative;
  z-index: 10;
  box-shadow: 0px 82px 25px #0002;
}

.logo-holder::before {
  content: '';
  position: absolute;
  width: 8px;
  height: calc(84px + 24px);
  top: -16px;
  left: 0;
  background: #000;
}

.logo-holder::after {
  content: '';
  position: absolute;
  width: 8px;
  height: calc(84px + 24px);
  top: -16px;
  left: 100%;
  background: #000;
}

.logo {
  text-align: center;
  padding: 20px 10px;
  font-size: 34px;
}

.screen-holder {
  width: calc(100% - 52px);
  height: 360px;
  margin: 0 auto;
  background: #080123;
  border-right: 8px solid #000;
  border-left: 8px solid #000;
  position: relative;
  margin-bottom: -1px;
}

@keyframes flicker {
  0% {
    box-shadow: 0px 0px 70px #0effff3e;
  }
  30% {
    box-shadow: 0px 0px 80px #0effff5d;
  }
  50% {
    box-shadow: 0px 0px 70px #0effff41;
  }
  80% {
    box-shadow: 0px 0px 90px #0effff65;
  }
  100% {
    box-shadow: 0px 0px 80px #0effff2e;
  }
}

.screen {
  width: calc(100% - 40px);
  height: calc(100% - 80px);
  position: relative;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 120px 120px 120px 120px/15px 15px 15px 15px;
  overflow: hidden;
  /* TODO: animate the box shadow so that it flickers */
  box-shadow: 0px 0px 80px #0effff5e;
  animation: flicker 0.7s infinite;
  background-position: center !important;
  background-size: cover !important;
}

.screen-blue {
  /* TODO: add a flicker effect */
  position: absolute;
  width: 100%;
  height: 100%;
  /* background: #bae4ee;
  opacity: 0.1; */
  background: #051a70;
  opacity: 0.28;
}

.screen-static {
  /* TODO: static animation */
  position: absolute;
}

.screen-shine {
  position: absolute;
  width: 180%;
  height: 180%;
  clip-path: ellipse(50% 40% at 50% 50%);
  background: #fff1;
}

.button-row-holder {
  width: 100%;
  height: 84px;
  margin-bottom: -1px;
  position: relative;
}

.button-row-edge {
  width: 100%;
  height: 100%;
  clip-path: polygon(18px 0%, calc(100% - 18px) 0, 100% 100%, 0% 100%);
  background: #000;
}

.button-row-face {
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  transform: translate(8px, 8px);
  clip-path: polygon(16px 0%, calc(100% - 16px) 0, 100% 100%, 0% 100%);
}

.legs {
  width: calc(100% - 16px);
  height: 50%;
  border-right: 8px solid #000;
  border-left: 8px solid #000;
  clip-path: polygon(0 0, 100% 0, 94% 100%, 6% 100%);
  background: #1d1c1c;
  background: linear-gradient(
    0deg, 
    #000 0%,
    #1c1c1c 100%
  );
}

/* joystick */

@keyframes rotate {
  0% {
    transform: translateY(-100%) rotate(2deg);
  }
  23% {
    transform: translateY(-100%) rotate(-3deg);
  }
  42% {
    transform: translateY(-100%) rotate(5deg);
  }
  68% {
    transform: translateY(-100%) rotate(-2deg);
  }
  81% {
    transform: translateY(-100%) rotate(3deg);
  }
  92% {
    transform: translateY(-100%) rotate(-5deg);
  }
  100% {
    transform: translateY(-100%) rotate(2deg);
  }
}

.joystick-base {
  position: absolute;
  z-index: 3;
  top: calc(50% - 4px);
  left: 16%;
  content: '';
  background: #000;
  width: 30px;
  height: 17px;
  border-radius: 100%;
}

.joystick-base .stick {
  position: absolute;
  top: 4px;
  left: calc(50% - 5px);
  width: 10px;
  height: 38px;
  background: #000;
  animation: rotate 2s infinite;
  transform-origin: bottom;
  transform: translateY(-100%);
}

.joystick-base .stick .ball {
  content: '';
  position: absolute;
  top: -28px;
  transform: translateX(calc(-50% + 4px));
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 8px solid #000;
}

.button {
  position: absolute;
  width: 22px;
  height: 14px;
  border-radius: 100%;
  border: 6px solid #000;
  z-index: 1;
  transform: translateX(-50%);
  background: #fff;
  overflow: hidden;
}

@keyframes blink {
  0% {
    opacity: 0.8;
  }
  30% {
    opacity: 1.0;
  }
  50% {
    opacity: 0.7;
  }
  80% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.8;
  }
}

.button .button-color {
  width: 100%;
  height: 100%;
  animation: blink infinite;
}

.button.button-1 {
  top: 24%;
  left: 74%;
}

.button.button-2 {
  top: 42%;
  left: 83%;
}
