/* cosmic-backdrop.css - Space Background */

.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(to bottom, #0a0a1a, #1a1a2a);
    perspective: 1000px;
}

/* Star Field */
.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.star {
    position: absolute;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 1);
    animation: star-twinkle 3s ease-in-out infinite alternate;
}

/* FIXED: Changed from .star-yellow to ensure CSS applies properly */
.star.star-yellow {
    background-color: #ffff40;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.9);
    animation: star-fade 4s ease-in-out infinite;
}

/* FIXED: Changed from .star-gold to ensure CSS applies properly */
.star.star-gold {
    background-color: #ffd700;
    box-shadow: 0 0 18px rgba(255, 215, 0, 1);
    animation: star-blink 3.5s ease-in-out infinite;
}

/* FIXED: Changed from .star-red to ensure CSS applies properly */
.star.star-red {
    background-color: #ff4040;
    box-shadow: 0 0 15px rgba(255, 40, 40, 0.9);
    animation: star-pulse 5s ease-in-out infinite;
}

.nebula {
    position: absolute;
    width: 180px;
    height: 120px;
    background: radial-gradient(
        ellipse at center, 
        rgba(120, 60, 180, 0.2) 0%, 
        rgba(80, 40, 140, 0.12) 50%, 
        transparent 80%
    );
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(40px);
    animation: nebula-flow 80s linear infinite;
    z-index: 0;
}

.dust-cloud {
    position: absolute;
    right: -20%;
    width: 300px;
    height: 200px;
    background: radial-gradient(
        ellipse at center, 
        rgba(200, 200, 200, 0.3) 0%, 
        rgba(150, 150, 150, 0.1) 50%, 
        transparent 80%
    );
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(30px);
    animation: dust-cloud-drift 50s linear infinite;
    z-index: 1;
}

.dust-cloud-light {
    background: radial-gradient(
        ellipse at center, 
        rgba(220, 220, 220, 0.2) 0%, 
        rgba(180, 180, 180, 0.1) 50%, 
        transparent 80%
    );
}

.dust-cloud-dark {
    background: radial-gradient(
        ellipse at center, 
        rgba(100, 100, 100, 0.3) 0%, 
        rgba(50, 50, 50, 0.1) 50%, 
        transparent 80%
    );
}

.cosmic-dust {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center, 
        rgba(128, 0, 128, 0.1) 0%, 
        rgba(0, 0, 139, 0.05) 50%, 
        transparent 80%
    );
    opacity: 0.6;
    filter: blur(50px);
    animation: dust-flow 60s linear infinite;
}

/* Animations */
@keyframes star-twinkle {
    0% { 
        opacity: 0.7;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
    100% { 
        opacity: 0.8;
        transform: scale(1);
    }
}

@keyframes star-fade {
    0% { 
        opacity: 0.4;
        transform: scale(0.6);
    }
    50% {
        opacity: 1;
        transform: scale(1.4);
    }
    100% { 
        opacity: 0.3;
        transform: scale(0.5);
    }
}

@keyframes star-blink {
    0% { 
        opacity: 0.5;
        transform: scale(0.7);
    }
    50% {
        opacity: 1;
        transform: scale(1.7);
    }
    100% { 
        opacity: 0.4;
        transform: scale(0.6);
    }
}

@keyframes star-pulse {
    0% { 
        opacity: 0.3;
        transform: scale(0.6);
    }
    50% {
        opacity: 1;
        transform: scale(1.6);
    }
    100% { 
        opacity: 0.3;
        transform: scale(0.6);
    }
}

@keyframes dust-cloud-drift {
    0% {
        right: -20%;
        opacity: 0;
        transform: scale(0.7) rotate(0deg);
    }
    20% {
        opacity: 0.6;
    }
    80% {
        opacity: 0.6;
    }
    100% {
        right: 120%;
        opacity: 0;
        transform: scale(1.3) rotate(45deg);
    }
}

@keyframes dust-flow {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes nebula-flow {
    0% { transform: rotate(0deg) scale(1) translate(0, 0); opacity: 0.3; }
    25% { opacity: 0.5; }
    50% { transform: rotate(180deg) scale(1.15) translate(50px, 30px); opacity: 0.6; }
    75% { opacity: 0.4; }
    100% { transform: rotate(360deg) scale(1) translate(0, 0); opacity: 0.3; }
}

/* Responsive Option */
.no-background .space-background {
    display: none;
}