/* ==================== 粒子动画样式 ==================== */

/* 滚动动画 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 悬浮动画 */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 脉冲光晕 */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
    }
}

/* 旋转边框 */
.rotating-border {
    position: relative;
}

.rotating-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-gold), var(--secondary-blue), var(--accent-gold));
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: rotateBorder 3s linear infinite;
}

@keyframes rotateBorder {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 闪烁效果 */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 电子轨道动画 */
.electron-orbit {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid rgba(0, 212, 255, 0.3);
    animation: rotate 4s linear infinite;
}

.electron-orbit::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--primary-blue);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-blue);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 波纹扩散 */
.ripple {
    position: relative;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    border: 2px solid var(--primary-blue);
    transform: translate(-50%, -50%);
    animation: ripple 1.5s ease-out infinite;
}

@keyframes ripple {
    to {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-blue);
    white-space: nowrap;
    animation: typing 3s steps(30) 1s forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}
