/* =========================================================
   产业链图谱 - 统一科技蓝配色系统
   ========================================================= */

/* ==================== 设计系统变量 ==================== */
:root {
    /* 主色调 - 科技蓝 */
    --primary-900: #1e3a5f;
    --primary-800: #1e40af;
    --primary-700: #1d4ed8;
    --primary-600: #2563eb;
    --primary-500: #3b82f6;
    --primary-400: #60a5fa;
    --primary-300: #93c5fd;
    --primary-200: #bfdbfe;
    --primary-100: #dbeafe;
    
    /* 强调色 - 仅用于链主 */
    --accent-gold: #f59e0b;
    --accent-gold-light: #fbbf24;
    
    /* 背景色 */
    --bg-dark: #0a0f1a;
    --bg-card: rgba(30, 41, 59, 0.6);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    
    /* 文字色 */
    --text-primary:#0a0f1a;
    --text-primary1: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* 边框 */
    --border-subtle: rgba(59, 130, 246, 0.2);
    --border-default: rgba(59, 130, 246, 0.3);
    --border-strong: rgba(59, 130, 246, 0.5);
    
    /* 发光 */
    --glow-primary: rgba(59, 130, 246, 0.4);
    --glow-gold: rgba(245, 158, 11, 0.4);
}

/* ==================== 产业链图谱区域 ==================== */
.chain-map-section {
    padding: 100px 0 120px;
    position: relative;
    overflow: hidden;
    background: url('/imcqy/public/images/chain-graph-bg.jpeg') center/cover no-repeat;
}

/* 深色叠加层 - 让背景图显示但不会太亮 */
.chain-map-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(10, 15, 26, 0.92) 0%, 
        rgba(15, 23, 42, 0.88) 50%, 
        rgba(10, 15, 26, 0.92) 100%
    );
    z-index: 1;
}

/* 网格背景 + 顶部光晕 */
.chain-map-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 2;
}

/* 顶部光晕效果 */
.chain-glow-top {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, var(--glow-primary) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}

.chain-map-section .container {
    position: relative;
    z-index: 10;
}

.chain-map-section .section-title {
    text-align: center;
    margin-bottom: 56px;
}

.chain-map-section .section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary1);
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.chain-map-section .section-title h2::after {
    display: none;
}

.chain-map-section .section-title p {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ==================== 产业切换导航 ==================== */
.chain-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
}

.chain-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.chain-tab:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-default);
    transform: translateY(-2px);
}

.chain-tab.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(30, 64, 175, 0.2) 100%);
    border-color: var(--primary-500);
    box-shadow: 0 0 20px var(--glow-primary);
}

.chain-tab .tab-icon {
    font-size: 20px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.chain-tab.active .tab-icon,
.chain-tab:hover .tab-icon {
    opacity: 1;
}

.chain-tab .tab-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.chain-tab.active .tab-name {
    color: var(--text-primary1);
}

.chain-tab .tab-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-400);
    background: rgba(59, 130, 246, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

/* ==================== 数据看板 ==================== */
.chain-header-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.chain-header-stats .stat-item {
    position: relative;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    overflow:hidden;
}

.chain-header-stats .stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    border-radius: 16px 16px 0 0;
}

.chain-header-stats .stat-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-default);
    transform: translateY(-2px);
}

.chain-header-stats .stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(30, 64, 175, 0.1) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.chain-header-stats .stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chain-header-stats .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary1);
    line-height: 1.2;
}

.chain-header-stats .stat-label {
    font-size: 12px;
    color:var(--primary-200);
    font-weight: 500;
}

/* ==================== 产业链可视化 ==================== */
.chain-visual {
    position: relative;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

/* 层级行布局 */
.chain-zone {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
    position: relative;
    margin-bottom: 20px;
}

.chain-zone:last-child {
    margin-bottom: 0;
}

/* 层级标签 */
.zone-label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    min-height: 90px;
    border-radius: 12px;
    border: 1px solid;
    transition: all 0.3s ease;
}

.zone-label .label-icon {
    font-size: 24px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.zone-label .label-text {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.02em;
}

/* 上游 - 深蓝 */
.chain-zone.upstream .zone-label {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.8) 0%, rgba(30, 64, 175, 0.4) 100%);
    border-color: var(--primary-700);
    color: var(--primary-200);
}

/* 中游 - 主蓝 */
.chain-zone.midstream .zone-label {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(59, 130, 246, 0.2) 100%);
    border-color: var(--primary-500);
    color: var(--primary-100);
}

/* 下游 - 浅蓝 */
.chain-zone.downstream .zone-label {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2) 0%, rgba(147, 197, 253, 0.1) 100%);
    border-color: var(--primary-400);
    color: var(--primary-200);
}

/* 节点区域 */
.zone-nodes {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0 10px 20px;
    flex-wrap: wrap;
}

/* 产业链节点 */
.chain-node {
    position: relative;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 170px;
    flex: 1;
    max-width: 200px;
}

.chain-node:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--border-default);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* 链主节点 - 仅用边框标识，不抢眼 */
.chain-node.highlight {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.05);
}

.chain-node.highlight:hover {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 20px rgba(245, 158, 11, 0.1);
}

/* 皇冠标识 */
.node-crown {
    position: absolute;
    top: -6px;
    right: 10px;
    font-size: 14px;
    opacity: 0.9;
}

/* 节点内容 */
.node-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.node-content .node-icon {
    font-size: 24px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.chain-node:hover .node-icon {
    opacity: 1;
}

.node-content .node-info {
    flex: 1;
    min-width: 0;
}

.node-content .node-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.node-content .node-count {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-400);
}

/* 隐藏冗余元素 */
.node-glow,
.node-bar,
.node-badge,
.node-enterprises {
    display: none;
}

/* ==================== 流程连接线 ==================== */
.chain-connector {
    position: relative;
    height: 32px;
    display: flex;
    align-items: center;
    padding-left: 70px;
    margin: 4px 0;
}

.chain-connector::before {
    content: '';
    position: absolute;
    left: 70px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, 
        var(--primary-600) 0%, 
        var(--primary-500) 50%, 
        var(--primary-400) 100%
    );
    opacity: 0.4;
}

.chain-connector::after {
    content: '↓';
    font-size: 14px;
    color: var(--primary-400);
    background: var(--bg-card);
    padding: 4px 8px;
    border-radius: 4px;
    position: absolute;
    z-index: 1;
    margin-left: auto;
        content: '↓';
    font-size: 14px;
    color: var(--primary-400);
    background: var(--bg-card);
    padding: 4px 8px;
    border-radius: 4px;
    position: absolute;
    z-index: 1;
    margin-left: auto;
    transform: translateX(-50%);
}

.chain-connector svg {
    display: none;
}

/* ==================== 链主企业展示 ==================== */
.chain-leaders {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
}

.chain-leaders::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-default), transparent);
}

.leaders-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding-right: 28px;
    border-right: 1px solid var(--border-subtle);
}

.leaders-title .title-icon {
    font-size: 28px;
    opacity: 0.9;
}

.leaders-title span:last-child {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.leaders-grid {
    display: flex;
    gap: 12px;
    flex: 1;
}

/* 链主企业卡片 */
.leader-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 240px;
}

.leader-item:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: var(--border-default);
    transform: translateY(-2px);
}

.leader-avatar {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.leader-info {
    flex: 1;
    min-width: 0;
}

.leader-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary1);
    margin-bottom: 2px;
}

.leader-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.leader-badge {
    padding: 4px 10px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--accent-gold-light);
    letter-spacing: 0.05em;
}

/* ==================== 图谱切换动画 ==================== */
.chain-graph {
    display: none;
    animation: chainGraphIn 0.4s ease;
}

.chain-graph.active {
    display: block;
}

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

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
    .chain-header-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chain-node {
        min-width: 150px;
        max-width: 180px;
    }
}

@media (max-width: 768px) {
    .chain-map-section {
        padding: 60px 0 80px;
    }
    
    .chain-map-section .section-title h2 {
        font-size: 28px;
    }
    
    .chain-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .chain-tab {
        padding: 10px 16px;
        min-width: calc(50% - 4px);
        justify-content: center;
    }
    
    .chain-header-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .chain-header-stats .stat-item {
        padding: 16px;
        flex-direction: column;
    }
    
    .chain-header-stats .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .chain-header-stats .stat-value {
        font-size: 22px;
    }
    
    .chain-visual {
        padding: 20px;
    }
    
    .chain-zone {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .zone-label {
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
        min-height: auto;
        padding: 12px 16px;
    }
    
    .zone-label .label-icon {
        margin-bottom: 0;
    }
    
    .zone-nodes {
        padding: 0;
        flex-direction: column;
    }
    
    .chain-node {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
    
    .chain-connector {
        height: 24px;
        padding-left: 0;
    }
    
    .chain-connector::before {
        display: none;
    }
    
    .chain-leaders {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
    }
    
    .leaders-title {
        flex-direction: row;
        padding: 0 0 12px 0;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        width: 100%;
        justify-content: center;
    }
    
    .leaders-grid {
        flex-direction: column;
        width: 100%;
    }
    
    .leader-item {
        min-width: auto;
        width: 100%;
    }

    .chain-connector::after{
        left: 50%;
        top: -50%;
    }
}
