body {
    text-align: center;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

body > *:not(.avatar-ring):not(.shooting-star-wrapper):not(.star):not(.bg) {
    animation: glitchIn 0.7s steps(1, end);
}

html, body {
  height: 100%;
  margin: 0;
}

.bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-image: url("image/bg.gif");
  background-size: 150%;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .bg {
    background-size: cover;
  }
}

h1 {
    color: #f5f5f5;
    text-shadow: 0 0 10px #7dd3fc, 0 0 20px #7dd3fc
}

p {
    color: #f5f5f5;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 14px;
    opacity: 1;
    text-shadow: 0 0 8px rgba(125, 211, 252, 0.8);
}

a {
    display: block;
    text-decoration: none;
    background-color: rgba(30, 20, 60, 0.6);
    color: #7dd3fc;
    padding: 14px;
    margin: 12px auto;
    width: 300px;
    border-radius: 8px;
    box-sizing: border-box;
    transition: 0.2s;
}

a:hover {
    background-color: rgba(192, 132, 252, 0.3);
    color: #c084fc;
}

.star {
    position: fixed;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 6px white;
    animation: floatStar 4s ease-in-out infinite;
}

.shooting-star-wrapper {
  position: fixed;
  animation-name: shoot;
  animation-iteration-count: infinite;
}

.star1 {
  top: 10%;
  left: -10%;
  animation-duration: 3s;
  animation-timing-function: ease-in;
  animation-delay: 2s;
}

.star2 {
  top: 25%;
  left: -15%;
  animation-duration: 2s;
  animation-timing-function: ease-in;
  animation-delay: 0.5s;
}

.star3 {
  top: 45%;
  left: -20%;
  animation-duration: 4s;
  animation-timing-function: ease-in;
  animation-delay: 5s;
}

.shooting-star {
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, white);
  transform: rotate(40deg);
  transform-origin: left center;
}

.avatar-ring {
  position: relative;
  width: 130px; 
  height: 130px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.avatar-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(#7dd3fc, #c084fc, white, #7dd3fc);
  animation: spinRing 3s linear infinite;
}

img {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  animation: portalIn 1.3s cubic-bezier(0.34, 1.56, 0.64, 1),
             spinToStop 2.5s cubic-bezier(0.15, 0.75, 0.3, 1) forwards; 
}

.orbit {
  position: absolute;
  inset: 0;
  animation: orbitSpin 3s linear infinite;
}

.orb {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -70px);
}

.orb.main {
  width: 10px;
  height: 10px;
  background: white;
  box-shadow: 0 0 10px white, 0 0 20px #7dd3fc;
}

.orb.t1 {
  width: 8px;
  height: 8px;
  background: #c084fc;
  opacity: 0.6;
  box-shadow: 0 0 8px #c084fc;
}

.orb.t2 {
  width: 6px;
  height: 6px;
  background: #7dd3fc;
  opacity: 0.4;
  box-shadow: 0 0 6px #7dd3fc;
}

.orb.t3 {
  width: 4px;
  height: 4px;
  background: #7dd3fc;
  opacity: 0.2;
}

@keyframes glitchIn {
  0% {
    opacity: 0;
    transform: translate(-20px, 6px) skew(10deg);
    clip-path: inset(5% 0 80% 0);
    filter: brightness(3) hue-rotate(180deg) contrast(2);
  }
  10% {
    transform: translate(15px, -8px) skew(-8deg);
    clip-path: inset(70% 0 5% 0);
    filter: brightness(0.3) hue-rotate(-90deg);
  }
  20% {
    opacity: 1;
    transform: translate(-12px, 4px);
    clip-path: inset(30% 0 50% 0);
    filter: brightness(2) hue-rotate(60deg);
  }
  30% {
    transform: translate(10px, -5px) skew(5deg);
    clip-path: inset(85% 0 2% 0);
    filter: brightness(0.5);
  }
  40% {
    transform: translate(-8px, 3px);
    clip-path: inset(10% 0 70% 0);
    filter: hue-rotate(-40deg);
  }
  50% {
    transform: translate(6px, -2px) skew(-4deg);
    clip-path: inset(60% 0 15% 0);
  }
  65% {
    transform: translate(-4px, 2px);
    clip-path: inset(0 0 0 0);
    filter: brightness(1.3);
  }
  80% {
    transform: translate(3px, -1px);
  }
  100% {
    opacity: 1;
    transform: translate(0) skew(0);
    clip-path: inset(0);
    filter: brightness(1) hue-rotate(0deg) contrast(1);
  }
}

@keyframes twinkle {
    0%, 100% {
        box-shadow: 0 0 10px #7dd3fc, 0 0 20px #7dd3fc;
    }
    50% {
        box-shadow: 0 0 20px #7dd3fc, 0 0 40px #7dd3fc, 0 0 60px #c084fc;
    }
}

@keyframes floatStar {
    0%, 100% {
        transform: translateY(0); opacity: 0.5;
    }
    50% {
        transform: translateY(-15px); opacity: 1;
    }
}

@keyframes shoot {
    0% {
        transform: translate(0, 0); opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translate(120vw, 100vw); opacity: 0;
    }
}

@keyframes spinToStop {
  from { transform: rotate(-1080deg); }
  to { transform: rotate(0deg); }
}

@keyframes spinRing {
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes portalIn {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-720deg);
    filter: brightness(0) blur(20px) saturate(3);
    box-shadow: 0 0 0px #7dd3fc;
  }
  35% {
    opacity: 1;
    transform: scale(1.4) rotate(30deg);
    filter: brightness(3) blur(5px) saturate(2);
    box-shadow: 0 0 80px 30px #7dd3fc;
  }
  50% {
    transform: scale(0.85) rotate(-10deg);
    filter: brightness(2) blur(2px);
    box-shadow: 0 0 60px 15px #c084fc;
  }
  65% {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.5) blur(0);
    box-shadow: 0 0 40px 10px #7dd3fc;
  }
  80% {
    transform: scale(0.97) rotate(-2deg);
    box-shadow: 0 0 20px 5px #7dd3fc;
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: brightness(1) blur(0) saturate(1);
    box-shadow: 0 0 15px #7dd3fc;
  }
}