:root {
    --sidebar-bg: #e1f0eb;
    --sidebar-border: #dde7f3;
    --content-bg: #fff;
    --radius: 20px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --transition: 0.3s;
    --top-gap: 40vh;
    --top-gap-button: 18vh;
    --max-content-width: 960px;
}





/* ==================================-- 子页面顶部 --============================== */
.top-holder {
    position: relative;
    top: 9vh;
    width: 100%;
    height: 100vh;
    background-color: #e6f2ff;
}

.top-box {
    width: 100%;
    height: 100%;
    background-color: #e6f2ff;
}

.top-box .sub-top-left {
    position: absolute;
    top: 8vh;
    left: -2vw;
}

.top-box .sub-top-left img {
    width: 130%;
    height: auto;
}

.top-box .sub-top-right {
    position: absolute;
    top: -5vh;
    right: 22vw;
}

.top-box .sub-top-right img {
    width: 230%;
    height: auto;
}

/* 给title加上一个聚光灯的效果  */
.top-box .title {
    position: relative;
    top: 16vh;
    left: 10vw;
    font-size: 8vw;
    font-weight: 800;
    color: #4d6297;
    margin-bottom: 10px;
}

.top-box .title:after {
    content: 'Description';
    position: absolute;
    top: 0;
    left: 0;
    color: transparent;
    background-image: linear-gradient(to right, #cb7c8e, rgb(204, 177, 135), #7faa9d,
            #94b0cd, #3f669a);
    background-clip: text;
    -webkit-background-clip: text;
    clip-path: circle(100px at 0% 50%);
    -webkit-clip-path: circle(100px at 0% 50%);
    animation: move 5s infinite;
}

@keyframes move {
    0% {
        clip-path: circle(100px at 0% 50%);
        -webkit-clip-path: circle(100px at 0% 50%);
    }

    50% {
        clip-path: circle(100px at 100% 50%);
        -webkit-clip-path: circle(100px at 100% 50%);
    }

    100% {
        clip-path: circle(100px at 0% 50%);
        -webkit-clip-path: circle(100px at 0% 50%);
    }
}

.top-box .title-desc {
    position: relative;
    top: 28vh;
    left: 9vw;
    padding-left: 12px;
    font-size: 20px;
    font-weight: 500;
    color: #38466b;
}

.sub-top-down {
    display: block;
    position: relative;
    bottom: 21%;
    left: 0;
    width: 100%;
    z-index: 2;
    /* ！！！【响应】这里可能得根据宽度进行调整 */
}

.sub-top-down img {
    width: 104%;
}










/* ====================================== -- 文档部分 --=============================== */
.DT-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: calc(var(--top-gap) * -0.2);
    padding-top: 30vh;
    padding-bottom: 30vh;
    min-height: calc(100vh - var(--top-gap));
    background: linear-gradient(to right, #fcfdff, #d1e3fc);
    transition: margin-left 0.3s;
}

.sidebar-card {
    position: sticky;
    top: 14vh;
    left: initial;
    display: flex;
    flex-direction: column;
    width: 290px;
    min-width: 160px;
    max-width: 60vw;
    max-height: 77vh;
    margin-left: 50px;
    padding-bottom: 3vh;
    background: #d3e4fc;
    border-radius: 14px;
    opacity: 1;
    pointer-events: auto;
    overflow: auto;
    transition: transform 0.3s, left 0.3s, opacity 0.3s;
    z-index: 10;

    scrollbar-color: #9aacdd #efefef;
    scrollbar-width: thin;
}

.sidebar-card::-webkit-scrollbar {
    width: 8px;
}

.sidebar-card::-webkit-scrollbar-track {
    background: #efefef;
    border-radius: 4px;
}

.sidebar-card::-webkit-scrollbar-thumb {
    background: #9aacdd;
    border-radius: 4px;
}

.sidebar-card::-webkit-scrollbar-thumb:hover {
    background: #9f8abc;
}

/* 侧栏关闭时，彻底隐藏sidebar-card，不占文档流 */
.sidebar-card.closed {
    position: fixed !important;
    left: -400px !important;
    opacity: 0;
    pointer-events: none;
    transition: left 0.3s, opacity 0.3s;
}

.sidebar-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 0 24px;
    font-size: 1.2em;
    font-weight: bold;
}

.sidebar-header span {
    padding: 12px 12px;
    font-size: 1.4em;
    font-weight: 500;
}

.sidebar-toggle-btn {
    position: absolute;
    top: 0;
    right: 6%;
    margin-top: 28px;
    width: 3vw;
    height: 3vw;
    cursor: pointer;
    padding: 0px 6px;
    border: none;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.sidebar-toggle-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-toggle-btn:hover {
    background-color: #fbe2e292;
}

.sidebar-card ul {
    list-style: none;
    padding: 0px 10px 0px 16px;
    margin: 0px;
    line-height: 1.1;
}

.sidebar-card>ul>li {
    margin: 12px 0px;
    position: relative;
}

.sidebar-card li {
    margin: 0px;
    position: relative;
}

.sidebar-card a {
    display: block;
    padding: 4px 10px 0px 40px;
    color: rgb(14, 30, 45);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.sidebar-card>a {
    margin: 5px 0px;
}

.sidebar-card a:hover {
    color: rgb(57, 126, 230);
    transform: scale(1.02);
    background: rgba(57, 126, 230, 0.1);
    border-radius: 10px;
}

.sidebar-card a.active,
.sidebar-card a:focus {
    font-size: 17px;
    font-weight: 500;
    color: #c198a6;
    border-radius: 8px;
}

.sidebar-card ul ul {
    padding-left: 18px;
    border-left: 2px solid #b2bdc2;
}

.sidebar-card ul ul li {
    margin-bottom: 5px;
}

/* 折叠按钮样式 - 已修改为脱离 <a> 标签 */
.toggle-btn {
    position: absolute;
    left: 12px;
    top: 6px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 2;
}

.toggle-btn.collapsed {
    transform: rotate(0deg);
}

/* 使用伪元素创建箭头图标 */
.toggle-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid #4e659c;
    transform: translate(-50%, -50%) rotate(90deg);
    transition: transform 0.2s;
}

.toggle-btn.collapsed::before {
    transform: translate(-50%, -50%) rotate(0deg);
}

.has-children .toggle-btn {
    display: block;
}

/* 折叠状态下的子菜单 */
.collapsed~ul {
    display: none;
}

.content-card {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    flex: 1 1 0;
    max-width: 1100px;
    min-width: 50px;
    min-height: 520px;
    margin: 0 auto;
    padding: 5px 10px 40px 10px;
    word-break: break-word;
    transition: margin 0.3s;
    background-color: #FFFAF7CF;
}

.content-card .sub-main-left {
    position: absolute;
    bottom: 10vh;
    left: -30vw;
}

.content-card .sub-main-left img {
    width: 160%;
}

.content-card .sub-main-right {
    position: absolute;
    top: -16vh;
    right: 0;
    z-index: 2;
}

.content-card .sub-main-right img {
    width: 150%;
}

.content-inner {
    width: 92%;
    margin: 0 3% 0 3%;
    z-index: 10;
    text-align: justify;
}

.content-card .content-title {
    margin: 10px 0px 30px 0px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 5px solid #6688cc;
    font-size: 8vh;
    font-weight: 900;
    color: #4e5794;

}

.content-card h1 {
    margin: 60px 0px 20px 0px;
    padding-bottom: 10px;
    border-bottom: 4px solid #dcdcdc;
    color: #436195;
    font-size: 38px;
    font-weight: 700;
}

.content-card h2 {
    margin: 30px 0px 12px 0px;
    color: #5471aa;
    font-size: 28px;
    font-weight: 700;
}

.content-card h3 {
    margin: 20px 0px 10px 0px;
    color: #5471aa;
    font-weight: 700;
    font-size: 24px;
}

.content-card p {
    margin: 10px 0px 17px 0px;
    color: #000;
    line-height: 1.5;
    font-size: 17px;
    font-weight: 400;
}

.content-card .img1 {
    display: block;
    width: 300px;
    margin: 30px auto;
}

.sidebar-show-btn {
    /* display: none; */
    position: fixed;
    align-items: center;
    justify-content: center;
    left: 30px;
    top: 30vh;
    width: 60px;
    height: 60px;
    background-color: rgba(243, 209, 231, 0.595);
    border: 2px solid #114da1;
    border-radius: 50%;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    font-size: 5vh;
    font-weight: 900;
    color: #fff;
    transition: background 0.2s, opacity 0.2s;
    opacity: 0.85;
    cursor: pointer;
    z-index: 25;
}

.sidebar-show-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-show-btn:hover {
    color: #345;
    background: #f7fafd;
}

.wrapper.sidebar-closed {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
}

.wrapper.sidebar-closed .content-card {
    margin: 0 auto !important;
    max-width: var(--max-content-width);
    width: 100%;
    flex: none !important;
}


@media (max-width: 1100px) {
    .content-card {
        padding: 28px 12px;
    }

    .sidebar-card {
        margin-left: 10px;
    }

    .wrapper {
        gap: 10px;
    }
}

@media (max-width: 850px) {
    .sidebar-card {
        width: 190px;
        min-width: 120px;
    }
}

@media (max-width: 700px) {
    .wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: 0;
    }

    .sidebar-card {
        position: fixed;
        left: 0;
        top: var(--top-gap);
        width: 86vw;
        max-width: 320px;
        min-width: 120px;
        margin-left: 0;
        z-index: 20;
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.09);
        border-radius: 0 var(--radius) var(--radius) 0;
        transition: transform var(--transition), left 0.3s, opacity 0.3s;
    }

    .content-card {
        margin: 0 6px;
        padding: 20px 6vw;
        border-radius: var(--radius);
    }

    .sidebar-show-btn {
        display: flex;
        top: calc(var(--top-gap) + 8px);
    }

    .wrapper.sidebar-closed .content-card {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

@media (max-width: 500px) {
    .content-inner {
        max-width: 98vw;
    }

    .content-card {
        padding: 9vw 2vw;
    }

    .sidebar-card {
        top: calc(var(--top-gap) - 2vw);
    }
}




/*  ===========================  标题太长的特殊处理  ================================ */
h2.need-short {
    opacity: 0;
    margin: 0;
    font-size: 1px;
    font-weight: 100;
}

p.short-origin {
    margin: 10px 0px 10px 0px;
    color: #5471aa;
    font-size: 4vh;
    font-weight: 700;
}

h1.need-short {
    opacity: 0;
    margin: 0;
    font-size: 1px;
    font-weight: 100;
}

p.short-origin-h1 {
    margin: 60px 0px 20px 0px;
    padding-bottom: 8px;
    color: #436195;
    font-size: 5.5vh;
    font-weight: 700;
    border-bottom: 4px solid #ebdfbc;
}

/*  ==========================  参考文献  =============================  */
.refer h1 {
    color: #574372;
}

.refer p {
    font-size: 14px;
    font-weight: 300;
}



/* =============== 上标 ==================== */
sup {
    font-size: 0.60em;
    vertical-align: super;
    line-height: 0;
}



/* ==============================  description imgs  ================================= */
/* 文档里放置的图片  单图 */
.desc-img1,
.desc-img2,
.desc-img3,
.desc-img4{
    width: 80%;
    margin: 50px auto;
    padding: 10px;
    background-color: #fff;
    box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    text-align: center;
}

.desc-img5{
    width: 55%;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    text-align: center;
}


.desc-img6{
    width: 55%;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    text-align: center;
}

.desc-img7{
    width: 80%;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    text-align: center;
}

.desc-img8{
    width: 60%;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    text-align: center;
}

.desc-img13{
    width: 80%;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    text-align: center;
}

.desc-img14{
    width: 80%;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    text-align: center;
}

.desc-img1 img{
    display: block;
    width: 65%;
    margin: 0 auto;
    object-fit: contain;
    flex-shrink: 0;
}


.desc-img2 img,
.desc-img4 img {
    display: block;
    width: 80%;
    margin: 0 auto;
    object-fit: contain;
    flex-shrink: 0;
}

.desc-img3 img{
    display: block;
    width: 85%;
    margin: 0 auto;
    object-fit: contain;
    flex-shrink: 0;
}

.desc-img6 img {
    display: block;
    width: 75%;
    margin: 0 auto;
    object-fit: contain;
    flex-shrink: 0;
}

.desc-img5 img {
    display: block;
    /* width: 240px; */
    width: 88%;
    margin: 0 auto;
    object-fit: contain;
    flex-shrink: 0;
}

.desc-img7 img {
    display: block;
    width: 95%;
    margin: 0 auto;
    margin-left: -10px;
    padding-left: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

.desc-img13 img {
    display: block;
    width: 98%;
    margin: 0 auto;
    margin-left: -20px;
    padding-left: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

.desc-img8 img {
    display: block;
    /* width: 240px; */
    width: 88%;
    margin: 0 auto;
    object-fit: contain;
    flex-shrink: 0;
}

.desc-img14 img {
    display: block;
    width: 95%;
    margin: 0 auto;
    margin-left: -5px;
    padding-left: 30px;
    object-fit: contain;
    flex-shrink: 0;
}



/* 文档里放置的图片  双图 */
.desc-double-imgs1,
.desc-double-imgs2,
.desc-double-imgs3,
.desc-double-imgs4 {
    display: flex;
    flex-direction: column;
    width: 80%;
    margin: 50px auto;
    padding: 30px 30px 10px;
    background-color: #fff;
    box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    text-align: center;
}

.desc-db-imgs-holder1,
.desc-db-imgs-holder2,
.desc-db-imgs-holder3,
.desc-db-imgs-holder4 {
    display: flex;
    align-items: center;
    justify-self: center;
    flex-direction: row;
    width: 100%;
    /* gap: 20px; */
}

.desc-db-imgs-holder1 img,
.desc-db-imgs-holder2 img,
.desc-db-imgs-holder3 img,
.desc-db-imgs-holder4 img {
    display: block;
    width: 48%;
    margin: 0 auto;
    object-fit: contain;
    flex-shrink: 0;
}



/*  ===== 图注 ===== */
.sub-img-cpt {
    text-align: center;
    color: #000;
    font-size: 12px;
    font-weight: 600;
    padding: 12px 30px;
}


/* ==============================  轮播组件  ================================= */
.carousel-container {
    max-width: 900px;
    width: 100%;
    margin: 50px auto;      /* ✅ 修复：使用margin居中 */
}

.carousel-wrapper {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    padding: 20px;
}

.image-description {
    text-align: center;
    padding: 0;
    margin: 10px;
    background: #ffffff;
    border-radius: 8px;
    color: #114da1;
    font-size: 20px;
    font-weight:700;
    line-height: 1.6;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.image-container {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0px;
    background: #ffffff;
    border-radius: 8px;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.nav-btn.prev {
    left: 10px;      /* ✅ 修复：改为内部定位 */
}

.nav-btn.next {
    right: 10px;     /* ✅ 修复：改为内部定位 */
}

.counter {
    text-align: center;
    margin-top: 15px;
    color: #114da1;
    font-size: 14px;
}

/* 响应式优化 */
@media (max-width: 850px) {
    .carousel-container {
        max-width: 95%;
    }
    
    .carousel-wrapper {
        padding: 20px;
    }
    
    .image-container {
        height: 300px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

     .image-description {
        font-size: 14px;
        padding: 12px 15px;
    }
}