/**
 * zhilian_xiaogou.css - 动态动画特效样式
 * 包含：科幻特效动画、粒子效果、3D变换、高级过渡动画、智能仓库装货动画
 */

/* ==================== 科幻球体特效 ==================== */
.sci-fi-container {
    perspective: 1000px;
}

/* 能量光环 */
.energy-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: energyRotate 4s linear infinite;
}

.ring-1 {
    width: 280px;
    height: 280px;
    border-top-color: rgba(0, 245, 255, 0.8);
    border-right-color: rgba(0, 168, 255, 0.4);
    animation-duration: 4s;
}

.ring-2 {
    width: 320px;
    height: 320px;
    border-bottom-color: rgba(0, 245, 255, 0.6);
    border-left-color: rgba(0, 102, 255, 0.3);
    animation-duration: 6s;
    animation-direction: reverse;
}

.ring-3 {
    width: 360px;
    height: 360px;
    border: 1px dashed rgba(0, 245, 255, 0.3);
    animation-duration: 8s;
}

@keyframes energyRotate {
    0% { transform: rotateX(60deg) rotateZ(0deg); }
    100% { transform: rotateX(60deg) rotateZ(360deg); }
}

/* 数据粒子 */
.data-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.data-particle {
    animation: particleFloat 3s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { 
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-20px) scale(1.2);
        opacity: 0.8;
    }
}

/* 脉冲波纹 */
.pulse-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(0, 245, 255, 0.5);
    opacity: 0;
}

.wave-1 {
    width: 260px;
    height: 260px;
    animation: pulseExpand 2s ease-out infinite;
}

.wave-2 {
    width: 300px;
    height: 300px;
    animation: pulseExpand 2s ease-out infinite 0.5s;
}

.wave-3 {
    width: 340px;
    height: 340px;
    animation: pulseExpand 2s ease-out infinite 1s;
}

@keyframes pulseExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* 扫描线 */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.8), transparent);
    animation: scanMove 3s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes scanMove {
    0%, 100% { top: 0; }
    50% { top: 100%; }
}

/* 连接线条 */
.connection-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.conn-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.5), transparent);
    animation: connPulse 2s ease-in-out infinite;
}

.line-1 {
    width: 100px;
    top: 30%;
    left: 10%;
    transform: rotate(30deg);
}

.line-2 {
    width: 80px;
    top: 50%;
    right: 15%;
    transform: rotate(-45deg);
    animation-delay: 0.5s;
}

.line-3 {
    width: 120px;
    bottom: 30%;
    left: 20%;
    transform: rotate(-30deg);
    animation-delay: 1s;
}

.line-4 {
    width: 90px;
    bottom: 40%;
    right: 20%;
    transform: rotate(45deg);
    animation-delay: 1.5s;
}

@keyframes connPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}

/* 轨道卫星 */
.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed rgba(0, 245, 255, 0.2);
    border-radius: 50%;
}

.orbit-1 {
    width: 300px;
    height: 300px;
    animation: orbitRotate 8s linear infinite;
}

.orbit-2 {
    width: 340px;
    height: 340px;
    animation: orbitRotate 12s linear infinite reverse;
}

.orbit-3 {
    width: 380px;
    height: 380px;
    animation: orbitRotate 16s linear infinite;
}

.orbit .satellite {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
}

.orbit-1 .satellite { top: -4px; left: 50%; transform: translateX(-50%); }
.orbit-2 .satellite { bottom: -4px; left: 50%; transform: translateX(-50%); }
.orbit-3 .satellite { top: 50%; right: -4px; transform: translateY(-50%); }

@keyframes orbitRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==================== 图表动画 ==================== */
.chart-container canvas {
    animation: chartFadeIn 1s ease-out;
}

@keyframes chartFadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ==================== 海运动画特效 ==================== */
.dynamic-shipping {
    position: relative;
}

/* 波浪动画 */
.wave-bg-1 {
    animation: waveMove1 3s linear infinite;
}

.wave-bg-2 {
    animation: waveMove2 4s linear infinite;
    opacity: 0.7;
}

.wave-bg-3 {
    animation: waveMove3 5s linear infinite;
    opacity: 0.5;
}

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

@keyframes waveMove2 {
    0% { transform: translateX(-20%); }
    100% { transform: translateX(-70%); }
}

@keyframes waveMove3 {
    0% { transform: translateX(-10%); }
    100% { transform: translateX(-60%); }
}

/* 船舶动画 */
.cargo-ship-dynamic {
    animation: shipFloat 3s ease-in-out infinite;
}

@keyframes shipFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(1deg); }
    75% { transform: translateY(-3px) rotate(-1deg); }
}

/* 船舶烟雾 */
.ship-smoke-large {
    position: absolute;
    top: -20px;
    left: 60%;
}

.smoke-lg {
    position: absolute;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, rgba(200, 200, 200, 0.8), transparent);
    border-radius: 50%;
    animation: smokeRise 2s ease-out infinite;
}

.smoke-lg-1 { animation-delay: 0s; }
.smoke-lg-2 { animation-delay: 0.5s; left: 10px; }
.smoke-lg-3 { animation-delay: 1s; left: -5px; }

@keyframes smokeRise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-40px) scale(2);
        opacity: 0;
    }
}

/* 船舶尾迹 */
.ship-wake {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.wake-line {
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), transparent);
    border-radius: 2px;
    animation: wakeFade 1s ease-out infinite;
}

.wake-1 { animation-delay: 0s; }
.wake-2 { animation-delay: 0.3s; width: 25px; }
.wake-3 { animation-delay: 0.6s; width: 20px; }

@keyframes wakeFade {
    0% { opacity: 0.8; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-20px); }
}

/* 雷达天线 */
.radar-antenna {
    position: absolute;
    top: -15px;
    right: 10px;
}

.radar-dish {
    width: 12px;
    height: 8px;
    background: linear-gradient(180deg, #666, #333);
    border-radius: 50% 50% 0 0;
    animation: radarRotate 2s linear infinite;
}

.radar-signal {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 245, 255, 0.5);
    border-radius: 50%;
    animation: radarPulse 1s ease-out infinite;
}

@keyframes radarRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes radarPulse {
    0% { transform: translateX(-50%) scale(0.5); opacity: 1; }
    100% { transform: translateX(-50%) scale(1.5); opacity: 0; }
}

/* 背景船舶 */
.background-ship {
    position: absolute;
    font-size: 20px;
    color: rgba(0, 245, 255, 0.3);
    animation: bgShipMove 20s linear infinite;
}

.ship-1 {
    bottom: 40px;
    left: -30px;
}

.ship-2 {
    bottom: 60px;
    right: -30px;
    animation-direction: reverse;
    animation-duration: 25s;
}

@keyframes bgShipMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 60px)); }
}

/* ==================== 智能仓库装货动画（12次循环） ==================== */
.warehouse-scene {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 245, 255, 0.05), rgba(0, 168, 255, 0.1));
    border-radius: 8px;
    overflow: hidden;
}

/* 装货信息显示 */
.loading-info {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--primary-color);
    z-index: 10;
}

.truck-number {
    font-weight: bold;
    background: rgba(0, 245, 255, 0.2);
    padding: 3px 10px;
    border-radius: 10px;
}

.load-progress {
    font-weight: bold;
    background: rgba(0, 245, 255, 0.2);
    padding: 3px 10px;
    border-radius: 10px;
}

/* 传送带 */
.conveyor-belt {
    position: absolute;
    bottom: 50px;
    left: 5%;
    right: 5%;
    height: 50px;
    background: linear-gradient(180deg, #333, #222);
    border-radius: 5px;
    border: 2px solid rgba(0, 245, 255, 0.3);
    overflow: hidden;
}

.belt-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        rgba(0, 245, 255, 0.5) 10px,
        rgba(0, 245, 255, 0.5) 20px
    );
    animation: beltMove 1s linear infinite;
}

@keyframes beltMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-20px); }
}

/* 货物箱子容器 */
.cargo-boxes {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 30px;
}

/* 货物箱子 */
.cargo-box-item {
    animation: boxAppear 0.5s ease-out;
}

@keyframes boxAppear {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* 卡车停车区 */
.truck-parking {
    position: absolute;
    bottom: 10px;
    right: 10%;
    width: 80px;
    height: 60px;
}

/* 卡车 */
.truck {
    font-size: 40px;
    position: relative;
    animation: truckIdle 2s ease-in-out infinite;
}

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

/* 卡车装货进度条 */
.truck-load-bar {
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.truck-load-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00f5ff, #ffd700);
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

/* 车辆离开动画 */
@keyframes truckLeave {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(200px) scale(0.8);
        opacity: 0;
    }
}

/* 车辆进入动画 */
@keyframes truckEnter {
    0% {
        transform: translateX(-200px) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* 装货机器人 */
.loading-robot {
    position: absolute;
    bottom: 50px;
    left: 60%;
    width: 40px;
    height: 60px;
}

.robot-arm {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 40px;
    background: linear-gradient(180deg, #888, #555);
    border-radius: 3px;
    transform-origin: bottom center;
}

.robot-claw {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 15px;
    background: linear-gradient(180deg, #999, #666);
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

/* 机器人装货动画 */
@keyframes robotLoad {
    0% { transform: translateX(-50%) rotate(-30deg); }
    50% { transform: translateX(-50%) rotate(30deg); }
    100% { transform: translateX(-50%) rotate(-30deg); }
}

/* ==================== 卡片入场动画 ==================== */
.glass-card {
    animation: cardEntrance 0.6s ease-out;
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 延迟入场 */
.left-column .glass-card:nth-child(1) { animation-delay: 0.1s; }
.left-column .glass-card:nth-child(2) { animation-delay: 0.2s; }
.left-column .glass-card:nth-child(3) { animation-delay: 0.3s; }

.center-column .glass-card:nth-child(1) { animation-delay: 0.15s; }
.center-column .glass-card:nth-child(2) { animation-delay: 0.25s; }
.center-column .glass-card:nth-child(3) { animation-delay: 0.35s; }
.center-column .glass-card:nth-child(4) { animation-delay: 0.45s; }

.right-column .glass-card:nth-child(1) { animation-delay: 0.2s; }
.right-column .glass-card:nth-child(2) { animation-delay: 0.3s; }
.right-column .glass-card:nth-child(3) { animation-delay: 0.4s; }
.right-column .glass-card:nth-child(4) { animation-delay: 0.5s; }

/* ==================== 数字滚动动画 ==================== */
.big-number {
    display: inline-block;
    animation: numberGlow 2s ease-in-out infinite;
}

@keyframes numberGlow {
    0%, 100% { 
        text-shadow: 0 0 5px rgba(0, 245, 255, 0.5);
    }
    50% { 
        text-shadow: 0 0 20px rgba(0, 245, 255, 0.8), 0 0 30px rgba(0, 168, 255, 0.6);
    }
}

/* ==================== 悬停特效 ==================== */
.glass-card:hover {
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 245, 255, 0.2);
    border-color: rgba(0, 245, 255, 0.4);
}

/* TOP7项目悬停 */
.top7-item:hover .rank-icon {
    animation: iconBounce 0.5s ease;
}

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

/* 合作车辆悬停 */
.coop-item:hover .coop-icon {
    animation: iconRotate 0.5s ease;
}

@keyframes iconRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 线路项目悬停 */
.route-item:hover {
    background: rgba(0, 245, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
}

.route-item:hover .route-city i {
    animation: pinBounce 0.5s ease;
}

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

/* ==================== 数据流动画 ==================== */
.data-flow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 245, 255, 0.1),
        transparent
    );
    animation: dataFlow 8s linear infinite;
}

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

/* ==================== 网格线动画 ==================== */
.grid-lines {
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ==================== 底部链接动画 ==================== */
.footer-link {
    position: relative;
    overflow: hidden;
}

.footer-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 245, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.footer-link:hover::before {
    left: 100%;
}

.footer-link i {
    transition: transform 0.3s ease;
}

.footer-link:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* ==================== 响应式动画调整 ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .energy-ring {
        display: none;
    }

    .orbit {
        display: none;
    }

    .background-ship {
        display: none;
    }

    .loading-info {
        font-size: 10px;
    }

    .truck {
        font-size: 30px;
    }
}