*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  cursor: crosshair;
}

body {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 12%, rgba(88, 52, 170, 0.28), transparent 22%),
    radial-gradient(circle at 82% 20%, rgba(35, 107, 170, 0.22), transparent 26%),
    radial-gradient(circle at 52% 86%, rgba(84, 21, 145, 0.2), transparent 30%),
    #02020a;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

body::before {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(159, 211, 255, 0.9) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 107, 240, 0.75) 0 1px, transparent 1.9px),
    radial-gradient(circle, rgba(124, 91, 255, 0.85) 0 1px, transparent 2px);
  background-position:
    0 0,
    38px 54px,
    92px 26px,
    160px 118px;
  background-size:
    120px 120px,
    180px 180px,
    240px 240px,
    310px 310px;
  opacity: 0.72;
  animation: starDrift 95s linear infinite;
}

body::after {
  z-index: -1;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 1) 0 1.5px, transparent 2.4px),
    radial-gradient(circle, rgba(182, 220, 255, 0.95) 0 1.3px, transparent 2.6px),
    radial-gradient(circle, rgba(253, 95, 255, 0.82) 0 1.1px, transparent 2.2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.78) 0 0.8px, transparent 1.8px);
  background-position:
    34px 20px,
    120px 86px,
    205px 136px,
    280px 44px;
  background-size:
    210px 210px,
    280px 280px,
    360px 360px,
    430px 430px;
  opacity: 0.9;
  filter:
    drop-shadow(0 0 4px rgba(166, 205, 255, 0.95))
    drop-shadow(0 0 8px rgba(184, 74, 255, 0.5));
  animation:
    starDrift 145s linear infinite reverse,
    starTwinkle 5.8s steps(4, end) infinite;
}

.void-computer {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: min(46vw, 760px);
  min-width: 340px;
  height: auto;
  pointer-events: none;
  user-select: none;
  transform: translate(-50%, -48%);
  filter:
    drop-shadow(0 0 14px rgba(196, 181, 253, 0.28))
    drop-shadow(0 0 42px rgba(124, 58, 237, 0.18));
}

.ui {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 7vh 1.5rem 11vh;
  pointer-events: none;
}

.title {
  position: relative;
  display: inline-block;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.8rem, 2.6vw, 2rem);
  color: #fff;
  letter-spacing: 0.28em;
  line-height: 1.7;
  text-align: center;
  transform: translateZ(0);
  text-shadow:
    2px 0 0 rgba(0, 245, 255, 0.65),
    -2px 0 0 rgba(255, 49, 206, 0.5),
    0 0 8px #cc44ff,
    0 0 22px #aa22ee,
    0 0 50px #880099,
    0 0 90px #440066;
  animation:
    titleCurrent 2.8s steps(2, end) infinite,
    titlePulse 4.6s ease-in-out infinite;
}

.title::before,
.title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.78;
}

.title::before {
  color: #70f7ff;
  text-shadow:
    -2px 0 0 #00e5ff,
    0 0 14px rgba(0, 229, 255, 0.85);
  clip-path: inset(0 0 56% 0);
  transform: translate(-2px, -1px);
  animation: digitalTearTop 1.8s infinite linear alternate-reverse;
}

.title::after {
  color: #ff6df0;
  text-shadow:
    2px 0 0 #ff2bd6,
    0 0 14px rgba(255, 43, 214, 0.75);
  clip-path: inset(48% 0 0 0);
  transform: translate(2px, 1px);
  animation: digitalTearBottom 2.1s infinite linear alternate;
}

.button-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: all;
}

.cta {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  width: min(150px, 18vw);
  min-width: 96px;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  filter:
    drop-shadow(0 0 10px rgba(183, 148, 246, 0.45))
    drop-shadow(0 0 24px rgba(139, 92, 246, 0.22));
  transition:
    transform 0.22s,
    filter 0.22s;
}

.cta img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.cta:hover,
.cta:focus-visible {
  outline: none;
  transform: translateY(-3px) scale(1.04);
  filter:
    drop-shadow(0 0 15px rgba(255, 255, 255, 0.78))
    drop-shadow(0 0 36px rgba(196, 181, 253, 0.76))
    drop-shadow(0 0 68px rgba(168, 85, 247, 0.45));
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .title,
  .title::before,
  .title::after {
    animation: none;
  }

  .cta {
    transition: none;
  }
}

@media (max-width: 600px) {
  .void-computer {
    width: min(86vw, 430px);
    min-width: 0;
    transform: translate(-50%, -54%);
  }

  .ui {
    padding-bottom: 6vh;
  }
}

@keyframes starDrift {
  from {
    background-position:
      0 0,
      38px 54px,
      92px 26px,
      160px 118px;
  }

  to {
    background-position:
      -260px 520px,
      338px 394px,
      -188px 346px,
      420px -182px;
  }
}

@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0.68;
  }

  18% {
    opacity: 1;
  }

  42% {
    opacity: 0.52;
  }

  67% {
    opacity: 0.94;
  }

  82% {
    opacity: 0.6;
  }
}

@keyframes titlePulse {
  0%,
  100% {
    filter: brightness(1);
  }

  45% {
    filter: brightness(1.25);
  }

  48% {
    filter: brightness(0.86);
  }

  52% {
    filter: brightness(1.38);
  }
}

@keyframes titleCurrent {
  0%,
  8%,
  10%,
  58%,
  60%,
  100% {
    transform: translate(0, 0) skewX(0deg);
  }

  9% {
    transform: translate(2px, -1px) skewX(6deg);
  }

  59% {
    transform: translate(-2px, 1px) skewX(-5deg);
  }
}

@keyframes digitalTearTop {
  0% {
    clip-path: inset(0 0 78% 0);
    transform: translate(-2px, -1px);
  }

  18% {
    clip-path: inset(14% 0 54% 0);
    transform: translate(3px, 0);
  }

  36% {
    clip-path: inset(2% 0 68% 0);
    transform: translate(-4px, 1px);
  }

  62% {
    clip-path: inset(26% 0 44% 0);
    transform: translate(2px, -2px);
  }

  100% {
    clip-path: inset(8% 0 62% 0);
    transform: translate(-1px, 0);
  }
}

@keyframes digitalTearBottom {
  0% {
    clip-path: inset(64% 0 0 0);
    transform: translate(2px, 1px);
  }

  24% {
    clip-path: inset(48% 0 22% 0);
    transform: translate(-3px, 0);
  }

  48% {
    clip-path: inset(72% 0 4% 0);
    transform: translate(4px, 2px);
  }

  72% {
    clip-path: inset(52% 0 18% 0);
    transform: translate(-2px, -1px);
  }

  100% {
    clip-path: inset(60% 0 8% 0);
    transform: translate(2px, 0);
  }
}
