* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 用于标题 */
@font-face {
    font-family: 'HarmonyOS Sans SC';
    font-weight: 900;
    font-style: normal;
    src: url('https://static.igem.wiki/teams/5843/wiki-safety/harmonyos-sans-sc-black.ttf') format('truetype');
}

/* 用于引用标题 */
@font-face {
    font-family: 'HarmonyOS Sans SC';
    font-weight: 500;
    font-style: normal;
    src: url('https://static.igem.wiki/teams/5843/wiki-safety/harmonyos-sans-sc-medium.ttf') format('truetype');
}

/* 用于引用正文 */
@font-face {
    font-family: 'HarmonyOS Sans SC';
    font-weight: 300;
    font-style: normal;
    src: url('https://static.igem.wiki/teams/5843/wiki-safety/harmonyos-sans-sc-light.ttf') format('truetype');
}

/* 用于正文 */
@font-face {
    font-family: 'HarmonyOS Sans SC';
    font-weight: 400;
    font-style: normal;
    src: url('https://static.igem.wiki/teams/5843/wiki-safety/harmonyos-sans-sc-regular.ttf') format('truetype');
}

body {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    color: #267389;
    line-height: 1.5;
    background-color: #dff4fc;
}

/* ========== 加载动画 ========== */

#loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    /* 背景白色遮罩 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* 置于最顶层 */
    transition: opacity 0.5s ease-out;
}

#loading-spinner img {
    width: 500px;
    height: auto;
}


/* ========== 主容器：上下两层结构 ========== */
.team-page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-left: 20px;
    padding-right: 20px;
}

/* ========== 第一层：横幅图片 ========== */
.banner-container {
    width: 100%;
    margin-top: 50px;
    margin-bottom: 60px;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 50px;
}

/* ========== 第二层：左右布局容器 ========== */
.main-content-wrapper {
    display: flex;
    flex: 1;
    gap: 0px;
    /* 侧边栏和内容区之间的间距 */
    min-height: 0;
    /* 防止 flex 项目溢出 */
    padding-left: 20px;

}


.normal-page {
    display: flex;
    min-height: calc(100vh - 164px);
    position: relative;
    padding-left: 50px;
}

/* ==========  侧边栏  =========== */
.normal-sidebar {
    width: 360px;
    flex-shrink: 0;
    /* 禁止压缩 */
    background-color: #dff4fc;
    padding: 90px 0px 100px 20px;

    /* 使用 flex 布局控制高度 */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* 内容过多时内部滚动 */

    /* 保持 sticky 定位 */
    position: sticky;
    top: 0;
    height: fit-content;
    /* 或留空，由 flex 控制 */
}

.normal-sidebar .nav {
    list-style: none;
}

.normal-sidebar .nav-item {
    margin-bottom: 0px;
}

.normal-sidebar .nav-link {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 12px 0 0 12px;
    position: relative;
    overflow: hidden;
    background-color: transparent;
    white-space: normal;
    /* 允许文本正常换行 */
    word-wrap: break-word;
    /* 防止长单词溢出 */
}

/* 一级导航 */
.normal-sidebar .level-1 {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 900;
    font-style: normal;
    font-size: 18px;
    color: #16576b;
    margin: 0px 0 -5px 0px;
    line-height: 1.2;
    /* 120% */
    letter-spacing: 0.05em;
}

/* 二级导航 */
.normal-sidebar .level-2 {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 15px;
    color: #4494aa;
    padding-left: 15px;
    margin: -2px 0 -5px 0px;
    line-height: 1.2;
    /* 120% */
    letter-spacing: 0.05em;
    /* 5% */
}

/* 三级导航 */
.normal-sidebar .level-3 {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 12px;
    color: #4494aa;
    padding-left: 30px;
    margin: 0px -15px -5px;
    line-height: 1.2;
    /* 120% */
    letter-spacing: 0.05em;
    /* 5% */
}

/* 悬停效果 */
.normal-sidebar .nav-link:hover {
    color: #16576b;
}

/* 一级链接激活 */
.normal-sidebar .level-1.active,
.normal-sidebar .level-2.active {
    color: #b9203e !important;
    background-color: white;
    border-radius: 15px 0 0 15px;
    box-shadow: none;
    margin-left: -10px;
    position: relative;
    z-index: 1;
}

.normal-sidebar .level-3.active {
    color: #b9203e !important;
    background-color: white;
    border-radius: 15px 0 0 15px;
    box-shadow: none;
    margin-left: -7px;
    padding-left: 20px;
    position: relative;
    z-index: 1;
}


.sub-links {
    margin-left: 15px;
    padding-left: 5px;
}


.normal-sidebar .level-2-container {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.normal-sidebar .level-2-container.show {
    opacity: 1;
    max-height: 700px;
    padding-left: 8px;
    padding-bottom: 10px;

}

.normal-sidebar .level-3-container {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.normal-sidebar .level-3-container.show {
    opacity: 1;
    max-height: 300px;
    padding-bottom: 10px;
}

/* 右侧内容区 */
.normal-content {
    flex: 1;
    padding: 40px;
    padding-right: 220px;
    padding-left: 0px;
    background-color: #dff4fc;
    box-shadow: none;
}

.content-wrapper {
    background-color: white;
    border-radius: 20px;
    padding-top: 40px;
    padding-bottom: 40px;
    padding-left: 70px;
    padding-right: 40px;
    box-sizing: border-box;
    box-shadow: none;
    margin-left: 0px;
}

/*一级标题*/
.normal-content h1 {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 900;
    font-style: normal;
    font-size: 25px;
    line-height: 1.7;
    letter-spacing: 0.05em;
    /* 5% 字间距，使用 em 单位更合适 */
    color: #16576B;
}

/*二级标题*/
.normal-content h2 {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 900;
    font-style: normal;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.05em;
    /* 5% */
    color: #4494AA;
}

/*三级标题*/
.normal-content h3 {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: 0.05em;
    /* 5% */
    color: #4494AA;
}


/* 图表说明 */
.normal-content h4 {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: 0.05em;
    /* 5% */
    color: #4494AA;
}

/*引用标题 */
.normal-content h5 {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0.05em;
    /* 5% */
    color: #267389;
}

/*引用正文 */
.normal-content h6 {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0.05em;
    /* 5% */
    color: #267389;
}

.normal-content p {
    /* 整个页面正文都使用该字体*/
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0.05em;
    /* 5% */
    color: #267389;
}

.normal-content li {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0.05em;
    /* 5% */
    color: #267389;
    margin-bottom: 5px;
}

.normal-content li p {
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0.05em;
    /* 5% */
    color: #267389;
    margin-top: 5px;
}

.normal-content ol {
    margin-top: 10px;
}

/*  斜体  */
.italic {
    font-style: italic;
}

b,
strong {
    font-weight: bolder;
    font-family: 'HarmonyOS Sans SC', sans-serif;
    font-style: normal;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0.05em;
    /* 5% */
    color: #267389;
    margin-top: 5px;
}



/* ========== 图片点击放大 ========== */
.clickable-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.clickable-image:hover {
    transform: scale(1.05);
}


.clickable-image-long {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.clickable-image-long:hover{
    transform: scale(1.05);

}

/* 模态框（黑色半透明遮罩） */
.modal {
    display: none;
    /* 默认隐藏 */
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    text-align: center;
    overflow: auto;
}

/* 关闭按钮 × */
.modal .close {
    position: absolute;
    top: 60px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
}

.modal .close:hover {
    color: #ccc;
}

/* 模态框中的图片 */
.modal-content {
    margin: 10vh auto;
    width: auto;
    height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-in-out;
    z-index: 10001;
}

.modal-content-long {
    margin: 20vh auto;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-in-out;
    z-index: 10001;
}

/* 模态框（黑色半透明遮罩） */
.modal-long {
    display: none;
    /* 默认隐藏 */
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    text-align: center;
    overflow: auto;
}

/* 关闭按钮 × */
.modal-long .close-long {
    position: absolute;
    top: 60px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
}

.modal-long .close-long:hover {
    color: #ccc;
}


/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}



/* 容器：控制整体居中 */
.image-container {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
    margin-top: 25px;
    margin-bottom: 35px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.5);
    background-color: white;
}

hr.line {
    border: none;
    height: 1px;
    /* 设置高度 */
    background-color: #4494aa;
    /* 设置背景颜色作为线的颜色 */
    margin: 20px 0;
    /* 根据需要调整上下外边距 */
}

.section {
    margin-bottom: 50px;
}

.subsection {
    margin-bottom: 35px;
}



/* ========== 页脚 ========== */



.footer {
    position: relative;
    width: 99%;
    margin: 0 auto;
    background: linear-gradient(180deg, #fff, #dff4fc);
    ;
    border-radius: 28px;
    box-shadow: 0px 0px 30px rgb(101 172 190 / 92%);
    padding: 60px;
    overflow: hidden;
    margin-bottom: 10px;
}

/* 主布局：左侧Logo + 右侧信息 */
.footer-header {
    display: flex;
    gap: 0;
    margin-bottom: 50px;
    padding-left: 10%;
    justify-content: space-evenly;
    align-items: center;
}

.footer-logo {
    width: 40%;
    height: auto;
    object-fit: contain;
}

.contact-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 20%;
    padding-top: 3%;
}

.contact-title {
    font-size: 36px;
    letter-spacing: 0.02em;
    color: #0a596d;
}

.list-item {
    font-size: 16px;
    line-height: 1.6;
    color: #0a596d;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.social-links img {
    width: 24px;
    height: 24px;
}

.social-links .wechat {
    width: 32px;
}

/* 赞助商区域：居中 */
.sponsors {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px auto;
    max-width: 80vw;
}

.sponsor-box {
    width: 213px;
    height: 117px;
    background: #fff;
    border-radius: 19px;
    /* 可加边框或阴影 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sponsor-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
    transition: transform 0.3s ease;
}

.sponsor-box:hover {
    transform: scale(1.05);
}





/* 分隔线 */
.footer-divider {
    height: 2px;
    border: none;
    margin: 40px 0;
    background-color: #197186;
}

/* 底部版权：居中 */
.footer-bottom {
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    color: #0a596d;
}

.footer-bottom a {
    color: #0077cc;
    text-decoration: none;
}

.footer-bottom a.subfoot {
    font-weight: 500;
}


/* ==== 括号编码 ==== */
.parentheses-list {
    list-style: none;
    counter-reset: item-counter;
    padding-left: 0;
}

.parentheses-list li {
    counter-increment: item-counter;
}

.parentheses-list li::before {
    content: "(" counter(item-counter) ") ";
    font-weight: bold;
}


/* ====== 滚动进度球 ====== */
.scroll-progress {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 100px;
    height: 100px;
    background-color: #71b4c2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0.7;
}

.scroll-progress:hover {
    transform: scale(1.5);
    background-color: #5a9ca9;
    opacity: 1;
}

.scroll-progress svg:first-of-type {
    /* 箭头SVG */
    z-index: 2;
    /* 提高箭头层级 */
    pointer-events: none;
    position: relative;
}

/* 环形进度条容器 */
.progress-ring-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 背景圆环（未到达部分） */
.progress-ring-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    z-index: 1;
}

.progress-ring-background-circle {
    stroke: white;
    /* White background for the track */
    stroke-width: 6px;
    /* 确保宽度一致 */
    fill: transparent;
    opacity: 0.9;
}

/* 进度圆环（已到达部分） */
.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    z-index: 3;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.3s ease;
    stroke: #b9203e;
    stroke-width: 6px;
    /* 确保宽度一致 */
    fill: transparent;
}





/* 响应式设计 */
@media (max-width: 1500px) {

    .main-content-wrapper {
        display: flex;
        flex: 1;
        gap: 0px;
        min-height: 0;
        padding-left: 0px;

    }

    .normal-page {
        flex-direction: column;
    }

    .normal-sidebar {
        width: 30%;
        padding-top: 90px;
        padding-left: 0px;
        height: fit-content;
        overflow-y: visible;
    }


    /* 一级导航 */
    .normal-sidebar .level-1 {
        font-size: 16px;

    }

    /* 二级导航 */
    .normal-sidebar .level-2 {
        font-size: 13px;
        margin: 0px 0 0px 0px;
    }

    /* 三级导航 */
    .normal-sidebar .level-3 {
        font-size: 10px;
        margin: -2px 0 -5px -10px;

    }

    .normal-sidebar .level-2.active {
        margin-left: -15px;
    }


    .sub-links {
        margin-left: 5px;
    }



    .normal-sidebar .level-2-container.show {
        opacity: 1;
        max-height: 700px;
        padding-left: 0px;

    }

    .normal-sidebar .level-3-container.show {
        opacity: 1;
        max-height: 300px;
        padding-bottom: 5px;
    }

    .normal-sidebar .nav-link.active {
        width: 100%;
        margin-left: 0;
        padding-left: 15px;
        border-radius: 12px;
    }



    .normal-content {
        width: 70%;
        padding: 20px;
        padding-left: 0px;
    }

    .content-wrapper {
        padding: 30px;
        margin-left: 0;
    }



    /*一级标题*/
    .normal-content h1 {
        font-size: 20px;
    }

    /*二级标题*/
    .normal-content h2 {
        font-size: 17px;
    }

    /*三级标题*/
    .normal-content h3 {
        font-size: 15px;
    }

    p {
        font-size: 10px;
    }

    .metabolic-table {
        width: 100%;

    }





    /*  页脚   */
    .footer {
        padding: 40px 20px;
    }

    .footer-header {
        display: flex;
        gap: 10%;
        margin-bottom: 50px;
        padding: 0px 5% 0px 5%;
        justify-content: space-between;
        align-items: center;
    }

    .footer-logo {
        width: 50vw;
        height: auto;
    }

    .contact-section {
        order: 3;
        margin-top: 20px;
        padding-right: 0px;
    }

    .contact-title {
        font-size: 32px;
    }

    .list-item {
        font-size: 14px;
    }

    .sponsors {
        flex-wrap: wrap;
    }

    .footer-bottom {
        font-size: 14px;
    }


    .image-group {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .rectangle-icon {
        width: 300px;
        /* 或 100% */
        height: 208px;
    }

    .scroll-progress {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }

    .scroll-progress svg:first-of-type {
        /* 箭头图标 */
        width: 100%;
        height: 100%;
    }

    /* Changed: Adjusted progress ring sizes for responsiveness */
    .progress-ring-container,
    .progress-ring-background,
    .progress-ring {
        width: 100%;
        height: 100%;
    }

    .progress-ring-circle,
    .progress-ring-background-circle {
        stroke-width: 7px;
    }
}