body {
    padding-top: 56px;
}

.left-aligned {
    margin-left: auto;
}

.bg-dark {
    background-color: #343a40 !important;
}

/*.bg-hero { background-color: #45b06cff; }*/
@font-face {
    font-family: PermanentMarker;
    src: url(image/PermanentMarker.ttf)
}

.left-aligned {
    margin-left: auto;
}

.bg-dark {
    background-color: #4CACBC !important;
}

.bg-font {
    font-family: PermanentMarker
}

.-hero {
    background-color: rgba(255, 255, 255, 0.5);
}

.pagebg {
    background-color: rgba(255, 255, 255, 0.5);
}

/* CALLOUT */
.bd-callout {
    padding: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid #e9ecef;
    border-left-width: .25rem;
    border-radius: .25rem
}

.bd-callout h4 {
    margin-bottom: .25rem
}

.bd-callout p:last-child {
    margin-bottom: 0
}

.bd-callout code {
    border-radius: .25rem
}

.bd-callout+.bd-callout {
    margin-top: -.25rem
}

.bd-callout-info {
    border-left-color: #5bc0de
}

.bd-callout-warning {
    border-left-color: #f0ad4e
}

.bd-callout-danger {
    border-left-color: #d9534f
}

/* footer */
footer a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    z-index: 1000;
    /* 确保在其他元素之上 */
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

/* 设置返回顶部按钮的样式 */
#topBtn {
    /* display: block;  默认隐藏按钮 */
    position: fixed;
    /* 固定位置，使其悬浮在页面右下角 */
    bottom: 20px;
    /* 距离页面底部20px */
    right: 30px;
    /* 距离页面右侧30px */
    z-index: 99;
    /* 确保按钮在其他元素之上 */
    border: none;
    /* 无边框 */
    outline: none;
    /* 无轮廓 */
    background-color: transparent;
    /* 按钮背景透明，只显示图标 */
    cursor: pointer;
    /* 鼠标悬浮时显示为指针 */
    padding: 0;
    /* 无内边距，确保图标大小不变 */
}

/* 鼠标悬停时改变透明度，产生交互效果 */
#topBtn:hover {
    opacity: 0.8;
}

/* 设置图标的样式 */
#topBtn img {
    width: 40px;
    /* 设置图标宽度 */
    height: 40px;
    /* 设置图标高度 */
}

#loader {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    background: #ffffff url('https://static/loading.gif') no-repeat center center;
    background-size: cover;
    z-index: 9999;
    animation: fadeOut 4s forwards;
}
/* #loader {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeOut 5s forwards;
} */

#loader img {
    width: 600px;
    /* 限制图片宽度为500px */
    height: auto;
    /* 保持图片的纵横比 */
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}



.container_engineering {
    text-align: center;
    /* 内容居中对齐 */
}

.btn {
    padding: 10px 20px;
    /* 按钮内边距 */
    margin: 10px;
    /* 按钮外边距 */
    border: 5px dashed #CADFAA;
    /* 虚线边框 */
    border-radius: 5px;
    /* 按钮周围弧度 */
    background-color: #F5F0BB;
    /* 按钮默认背景色 */
    color: black;
    /* 按钮默认文字颜色 */
    cursor: pointer;
    /* 鼠标悬停时显示为手型 */
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
    /* 背景颜色、文字颜色和变换的过渡效果 */
    outline: none;
    /* 移除焦点时的轮廓线 */
}

.btn:hover {
    background-color: #6CC4A1;
    /* 悬停时按钮背景颜色 */
    color: white;
    /* 悬停时文字颜色 */
    transform: translateY(-5px);
    /* 悬停时向上移动5px */
}

.btn.active {
    background-color: #6CC4A1;
    /* 激活状态按钮背景颜色 */
    color: white;
    /* 激活状态文字颜色 */
}

.content {
    margin-top: 20px;
    /* 内容上边距 */
    font-size: 18px;
    /* 内容字体大小 */
}


body.custom-background {
    background-image: url('https://static.igem.wiki/teams/5332/background/other-bg.png') !important;
    background-repeat: repeat !important;
    /* 背景图重复 */
    background-attachment: scroll;
    background-size: 200%;
    /* 使背景图扩大 20% */
    background-position: center;

    margin: 0;
    z-index: 99;
}

/*这里是侧边导航栏测试*/
.containerL {
    display: flex;
}

/* 设置 contentL 类的样式 */
.contentL {
    flex: 1;
    /* Take up remaining space */
    background-color: white;
    /* 设置白色背景 */
    border-radius: 10px;
    /* 设置圆角边框 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* 添加阴影效果 */
    padding: 20px;
    /* 添加内边距 */
    margin: 20px;
    /* 添加外边距，以便阴影不会紧贴边缘 */
    overflow: hidden;
    /* 隐藏超出部分 */
    position: relative;
    /* 相对定位，以便子元素可以绝对定位 */
    align-items: center; /* 水平居中 */
}

.side-nav {
    list-style: none;
    position: sticky;
    top: 15vh;
    display: block;
    height: 75vh;
    overflow-y: auto;
    /* 当内容溢出时显示滚动条 */
    /* margin-bottom: 10px; */
    padding-top: 20px;
    padding-right: 20px;
    width: 25%;
    /* 设置导航栏宽度 */
    background: transparent;
    border-right: 1px solid transparent;
    ;
}

.side-nav::-webkit-scrollbar-track {
    background: transparent;
    /* 滚动条轨道背景透明 */
}

.side-nav::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.5);
    /* 滚动条滑块半透明黑色 */
    border-radius: 6px;
    /* 滚动条滑块圆角 */
}

.side-nav::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.7);
    /* 鼠标悬停时滑块颜色变深 */
}

/* 一级导航（page-subtitle）样式 */
.page-subtitle {
    display: flex;
    align-items: center;
    /* 垂直居中 */
    padding-left: 30px;
    /* 左侧内边距 */
    position: relative;
    font-weight: bold;
    /* 加粗一级导航字体 */
    font-size: 18px;
    /* 设置较大的字体 */
}

/* 一级导航前缀圆点样式 */
.page-subtitle::before {
    content: '';
    /* 创建圆点 */
    background: #3dabfe;
    /* 圆点颜色 */
    width: 10px;
    /* 圆点大小 */
    height: 10px;
    border-radius: 50%;
    /* 使其成为圆形 */
    margin-right: 10px;
    /* 圆点与文字间距 */
    flex-shrink: 0;
    /* 防止圆点变形 */
}

/* 二级导航（page-secondary-title）样式 */
.page-secondary-title {
    display: flex;
    align-items: center;
    /* 垂直居中 */
    padding-left: 50px;
    /* 相比一级导航，多增加缩进 */
    position: relative;
    font-size: 16px;
    /* 二级导航的字体稍小 */
    color: #5C6C75;
    /* 二级导航的文字颜色较为浅淡 */
}

/* 二级导航前缀圆点样式 */
.page-secondary-title::before {
    content: '';
    /* 创建圆点 */
    background: #a4c7f5;
    /* 圆点颜色比一级导航浅 */
    width: 8px;
    /* 圆点大小较小 */
    height: 8px;
    border-radius: 50%;
    /* 使其成为圆形 */
    margin-right: 10px;
    /* 圆点与文字间距 */
    flex-shrink: 0;
    /* 防止圆点变形 */
}

/* 三级导航（page-third-title）样式 */
.page-third-title {
    display: flex;
    align-items: center;
    /* 垂直居中 */
    padding-left: 50px;
    /* 相比一级导航，多增加缩进 */
    position: relative;
    font-size: 14px;
    /* 二级导航的字体稍小 */
    color: #5C6C75;
    /* 二级导航的文字颜色较为浅淡 */
}

/* 三级导航前缀圆点样式 */
.page-third-title::before {
    content: '';
    /* 创建圆点 */
    background: #b9d7f8;
    /* 圆点颜色比一级导航浅 */
    width: 6px;
    /* 圆点大小较小 */
    height: 6px;
    border-radius: 50%;
    /* 使其成为圆形 */
    margin-right: 10px;
    /* 圆点与文字间距 */
    flex-shrink: 0;
    /* 防止圆点变形 */
}

/* 链接样式 */
.page-subtitle a,
.page-secondary-title a {
    text-decoration: none;
    color: inherit;
    /* 使用父元素的颜色 */
    line-height: 25px;
    white-space: normal;
    /* 允许自动换行 */
}

/* 悬停效果 */
.page-subtitle a:hover,
.page-secondary-title a:hover {
    color: #3dabfe;
    /* 悬停时文字颜色 */
    text-shadow: 0 0 2px #a6ddff;
    /* 添加阴影效果 */
}

.side-nav a {
    display: block;
    /* 让 <a> 占据整个 <li> 区域 */
    /* padding: 10px 15px;  */
    text-decoration: none;
    /* 去除下划线 */

}


.side-nav a.active {
    background-color: #e0ebff;
    /* 改变背景色 */
    color: purple;
    font-weight: bold;
    /* 可选：加粗效果 */
    border-left: 3px solid purple;
    /* 可选：添加左侧紫色边框 */
}



/* .side-nav li.active {
    background-color: #e0ebff;
    color: #3dabfe; 
    border-left: 4px solid #54428E; 
    font-weight: bold; 
} */

.side-nav li.active a {
    color: #3dabfe;
    /* 链接的字体颜色 */
}


/* 悬停效果 */
.page-subtitle a:hover,
.page-secondary-title a:hover {
    color: #3dabfe;
    /* 悬停时文字颜色 */
    text-shadow: 0 0 2px #a6ddff;
    /* 添加阴影效果 */
}


/* 动画效果 */
@keyframes side-nav-circle-ani {
    0% {
        opacity: 50%;
    }

    100% {
        opacity: 100%;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .side-nav {
        display: none;
        /* 小屏幕时隐藏导航栏 */
    }
}

/* 每个 section 的样式，保证可见性 */
/* .contentL section {
    margin-bottom: 50px;
} */

/* 标题样式 */
.contentL h1,
.contentL h2 {
    color: #54428E;
}

.contentL h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.contentL h2 {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 10px;
}

/* 调整段落样式 */
/* .contentL p {
    font-size: 18px;
    line-height: 1.6;
    color: #555;
} */
.word-img11 {
    display: flex;
    justify-content: center;
    /* 水平居中 */
    align-items: center;
    /* 垂直居中 */
    width: 60%;
    height: auto;
    /* 根据内容调整高度 */
    margin: auto;
    /* 让容器在父元素中居中 */
}

.word-img11 img {
    max-width: 100%;
    /* 图片最大宽度为容器宽度 */
    height: auto;
    /* 高度自适应 */
}

.word-img14 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 1行4列 */
    gap: 10px;
    /* 图片之间的间距 */
    width: 100%;

}

.word-img14 img {
    height: auto;
    width: 100%;
}

.img-n {
    text-align: center;
    /* 图注居中 */
    margin-top: 10px;
}

.img-n p {
    margin: 0 auto;
    padding: 5px;
    width: fit-content;
    border: 2px solid #000;
    /* 强制应用边框 */
    display: inline-block;
    margin-bottom: 20px;
    /* 与下方内容增加20px的边距 */
    /*background-color: #f8f9fa;  /*确保背景色与边框有对比 */
    /*color: #000; /* 确保文字颜色与背景色对比鲜明 */
}

.word-img12 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 1行2列 */
    gap: 10px;
    /* 图片之间的间距 */
    width: 100%;
    /* 容器宽度 */
    align-items: center;
    /* 垂直居中对齐 */
}

.word-img12 img {
    height: auto;
    /* 确保图片按比例缩放 */
    width: 100%;
}


.img-n-container {
    display: flex;
    /* 使用flex布局 */
    justify-content: center;
    /* 图注水平居中 */
    gap: 50px;
    /* 图注之间的间距 */
    margin-top: 10px;
    /* 图注与图片之间的间距 */
}


.contentL img {
    transition: box-shadow 0.3s ease-in-out;
    /* 设置阴影变化的过渡效果 */
    box-shadow: none;
    /* 默认没有阴影 */
}

.contentL img:hover {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    /* 设置阴影的大小、颜色等 */
}

.gif-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 1行2列 */
    gap: 10px;
    /* 图片之间的间距 */
    width: 100%;
    /* 容器宽度 */
    align-items: center;
    /* 垂直居中对齐 */
}

.gif-container img {
    height: auto;
    /* 确保图片按比例缩放 */
    width: 100%;
}