/* Space Background Theme */
.space-bg {
    background-color: #0a0a0f;
    background-image: 
        /* Nebula effects */
        radial-gradient(ellipse at 20% 80%, rgba(120, 119, 198, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.2) 0%, transparent 40%),
        radial-gradient(ellipse at 40% 40%, rgba(138, 43, 226, 0.3) 0%, transparent 45%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 0, 255, 0.15) 0%, transparent 40%),
        /* Deep space gradient */
        radial-gradient(circle at 50% 50%, #1a1a3e 0%, #0a0a0f 100%);
    background-attachment: fixed;
    position: relative;
}

/* Stars layer */
.space-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 90px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 250px 20px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 300px 120px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 400px 90px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 500px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 600px 150px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 700px 60px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 800px 120px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 900px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 100px 180px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 200px 250px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 350px 300px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 450px 200px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 550px 280px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 650px 320px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 750px 220px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 850px 350px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 1000px 400px;
    animation: twinkle 5s ease-in-out infinite;
    z-index: 0;
}

/* Second stars layer for depth */
.stars-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(1px 1px at 100px 50px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 200px 150px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 300px 250px, #ddd, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 400px 100px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 500px 200px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 600px 300px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 700px 50px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 800px 350px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 900px 180px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 1000px 400px;
    animation: twinkle 7s ease-in-out infinite reverse;
    opacity: 0.7;
    z-index: 0;
}

/* Planets */
.planet {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.planet-red {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 5%;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c92a2a, #5c0000);
    box-shadow: 0 0 60px rgba(255, 107, 107, 0.4), inset -20px -20px 50px rgba(0,0,0,0.5);
    animation: float 20s ease-in-out infinite;
}

.planet-blue {
    width: 120px;
    height: 120px;
    top: 60%;
    left: 3%;
    background: radial-gradient(circle at 30% 30%, #4dabf7, #1971c2, #0a3960);
    box-shadow: 0 0 40px rgba(77, 171, 247, 0.4), inset -15px -15px 30px rgba(0,0,0,0.5);
    animation: float 25s ease-in-out infinite reverse;
}

.planet-gold {
    width: 80px;
    height: 80px;
    top: 30%;
    left: 15%;
    background: radial-gradient(circle at 30% 30%, #ffd43b, #f59f00, #e67700);
    box-shadow: 0 0 30px rgba(255, 212, 59, 0.4), inset -10px -10px 20px rgba(0,0,0,0.5);
    animation: float 15s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}
