@import './black-background';

@mixin lostMixin {
  .animated.lost {
    @include blackBackgroundMixin;

    .lost-main-container {
      scale: 0;
      animation-name: lost_container_animation;
      animation-delay: var(--animation-delay, 0);
      animation-duration: 10s;
      animation-timing-function: ease-in-out;
      animation-fill-mode: forwards;
      animation-iteration-count: 1;
      transform-origin: 4000px 3700px;
    }

    .black-background {
      animation-iteration-count: 1;
      animation-fill-mode: forwards;
    }

    #lost_background {
      animation-name: lost_details_animation;
      animation-delay: var(--animation-delay, 0);
      animation-duration: 5s;
      animation-timing-function: ease-in-out;
      animation-iteration-count: infinite;
      animation-direction: alternate;
      transform-origin: 4000px 3700px;
    }

    #lost_title > * {
      &:nth-child(1) {
        animation-delay: -0.5s;
        transform-origin: 2680px 4000px;
      }
      &:nth-child(2) {
        animation-delay: -0.3s;
        transform-origin: 3300px 3800px;
      }
      &:nth-child(3) {
        animation-delay: -0.7s;
        transform-origin: 4050px 3700px;
      }
      &:nth-child(4) {
        animation-delay: -0.1s;
        transform-origin: 3580px 4000px;
      }

      animation-name: lost_title_animation;
      animation-delay: var(--animation-delay, 0);
      animation-duration: 3s;
      animation-timing-function: ease-in-out;
      animation-iteration-count: infinite;
      animation-direction: alternate;
      transform-origin: 4000px 3700px;
    }

    use.d-none.use-lost {
      display: block;
    }
  }

  @keyframes lost_container_animation {
    0% {
      scale: 0;
    }
    5% {
      scale: 1;
    }
    100% {
      scale: 1.1;
    }
  }

  @keyframes lost_details_animation {
    0% {
      scale: 0.95;
    }
    100% {
      scale: 1.2;
    }
  }

  @keyframes lost_title_animation {
    0% {
      rotate: 1deg;
    }
    10% {
      rotate: 3deg;
      scale: 1.1;
    }
    20% {
      translate: -10 0px;
    }
    30% {
      rotate: -3deg;
      scale: 0.9;
    }
    40% {
      translate: 10 0px;
    }
    50% {
      rotate: 3deg;
    }
    60% {
      rotate: -3deg;
    }
    70% {
      translate: 0 50px;
    }
    80% {
      translate: 0 -50px;
    }
    90% {
      translate: 0 25px;
    }
    100% {
      translate: 0 0;
      rotate: 0;
    }
  }
}
