/* 视频背景响应式优化 */
@media (max-width: 768px) {
    .hero-video {
        object-fit: cover;
        object-position: center;
    }
    
    .video-overlay {
        background: rgba(0, 0, 0, 0.5); /* 移动端加深遮罩以提高文字可读性 */
    }
    
    .hero-content h2 {
        font-size: 2rem;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    }
    
    .hero-content p {
        font-size: 1.1rem;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    }
}

@media (max-width: 576px) {
    .video-overlay {
        background: rgba(0, 0, 0, 0.6); /* 小屏幕进一步加深遮罩 */
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    /* 确保视频在所有设备上正确显示 */
    .hero-video-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    .hero-video {
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;
        object-fit: cover;
    }
}

/* 视频加载优化 */
.hero-video {
    transition: opacity 0.5s ease-in-out;
}

.hero-video.loading {
    opacity: 0;
}

.hero-video.loaded {
    opacity: 1;
}

/* 视频播放控制（可选） */
.video-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.video-control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.video-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 视频替代方案（当视频无法加载时） */
.no-video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: -1;
}

.no-video-fallback .fallback-content {
    text-align: center;
    color: white;
}

.no-video-fallback h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.no-video-fallback p {
    font-size: 1.2rem;
    max-width: 600px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ==================== Hero内容切换动画 ==================== */

.hero-item h2 {
    animation: fadeInUp 0.6s ease-out;
}

.hero-item p {
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero-item .hero-buttons {
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

/* Hero内容淡入上移动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}