/**
 * 树形图样式
 * 字体大小：13px
 */

/* 树形节点 */
.node {
    margin: 2px 0 2px 16px;
    border-left: 1px #999 dotted;
    padding-left: 6px;
    font-size: 16px;
    line-height: 1.8;
    position: relative;
}

/* 横线连接线 */
.node::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11.2px;
    width: 6px;
    height: 1px;
    background-color: #999;
    border-style: dotted;
    border-width: 0 0 1px 0;
}

/* 根节点不显示横线 */
.root > .node::before {
    display: none;
}

/* 子节点容器 */
.child {
    margin-left: 8px;
}

/* 树形卡片 */
.tree-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px;
    margin-top: 15px;
    max-height: 80vh;
    overflow-y: auto;
}

/* 树形标题 */
.tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tree-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

/* 世代标签 */
.gen-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 12px;
    background-color: #0d6efd;
    color: #fff;
    border-radius: 3px;
    margin-right: 5px;
}

/* 红色世代标签 */
.badge-red {
    background-color: #dc3545;
    color: #fff;
}

/* 人名链接 */
.tree-name {
    color: #333;
    text-decoration: none;
}

.tree-name:hover {
    color: #0d6efd;
    text-decoration: none;
}

/* 树形图中所有链接去掉下划线 */
.tree-container a {
    text-decoration: none;
}

/* 根节点样式 */
.tree-root {
    font-weight: 600;
    font-size: 14px;
}

/* 普通节点样式 */
.node a {
    color: #6c757d;
    text-decoration: none;
}

/* 高亮节点样式 */
.node.highlighted {
    font-weight: 600;
}

.node.highlighted a {
    color: #dc3545;
    text-decoration: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .node {
        margin-left: 15px;
        padding-left: 5px;
    }

    .child {
        margin-left: 8px;
    }
}