/* 控制字体样式 */
@font-face {
    font-family: "huipianyuan";
    src: local(极影毁片圆),url(../极影毁片圆.subset.ttf);
    font-display: swap; 
}

.navigation_elements, .navigation_elements_Selected {
    display: inline-block;
    font-family: 'huipianyuan';
    padding: 15px 5px 15px 5px;
    margin: auto 0;

}

/* 导航栏样式 */
.navigation_bar{
    background-color: rgba(47, 49, 53, 0.7); 
    overflow: visible;
    position: fixed;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    right: 0;
    left: 0;
    top: 0;

    z-index: 1000;

    height: 60px;

    display: flex;
    align-items: center;
    gap: 6px;
}


/* 未选中样式 */
.navigation_elements{
    /* padding: 15px; */
    display: inline-block;
    background-color: rgba(47, 49, 53, 0);
}

.navigation_elements > svg{
    vertical-align: -9px;
    fill: aqua;
}

.navigation_elements > span{
    color: aqua;
}


/* 选中时样式 */
.navigation_elements_Selected{
    /* padding: 15px; */
    display: inline-block;
    background-color: rgba(47, 49, 53, 0);
}

.navigation_elements_Selected > svg{
    vertical-align: -9px;
    fill: yellowgreen;
}

.navigation_elements_Selected > span{
    color: yellowgreen;
}

/* 目录下拉 */
.toc-dropdown{
    margin-left: auto;
    position: relative;
    padding: 0 5px;
    margin-right: 10px;
    /* border: 1px solid #40444B; */
    width: fit-content;
    height: 100%;
    display: flex;
    align-items: center;
}

:root{
    --toc-icon-shift: 4px;
}

.toc-toggle{
    background: transparent;
    border: none;
    padding: 0;
    width: 40px;
    height: 100%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: aqua;
} 

.toc-icon{
    transition: transform 200ms ease, color 200ms ease;
    transform-origin: 50% 40%; /* 以中心旋转 */
    transform: translateY(var(--toc-icon-shift));
}

/* 打开时旋转 + 变色 */
.toc-dropdown.open .toc-toggle{
    color: yellowgreen;
}
.toc-dropdown.open .toc-icon{
    transform: translateY(var(--toc-icon-shift)) rotate(180deg);
}

.toc-panel{
    position: absolute;
    right: -6px;
    top: 62px;
    width: 320px;
    max-height: 60vh;
    overflow: auto;
    background: rgba(24, 25, 28, 0.95);
    border: 1px solid #40444B;
    border-radius: 8px;
    padding: 10px 12px;
    display: none;
    z-index: 1100;
}

/* 点击打开 */
.toc-dropdown.open .toc-panel{
    display: block;
}

/* 当前标题高亮 */
.toc-panel a.is-active{
    color: yellowgreen;
    font-weight: 600;
}

.toc-panel a{
    color: #58a6ff;
    text-decoration: none;
    display: block;
    padding: 2px 0;
}

.toc-panel a:hover{
    text-decoration: underline;
}

.toc-tree{
    list-style: none;
    padding-left: 8px;
    margin: 4px 0;
}

.toc-tree > li{
    margin: 4px 0;
}

.toc-tree ul{
    list-style: none;
    padding-left: 14px;
    margin: 4px 0;
    border-left: 1px dashed #40444B;
}

.toc-empty{
    color: #8b949e;
    font-size: 14px;
    padding: 6px 0;
}

@media (max-width: 520px) {
    .navigation_bar{
        gap: 2px;
    }

    .navigation_elements,
    .navigation_elements_Selected{
        padding: 10px 4px;
    }

    .navigation_elements > span,
    .navigation_elements_Selected > span{
        display: none;
    }

    .navigation_elements > svg,
    .navigation_elements_Selected > svg{
        width: 30px;
        height: 30px;
    }

    /* .toc-dropdown{
        margin-right: 6px;
        padding: 0 2px;
    }

    .toc-toggle{
        width: 32px;
        height: 30px;
    } */
}



