.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    pointer-events: none;
}

/* 星空加载完成后缓慢淡入（仅在暗色主题） */
.stars.stars-loaded {
    opacity: 1;
}

/* 在浅色主题时强制隐藏星空 */
html.light .stars {
    opacity: 0 !important;
    visibility: hidden;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle linear infinite both;
}

/* 不同大小与颜色的星星 */
.star.size1 {
    width: 1px;
    height: 1px;
}

/* 小星星无光晕 */
.star.size2 {
    width: 2px;
    height: 2px;
    box-shadow: 0 0 12px 3px #ffffff;
}

.star.size3 {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 15px 4px #36e8ff;
}

.star.color1 {
    box-shadow: 0 0 12px 3px #59bcff;
}

/* 浅蓝 */
.star.color2 {
    box-shadow: 0 0 12px 3px #ff6c1e;
}

/* 浅紫 */
.star.color3 {
    box-shadow: 0 0 12px 3px #ffaa6f;
}

/* 浅粉 */

@keyframes twinkle {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, #ffffff, #00cfff);
    border-radius: 50%;
    box-shadow: 0 0 15px 3px #ffffff;
    animation: shooting linear forwards;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0), #ffffff);
    left: -60px;
}

@keyframes shooting {
    0% {
        transform: translateX(-200px) translateY(-200px) rotate(-45deg);
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateX(1200px) translateY(1200px) rotate(-45deg);
        opacity: 0;
    }
}