/**
 * 全站深浅色主题 · 组件层适配（令牌见 common.css :root / html.fm-theme-dark）
 */

/* ── 水稻田：浅色与全站同色，取消独有浅绿底 ── */
html:not(.fm-theme-dark):not(.fm-pe-theme-dark) body.fm-pe-shell-body {
    background: var(--fm-page-bg) !important;
    background-image: none !important;
}

html.fm-theme-dark body.fm-pe-shell-body,
html.fm-pe-theme-dark body.fm-pe-shell-body {
    background: var(--fm-page-bg);
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(45, 154, 82, 0.06), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(36, 174, 95, 0.04), transparent 40%);
}

/* 水稻田局部变量与全站令牌对齐 */
.fm-pe-app {
    --fm-pe-bg: var(--fm-page-bg);
    --fm-pe-surface: var(--fm-card-bg);
    --fm-pe-text: var(--fm-text);
    --fm-pe-muted: var(--fm-text-soft);
    --fm-pe-line: var(--fm-line);
    --fm-pe-brand: var(--fm-brand-hover, #1a8a49);
    --fm-pe-brand-soft: var(--fm-brand-soft);
    --fm-pe-brand-surface: var(--fm-brand-surface);
    --fm-pe-brand-light: var(--fm-brand, #24AE5F);
    --fm-pe-shadow: var(--fm-card-shadow);
    --fm-pe-shadow-lg: var(--fm-shadow-lg);
}

/* ── 顶栏主题切换按钮（全站） ── */
.fm-site-theme-toggle,
.fm-pe-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--fm-nav-link-clr, rgba(255,255,255,0.85));
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fm-site-theme-toggle:hover,
.fm-site-theme-toggle:focus,
.fm-pe-theme-toggle:hover,
.fm-pe-theme-toggle:focus {
    background: var(--fm-nav-link-hover-bg, rgba(255,255,255,0.15));
    color: var(--fm-nav-link-hover-clr, #fff);
    outline: none;
}

/* 浅色模式：图标用深灰，hover 浅绿底 */
html:not(.fm-theme-dark):not(.fm-pe-theme-dark) .fm-site-theme-toggle,
html:not(.fm-theme-dark):not(.fm-pe-theme-dark) .fm-pe-theme-toggle {
    color: var(--fm-nav-link-clr, rgba(255,255,255,0.9));
}

html:not(.fm-theme-dark):not(.fm-pe-theme-dark) .fm-site-theme-toggle:hover,
html:not(.fm-theme-dark):not(.fm-pe-theme-dark) .fm-site-theme-toggle:focus,
html:not(.fm-theme-dark):not(.fm-pe-theme-dark) .fm-pe-theme-toggle:hover,
html:not(.fm-theme-dark):not(.fm-pe-theme-dark) .fm-pe-theme-toggle:focus {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

/* 深色模式：图标浅白，hover 暗绿底 */
html.fm-theme-dark .fm-site-theme-toggle,
html.fm-pe-theme-dark .fm-pe-theme-toggle {
    color: var(--fm-nav-link-clr, rgba(255,255,255,0.85));
}

html.fm-theme-dark .fm-site-theme-toggle:hover,
html.fm-theme-dark .fm-site-theme-toggle:focus,
html.fm-pe-theme-dark .fm-pe-theme-toggle:hover,
html.fm-pe-theme-dark .fm-pe-theme-toggle:focus {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

/* ── 全站卡片 / 侧栏 / 模块（深色） ── */
html.fm-theme-dark .right_list,
html.fm-theme-dark .down_list,
html.fm-theme-dark .down_content,
html.fm-theme-dark .down_detail,
html.fm-theme-dark .notice,
html.fm-theme-dark .fm-tools__hero,
html.fm-theme-dark .fm-tools__panel,
html.fm-theme-dark .fm-tools__category,
html.fm-theme-dark .fm-tools__card,
html.fm-theme-dark .index_website,
html.fm-theme-dark .index_article,
html.fm-theme-dark .fm-dl__side,
html.fm-theme-dark .fm-dl__side .left_menu,
html.fm-theme-dark .fm-dl .fm-dl__side .left_menu,
html.fm-theme-dark .list_title,
html.fm-theme-dark .fm-pe-hub-page .fm-pe-panel-card--hub {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text);
    box-shadow: var(--fm-card-shadow);
}

html.fm-theme-dark .index_article_title,
html.fm-theme-dark .index_website_title,
html.fm-theme-dark .down_title,
html.fm-theme-dark .fm-tools__category-head {
    border-color: var(--fm-line);
    color: var(--fm-text);
}

html.fm-theme-dark .article_left,
html.fm-theme-dark .article_right,
html.fm-theme-dark .index_article_content,
html.fm-theme-dark .index_website_content,
html.fm-theme-dark .down_content,
html.fm-theme-dark .fm-tools__card-desc,
html.fm-theme-dark .list_title div span {
    color: var(--fm-text-soft);
}

html.fm-theme-dark .index_article h3 a,
html.fm-theme-dark .index_website_content a,
html.fm-theme-dark .down_list a {
    color: var(--fm-text);
}

html.fm-theme-dark .index_article h3 a:hover,
html.fm-theme-dark .index_website_content a:hover {
    color: var(--fm-brand, #24AE5F);
}

/* 侧栏菜单 hover / 选中 */
html.fm-theme-dark .fm-dl__side .menu_list:hover,
html.fm-theme-dark .fm-dl .fm-dl__side .menu_list:hover {
    background-color: var(--fm-brand-surface) !important;
}

html.fm-theme-dark .fm-dl__side .menu_list.left_menu_om,
html.fm-theme-dark .fm-dl .fm-dl__side .menu_list.left_menu_om {
    background-color: var(--fm-brand-surface) !important;
}

html.fm-theme-dark .fm-dl__side .menu_list > a,
html.fm-theme-dark .fm-dl__side .menu_list.left_menu_om > a {
    color: var(--fm-brand, #24AE5F) !important;
}

/* ── 标签（绿 / 金规范保留） ── */
html.fm-theme-dark .cate_name,
html.fm-theme-dark .tag_list {
    border-color: var(--fm-brand-soft);
}

html.fm-theme-dark .cate_name--gold,
html.fm-theme-dark .tag_list--gold {
    background: var(--fm-accent-surface);
    border-color: var(--fm-accent);
    color: #e8d06a;
}

/* ── 输入框 / 下拉 / 文本域 ── */
html.fm-theme-dark input.form-control,
html.fm-theme-dark textarea.form-control,
html.fm-theme-dark select.form-control,
html.fm-theme-dark .header_search_input,
html.fm-theme-dark .fm-tool-form input:not([type="radio"]):not([type="checkbox"]),
html.fm-theme-dark .fm-tool-form textarea,
html.fm-theme-dark .fm-tool-form select {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-input-border) !important;
    color: var(--fm-text) !important;
}

html.fm-theme-dark input.form-control:focus,
html.fm-theme-dark textarea.form-control:focus,
html.fm-theme-dark .header_search_input:focus {
    border-color: var(--fm-brand, #24AE5F) !important;
    box-shadow: 0 0 0 2px rgba(36, 174, 95, 0.15);
}

/* ── 主按钮绿 / 辅助金（全站工具按钮） ── */
html.fm-theme-dark .fm-tool-btn {
    background: var(--fm-brand, #24AE5F);
    border-color: var(--fm-brand, #24AE5F);
    color: #fff;
}

html.fm-theme-dark .fm-tool-btn:hover {
    background: var(--fm-brand-hover, #1a8a49);
    border-color: var(--fm-brand-hover, #1a8a49);
}

html.fm-theme-dark .fm-tool-btn--ghost {
    background: var(--fm-accent-surface);
    border-color: var(--fm-accent, #F5D13A);
    color: #e8d06a;
}

html.fm-theme-dark .fm-tool-btn--ghost:hover {
    background: rgba(245, 209, 58, 0.22);
    border-color: var(--fm-accent-hover, #d4b030);
    color: #fff6c8;
}

html.fm-theme-dark .header_button {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

html.fm-theme-dark .header_button:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* ── 分页 / 加载更多 ── */
html.fm-theme-dark .layui-flow-more a {
    background: var(--fm-brand, #24AE5F);
    border-color: var(--fm-brand, #24AE5F);
    color: #fff;
}

html.fm-theme-dark .layui-flow-more a:hover {
    background: var(--fm-brand-hover, #1a8a49);
    border-color: var(--fm-brand-hover, #1a8a49);
}

html.fm-theme-dark .layui-flow-more span {
    background: var(--fm-accent-surface);
    border-color: var(--fm-accent);
    color: #e8d06a;
}

/* ── 弹窗 layer ── */
html.fm-theme-dark .layui-layer {
    background: var(--fm-card-bg) !important;
    color: var(--fm-text);
}

html.fm-theme-dark .layui-layer-title {
    background: var(--fm-brand-surface) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

html.fm-theme-dark .layui-layer-btn a {
    border-radius: var(--fm-radius, 4px);
}

html.fm-theme-dark .layui-layer-btn .layui-layer-btn0 {
    background-color: var(--fm-brand, #24AE5F) !important;
    border-color: var(--fm-brand, #24AE5F) !important;
    color: #fff !important;
}

html.fm-theme-dark .layui-layer-btn .layui-layer-btn1 {
    background: var(--fm-accent-surface) !important;
    border: 1px solid var(--fm-accent) !important;
    color: #e8d06a !important;
}

/* ── 文章详情 / 表格 / 代码块防溢出 ── */
html.fm-theme-dark .content_content,
html.fm-theme-dark .article-content {
    color: var(--fm-text);
}

html.fm-theme-dark .content_content pre,
html.fm-theme-dark .content_content code {
    background: var(--fm-input-bg);
    border-color: var(--fm-line);
    color: var(--fm-text);
}

html.fm-theme-dark .content_content table th,
html.fm-theme-dark .content_content table td {
    border-color: var(--fm-line);
}

/* ── 页脚 ── */
html.fm-theme-dark .footer,
html.fm-theme-dark footer.footer {
    background: var(--fm-card-bg);
    border-color: var(--fm-line);
    color: var(--fm-text-soft);
}

html.fm-theme-dark .footer a {
    color: var(--fm-brand, #24AE5F);
}

/* ── 会员中心顶栏 / 主题钮（default 布局） ── */
body.fm-user-layout .fm-user-theme-li {
    display: flex;
    align-items: center;
}

body.fm-user-layout .fm-user-theme-li .fm-site-theme-toggle {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.9);
}

body.fm-user-layout .fm-user-theme-li .fm-site-theme-toggle:hover,
body.fm-user-layout .fm-user-theme-li .fm-site-theme-toggle:focus {
    color: #fff;
    background: rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    body.fm-user-layout .fm-user-theme-li .fm-site-theme-toggle {
        height: 60px;
        width: 40px;
    }
}

html.fm-theme-dark body.fm-user-layout {
    background-color: var(--fm-page-bg);
    color: var(--fm-text);
}

html.fm-theme-dark body.fm-user-layout .navbar.navbar-white.navbar-fixed-top {
    background-color: var(--fm-nav-bg) !important;
    border-color: var(--fm-nav-bg) !important;
    box-shadow: var(--fm-nav-shadow);
}

html.fm-theme-dark body.fm-user-layout .navbar.navbar-white .navbar-nav > li > a,
html.fm-theme-dark body.fm-user-layout .navbar.navbar-white .navbar-brand {
    color: var(--fm-nav-link-clr) !important;
}

html.fm-theme-dark body.fm-user-layout .navbar.navbar-white .navbar-nav > li > a:hover,
html.fm-theme-dark body.fm-user-layout .navbar.navbar-white .navbar-nav > li > a:focus {
    color: var(--fm-nav-link-hover-clr) !important;
}

html.fm-theme-dark body.fm-user-layout .fm-user-theme-li .fm-site-theme-toggle {
    color: var(--fm-nav-link-clr);
}

html.fm-theme-dark body.fm-user-layout .fm-user-theme-li .fm-site-theme-toggle:hover,
html.fm-theme-dark body.fm-user-layout .fm-user-theme-li .fm-site-theme-toggle:focus {
    color: var(--fm-nav-link-hover-clr);
    background: var(--fm-nav-link-hover-bg);
}

html.fm-theme-dark body.fm-user-layout .navbar.navbar-white .navbar-toggle .icon-bar {
    background-color: var(--fm-nav-link-clr);
}

html.fm-theme-dark body.fm-user-layout .navbar.navbar-white .navbar-toggle {
    border-color: rgba(255, 255, 255, 0.25);
}

html.fm-theme-dark body.fm-user-layout .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--fm-brand, #24AE5F) !important;
    border: 1px solid var(--fm-brand, #24AE5F);
    border-radius: 4px;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(36, 174, 95, 0.35);
}

html.fm-theme-dark body.fm-user-layout .sidebar-toggle i {
    color: #fff !important;
    line-height: 1;
}

html.fm-theme-dark body.fm-user-layout .sidebar-toggle:hover,
html.fm-theme-dark body.fm-user-layout .sidebar-toggle:focus {
    background: var(--fm-brand-hover, #1a8a49) !important;
    border-color: var(--fm-brand-hover, #1a8a49);
    color: #fff !important;
    outline: none;
}

@media (max-width: 767px) {
    html.fm-theme-dark body.fm-user-layout .navbar.navbar-white .navbar-nav .open .dropdown-menu {
        background: var(--fm-card-bg);
        border-color: var(--fm-line);
    }

    html.fm-theme-dark body.fm-user-layout .navbar.navbar-white .dropdown-menu > li > a {
        color: var(--fm-text);
    }

    html.fm-theme-dark body.fm-user-layout .navbar.navbar-white .dropdown-menu > li > a:hover {
        color: var(--fm-brand, #24AE5F);
        background: var(--fm-brand-surface);
    }
}

/* ── 会员中心登录卡（default 布局） ── */
html.fm-theme-dark body.fm-user-layout .user-section.login-section {
    background: var(--fm-card-bg);
    border-color: var(--fm-line);
}

html.fm-theme-dark body.fm-user-layout .login-section .logon-tab {
    background: var(--fm-input-bg);
    border-color: var(--fm-line);
}

/* ── Tab / 标题下划线分隔（具体 Tab 按钮见文末首页区块） ── */
html.fm-theme-dark .index_article_title,
html.fm-theme-dark .index_website_title {
    border-color: var(--fm-line);
}

/* ── 三端：防挤压、溢出 ── */
@media (max-width: 991px) {
    .fm-navbar-auth-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    html.fm-theme-dark .fm-dl__side,
    html.fm-theme-dark .fm-tools__panel {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .fm-tool-actions,
    .fm-translate-toolbar__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .fm-tool-actions .fm-tool-btn,
    .layui-flow-more a,
    .layui-flow-more span {
        width: 100%;
        max-width: 100%;
        min-height: 44px;
        box-sizing: border-box;
    }

    html.fm-theme-dark .index_website_content li {
        width: 50%;
        box-sizing: border-box;
    }

    .header_search form,
    .fm-pe-header-lookup-form {
        max-width: 100%;
    }

    .header_search_input,
    .fm-pe-header-lookup-input {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

/* ============================================================
   浅色：卡片/模块统一令牌（消除 #fff 与全站底色脱节）
   ============================================================ */
html:not(.fm-theme-dark) .fm-dl--home .index_article_title,
html:not(.fm-theme-dark) .fm-dl--articles-list .index_article_title,
html:not(.fm-theme-dark) .fm-dl--home .notice_title,
html:not(.fm-theme-dark) .fm-dl--articles-list .notice_title,
html:not(.fm-theme-dark) .fm-dl--home .fm-daily-sentence-wrap > .list_title,
html:not(.fm-theme-dark) .fm-dl--articles-list .fm-daily-sentence-wrap > .list_title {
    background: var(--fm-card-bg) !important;
    background-image: none !important;
}

html:not(.fm-theme-dark) .content_title,
html:not(.fm-theme-dark) .article_comment,
html:not(.fm-theme-dark) .right_author,
html:not(.fm-theme-dark) .right_do,
html:not(.fm-theme-dark) .article_menu,
html:not(.fm-theme-dark) .index_article,
/* .index_search 保留首页绿色搜索条，不改为白卡 */
html:not(.fm-theme-dark) .index_website_content,
html:not(.fm-theme-dark) .down_content,
html:not(.fm-theme-dark) .down_list,
html:not(.fm-theme-dark) .detail_detail,
html:not(.fm-theme-dark) .shengming_detail,
html:not(.fm-theme-dark) .fm-dl__side,
html:not(.fm-theme-dark) .fm-dl__search-summary,
html:not(.fm-theme-dark) .fm-tools__hero,
html:not(.fm-theme-dark) .fm-tools__panel,
html:not(.fm-theme-dark) .fm-tools__category,
html:not(.fm-theme-dark) .fm-tools__card,
html:not(.fm-theme-dark) .index_ad {
    background-color: var(--fm-card-bg);
}

html:not(.fm-theme-dark) .content_title {
    background: linear-gradient(180deg, var(--fm-brand-surface) 0%, var(--fm-card-bg) 52%);
}

/* 文章详情正文区白底（勿写入方选择器，以免命中列表 .article_content） */
html:not(.fm-theme-dark) main .left .article_content,
html:not(.fm-theme-dark) .article_content.article-content {
    background-color: var(--fm-card-bg);
}

/* 首页/列表：元信息行透明，整行 hover 统一浅绿灰 */
html:not(.fm-theme-dark) .index_article_list .article_content,
html:not(.fm-theme-dark) a.index_article_list .article_content,
html:not(.fm-theme-dark) a.index_article_list:hover .article_content,
html:not(.fm-theme-dark) a.index_article_list:hover .article_left,
html:not(.fm-theme-dark) a.index_article_list:hover .article_right {
    background-color: transparent !important;
    box-shadow: none !important;
}

html.fm-theme-dark .index_article_list .article_content,
html.fm-theme-dark a.index_article_list .article_content,
html.fm-theme-dark a.index_article_list:hover .article_content,
html.fm-theme-dark a.index_article_list:hover .article_left {
    background-color: transparent !important;
    box-shadow: none !important;
}

html.fm-theme-dark main .left .article_content,
html.fm-theme-dark .article_content.article-content {
    background: var(--fm-card-bg);
}

/* ============================================================
   深色：文章 / 首页 / 下载 / 工具 补全
   ============================================================ */
html.fm-theme-dark .content_title,
html.fm-theme-dark .article_comment,
html.fm-theme-dark .right_author,
html.fm-theme-dark .right_do,
html.fm-theme-dark .article_menu,
html.fm-theme-dark .right_list,
html.fm-theme-dark .index_ad,
html.fm-theme-dark .notice,
html.fm-theme-dark .right_new,
html.fm-theme-dark .index_article,
html.fm-theme-dark .index_website_content,
html.fm-theme-dark .down_content,
html.fm-theme-dark .down_list,
html.fm-theme-dark .detail_detail,
html.fm-theme-dark .shengming_detail,
html.fm-theme-dark .download-page .down_right .down_detail,
html.fm-theme-dark .download-page .down_right .detail_detail,
html.fm-theme-dark .fm-dl__search-summary,
html.fm-theme-dark .fm-dl__main,
html.fm-theme-dark .fm-dl__recent-item,
html.fm-theme-dark .fm-tools__card,
html.fm-theme-dark .fm-word-lookup-dict-tab,
html.fm-theme-dark .fm-selection-popup__card,
html.fm-theme-dark .layui-flow-more {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text);
    box-shadow: var(--fm-card-shadow);
}

html.fm-theme-dark .content_title {
    background: linear-gradient(180deg, var(--fm-brand-surface) 0%, var(--fm-card-bg) 55%) !important;
}

html.fm-theme-dark .download-page .down_right .detail_title {
    color: var(--fm-text) !important;
    border-bottom-color: var(--fm-line) !important;
}

html.fm-theme-dark .download-page .down_content > .down_content-title,
html.fm-theme-dark .fm-dl__search-kw,
html.fm-theme-dark .fm-dl__search-summary {
    color: var(--fm-text);
}

html.fm-theme-dark .fm-dl__search-num {
    color: var(--fm-brand, #24AE5F);
}

html.fm-theme-dark .list_title,
html.fm-theme-dark .author_title,
html.fm-theme-dark .comment_title {
    color: var(--fm-text);
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark .author_title div,
html.fm-theme-dark .fm-author-stats__num {
    color: var(--fm-text);
}

html.fm-theme-dark .fm-author-stats,
html.fm-theme-dark .fm-author-stats__label,
html.fm-theme-dark .fm-author-selftip,
html.fm-theme-dark .do_list p {
    color: var(--fm-text-soft);
}

html.fm-theme-dark .menu_contnet div {
    color: var(--fm-text-soft);
}

html.fm-theme-dark .menu_contnet div:hover,
html.fm-theme-dark .menu_contnet .article_on {
    background-color: var(--fm-brand-surface) !important;
    color: var(--fm-brand, #24AE5F) !important;
}

html.fm-theme-dark .article_menu.fm-toc-highlight {
    box-shadow: 0 0 0 2px var(--fm-brand, #24AE5F);
}

/* 侧栏互动：点赞/收藏与浅色一致逻辑 */
html.fm-theme-dark .do_list:hover div,
html.fm-theme-dark .do_list_on div {
    background-color: var(--fm-brand-surface) !important;
    color: var(--fm-brand, #24AE5F) !important;
    border-color: var(--fm-brand, #24AE5F) !important;
}

html.fm-theme-dark .do_list:hover p,
html.fm-theme-dark .do_list_on p {
    color: var(--fm-brand, #24AE5F);
}

html.fm-theme-dark .fm-author-action--secondary {
    background: var(--fm-accent-surface);
    border-color: rgba(245, 209, 58, 0.45);
    color: #e8d06a;
}

html.fm-theme-dark .need_login,
html.fm-theme-dark .comment_content .textarea > textarea,
html.fm-theme-dark .fm-comment-emoji-panel {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-input-border) !important;
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .fm-comment-report-layer--zhihu .layui-layer-title {
    background: var(--fm-card-bg) !important;
    color: var(--fm-text) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark .layui-layer-content {
    background: var(--fm-card-bg) !important;
    color: var(--fm-text);
}

html.fm-theme-dark .layui-layer-setwin a {
    color: var(--fm-text-soft);
}

html.fm-theme-dark .layui-layer-setwin a:hover {
    color: var(--fm-text);
}

/* 首页 Tab / 公告 */
html.fm-theme-dark .notice_title a {
    border-color: var(--fm-line);
    color: var(--fm-text-soft);
}

html.fm-theme-dark .notice_title a:hover {
    background: var(--fm-list-hover-bg) !important;
    color: var(--fm-text) !important;
    border-color: var(--fm-line) !important;
}

/* 首页/列表 Tab 栏：深色下与页面同色，无白底条 */
html.fm-theme-dark .fm-dl--home .index_article_title,
html.fm-theme-dark .fm-dl--articles-list .index_article_title,
html.fm-theme-dark .fm-dl--home .notice_title,
html.fm-theme-dark .fm-dl--articles-list .notice_title,
html.fm-theme-dark .fm-dl--home .fm-daily-sentence-wrap > .list_title,
html.fm-theme-dark .fm-dl--articles-list .fm-daily-sentence-wrap > .list_title {
    background: var(--fm-card-bg) !important;
    border-bottom-color: var(--fm-line) !important;
}

/* 最新/推荐：未选中深底 */
html.fm-theme-dark .fm-dl--home .index_article_title a:not(.website_title_on),
html.fm-theme-dark .fm-dl--articles-list .index_article_title a:not(.website_title_on) {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

html.fm-theme-dark .fm-dl--home .notice_title a:not(:has(.fa-user)),
html.fm-theme-dark .fm-dl--articles-list .notice_title a:not(:has(.fa-user)) {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .fm-dl--home .index_article_title a:not(.website_title_on):hover,
html.fm-theme-dark .fm-dl--articles-list .index_article_title a:not(.website_title_on):hover {
    background: var(--fm-brand-surface) !important;
    border-color: var(--fm-brand-soft) !important;
    color: var(--fm-brand, #24AE5F) !important;
}

html.fm-theme-dark .fm-dl--home .notice_title a:not(:has(.fa-user)):hover,
html.fm-theme-dark .fm-dl--articles-list .notice_title a:not(:has(.fa-user)):hover {
    background: var(--fm-list-hover-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

html.fm-theme-dark .fm-dl--home .notice_title a:has(.fa-user),
html.fm-theme-dark .fm-dl--articles-list .notice_title a:has(.fa-user) {
    background: var(--fm-notice-member-bg) !important;
    border-color: var(--fm-notice-member-border) !important;
    color: var(--fm-notice-member-color) !important;
}

/* 最新/推荐：选中主绿 */
html.fm-theme-dark .fm-dl--home .index_article_title a.website_title_on,
html.fm-theme-dark .fm-dl--articles-list .index_article_title a.website_title_on {
    background: var(--fm-brand, #24AE5F) !important;
    border-color: var(--fm-brand, #24AE5F) !important;
    color: #fff !important;
}

html.fm-theme-dark .fm-dl--home .notice_title a.notice_on:not(:has(.fa-user)),
html.fm-theme-dark .fm-dl--articles-list .notice_title a.notice_on:not(:has(.fa-user)) {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-brand, #24AE5F) !important;
    color: var(--fm-brand, #24AE5F) !important;
}

html.fm-theme-dark .fm-dl--home .notice_title a.notice_on:not(:has(.fa-user)) .fa,
html.fm-theme-dark .fm-dl--articles-list .notice_title a.notice_on:not(:has(.fa-user)) .fa {
    color: var(--fm-brand, #24AE5F);
}

html.fm-theme-dark .fm-dl--home .index_article_list:hover,
html.fm-theme-dark .fm-dl--articles-list .index_article_list:hover,
html.fm-theme-dark a.index_article_list:hover {
    background-color: var(--fm-list-hover-bg) !important;
}

/* 其他页 Tab（非 fm-dl--home） */
html.fm-theme-dark .index_article_title a:not(.website_title_on),
html.fm-theme-dark .index_website_title a:not(.website_title_on) {
    color: var(--fm-text-soft);
    border-color: var(--fm-line);
    background: var(--fm-input-bg);
}

html.fm-theme-dark .index_article_title a.website_title_on,
html.fm-theme-dark .index_website_title a.website_title_on {
    background: var(--fm-brand, #24AE5F) !important;
    border-color: var(--fm-brand, #24AE5F) !important;
    color: #fff !important;
}

html.fm-theme-dark .index_article_list_on h4,
html.fm-theme-dark .index_article_list_on div .countups {
    color: var(--fm-brand, #24AE5F);
}

html.fm-theme-dark .index_article_list_on div .cate_name,
html.fm-theme-dark .index_article_list:hover div .cate_name,
html.fm-theme-dark a.index_article_list:hover .article_content .cate_name {
    background: transparent !important;
    color: var(--fm-brand, #24AE5F) !important;
    border-color: var(--fm-brand-soft) !important;
}

/* 首页搜索条：深色仍用品牌绿渐变（非白卡） */
html.fm-theme-dark .index_search {
    background: linear-gradient(to bottom, var(--fm-brand-hover, #1a8a49), var(--fm-brand, #24AE5F)) !important;
    color: #fff;
    border-color: transparent !important;
}

html.fm-theme-dark .index_search_form button {
    background-color: var(--fm-card-bg) !important;
    color: var(--fm-brand, #24AE5F) !important;
}

html.fm-theme-dark .fm-dl__side .menu_list > a,
html.fm-theme-dark .fm-dl__side .menu_list > a:link,
html.fm-theme-dark .fm-dl__side .menu_list > a:visited {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .fm-dl__side .menu_list:hover > a,
html.fm-theme-dark .fm-dl__side .menu_list.left_menu_om > a {
    color: var(--fm-brand, #24AE5F) !important;
}

html.fm-theme-dark .down_list:hover {
    background: var(--fm-card-bg) !important;
    box-shadow: var(--fm-card-shadow-hover);
}

/* 工具：词典 Tab / 卡片选中 */
html.fm-theme-dark .fm-word-lookup-dict-tab {
    background: var(--fm-input-bg);
    border-color: var(--fm-input-border);
    color: var(--fm-text-soft);
}

html.fm-theme-dark .fm-word-lookup-dict-tab:hover {
    border-color: var(--fm-brand, #24AE5F);
    color: var(--fm-brand, #24AE5F);
}

html.fm-theme-dark .fm-word-lookup-dict-tab.is-active {
    background: var(--fm-brand, #24AE5F);
    border-color: var(--fm-brand, #24AE5F);
    color: #fff;
}

html.fm-theme-dark .fm-tools__cards--lookup-channel button.fm-tools__card.is-active {
    border-color: var(--fm-brand, #24AE5F);
    background: var(--fm-brand-surface) !important;
}

html.fm-theme-dark .fm-tools__card:hover {
    border-color: var(--fm-brand-soft);
    box-shadow: var(--fm-card-shadow-hover);
}

html.fm-theme-dark .fm-word-lookup-pre {
    background: var(--fm-input-bg);
    color: var(--fm-text);
}

html.fm-theme-dark .fm-selection-popup__backdrop {
    background: rgba(0, 0, 0, 0.55);
}

/* 顶栏：深色柔和暗绿（防切换闪色） */
html.fm-theme-dark body:not(.fm-user-layout) nav.navbar.navbar-default.navbar-white.navbar-fixed-top {
    background-color: var(--fm-nav-bg) !important;
    border-color: var(--fm-nav-bg) !important;
    box-shadow: var(--fm-nav-shadow);
}

html.fm-theme-dark body:not(.fm-user-layout) #header-navbar .navbar-nav > li > a {
    color: var(--fm-nav-link-clr);
}

html.fm-theme-dark body:not(.fm-user-layout) #header-navbar .navbar-nav > li > a:hover,
html.fm-theme-dark body:not(.fm-user-layout) #header-navbar .navbar-nav > li > a:focus {
    color: var(--fm-nav-link-hover-clr);
    background: var(--fm-nav-link-hover-bg);
}

html.fm-theme-dark body:not(.fm-user-layout) #header-navbar .navbar-nav > li.menu_on > a {
    color: var(--fm-nav-active-clr) !important;
    background: var(--fm-nav-active-bg);
}

/* 文章详情：滚动固定标题条（浅色/深色统一卡片底，紧贴导航下缘防漏绿） */
html.fm-theme-dark .article_title_fix,
html:not(.fm-theme-dark) .article_title_fix {
    background-color: var(--fm-card-bg) !important;
    color: var(--fm-text);
    border-bottom: 1px solid var(--fm-line);
}

html.fm-theme-dark .article_title_fix {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
}

html.fm-theme-dark .header_search input:focus,
html.fm-theme-dark .header_search .header_search_input:focus {
    background-color: var(--fm-input-bg) !important;
}

@media (max-width: 767px) {
    html.fm-theme-dark body.fm-site-shell:not(.fm-user-layout) #header-navbar .navbar-nav > li > a {
        color: var(--fm-text);
    }

    html.fm-theme-dark body.fm-site-shell:not(.fm-user-layout) #header-navbar .navbar-nav > li > a:hover {
        color: var(--fm-brand, #24AE5F);
        background: var(--fm-brand-surface);
    }

    html.fm-theme-dark .title,
    html.fm-theme-dark .content_title .title,
    html.fm-theme-dark .fm-tools__hero h1,
    html.fm-theme-dark .down_content-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    html.fm-theme-dark main.content:not(.main-download-layout) .container > .right {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    html.fm-theme-dark .fm-dl {
        grid-template-columns: 1fr;
    }

    html.fm-theme-dark .fm-dl__side {
        position: static;
        max-height: none;
        width: 100%;
    }

    html.fm-theme-dark .down_list {
        width: 100%;
        float: none;
        height: auto;
        min-height: 0;
    }
}

/* 正文 / 标签 / 分割线（深浅共用令牌） */
html.fm-theme-dark .content_content a {
    color: var(--fm-brand, #24AE5F);
}

html.fm-theme-dark .content_content a:hover {
    color: var(--fm-brand-hover, #1a8a49);
}

html.fm-theme-dark .tag_list,
html.fm-theme-dark .cate_name,
html.fm-theme-dark .fm-dl--home .index_article .cate_name,
html.fm-theme-dark .fm-dl--articles-list .index_article .cate_name,
html.fm-theme-dark a.index_article_list:hover .cate_name,
html.fm-theme-dark a.index_article_list:hover .article_content .cate_name {
    background: transparent !important;
    color: var(--fm-brand, #24AE5F) !important;
    border: 1px solid var(--fm-brand-soft) !important;
    border-radius: var(--fm-tag-radius, 4px);
    font-size: var(--fm-tag-font-size, 11px);
}

html.fm-theme-dark .fm-dl--home .fm-daily-sentence-wrap,
html.fm-theme-dark .fm-dl--articles-list .fm-daily-sentence-wrap {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark .fm-dl--home .fm-daily-actions,
html.fm-theme-dark .fm-dl--articles-list .fm-daily-actions {
    background: var(--fm-card-bg);
    border-top-color: var(--fm-line);
}

html.fm-theme-dark hr,
html.fm-theme-dark .author_title,
html.fm-theme-dark .comment_title,
html.fm-theme-dark .list_title {
    border-color: var(--fm-line) !important;
}

/* .fm-btn-brand 品牌绿按钮（全局基础样式，浅/深两套均生效） */
.btn.fm-btn-brand,
.fm-btn-brand {
    background-color: #24AE5F;
    border-color: #1a8a49;
    color: #fff !important;
}
.btn.fm-btn-brand:hover,
.btn.fm-btn-brand:focus,
.fm-btn-brand:hover,
.fm-btn-brand:focus {
    background-color: #1a8a49;
    border-color: #147039;
    color: #fff !important;
}

/* 注册/登录主按钮、金色次按钮（会员区表单） */
html.fm-theme-dark .btn-success,
html.fm-theme-dark .btn-primary.fm-btn-brand,
html.fm-theme-dark .btn.fm-btn-brand,
html.fm-theme-dark .fm-btn-brand {
    background-color: var(--fm-brand, #24AE5F) !important;
    border-color: var(--fm-brand-hover, #1a8a49) !important;
    color: #fff !important;
}

html.fm-theme-dark .btn-warning,
html.fm-theme-dark .btn-gold,
html.fm-theme-dark .fm-btn-accent {
    background: var(--fm-accent, #F5D13A) !important;
    border-color: var(--fm-accent, #F5D13A) !important;
    color: #1a1a1a !important;
}

/* ============================================================
   浅色：侧栏三按钮 / 列表 hover / 标签（切换主题不跑偏）
   ============================================================ */
html:not(.fm-theme-dark) .fm-dl--home .notice_title a:not(:has(.fa-user)),
html:not(.fm-theme-dark) .fm-dl--articles-list .notice_title a:not(:has(.fa-user)) {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text-soft) !important;
}

html:not(.fm-theme-dark) .fm-dl--home .notice_title a:has(.fa-user),
html:not(.fm-theme-dark) .fm-dl--articles-list .notice_title a:has(.fa-user) {
    background: var(--fm-notice-member-bg) !important;
    border-color: var(--fm-notice-member-border) !important;
    color: var(--fm-notice-member-color) !important;
}

html:not(.fm-theme-dark) .fm-dl--home .notice_title a.notice_on:not(:has(.fa-user)),
html:not(.fm-theme-dark) .fm-dl--articles-list .notice_title a.notice_on:not(:has(.fa-user)) {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-brand) !important;
    color: var(--fm-brand) !important;
}

html:not(.fm-theme-dark) a.index_article_list:hover,
html:not(.fm-theme-dark) a.index_article_list:hover .article_content,
html:not(.fm-theme-dark) a.index_article_list:hover .article_left {
    background-color: var(--fm-list-hover-bg) !important;
}

html:not(.fm-theme-dark) .fm-dl--home .index_article .cate_name,
html:not(.fm-theme-dark) .fm-dl--articles-list .index_article .cate_name {
    background: transparent !important;
    border: 1px solid var(--fm-brand-soft) !important;
    color: var(--fm-brand) !important;
    border-radius: var(--fm-tag-radius, 4px);
    font-size: var(--fm-tag-font-size, 11px);
}

/* ============================================================
   全站组件：侧栏 / 弹窗 / 分页 / 下拉（深色补强）
   ============================================================ */
html.fm-theme-dark .fm-dl__side,
html.fm-theme-dark .fm-dl__side .left_menu,
html.fm-theme-dark .fm-dl .fm-dl__side .left_menu {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark .layui-layer-dialog,
html.fm-theme-dark .layui-layer-page .layui-layer-content {
    background: var(--fm-card-bg) !important;
    color: var(--fm-text);
}

html.fm-theme-dark .layui-flow-more {
    background: transparent !important;
}

html.fm-theme-dark .layui-flow-more a {
    background: var(--fm-brand, #24AE5F) !important;
    color: #fff !important;
}

html.fm-theme-dark .layui-flow-more span {
    background: var(--fm-accent-surface) !important;
    color: #e8d06a !important;
    border-color: var(--fm-accent) !important;
}

html.fm-theme-dark .dropdown-menu {
    background: var(--fm-card-bg);
    border-color: var(--fm-line);
}

html.fm-theme-dark .dropdown-menu > li > a {
    color: var(--fm-text);
}

html.fm-theme-dark .dropdown-menu > li > a:hover {
    background: var(--fm-brand-surface);
    color: var(--fm-brand, #24AE5F);
}

/* ============================================================
   三端排版微调（首页 / 列表 / 工具）
   ============================================================ */
@media (max-width: 991px) {
    /* 水稻田：工具区卡片防挤压 */
    .fm-pe-app .fm-pe-tool-grid,
    .fm-pe-app .fm-pe-panel-card,
    .fm-pe-app .fm-daily-practice-aside {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .fm-pe-app .fm-daily-practice-stats {
        min-width: 0;
    }

    .fm-dl--home .notice_title a,
    .fm-dl--articles-list .notice_title a {
        min-height: 36px;
        padding: 6px 6px;
        font-size: 13px;
    }

    .fm-dl--home .index_article_list,
    .fm-dl--articles-list .index_article_list {
        padding: var(--fm-space-3) var(--fm-space-4);
    }
}

@media (max-width: 767px) {
    /* 文章详情：防横向溢出、卡片边距与版心对齐 */
    body.fm-site-shell:not(.fm-user-layout) main.content:not(.main-download-layout) .container {
        padding-left: var(--fm-shell-pad, 12px);
        padding-right: var(--fm-shell-pad, 12px);
        box-sizing: border-box;
        overflow-x: hidden;
    }

    body.fm-site-shell:not(.fm-user-layout) main.content:not(.main-download-layout) .container > .left,
    body.fm-site-shell:not(.fm-user-layout) main.content:not(.main-download-layout) .container > .right {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .fm-dl--home .notice_title,
    .fm-dl--articles-list .notice_title {
        padding: 12px 10px 8px;
        gap: 6px;
    }

    .fm-dl--home .notice_title a,
    .fm-dl--articles-list .notice_title a {
        font-size: 12px;
        min-height: 34px;
    }

    html.fm-theme-dark .fm-tools__grid,
    html.fm-theme-dark .fm-tools__grid--cate-focus {
        grid-template-columns: 1fr;
    }

    html.fm-theme-dark .fm-tools__grid--cate-focus .fm-tools__catalog {
        position: static;
    }

    .fm-dl--home .index_article_title a,
    .fm-dl--articles-list .index_article_title a {
        min-height: 34px;
        padding: 6px 10px;
    }
}

/* ============================================================
   全站卡片标题栏：浅色白底 / 深色卡片底（禁止标题区白块）
   覆盖首页、名站导航、软件库、在线工具、水稻田、文章侧栏等
   ============================================================ */

/* 标题栏共用选择器（板块顶栏，非正文 h1） */
html:not(.fm-theme-dark) .list_title,
html:not(.fm-theme-dark) .index_article_title,
html:not(.fm-theme-dark) .index_website_title,
html:not(.fm-theme-dark) .notice_title,
html:not(.fm-theme-dark) .down_title,
html:not(.fm-theme-dark) .new_title,
html:not(.fm-theme-dark) .detail_title,
html:not(.fm-theme-dark) .shengming_title,
html:not(.fm-theme-dark) .author_title,
html:not(.fm-theme-dark) .comment_title,
html:not(.fm-theme-dark) .fm-dl-detail-recommend__head,
html:not(.fm-theme-dark) .fm-tools__category-head,
html:not(.fm-theme-dark) .fm-pe-panel-card > .fm-pe-panel__head,
html:not(.fm-theme-dark) .fm-pe-tool-catalog > .fm-tools__category > .fm-tools__category-head,
html:not(.fm-theme-dark) body.fm-page-website-list .index_website_title,
html:not(.fm-theme-dark) body.fm-page-website-list .index_article_title,
html:not(.fm-theme-dark) body.fm-page-website-list .list_title,
html:not(.fm-theme-dark) main.content .container > .left .index_website .index_article_title,
html:not(.fm-theme-dark) main.content .container > .right .list_title,
html:not(.fm-theme-dark) .fm-dl--home .index_article_title,
html:not(.fm-theme-dark) .fm-dl--articles-list .index_article_title,
html:not(.fm-theme-dark) .fm-dl--home .notice_title,
html:not(.fm-theme-dark) .fm-dl--articles-list .notice_title,
html:not(.fm-theme-dark) .fm-dl--home .fm-daily-sentence-wrap > .list_title,
html:not(.fm-theme-dark) .fm-dl--articles-list .fm-daily-sentence-wrap > .list_title,
html:not(.fm-theme-dark) .fm-dl--home .list_title,
html:not(.fm-theme-dark) .fm-dl--articles-list .list_title {
    background: var(--fm-card-title-bg, var(--fm-card-bg)) !important;
    background-image: none !important;
}

html.fm-theme-dark .list_title,
html.fm-theme-dark .index_article_title,
html.fm-theme-dark .index_website_title,
html.fm-theme-dark .notice_title,
html.fm-theme-dark .down_title,
html.fm-theme-dark .new_title,
html.fm-theme-dark .detail_title,
html.fm-theme-dark .shengming_title,
html.fm-theme-dark .author_title,
html.fm-theme-dark .comment_title,
html.fm-theme-dark .fm-dl-detail-recommend__head,
html.fm-theme-dark .fm-tools__category-head,
html.fm-theme-dark .fm-pe-panel-card > .fm-pe-panel__head,
html.fm-theme-dark .fm-pe-tool-catalog > .fm-tools__category > .fm-tools__category-head,
html.fm-theme-dark body.fm-page-website-list .index_website_title,
html.fm-theme-dark body.fm-page-website-list .index_article_title,
html.fm-theme-dark body.fm-page-website-list .list_title,
html.fm-theme-dark main.content .container > .left .index_website .index_article_title,
html.fm-theme-dark main.content .container > .right .list_title,
html.fm-theme-dark .fm-dl--home .index_article_title,
html.fm-theme-dark .fm-dl--articles-list .index_article_title,
html.fm-theme-dark .fm-dl--home .notice_title,
html.fm-theme-dark .fm-dl--articles-list .notice_title,
html.fm-theme-dark .fm-dl--home .fm-daily-sentence-wrap > .list_title,
html.fm-theme-dark .fm-dl--articles-list .fm-daily-sentence-wrap > .list_title,
html.fm-theme-dark .fm-dl--home .list_title,
html.fm-theme-dark .fm-dl--articles-list .list_title,
html.fm-pe-theme-dark .list_title,
html.fm-pe-theme-dark .index_article_title,
html.fm-pe-theme-dark .index_website_title,
html.fm-pe-theme-dark .notice_title,
html.fm-pe-theme-dark .fm-tools__category-head,
html.fm-pe-theme-dark .fm-pe-panel-card > .fm-pe-panel__head,
html.fm-pe-theme-dark .fm-dl--home .index_article_title,
html.fm-pe-theme-dark .fm-dl--articles-list .index_article_title,
html.fm-pe-theme-dark .fm-dl--home .notice_title,
html.fm-pe-theme-dark .fm-dl--articles-list .notice_title,
html.fm-pe-theme-dark .fm-dl--home .list_title,
html.fm-pe-theme-dark .fm-dl--articles-list .list_title {
    background: var(--fm-card-title-bg, var(--fm-card-bg)) !important;
    background-image: none !important;
    border-bottom-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

/* 标题栏内标签：选中/链接保留 LOGO 绿 */
html.fm-theme-dark .list_title a,
html.fm-theme-dark .list_title div span,
html.fm-pe-theme-dark .list_title a {
    color: var(--fm-brand, #24AE5F) !important;
}

html.fm-theme-dark .fm-tools__category-title,
html.fm-theme-dark .fm-tools__panel-title,
html.fm-theme-dark .fm-pe-panel__title,
html.fm-pe-theme-dark .fm-tools__category-title,
html.fm-pe-theme-dark .fm-pe-panel__title {
    color: var(--fm-text) !important;
    border-left-color: var(--fm-brand, #24AE5F) !important;
}

html.fm-theme-dark .index_website_title a.website_title_on,
html.fm-theme-dark .index_article_title a.website_title_on,
html.fm-theme-dark .fm-dl--home .index_article_title a.website_title_on,
html.fm-theme-dark .fm-dl--articles-list .index_article_title a.website_title_on,
html.fm-pe-theme-dark .index_article_title a.website_title_on {
    background: var(--fm-brand, #24AE5F) !important;
    border-color: var(--fm-brand, #24AE5F) !important;
    color: #fff !important;
}

/* 侧栏菜单 / 右侧快捷按钮卡片 */
html.fm-theme-dark .fm-dl__side,
html.fm-theme-dark .fm-dl__side .left_menu,
html.fm-theme-dark .right_author,
html.fm-theme-dark .right_do,
html.fm-theme-dark .article_menu,
html.fm-pe-theme-dark .fm-dl__side,
html.fm-pe-theme-dark .fm-pe-tool-catalog.fm-pe-panel-card {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark .do_list div,
html.fm-pe-theme-dark .do_list div {
    background: var(--fm-brand-surface) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-brand, #24AE5F) !important;
}

html.fm-theme-dark .author_title div,
html.fm-pe-theme-dark .author_title div {
    color: var(--fm-text) !important;
}

/* 水稻田 hub 大卡片：深色禁止白渐变 */
html.fm-theme-dark .fm-pe-hub-page .fm-pe-panel-card--hub,
html.fm-pe-theme-dark .fm-pe-hub-page .fm-pe-panel-card--hub {
    background: var(--fm-card-bg) !important;
    background-image: none !important;
    border-color: var(--fm-line) !important;
}

/* ============================================================
   补全深色适配：各页面固定侧栏 / 首页功能导航 / 名站导航页专属组件
   ============================================================ */

/* 首页 / 文章列表：左侧分类侧栏（index.css .container > .left）*/
html.fm-theme-dark .container:not(.download-page) > .left:has(.left_menu),
html.fm-pe-theme-dark .container:not(.download-page) > .left:has(.left_menu) {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark .container:not(.download-page) > .left:has(.left_menu) .menu_list > a {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .container:not(.download-page) > .left:has(.left_menu) .menu_list:hover > a,
html.fm-theme-dark .container:not(.download-page) > .left:has(.left_menu) .menu_list.left_menu_om > a {
    color: var(--fm-brand, #24AE5F) !important;
}

/* 首页功能区导航卡片（index.css .fm-home-portal）*/
html.fm-theme-dark .fm-home-portal,
html.fm-pe-theme-dark .fm-home-portal {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

/* 软件库独立旧式页：body > .container > .left 侧栏（down.css）*/
html.fm-theme-dark body > .container > .left:has(.left_menu),
html.fm-pe-theme-dark body > .container > .left:has(.left_menu) {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

/* 名站导航页：侧栏内菜单白底 */
html.fm-theme-dark body.fm-page-website-list .left .left_menu,
html.fm-pe-theme-dark body.fm-page-website-list .left .left_menu {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark body.fm-page-website-list .left .menu_list > a,
html.fm-pe-theme-dark body.fm-page-website-list .left .menu_list > a {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark body.fm-page-website-list .left .menu_list:hover > a,
html.fm-theme-dark body.fm-page-website-list .left .menu_list.left_menu_om > a,
html.fm-pe-theme-dark body.fm-page-website-list .left .menu_list:hover > a,
html.fm-pe-theme-dark body.fm-page-website-list .left .menu_list.left_menu_om > a {
    color: var(--fm-brand, #24AE5F) !important;
}

html.fm-theme-dark body.fm-page-website-list .left .menu_list.left_menu_om,
html.fm-pe-theme-dark body.fm-page-website-list .left .menu_list.left_menu_om {
    background-color: var(--fm-brand-surface) !important;
}

/* 名站导航页：顶部分类导航条 .right_top */
html.fm-theme-dark body.fm-page-website-list .right_top,
html.fm-pe-theme-dark body.fm-page-website-list .right_top {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark body.fm-page-website-list .right_top a,
html.fm-pe-theme-dark body.fm-page-website-list .right_top a {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark body.fm-page-website-list .right_top a:hover,
html.fm-pe-theme-dark body.fm-page-website-list .right_top a:hover {
    color: var(--fm-brand, #24AE5F) !important;
}

/* 名站导航页：AI 搜索标题 */
html.fm-theme-dark body.fm-page-website-list .fm-ai-search-title,
html.fm-pe-theme-dark body.fm-page-website-list .fm-ai-search-title {
    color: var(--fm-text) !important;
}

/* 名站导航页：AI 搜索类型按钮（未选中态）*/
html.fm-theme-dark body.fm-page-website-list .fm-ai-search-type a:not(.type_on),
html.fm-pe-theme-dark body.fm-page-website-list .fm-ai-search-type a:not(.type_on) {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-input-border) !important;
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark body.fm-page-website-list .fm-ai-search-type a:not(.type_on):hover,
html.fm-pe-theme-dark body.fm-page-website-list .fm-ai-search-type a:not(.type_on):hover {
    border-color: var(--fm-brand-soft) !important;
    color: var(--fm-brand, #24AE5F) !important;
    background: var(--fm-brand-surface) !important;
}

/* 名站导航页：站内搜索结果框 */
html.fm-theme-dark body.fm-page-website-list .fm-site-search-results,
html.fm-pe-theme-dark body.fm-page-website-list .fm-site-search-results {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark body.fm-page-website-list .fm-site-search-results__head,
html.fm-pe-theme-dark body.fm-page-website-list .fm-site-search-results__head {
    border-bottom-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

html.fm-theme-dark body.fm-page-website-list .fm-site-search-link__name,
html.fm-pe-theme-dark body.fm-page-website-list .fm-site-search-link__name {
    color: var(--fm-text) !important;
}

html.fm-theme-dark body.fm-page-website-list .fm-site-search-link__meta,
html.fm-theme-dark body.fm-page-website-list .fm-ai-search-tip,
html.fm-theme-dark body.fm-page-website-list .fm-site-search-empty,
html.fm-pe-theme-dark body.fm-page-website-list .fm-site-search-link__meta,
html.fm-pe-theme-dark body.fm-page-website-list .fm-ai-search-tip,
html.fm-pe-theme-dark body.fm-page-website-list .fm-site-search-empty {
    color: var(--fm-text-soft) !important;
}

/* 名站导航页：搜索输入框 + AI 检索文本域 */
html.fm-theme-dark body.fm-page-website-list .search_input textarea,
html.fm-theme-dark body.fm-page-website-list .fm-site-search-field input,
html.fm-pe-theme-dark body.fm-page-website-list .search_input textarea,
html.fm-pe-theme-dark body.fm-page-website-list .fm-site-search-field input {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-input-border) !important;
    color: var(--fm-text) !important;
}

html.fm-theme-dark body.fm-page-website-list .search_input textarea:focus,
html.fm-theme-dark body.fm-page-website-list .fm-site-search-field input:focus,
html.fm-pe-theme-dark body.fm-page-website-list .search_input textarea:focus,
html.fm-pe-theme-dark body.fm-page-website-list .fm-site-search-field input:focus {
    border-color: var(--fm-brand, #24AE5F) !important;
    box-shadow: 0 0 0 2px rgba(36, 174, 95, 0.15);
}

html.fm-theme-dark body.fm-page-website-list .fm-site-search-inline-clear,
html.fm-pe-theme-dark body.fm-page-website-list .fm-site-search-inline-clear {
    color: var(--fm-text-soft) !important;
}

/* 名站导航页：快速搜索链接 + 友情链接按钮 */
html.fm-theme-dark body.fm-page-website-list .search_list a,
html.fm-theme-dark body.fm-page-website-list .friend_content a,
html.fm-pe-theme-dark body.fm-page-website-list .search_list a,
html.fm-pe-theme-dark body.fm-page-website-list .friend_content a {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-input-border) !important;
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark body.fm-page-website-list .search_list a:hover,
html.fm-theme-dark body.fm-page-website-list .friend_content a:hover,
html.fm-pe-theme-dark body.fm-page-website-list .search_list a:hover,
html.fm-pe-theme-dark body.fm-page-website-list .friend_content a:hover {
    background: var(--fm-brand-surface) !important;
    border-color: var(--fm-brand-soft) !important;
    color: var(--fm-brand, #24AE5F) !important;
}

/* 名站导航页：热搜/视频/音乐侧栏列表文字 */
html.fm-theme-dark body.fm-page-website-list .top-10 li,
html.fm-pe-theme-dark body.fm-page-website-list .top-10 li {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark body.fm-page-website-list .top-10 li:not(:last-child),
html.fm-pe-theme-dark body.fm-page-website-list .top-10 li:not(:last-child) {
    border-bottom-color: var(--fm-line) !important;
}

html.fm-theme-dark body.fm-page-website-list .top-10 li a,
html.fm-pe-theme-dark body.fm-page-website-list .top-10 li a {
    color: var(--fm-text) !important;
}

html.fm-theme-dark body.fm-page-website-list .top-10 li a:hover,
html.fm-pe-theme-dark body.fm-page-website-list .top-10 li a:hover {
    color: var(--fm-brand, #24AE5F) !important;
}

/* 名站导航页：网址内容区底色（从 website.css 继承的 #fff 底色）*/
html.fm-theme-dark body.fm-page-website-list .index_website_content,
html.fm-pe-theme-dark body.fm-page-website-list .index_website_content {
    background: var(--fm-card-bg) !important;
}

html.fm-theme-dark body.fm-page-website-list .index_website_content a,
html.fm-pe-theme-dark body.fm-page-website-list .index_website_content a {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark body.fm-page-website-list .index_website_content a:hover,
html.fm-pe-theme-dark body.fm-page-website-list .index_website_content a:hover {
    color: var(--fm-brand, #24AE5F) !important;
    background: var(--fm-brand-surface) !important;
}

/* 名站导航页：关于文字 + 友链区 */
html.fm-theme-dark body.fm-page-website-list .about_content p,
html.fm-theme-dark body.fm-page-website-list .about_content p a,
html.fm-pe-theme-dark body.fm-page-website-list .about_content p,
html.fm-pe-theme-dark body.fm-page-website-list .about_content p a {
    color: var(--fm-text-soft) !important;
}

/* ============================================================
   补全深色适配第二轮：软件库排行/最近更新/相关推荐 + 名站搜索区
   ============================================================ */

/* 名站导航页：搜索区禁止绿色渐变，改用卡片底色 */
html.fm-theme-dark body.fm-page-website-list .index_search,
html.fm-pe-theme-dark body.fm-page-website-list .index_search {
    background: var(--fm-card-bg) !important;
    background-image: none !important;
    color: var(--fm-text) !important;
    border-color: var(--fm-line) !important;
}

/* 软件库：最近更新卡片边框颜色 */
html.fm-theme-dark .fm-dl__recent-grid > .fm-dl__card,
html.fm-pe-theme-dark .fm-dl__recent-grid > .fm-dl__card {
    border-color: var(--fm-line) !important;
    background: var(--fm-card-bg) !important;
}

/* 软件库：卡片内软件名称 / 时间 / 简介文字 */
html.fm-theme-dark .fm-dl__recent-grid .new_content > p:first-child,
html.fm-theme-dark .fm-dl__recent-grid .show_content > p,
html.fm-pe-theme-dark .fm-dl__recent-grid .new_content > p:first-child,
html.fm-pe-theme-dark .fm-dl__recent-grid .show_content > p {
    color: var(--fm-text) !important;
}

html.fm-theme-dark .fm-dl__recent-grid .new_content p.new_dis,
html.fm-pe-theme-dark .fm-dl__recent-grid .new_content p.new_dis {
    color: var(--fm-text-soft) !important;
}

/* 软件库：下载排行榜 .down_top_list 软件名/下载量文字 */
html.fm-theme-dark .fm-dl .down_top_list p > a,
html.fm-pe-theme-dark .fm-dl .down_top_list p > a {
    color: var(--fm-text) !important;
}

html.fm-theme-dark .fm-dl .down_top_list .down_down,
html.fm-pe-theme-dark .fm-dl .down_top_list .down_down {
    color: var(--fm-text-soft) !important;
}

/* 软件库：广告区域 / .index_ad 内文字（含关闭按钮） */
html.fm-theme-dark .index_ad,
html.fm-pe-theme-dark .index_ad {
    background: var(--fm-card-bg) !important;
}

/* 软件库：相关推荐区域底色 + 卡片白底 */
html.fm-theme-dark .download-page .fm-dl-detail-recommend,
html.fm-pe-theme-dark .download-page .fm-dl-detail-recommend {
    background-color: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark .download-page .fm-dl-detail-recommend .index_article_1,
html.fm-pe-theme-dark .download-page .fm-dl-detail-recommend .index_article_1 {
    background-color: var(--fm-page-bg) !important;
}

html.fm-theme-dark .download-page .fm-dl-detail-recommend .index_article_1 > .down_list,
html.fm-pe-theme-dark .download-page .fm-dl-detail-recommend .index_article_1 > .down_list {
    background-color: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

/* 软件库：详情右侧信息卡文字 */
html.fm-theme-dark .download-page .down_right .down_detail,
html.fm-pe-theme-dark .download-page .down_right .down_detail {
    background-color: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark .download-page .down_right .detail_title,
html.fm-pe-theme-dark .download-page .down_right .detail_title {
    color: var(--fm-text) !important;
    border-bottom-color: var(--fm-line) !important;
}

html.fm-theme-dark .download-page .down_right .detail_detail,
html.fm-pe-theme-dark .download-page .down_right .detail_detail {
    background-color: var(--fm-card-bg) !important;
}

html.fm-theme-dark .download-page .down_right .detail_detail > p .fm-dl-detail-meta__val,
html.fm-pe-theme-dark .download-page .down_right .detail_detail > p .fm-dl-detail-meta__val {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .download-page .down_content > .down_content-title,
html.fm-pe-theme-dark .download-page .down_content > .down_content-title {
    color: var(--fm-text) !important;
}

/* 软件库：声明/关于区域边框 */
html.fm-theme-dark .fm-dl .shengming .shengming_title,
html.fm-pe-theme-dark .fm-dl .shengming .shengming_title {
    background-color: var(--fm-card-title-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

html.fm-theme-dark .fm-dl .shengming .shengming_detail,
html.fm-pe-theme-dark .fm-dl .shengming .shengming_detail {
    border-color: var(--fm-line) !important;
}

/* 软件库：详情右侧 p 标签 label 文字（发布时间：等）保证可见 */
html.fm-theme-dark .download-page .down_right .detail_detail > p,
html.fm-pe-theme-dark .download-page .down_right .detail_detail > p {
    color: var(--fm-text-soft) !important;
}

/* 广告区：空广告位文字 + 关闭按钮（深色下加强对比） */
html.fm-theme-dark .index_ad_close,
html.fm-pe-theme-dark .index_ad_close {
    color: var(--fm-text-invert, #fff) !important;
}

html.fm-theme-dark .index_ad_close span,
html.fm-pe-theme-dark .index_ad_close span {
    background: rgba(0, 0, 0, 0.65) !important;
}

/* ============================================================
   在线工具页深色适配（online-tools.css 硬编码颜色覆盖）
   ============================================================ */

/* 工具内部通用文字色：几乎所有深色固定值 */
html.fm-theme-dark .fm-tools__panel *,
html.fm-pe-theme-dark .fm-tools__panel * {
    border-color: var(--fm-line);
}

/* 工具区块浅灰底 → 输入区背景 */
html.fm-theme-dark .fm-zhc-settings,
html.fm-theme-dark .fm-almanac-query,
html.fm-pe-theme-dark .fm-zhc-settings,
html.fm-pe-theme-dark .fm-almanac-query {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-line) !important;
}

/* 工具区块各类 label / 标题文字 */
html.fm-theme-dark .fm-zhc-label,
html.fm-theme-dark .fm-almanac-query-label,
html.fm-theme-dark .fm-almanac-dl-row dt,
html.fm-pe-theme-dark .fm-zhc-label,
html.fm-pe-theme-dark .fm-almanac-query-label,
html.fm-pe-theme-dark .fm-almanac-dl-row dt {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .fm-zhc-panel-title,
html.fm-theme-dark .fm-almanac-h3,
html.fm-theme-dark .fm-almanac-dl-row dd,
html.fm-theme-dark .fm-almanac-tags,
html.fm-theme-dark .fm-zhc-dir,
html.fm-theme-dark .fm-zhc-realtime,
html.fm-pe-theme-dark .fm-zhc-panel-title,
html.fm-pe-theme-dark .fm-almanac-h3,
html.fm-pe-theme-dark .fm-almanac-dl-row dd,
html.fm-pe-theme-dark .fm-almanac-tags,
html.fm-pe-theme-dark .fm-zhc-dir,
html.fm-pe-theme-dark .fm-zhc-realtime {
    color: var(--fm-text) !important;
}

/* 工具分隔线 */
html.fm-theme-dark .fm-almanac-dl-row,
html.fm-theme-dark .fm-almanac-section,
html.fm-pe-theme-dark .fm-almanac-dl-row,
html.fm-pe-theme-dark .fm-almanac-section {
    border-color: var(--fm-line) !important;
}

/* 黄历标签（非凶：浅底深字） */
html.fm-theme-dark .fm-almanac-tags--muted .fm-almanac-tag,
html.fm-pe-theme-dark .fm-almanac-tags--muted .fm-almanac-tag {
    background: var(--fm-input-bg) !important;
    color: var(--fm-text-soft) !important;
}

/* 黄历日期输入框 */
html.fm-theme-dark .fm-almanac-date-input,
html.fm-pe-theme-dark .fm-almanac-date-input {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-input-border) !important;
    color: var(--fm-text) !important;
}

/* 简繁转换历史卡片 */
html.fm-theme-dark .fm-zhc-hist-item,
html.fm-pe-theme-dark .fm-zhc-hist-item {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark .fm-zhc-hist-meta,
html.fm-pe-theme-dark .fm-zhc-hist-meta {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .fm-zhc-hist-snippet,
html.fm-pe-theme-dark .fm-zhc-hist-snippet {
    color: var(--fm-text) !important;
}

/* 工具页各类 panel-body 白底（在线工具工具区块内的 background:#fff 共性） */
html.fm-theme-dark .fm-tools__panel [style*="background:#fff"],
html.fm-theme-dark .fm-tools__panel [style*="background: #fff"],
html.fm-pe-theme-dark .fm-tools__panel [style*="background:#fff"],
html.fm-pe-theme-dark .fm-tools__panel [style*="background: #fff"] {
    background: var(--fm-card-bg) !important;
}

/* 工具页其他通用文字色（深色 color:#0f172a / #334155 / #1e293b 硬编码的子元素） */
html.fm-theme-dark .fm-tools__panel h1,
html.fm-theme-dark .fm-tools__panel h2,
html.fm-theme-dark .fm-tools__panel h3,
html.fm-theme-dark .fm-tools__panel h4,
html.fm-theme-dark .fm-tools__panel h5,
html.fm-theme-dark .fm-tools__panel p,
html.fm-theme-dark .fm-tools__panel label,
html.fm-theme-dark .fm-tools__hero h1,
html.fm-pe-theme-dark .fm-tools__panel h1,
html.fm-pe-theme-dark .fm-tools__panel h2,
html.fm-pe-theme-dark .fm-tools__panel h3,
html.fm-pe-theme-dark .fm-tools__panel h4,
html.fm-pe-theme-dark .fm-tools__panel h5,
html.fm-pe-theme-dark .fm-tools__panel p,
html.fm-pe-theme-dark .fm-tools__panel label,
html.fm-pe-theme-dark .fm-tools__hero h1 {
    color: var(--fm-text);
}

/* 词典 tab 按钮 */
html.fm-theme-dark .fm-word-lookup-dict-tab,
html.fm-pe-theme-dark .fm-word-lookup-dict-tab {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .fm-word-lookup-dict-tab.is-active,
html.fm-pe-theme-dark .fm-word-lookup-dict-tab.is-active {
    background: var(--fm-brand) !important;
    border-color: var(--fm-brand) !important;
    color: #fff !important;
}

/* 工具lookup频道选择卡 */
html.fm-theme-dark .fm-tools__cards--lookup-channel button.fm-tools__card,
html.fm-pe-theme-dark .fm-tools__cards--lookup-channel button.fm-tools__card {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

/* ============================================================
   会员中心深色适配（sidenav / panel-default / panel-body）
   ============================================================ */

/* 左侧导航 sidenav */
html.fm-theme-dark .sidenav,
html.fm-pe-theme-dark .sidenav {
    background-color: var(--fm-card-bg) !important;
}

html.fm-theme-dark .sidenav .list-group-heading,
html.fm-pe-theme-dark .sidenav .list-group-heading {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .sidenav .list-group-item,
html.fm-pe-theme-dark .sidenav .list-group-item {
    background-color: transparent !important;
    border-color: transparent !important;
}

html.fm-theme-dark .sidenav .list-group-item > a,
html.fm-pe-theme-dark .sidenav .list-group-item > a {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .sidenav .list-group-item:hover,
html.fm-pe-theme-dark .sidenav .list-group-item:hover {
    background-color: var(--fm-brand-surface) !important;
}

html.fm-theme-dark .sidenav .list-group-item:hover > a,
html.fm-pe-theme-dark .sidenav .list-group-item:hover > a {
    color: var(--fm-brand) !important;
}

html.fm-theme-dark .sidenav .list-group-item.active,
html.fm-theme-dark .sidenav .list-group-item.active:hover,
html.fm-theme-dark .sidenav .list-group-item.active:focus,
html.fm-pe-theme-dark .sidenav .list-group-item.active,
html.fm-pe-theme-dark .sidenav .list-group-item.active:hover,
html.fm-pe-theme-dark .sidenav .list-group-item.active:focus {
    background-color: var(--fm-brand-surface) !important;
}

html.fm-theme-dark .sidenav .list-group-item.active > a,
html.fm-theme-dark .sidenav .list-group-item.active > a .fa,
html.fm-pe-theme-dark .sidenav .list-group-item.active > a,
html.fm-pe-theme-dark .sidenav .list-group-item.active > a .fa {
    color: var(--fm-brand) !important;
}

/* 右侧主内容 panel */
html.fm-theme-dark .panel,
html.fm-theme-dark .panel-default,
html.fm-pe-theme-dark .panel,
html.fm-pe-theme-dark .panel-default {
    background-color: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

html.fm-theme-dark .panel-default > .panel-heading,
html.fm-pe-theme-dark .panel-default > .panel-heading {
    background: var(--fm-card-title-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

html.fm-theme-dark .panel-body,
html.fm-pe-theme-dark .panel-body {
    background-color: var(--fm-card-bg) !important;
    color: var(--fm-text) !important;
}

/* 会员中心文章列表内文字 */
html.fm-theme-dark .index_article h4,
html.fm-theme-dark .index_article_list h4,
html.fm-pe-theme-dark .index_article h4,
html.fm-pe-theme-dark .index_article_list h4 {
    color: var(--fm-text) !important;
}

html.fm-theme-dark .index_article p,
html.fm-theme-dark .index_article_list p,
html.fm-pe-theme-dark .index_article p,
html.fm-pe-theme-dark .index_article_list p {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .index_article_list:hover,
html.fm-pe-theme-dark .index_article_list:hover {
    background-color: var(--fm-brand-surface) !important;
}

html.fm-theme-dark .index_article_list:hover h4,
html.fm-pe-theme-dark .index_article_list:hover h4 {
    color: var(--fm-brand) !important;
}

/* 页面标题分隔线 */
html.fm-theme-dark h2.page-header,
html.fm-pe-theme-dark h2.page-header {
    border-bottom-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

/* 会员中心用户信息卡（profile面板）*/
html.fm-theme-dark .user-baseinfo,
html.fm-theme-dark .user-center,
html.fm-pe-theme-dark .user-baseinfo,
html.fm-pe-theme-dark .user-center {
    color: var(--fm-text) !important;
}

html.fm-theme-dark .user-baseinfo table tr td,
html.fm-pe-theme-dark .user-baseinfo table tr td {
    color: var(--fm-text-soft) !important;
}

/* ============================================================
   Bootstrap 表格深色适配（会员中心订单/站内信/下载记录等）
   ============================================================ */

html.fm-theme-dark .table,
html.fm-pe-theme-dark .table {
    color: var(--fm-text) !important;
}

html.fm-theme-dark .table > thead > tr > th,
html.fm-theme-dark .table > tbody > tr > th,
html.fm-theme-dark .table > tfoot > tr > th,
html.fm-theme-dark .table > thead > tr > td,
html.fm-theme-dark .table > tbody > tr > td,
html.fm-theme-dark .table > tfoot > tr > td,
html.fm-pe-theme-dark .table > thead > tr > th,
html.fm-pe-theme-dark .table > tbody > tr > th,
html.fm-pe-theme-dark .table > tfoot > tr > th,
html.fm-pe-theme-dark .table > thead > tr > td,
html.fm-pe-theme-dark .table > tbody > tr > td,
html.fm-pe-theme-dark .table > tfoot > tr > td {
    border-top-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

html.fm-theme-dark .table > thead > tr > th,
html.fm-pe-theme-dark .table > thead > tr > th {
    border-bottom-color: var(--fm-line) !important;
    color: var(--fm-text-soft) !important;
}

/* 表格条纹行（table-striped） */
html.fm-theme-dark .table-striped > tbody > tr:nth-of-type(odd),
html.fm-pe-theme-dark .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

/* 表格 hover 行 */
html.fm-theme-dark .table-hover > tbody > tr:hover,
html.fm-pe-theme-dark .table-hover > tbody > tr:hover {
    background-color: var(--fm-brand-surface) !important;
}

/* 表格边框 */
html.fm-theme-dark .table-bordered,
html.fm-theme-dark .table-bordered > thead > tr > th,
html.fm-theme-dark .table-bordered > tbody > tr > th,
html.fm-theme-dark .table-bordered > tfoot > tr > th,
html.fm-theme-dark .table-bordered > thead > tr > td,
html.fm-theme-dark .table-bordered > tbody > tr > td,
html.fm-theme-dark .table-bordered > tfoot > tr > td,
html.fm-pe-theme-dark .table-bordered,
html.fm-pe-theme-dark .table-bordered > thead > tr > th,
html.fm-pe-theme-dark .table-bordered > tbody > tr > td {
    border-color: var(--fm-line) !important;
}

/* ============================================================
   会员中心 - 我的词典：统计卡片 / 词典来源列表
   ============================================================ */

/* 学习统计卡片（渐变浅绿底 → 深色卡片底） */
html.fm-theme-dark .fm-my-dict-stat,
html.fm-pe-theme-dark .fm-my-dict-stat {
    background: var(--fm-card-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark .fm-my-dict-stat .num,
html.fm-pe-theme-dark .fm-my-dict-stat .num {
    color: var(--fm-brand) !important;
}

html.fm-theme-dark .fm-my-dict-stat .lbl,
html.fm-pe-theme-dark .fm-my-dict-stat .lbl {
    color: var(--fm-text-soft) !important;
}

html.fm-theme-dark .fm-my-dict-section,
html.fm-pe-theme-dark .fm-my-dict-section {
    border-bottom-color: var(--fm-line) !important;
}

html.fm-theme-dark .fm-my-dict-section h3,
html.fm-pe-theme-dark .fm-my-dict-section h3 {
    color: var(--fm-text) !important;
}

/* 词典来源列表项（拖拽排序行） */
html.fm-theme-dark .fm-dict-pref-item,
html.fm-pe-theme-dark .fm-dict-pref-item {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-line) !important;
}

html.fm-theme-dark .fm-dict-pref-item__title,
html.fm-pe-theme-dark .fm-dict-pref-item__title {
    color: var(--fm-text) !important;
}

html.fm-theme-dark .fm-dict-pref-item__lang,
html.fm-theme-dark .fm-dict-pref-item__handle,
html.fm-pe-theme-dark .fm-dict-pref-item__lang,
html.fm-pe-theme-dark .fm-dict-pref-item__handle {
    color: var(--fm-text-soft) !important;
}

/* Bootstrap form-control（含 range input 范围条）在 user-layout 下 */
html.fm-theme-dark body.fm-user-layout input[type="range"].form-control,
html.fm-pe-theme-dark body.fm-user-layout input[type="range"].form-control {
    background: var(--fm-input-bg) !important;
    border-color: var(--fm-line) !important;
}

/* Bootstrap btn-default 在深色下变为暗底亮字 */
html.fm-theme-dark .btn-default,
html.fm-pe-theme-dark .btn-default {
    background-color: var(--fm-input-bg) !important;
    border-color: var(--fm-line) !important;
    color: var(--fm-text) !important;
}

html.fm-theme-dark .btn-default:hover,
html.fm-theme-dark .btn-default:focus,
html.fm-pe-theme-dark .btn-default:hover,
html.fm-pe-theme-dark .btn-default:focus {
    background-color: var(--fm-brand-surface) !important;
    border-color: var(--fm-brand-soft) !important;
    color: var(--fm-brand) !important;
}

/* 辅助文字（text-muted）在深色下调整 */
html.fm-theme-dark .text-muted,
html.fm-pe-theme-dark .text-muted {
    color: var(--fm-text-soft) !important;
}

/* help-block 说明文字 */
html.fm-theme-dark .help-block,
html.fm-pe-theme-dark .help-block {
    color: var(--fm-text-soft) !important;
}

/* Bootstrap checkbox label 文字 */
html.fm-theme-dark body.fm-user-layout .checkbox label,
html.fm-theme-dark body.fm-user-layout .checkbox-inline,
html.fm-pe-theme-dark body.fm-user-layout .checkbox label,
html.fm-pe-theme-dark body.fm-user-layout .checkbox-inline {
    color: var(--fm-text) !important;
}

/* form-group label 文字 */
html.fm-theme-dark body.fm-user-layout .form-group > label,
html.fm-pe-theme-dark body.fm-user-layout .form-group > label {
    color: var(--fm-text) !important;
}
