/* ============================================================
   assets/doc/css/uniform.css
   帮助中心 / 开发文档 —— 与站点首页 index2 视觉统一
   2026-10-30
   仅做「外观 + 布局重排」，不改动功能逻辑（zTree / 高亮 / 搜索保持原样）
   ============================================================ */

/* ---------- 顶部头图（与站内「服务条款」页同款深紫渐变） ---------- */
.doc-bann{
    background:linear-gradient(200deg,#221746 0%,#4a34a7 55%,#7b5cff 100%);
    min-height:210px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:0 20px;
}
.doc-bann .h3{
    margin:0;
    font-size:30px;
    font-weight:800;
    letter-spacing:2px;
    color:#fff;
}
.doc-bann .sub{
    max-width:760px;
    margin:14px auto 0;
    font-size:13.5px;
    line-height:1.9;
    color:#cfc5f2;
}
.doc-bann .crumbs{
    margin-top:14px;
    font-size:12.5px;
    color:#b9aef0;
}
.doc-bann .crumbs a{color:#fff;opacity:.85;}
.doc-bann .crumbs a:hover{opacity:1;}

/* ---------- 主体：左目录 + 右正文 ---------- */
.doc-wrap{
    max-width:1250px;
    margin:-46px auto 0;
    padding:0 22px 8px;
    position:relative;
    z-index:2;
    display:flex;
    gap:24px;
    align-items:flex-start;
}

/* 左：目录卡片（覆盖 layui .layui-nav-side 的固定定位） */
#leftbar.layui-nav-side,
#leftbar{
    position:sticky !important;
    top:88px;
    left:auto !important;
    right:auto !important;
    width:272px;
    flex:none;
    max-height:calc(100vh - 112px);
    overflow:auto;
    background:#fff !important;
    border:1px solid #eceaff !important;
    border-radius:18px !important;
    box-shadow:0 22px 55px -34px rgba(74,52,167,.45) !important;
    padding:6px 8px 12px;
    box-sizing:border-box;
}
#leftbar .layui-tab-title{border-color:#eceaff;}
#leftbar .layui-tab-title li{font-size:14px;font-weight:700;color:#33208c;}
#leftbar .layui-tab-title .layui-this{color:#5b3df5;}
#leftbar .layui-tab-title .layui-this:after{border-bottom-color:#5b3df5;}
/* docView.js 会按像素重算该容器高度，这里失效化以免目录区被压扁 */
#leftbar .layui-tab-content{
    max-height:none !important;
    height:auto !important;
    overflow:visible !important;
    padding:10px 4px 0;
}
#leftbar .copyright{display:none;}

/* 目录树选中态换成品牌紫 */
#treeDirectory a.curSelectedNode{
    background-color:rgba(91,61,245,.10) !important;
    border-color:transparent;
    border-radius:8px;
}
#treeDirectory a.curSelectedNode span,
#treeDirectory a.curSelectedNode .node_name{
    color:#5b3df5 !important;
    font-weight:700;
}

/* 右：正文卡片（覆盖原的全屏 absolute 布局） */
#body{
    position:static !important;
    top:auto !important;
    left:auto !important;
    height:auto !important;
    width:auto !important;
    padding:0 !important;
    margin:0 !important;
    flex:1;
    min-width:0;
    background:#fff;
    border:1px solid #eceaff;
    border-radius:18px;
    box-shadow:0 22px 55px -34px rgba(74,52,167,.45);
    overflow:hidden;
}
#content_body{
    width:100% !important;
    height:auto !important;
    overflow:visible !important;
    border:0 !important;
    margin:0 !important;
}
#article-content{padding:26px 34px 34px;}

/* 锚点标题避开 sticky 头部 */
#article-content h1,
#article-content h2,
#article-content h3{scroll-margin-top:92px;}

/* 正文内表格与代码块：圆角卡片化，避免溢出 */
#article-content table{
    width:100%;
    border-collapse:collapse;
    margin:14px 0;
    font-size:13.5px;
}
#article-content table th,
#article-content table td{
    border:1px solid #eceaff;
    padding:9px 12px;
    text-align:left;
    line-height:1.7;
}
#article-content table th{background:#f7f6fd;color:#33208c;font-weight:700;}
#article-content pre,
#article-content .syntaxhighlighter{
    border-radius:12px !important;
    border:1px solid #eceaff !important;
    margin:14px 0 !important;
    overflow:auto !important;
}
#article-content h1{font-size:25px;color:#221746;}
#article-content h2{font-size:20px;color:#33208c;}
#article-content h3{font-size:16px;color:#33208c;}

/* 遗留移动端遮罩层：已无触发入口，屏蔽以免拦截点击 */
#mask{display:none !important;}

/* ---------- 响应式 ---------- */
@media (max-width:1000px){
    .doc-bann{min-height:150px;}
    .doc-bann .h3{font-size:24px;}
    .doc-wrap{
        margin-top:-30px;
        flex-direction:column;
        gap:16px;
    }
    #leftbar.layui-nav-side,
    #leftbar{
        position:static !important;
        top:auto !important;
        width:auto !important;
        max-height:none;
    }
    #article-content{padding:20px 18px 26px;}
}
