/* static/css/partials/galaxy.css */

.galaxy {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(108, 60, 225, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(236, 72, 153, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
    background-size: 200% 200%;
    animation: gradientShift 20s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

[data-theme="light"] .galaxy {
    opacity: 0.3;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.mist {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: 
        radial-gradient(circle at 30% 40%, rgba(108, 60, 225, 0.03), transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(236, 72, 153, 0.02), transparent 50%);
    animation: mistFloat 30s ease-in-out infinite alternate;
    will-change: transform;
    transition: opacity 0.3s ease;
}

[data-theme="light"] .mist {
    opacity: 0.2;
}

@keyframes mistFloat {
    0% { opacity: 0.3; transform: scale(1) rotate(0deg); }
    100% { opacity: 0.6; transform: scale(1.05) rotate(1deg); }
}

.twinkling-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: white;
    animation: twinkle var(--duration) ease-in-out infinite alternate;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .star {
    background: #4A4A6A;
}

@keyframes twinkle {
    0% { opacity: 0.1; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

.bg-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-scene .nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: nebulaFloat 30s infinite alternate ease-in-out;
}

.bg-scene .nebula:nth-child(1) {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 60, 225, 0.06), transparent 70%);
    top: -25%;
    left: -20%;
}

.bg-scene .nebula:nth-child(2) {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.04), transparent 70%);
    bottom: -20%;
    right: -15%;
    animation-delay: -10s;
}

.bg-scene .nebula:nth-child(3) {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.03), transparent 70%);
    top: 45%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: -20s;
}

[data-theme="light"] .bg-scene .nebula {
    opacity: 0.2;
}

@keyframes nebulaFloat {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.4; }
    50% { transform: translate(8%, 10%) scale(1.1) rotate(5deg); opacity: 0.7; }
    100% { transform: translate(-5%, 8%) scale(0.95) rotate(-5deg); opacity: 0.5; }
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(108, 60, 225, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 60, 225, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
    animation: gridPulse 15s infinite alternate;
    transition: opacity 0.3s ease;
}

[data-theme="light"] .bg-grid {
    opacity: 0.1;
}

@keyframes gridPulse {
    0% { opacity: 0.2; }
    100% { opacity: 0.4; }
}

.space-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.space-particle {
    position: absolute;
    bottom: -20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: particleFloatUp linear infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
    filter: blur(1px);
    will-change: transform;
}

[data-theme="light"] .space-particle {
    background: rgba(0, 0, 0, 0.2);
}

@keyframes particleFloatUp {
    0% { transform: translateY(0) translateX(0) scale(0.5); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.5; }
    100% { transform: translateY(calc(-100vh - 100px)) translateX(-20px) scale(1.5); opacity: 0; }
}