/* 星空背景效果 */
.starry-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    animation: twinkle var(--duration, 3s) infinite ease-in-out;
    opacity: var(--opacity, 0.7);
}

.star.small {
    width: 1px;
    height: 1px;
    --duration: 2s;
    --opacity: 0.5;
}

.star.medium {
    width: 2px;
    height: 2px;
    --duration: 4s;
    --opacity: 0.7;
}

.star.large {
    width: 3px;
    height: 3px;
    --duration: 6s;
    --opacity: 0.9;
}

.star.shooting {
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, white, transparent);
    animation: shooting-star 5s infinite linear;
    opacity: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: var(--opacity); }
    50% { opacity: calc(var(--opacity) * 0.3); }
}

@keyframes shooting-star {
    0% {
        opacity: 0;
        transform: translateX(-100px) translateY(-100px) rotate(45deg);
    }
    10% {
        opacity: 1;
    }
    20% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateX(2000px) translateY(2000px) rotate(45deg);
    }
}

/* 粒子动画效果 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.particle.small {
    width: 20px;
    height: 20px;
    animation-duration: 25s;
}

.particle.medium {
    width: 40px;
    height: 40px;
    animation-duration: 20s;
}

.particle.large {
    width: 60px;
    height: 60px;
    animation-duration: 15s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-100px) translateX(50px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-50px) translateX(100px) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(50px) translateX(50px) rotate(270deg);
        opacity: 0.6;
    }
}

/* 深色模式下的星空效果 */
[data-bs-theme=dark] .star {
    background-color: rgba(255, 255, 255, 0.9);
}

[data-bs-theme=dark] .star.shooting {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.9), transparent);
}

[data-bs-theme=dark] .particle {
    background: radial-gradient(circle, rgba(100, 150, 255, 0.6) 0%, rgba(100, 150, 255, 0) 70%);
}