/* 神秘学预测中心 - 公共星空背景组件 */

/* 星空容器 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* 星星样式 */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite;
    opacity: 0.3;
}

/* 星星闪烁动画 */
@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2);
    }
}

/* 不同类型的星星 */
.star.small {
    width: 1px;
    height: 1px;
}

.star.medium {
    width: 2px;
    height: 2px;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

.star.large {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* 特殊星星效果 */
.star.bright {
    background: linear-gradient(45deg, #fff, #00ffff, #ff00ff);
    animation: twinkleBright 3s infinite;
}

@keyframes twinkleBright {
    0%, 100% { 
        opacity: 0.6; 
        transform: scale(1) rotate(0deg);
    }
    33% { 
        opacity: 1; 
        transform: scale(1.3) rotate(120deg);
    }
    66% { 
        opacity: 0.8; 
        transform: scale(1.1) rotate(240deg);
    }
}

/* 流星效果 */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, #fff, #00ffff);
    border-radius: 50%;
    opacity: 0;
    animation: shootingStar 4s linear infinite;
}

@keyframes shootingStar {
    0% {
        opacity: 0;
        transform: translateX(-100px) translateY(100px) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateX(-50px) translateY(50px) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateX(200px) translateY(-200px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(300px) translateY(-300px) scale(0);
    }
}

/* 星座连线效果 */
.constellation-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
    height: 1px;
    opacity: 0;
    animation: constellationGlow 8s ease-in-out infinite;
}

@keyframes constellationGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.6; }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .star.large {
        width: 2px;
        height: 2px;
    }
    
    .star.medium {
        width: 1.5px;
        height: 1.5px;
    }
    
    .shooting-star {
        animation-duration: 3s;
    }
}

/* 性能优化 */
@media (prefers-reduced-motion: reduce) {
    .star,
    .shooting-star,
    .constellation-line {
        animation: none;
    }
    
    .star {
        opacity: 0.5;
    }
} 