/* ========================================
   COSMIC NEBULA BACKGROUND
   Beautiful space aesthetic
   ======================================== */

/* Animated Nebula Background */
@keyframes nebula-drift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }

    33% {
        transform: translate(50px, -30px) scale(1.1);
        opacity: 0.8;
    }

    66% {
        transform: translate(-30px, 40px) scale(0.95);
        opacity: 0.7;
    }
}

@keyframes starfield {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

.nebula-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg,
            #0a0a0a 0%,
            #1a1a2e 25%,
            #16213e 50%,
            #0f3460 75%,
            #0a0a0a 100%);
}

/* Nebula clouds */
.nebula-cloud {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: nebula-drift 20s ease-in-out infinite;
    mix-blend-mode: screen;
}

.nebula-cloud-1 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle,
            rgba(138, 43, 226, 0.3) 0%,
            rgba(75, 0, 130, 0.2) 50%,
            transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.nebula-cloud-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle,
            rgba(0, 100, 200, 0.25) 0%,
            rgba(0, 50, 150, 0.15) 50%,
            transparent 70%);
    top: 20%;
    right: -100px;
    animation-delay: -7s;
}

.nebula-cloud-3 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle,
            rgba(184, 134, 11, 0.15) 0%,
            rgba(218, 165, 32, 0.08) 50%,
            transparent 70%);
    bottom: 10%;
    left: 20%;
    animation-delay: -14s;
}

.nebula-cloud-4 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle,
            rgba(255, 20, 147, 0.2) 0%,
            rgba(199, 21, 133, 0.1) 50%,
            transparent 70%);
    bottom: -100px;
    right: 10%;
    animation-delay: -3s;
}

.nebula-cloud-5 {
    width: 650px;
    height: 650px;
    background: radial-gradient(circle,
            rgba(0, 191, 255, 0.2) 0%,
            rgba(30, 144, 255, 0.1) 50%,
            transparent 70%);
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

/* Starfield */
.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
    animation: starfield 3s ease-in-out infinite;
}

/* Generate different star delays and positions via inline styles */
.star:nth-child(2n) {
    animation-delay: -1s;
}

.star:nth-child(3n) {
    animation-delay: -2s;
}

.star:nth-child(5n) {
    width: 3px;
    height: 3px;
}

/* Cosmic dust particles */
@keyframes dust-float {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0.6;
    }
}

.cosmic-dust {
    position: absolute;
    width: 1px;
    height: 1px;
    background: rgba(184, 134, 11, 0.4);
    border-radius: 50%;
    animation: dust-float 8s ease-in-out infinite;
}

.cosmic-dust:nth-child(2n) {
    animation-delay: -2s;
    background: rgba(138, 43, 226, 0.3);
}

.cosmic-dust:nth-child(3n) {
    animation-delay: -4s;
    background: rgba(0, 100, 200, 0.3);
}

/* Shooting stars */
@keyframes shooting-star {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateX(300px) translateY(300px);
        opacity: 0;
    }
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
    animation: shooting-star 3s ease-out infinite;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, white, transparent);
}