/* 加载动画 - 优化性能 */
/* 加载器样式 */
.loader {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #4CAF50;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 9999;
    background: transparent;
    will-change: transform;
}

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

/* 基础响应式和性能优化设置 */
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 性能优化相关样式 */
/* 避免布局抖动 */
.header, .nav, .container {
    contain: layout size;
}

/* 优化动画性能 - 使用GPU加速 */
.feature-card, .match-card, .hero-btn, .team-logo {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

/* 图片懒加载相关样式 */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* 响应式设计 - 整合所有媒体查询规则 */
@media (max-width: 768px) {
    /* 基础字体大小 */
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.6em;
    }

    h3 {
        font-size: 1.4em;
    }

    /* 导航栏 */
    nav {
        flex-direction: column;
        align-items: center;
    }

    nav a {
        margin: 10px 0;
    }

    /* 网格布局调整 */
    .team-info,
    .news-container {
        grid-template-columns: 1fr;
    }

    /* 表单元素 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9em;
    }

    /* 按钮 */
    .btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    /* 视频容器 */
    .video-container {
        flex-direction: column;
    }

    .video-extension {
        margin: 10px 0;
    }
}