/* 限制页面内容宽度不超出页面 */
* {
    box-sizing: border-box;
}


/* 强行掐断超出屏幕边界的横向内容 */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; 
}

/* 重置基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* 模拟图片中带有微弱渐变的浅灰蓝背景 */
    background: linear-gradient(to bottom, #e8f0f5, #f5f8fa);
    min-height: 100vh;
}

/* 导航栏整体容器 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* 让子元素撑满高度 */
    height: 50px;
    /* 模拟图片中导航栏的蓝灰色 */
    background-color: #92b0c3; 
    border-bottom: 2px solid #fff;
}

/* 左侧导航链接区域 */
.nav-left {
    display: flex;
    align-items: center;
}

.nav-left a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

/* 悬停效果和当前激活页 (Home) 的效果 */
.nav-left a:hover, 
.nav-left a.active {
    background-color: #6b93aa; /* 图片中 Home 的深蓝色 */
}

/* Home主题部分人体美化 */
/* 主体内容容器 */
.main-content {
    max-width: 1300px;
    margin: 30px auto;
    padding: 0 20px;
}
/* All Cancers 总计卡片样式 */
.summary-card-all {
    background-color: white;
    border-radius: 10px;
    padding: 18px 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* 阴影稍微重一点，凸显层级 */
    margin-bottom: 25px; /* 和下方的网格拉开一点距离 */
    display: inline-block; /* 保证它只占用需要的宽度，并在左上角 */
}

.summary-card-all h2 {
    color: #2c3e50;
    font-size: 22px;
    margin: 0 0 10px 0;
}

.summary-card-all p {
    color: #555;
    font-size: 14px;
    font-weight: 600; /* 字体加粗一点 */
    margin: 0;
}

/* 核心三列网格布局 */
.dashboard-grid {
    display: grid;
    /* 左侧自适应，中间固定 400px 给人体图，右侧自适应 */
    grid-template-columns: 1fr 450px 1fr; 
    gap: 20px;
    align-items: stretch;
}

/* 左右两侧列 */
.side-column {
    display: flex;
    flex-direction: column;
    gap: 8px; /* 卡片之间的间距 */
}

/* 数据卡片样式 */
.data-card {
    background-color: white;
    border-radius: 6px;
    padding: 10px 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    z-index: 3;
}

.data-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.data-card h3 {
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 4px;
}

.data-card p {
    color: #666;
    font-size: 12px;
    margin: 0;
}

/* 中间人体图容器 */
.body-map-container {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* 关键：为了内部圆点的绝对定位 */
}

.body-map-placeholder {
    width: 100%;
    height: max-content;
    border-radius: 20px;
    display: inline-block;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
/* 防止图片撑爆容器 */
.human-body-img {
    max-width: 100%;
    max-height: auto;
    max-height: 850px;
    display: block;
    object-fit: contain; /* 保证图片完整显示且不变形 */
    mix-blend-mode: multiply;
}

/* 模拟人体图上的发光圆点 */
.anatomy-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #6b93aa;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #6b93aa, 0 0 10px rgba(107, 147, 170, 0.5);
    transform: translate(-50%, -50%); /* 确保中心点对齐 */
    cursor: pointer;
    z-index: 3;
}

.anatomy-dot:hover {
    background-color: #e74c3c;
    box-shadow: 0 0 0 2px #e74c3c, 0 0 15px rgba(231, 76, 60, 0.6);
}
/* 点与卡片连接的虚线 */
/* SVG 画布层，必须放在底部且不能阻挡鼠标点击 */
#line-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 让鼠标穿透 SVG，不影响点击卡片和圆点 */
    z-index: 2;
}

/* 确保网格内容在虚线之上 */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) auto minmax(280px, 1.2fr);
    gap: 30px; /* 拉大间距，防止线条乱交织 */
    align-items: stretch;
    position: relative;
    z-index: 1;
}

/* 虚线样式设计，还原图片效果 */
.connection-line {
    stroke: #7296b3; /* 虚线颜色：蓝灰色 */
    stroke-width: 1.5;
    stroke-dasharray: 4, 4; /* 每段实线长4px，间隔4px */
    fill: none;
    opacity: 0.6; /* 让虚线稍微柔和一点 */
}

/* 确保人体上的点在最顶层，不会被线盖住 */
.anatomy-dot {
    z-index: 2;
}
/* 卡片交互高亮动画 */
/* --- 交互高亮动画样式 --- */

/* 1. 卡片高亮效果：微微浮起，左侧加一条红色提示线 */
.data-card.highlight {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-left: 4px solid #e74c3c; 
    /* 覆盖掉原本的圆角一点点，更好看 */
    border-top-left-radius: 4px; 
    border-bottom-left-radius: 4px;
}

/* 2. 圆点高亮效果：变红、放大、发光 */
.anatomy-dot.highlight {
    background-color: #e74c3c;
    box-shadow: 0 0 0 2px #e74c3c, 0 0 15px rgba(231, 76, 60, 0.6);
    transform: translate(-50%, -50%) scale(1.3); /* 放大 1.3 倍 */
    z-index: 10; /* 保证发光的点在最上层 */
}

/* 3. 虚线高亮效果：变红、变粗、变成实线 */
.connection-line.highlight {
    stroke: #e74c3c;
    stroke-width: 2.5;
    stroke-dasharray: none; /* 取消虚线，变成连续的实线指示 */
    opacity: 1;
    z-index: 10;
}

/* 悬停提示css */
.tooltip-trigger {
    position: relative;
    color: #1f77b4;  /* 稍微给点主题蓝，暗示它可交互 */
    border-bottom: 1px dashed #1f77b4; /* 下划虚线 */
    font-weight: bold;
    white-space: nowrap;
}

.tooltip-trigger::after {
    /* 读取需要展示的文本 */
    content: attr(data-tooltip); 
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(50, 50, 50, 0.95);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
    width: 220px; /* 控制提示框的宽度 */
    text-align: left;
    font-weight: normal;
    
    /* 动画与层级 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    z-index: 9999;
    pointer-events: none; /* 防止鼠标误触提示框 */
}

/* 悬停时显示 */
.tooltip-trigger:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: 120%; /* 微微往上浮动的动画效果 */
}