/* 站点地图样式 */
.sitemap-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 30px;
}

.sitemap-category h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* 树形结构样式 */
.sitemap-tree {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
}

.tree-node {
    margin: 0;
    padding: 0;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 3px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 3px 0;
    border: 1px solid transparent;
}

.tree-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: var(--bs-primary);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.1);
}

.tree-toggle {
    display: inline-block;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 22px;
    font-weight: bold;
    color: var(--bs-primary);
    margin-right: 10px;
    border: 2px solid var(--bs-primary);
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tree-toggle:hover {
    background: var(--bs-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.3);
}

.tree-toggle.expanded {
    background: var(--bs-primary);
    color: white;
    transform: rotate(0deg);
}

.tree-label {
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

/* 一级标题 */
.tree-children > .tree-node > .tree-item > .tree-label {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

/* 二级标题 */
.tree-children .tree-children > .tree-node > .tree-item > .tree-label,
.tree-children .tree-children > .tree-node > .tree-link > .tree-label {
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
}

/* 三级标题 */
.tree-children .tree-children .tree-children .tree-children .tree-node .tree-link > .tree-label {
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
}


.tree-link {
    text-decoration: none;
    color: #333;
    padding-left: 34px;
    margin: 10px 0 !important;
    display: block;
    transition: all 0.3s ease;
}

.tree-link:hover {
    color: var(--bs-primary);
    text-decoration: none;
    transform: translateX(3px);
}

.tree-children {
    margin-left: 24px;
    border-left: 2px solid #e9ecef;
    padding-left: 15px;
    position: relative;
}

.tree-children::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--bs-primary), #e9ecef);
}

.tree-children .tree-node:last-child {
    position: relative;
}

.tree-children .tree-node:last-child::after {
    content: '';
    position: absolute;
    left: -17px;
    top: 0;
    width: 2px;
    height: 20px;
    background: white;
}

/* 最后一级并排显示 - 与上级对齐，每个内容单独外框 */
.tree-children .tree-children .tree-children {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 24px;
    border-left: 2px solid #e9ecef;
    padding-left: 15px;
    margin-top: 6px;
    position: relative;
}

.tree-children .tree-children .tree-children::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--bs-primary), #e9ecef);
}

.tree-children .tree-children .tree-children .tree-node {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0px 6px;
    transition: all 0.2s ease;
}

.tree-children .tree-children .tree-children .tree-node:hover {
    background: #f8f9fa;
    border-color: var(--bs-primary);
    transform: none;
}

.tree-children .tree-children .tree-children .tree-link {
    padding-left: 0;
    text-align: center;
    font-weight: 500;
    color: #5d6d7e;
    font-size: 14px;
    text-decoration: none;
}

.tree-children .tree-children .tree-children .tree-link:hover {
    color: #5d6d7e;
    transform: none;
    text-decoration: none;
}

/* 手机适配 */
@media (max-width: 768px) {
    .sitemap-container {
        padding: 20px;
    }
    
    .tree-children {
        margin-left: 15px;
        padding-left: 10px;
    }
    
    .tree-children .tree-children {
        margin-left: 15px;
        padding-left: 10px;
    }
    
    .tree-children .tree-children .tree-children {
        margin-left: 15px;
        padding-left: 10px;
    }
    
    .tree-children .tree-children .tree-children {
        margin-left: 15px;
        padding-left: 10px;
        gap: 4px;
    }
    
    .tree-item {
        padding: 4px 10px;
    }
    
    .tree-toggle {
        width: 20px;
        height: 20px;
        line-height: 18px;
        font-size: 12px;
    }
    
    .tree-label {
        font-size: 14px;
    }
    
    .tree-children > .tree-node > .tree-item > .tree-label {
        font-size: 16px;
    }
    
    .tree-children .tree-children > .tree-node > .tree-item > .tree-label,
    .tree-children .tree-children > .tree-node > .tree-link > .tree-label {
        font-size: 15px;
    }
    
    .tree-children .tree-children .tree-children > .tree-node > .tree-item > .tree-label,
    .tree-children .tree-children .tree-children > .tree-node > .tree-link > .tree-label {
        font-size: 13px;
    }
    
    .tree-children .tree-children .tree-children .tree-node .tree-link > .tree-label {
        font-size: 12px;
    }
    
    .tree-children .tree-children .tree-children .tree-node {
        padding: 3px 8px;
    }
    
    .tree-children .tree-children .tree-children .tree-link {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .sitemap-container {
        padding: 15px;
    }
    
    .tree-children {
        margin-left: 10px;
        padding-left: 8px;
    }
    
    .tree-children .tree-children {
        margin-left: 10px;
        padding-left: 8px;
    }
    
    .tree-children .tree-children .tree-children {
        margin-left: 10px;
        padding-left: 8px;
    }
    
    .tree-children .tree-children .tree-children {
        margin-left: 10px;
        padding-left: 8px;
        gap: 3px;
    }
    
    .tree-item {
        padding: 6px 8px;
    }
    
    .tree-toggle {
        width: 18px;
        height: 18px;
        line-height: 16px;
        font-size: 11px;
    }
    
    .tree-label {
        font-size: 13px;
    }
    
    .tree-children > .tree-node > .tree-item > .tree-label {
        font-size: 15px;
    }
    
    .tree-children .tree-children > .tree-node > .tree-item > .tree-label,
    .tree-children .tree-children > .tree-node > .tree-link > .tree-label {
        font-size: 14px;
    }
    
    .tree-children .tree-children .tree-children > .tree-node > .tree-item > .tree-label,
    .tree-children .tree-children .tree-children > .tree-node > .tree-link > .tree-label {
        font-size: 12px;
    }
    
    .tree-children .tree-children .tree-children .tree-node .tree-link > .tree-label {
        font-size: 11px;
    }
    
    .tree-children .tree-children .tree-children .tree-node {
        padding: 2px 6px;
    }
    
    .tree-children .tree-children .tree-children .tree-link {
        font-size: 11px;
    }
}
