/* 背景效果样式 */
body {
    margin: 0;
    padding: 0;
    background-color: #181a1f;
    overflow: hidden;
    position: relative;
}

.topbar {
    position: relative;
    z-index: 10;
}

/* 白色点点样式 */
.dot {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0.9;
    animation: floatBright 20s infinite linear;
    box-shadow: 0 0 4px #fff, 0 0 6px #fff;
    z-index: 0;
    pointer-events: none;
}

.dot.static {
    animation: none;
    opacity: 0.7;
    box-shadow: 0 0 3px #fff, 0 0 6px #fff;
}

/* 点点浮动动画 - 保持亮度 */
@keyframes floatBright {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.9;
    }
    85% {
        opacity: 0.9;
    }
    95% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* 不同速度的点点 */
.dot:nth-child(odd) {
    animation-duration: 22s;
    animation-delay: -2s;
}

.dot:nth-child(3n) {
    animation-duration: 25s;
    animation-delay: -4s;
}

.dot:nth-child(4n) {
    animation-duration: 28s;
    animation-delay: -6s;
}

.dot:nth-child(5n) {
    animation-duration: 20s;
    animation-delay: -8s;
}

.dot:nth-child(6n) {
    animation-duration: 30s;
    animation-delay: -10s;
}

.dot:nth-child(7n) {
    animation-duration: 35s;
    animation-delay: -12s;
}

.dot:nth-child(8n) {
    animation-duration: 40s;
    animation-delay: -15s;
}

.dot:nth-child(9n) {
    animation-duration: 45s;
    animation-delay: -18s;
}

.dot:nth-child(10n) {
    animation-duration: 50s;
    animation-delay: -20s;
}

/* 流星样式 */
.meteor {
    position: absolute;
    width: 40px;
    height: 1.5px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 128, 255, 0.1) 20%, 
        rgba(0, 255, 255, 0.3) 40%, 
        rgba(0, 255, 255, 0.6) 60%, 
        rgba(0, 255, 255, 0.8) 80%, 
        #00ffff 100%);
    border-radius: 2px;
    /* 动画将通过JavaScript动态设置 */
    box-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #0080ff;
    transform-origin: left center;
    z-index: 0;
    pointer-events: none;
}

.meteor.fast {
    animation: meteorMove 4s ease-out forwards;
}

.meteor.normal {
    animation: meteorMove 6s ease-out forwards;
}

.meteor.slow {
    animation: meteorMove 8s ease-out forwards;
}

/* 流星头部光晕 */
.meteor::before {
    content: '';
    position: absolute;
    top: -1.5px;
    right: -4px;
    width: 8px;
    height: 4.5px;
    background: radial-gradient(ellipse, #00ffff, rgba(0, 255, 255, 0.6), transparent);
    border-radius: 50%;
    /* 动画将通过JavaScript动态设置 */
}

/* 流星移动动画 */
@keyframes meteorMove {
    0% {
        transform: translateX(-200px) translateY(-200px) rotate(45deg) scale(0.5);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translateX(-100px) translateY(-100px) rotate(45deg) scale(1);
    }
    65% {
        opacity: 1;
        transform: translateX(calc(100vw - 100px)) translateY(calc(100vh - 100px)) rotate(45deg) scale(1);
    }
    75% {
        opacity: 0.8;
        transform: translateX(calc(100vw - 80px)) translateY(calc(100vh - 80px)) rotate(45deg) scale(0.95);
    }
    85% {
        opacity: 0.4;
        transform: translateX(calc(100vw - 60px)) translateY(calc(100vh - 60px)) rotate(45deg) scale(0.8);
    }
    95% {
        opacity: 0.1;
        transform: translateX(calc(100vw - 20px)) translateY(calc(100vh - 20px)) rotate(45deg) scale(0.6);
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(calc(100vh + 100px)) rotate(45deg) scale(0.5);
        opacity: 0;
    }
}

/* 流星头部光晕动画 */
@keyframes meteorGlow {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    65% {
        opacity: 1;
        transform: scale(1);
    }
    75% {
        opacity: 0.8;
        transform: scale(0.95);
    }
    85% {
        opacity: 0.4;
        transform: scale(0.8);
    }
    95% {
        opacity: 0.1;
        transform: scale(0.6);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}
