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

:root {
  --bg: #07070c;
  --line: rgba(255, 255, 255, 0.18);
  --glow: rgba(133, 91, 255, 0.8);
  --glow2: rgba(0, 229, 255, 0.7);
}

body {
  min-height: 100vh;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at center, rgba(133, 91, 255, 0.2), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(0, 220, 255, 0.16), transparent 30rem),
    radial-gradient(circle at top left, rgba(90, 70, 255, 0.22), transparent 34rem),
    var(--bg);
}

#backgroundCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.center-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.orb {
  position: relative;
  width: min(74vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
  outline: none;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), transparent 12%),
    radial-gradient(circle at 40% 40%, rgba(0, 229, 255, 0.8), transparent 28%),
    radial-gradient(circle at 65% 65%, rgba(133, 91, 255, 0.95), transparent 45%),
    radial-gradient(circle, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02));
  box-shadow:
    0 0 80px rgba(133, 91, 255, 0.65),
    0 0 170px rgba(0, 229, 255, 0.22),
    inset 0 0 60px rgba(255, 255, 255, 0.16);
  animation: floatOrb 5s ease-in-out infinite;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.orb:hover {
  filter: brightness(1.18);
}

.orb:active {
  transform: scale(0.96);
}

.orb:focus-visible {
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.2),
    0 0 80px rgba(133, 91, 255, 0.65),
    0 0 170px rgba(0, 229, 255, 0.22),
    inset 0 0 60px rgba(255, 255, 255, 0.16);
}

.orb::before,
.orb::after {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  animation: spinRing 8s linear infinite;
}

.orb::after {
  inset: 32px;
  border-style: dashed;
  animation-duration: 5s;
  animation-direction: reverse;
}

.orb-core {
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  filter: blur(18px);
  opacity: 0.75;
}

.energy-pop {
  position: fixed;
  z-index: 5;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  background: white;
  box-shadow:
    0 0 18px var(--glow2),
    0 0 32px var(--glow);
  animation: pop 1.2s ease-out forwards;
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.28), transparent 34rem);
  animation: flashOut 0.45s ease-out forwards;
}

@keyframes floatOrb {
  0%, 100% {
    translate: 0 0;
    rotate: 0deg;
  }

  50% {
    translate: 0 -24px;
    rotate: 8deg;
  }
}

@keyframes spinRing {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pop {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0);
  }
}

@keyframes flashOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@media (max-width: 520px) {
  .orb {
    width: min(82vw, 360px);
  }
}
