/* 夜间模式样式 */
html.dark-mode,
body.dark-mode html {
    background-color: #1a1a1a !important;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* 确保首页在夜间模式下html和body都有正确的背景 */
html.dark-mode,
body.dark-mode.home-body html {
    background-color: #1a1a1a !important;
}

/* 大背景夜间模式适配 - 宣纸质感背景 */
body.dark-mode.category-page::before {
    background-image: none !important;
    background-color: #1a1a1a !important;
}

/* 首页大背景夜间模式适配 */
body.dark-mode.home-body::before {
    background-image: none !important;
    background-color: #1a1a1a !important;
}

/* 国学书库表格布局夜间模式 - 需要覆盖模板中的内联样式 */
body.dark-mode.category-page .shuku-section-block,
body.dark-mode .shuku-section-block,
body.category-page.dark-mode .shuku-section-block {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
}

body.dark-mode .shuku-section-intro {
    background: #2d2d2d !important;
    border-left-color: #64b5f6 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .shuku-section-intro p {
    color: #e0e0e0 !important;
}

body.dark-mode .shuku-section-intro * {
    color: #e0e0e0 !important;
}

/* 书库总简介夜间模式 - 使用更高优先级覆盖内联样式 */
body.dark-mode.category-page .shuku-total-intro,
body.dark-mode .shuku-total-intro {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-left: 4px solid #64b5f6 !important;
    border-radius: 4px !important;
}

body.dark-mode.category-page .shuku-total-intro *,
body.dark-mode .shuku-total-intro * {
    color: #e0e0e0 !important;
}

body.dark-mode.category-page .shuku-total-intro p,
body.dark-mode .shuku-total-intro p {
    color: #e0e0e0 !important;
}

/* 书库页面标题夜间模式 */
body.dark-mode .page-title {
    color: #e8e8e8 !important;
}

/* 书库书籍列表夜间模式 - 确保所有文字可见 */
body.dark-mode.category-page .shuku-book-list .book-list-title {
    color: #e8e8e8 !important;
}

body.dark-mode.category-page .shuku-book-list .book-list-author {
    color: #b0b0b0 !important;
}

body.dark-mode.category-page .shuku-book-list .book-list-description {
    color: #d0d0d0 !important;
}

body.dark-mode.category-page .shuku-book-list .book-list-link {
    color: inherit !important;
}

body.dark-mode.category-page .shuku-book-list .book-list-item {
    border-bottom-color: #404040 !important;
}

body.dark-mode.category-page .shuku-book-list .book-list-item:hover {
    background-color: transparent !important;
}

body.dark-mode.category-page .shuku-book-list .book-list-link:hover .book-list-title {
    color: #64b5f6 !important;
}

body.dark-mode .section-block-header {
    border-bottom-color: #404040;
}

body.dark-mode .section-block-title {
    color: #e0e0e0;
}

body.dark-mode .section-view-all {
    color: #64b5f6;
}

body.dark-mode .section-view-all:hover {
    color: #90caf9;
}

body.dark-mode.category-page .section-books-grid,
body.dark-mode .section-books-grid {
    border-top-color: #404040 !important;
}

body.dark-mode .section-title-link {
    color: #e0e0e0;
}

body.dark-mode .section-title-link:hover {
    color: #64b5f6;
}

body.dark-mode.category-page .book-item-link,
body.dark-mode .book-item-link {
    color: #64b5f6 !important;
    border-right-color: #404040 !important;
    border-bottom-color: #404040 !important;
    background-color: transparent !important;
}

body.dark-mode.category-page .book-item-link:hover,
body.dark-mode .book-item-link:hover {
    background-color: #3d3d3d !important;
    color: #90caf9 !important;
    text-decoration: underline;
}

body.dark-mode .home-header,
body.dark-mode .category-content,
body.dark-mode .category-sidebar,
body.dark-mode .home-body {
    background: #1a1a1a !important;
    border-color: #404040 !important;
    color: #e0e0e0 !important;
}

/* 首页夜间模式背景 - 确保覆盖所有可能的背景设置 */
body.dark-mode.home-body {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

/* 菜单栏夜间模式 - 覆盖内联样式，确保背景色和导航按钮颜色正确 */
/* 使用最高优先级选择器确保覆盖所有情况，包括 guoxue-style.css 中的样式 */
body.dark-mode .home-header,
body.dark-mode.category-page .home-header,
body.dark-mode.home-body .home-header,
html.dark-mode body .home-header,
html.dark-mode body.home-body .home-header,
html.dark-mode .home-header,
body.dark-mode header.home-header,
body.dark-mode.home-body .home-header,
body.dark-mode.category-page .home-header {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    background-image: none !important;
    border-bottom-color: #404040 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* 额外确保覆盖内联样式和 guoxue-style.css 中的样式 */
body.dark-mode header.home-header[style*="background"],
html.dark-mode header.home-header[style*="background"],
body.dark-mode.home-body header.home-header,
body.dark-mode.category-page header.home-header {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

body.dark-mode .home-header .logo div,
body.dark-mode .home-header .logo div a,
body.dark-mode.category-page .home-header .logo div,
body.dark-mode.category-page .home-header .logo div a,
body.dark-mode.home-body .home-header .logo div,
body.dark-mode.home-body .home-header .logo div a {
    color: #e8e8e8 !important;
}

body.dark-mode .home-header .logo p,
body.dark-mode.category-page .home-header .logo p,
body.dark-mode.home-body .home-header .logo p {
    color: #b0b0b0 !important;
}

body.dark-mode .home-header .home-nav a,
body.dark-mode.category-page .home-header .home-nav a,
body.dark-mode.home-body .home-header .home-nav a,
html.dark-mode body .home-header .home-nav a,
html.dark-mode body.home-body .home-header .home-nav a {
    color: #e0e0e0 !important;
    background-color: #2d2d2d !important;
    transition: color 0.2s ease !important;
}

body.dark-mode .home-header .home-nav a:hover,
body.dark-mode.category-page .home-header .home-nav a:hover,
body.dark-mode.home-body .home-header .home-nav a:hover,
html.dark-mode body .home-header .home-nav a:hover,
html.dark-mode body.home-body .home-header .home-nav a:hover {
    color: #64b5f6 !important;
    background-color: #3d3d3d !important;
    text-decoration: underline !important;
}

body.dark-mode .home-header .logo div,
body.dark-mode .category-header h1 {
    color: #e8e8e8 !important;
}

body.dark-mode .home-header .logo p {
    color: #b0b0b0 !important;
}

body.dark-mode .home-nav a {
    color: #e0e0e0 !important;
    background-color: #2d2d2d !important;
}

body.dark-mode .home-nav a:hover {
    color: #64b5f6 !important;
    background-color: #3d3d3d !important;
}

/* 菜单栏分隔符夜间模式 */
body.dark-mode .home-nav ul li:not(:last-child)::after {
    color: #555 !important;
}

/* top-menu.html 中的菜单按钮夜间模式 */
body.dark-mode .book-list a,
body.dark-mode.top-menu-body .book-list a {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
}

body.dark-mode .book-list a:hover,
body.dark-mode.top-menu-body .book-list a:hover {
    background-color: #3d3d3d !important;
    color: #90caf9 !important;
}

/* 菜单栏控制按钮夜间模式 - 确保导航按钮颜色正确 */
body.dark-mode .home-header .header-controls,
body.dark-mode.category-page .home-header .header-controls,
body.dark-mode.home-body .home-header .header-controls {
    background: transparent !important;
}

body.dark-mode .header-controls .language-toggle,
body.dark-mode .header-controls .theme-toggle,
body.dark-mode .home-header .header-controls .language-toggle,
body.dark-mode .home-header .header-controls .theme-toggle,
body.dark-mode.category-page .home-header .header-controls .language-toggle,
body.dark-mode.category-page .home-header .header-controls .theme-toggle,
body.dark-mode.home-body .home-header .header-controls .language-toggle,
body.dark-mode.home-body .home-header .header-controls .theme-toggle {
    background: #2d2d2d !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .header-controls .language-toggle:hover,
body.dark-mode .header-controls .theme-toggle:hover,
body.dark-mode .home-header .header-controls .language-toggle:hover,
body.dark-mode .home-header .header-controls .theme-toggle:hover,
body.dark-mode.category-page .home-header .header-controls .language-toggle:hover,
body.dark-mode.category-page .home-header .header-controls .theme-toggle:hover,
body.dark-mode.home-body .home-header .header-controls .language-toggle:hover,
body.dark-mode.home-body .home-header .header-controls .theme-toggle:hover {
    background: #3d3d3d !important;
    border-color: #64b5f6 !important;
    color: #90caf9 !important;
    box-shadow: 0 2px 8px rgba(100, 181, 246, 0.3) !important;
}

/* 移动端汉堡抽屉 */
@media (max-width: 768px) {
    body.dark-mode .home-header .home-nav {
        background: #1a1a1a !important;
        border-bottom-color: #404040 !important;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
    }

    body.dark-mode .menu-toggle-bar {
        background-color: #e8e8e8 !important;
    }

    body.dark-mode .home-header .header-controls,
    body.dark-mode.category-page .home-header .header-controls,
    body.dark-mode.home-body .home-header .header-controls {
        border-top-color: rgba(255, 255, 255, 0.12) !important;
    }

    /* 与古诗词站一致：抽屉内为文字链，无卡片底 */
    body.dark-mode .home-header .home-nav a,
    body.dark-mode.category-page .home-header .home-nav a,
    body.dark-mode.home-body .home-header .home-nav a,
    body.dark-mode header.home-header nav#primary-nav.home-nav a,
    html.dark-mode body .home-header .home-nav a,
    html.dark-mode body.home-body .home-header .home-nav a {
        color: #e0e0e0 !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        text-decoration: underline !important;
        text-underline-offset: 0.2em !important;
        text-decoration-thickness: 1px !important;
        text-decoration-color: rgba(224, 224, 224, 0.4) !important;
    }

    body.dark-mode .home-header .home-nav a:hover,
    body.dark-mode.category-page .home-header .home-nav a:hover,
    body.dark-mode.home-body .home-header .home-nav a:hover,
    body.dark-mode header.home-header nav#primary-nav.home-nav a:hover,
    html.dark-mode body .home-header .home-nav a:hover,
    html.dark-mode body.home-body .home-header .home-nav a:hover {
        color: #64b5f6 !important;
        background: transparent !important;
        text-decoration: underline !important;
        text-decoration-color: rgba(100, 181, 246, 0.75) !important;
    }

    body.dark-mode .home-header .home-nav a:active,
    body.dark-mode.category-page .home-header .home-nav a:active,
    body.dark-mode.home-body .home-header .home-nav a:active,
    body.dark-mode header.home-header nav#primary-nav.home-nav a:active {
        color: #90caf9 !important;
        background: transparent !important;
        box-shadow: none !important;
        text-decoration: underline !important;
        text-decoration-color: rgba(144, 202, 249, 0.85) !important;
    }

    body.dark-mode .home-header .menu-settings-row .menu-settings-btn {
        color: #bbb !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        text-decoration: underline !important;
        text-underline-offset: 0.2em;
        text-decoration-thickness: 1px;
        text-decoration-color: rgba(187, 187, 187, 0.45) !important;
    }

    body.dark-mode .home-header .menu-settings-row .menu-settings-btn:hover {
        color: #fff !important;
        background: transparent !important;
        border: none !important;
        text-decoration-color: rgba(255, 255, 255, 0.65) !important;
    }

    body.dark-mode .home-header .menu-settings-row .menu-settings-btn:active {
        color: #e0e0e0 !important;
        background: transparent !important;
        text-decoration-color: rgba(224, 224, 224, 0.75) !important;
    }

    body.dark-mode .home-header .menu-settings-row {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
}

/* category-main 夜间模式 */
body.dark-mode.category-page .category-main {
    background: #1a1a1a !important;
}

body.dark-mode .book-card {
    background: #2d2d2d;
    border: 1px solid #404040 !important;
    color: #e0e0e0;
}

body.dark-mode .book-card h4 {
    color: #e8e8e8;
}

body.dark-mode .book-card-link:hover h4 {
    color: #d4c5a9 !important;
}

body.dark-mode .book-card-link:hover .book-summary {
    color: #d4c5a9 !important;
}

body.dark-mode .book-card:hover {
    border-color: #d4c5a9 !important;
    box-shadow: 0 4px 12px rgba(212, 197, 169, 0.3) !important;
}

body.dark-mode .book-summary {
    color: #c0c0c0;
}

body.dark-mode .book-meta {
    color: #a0a0a0;
}

body.dark-mode .category-header {
    background: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-mode .sidebar-section {
    background: transparent;
}

body.dark-mode .home-sidebar {
    background: #1a1a1a !important;
    border-color: #404040 !important;
}

body.dark-mode .category-sidebar {
    background: #1a1a1a !important;
    border-color: #404040 !important;
}

body.dark-mode .sidebar-section h3,
body.dark-mode .sidebar-section h4 {
    color: #e8e8e8;
    border-bottom-color: #404040;
}

body.dark-mode .ranking-list li {
    color: #d0d0d0;
}

body.dark-mode .ranking-list li a {
    color: #d0d0d0;
}

body.dark-mode .ranking-list li a:hover {
    color: #e8e8e8;
}

body.dark-mode .ranking-list li::before {
    color: #d4c5a9;
}

/* 推荐书籍卡片夜间模式 - 使用featured-card样式 */
body.dark-mode .sidebar-section .featured-card {
    background: #2d2d2d !important;
    border: 1px solid #404040 !important;
}

body.dark-mode .sidebar-section .featured-card:hover {
    border-color: #667eea !important;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2) !important;
}

body.dark-mode .sidebar-section .featured-card__header h4 {
    color: #e8e8e8 !important;
}

body.dark-mode .sidebar-section .featured-card p {
    color: #d0d0d0 !important;
}

body.dark-mode .sidebar-section .chapter-count {
    color: #b0b0b0 !important;
}

body.dark-mode .sidebar-section .featured-card__actions .btn-primary {
    background: #3d3d3d !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

body.dark-mode .sidebar-section .featured-card__actions .btn-primary:hover {
    background: #4d4d4d !important;
    color: #e8e8e8 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode .btn-read {
    background: #3d3d3d;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .btn-read:hover {
    background: #4d4d4d;
    color: #e8e8e8;
}

body.dark-mode .pagination-link {
    background: #2d2d2d;
    color: #d0d0d0;
    border-color: #404040;
}

body.dark-mode .pagination-link:hover {
    background: #3d3d3d;
    color: #e8e8e8;
    border-color: #555;
}

body.dark-mode .pagination-link.active {
    background: #4d4d4d;
    color: #e8e8e8;
    border-color: #666;
}

body.dark-mode .home-footer {
    background: #2d2d2d !important;
    border-top-color: #404040 !important;
    color: #d0d0d0 !important;
}

body.dark-mode .home-footer a {
    color: #64b5f6 !important;
}

body.dark-mode .home-footer a:hover {
    color: #90caf9 !important;
}

body.dark-mode .dict-footer {
    color: #b0b0b0 !important;
    border-top-color: #404040 !important;
}

body.dark-mode .dict-footer p {
    color: #b0b0b0 !important;
}

body.dark-mode .dict-footer a {
    color: #64b5f6 !important;
}

body.dark-mode .dict-footer a:hover {
    color: #90caf9 !important;
}

body.dark-mode .books-grid-container {
    background: transparent;
}

body.dark-mode .category-header {
    background: #2d2d2d;
}

body.dark-mode .no-data {
    color: #b0b0b0;
}

body.dark-mode .chapter-content {
    color: #e0e0e0;
    background: #2d2d2d;
}

/* 暗色模式：诗歌样式 */
body.dark-mode .chapter-content blockquote {
    color: #e0e0e0;
}

body.dark-mode .chapter-content blockquote p {
    color: #e0e0e0;
}

/* 成语古籍用例总览页（/dict/chengyu/<pinyin>/guji）夜间模式 */
/* 成语古籍用例总览页（/dict/chengyu/<pinyin>/guji）夜间模式 */
body.dark-mode .category-page .home-content {
    background: #111827 !important;       /* 比整体背景稍亮，形成卡片感 */
    border-radius: 16px !important;
    border: 1px solid #374151 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
}
body.dark-mode .guji-all-container {
    background: transparent !important;
}
body.dark-mode .guji-all-header h1,
body.dark-mode .guji-all-header h1 * {
    color: #e5e7eb !important;
}
body.dark-mode .guji-all-header .stats,
body.dark-mode .guji-all-header .stats * {
    color: #9ca3af !important;
}
body.dark-mode .guji-book-section {
    background: #111827 !important;
    border-radius: 8px !important;
    border: 1px solid #374151 !important;
    box-shadow: none !important;
}
body.dark-mode .guji-book-title {
    border-bottom-color: #374151 !important;
}
body.dark-mode .guji-chapter-item {
    background: #020617 !important;
    border-left-color: #d4c5a9 !important;
}
body.dark-mode .guji-chapter-content {
    color: #e5e7eb !important;
}
body.dark-mode .guji-chapter-header a,
body.dark-mode .guji-chapter-links a {
    color: #93c5fd !important;
}
body.dark-mode .guji-chapter-links a:hover {
    color: #e5f2ff !important;
}
body.dark-mode .idiom-basic-card {
    background: #020617 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    border: 1px solid #374151 !important;
}
body.dark-mode .idiom-basic-row-label {
    color: #9ca3af !important;
}
body.dark-mode .idiom-basic-row-value {
    color: #e5e7eb !important;
}
body.dark-mode .idiom-basic-row-value a {
    color: #93c5fd !important;
}

/* 暗色模式：批注样式（眉批、旁批） */
body.dark-mode .chapter-content em code {
    color: #60a5fa;
}

/* 暗色模式：章节内容中的成语链接样式 - 柔和颜色，无下划线 */
body.dark-mode .chapter-content a[href*="/dict/chengyu/"] {
    color: #9db3d1;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

body.dark-mode .chapter-content a[href*="/chengyu/"]:hover {
    color: #b5c8e0;
    opacity: 0.9;
}

/* 暗色模式：解析内容样式 - 与原文内容样式一致 */
body.dark-mode .chapter-analysis {
    border-top-color: #404040;
}

body.dark-mode .chapter-analysis h2 {
    color: #60a5fa;
}

body.dark-mode .chapter-analysis h3 {
    color: #e0e0e0;
}

body.dark-mode .chapter-analysis .analysis-content {
    color: #e0e0e0;
}

body.dark-mode .chapter-analysis .analysis-content p {
    color: #f0f0f0 !important;
}

body.dark-mode .chapter-analysis .analysis-content em {
    color: #e0e0e0;
}

body.dark-mode .chapter-analysis .analysis-content strong {
    color: #f0f0f0;
}

body.dark-mode .chapter-analysis .analysis-content blockquote {
    color: #e0e0e0;
}

body.dark-mode .chapter-analysis .analysis-content blockquote p {
    color: #e0e0e0;
}

body.dark-mode .chapter-analysis .analysis-content h4 {
    color: #e0e0e0;
}

body.dark-mode .chapter-nav {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .chapter-nav a {
    color: #d0d0d0;
}

body.dark-mode .chapter-nav a:hover {
    color: #e8e8e8;
}

body.dark-mode .error-container {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .error-container h1 {
    color: #e8e8e8;
}

body.dark-mode .nav-btn {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
    transition: all 0.25s ease !important;
}

body.dark-mode .nav-btn:hover {
    background: #3d3d3d !important;
    color: #fff !important;
    border-color: #64b5f6 !important;
    box-shadow: 0 2px 8px rgba(100, 181, 246, 0.3) !important;
    transform: translateY(-1px) !important;
}

body.dark-mode .nav-btn.disabled {
    background: #1a1a1a !important;
    color: #666 !important;
    border-color: #2d2d2d !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

body.dark-mode .nav-btn:disabled {
    background: #1a1a1a !important;
    color: #666 !important;
    border-color: #2d2d2d !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* 书籍详情页夜间模式 - 作者简介和书籍简介背景适配 */
body.dark-mode .book-description,
body.dark-mode .book-author,
body.dark-mode .book-intro {
    background: #2d2d2d !important;
    color: #f5f5f5 !important;
    border: none !important;
    border-bottom: 1px solid #404040 !important;
}

/* 针对category-page页面，使用更具体的选择器覆盖guoxue-style.css */
body.dark-mode.category-page .book-author {
    background-color: #2d2d2d !important;
    border-left-color: #64b5f6 !important;
    color: #f5f5f5 !important;
}

body.dark-mode.category-page .book-author h3 {
    color: #f5f5f5 !important;
}

body.dark-mode.category-page .book-author div {
    color: #f5f5f5 !important;
}

body.dark-mode.category-page .book-description {
    background-color: #2d2d2d !important;
    color: #f5f5f5 !important;
    border-bottom-color: #404040 !important;
}

/* 作者介绍/简介内部文字（包含标题与段落），避免被内联样式覆盖 */
body.dark-mode .book-author h3,
body.dark-mode .book-author div,
body.dark-mode .book-description *,
body.dark-mode .book-intro * {
    color: #f5f5f5 !important;
}

/* 覆盖模板中的内联样式 - 确保夜间模式下文字清晰可见 */
body.dark-mode .book-author h3[style*="color"],
body.dark-mode .book-author div[style*="color"] {
    color: #f5f5f5 !important;
}

body.dark-mode .volume-title[style*="color"] {
    color: #e8e8e8 !important;
}

body.dark-mode .books-grid-container h2 {
    color: #f5f5f5 !important;
    border-bottom-color: #404040;
}

/* 覆盖 guoxue-style.css 中的样式，确保夜间模式下标题清晰可见 */
body.dark-mode.category-page .books-grid-container h2 {
    color: #f5f5f5 !important;
    border-bottom-color: #404040 !important;
}

body.dark-mode .chapter-list {
    background: transparent;
}

body.dark-mode .chapter-item {
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e0e0e0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode .chapter-item a {
    color: #d0d0d0 !important;
}

body.dark-mode .chapter-item:hover {
    background: #3d3d3d !important;
    border-color: #d4c5a9 !important;
    box-shadow: 0 4px 12px rgba(212, 197, 169, 0.3) !important;
}

body.dark-mode .chapter-item:hover a {
    color: #e8e8e8 !important;
}

/* 卷分组样式夜间模式 */
body.dark-mode .volume-section {
    border-bottom-color: #404040 !important;
}

body.dark-mode .volume-title {
    color: #e8e8e8 !important;
}

/* 章节组标题夜间模式 */
body.dark-mode .chapter-group-title {
    color: #d0d0d0 !important;
}

body.dark-mode .volume-chapters .chapter-item {
    background: #2d2d2d !important;
    border-color: #404040 !important;
}

body.dark-mode .volume-chapters .chapter-item a {
    color: #d0d0d0 !important;
}

body.dark-mode .volume-chapters .chapter-item:hover {
    background: #3d3d3d !important;
    border-color: #d4c5a9 !important;
}

body.dark-mode .volume-chapters .chapter-item:hover a {
    color: #e8e8e8 !important;
}

/* 书籍描述区域夜间模式 - 与作者介绍保持一致 */
body.dark-mode .book-description {
    background: #2d2d2d !important;
    border: none !important;
    border-bottom: 1px solid #404040 !important;
    color: #f5f5f5 !important;
}

/* 书籍标题链接夜间模式 */
body.dark-mode .category-header h1 a {
    color: #e8e8e8;
}

body.dark-mode .category-header h1 a:hover {
    color: #e8e8e8;
}

body.dark-mode .chapter-nav-title {
    color: #e8e8e8;
}

body.dark-mode .chapter-nav-title a {
    color: #e8e8e8;
}

body.dark-mode .chapter-nav-title a:hover {
    color: #fff;
}

body.dark-mode .chapter-title-header {
    border-bottom-color: #404040;
}

body.dark-mode .chapter-title-header h1 {
    color: #e8e8e8;
}

body.dark-mode .chapter-title-header h1 a {
    color: #e8e8e8;
}

body.dark-mode .chapter-title-header h1 a:hover {
    color: #fff;
}


/* 导航列表夜间模式 */
body.dark-mode .nav-list a {
    color: #d0d0d0;
}

body.dark-mode .nav-list a:hover {
    color: #fff;
}

/* 首页夜间模式样式 */
body.dark-mode .home-main {
    background: transparent;
}

body.dark-mode .home-hero {
    background: #1a1a1a !important;
    border-color: #404040 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .hero-text h2 {
    color: #e8e8e8 !important;
}

body.dark-mode .hero-text h2 a {
    color: #60a5fa !important;
}

body.dark-mode .hero-text h2 a:hover {
    color: #93c5fd !important;
}

body.dark-mode .hero-text p {
    color: #d0d0d0 !important;
}

body.dark-mode .hero-stats strong {
    color: #e8e8e8 !important;
}

body.dark-mode .hero-stats span {
    color: #b0b0b0 !important;
}

body.dark-mode .home-content {
    background: transparent;
}

/* 面包屑导航夜间模式 - 覆盖内联样式 */
body.dark-mode.category-page .breadcrumb-nav {
    background: #1a1a1a !important;
    border: none !important;
    border-bottom: 1px solid #404040 !important;
}

body.dark-mode.category-page .breadcrumb-nav a {
    color: #60a5fa !important;
}

body.dark-mode.category-page .breadcrumb-nav a:hover {
    color: #93c5fd !important;
}

body.dark-mode.category-page .breadcrumb-separator {
    color: #9ca3af !important;
}

body.dark-mode.category-page .breadcrumb-current {
    color: #e0e0e0 !important;
}

/* 夜间模式 - 面包屑导航下划线样式 */
body.dark-mode.category-page .breadcrumb-nav::after {
    background: #404040 !important;
    left: 0.8rem !important;
    right: 0.8rem !important;
}

body.dark-mode .breadcrumb-nav {
    background: #1a1a1a !important;
    border: none !important;
    border-bottom: 1px solid #404040 !important;
}

/* 夜间模式 - 面包屑导航下划线样式 */
body.dark-mode .breadcrumb-nav::after {
    background: #404040 !important;
    left: 0.8rem !important;
    right: 0.8rem !important;
}

body.dark-mode .breadcrumb-nav a {
    color: #60a5fa !important;
}

body.dark-mode .breadcrumb-nav a:hover {
    color: #93c5fd !important;
}

body.dark-mode .breadcrumb-separator {
    color: #6b7280 !important;
}

body.dark-mode .breadcrumb-current {
    color: #e8e8e8 !important;
}

body.dark-mode .category-navigation {
    background: #1a1a1a !important;
    border-color: #404040 !important;
}

body.dark-mode .category-card {
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .category-card:hover {
    background: #3d3d3d !important;
    border-color: #60a5fa !important;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2) !important;
}

body.dark-mode .category-card__name {
    color: #e8e8e8 !important;
}

/* 首页搜索下拉列表夜间模式 */
body.dark-mode #home-search-type,
body.dark-mode.home-body #home-search-type,
html.dark-mode body #home-search-type {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

body.dark-mode #home-search-type:focus,
body.dark-mode.home-body #home-search-type:focus,
html.dark-mode body #home-search-type:focus {
    border-color: #64b5f6 !important;
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
}

body.dark-mode #home-search-type option,
body.dark-mode.home-body #home-search-type option,
html.dark-mode body #home-search-type option {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

/* 顶栏/内页 guoxue 检索类型下拉（#header-search-type 等）— 夜间模式 */
body.dark-mode .guoxue-search-select,
body.dark-mode.category-page .guoxue-search-select,
body.dark-mode.home-body .guoxue-search-select,
body.dark-mode #header-search-type,
html.dark-mode body .guoxue-search-select,
html.dark-mode body #header-search-type {
    color-scheme: dark;
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
    border: 1px solid #555 !important;
}

body.dark-mode .guoxue-search-select:focus,
body.dark-mode.category-page .guoxue-search-select:focus,
body.dark-mode #header-search-type:focus,
html.dark-mode body .guoxue-search-select:focus,
html.dark-mode body #header-search-type:focus {
    border-color: #64b5f6 !important;
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.25) !important;
    outline: none !important;
}

body.dark-mode .guoxue-search-select option,
body.dark-mode #header-search-type option,
html.dark-mode body .guoxue-search-select option {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

/* /dict 统一入口「字典类型」下拉 */
body.dark-mode .dict-type-select,
body.dark-mode #dict-type-select {
    color-scheme: dark;
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
    border: 1px solid #555 !important;
}

body.dark-mode .dict-type-select:focus,
body.dark-mode #dict-type-select:focus {
    border-color: #64b5f6 !important;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.25) !important;
    outline: none !important;
}

body.dark-mode .dict-type-select option,
body.dark-mode #dict-type-select option {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

/* 首页类目导航按钮夜间模式 */
body.dark-mode .category-nav-item a,
body.dark-mode.home-body .category-nav-item a,
html.dark-mode body .category-nav-item a {
    background: #2d2d2d !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .category-nav-item a:hover,
body.dark-mode.home-body .category-nav-item a:hover,
html.dark-mode body .category-nav-item a:hover {
    background: #3d3d3d !important;
    border-color: #64b5f6 !important;
    color: #90caf9 !important;
    box-shadow: 0 4px 8px rgba(100, 181, 246, 0.3) !important;
}

body.dark-mode .category-nav-item a .category-icon,
body.dark-mode.home-body .category-nav-item a .category-icon,
html.dark-mode body .category-nav-item a .category-icon {
    color: inherit !important;
}

body.dark-mode .book-list-item {
    border-bottom-color: #404040 !important;
}

body.dark-mode .book-list-item:hover {
    background-color: #2d2d2d !important;
}

body.dark-mode .book-list-title {
    color: #e8e8e8 !important;
}

body.dark-mode .book-list-link:hover .book-list-title {
    color: #60a5fa !important;
}

body.dark-mode .book-list-author {
    color: #9ca3af !important;
}

body.dark-mode .book-list-description {
    color: #b0b0b0 !important;
}

body.dark-mode .section-title h3 {
    color: #e8e8e8 !important;
}

body.dark-mode .section-title a {
    color: #d0d0d0 !important;
}

body.dark-mode .section-title a:hover {
    color: #e8e8e8 !important;
}

body.dark-mode .featured-card {
    background: #1a1a1a !important;
    border: 1px solid #404040 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .featured-card__header h4 {
    color: #e8e8e8 !important;
}

body.dark-mode .featured-card p {
    color: #d0d0d0 !important;
}

body.dark-mode .featured-card .chapter-count {
    color: #b0b0b0 !important;
}

body.dark-mode .btn-primary {
    background: #3d3d3d !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

body.dark-mode .btn-primary:hover {
    background: #4d4d4d !important;
    color: #e8e8e8 !important;
}

body.dark-mode .btn-ghost {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

body.dark-mode .btn-ghost:hover {
    background: #3d3d3d !important;
    color: #e8e8e8 !important;
    border-color: #666 !important;
}

/* 语言切换按钮 */
.language-toggle {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50% !important; /* 确保圆形，使用 !important 防止被覆盖 */
    background: #fff;
    border: 1px solid #e0e0e0 !important; /* 确保有边框，使用 !important 防止被覆盖 */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
    box-sizing: border-box; /* 确保边框计算正确 */
}

.language-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border-color: #d4c5a9;
}

body.dark-mode .language-toggle {
    background: #2d2d2d;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .language-toggle:hover {
    background: #3d3d3d;
    border-color: #666;
}

/* 主题切换按钮 */
.theme-toggle {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border-color: #d4c5a9;
}

body.dark-mode .theme-toggle {
    background: #2d2d2d;
    border-color: #555;
    color: #e8e8e8;
}

body.dark-mode .theme-toggle:hover {
    background: #3d3d3d;
    border-color: #666;
}

/* 成语详情页夜间模式样式 */
body.dark-mode .idiom-detail {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .idiom-header {
    border-bottom-color: #404040;
}

body.dark-mode .idiom-word {
    color: #ff6b6b !important;
}

body.dark-mode .idiom-pinyin {
    color: #51cf66 !important;
}

body.dark-mode .idiom-section-label {
    color: #e8e8e8 !important;
}

body.dark-mode .idiom-section h3 {
    color: #e8e8e8 !important;
}

body.dark-mode .idiom-section-content {
    color: #e0e0e0 !important;
}

body.dark-mode .idiom-section-content.idiom-zhuyin-content {
    color: #51cf66 !important;
}

body.dark-mode .idiom-section-content .fontred,
body.dark-mode .idiom-section-content span.fontred {
    color: #ff6b6b !important;
}

body.dark-mode .idiom-jiexi {
    border-top-color: #404040;
}

body.dark-mode .idiom-jiexi h2 {
    color: #e8e8e8 !important;
    border-bottom-color: #404040;
}

body.dark-mode .idiom-jiexi h3 {
    color: #e0e0e0 !important;
}

body.dark-mode .idiom-jiexi p {
    color: #e0e0e0 !important;
}

body.dark-mode .idiom-jiexi * {
    color: #e0e0e0 !important;
}

body.dark-mode .idiom-section-content a,
body.dark-mode .idiom-jiexi a {
    color: #60a5fa !important;
}

body.dark-mode .idiom-section-content a:hover,
body.dark-mode .idiom-jiexi a:hover {
    color: #93c5fd !important;
}

body.dark-mode .idiom-section.idiom-footer {
    color: #b0b0b0 !important;
    border-top-color: #404040 !important;
}

/* 成语分类页和列表页夜间模式样式 */
body.dark-mode .book-list-link span {
    color: #e0e0e0 !important;
}

body.dark-mode .book-list-link:hover span {
    color: #60a5fa !important;
}

body.dark-mode .category-section h3 {
    color: #e8e8e8 !important;
    border-bottom-color: #404040 !important;
}

body.dark-mode .category-section h3 a {
    color: #60a5fa !important;
}

body.dark-mode .category-section h3 a:hover {
    color: #93c5fd !important;
}

body.dark-mode .home-content {
    background: #1a1a1a !important;
    border-color: #404040 !important;
}

body.dark-mode .section-title h2 {
    color: #e8e8e8 !important;
}

/* 古籍关联内容区域夜间模式样式 */
body.dark-mode .idiom-guji-section {
    border-top-color: #404040 !important;
}

body.dark-mode .idiom-guji-section h2 {
    color: #e8e8e8 !important;
    border-bottom-color: #404040 !important;
}

body.dark-mode .guji-item {
    background-color: #2d2d2d !important;
    border-left-color: #c62828 !important;
    border-top-color: #404040 !important;
}

body.dark-mode .guji-header {
    color: #e8e8e8 !important;
}

body.dark-mode .guji-book-name {
    color: #e8e8e8 !important;
}

body.dark-mode .guji-chapter-name {
    color: #e8e8e8 !important;
}

body.dark-mode .guji-content {
    color: #e0e0e0 !important;
}

body.dark-mode .guji-content strong {
    color: #e8e8e8 !important;
}

body.dark-mode .guji-content span[style*="color: #c62828"],
body.dark-mode .guji-content span[style*="color:#c62828"] {
    color: #ff6b6b !important;
}

body.dark-mode .guji-link a {
    color: #60a5fa !important;
}

body.dark-mode .guji-link a:hover {
    color: #93c5fd !important;
}

body.dark-mode .guji-book-expand-btn {
    background-color: #3d3d3d !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

body.dark-mode .guji-book-expand-btn:hover {
    background-color: #4d4d4d !important;
    color: #e8e8e8 !important;
}

body.dark-mode .guji-expand-all-control {
    background-color: #2d2d2d !important;
    border-top-color: #404040 !important;
    border-bottom-color: #404040 !important;
}

body.dark-mode #guji-expand-all-btn {
    background-color: #1976d2 !important;
    color: white !important;
}

body.dark-mode #guji-expand-all-btn:hover {
    background-color: #1565c0 !important;
}

/* 汉字详情页夜间模式样式 */
body.dark-mode.category-page {
    background: #1a1a1a !important;
}

body.dark-mode .word-detail-wrapper {
    background: #1a1a1a;
}

body.dark-mode .word-header-box {
    background: #2d2d2d !important;
    border-color: #555 !important;
    border-left-color: #B22C24 !important;
}

body.dark-mode .word-char-grid {
    background: #2d2d2d !important;
    border-color: #B22C24 !important;
}

body.dark-mode .word-char-grid::before,
body.dark-mode .word-char-grid::after {
    border-color: #B22C24 !important;
}

body.dark-mode .word-char-grid-inner {
    color: #e0e0e0 !important;
}

body.dark-mode .word-meta-list-label {
    color: #9ca3af !important;
}

body.dark-mode .word-meta-list-value {
    color: #e0e0e0 !important;
}

body.dark-mode .word-meta-list-value .pinyin-display {
    color: #e0e0e0 !important;
}

body.dark-mode .word-section {
    background: #2d2d2d !important;
}

body.dark-mode .word-section {
    background: #2d2d2d !important;
    border-color: #555 !important;
}

body.dark-mode .word-section-basic {
    background: #2d2d2d !important;
    border-color: #555 !important;
    border-left-color: #B22C24 !important;
}

body.dark-mode .word-section-detailed {
    background: #2d2d2d !important;
    border-color: #555 !important;
    border-left-color: #8B7355 !important;
}

body.dark-mode .word-section-pos {
    background: #2d2d2d !important;
    border-color: #555 !important;
    border-left-color: #666 !important;
}

body.dark-mode .word-section-title {
    color: #e0e0e0 !important;
    border-bottom-color: #404040 !important;
}

body.dark-mode .word-subsection-title {
    color: #e0e0e0 !important;
    border-bottom-color: #404040 !important;
}

/* 词典详情页标题区域夜间模式 */
body.dark-mode .word-title-box {
    background: #2d2d2d !important;
    border-left-color: #555 !important;
}

body.dark-mode .word-title-box h1 {
    color: #ff6b6b !important;
}

body.dark-mode .word-title-box span {
    color: #d0d0d0 !important;
}

/* 国语释义夜间模式 */
body.dark-mode .guoyu-pos-label {
    background-color: #B22C24 !important;
    color: #ffffff !important;
}

body.dark-mode .guoyu-definition-item {
    color: #d0d0d0 !important;
}

body.dark-mode .guoyu-definition-item::before {
    color: #b0b0b0 !important;
}

/* 基本字义解释夜间模式 */
body.dark-mode .basic-explanation-item {
    color: #d0d0d0 !important;
}

body.dark-mode .basic-explanation-main {
    color: #e0e0e0 !important;
}

body.dark-mode .basic-explanation-sub {
    color: #b0b0b0 !important;
}

body.dark-mode .basic-explanation-sub::before {
    background: #666 !important;
}

/* 编号已移除 */

body.dark-mode .basic-explanation-item strong {
    color: #90caf9 !important;
}

/* 详细字义解释夜间模式 */
body.dark-mode .detailed-explanation-item {
    color: #d0d0d0 !important;
}

/* ◎ 开头的内容在暗色模式下也加粗 */
body.dark-mode .detailed-explanation-bold {
    font-weight: bold !important;
    color: #e0e0e0 !important;
}

body.dark-mode .detailed-explanation-item strong {
    color: #ef4444 !important;
}

body.dark-mode .detailed-explanation-item .pos-tag {
    background-color: #B22C24 !important;
    color: #ffffff !important;
}

/* 深度解析模块中的h3标题（核心含義、適用範圍等）夜间模式 */
body.dark-mode .detailed-explanation-item h3 {
    color: #e8e8e8 !important;
}

/* 覆盖内联样式中的color: #333 */
body.dark-mode .detailed-explanation-item h3[style*="color: #333"],
body.dark-mode .detailed-explanation-item h3[style*="color:#333"] {
    color: #e8e8e8 !important;
}

body.dark-mode .part-of-speech-tag {
    background: #1e3a5f !important;
    color: #90caf9 !important;
}

/* 英文翻译夜间模式 */
body.dark-mode .english-translation {
    background: #2d2d2d !important;
    border-left-color: #B22C24 !important;
    color: #d0d0d0 !important;
}

/* 相关词语夜间模式 */
body.dark-mode .word-item-name {
    color: #e0e0e0 !important;
}

body.dark-mode .word-item-pinyin {
    color: #9ca3af !important;
}

body.dark-mode .word-item-explanation {
    color: #b0b0b0 !important;
}

/* 同音字/同部首侧边栏夜间模式 */
body.dark-mode .homophones-sidebar {
    background: transparent !important;
    border-top-color: #404040 !important;
}

body.dark-mode .homophones-sidebar-title {
    color: #e0e0e0 !important;
    border-bottom-color: #404040 !important;
}

body.dark-mode .homophones-bullet {
    color: #666 !important;
}

body.dark-mode .homophones-char {
    color: #ef4444 !important;
}

body.dark-mode .homophones-char:hover {
    color: #dc2626 !important;
}

body.dark-mode .homophones-pinyin {
    color: #9ca3af !important;
}

/* 字典详情页右侧栏夜间模式 */
body.dark-mode .dict-sidebar {
    background: #2d2d2d !important;
    border-color: #404040 !important;
}

body.dark-mode .dict-sidebar-title {
    color: #e0e0e0 !important;
    border-bottom-color: #404040 !important;
}

/* 覆盖内联样式中的边框颜色 */
body.dark-mode .dict-sidebar-title[style*="border-bottom"] {
    border-bottom-color: #404040 !important;
}

body.dark-mode .dict-sidebar-links a {
    color: #d0d0d0 !important;
}

body.dark-mode .dict-sidebar-links a:hover {
    background: #3d3d3d !important;
    color: #e8e8e8 !important;
}

body.dark-mode .dict-sidebar-links a.active {
    background: #3d3d3d !important;
    color: #64b5f6 !important;
}

body.dark-mode .dict-sidebar-icon {
    opacity: 0.9 !important;
}

body.dark-mode .dict-sidebar-links a.active .dict-sidebar-icon {
    opacity: 1 !important;
}

/* 覆盖同音字/同部首侧边栏内联样式中的边框颜色 */
body.dark-mode .homophones-sidebar[style*="border-top"] {
    border-top-color: #404040 !important;
}

/* 说文解字夜间模式 */
body.dark-mode .shuowen-text {
    color: #d0d0d0 !important;
}

body.dark-mode .shuowen-image-grid {
    background: #2d2d2d !important;
    border-color: #555 !important;
}

/* 康熙字典夜间模式 */
body.dark-mode .kangxi-text {
    color: #d0d0d0 !important;
}

body.dark-mode .kangxi-image-wrapper .shuowen-image-grid {
    background: #2d2d2d !important;
    border-color: #555 !important;
}

body.dark-mode .kangxi-container {
    background: #2d2d2d !important;
}

/* 字源演变夜间模式 */
body.dark-mode .etymology-item-label {
    color: #b0b0b0 !important;
}

body.dark-mode .etymology-item-grid {
    background: #2d2d2d !important;
    border-color: #B22C24 !important;
}

/* 国学风格元素夜间模式 */
body.dark-mode .word-content {
    color: #d0d0d0 !important;
}

body.dark-mode .word-source {
    background: #2d2d2d !important;
    border-left-color: #8B7355 !important;
}

body.dark-mode .word-source-text {
    color: #d0d0d0 !important;
}

body.dark-mode .word-source-book {
    color: #9ca3af !important;
}

body.dark-mode .word-char-block {
    background: #2d2d2d !important;
    border-color: #555 !important;
}

body.dark-mode .word-char-block:hover {
    border-color: #B22C24 !important;
}

body.dark-mode .word-char-link {
    color: #60a5fa !important;
}

body.dark-mode .word-char-link:hover {
    color: #3b82f6 !important;
}

body.dark-mode .word-char-no-link {
    color: #e0e0e0 !important;
}

body.dark-mode .word-char-pinyin {
    color: #9ca3af !important;
}

body.dark-mode .related-idiom-link {
    color: #60a5fa !important;
}

body.dark-mode .related-idiom-link:hover {
    color: #3b82f6 !important;
}

body.dark-mode .idiom-separator {
    color: #666 !important;
}

/* 笔画动画相关夜间模式 */
body.dark-mode .stroke-animation-img-container {
    background: #2d2d2d !important;
}

body.dark-mode .stroke-animation-content {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

body.dark-mode .stroke-animation-close {
    background-color: #c62828 !important;
}

body.dark-mode .stroke-animation-close:hover {
    background-color: #b71c1c !important;
}

/* 隐私政策页面夜间模式样式 */
body.dark-mode .policy-card {
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e0e0e0 !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .policy-card h3 {
    color: #e8e8e8 !important;
}

body.dark-mode .policy-card p {
    color: #d0d0d0 !important;
}

body.dark-mode .policy-card ul {
    color: #d0d0d0 !important;
}

body.dark-mode .policy-card li {
    color: #d0d0d0 !important;
}

body.dark-mode .policy-card a {
    color: #60a5fa !important;
}

body.dark-mode .policy-card a:hover {
    color: #93c5fd !important;
}

body.dark-mode .policy-card strong {
    color: #e8e8e8 !important;
}

/* category-hero 夜间模式样式 */
body.dark-mode .category-hero {
    background: #1a1a1a !important;
}

body.dark-mode .category-hero .hero-text h2 {
    color: #e8e8e8 !important;
}

body.dark-mode .category-hero .hero-text h2 a {
    color: #60a5fa !important;
}

body.dark-mode .category-hero .hero-text h2 a:hover {
    color: #93c5fd !important;
}

body.dark-mode .category-hero .hero-text p {
    color: #b0b0b0 !important;
}

/* category-layout 夜间模式样式 */
body.dark-mode .category-layout {
    background: transparent !important;
}

body.dark-mode .category-content {
    background: transparent !important;
}

/* 词典搜索框夜间模式 */
body.dark-mode .guoxue-search-input {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-color: #404040 !important;
}

body.dark-mode .guoxue-search-input:hover {
    border-color: #555 !important;
}

body.dark-mode .guoxue-search-input:focus {
    border-color: #64b5f6 !important;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.2) !important;
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

body.dark-mode .guoxue-search-input::placeholder {
    color: #888 !important;
}

/* 词语详情页HSK区域夜间模式样式 */
body.dark-mode .hsk-portal-title {
    color: #e8e8e8 !important;
    border-bottom-color: #404040 !important;
}

body.dark-mode .hsk-section-title {
    color: #e0e0e0 !important;
}

body.dark-mode .hsk-attr-label {
    color: #e0e0e0 !important;
}

body.dark-mode .hsk-attr-value {
    color: #e0e0e0 !important;
}

body.dark-mode .hsk-transcription-label {
    color: #e0e0e0 !important;
}

body.dark-mode .hsk-transcription-value {
    color: #90caf9 !important;
}

body.dark-mode .hsk-meaning-item {
    color: #e0e0e0 !important;
}

body.dark-mode .hsk-label {
    color: #e0e0e0 !important;
}

body.dark-mode .hsk-value {
    color: #e0e0e0 !important;
}

body.dark-mode .hsk-level-new {
    background: #2d5a3d !important;
    color: #90ee90 !important;
}

body.dark-mode .hsk-level-old {
    background: #3d3d3d !important;
    color: #d0d0d0 !important;
}

body.dark-mode .hsk-pinyin {
    color: #51cf66 !important;
}

body.dark-mode .hsk-meanings {
    color: #e0e0e0 !important;
}

body.dark-mode .hsk-form-item:before {
    color: #888 !important;
}

body.dark-mode .hsk-traditional {
    color: #e0e0e0 !important;
}

/* 词典详情页近反义词夜间模式适配 */
body.dark-mode .word-section strong {
    color: #e0e0e0 !important;
}

body.dark-mode .word-section a[href*="/dict/cidian/"] {
    color: #64b5f6 !important;
    border-bottom-color: #64b5f6 !important;
}

body.dark-mode .word-section span[style*="color: #666"] {
    color: #b0b0b0 !important;
}

