/* 腾翊辰曜科技 - 动画效果文件 */
/* 高级动画和视觉效果 */

/* 粒子动画系统 */
@keyframes particleFloat {
    0% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    background: var(--accent-blue);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
}

/* 神经网络连接线动画 */
@keyframes neuralPulse {
    0% {
        stroke-dashoffset: 100;
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.3;
    }
}

.neural-connection {
    stroke: var(--accent-blue);
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 5, 5;
    animation: neuralPulse 3s ease-in-out infinite;
}

/* 全息投影效果 */
@keyframes hologram {
    0% {
        text-shadow: 
            0 0 5px var(--accent-blue),
            0 0 10px var(--accent-blue),
            0 0 15px var(--accent-blue);
        opacity: 0.8;
    }
    50% {
        text-shadow: 
            0 0 10px var(--accent-purple),
            0 0 20px var(--accent-purple),
            0 0 30px var(--accent-purple);
        opacity: 1;
    }
    100% {
        text-shadow: 
            0 0 5px var(--accent-blue),
            0 0 10px var(--accent-blue),
            0 0 15px var(--accent-blue);
        opacity: 0.8;
    }
}

.hologram-text {
    animation: hologram 4s ease-in-out infinite;
    position: relative;
}

.hologram-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #000000;
    opacity: 0.3;
    animation: glitch 0.3s ease-in-out infinite alternate;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}

/* 数据流动画 */
@keyframes dataFlow {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px));
        opacity: 0;
    }
}

.data-stream {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent-blue) 20%, 
        var(--accent-purple) 50%, 
        var(--accent-green) 80%, 
        transparent 100%);
    animation: dataFlow 8s linear infinite;
}

/* 3D卡片翻转效果 */
.card-3d {
    perspective: 1000px;
    width: 300px;
    height: 200px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(232, 227, 247, 0.3), rgba(225, 242, 255, 0.3), rgba(240, 230, 255, 0.3));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.card-back {
    transform: rotateY(180deg);
    background: var(--gradient-primary);
}

/* 波纹扩散效果 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

/* 磁悬浮效果 */
@keyframes levitate {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg);
        box-shadow: 0 10px 40px rgba(0, 212, 255, 0.2);
    }
    50% {
        transform: translateY(-20px) rotateX(5deg);
        box-shadow: 0 30px 60px rgba(0, 212, 255, 0.4);
    }
}

.levitate {
    animation: levitate 4s ease-in-out infinite;
}

/* 能量脉冲效果 */
@keyframes energyPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 30px rgba(0, 212, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0);
    }
}

.energy-pulse {
    animation: energyPulse 2s infinite;
}

/* 矩阵雨效果 */
@keyframes matrixRain {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.matrix-char {
    position: absolute;
    color: #000000;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    animation: matrixRain linear infinite;
    text-shadow: 0 0 10px var(--accent-green);
}

/* 页面过渡动画 */
.page-transition {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.page-transition.active {
    opacity: 1;
    transform: translateY(0);
}

/* 视差滚动效果 */
.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

/* 光线追踪效果 */
@keyframes rayTrace {
    0% {
        transform: translateX(-100%) skewX(-20deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(200vw) skewX(-20deg);
        opacity: 0;
    }
}

.light-ray {
    position: absolute;
    width: 2px;
    height: 100vh;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        var(--accent-blue) 30%, 
        var(--accent-purple) 70%, 
        transparent 100%);
    animation: rayTrace 6s ease-in-out infinite;
    filter: blur(1px);
}

/* 量子效应 */
@keyframes quantum {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(90deg);
        filter: hue-rotate(90deg);
    }
    50% {
        transform: scale(0.9) rotate(180deg);
        filter: hue-rotate(180deg);
    }
    75% {
        transform: scale(1.05) rotate(270deg);
        filter: hue-rotate(270deg);
    }
}

.quantum-effect {
    animation: quantum 8s ease-in-out infinite;
}

/* ========== 霸气科技感滚动增强动画 ========== */

/* 动态数据流效果 */
.dynamic-data-stream {
    pointer-events: none;
    z-index: 1;
}

/* 滚动光束效果 */
.scroll-light-beam {
    pointer-events: none;
    z-index: 2;
}

/* 边缘能量脉冲动画 */
@keyframes edgePulseFlash {
    0% {
        opacity: 0;
        transform: scaleY(0.5);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.2);
    }
    100% {
        opacity: 0;
        transform: scaleY(0.8);
    }
}

.edge-energy-pulse {
    pointer-events: none;
    z-index: 3;
}

/* 导航栏充能效果 */
.navbar.charging {
    box-shadow: 
        var(--shadow-glow),
        0 0 20px rgba(0, 212, 255, calc(var(--charging-intensity, 0) * 0.5)),
        inset 0 0 10px rgba(139, 92, 246, calc(var(--charging-intensity, 0) * 0.3));
    border-bottom: 1px solid rgba(0, 212, 255, calc(var(--charging-intensity, 0) * 0.8));
    transition: all 0.3s ease;
}

.navbar.charging::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 212, 255, calc(var(--charging-intensity, 0))) 20%,
        rgba(139, 92, 246, calc(var(--charging-intensity, 0))) 50%,
        rgba(16, 185, 129, calc(var(--charging-intensity, 0))) 80%,
        transparent 100%);
    animation: chargingFlow 2s linear infinite;
}

@keyframes chargingFlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 增强型滚动指示器 */
.scroll-indicator.energized {
    box-shadow: 
        0 0 10px rgba(0, 212, 255, calc(var(--energy-level, 0) * 0.8)),
        0 0 20px rgba(139, 92, 246, calc(var(--energy-level, 0) * 0.6));
    transform: translateY(-50%) scale(calc(1 + var(--energy-level, 0) * 0.2));
    transition: all 0.2s ease;
}

.scroll-indicator.energized .scroll-progress {
    box-shadow: 
        0 0 8px rgba(0, 212, 255, calc(var(--energy-level, 0))),
        inset 0 0 8px rgba(139, 92, 246, calc(var(--energy-level, 0) * 0.5));
    animation: energyPulse calc(2s - var(--energy-level, 0) * 1s) ease-in-out infinite;
}

/* 重量感元素入场动画 */
@keyframes gravityDrop {
    0% {
        opacity: 0;
        transform: translateY(-150px) scale(0.8) rotateX(90deg);
        filter: blur(10px);
    }
    30% {
        opacity: 0.7;
        transform: translateY(20px) scale(1.1) rotateX(15deg);
        filter: blur(3px);
    }
    60% {
        opacity: 0.9;
        transform: translateY(-10px) scale(0.95) rotateX(-5deg);
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0px);
    }
}

.gravity-drop {
    animation: gravityDrop 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* 冲击波扩散效果 */
@keyframes impactWave {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(2);
        opacity: 0.6;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.impact-wave {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(0, 212, 255, 0.8);
    border-radius: 50%;
    animation: impactWave 0.8s ease-out forwards;
    pointer-events: none;
}

/* 分层入场控制 */
.layered-entrance-1 { animation-delay: 0ms; }
.layered-entrance-2 { animation-delay: 100ms; }
.layered-entrance-3 { animation-delay: 200ms; }
.layered-entrance-4 { animation-delay: 300ms; }
.layered-entrance-5 { animation-delay: 400ms; }

/* 高级磁悬浮效果（增强版） */
@keyframes advancedLevitate {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg) rotateY(0deg);
        box-shadow: 
            0 10px 40px rgba(0, 212, 255, 0.2),
            0 0 0 0 rgba(139, 92, 246, 0);
    }
    25% {
        transform: translateY(-15px) rotateX(3deg) rotateY(2deg);
        box-shadow: 
            0 25px 50px rgba(0, 212, 255, 0.3),
            0 0 20px 5px rgba(139, 92, 246, 0.1);
    }
    50% {
        transform: translateY(-25px) rotateX(5deg) rotateY(-2deg);
        box-shadow: 
            0 35px 60px rgba(0, 212, 255, 0.4),
            0 0 30px 10px rgba(139, 92, 246, 0.2);
    }
    75% {
        transform: translateY(-15px) rotateX(3deg) rotateY(2deg);
        box-shadow: 
            0 25px 50px rgba(0, 212, 255, 0.3),
            0 0 20px 5px rgba(139, 92, 246, 0.1);
    }
}

.advanced-levitate {
    animation: advancedLevitate 6s ease-in-out infinite;
    will-change: transform, box-shadow;
}

/* 背景网格透视变形 */
@keyframes gridPerspective {
    0% {
        transform: perspective(1000px) rotateX(0deg) translateZ(0px);
    }
    100% {
        transform: perspective(1000px) rotateX(5deg) translateZ(50px);
    }
}

.grid-perspective {
    animation: gridPerspective 0.5s ease-out forwards;
}

/* 粒子尾流效果 */
@keyframes particleTrail {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0px);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2) translateY(-20px);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) translateY(-50px);
    }
}

.particle-trail {
    animation: particleTrail 1s ease-out forwards;
}

/* 能量跟随脉冲 */
@keyframes energyFollowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.8);
        background: rgba(0, 212, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(0, 212, 255, 0.3);
        background: rgba(139, 92, 246, 0.2);
    }
    100% {
        box-shadow: 0 0 0 40px rgba(0, 212, 255, 0);
        background: rgba(16, 185, 129, 0.1);
    }
}

.energy-follow-pulse {
    animation: energyFollowPulse 1.5s ease-out forwards;
}

/* 数据矩阵滚动效果 */
@keyframes dataMatrixScroll {
    0% {
        transform: translateY(-100vh) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(50px);
        opacity: 0;
    }
}

.data-matrix-char {
    position: absolute;
    color: rgba(0, 212, 255, 0.8);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 14px;
    animation: dataMatrixScroll linear infinite;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
    pointer-events: none;
}

/* 响应式动画调整 */
@media (max-width: 768px) {
    .card-3d {
        width: 250px;
        height: 150px;
    }
    
    .levitate {
        animation-duration: 6s;
    }
    
    .hologram-text {
        animation-duration: 6s;
    }
    
    /* 移动端降低动画复杂度 */
    .dynamic-data-stream {
        filter: blur(1px) !important;
    }
    
    .scroll-light-beam {
        opacity: 0.5 !important;
    }
    
    .advanced-levitate {
        animation-duration: 8s;
    }
    
    .navbar.charging::before {
        display: none;
    }
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}