/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #006eff;
    --primary-hover: #0052cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --gray-text: #6c757d;
    --border-color: #e9ecef;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #006eff 0%, #0052cc 100%);
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 106, 255, 0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 主内容区 */
.main {
    flex: 1;
    padding: 30px 0;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--dark-text);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 性能指标卡片 */
.metrics-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--light-bg);
    border-radius: 8px;
}

.metric-label {
    font-size: 13px;
    color: var(--gray-text);
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* 内容卡片 */
.content-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.text-content h3 {
    font-size: 1.25rem;
    color: var(--dark-text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.text-content h4 {
    font-size: 1.1rem;
    color: var(--dark-text);
    margin: 24px 0 12px;
}

.text-content p {
    color: var(--gray-text);
    margin-bottom: 16px;
    line-height: 1.8;
}

.text-content ul {
    list-style: none;
    padding-left: 0;
}

.text-content li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--gray-text);
}

.text-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.text-content li strong {
    color: var(--dark-text);
}

/* 图片网格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.image-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover .image-wrapper img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-card:hover .image-overlay {
    opacity: 1;
}

.image-overlay span {
    color: white;
    font-size: 14px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.image-info {
    padding: 16px;
}

.image-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.image-metric {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.image-metric .label {
    color: var(--gray-text);
}

.image-metric .value {
    color: var(--primary-color);
    font-weight: 500;
}

.image-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.image-actions .btn {
    flex: 1;
}

/* 视频容器 */
.video-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.video-container video {
    width: 100%;
    max-height: 500px;
    border-radius: 8px;
    background: #000;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content img {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-actions {
    text-align: center;
    margin-top: 20px;
}

/* 页脚 */
.footer {
    background: white;
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer .copyright {
    color: var(--gray-text);
    font-size: 14px;
    margin-bottom: 8px;
}

.footer .icp {
    color: var(--gray-text);
    font-size: 13px;
}

.footer .icp span {
    color: var(--primary-color);
}

/* 加载状态 */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        height: auto;
        padding: 16px 20px;
        gap: 12px;
    }

    .nav {
        width: 100%;
        justify-content: center;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }

    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .metrics-card {
        grid-template-columns: 1fr;
    }

    .content-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr;
    }
}
