.btn-wrapper {
  position: relative;
  display: inline-block;
}

.btn {
  --border-radius: 24px;
  --padding: 4px;
  --transition: 0.4s;
  --button-color: #101010;
  --highlight-color-hue: 210deg;

  user-select: none;
  display: flex;
  justify-content: center;
  padding: 0.5em 0.5em 0.5em 1.1em;
  font-family: "Poppins", "Inter", "Segoe UI", sans-serif;
  font-size: 1em;
  font-weight: 400;

  background-color: var(--button-color);

  box-shadow:
    inset 0px 1px 1px rgba(255, 255, 255, 0.2),
    inset 0px 2px 2px rgba(255, 255, 255, 0.15),
    inset 0px 4px 4px rgba(255, 255, 255, 0.1),
    inset 0px 8px 8px rgba(255, 255, 255, 0.05),
    inset 0px 16px 16px rgba(255, 255, 255, 0.05),
    0px -1px 1px rgba(0, 0, 0, 0.02),
    0px -2px 2px rgba(0, 0, 0, 0.03),
    0px -4px 4px rgba(0, 0, 0, 0.05),
    0px -8px 8px rgba(0, 0, 0, 0.06),
    0px -16px 16px rgba(0, 0, 0, 0.08);

  border: solid 1px #fff2;
  border-radius: var(--border-radius);
  cursor: pointer;

  transition:
    box-shadow var(--transition),
    border var(--transition),
    background-color var(--transition);
}

.btn::before {
  content: "";
  position: absolute;
  top: calc(0px - var(--padding));
  left: calc(0px - var(--padding));
  width: calc(100% + var(--padding) * 2);
  height: calc(100% + var(--padding) * 2);
  border-radius: calc(var(--border-radius) + var(--padding));
  pointer-events: none;
  background-image: linear-gradient(0deg, #0004, #000a);

  z-index: -1;
  transition:
    box-shadow var(--transition),
    filter var(--transition);
  box-shadow:
    0 -8px 8px -6px #0000 inset,
    0 -16px 16px -8px #00000000 inset,
    1px 1px 1px #fff2,
    2px 2px 2px #fff1,
    -1px -1px 1px #0002,
    -2px -2px 2px #0001;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  background-image: linear-gradient(0deg,
      #fff,
      hsl(var(--highlight-color-hue), 100%, 70%),
      hsla(var(--highlight-color-hue), 100%, 70%, 50%),
      8%,
      transparent);
  background-position: 0 0;
  opacity: 0;
  transition:
    opacity var(--transition),
    filter var(--transition);
}

.btn-letter {
  position: relative;
  display: inline-block;
  color: #fff5;
  animation: letter-anim 2s ease-in-out infinite;
  transition:
    color var(--transition),
    text-shadow var(--transition),
    opacity var(--transition);
}

@keyframes letter-anim {
  50% {
    text-shadow: 0 0 3px #fff8;
    color: #fff;
  }
}

.btn-svg {
  flex-grow: 1;
  height: 24px;
  margin-right: 0.5rem;
  fill: #e8e8e8;
  animation: flicker 2s linear infinite;
  animation-delay: 0.5s;
  filter: drop-shadow(0 0 2px #fff9);
  transition:
    fill var(--transition),
    filter var(--transition),
    opacity var(--transition);
}

@keyframes flicker {
  50% {
    opacity: 0.3;
  }
}

.txt-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 6.4em;
}

.txt-1,
.txt-2 {
  position: absolute;
  word-spacing: -1em;
}

.txt-1 {
  animation: appear-anim 1s ease-in-out forwards;
}

.txt-2 {
  opacity: 0;
}

@keyframes appear-anim {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.btn:focus .txt-1 {
  animation: opacity-anim 0.3s ease-in-out forwards;
  animation-delay: 1s;
}

.btn:focus .txt-2 {
  animation: opacity-anim 0.3s ease-in-out reverse forwards;
  animation-delay: 1s;
}

@keyframes opacity-anim {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.btn:focus .btn-letter {
  animation:
    focused-letter-anim 1s ease-in-out forwards,
    letter-anim 1.2s ease-in-out infinite;
  animation-delay: 0s, 1s;
}

@keyframes focused-letter-anim {

  0%,
  100% {
    filter: blur(0px);
  }

  50% {
    transform: scale(2);
    filter: blur(10px) brightness(150%) drop-shadow(-36px 12px 12px hsl(var(--highlight-color-hue), 100%, 70%));
  }
}

.btn:focus .btn-svg {
  animation-duration: 1.2s;
  animation-delay: 0.2s;
}

.btn:focus::before {
  box-shadow:
    0 -8px 12px -6px #fff3 inset,
    0 -16px 16px -8px hsla(var(--highlight-color-hue), 100%, 70%, 20%) inset,
    1px 1px 1px #fff3,
    2px 2px 2px #fff1,
    -1px -1px 1px #0002,
    -2px -2px 2px #0001;
}

.btn:focus::after {
  opacity: 0.6;
  mask-image: linear-gradient(0deg, #fff, transparent);
  filter: brightness(100%);
}

.btn-letter:nth-child(1),
.btn:focus .btn-letter:nth-child(1) {
  animation-delay: 0s;
}

.btn-letter:nth-child(2),
.btn:focus .btn-letter:nth-child(2) {
  animation-delay: 0.08s;
}

.btn-letter:nth-child(3),
.btn:focus .btn-letter:nth-child(3) {
  animation-delay: 0.16s;
}

.btn-letter:nth-child(4),
.btn:focus .btn-letter:nth-child(4) {
  animation-delay: 0.24s;
}

.btn-letter:nth-child(5),
.btn:focus .btn-letter:nth-child(5) {
  animation-delay: 0.32s;
}

.btn-letter:nth-child(6),
.btn:focus .btn-letter:nth-child(6) {
  animation-delay: 0.4s;
}

.btn-letter:nth-child(7),
.btn:focus .btn-letter:nth-child(7) {
  animation-delay: 0.48s;
}

.btn-letter:nth-child(8),
.btn:focus .btn-letter:nth-child(8) {
  animation-delay: 0.56s;
}

.btn-letter:nth-child(9),
.btn:focus .btn-letter:nth-child(9) {
  animation-delay: 0.64s;
}

.btn-letter:nth-child(10),
.btn:focus .btn-letter:nth-child(10) {
  animation-delay: 0.72s;
}

.btn-letter:nth-child(11),
.btn:focus .btn-letter:nth-child(11) {
  animation-delay: 0.8s;
}

.btn-letter:nth-child(12),
.btn:focus .btn-letter:nth-child(12) {
  animation-delay: 0.88s;
}

.btn-letter:nth-child(13),
.btn:focus .btn-letter:nth-child(13) {
  animation-delay: 0.96s;
}

.btn:active {
  border: solid 1px hsla(var(--highlight-color-hue), 100%, 80%, 70%);
  background-color: hsla(var(--highlight-color-hue), 50%, 20%, 0.5);
}

.btn:active::before {
  box-shadow:
    0 -8px 12px -6px #fffa inset,
    0 -16px 16px -8px hsla(var(--highlight-color-hue), 100%, 70%, 80%) inset,
    1px 1px 1px #fff4,
    2px 2px 2px #fff2,
    -1px -1px 1px #0002,
    -2px -2px 2px #0001;
}

.btn:active::after {
  opacity: 1;
  mask-image: linear-gradient(0deg, #fff, transparent);
  filter: brightness(200%);
}

.btn:active .btn-letter {
  text-shadow: 0 0 1px hsla(var(--highlight-color-hue), 100%, 90%, 90%);
  animation: none;
}

.btn:hover {
  border: solid 1px hsla(var(--highlight-color-hue), 100%, 80%, 40%);
}

.btn:hover::before {
  box-shadow:
    0 -8px 8px -6px #fffa inset,
    0 -16px 16px -8px hsla(var(--highlight-color-hue), 100%, 70%, 30%) inset,
    1px 1px 1px #fff2,
    2px 2px 2px #fff1,
    -1px -1px 1px #0002,
    -2px -2px 2px #0001;
}

.btn:hover::after {
  opacity: 1;
  mask-image: linear-gradient(0deg, #fff, transparent);
}

.btn:hover .btn-svg {
  fill: #fff;
  filter: drop-shadow(0 0 3px hsl(var(--highlight-color-hue), 100%, 70%)) drop-shadow(0 -4px 6px #0009);
  animation: none;
}


#cursor,
#box,
#text {
  cursor: pointer;
}

#cursor {
  overflow: visible;
  transform: translate3d(300px, 0, 0) scale(1);
  transform-origin: center center;
  transform-box: fill-box;
  animation: cursor 5s ease infinite alternate;
}

@keyframes cursor {
  0% {
    opacity: 0;
    transform: translate3d(300px, 0, 0) scale(1);
  }

  30% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }

  60% {
    opacity: 1;
    transform: translate3d(-200px, -200px, 0) scale(1);
  }

  /* clique */
  65% {
    opacity: 1;
    transform: translate3d(-200px, -200px, 0) scale(0.95);
  }

  70% {
    opacity: 1;
    transform: translate3d(-200px, -200px, 0) scale(1);
  }

  100% {
    opacity: 1;
    transform: translate3d(-300px, -50px, 0) scale(1);
  }
}

#box {
  opacity: 0;
  animation: box 5s ease infinite alternate;
}

@keyframes box {

  0%,
  60% {
    opacity: 0;
  }

  65%,
  100% {
    opacity: 1;
  }
}

#text {}

.button {
  cursor: pointer;
  font-size: 1.2rem;
  border-radius: 16px;
  border: none;
  padding: 2px;
  background: radial-gradient(circle 80px at 80% -10%, #1E334C, #05060A);
  position: relative;
  transition: background 0.3s, transform 0.3s;
  overflow: hidden;
}

.button:hover {
  transform: scale(0.97);
}

.button::after {
  content: "";
  position: absolute;
  width: 65%;
  height: 60%;
  border-radius: 120px;
  top: 0;
  right: 0;
  box-shadow: 0 0 25px #1e334c44;
  z-index: -1;
  transition: box-shadow 0.3s;
}

.button:hover::after {
  box-shadow: 0 0 15px #1e334c22;
}

.blob1 {
  position: absolute;
  width: 80px;
  height: 100%;
  border-radius: 16px;
  bottom: 0;
  left: 0;
  background: radial-gradient(circle 60px at 0% 100%, #1E334C, #05060A, transparent);
  box-shadow: -10px 10px 30px #1e334c44;
  transition: background 0.3s, box-shadow 0.3s;
}

.button:hover .blob1 {
  box-shadow: -5px 5px 20px #1e334c55;
}

.inner {
  padding: 14px 32px;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 600;
  z-index: 3;
  position: relative;
  background: radial-gradient(circle 80px at 80% -50%, #1E334C, #05060A);
  transition: background 0.3s, color 0.3s;
}

.button:hover .inner {
  background: radial-gradient(circle 80px at 80% -50%, #2A4B6B, #05060A);
  color: #a3d9ff;
}

.inner::before {
  content: "";
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: 14px;
  background: radial-gradient(circle 60px at 0% 100%, #1e334c33, #1e334c11, transparent);
  position: absolute;
  transition: opacity 0.3s;
}

.button:hover .inner::before {
  opacity: 0;
}