.template {
    padding-top: 80px;
    width: 100%;
    height: auto;
    box-sizing: border-box;
}

.banner {
    width: 100vw;
    height: auto;
    background-image: url('https://static.igem.wiki/teams/5858/images/template/banner.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    min-height: 302px;
}

.main {
    padding: 70px 60px 60px 60px;
    width: 100vw;
    display: flex;
    background-color: #efebec;
    min-height: calc(100vh - 302px);
    /* 减去banner高度 */
    gap: 40px;
    /* sidenav和paper之间的间距 */
}

/* 侧边栏样式 */
.sidenav {
    position: sticky;
    top: 15vh;
    /* 距离视口顶部 20px 开始粘住，可自行调整 */
    align-self: flex-start;
    margin-top: 20px;
    width: 20%;
    height: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* 侧边栏导航样式 */
.sidenav .sidenav-content {
    padding: 40px 40px 40px 40px;
    position: relative;
    /* 改为相对定位 */
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    z-index: 1;
    background-color: #a091b8;
    border-radius: 16px;
}

.sidenav h3 {
    margin: 15px 0 10px 0;
}

.sidenav ul {
    list-style: none;
    margin-left: 15px;
}

.sidenav li {
    margin: 5px 0;
}

.sidenav a {
    color: #2c5f2d;
    text-decoration: none;
    transition: color 0.3s;
}

.sidenav a:hover {
    color: #1a3f1b;
    text-decoration: underline;
}

.sidenav-content {
    position: relative;
}

.sidenav-top {
    position: absolute;
    top: -80px;
    right: -80px;
    z-index: 0;
    width: 80%;
    pointer-events: none;
    /* 防止遮挡点击 */
}

.sidenav-bottom {
    position: absolute;
    top: 75%;
    left: -10%;
    z-index: 1;
    width: 80%;
    pointer-events: none;
}

/* 主内容区样式 */
.paper-content {
    z-index: 1;
    min-height: 100%;
}


.paper-top {
    width: 100%;
    height: 40px;
    background-image: url('https://static.igem.wiki/teams/5858/images/template/template-paper-top.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top left;
}

.paper-bottom {
    width: 100%;
    height: 40px;
    background-image: url('https://static.igem.wiki/teams/5858/images/template/template-paper-bottom.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: bottom left;
}

.paper {
    flex: 1;
    background-image: url('https://static.igem.wiki/teams/5858/images/template/template-paper.webp');
    background-size: contain;
    background-repeat: repeat;
    background-position: top left;
    padding: 30px;
}

/* 内容区域样式 */
.paper section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.paper h2 {
    color: #333;
    margin-bottom: 20px;
}

.paper h3 {
    color: #555;
    margin: 20px 0 10px 0;
}

.paper p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* 锚点偏移，防止被固定头部遮挡 */
:target {
    scroll-margin-top: 80px;
}


/* back-to-top.css */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 70px;
    height: 70px;
    background-image: url('https://static.igem.wiki/teams/5858/images/template/back-to-top-botton.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    transition: transform 0.1s ease-in-out, filter 0.2s ease-in-out;
}

.back-to-top-btn:hover {
    filter: brightness(80%);
}

.back-to-top-btn:active {
    transform: scale(0.9);
    filter: brightness(70%);
}

footer {
    background-color: #efebec;
}