* {
    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;
    position: relative;
    z-index: 1;
}

/*一级标题*/
.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: 10px;
    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;
}




/* 容器：控制整体居中 */
.image-container {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
    margin-bottom: 35px;
}

hr.line {
    border: none; 
    height: 1px; /* 设置高度 */
    background-color: #4494aa; /* 设置背景颜色作为线的颜色 */
    margin: 20px 0; /* 根据需要调整上下外边距 */
}

.section {
    margin-bottom: 50px;
}

.subsection {
    margin-bottom: 35px;
}

/* ====== 滚动进度球 ====== */
.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: 15%;
        padding-top: 90px;
        padding-left:0px;
        height: fit-content; 
        overflow-y: visible;
    }


    
    .normal-content {
       padding: 20px;
       padding-left:30px;
    }
    
    .content-wrapper {
        padding: 30px;
        margin-left: 0;
    }
    
    .normal-sidebar .nav-link.active {
        width: 100%;
        margin-left: 0;
        padding-left: 20px;
        border-radius: 12px;
    }

    .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; 
    }
}