/* ---------- 全局变量 ---------- */
.bili-header-wrapper {
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-light: #a78bfa;
    --bg-dark: #1a1035;
    --bg-card: #f6f6f7;
    --bg-input: #f0f0f2;
    --border-color: #e0e0e2;
    --text-main: #ffffff;
    --text-muted: #cccccc;
    --text-light: #ffffff;
    --nav-bg-start: #2d1b69;
    --nav-bg-end: #1a1a2e;
    --menu-bg: rgba(45, 27, 105, 0.85);

    position: relative;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    width: 100%;
    background: var(--bg-dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: background 0.3s, color 0.3s;
}

/* 主题色 */
.bili-header-wrapper.theme-blue {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #93c5fd;
    --nav-bg-start: #1a365d;
    --nav-bg-end: #0c1a2e;
    --menu-bg: rgba(26, 54, 93, 0.85);
    --bg-dark: #0c1a2e;
    --text-main: #ffffff;
    --text-muted: #cccccc;
    --border-color: rgba(255,255,255,0.15);
    --bg-input: rgba(255,255,255,0.1);
}
.bili-header-wrapper.theme-cyan {
    --primary: #06b6d4;
    --primary-hover: #0891b2;
    --primary-light: #67e8f9;
    --nav-bg-start: #0e4b5c;
    --nav-bg-end: #06212a;
    --menu-bg: rgba(14, 75, 92, 0.85);
    --bg-dark: #06212a;
    --text-main: #ffffff;
    --text-muted: #cccccc;
    --border-color: rgba(255,255,255,0.15);
    --bg-input: rgba(255,255,255,0.1);
}
.bili-header-wrapper.theme-pink {
    --primary: #ec4899;
    --primary-hover: #db2777;
    --primary-light: #f9a8d4;
    --nav-bg-start: #5c1a3a;
    --nav-bg-end: #2a0e1e;
    --menu-bg: rgba(92, 26, 58, 0.85);
    --bg-dark: #2a0e1e;
    --text-main: #ffffff;
    --text-muted: #cccccc;
    --border-color: rgba(255,255,255,0.15);
    --bg-input: rgba(255,255,255,0.1);
}
.bili-header-wrapper.theme-orange {
    --primary: #f97316;
    --primary-hover: #ea580c;
    --primary-light: #fdba74;
    --nav-bg-start: #6b2f0a;
    --nav-bg-end: #2a1408;
    --menu-bg: rgba(107, 47, 10, 0.85);
    --bg-dark: #2a1408;
    --text-main: #ffffff;
    --text-muted: #cccccc;
    --border-color: rgba(255,255,255,0.15);
    --bg-input: rgba(255,255,255,0.1);
}
.bili-header-wrapper.theme-green {
    --primary: #22c55e;
    --primary-hover: #16a34a;
    --primary-light: #86efac;
    --nav-bg-start: #1a4a2a;
    --nav-bg-end: #0a1e12;
    --menu-bg: rgba(26, 74, 42, 0.85);
    --bg-dark: #0a1e12;
    --text-main: #ffffff;
    --text-muted: #cccccc;
    --border-color: rgba(255,255,255,0.15);
    --bg-input: rgba(255,255,255,0.1);
}
/* ---------- 全站主题变量（body 级别） ---------- */
body.theme-blue {
    --primary: #3b82f6; --primary-hover: #2563eb; --primary-light: #93c5fd;
    --bg-dark: #0c1a2e; --text-main: #ffffff; --text-muted: #cccccc;
    --border-color: rgba(255,255,255,0.15); --bg-input: rgba(255,255,255,0.1);
}
body.theme-cyan {
    --primary: #06b6d4; --primary-hover: #0891b2; --primary-light: #67e8f9;
    --bg-dark: #06212a; --text-main: #ffffff; --text-muted: #cccccc;
    --border-color: rgba(255,255,255,0.15); --bg-input: rgba(255,255,255,0.1);
}
body.theme-pink {
    --primary: #ec4899; --primary-hover: #db2777; --primary-light: #f9a8d4;
    --bg-dark: #2a0e1e; --text-main: #ffffff; --text-muted: #cccccc;
    --border-color: rgba(255,255,255,0.15); --bg-input: rgba(255,255,255,0.1);
}
body.theme-orange {
    --primary: #f97316; --primary-hover: #ea580c; --primary-light: #fdba74;
    --bg-dark: #2a1408; --text-main: #ffffff; --text-muted: #cccccc;
    --border-color: rgba(255,255,255,0.15); --bg-input: rgba(255,255,255,0.1);
}
body.theme-green {
    --primary: #22c55e; --primary-hover: #16a34a; --primary-light: #86efac;
    --bg-dark: #0a1e12; --text-main: #ffffff; --text-muted: #cccccc;
    --border-color: rgba(255,255,255,0.15); --bg-input: rgba(255,255,255,0.1);
}

/* ---------- 重置 body 边距 ---------- */
body {
    margin: 0;
    padding: 0;
}

/* ---------- 头部主体 ---------- */
#newHeader.bili-header-wrapper .bili-header {
    display: flex;
    flex-direction: column;
    padding: 0;
    max-width: 100%;
    margin: 0;
}

/* ---------- 横幅区域 ---------- */
.banner-section {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 0;
    padding-bottom: 19%;
    min-height: 120px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--nav-bg-start);
    box-sizing: border-box;
}

/* ================================================================ */
/* ===== 底部工具栏：仅菜单 + 汉堡 ===== */
/* ================================================================ */
.banner-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--menu-bg);
    padding: 0 12px;
    min-height: 50px;
    border-radius: 12px 12px 0 0;
    gap: 4px;
}

/* ---------- 汉堡菜单 ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.hamburger .bar {
    display: block;
    width: 100%;
    height: 2.5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active .bar:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ---------- 菜单栏 ---------- */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    min-width: 0;
}

.main-nav .nav-list {
    width: 100%;
    
    justify-content: space-evenly;
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    align-items: center;
}

.main-nav .nav-list > .nav-item {
    position: relative;
    margin: 0 2px;
    flex-shrink: 0;
}

.main-nav .nav-list > .nav-item > a {
    display: block;
    padding: 0 12px;
    height: 50px;
    line-height: 50px;
    font-size: 17px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    border-radius: 8px 8px 0 0;
    letter-spacing: 0.3px;
}

.main-nav .nav-list > .nav-item > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.main-nav .nav-list > .nav-item > a.current {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* 下拉菜单 */
.main-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    background: rgba(30, 30, 50, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    padding: 6px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    z-index: 100;
}

.main-nav .sub-menu li a {
    display: block;
    padding: 8px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 16px;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.main-nav .sub-menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

@media (min-width: 992px) {
    .main-nav .nav-list > .nav-item:hover .sub-menu {
        display: block;
        animation: fadeDown 0.2s ease;
    }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* banner 右侧占位 */
.banner-placeholder {
    width: 60px;
    flex-shrink: 0;
}

/* ---------- Logo ---------- */
.banner-logo {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.banner-logo img {
    height: 128px;
    width: 128px;
    object-fit: contain;
    display: block;
}

/* ================================================================ */
/* ===== 第二行工具条：调色区 + 搜索 + 登录/注册 ===== */
/* ================================================================ */
.bili-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-dark);
    padding: 0 20px;
    height: 56px;
    flex-shrink: 0;
    border-top: 1px solid var(--border-color);
}

/* 调色区（桌面端显示） */
.theme-switcher.desktop-only {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* 主题圆点 */
.theme-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

.theme-dot:hover { transform: scale(1.2); }
.theme-dot.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--primary);
    transform: scale(1.1);
}

/* 搜索框 */
.search-box {
    position: relative;
    flex: 1;
    max-width: 420px;
    min-width: 120px;
}

.search-box input {
    width: 100%;
    height: 34px;
    padding: 0 34px 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-input);
    color: var(--text-main);
    font-size: 15px;
    transition: border 0.2s, background 0.2s;
    box-sizing: border-box;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
}

.search-box button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-size: 18px;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
}

.search-box button:hover { opacity: 1; }

/* ===== 右：登录/注册（桌面端显示在搜索右边） ===== */
.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.user-actions .member-btn a {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.user-actions .member-btn a.login_btn {
    background: var(--primary);
    color: var(--text-light);
}
.user-actions .member-btn a.login_btn:hover { background: var(--primary-hover); }

.user-actions .member-btn a.reg_btn {
    background: var(--border-color);
    color: var(--text-main);
}
.user-actions .member-btn a.reg_btn:hover {
    background: var(--primary-light);
    color: #fff;
}

.user-actions .member-btn a.MemberName {
    color: var(--text-main);
    font-weight: 500;
}
.user-actions .member-btn a.MemberQuit {
    color: var(--primary);
    margin-left: 4px;
}

/* 语言切换 */
.lang-switch a {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-main);
    background: var(--border-color);
    transition: all 0.2s;
}
.lang-switch a:hover,
.lang-switch a.active {
    background: var(--primary);
    color: var(--text-light);
}

/* ================================================================ */
/* ===== 移动端工具栏：调色区 + 登录/注册 ===== */
/* ================================================================ */
.mobile-toolbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 6px;
}

.mobile-theme-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mobile-theme-switcher .theme-dot {
    width: 20px;
    height: 20px;
}

.mobile-user-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-user-actions .member-btn a {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.mobile-user-actions .member-btn a.login_btn {
    background: var(--primary);
    color: var(--text-light);
}
.mobile-user-actions .member-btn a.login_btn:hover {
    background: var(--primary-hover);
}

.mobile-user-actions .member-btn a.reg_btn {
    background: var(--border-color);
    color: var(--text-main);
}
.mobile-user-actions .member-btn a.reg_btn:hover {
    background: var(--primary-light);
    color: #fff;
}

.mobile-user-actions .member-btn a.MemberName {
    color: var(--text-main);
    font-weight: 500;
    font-size: 14px;
}
.mobile-user-actions .member-btn a.MemberQuit {
    color: var(--primary);
    margin-left: 2px;
    font-size: 14px;
}

/* ===== 移动端侧滑菜单 ===== */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
}

.mobile-overlay.open {
    visibility: visible;
    opacity: 1;
}

.mobile-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: var(--bg-dark);
    padding: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-overlay.open .mobile-nav { transform: translateX(0); }

.mobile-nav .nav-list {
    flex-direction: column;
    gap: 0;
}

.mobile-nav .nav-item {
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav .nav-item > a {
    height: 48px;
    line-height: 48px;
    font-size: 18px;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav .nav-item > a::after {
    content: '▾';
    font-size: 14px;
    color: var(--text-muted);
}

.mobile-nav .nav-item.open > a::after { transform: rotate(180deg); }

.mobile-nav .sub-menu {
    position: static;
    transform: none;
    background: var(--bg-card);
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    display: none;
}

.mobile-nav .nav-item.open .sub-menu { display: block; }

.mobile-nav .sub-menu li a {
    padding-left: 24px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-extra {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.mobile-search form {
    display: flex;
    flex: 1;
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.mobile-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    color: var(--text-main);
    font-size: 17px;
    outline: none;
}

.mobile-search button {
    background: var(--primary);
    color: var(--text-light);
    border: none;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
}

.mobile-user {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
}

.mobile-user a {
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: 500;
    text-decoration: none;
    font-size: 17px;
}

.mobile-user a.login_btn {
    background: var(--primary);
    color: var(--text-light);
}

.mobile-user a.reg_btn {
    background: var(--border-color);
    color: var(--text-muted);
}

.mobile-user a.MemberName { color: var(--text-main); }
.mobile-user a.MemberQuit { color: var(--primary-light); }

/* ===== Toast 提示 ===== */
.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 16px;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.toast-message.show {
    opacity: 1;
}

/* ================================================================ */
/* ===== 响应式适配 ===== */
/* ================================================================ */

/* 桌面端 */
@media (min-width: 992px) {
    .hamburger { display: none; }
    .theme-switcher.desktop-only { display: flex; }
    .user-actions { display: flex; }
    .mobile-toolbar { display: none !important; }
    .mobile-overlay { display: none; }
    .banner-bottom-bar {
        justify-content: flex-start;
        gap: 20px;
    }
    .main-nav { flex: 1 1 auto; }
    .banner-placeholder { display: none; }
}

/* 移动端 */
@media (max-width: 991px) {
    .main-nav { display: none; }
    .hamburger { display: flex; }
    .theme-switcher.desktop-only { display: none; }
    .user-actions { display: flex; flex-shrink: 0; gap: 6px; margin-left: 8px; }
    .user-actions .member-btn a { font-size: 13px; padding: 4px 10px; white-space: nowrap; }
    .banner-placeholder { display: none; }
    
    /* 显示移动端工具栏 */
    .mobile-toolbar { display: flex; }

    .banner-bottom-bar {
        justify-content: flex-start;
        padding: 0 12px;
        min-height: 46px;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
    }

    .banner-section {
        position: relative !important;
        height: 0;
        padding-bottom: 22.5%;
        min-height: 80px;
        background-size: cover;
        background-position: left center !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    .bili-header .container {
        height: 52px;
        padding: 0 14px;
        /* 移动端第二行只显示搜索框 */
        justify-content: center;
    }
    .hamburger {
        display: flex;
        flex-shrink: 0;
        margin-right: 8px;
    }
    .hamburger .bar {
        background: rgba(255, 255, 255, 0.9);
    }
    .search-box {
        max-width: 100%;
        flex: 1;
    }
    .banner-logo img {
        height: 32px !important;
        width: auto !important;
        max-width: none !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .banner-logo {
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 20 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        max-width: none !important;
        text-align: left !important;
    }
    .banner-logo a {
        display: inline-block !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 0 !important;
        text-align: left !important;
    }
    .banner-logo img {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .banner-section {
        position: relative !important;
        height: 0;
        padding-bottom: 22.5%;
        min-height: 60px;
        background-size: cover;
        background-position: left center !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    .banner-logo img {
        height: 24px !important;
        width: auto !important;
        max-width: none !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .banner-logo {
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 20 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        max-width: none !important;
        text-align: left !important;
    }
    .banner-logo a {
        display: inline-block !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 0 !important;
        text-align: left !important;
    }
    .banner-logo img {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .banner-bottom-bar {
        min-height: 40px;
        padding: 0 8px;
        border-radius: 8px 8px 0 0;
    }

    .hamburger {
        width: 24px;
        height: 16px;
    }
    .hamburger .bar {
        height: 2px;
    }

    .bili-header .container {
        height: 44px;
        padding: 0 10px;
    }
    .search-box input {
        height: 30px;
        font-size: 14px;
        padding: 0 30px 0 12px;
    }
    .search-box button {
        width: 20px;
        height: 20px;
        background-size: 14px;
        right: 6px;
    }

    /* 移动端工具栏缩小 */
    .mobile-toolbar {
        padding: 4px 10px;
        gap: 4px;
    }
    .mobile-theme-switcher .theme-dot {
        width: 16px;
        height: 16px;
    }
    .mobile-user-actions .member-btn a {
        font-size: 12px;
        padding: 2px 8px;
    }
}

/* ===== 强制显示 ===== */
#n5140 {
    display: block !important;
    background: #f8f9fe !important;
    padding-top: 40px !important;
    padding-bottom: 40px !important;
    min-height: 300px !important;
}
#n5140 .sidebar_comtainer {
    background: #ffffff !important;
}
#n5140 .sidebar_title h2 {
    color: #1a1a2e !important;
    font-size: 20px !important;
    font-weight: bold !important;
}
#n5140 .sidelist .InfoTitle {
    color: #555555 !important;
}
#n5140 .content_container {
    background: #ffffff !important;
}
#n5140 .content_title h2 {
    color: #1a1a2e !important;
    font-size: 26px !important;
}
#n5140 .content_container .InfoTitle {
    color: #1a1a2e !important;
}
#n5140 .content_container .InfoSContent {
    color: #555555 !important;
}
#n5140 .content_container .InfoTime {
    color: #999999 !important;
}
#n5140 .article0 li a {
    background: #ffffff !important;
    border: 1px solid #e8e8ea !important;
}
#n5140 .article0,
#n5140 .sidelist {
    min-height: 50px;
}

/* ===== 文章标题序号+图标（颜色随主题变化） ===== */
/* 首页文章列表计数器 */
.article-list { counter-reset: article-num; }
.article-list li { counter-increment: article-num; }
.article-list li a::before {
    content: "\1F4C4  " counter(article-num);
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1em;
    margin-right: 6px;
    vertical-align: middle;
    transition: color 0.2s ease;
}
/* 栏目页 InfoTitle 计数器 */
.sidelist, .article0, .content_container { counter-reset: info-num; }
.sidelist li, .article0 li, .content_container li { counter-increment: info-num; }
.InfoTitle a::before,
.InfoTitle::before {
    content: "\1F4C4  " counter(info-num);
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1em;
    margin-right: 6px;
    vertical-align: middle;
    transition: color 0.2s ease;
}
/* 栏目卡片标题已有学科图标，不重复添加 */
.channel-card .card-title a::before {
    content: none !important;
    display: none !important;
}
/* 文章详情页标题不需要图标和序号 */
.content_title h2::before,
.content_title *::before,
.content_body .InfoTitle::before,
.content_body .InfoTitle h1::before,
.content_body .InfoTitle a::before {
    content: none !important;
    display: none !important;
}

/* ===== 风格切换区域（banner 下方，仅移动端显示） ===== */
.theme-switcher-section.mobile-only {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: center;
    align-items: center;
    padding: 6px 10px;
    background: transparent;
    z-index: 10;
}
.theme-switcher-section.mobile-only .theme-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
}
.theme-switcher-section.mobile-only .theme-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.theme-switcher-section.mobile-only .theme-dot.active {
    border-color: #fff;
    transform: scale(1.2);
}
@media (max-width: 991px) {
    .theme-switcher-section.mobile-only {
        display: flex;
    }
}
@media (min-width: 992px) {
    .theme-switcher-section.mobile-only {
        display: none;
    }
}
