/* ============================================
   数据可视化中心 v2.0 - 深度趋势对比版样式
   ============================================ */

/* ===== 基础变量 ===== */
:root {
    --chart-primary: #1a6eff;
    --chart-primary-light: rgba(26, 110, 255, 0.08);
    --chart-secondary: #0d4fc4;
    --chart-accent: #3b82f6;
    --chart-danger: #dc2626;
    --chart-danger-light: rgba(220, 38, 38, 0.08);
    --chart-warning: #f59e0b;
    --chart-warning-light: rgba(245, 158, 11, 0.08);
    --chart-success: #10b981;
    --chart-success-light: rgba(16, 185, 129, 0.08);
    --chart-purple: #8b5cf6;
    --chart-purple-light: rgba(139, 92, 246, 0.08);
    --chart-teal: #14b8a6;
    --chart-pink: #ec4899;
    --chart-orange: #f97316;
    --chart-bg: #f8fafc;
    --chart-card-bg: #ffffff;
    --chart-border: #e2e8f0;
    --chart-text: #1e293b;
    --chart-text-secondary: #64748b;
    --chart-text-light: #94a3b8;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
    --shadow-hover: 0 4px 12px rgba(26, 110, 255, 0.08), 0 12px 32px rgba(0,0,0,0.06);
}

/* ===== 防止页面横向滚动 ===== */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* ===== 全局图片自适应 ===== */
img, svg, canvas {
    max-width: 100%;
    height: auto;
}

/* ===== 页面头部 ===== */
.viz-page-header {
    padding: 140px 0 40px;
    background: linear-gradient(180deg, #f0f5ff 0%, #ffffff 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.viz-page-header::before {
    content: '';
    position: absolute;
    top: -30%; right: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(26, 110, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}
.viz-page-header h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    color: var(--text);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}
.viz-page-header h1 .highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.viz-page-header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto 16px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}
/* ===== 数据可视化中心页眉标签 ===== */
    .viz-page-header .training-hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: rgba(26, 110, 255, 0.08);
        color: var(--chart-primary);
        font-size: 12px;
        font-weight: 600;
        padding: 6px 16px;
        border-radius: 100px;
        margin-bottom: 12px;
        border: 1px solid rgba(26, 110, 255, 0.15);
        position: relative;
        z-index: 1;
    }

    .viz-page-header .training-hero-badge svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

    @media (min-width: 768px) {
        .viz-page-header .training-hero-badge {
            font-size: 13px;
            padding: 8px 20px;
            margin-bottom: 16px;
        }
    }
.viz-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.viz-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
}
.viz-meta-item svg {
    width: 14px; height: 14px;
    color: var(--primary);
}

/* ===== 对比模式切换栏 ===== */
.compare-mode-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid var(--chart-border);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.compare-mode-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--chart-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.compare-mode-label::before {
    content: '';
    width: 4px; height: 18px;
    background: var(--primary-gradient);
    border-radius: 2px;
}
.compare-mode-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.compare-mode-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 20px;
    border-radius: 10px;
    border: 1px solid var(--chart-border);
    background: white;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 120px;
}
.compare-mode-tab:hover {
    border-color: var(--chart-primary);
    color: var(--chart-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26,110,255,0.1);
}
.compare-mode-tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(26,110,255,0.3);
}
.compare-mode-tab .mode-title {
    font-size: 14px;
    font-weight: 700;
}
.compare-mode-tab .mode-sub {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

/* ===== 概览指标卡片 ===== */
.viz-overview {
    padding: 40px 0 0;
}
.viz-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.viz-stat-card {
    background: var(--chart-card-bg);
    border: 1px solid var(--chart-border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.viz-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.viz-stat-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: rgba(26, 110, 255, 0.2);
}
.viz-stat-card:hover::before {
    transform: scaleX(1);
}
.viz-stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 20px;
}
.viz-stat-icon.blue { background: var(--chart-primary-light); color: var(--chart-primary); }
.viz-stat-icon.red { background: var(--chart-danger-light); color: var(--chart-danger); }
.viz-stat-icon.orange { background: var(--chart-warning-light); color: var(--chart-warning); }
.viz-stat-icon.green { background: var(--chart-success-light); color: var(--chart-success); }
.viz-stat-icon.purple { background: var(--chart-purple-light); color: var(--chart-purple); }
.viz-stat-value {
    font-size: 28px;
    font-weight: 900;
    color: var(--chart-text);
    line-height: 1.2;
    margin-bottom: 4px;
}
.viz-stat-value .unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--chart-text-secondary);
    margin-left: 2px;
}
.viz-stat-label {
    font-size: 13px;
    color: var(--chart-text-secondary);
    font-weight: 500;
    line-height: 1.4;
}
.viz-stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    margin-top: 10px;
}
.viz-stat-change.up {
    background: #fef2f2;
    color: var(--chart-danger);
}
.viz-stat-change.down {
    background: #f0fdf4;
    color: var(--chart-success);
}
.viz-stat-change.neutral {
    background: #f1f5f9;
    color: var(--chart-text-secondary);
}

/* ===== 概览洞察文本 ===== */
.overview-insights {
    background: linear-gradient(135deg, #f0f5ff 0%, #f8fafc 100%);
    border: 1px solid var(--chart-border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 20px;
}
.overview-insights h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--chart-text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.overview-insights h4::before {
    content: '💡';
}
.overview-insights ul {
    margin: 0;
    padding-left: 18px;
}
.overview-insights li {
    font-size: 13px;
    color: var(--chart-text-secondary);
    line-height: 1.8;
    margin-bottom: 4px;
}
.overview-insights li strong {
    color: var(--chart-text);
}

/* ===== 区块标题 ===== */
.viz-section {
    padding: 60px 0;
}
.viz-section.section-alt {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
}
.viz-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}
.viz-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.viz-section-title .icon {
    width: 44px; height: 44px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}
.viz-section-title .icon.apwg { background: rgba(26, 110, 255, 0.1); color: #1a6eff; }
.viz-section-title .icon.bec { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
.viz-section-title .icon.qr { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.viz-section-title .icon.coremail { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.viz-section-title .icon svg {
    width: 24px; height: 24px;
}
.viz-section-title h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--chart-text);
}
.viz-section-title p {
    font-size: 13px;
    color: var(--chart-text-secondary);
    margin-top: 3px;
}

/* ===== 图表卡片 ===== */
.viz-chart-grid {
    display: grid;
    gap: 24px;
}
.viz-chart-grid.col-2 {
    grid-template-columns: repeat(2, 1fr);
}
.viz-chart-grid.col-2 > .viz-chart-card {
    min-width: 0;
}
.viz-chart-grid.col-3 {
    grid-template-columns: repeat(3, 1fr);
}
.viz-chart-grid.col-3 > .viz-chart-card {
    min-width: 0;
}
.viz-chart-grid.col-1 {
    grid-template-columns: 1fr;
}
.viz-chart-card {
    background: var(--chart-card-bg);
    border: 1px solid var(--chart-border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.3s ease;
    display: inline-block;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}
.viz-chart-card:hover {
    box-shadow: var(--shadow-card);
    border-color: rgba(26, 110, 255, 0.15);
}
.viz-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.viz-chart-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--chart-text);
}
.viz-chart-source {
    font-size: 11px;
    color: var(--chart-text-light);
    background: var(--chart-bg);
    padding: 3px 10px;
    border-radius: 100px;
    font-weight: 500;
    flex-shrink: 0;
}
.viz-chart-container {
    width: 100%;
    height: 320px;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    min-width: 0;
}
.viz-chart-container.tall {
    height: 400px;
    min-height: 0;
}
.viz-chart-container.short {
    height: 260px;
    min-height: 0;
}

/* ===== 图表洞察文本 ===== */
.chart-insight {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 12px;
    color: var(--chart-text-secondary);
    line-height: 1.6;
    border-left: 3px solid var(--chart-primary);
}
.chart-insight strong {
    color: var(--chart-text);
}

/* ===== 来源标注 ===== */
.viz-source-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--chart-bg);
    border-radius: var(--radius-sm);
    margin-top: 16px;
    font-size: 12px;
    color: var(--chart-text-secondary);
    line-height: 1.6;
}
.viz-source-note svg {
    width: 14px; height: 14px;
    color: var(--chart-text-light);
    flex-shrink: 0;
}

/* ===== 加载动画 ===== */
.viz-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--chart-text-light);
    font-size: 14px;
    gap: 8px;
}
.viz-loading::after {
    content: '';
    width: 16px; height: 16px;
    border: 2px solid var(--chart-border);
    border-top-color: var(--chart-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== 滚动动画 ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 免责声明区域 ===== */
.disclaimer-section {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.disclaimer-card {
    background: white;
    border: 1px solid var(--chart-border);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    box-shadow: var(--shadow-card);
}
.disclaimer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.disclaimer-icon {
    width: 32px; height: 32px;
    background: var(--chart-warning-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--chart-warning);
}
.disclaimer-icon svg {
    width: 18px; height: 18px;
}
.disclaimer-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--chart-text);
}
.disclaimer-body p {
    font-size: 13px;
    color: var(--chart-text-secondary);
    line-height: 1.8;
    margin-bottom: 8px;
}
.disclaimer-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--chart-border);
    font-size: 12px;
    color: var(--chart-text-light);
}
.disclaimer-link {
    color: var(--chart-primary);
    text-decoration: none;
    font-weight: 600;
}
.disclaimer-link:hover {
    text-decoration: underline;
}

/* ===== 查看更多专题报告 Banner ===== */
.more-reports-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f0f5ff 0%, #ffffff 100%);
    border: 1px solid var(--chart-border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-top: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.more-reports-banner:hover {
    border-color: var(--chart-primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
}
.banner-icon {
    width: 48px; height: 48px;
    background: var(--chart-primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.banner-icon svg {
    width: 24px; height: 24px;
    color: var(--chart-primary);
}
.banner-text h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--chart-text);
    margin-bottom: 4px;
}
.banner-text p {
    font-size: 13px;
    color: var(--chart-text-secondary);
}
.banner-arrow {
    color: var(--chart-text-light);
    flex-shrink: 0;
}
.banner-arrow svg {
    width: 20px; height: 20px;
}

/* ===== 分页 ===== */
.report-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .viz-chart-grid.col-3,
    .viz-chart-grid.col-2 {
        grid-template-columns: 1fr;
    }
    .viz-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .compare-mode-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .compare-mode-tabs {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .compare-mode-tabs::-webkit-scrollbar { display: none; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 16px 24px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        gap: 4px;
        border-bottom: 1px solid var(--border);
        z-index: 999;
    }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: flex; }
    .nav-container { padding: 0 16px; }
    .logo-text { font-size: 14px; }
    .logo-text span { font-size: 10px; letter-spacing: 0.5px; }
    .logo-icon img { height: 36px; }

    .viz-page-header {
        padding: 120px 0 30px;
    }
    .viz-page-header h1 {
        font-size: 26px;
    }
    .viz-page-header p {
        font-size: 14px;
        padding: 0 16px;
    }
    .viz-meta {
        gap: 12px;
        padding: 0 16px;
    }
    .viz-meta-item {
        font-size: 12px;
    }

    .viz-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0;
    }
    .viz-stat-card {
        padding: 16px;
    }
    .viz-stat-value {
        font-size: 22px;
    }
    .viz-stat-icon {
        width: 36px; height: 36px;
        font-size: 16px;
    }
    .viz-stat-label {
        font-size: 12px;
    }
    .viz-stat-change {
        font-size: 11px;
        padding: 2px 6px;
    }

    .viz-section {
        padding: 40px 0;
    }
    .viz-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 0 16px;
    }
    .viz-section-title h2 {
        font-size: 18px;
    }
    .viz-section-title p {
        font-size: 12px;
    }
    .viz-section-title .icon {
        width: 36px; height: 36px;
    }
    .viz-section-title .icon svg {
        width: 20px; height: 20px;
    }

    .viz-chart-card {
        padding: 16px;
        margin: 0 16px;
        overflow: hidden;
        min-width: 0;
    }
    .viz-chart-container,
    .viz-chart-container.tall,
    .viz-chart-container.short {
        height: 280px;
        overflow: hidden;
        max-width: 100%;
        min-height: 0;
        min-width: 0;
    }
    .viz-chart-header {
        flex-direction: column;
        gap: 6px;
    }
    .viz-chart-title {
        font-size: 14px;
    }
    .chart-insight {
        font-size: 11px;
        padding: 8px 10px;
    }

    .viz-source-note {
        margin: 16px 16px 0;
        font-size: 11px;
        padding: 10px 12px;
    }

    .overview-insights {
        margin: 0 16px 16px;
        padding: 16px;
    }
    .overview-insights li {
        font-size: 12px;
    }

    .container {
        padding: 0;
    }
    .viz-section-body {
        overflow-x: hidden;
    }

    .more-reports-banner {
        margin: 16px 16px 0;
        padding: 16px;
    }
    .banner-content {
        gap: 12px;
    }
    .banner-icon {
        width: 40px; height: 40px;
    }
    .banner-text h4 {
        font-size: 14px;
    }
    .banner-text p {
        font-size: 12px;
    }

    .disclaimer-card {
        margin: 0 16px;
        padding: 20px;
    }
    .disclaimer-body p {
        font-size: 12px;
    }

    .footer {
        padding: 40px 0 24px;
    }
    .footer .container {
        padding: 0 16px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 32px;
    }
    .footer-brand .logo-icon img {
        height: 60px;
    }
    .footer-brand p {
        font-size: 13px;
        max-width: 100%;
    }
    .footer-col h4 {
        font-size: 13px;
        margin-bottom: 14px;
    }
    .footer-col li {
        margin-bottom: 8px;
    }
    .footer-col a {
        font-size: 13px;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-top: 20px;
    }
    .footer-bottom p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .viz-stats-grid {
        grid-template-columns: 1fr;
    }
    .viz-stat-card {
        padding: 14px;
    }
    .viz-stat-value {
        font-size: 24px;
    }
    .viz-chart-container,
    .viz-chart-container.tall,
    .viz-chart-container.short {
        height: 260px;
        min-height: 0;
        min-width: 0;
    }
    .viz-page-header h1 {
        font-size: 22px;
    }
    .viz-page-header p {
        font-size: 13px;
    }
    .compare-mode-tab {
        min-width: 100px;
        padding: 6px 12px;
    }
    .compare-mode-tab .mode-title {
        font-size: 12px;
    }
    .compare-mode-tab .mode-sub {
        font-size: 10px;
    }
}
