/* ==========================================================================
   站点导航（来自 nav.html，去除全局 reset，避免影响页面其他区域）
   ========================================================================== */
body.site-with-nav {
    padding-top: 50px;
}

.top-navbar,
.top-navbar *,
#menu_wrap,
#menu_wrap * {
    box-sizing: border-box;
}

.top-navbar a,
#menu_wrap a {
    text-decoration: none;
}

.top-navbar ul,
#menu_wrap ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-container {
    width: 1170px;
    max-width: 96%;
    margin: 0 auto;
}

/* 1. 顶部深色导航栏 */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: #222;
    border-bottom: 1px solid #111;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.top-logo {
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.top-logo img {
    height: 34px;
    width: auto;
    display: block;
}

.top-nav-list {
    display: flex;
    align-items: center;
    height: 100%;
}

.top-nav-list > li {
    height: 100%;
    display: flex;
    align-items: center;
}

.top-nav-list > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 14px;
    font-size: 13px;
    color: #ccc;
    transition: background-color .2s, color .2s;
    white-space: nowrap;
}

.top-nav-list > li > a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, .06);
}

.top-nav-list > li.user-box {
    background-color: #22363c;
}

.top-nav-list > li.user-box > a {
    color: #fff;
}

/* 2. 一级分类导航栏 */
#menu_wrap {
    position: sticky;
    top: 50px;
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 998;
}

.cat-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 46px;
    line-height: 46px;
    font-size: 14px;
    color: #ddd;
}

.cat-bar a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 16px;
    color: #555;
    transition: color .2s;
    white-space: nowrap;
}

.cat-bar a:hover,
.cat-bar a.active {
    color: #1677ff;
}

.cat-bar a .fa-angle-down {
    transition: transform .2s ease;
}

.cat-bar a.active .fa-angle-down {
    transform: rotate(180deg);
}

.cat-sep {
    color: #e2e2e2;
    user-select: none;
}

/* 3. 二级下拉滑动面板 */
#n1 {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 18px 0;
    overflow: hidden;
    background-color: #fff;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #dcdcdc;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
    z-index: 999;
}

.nn {
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 18px;
}

.nn.is-show {
    display: grid;
}

.nn li {
    min-width: 0;
}

.c-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    color: #555;
    background-color: #fff;
    border: 1px solid #eaeaea;
    transition: color .3s ease, background-color .3s ease;
}

.border-svg {
    position: absolute;
    inset: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    pointer-events: none;
    overflow: visible;
}

.border-path {
    fill: none;
    stroke: #1677ff;
    stroke-width: 2;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1s cubic-bezier(.25, .8, .25, 1);
}

.c-btn:hover {
    color: #1677ff;
    background-color: #f7faff;
}

.c-btn:hover .border-path {
    stroke-dashoffset: 0;
}

.c-btn .ls {
    margin-right: 8px;
    color: #1677ff;
    font-size: 15px;
    transition: transform .3s ease;
}

.c-btn:hover .ls {
    transform: scale(1.12);
}

@media (max-width: 1024px) {
    .nn.is-show {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .top-nav-list {
        display: none;
    }

    .cat-bar a {
        padding: 0 10px;
        font-size: 13px;
    }
}

@media (max-width: 560px) {
    .nn.is-show {
        grid-template-columns: 1fr;
    }
}
