/* Galaxy Background */
.galaxy-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.galaxy-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle at center,
            rgba(255, 200, 100, 0.8) 0%,
            rgba(255, 150, 50, 0.6) 10%,
            rgba(200, 100, 255, 0.4) 25%,
            rgba(100, 150, 255, 0.3) 40%,
            rgba(50, 100, 200, 0.2) 60%,
            transparent 80%);
    filter: blur(40px);
    animation: galaxyPulse 20s ease-in-out infinite;
}

@keyframes galaxyPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

.galaxy-arm {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform-origin: center;
}

.galaxy-arm::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1200px;
    height: 300px;
    background: radial-gradient(ellipse at center,
            rgba(150, 180, 255, 0.3) 0%,
            rgba(100, 150, 255, 0.2) 30%,
            rgba(80, 120, 200, 0.1) 60%,
            transparent 100%);
    transform: translate(-50%, -50%) rotate(-20deg);
    filter: blur(30px);
    animation: spiralRotate 60s linear infinite;
}

.galaxy-arm:nth-child(2) {
    transform: rotate(120deg);
}

.galaxy-arm:nth-child(3) {
    transform: rotate(240deg);
}

.galaxy-arm:nth-child(2)::before {
    animation-delay: -20s;
}

.galaxy-arm:nth-child(3)::before {
    animation-delay: -40s;
}

@keyframes spiralRotate {
    0% {
        transform: translate(-50%, -50%) rotate(-20deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(340deg);
    }
}

/* Distant stars background */
.star-dust {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0.6;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

/* Shooting stars - centered around the middle */
.shooting-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
    animation: shoot 3s ease-out forwards;
    opacity: 0;
    z-index: 0;
}

@keyframes shoot {
    0% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateX(var(--shoot-x)) translateY(var(--shoot-y)) scale(0);
    }
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, white);
    transform-origin: right center;
    transform: rotate(var(--shoot-angle));
    opacity: 0.6;
}

/* Cosmic particles */
.cosmic-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(150, 200, 255, 0.8), transparent);
    border-radius: 50%;
    animation: floatParticle 20s linear infinite;
    opacity: 0.6;
    z-index: 0;
}

@keyframes floatParticle {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translate(var(--tx), var(--ty));
        opacity: 0;
    }
}