  
/* 字体图标 */

@font-face {
    font-family: 'Play';
    src: url('https://static.igem.wiki/teams/5872/materials/fonts/playregular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}




.content-inner h1,
.content-inner h2,
.content-inner h3 {
    scroll-margin-top: 90px;
    /* 根据你的导航栏高度调整 */
}

: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;
}

*:not(.equation) {
    padding: 0;
    margin: 0;

}

body:not(.equation) {
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
    font-family: 'Play';

}


/* ==================================-- 子页面顶部 --============================== */
.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;
}

.top-box .title-desc {
    position: relative;
    top: 26vh;
    left: 10vw;
    width: 70%;
    padding-left: 12px;
    font-size: 20px;
    font-weight: 500;
    color: #38466b;
    text-align: justify;
    padding: 20px 0px 20px 0px;
    /* background-color: #ffffffc7; */
    border-radius: 16px;
}








/* ====================================== -- 文档部分 --=============================== */
.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: 16vh;
    left: initial;
    display: flex;
    flex-direction: column;
    width: 270px;
    min-width: 160px;
    max-width: 60vw;
    max-height: 82vh;
    margin-left: 50px;
    padding-bottom: 4vh;
    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;
}

/* 可选：hover 效果更细腻 */
.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: 4px 10px 0px 16px;
    margin: 0px;
    line-height: 1.3;
}

.sidebar-card>ul>li {
    margin: 16px 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: 1300px;
    min-width: 50px;
    min-height: 500px;
    margin: 0 auto;
    /* padding: 5px 10px 40px 10px; */
    word-break: break-word;
    transition: margin 0.3s;
}

.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: 100%;
    margin: 0 5% 0 4%;
    z-index: 10;
    text-align: justify;
    background-color: #fffaf7cf;
    border-radius: 20px;
    padding: 25px 40px;
}

.content-card .content-title {
    margin: 10px 0px 30px 0px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 5px solid #6688cc;
    font-size: 5vh;
    font-weight: 900;
    color: #4e5794;
}

.content-card h1 {
    margin: 60px 0px 20px 0px;
    border-bottom: 2px solid #dcdcdc;
    color: #436195;
    font-size: 5vh;
    font-weight: 700;
}

.content-card h2 {
    margin: 30px 0px 12px 0px;
    color: #5471aa;
    font-size: 26px;
    font-weight: 700;
}

.content-card h3 {
    margin: 20px 0px 10px 0px;
    color: #5471aa;
    font-weight: 700;
    font-size: 3.5vh;
}

.content-card p {
    margin: 10px 0px 14px 0px;
    /* text-indent: 2em; */
    color: #000;
    font-size: 17px;
    line-height: 1.4;
    /* font-weight: 200; */
}

strong {
    font-size: 18px;
}

.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);
    }
}


/*  ============================  折叠栏 ============================ */
.sub-accordion {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.sub-accordion-item {
    background: white;
    border-bottom: 1px solid #eaeaea;
}

.sub-accordion-item:last-child {
    border-bottom: none;
}

.sub-accordion-header {
    padding: 15px 20px;
    background: #dde4fe;
    color: #114da1;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.sub-accordion-header p {
    color: #114da1;
    margin: 0;
    font-weight: 600;
    font-size: 18px;
}

.sub-accordion-header:hover {
    color: #fff;
    background: #6688cc;
}

.sub-accordion-header:hover p {
    color: #fff;
}

.sub-accordion-icon {
    font-size: 20px;
    transform: rotate(-90deg);
    transition: transform 0.3s ease;
}

.sub-accordion-icon.active {
    transform: rotate(0deg);
}

.sub-accordion-content {
    max-height: 0;
    overflow-y: auto;
    transition: max-height 0.4s ease, padding 0.3s ease;
    background: #f9fafc;

    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.sub-accordion-content::-webkit-scrollbar {
    width: 6px;
}

.sub-accordion-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.sub-accordion-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sub-accordion-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.sub-accordion-content-inner {
    padding: 20px 30px;
    line-height: 1.6;
    color: #555;
    transition: padding 0.3s ease;
    overflow-y: auto;
}

.sub-accordion-content.active {
    max-height: 70vh;
}

.sub-accordion-content.active .accordion-content-inner {
    padding: 20px;
}

@media (max-width: 768px) {
    .content-inner {
        margin: 0;
        padding: 20px;
    }

    .sub-accordion-header {
        padding: 15px;
    }

    .sub-accordion-header p {
        font-size: 16px;
    }
}



/*  =============================  聚光灯效果 =============================== */
/* 给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: 'Dry Lab';
    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%);
    }
}




/*  ===========================  标题太长的特殊处理  ================================ */
h2.need-short {
    opacity: 0;
    margin: 0;
    font-size: 1px;
    font-weight: 100;
}

p.short-origin {
    margin: 30px 0px 12px -30px;
    color: #5471aa;
    font-size: 4vh;
    font-weight: 700;
}




/*  ==========================  参考文献  =============================  */
.refer h1 {
    color: #574372;
}

.refer p {
    font-size: 16px;
    font-weight: 300;
}



/* =============== 上标 ==================== */
sup {
    font-size: 0.60em;
    vertical-align: super;
    line-height: 0;
}



/* ==============================  description imgs  ================================= */
/* 文档里放置的图片 */