body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.btn {
  margin: 1rem;

  &-jittery {
    animation: jittery 4s infinite;
  }

  &-icon {
    position: relative;
    margin-left: 8px;
    overflow: hidden;

    i {
      position: absolute;
      top: 41%;
      left: 48%;
      transform: scale(0.75) translate(-16%, 400%);
      transition: 0.2s;
    }

    span {
      display: flex;
      justify-content: center;
      align-items: center;
      transition: 0.2s;
    }

    &:hover {
      i {
        transform: scale(0.75) translate(-16%, 0);
      }

      span {
        transform: translateY(-400%);
      }
    }
  }

  &-jelly {
    &:hover {
      animation: jelly 0.5s;
    }
  }

  &-fill {
    transition: 0.3s;

    &:hover {
      background: transparent;
      box-shadow: inset 0 0 0 36px var(--btn-bg);
    }
  }

  &-open {
    transition: 0.3s;

    &::before {
      position: absolute;
      content: "";
      top: 0;
      left: 0;
      z-index: -1;
      width: 100%;
      height: 100%;
      background: var(--btn-bg);
      transform: scaleX(0);
      transition: 0.3s;
    }

    &:hover {
      background: transparent;

      &::before {
        transform: scaleX(1);
      }
    }
  }

  &-pulse {
    &:hover {
      box-shadow: 0 0 0 18px transparent;
      animation: pulse 1s;
    }
  }

  &-close {
    transition: 0.3s;

    &:hover {
      background: transparent;
      box-shadow: inset 54px 0 0 0 var(--btn-bg),
        inset -54px 0 0 0 var(--btn-bg);
    }
  }

  &-slash {
    overflow: hidden;
    transition: 0.3s;

    &::before {
      position: absolute;
      content: "";
      top: 50%;
      left: 50%;
      z-index: -1;
      width: 120%;
      height: 210%;
      background: var(--btn-bg);
      transform: translate(-50%, -50%) rotate(-45deg) scaleX(0);
      transition: 0.3s;
    }

    &:hover {
      background: transparent;

      &::before {
        transform: translate(-50%, -50%) rotate(-45deg) scaleX(1);
      }
    }
  }

  &-fill-up {
    transition: 0.3s;

    &:hover {
      background: transparent;
      box-shadow: inset 0 -54px 0 0 var(--btn-bg);
    }
  }

  &-slide {
    transition: 0.3s;

    &:hover {
      background: transparent;
      box-shadow: inset 90px 0 0 0 var(--btn-bg);
    }
  }

  &-through {
    transition: 0.6s cubic-bezier(0.77, 0, 0.175, 1); // ease-in-out-quartic;

    &::before {
      position: absolute;
      content: "";
      top: 0;
      left: 0;
      z-index: -1;
      width: 100%;
      height: 100%;
      background: var(--btn-bg);
      transform: scaleX(0);
      transform-origin: right;
      transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    }

    &:hover {
      color: white;
      background: transparent;

      &::before {
        transform: scaleX(1);
        transform-origin: left;
      }
    }
  }

  &-offset {
    border-radius: 0;
    box-shadow: 6px 6px 0 0 var(--btn-bg), inset 6px 6px 0 0 var(--btn-bg);
    transition: 0.3s;

    &:hover {
      background: transparent;
      box-shadow: 0 0 0 0 var(--btn-bg),
        inset 108px 72px 0 0 var(--btn-bg);
    }
  }

  &-flip-down {
    --flip-button-height: 40px;
    height: var(--flip-button-height);
    color: transparent;
    border: none;
    border-radius: 0;
    perspective: 500px;
    transition: 0.3s;

    &:hover {
      color: transparent;
      background: transparent;
    }

    .front,
    .back {
      position: absolute;
      top: 0;
      left: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      height: 100%;
    }

    .front {
      background: var(--btn-bg);
      color: white;
      transition: 0.3s;
      transform-origin: center center calc(var(--flip-button-height) / -2);
    }

    .back {
      color: white;
      background: var(--btn-bg);
      transform: rotateX(88deg);
      transform-origin: center center calc(var(--flip-button-height) / -2);
      transition: 0.3s;
    }

    &:hover {
      .front {
        transform: rotateX(-90deg);
      }

      .back {
        transform: rotateX(0deg);
      }
    }
  }

  &-marquee {
    font-weight: 600;
    border: none;
    overflow: hidden;
    transition: 0.3s;

    &:hover {
      transform: scale(1.1);
    }

    span {
      display: block;
      padding: 0 20px;
      animation: move-left 2s linear infinite;

      &::after {
        position: absolute;
        content: attr(data-text);
        top: 0;
        left: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
      }
    }
  }

  &-cross {
    transform: rotate(0);
    overflow: hidden;
    transition: 0.3s;

    &::before,
    &::after {
      position: absolute;
      content: "";
      left: 0;
      z-index: -1;
      width: 100%;
      height: 50%;
      background: var(--btn-bg);
      transform: scaleX(0);
      transition: transform 0.5s;
    }

    &::before {
      top: 0;
      transform-origin: left;
    }

    &::after {
      top: 50%;
      transform-origin: right;
    }

    &:hover {
      background: transparent;

      &::before,
      &::after {
        transform: scaleX(1);
      }

      &::before {
        transform-origin: right;
      }

      &::after {
        transform-origin: left;
      }
    }
  }

  &-open-line {
    border: none;
    transition: 0.3s;

    &::before,
    &::after {
      position: absolute;
      content: "";
      left: 0;
      width: 100%;
      height: 1px;
      background: var(--btn-bg);
      opacity: 0;
      transform: scaleX(0);
      transition: 0.4s ease-in-out;
    }

    &::before {
      top: 0;
    }

    &::after {
      bottom: 0;
    }

    &:hover {
      letter-spacing: 5px;
      color: var(--btn-bg);
      background: transparent;

      &::before,
      &::after {
        opacity: 1;
        transform: scaleX(1.2);
      }
    }
  }
}

@keyframes jittery {
  5%,
  50% {
    transform: scale(1);
  }

  10% {
    transform: scale(0.9);
  }

  15% {
    transform: scale(1.15);
  }

  20% {
    transform: scale(1.15) rotate(-5deg);
  }

  25% {
    transform: scale(1.15) rotate(5deg);
  }

  30% {
    transform: scale(1.15) rotate(-3deg);
  }

  35% {
    transform: scale(1.15) rotate(2deg);
  }

  40% {
    transform: scale(1.15) rotate(0);
  }
}

@keyframes jelly {
  25% {
    transform: scale(0.9, 1.1);
  }

  50% {
    transform: scale(1.1, 0.9);
  }

  75% {
    transform: scale(0.95, 1.05);
  }
}

@keyframes pulse {
  from {
    box-shadow: 0 0 0 0 var(--btn-bg);
  }
}

@keyframes move-left {
  to {
    transform: translateX(-100%);
  }
}