/* 国学风格通用样式 - 基于 zidian 和详情页设计 */

/* 国学风格整体设计 */
body.category-page {
    background: #fff;
    font-family: 'STSong', 'SimSun', 'Songti SC', 'NSimSun', serif;
    position: relative;
}

/* 宣纸质感背景 */
body.category-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(212, 196, 168, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 196, 168, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.category-main {
    position: relative;
    z-index: 1;
    background: transparent;
}

/* 第一屏：极简搜索区 */
.guoxue-search-section {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 今日一字 */
.today-word {
    margin-bottom: 1.2rem;
}
.today-word-label {
    font-size: 0.85rem;
    color: #8B7355;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}
.today-word-char {
    display: inline-block;
    font-size: 4rem;
    font-weight: 600;
    color: #2C2C2C;
    font-family: 'KaiTi', '楷体', serif;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    text-decoration: none;
}
.today-word-char:hover {
    transform: scale(1.1);
    color: #B22C24;
}

/* 搜索框 - 双边框设计 */
.guoxue-search-form {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.guoxue-search-input {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    color: #2C2C2C;
    background: #fff;
    border: 2px solid #D4C4A8;
    border-radius: 0;
    outline: none;
    font-family: 'STSong', 'SimSun', 'Songti SC', serif;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease;
    height: 44px;
    box-sizing: border-box;
}
.guoxue-search-input::placeholder {
    color: #8B7355;
    font-style: italic;
}
.guoxue-search-input:focus {
    border-color: #B22C24;
    box-shadow: 0 0 0 3px rgba(178, 44, 36, 0.1);
}

/* 搜索按钮 - 印章形状 */
.guoxue-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #2563eb;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.guoxue-search-btn:hover {
    background: #1d4ed8;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}
.guoxue-search-btn::before {
    content: '搜';
    font-weight: 600;
}

/* 搜索提示 */
.search-hint {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #8B7355;
    line-height: 1.8;
}
.search-hint strong {
    color: #B22C24;
    font-weight: 600;
}

/* 卡片样式 */
.category-card,
.guoxue-card {
    background: #fff;
    border: 1px solid #D4C4A8;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}
.category-card::before,
.guoxue-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #B22C24;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.category-card:hover,
.guoxue-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.category-card:hover::before,
.guoxue-card:hover::before {
    opacity: 1;
}
.category-card-title,
.guoxue-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.5rem;
    font-family: 'KaiTi', '楷体', serif;
}
.category-card-desc,
.guoxue-card-desc {
    font-size: 0.95rem;
    color: #8B7355;
    line-height: 1.8;
    margin-bottom: 1rem;
}
.category-card-link,
.guoxue-card-link {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 1px solid #D4C4A8;
    color: #2C2C2C;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}
.category-card-link:hover,
.guoxue-card-link:hover {
    background: #B22C24;
    color: #fff;
    border-color: #B22C24;
}

/* 介绍文案区域 */
.guoxue-intro-container {
    max-width: 900px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}
.guoxue-intro-content {
    text-align: left;
    line-height: 2;
    color: #2C2C2C;
}
.guoxue-paragraph {
    font-size: 1rem;
    margin: 0.8rem 0;
    color: #414656;
    line-height: 1.8;
}
.guoxue-highlight {
    color: #B22C24;
    font-weight: 600;
}
.guoxue-section {
    margin: 1.2rem 0;
}
.guoxue-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C2C2C;
    margin: 0 0 1rem 0;
    font-family: 'KaiTi', '楷体', serif;
}
.guoxue-feature-item {
    margin: 0.8rem 0;
    line-height: 1.8;
    color: #414656;
}
.guoxue-feature-label {
    font-weight: 600;
    color: #2C2C2C;
    margin-right: 0.5rem;
}
.guoxue-conclusion {
    font-size: 1rem;
    margin: 1.2rem 0 0.5rem 0;
    color: #414656;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #D4C4A8;
}

/* 经典引用样式 */
.classic-quote {
    font-size: 1.1rem;
    line-height: 2;
    color: #2C2C2C;
    font-style: italic;
    padding: 1.5rem;
    background: #F5F2E9;
    border-left: 4px solid #B22C24;
    margin-top: 1rem;
}

/* ============================================
   首页样式 (home-body)
   ============================================ */
body.home-body {
    background: #fff !important;
    font-family: 'STSong', 'SimSun', 'Songti SC', 'NSimSun', serif;
    position: relative;
}

/* 首页宣纸质感背景 - 已移除，使用纯白背景 */
/* body.home-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(212, 196, 168, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 196, 168, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
} */

.home-main {
    position: relative;
    z-index: 1;
    background: transparent;
}

/* 首页卡片样式 */
body.home-body .category-card {
    background: #fff;
    border: 1px solid #D4C4A8;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 6px !important;
}

body.home-body .category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #8B7355;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.home-body .category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body.home-body .category-card:hover::before {
    opacity: 1;
}

body.home-body .category-card__name {
    color: #2C2C2C;
    font-family: 'KaiTi', '楷体', serif;
    font-size: 13px !important;
    line-height: 1.2 !important;
}

body.home-body .category-card__icon {
    font-size: 20px !important;
    margin-bottom: 3px !important;
}

/* 首页按钮样式 */
body.home-body .btn-primary {
    background: #7A7A7A;
    color: #fff;
    border: 1px solid #7A7A7A;
}

body.home-body .btn-primary:hover {
    background: #6A6A6A;
    border-color: #6A6A6A;
}

body.home-body .btn-ghost {
    background: transparent;
    color: #2C2C2C;
    border: 1px solid #D4C4A8;
}

body.home-body .btn-ghost:hover {
    background: #8B7355;
    color: #fff;
    border-color: #8B7355;
}

/* 首页标题样式 */
body.home-body .hero-text h2 {
    color: #2C2C2C;
    font-family: 'KaiTi', '楷体', serif;
}

body.home-body .section-title h3 {
    color: #2C2C2C;
    font-family: 'KaiTi', '楷体', serif;
}

body.home-body .hero-text p {
    color: #414656;
}

/* ============================================
   书库页面样式 (shuku)
   ============================================ */
/* 移除主体部分边框 */
body.category-page .home-content,
body.category-page .category-content {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* 移除书籍详情页主内容区域边框 */
body.category-page .book-content,
body.category-page .chapter-content-wrapper,
body.category-page .category-content {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* 移除右边栏边框 - 参考书库样式 */
body.category-page .home-sidebar,
body.category-page .category-sidebar,
.home-sidebar,
.category-sidebar {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 15px !important;
}

/* 章节页右边栏样式 - 参考书籍页右边栏样式 */
body.category-page.chapter-page .category-sidebar,
.chapter-page .category-sidebar {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 15px !important;
}

/* 右边栏书籍列表去掉编号 */
body.category-page .category-sidebar .ranking-list {
    list-style: none !important;
    counter-reset: none !important;
    padding-left: 0 !important;
}

body.category-page .category-sidebar .ranking-list li {
    counter-increment: none !important;
    padding-left: 0 !important;
}

body.category-page .category-sidebar .ranking-list li::before {
    content: none !important;
    display: none !important;
}

/* 章节页右边栏列表样式 - 参考书籍页右边栏样式 */
body.category-page.chapter-page .category-sidebar .ranking-list,
.chapter-page .category-sidebar .ranking-list {
    list-style: none !important;
    counter-reset: none !important;
    padding-left: 0 !important;
}

body.category-page.chapter-page .category-sidebar .ranking-list li,
.chapter-page .category-sidebar .ranking-list li {
    counter-increment: none !important;
    padding-left: 0 !important;
}

body.category-page.chapter-page .category-sidebar .ranking-list li::before,
.chapter-page .category-sidebar .ranking-list li::before {
    content: none !important;
    display: none !important;
}

/* 移除章节列表容器边框 */
body.category-page .chapter-list,
body.category-page .volume-section,
body.category-page .volume-chapters {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* 移除章节项边框 */
body.category-page .chapter-item {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}

/* 书库标题样式 */
.page-title {
    font-family: 'KaiTi', '楷体', serif !important;
    color: #555 !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
}

/* 书库部页面简介栏 */
.shuku-section-intro {
    background-color: #f5f5f5 !important;
    border-left: 4px solid #C4B5A0 !important;
    border-radius: 0 !important;
    color: #666 !important;
    font-family: 'STSong', 'SimSun', 'Songti SC', serif !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.8 !important;
}

/* ============================================
   书库书籍列表样式优化 - 列表样式（参考搜索列表）
   ============================================ */
body.category-page .shuku-book-list .book-list-items {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-top: 1rem !important;
    display: block !important;
}

body.category-page .shuku-book-list .book-list-item {
    padding: 0.6rem 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    margin: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
}

body.category-page .shuku-book-list .book-list-item:last-child {
    border-bottom: none !important;
}

body.category-page .shuku-book-list .book-list-item:hover {
    background-color: transparent !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
}

.dark body.category-page .shuku-book-list .book-list-item,
body.dark-mode.category-page .shuku-book-list .book-list-item {
    border-bottom-color: #444;
}

body.category-page .shuku-book-list .book-list-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

body.category-page .shuku-book-list .book-list-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #2C3E50 !important;
    margin-bottom: 0 !important;
    margin-right: 0.5rem !important;
    line-height: 1.5 !important;
    transition: color 0.3s ease !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

body.category-page .shuku-book-list .book-list-link:hover .book-list-title {
    color: #2563eb !important;
}

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

body.category-page .shuku-book-list .book-list-author {
    font-size: 0.95rem !important;
    color: #7F8C8D !important;
    margin-bottom: 0 !important;
    font-style: normal !important;
    font-family: 'STSong', 'SimSun', 'Songti SC', serif !important;
    font-weight: 500 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1.5 !important;
}

body.category-page .shuku-book-list .book-list-description {
    font-size: 0.95rem !important;
    color: #222 !important;
    line-height: 1.8 !important;
    margin: 6px 0 0 0 !important;
    font-family: 'STSong', 'SimSun', 'Songti SC', serif !important;
}

.dark body.category-page .shuku-book-list .book-list-description,
body.dark-mode.category-page .shuku-book-list .book-list-description {
    color: var(--text-main, #e6e6e6);
}

/* 书库页面分页样式 - 浅灰色 */
body.category-page .pagination-link {
    color: #999 !important;
    border-color: rgba(200, 200, 200, 0.5) !important;
}

body.category-page .pagination-link:hover {
    background: #f5f5f5 !important;
    border-color: #d0d0d0 !important;
    color: #888 !important;
}

body.category-page .pagination-link.active {
    background: #e8e8e8 !important;
    color: #999 !important;
    border-color: #c0c0c0 !important;
}

body.category-page .pagination-link.active:hover {
    background: #f0f0f0 !important;
}

body.category-page .pagination-link.pagination-prev:hover,
body.category-page .pagination-link.pagination-next:hover {
    background: #f5f5f5 !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
    body.category-page .shuku-book-list .book-list-item {
        padding: 0.5rem 0 !important;
    }
    
    body.category-page .shuku-book-list .book-list-title {
        font-size: 1.05rem !important;
    }
    
    body.category-page .shuku-book-list .book-list-author {
        font-size: 0.9rem !important;
        margin-left: 0.3rem !important;
    }
    
    body.category-page .shuku-book-list .book-list-description {
        font-size: 0.9rem !important;
    }
    
    /* 章节页面包屑导航移动端左对齐 */
    body.category-page.chapter-page .category-hero,
    .chapter-page .category-hero {
        justify-content: flex-start !important;
        align-items: flex-start !important;
        text-align: left !important;
    }
    
    body.category-page.chapter-page .category-hero .hero-text,
    .chapter-page .category-hero .hero-text {
        text-align: left !important;
        width: 100% !important;
        padding-left: 3px !important;
    }
    
    body.category-page.chapter-page .category-hero .hero-text h2,
    .chapter-page .category-hero .hero-text h2,
    body.category-page.chapter-page .category-hero .hero-text h2#chapterTitle,
    .chapter-page .category-hero .hero-text h2#chapterTitle {
        text-align: left !important;
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
}

/* 简介栏应用国学风格 */
.shuku-total-intro {
    background-color: #f0f0f0 !important;
    border-left: 4px solid #C4B5A0 !important;
    border-radius: 4px !important;
    color: #666 !important;
    font-family: 'STSong', 'SimSun', 'Songti SC', serif !important;
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
    padding: 1rem !important;
    line-height: 1.8 !important;
    font-size: 0.95rem !important;
}

/* ============================================
   书籍详情页样式（国学书库书籍）
   ============================================ */
body.category-page .category-content {
    background: transparent !important;
}

/* 减小 category-hero 和 category-content 之间的间距 */
body.category-page .home-hero.category-hero,
body.category-page .category-hero {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 减小 category-layout 的 gap */
body.category-page .category-layout {
    gap: 0 !important;
    margin-top: 0 !important;
}

body.category-page .category-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.category-page .category-content > .book-author:first-child {
    margin-top: 0.8rem !important;
}

body.category-page .book-author {
    background-color: #f5f5f5 !important;
    border-left: 4px solid #C4B5A0 !important;
    border-radius: 0 !important;
    padding: 0.3rem 1rem !important;
    margin-top: 0.8rem !important;
    margin-bottom: 0.4rem !important;
}

body.category-page .book-author h3 {
    color: #2C2C2C !important;
    font-family: 'KaiTi', '楷体', serif !important;
    font-size: 1rem !important;
    margin-bottom: 0.1rem !important;
    margin-top: 0 !important;
}

body.category-page .book-author div {
    color: #666 !important;
    font-family: 'STSong', 'SimSun', 'Songti SC', serif !important;
    line-height: 1.5 !important;
    font-size: 0.95rem !important;
    margin-top: 0.1rem !important;
}

body.category-page .books-grid-container h2 {
    font-family: 'KaiTi', '楷体', serif !important;
    color: #2C2C2C !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.3rem !important;
    margin-top: 0.2rem !important;
    padding-bottom: 0.3rem !important;
    border-bottom: 1px solid #d0d0d0 !important;
}

body.category-page .book-description {
    color: #666 !important;
    font-family: 'STSong', 'SimSun', 'Songti SC', serif !important;
    line-height: 1.8 !important;
    font-size: 0.95rem !important;
    margin-bottom: 0.2rem !important;
    padding: 0.7rem !important;
    background-color: #f5f5f5 !important;
    border-bottom: 1px solid #d0d0d0 !important;
}

body.category-page .chapter-list {
    margin-top: 0.5rem;
}

body.category-page .volume-section {
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

body.category-page .volume-title {
    font-family: 'KaiTi', '楷体', serif !important;
    color: #2C2C2C !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid #E8E0D4 !important;
}

body.category-page .chapter-group-title {
    font-family: 'KaiTi', '楷体', serif !important;
    color: #555 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0.8rem !important;
}

body.category-page .volume-chapters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

body.category-page .chapter-item {
    margin: 0;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

body.category-page .chapter-item a {
    display: block;
    padding: 0.5rem 0.8rem;
    color: #666 !important;
    text-decoration: none;
    font-family: 'STSong', 'SimSun', 'Songti SC', serif !important;
    font-size: 0.9rem !important;
    border: none !important;
    border-radius: 0 !important;
    transition: all 0.3s ease;
    background: transparent !important;
}

body.category-page .chapter-item a:hover {
    background-color: #f5f5f5 !important;
    border: none !important;
    color: #8B7355 !important;
    box-shadow: none !important;
}

/* 移除章节内容区域标题上方的线 */
body.category-page.chapter-page .chapter-content h1,
body.category-page.chapter-page .chapter-content h2,
.chapter-page .chapter-content h1,
.chapter-page .chapter-content h2,
body.category-page.chapter-page .chapter-title-header,
.chapter-page .chapter-title-header {
    border-top: none !important;
    border-bottom: none !important;
    border: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* 移除章节导航区域和内容区域之间的线 */
body.category-page.chapter-page .chapter-nav-top,
.chapter-page .chapter-nav-top {
    border-top: none !important;
    border-bottom: none !important;
    border: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 确保category-content在章节页面没有上边框 */
body.category-page.chapter-page .category-content,
.chapter-page .category-content {
    border-top: none !important;
}

/* 移除category-hero和category-content之间的间距导致的视觉线 */
body.category-page.chapter-page .category-hero,
.chapter-page .category-hero {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 确保章节内容第一个元素没有上边框 */
body.category-page.chapter-page .chapter-content > *:first-child,
.chapter-page .chapter-content > *:first-child {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 部块标题应用国学风格 */
.section-block-title {
    font-family: 'KaiTi', '楷体', serif !important;
    color: #888 !important;
    font-size: 1.3rem !important;
}

body.category-page .section-block-header,
.section-block-header {
    border-bottom: 1px solid #e8e8e8 !important;
    margin-bottom: 0 !important;
    padding-bottom: 2px !important;
}

.shuku-sections-grid {
    gap: 12px !important;
}

.section-books-grid {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.category-page .shuku-section-block,
.shuku-section-block {
    background: #fff !important;
    margin-bottom: 0 !important;
}

/* 书籍链接应用国学风格 */
body.category-page .book-item-link,
.book-item-link {
    color: #666 !important;
    font-family: 'STSong', 'SimSun', 'Songti SC', serif !important;
    border-right: 1px solid #e8e8e8 !important;
    border-bottom: 1px solid #e8e8e8 !important;
}

/* 覆盖style.css中移除最后一列右边框的规则 - 确保所有元素都显示右边框 */
body.category-page .section-books-grid .book-item-link:nth-child(5n),
body.category-page .book-item-link:nth-child(5n),
.section-books-grid .book-item-link:nth-child(5n),
.book-item-link:nth-child(5n) {
    border-right: 1px solid #e8e8e8 !important;
}

/* 响应式：4列布局 */
@media (max-width: 1200px) {
    body.category-page .section-books-grid .book-item-link:nth-child(4n),
    body.category-page .book-item-link:nth-child(4n),
    .section-books-grid .book-item-link:nth-child(4n),
    .book-item-link:nth-child(4n) {
        border-right: 1px solid #e8e8e8 !important;
    }
}

/* 响应式：3列布局 */
@media (max-width: 768px) {
    body.category-page .section-books-grid .book-item-link:nth-child(3n),
    body.category-page .book-item-link:nth-child(3n),
    .section-books-grid .book-item-link:nth-child(3n),
    .book-item-link:nth-child(3n) {
        border-right: 1px solid #e8e8e8 !important;
    }
}

/* 响应式：2列布局 */
@media (max-width: 480px) {
    body.category-page .section-books-grid .book-item-link:nth-child(2n),
    body.category-page .book-item-link:nth-child(2n),
    .section-books-grid .book-item-link:nth-child(2n),
    .book-item-link:nth-child(2n) {
        border-right: 1px solid #e8e8e8 !important;
    }
}

body.category-page .book-item-link:hover,
.book-item-link:hover {
    background-color: #4A3F36 !important;
    color: #fff !important;
}

/* 查看全部链接应用国学风格 */
.section-view-all {
    color: #999 !important;
}

.section-view-all:hover {
    color: #8B7355 !important;
}


/* ============================================
   菜单栏布局样式（确保不换行）
   ============================================ */
body.category-page .home-header {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.3rem !important;
    justify-content: space-between !important;
    align-items: center !important;
}

body.category-page .home-header .logo {
    display: flex !important;
    align-items: center !important;
    margin-right: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

body.category-page .home-header .logo div {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

body.category-page .home-header .logo a {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

body.category-page .home-nav {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    margin-right: auto !important;
    flex: 0 0 auto !important;
    min-width: fit-content;
}

body.category-page .home-nav ul {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

body.category-page .home-nav li {
    flex-shrink: 0;
    white-space: nowrap;
}

body.category-page .header-controls {
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
    gap: 0 !important;
    margin-left: 0.5rem !important;
    display: flex !important;
    align-items: center !important;
}

body.category-page .header-controls .language-toggle,
body.category-page .header-controls .theme-toggle {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    margin: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

body.category-page .header-controls .language-toggle {
    margin-right: 2px !important;
}

body.category-page .idiom-search-form {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

body.category-page .idiom-search-input {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 200px;
    min-width: 120px;
    outline: none;
    flex-shrink: 1;
    height: auto;
    line-height: 1.5;
    box-sizing: border-box;
}

body.category-page .idiom-search-input:focus {
    border-color: #2563eb;
}

body.category-page .idiom-search-btn {
    padding: 0.4rem 1rem;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-shrink: 0;
    white-space: nowrap;
    height: auto;
    line-height: 1.5;
    box-sizing: border-box;
}

body.category-page .idiom-search-btn:hover {
    background-color: #1d4ed8;
}

/* 页面主体搜索框样式 */
.main-search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.main-search-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.main-search-input:focus {
    border-color: #2563eb;
}

.main-search-btn {
    padding: 0.6rem 1.5rem;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.main-search-btn:hover {
    background-color: #1d4ed8;
}

/* 成语列表样式（仅用于成语页面，不影响书库页面） */
body.category-page .book-list:not(.shuku-book-list) .book-list-item {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: none !important;
    background: transparent !important;
    border: none !important;
}

body.category-page .book-list:not(.shuku-book-list) .book-list-item:hover {
    background-color: transparent !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
    box-shadow: none !important;
}

body.category-page .book-list:not(.shuku-book-list) .book-list-link {
    border: 1px solid transparent;
    box-sizing: border-box;
}

body.category-page .book-list:not(.shuku-book-list) .book-list-link:hover {
    color: #2563eb;
    border-color: transparent;
}

body.category-page .book-list:not(.shuku-book-list) .book-list-link:hover span {
    color: #2563eb;
}

/* ============================================
   通用样式覆盖
   ============================================ */
.breadcrumb-nav,
body.category-page .breadcrumb-nav {
    background: transparent !important;
    border: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding: 0.3rem 1rem !important;
    position: relative;
}

.breadcrumb-nav::after,
body.category-page .breadcrumb-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.8rem;
    right: 0.8rem;
    height: 1px;
    background: #E0E0E0;
}


/* 导航栏链接颜色 - 章节页面 */
body.category-page.chapter-page .category-hero .hero-text h2 a,
.chapter-page .category-hero .hero-text h2 a {
    color: #60a5fa !important;
    text-decoration: none !important;
}

body.category-page.chapter-page .category-hero .hero-text h2 a:hover,
.chapter-page .category-hero .hero-text h2 a:hover {
    color: #3b82f6 !important;
    text-decoration: underline !important;
}

/* 面包屑导航区域（home-hero.category-hero）- 去掉边框，靠左对齐 */
/* 使用最高优先级选择器确保覆盖 style.css */
body.category-page.chapter-page .home-hero.category-hero,
body.category-page.chapter-page .category-hero,
body.category-page .home-hero.category-hero,
body.category-page .category-hero,
.chapter-page .home-hero.category-hero,
.chapter-page .category-hero {
    border: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 0 !important;
}

/* 确保章节页面的category-content没有边框 */
body.category-page.chapter-page .category-content,
.chapter-page .category-content,
body.category-page .category-content {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
}

/* 确保category-layout没有边框 */
body.category-page.chapter-page .category-layout,
.chapter-page .category-layout,
body.category-page .category-layout {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
}

/* 确保category-main没有边框 */
body.category-page.chapter-page .category-main,
.chapter-page .category-main {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

body.category-page .home-hero.category-hero .hero-text,
body.category-page .category-hero .hero-text {
    padding-left: 0 !important;
    text-align: left !important;
}

body.category-page .home-header,
body.home-body .home-header {
    background: #fff !important;
    padding: 4px 20px !important;
    border-bottom: 1px solid #E0E0E0 !important;
    box-shadow: none !important;
    position: relative !important;
}

/* 统一 logo 样式 */
body.category-page .home-header .logo,
body.home-body .home-header .logo {
    display: flex !important;
    align-items: center !important;
    margin-right: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

body.category-page .home-header .logo div,
body.home-body .home-header .logo div {
    margin: 0 !important;
    font-size: 21px !important;
    color: #333 !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

/* 统一导航链接样式 */
body.category-page .home-nav a,
body.home-body .home-nav a {
    padding: 4px 8px !important;
    font-size: 15px !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    background-color: #f8f9fa !important;
}

body.category-page .home-nav a:hover,
body.home-body .home-nav a:hover {
    color: #2563eb !important;
    text-decoration: underline !important;
    text-underline-offset: 1px !important;
    text-decoration-thickness: 1px !important;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 768px) {
    .guoxue-search-section {
        padding: 1.5rem 0.5rem 1rem;
    }
    .today-word-char {
        font-size: 3rem;
    }
    .guoxue-search-input {
        padding: 0.75rem 3rem 0.75rem 1rem;
        font-size: 0.95rem;
    }
    .guoxue-search-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    /* 菜单栏响应式 - 统一首页和字典页样式 */
    .home-header,
    body.category-page .home-header,
    body.home-body .home-header {
        gap: 0.2rem !important;
        padding: 6px 8px !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .home-header .logo,
    body.category-page .home-header .logo,
    body.home-body .home-header .logo {
        margin-right: 0.2rem !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    
    .home-header .logo div,
    body.category-page .home-header .logo div,
    body.home-body .home-header .logo div {
        font-size: 21px !important;
        gap: 0.15rem !important;
        display: flex;
        align-items: center;
    }
    
    .home-header .logo a,
    body.category-page .home-header .logo a,
    body.home-body .home-header .logo a {
        gap: 0.15rem !important;
        display: flex;
        align-items: center;
    }
    
    .home-header .logo div a,
    body.category-page .home-header .logo div a,
    body.home-body .home-header .logo div a {
        font-size: 21px !important;
    }
    
    .home-nav,
    body.category-page .home-nav,
    body.home-body .home-nav {
        gap: 0.2rem !important;
        margin-right: 0.2rem !important;
        display: flex !important;
        align-items: center !important;
        min-width: fit-content;
        flex-shrink: 0;
    }
    
    .home-nav ul,
    body.category-page .home-nav ul,
    body.home-body .home-nav ul {
        gap: 0.6rem !important;
        display: flex;
        align-items: center;
        margin: 0;
        padding: 0;
        list-style: none;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }
    
    .home-nav ul li,
    body.category-page .home-nav ul li,
    body.home-body .home-nav ul li {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .home-header .home-nav a,
    body.category-page .home-header .home-nav a,
    body.home-body .home-header .home-nav a {
        font-size: 15px !important;
        padding: 4px 6px !important;
        background-color: #f8f9fa !important;
    }
    
    .home-nav ul li:not(:last-child)::after,
    body.category-page .home-nav ul li:not(:last-child)::after,
    body.home-body .home-nav ul li:not(:last-child)::after {
        content: none !important;
    }
    
    body.category-page .idiom-search-input {
        width: 90px;
        min-width: 70px;
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
        height: 32px;
        line-height: 1.5;
    }
    
    body.category-page .idiom-search-btn {
        padding: 0.25rem 0.4rem !important;
        font-size: 0.75rem !important;
        min-width: auto !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.5 !important;
        box-sizing: border-box !important;
    }
    
    body.category-page .header-controls {
        gap: 0 !important;
        margin-left: 0.2rem !important;
    }
    
    body.category-page .header-controls .language-toggle,
    body.category-page .header-controls .theme-toggle {
        width: 26px !important;
        height: 26px !important;
        font-size: 11px !important;
        margin: 0 !important;
    }
    
    body.category-page .header-controls .language-toggle {
        margin-right: 1px !important;
    }
    
    body.category-page .idiom-search-input {
        width: 140px;
        min-width: 120px;
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
        height: auto;
        line-height: 1.5;
    }
    
    body.category-page .idiom-search-btn {
        padding: 0.25rem 0.4rem !important;
        font-size: 0.75rem !important;
        min-width: auto !important;
        height: auto !important;
        line-height: 1.5 !important;
        box-sizing: border-box !important;
    }
    
    .main-search-form {
        max-width: 100%;
        margin: 0 auto 1rem;
    }
    
    .main-search-input {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .main-search-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   成语详情页样式
   ============================================ */
/* 确保国学风格生效 - 覆盖可能冲突的样式 */
body.category-page {
    background: #fff !important;
    font-family: 'STSong', 'SimSun', 'Songti SC', 'NSimSun', serif !important;
    position: relative !important;
}

/* 移除宣纸背景效果，使用纯白底 */
body.category-page::before {
    display: none !important;
}

.category-main {
    position: relative !important;
    z-index: 1 !important;
    background: transparent !important;
}

/* 成语详情页主体 */
.idiom-detail {
    width: 100%;
    margin: 0;
    padding: 0.05rem 0 0.5rem 0;
    font-family: 'STSong', 'SimSun', 'Songti SC', 'NSimSun', serif;
}

/* 移除主体部分边框 */
.home-content {
    border: none !important;
    box-shadow: none !important;
}

/* 成语标题区域 */
.idiom-header {
    margin-bottom: 0.3rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #E0E0E0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0;
}
.idiom-header h1 {
    margin-top: 0;
    margin-bottom: 0;
}

.idiom-word {
    font-size: 2rem;
    font-weight: bold;
    color: #B22C24;
    margin-bottom: 0;
    display: inline-block;
    letter-spacing: 0.1em;
    line-height: 1.3;
    vertical-align: middle;
    flex: 0 0 auto;
    white-space: nowrap;
    font-family: 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', 'STSong', 'SimSun', 'Songti SC', serif;
}

.idiom-pinyin-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0;
    vertical-align: middle;
    flex: 0 0 auto;
    white-space: nowrap;
}

.idiom-pinyin {
    font-size: 0.95rem;
    color: #2e7d32;
    display: inline-block;
    font-weight: 500;
    letter-spacing: 0.05em;
    font-family: 'DejaVu Sans', 'Liberation Sans', 'Arial Unicode MS', Arial, sans-serif;
}

.idiom-zhuyin-content {
    color: #2e7d32 !important;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    font-family: 'DejaVu Sans', 'Liberation Sans', 'Arial Unicode MS', Arial, sans-serif;
}

/* 音频按钮 */
.idiom-audio-btn {
    background: #2196F3;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.idiom-audio-btn:hover {
    background: #1976D2;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.idiom-audio-btn:active {
    transform: scale(0.95);
}

.idiom-audio-btn.playing {
    background: #f44336;
    animation: pulse 1s infinite;
}

.idiom-audio-btn.playing:hover {
    background: #d32f2f;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
    }
}

.audio-icon {
    font-size: 16px;
    line-height: 1;
}

/* 成语内容区域 */
.idiom-section {
    margin-bottom: 0.2rem;
    line-height: 2;
    font-size: 0.9rem;
    padding: 0.05rem 0;
}

.idiom-section h3 {
    font-weight: 600;
    color: #2C2C2C;
    margin-right: 0.8rem;
    font-size: 0.95rem;
    display: inline-block;
    vertical-align: top;
    margin-top: 0;
    margin-bottom: 0;
    line-height: 2;
}

.idiom-section-label {
    font-weight: 600;
    color: #2C2C2C;
    margin-right: 0.8rem;
    font-size: 0.95rem;
    display: inline-block;
    vertical-align: top;
}

.idiom-section-content {
    color: #414656;
    display: inline;
    line-height: 2;
    letter-spacing: 0.02em;
    font-family: 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', 'STSong', 'SimSun', 'Songti SC', serif;
}

/* 英文内容使用 DejaVu Sans / Liberation Sans */
.idiom-english-section .idiom-section-content {
    font-family: 'DejaVu Sans', 'Liberation Sans', 'Arial Unicode MS', Arial, sans-serif;
}

.idiom-section-content.idiom-zhuyin-content {
    color: #2e7d32 !important;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    font-family: 'DejaVu Sans', 'Liberation Sans', 'Arial Unicode MS', Arial, sans-serif;
}

.idiom-section-content .fontred,
.idiom-section-content span.fontred {
    color: #B22C24 !important;
    font-weight: 500;
}

.idiom-section-content ul {
    display: inline;
    padding: 0;
    margin: 0;
}

.idiom-section-content li {
    display: inline;
    margin-right: 0.8rem;
}

.idiom-section-content li:not(:last-child)::after {
    content: "、";
    margin-left: 0.2rem;
}

/* 深度解析区域 */
.idiom-jiexi {
    margin-top: 0.3rem;
    padding-top: 0.3rem;
    border-top: 2px solid #E0E0E0;
}

.idiom-jiexi h2 {
    font-size: 1.2rem;
    color: #2C2C2C;
    margin-bottom: 0.3rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.05em;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid #E0E0E0;
    font-family: 'KaiTi', '楷体', serif;
}

.idiom-jiexi h3 {
    font-size: 1rem;
    color: #2C2C2C;
    margin-top: 0.3rem;
    margin-bottom: 0.2rem;
    margin-right: 0.8rem;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.03em;
    display: inline-block;
    vertical-align: top;
}

.idiom-jiexi p {
    line-height: 2.2;
    color: #414656;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-align: justify;
    font-family: 'Noto Serif CJK SC', 'Source Han Serif SC', 'Source Han Serif CN', 'STSong', 'SimSun', 'Songti SC', serif;
}

.idiom-highlight {
    color: #B22C24;
    font-weight: 500;
}

.fontred {
    color: #c62828 !important;
    font-weight: 500;
}

.idiom-jiexi .fontred,
.idiom-jiexi span.fontred {
    color: #c62828 !important;
    font-weight: 500;
}

/* 优化链接样式 */
.idiom-section-content a,
.idiom-jiexi a {
    color: #1976d2;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.idiom-section-content a:hover,
.idiom-jiexi a:hover {
    color: #1565c0;
    border-bottom-color: #1565c0;
}

/* 古籍用例区域 */
.idiom-guji-section {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 2px solid #e8e8e8;
}

.idiom-guji-section h2 {
    font-size: 1.05rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.05em;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #e8e8e8;
}

.idiom-guji-section h2 span {
    font-size: 0.85rem;
    font-weight: normal;
    color: #666;
    margin-left: 0.25rem;
}

.guji-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.guji-item {
    padding: 0.8rem;
    background-color: #f9f9f9;
    border-radius: 0;
    border-left: 3px solid #c62828;
    margin: 0;
}

.guji-item:not(:first-child) {
    border-top: 1px solid #d0d0d0;
}

.guji-item-hidden {
    display: none !important;
}

.guji-book-hidden {
    display: none !important;
}

.guji-header {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guji-header span:not(.guji-book-name):not(.guji-chapter-name) {
    color: #666;
    margin: 0 0.3rem;
}

.guji-book-expand-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.guji-book-expand-btn:hover {
    background-color: #e0e0e0 !important;
}

.guji-content {
    margin-bottom: 0.5rem;
    line-height: 1.8;
    color: #2c2c2c;
    font-size: 0.9rem;
}

.guji-content span[style*="font-weight: 600"] {
    display: inline !important;
    white-space: nowrap !important;
}

.guji-link {
    margin-top: 0.3rem;
    text-align: right;
}

.guji-link a {
    color: #1976d2;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.guji-link a:hover {
    border-bottom-color: #1976d2;
}

.guji-expand-all-control {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    background-color: #fff;
    border-top: 2px solid #e0e0e0;
    border-bottom: 2px solid #e0e0e0;
}

.guji-expand-all-control a {
    display: inline-block;
    background-color: #1976d2;
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.guji-expand-all-control a:hover {
    background-color: #1565c0 !important;
}

/* 编辑整理区域 */
.idiom-section.idiom-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e8e8e8;
    text-align: right;
    color: #666;
    font-size: 0.85rem;
}

/* 侧边栏推荐书籍 */
.home-sidebar .ranking-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.home-sidebar .ranking-list li {
    margin: 0 0 0.75rem 0;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.75rem;
}

.home-sidebar .ranking-list li:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.home-sidebar .ranking-list li::before {
    content: none !important;
}

.home-sidebar .ranking-list a {
    color: #1976d2;
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

.home-sidebar .ranking-list a:hover {
    opacity: 0.8;
}

/* 热门排行标题下方线条 - 浅灰色，高优先级 */
.home-sidebar .sidebar-section h4 {
    border-bottom: 2px solid #f0f0f0 !important;
}

/* 响应式设计 - 成语详情页 */
@media (max-width: 768px) {
    /* 移动端成语详情页优化 */
    .idiom-header {
        display: flex;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0.3rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .idiom-word {
        font-size: 1.3rem !important;
        flex: 0 0 auto;
        white-space: nowrap;
        line-height: 1.2;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .idiom-pinyin-wrapper {
        margin-left: 0 !important;
        gap: 0.25rem;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        flex-wrap: nowrap;
        min-width: 0;
    }
    
    .idiom-pinyin {
        font-size: 0.8rem;
        color: #2e7d32;
        white-space: nowrap;
        flex-shrink: 1;
        min-width: 0;
        font-family: 'DejaVu Sans', 'Liberation Sans', 'Arial Unicode MS', Arial, sans-serif;
    }
    
    .idiom-section-content.idiom-zhuyin-content {
        color: #2e7d32 !important;
        font-size: 0.8rem;
        font-weight: 500;
        letter-spacing: 0.05em;
        font-family: 'DejaVu Sans', 'Liberation Sans', 'Arial Unicode MS', Arial, sans-serif;
    }
    
    .idiom-audio-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
        box-sizing: border-box;
    }
    
    .audio-icon {
        font-size: 18px;
    }
}

/* ============================================
   汉字详情页样式
   ============================================ */
/* 汉字详情页 - 导航栏和面包屑导航线条颜色 */
body.category-page .home-header {
    border-bottom: 1px solid #E0E0E0 !important;
}

/* 汉字详情页 - 面包屑导航：使用 ::after 伪元素显示下划线，左右留间隔 */
body.category-page .breadcrumb-nav {
    border-bottom: none !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* 汉字详情页 - 使用 ::after 伪元素显示下划线，左右留间隔 */
body.category-page .breadcrumb-nav::after {
    display: block !important;
    left: 0.8rem !important;
    right: 0.8rem !important;
}

/* 汉字详情页 - 主体区域线条颜色 */
body.category-page .homophones-sidebar {
    border-color: #E0E0E0 !important;
}

body.category-page .homophones-sidebar-title {
    border-bottom-color: #E0E0E0 !important;
}

body.category-page .word-section-title {
    border-bottom-color: #E0E0E0 !important;
}

body.category-page .word-subsection-title {
    border-bottom-color: #E0E0E0 !important;
}

/* ============================================
   汉字详情页特定样式（从 word-detail.css 合并）
   ============================================ */
/* 确保页面背景为纯白色 */
body.category-page {
    background: #fff !important;
}
body.category-page::before {
    display: none !important;
}
.category-main {
    background: #fff !important;
}

.word-detail-wrapper {
    max-width: none;
    margin: 0;
    padding: 0.2rem 0 1rem 0;
    background: #fff;
    width: 100%;
}
/* 移动端：减少左右padding */
@media (max-width: 968px) {
    .word-detail-wrapper {
        padding: 0.2rem 0.3rem 1rem 0.3rem;
    }
    .word-section {
        padding: 1rem 0.8rem;
    }
}
/* 默认：桌面端横向布局 */
.word-detail-main {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 2rem;
    margin-top: 0.2rem;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}
.word-detail-left,
article.word-detail-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
    display: block !important;
    order: 1 !important;
}
.word-detail-right,
aside.word-detail-right {
    flex: 0 0 280px !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    display: block !important;
    order: 2 !important;
}
/* 移动端：纵向布局 */
@media (max-width: 968px) {
    .word-detail-main {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .word-detail-left,
    article.word-detail-left {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        order: 1 !important;
    }
    .word-detail-right,
    aside.word-detail-right {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        order: 2 !important;
    }
}
/* 同音字/同部首侧边栏样式 - 国学风格 */
.homophones-sidebar {
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 0;
    padding: 0.8rem;
    margin-bottom: 1rem;
}
.homophones-sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2C2C2C;
    margin: 0 0 0.6rem 0;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #E0E0E0;
    text-align: center;
    font-family: 'KaiTi', '楷体', serif;
}
.homophones-sidebar-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem 0.2rem;
    padding: 0.2rem 0;
}
.homophones-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: nowrap;
    padding: 0.1rem 0;
}
.homophones-bullet {
    color: #999;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.homophones-char {
    color: #2563eb;
    text-decoration: none;
    font-weight: normal;
    flex-shrink: 0;
}
.homophones-char:hover {
    text-decoration: underline;
    color: #1e40af;
}
.homophones-pinyin {
    color: #8B7355;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.word-header-box {
    background: #fff;
    border: none;
    border-radius: 0;
    padding: 0.8rem 1.2rem;
    margin-bottom: 0.3rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    border-left: 4px solid #CCCCCC;
}
.word-char-left {
    flex-shrink: 0;
    text-align: center;
}
.word-char-display {
    font-size: 6rem;
    font-weight: bold;
    margin: 0 0 1rem 0;
    color: #333;
    line-height: 1;
}
.word-char-grid {
    display: inline-block;
    width: 150px;
    height: 150px;
    border: 1px dashed #d32f2f;
    margin: 0;
    position: relative;
    background: #fff;
    box-sizing: border-box;
    /* 米字格：参考康熙字典样式，颜色改为红色 */
    background-image: 
        /* 对角线：从左上到右下 */
        linear-gradient(135deg, transparent calc(50% - 0.5px), #d32f2f calc(50% - 0.5px), #d32f2f calc(50% + 0.5px), transparent calc(50% + 0.5px)),
        /* 对角线：从右上到左下 */
        linear-gradient(45deg, transparent calc(50% - 0.5px), #d32f2f calc(50% - 0.5px), #d32f2f calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.word-char-grid::before {
    /* 竖线（虚线，红色） */
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 100%;
    border-left: 1px dashed #d32f2f;
    transform: translateX(-50%);
}
.word-char-grid::after {
    /* 横线（虚线，红色） */
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 0;
    border-top: 1px dashed #d32f2f;
    transform: translateY(-50%);
}
.word-char-grid h1 {
    margin-top: 0;
    margin-bottom: 0;
}
.word-char-grid-inner {
    font-size: 6rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    color: #2C2C2C;
    font-weight: 600;
    font-family: 'KaiTi', '楷体', serif;
    transition: opacity 0.3s ease;
}
.word-char-grid-inner.hidden {
    opacity: 0;
}
.stroke-animation-img-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.stroke-animation-img-container.show {
    display: flex;
}
.stroke-animation-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.stroke-animation-play-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 32px;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.9);
    border: 2px solid #000000;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.stroke-animation-play-btn:hover {
    background-color: rgba(0, 0, 0, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.stroke-animation-play-btn::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 10px solid #fff;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    margin-left: 2px;
}
.stroke-animation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.stroke-animation-modal.show {
    display: flex;
}
.stroke-animation-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.stroke-animation-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stroke-animation-close:hover {
    background-color: #b71c1c;
}
.stroke-animation-img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}
.word-meta-right {
    flex: 1;
}
.word-meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.word-meta-list-item {
    display: flex;
    align-items: baseline;
    line-height: 1.3;
    flex-wrap: wrap;
}
.word-meta-list-label {
    color: #8B7355;
    font-weight: normal;
    flex-shrink: 0;
    margin-right: 0.3rem;
    font-size: 0.9rem;
}
.word-meta-list-value {
    color: #2C2C2C;
    font-weight: 600;
    font-size: 0.9rem;
}
.word-meta-list-value .pinyin-display {
    display: inline-block;
    color: #333;
    font-size: 1em;
}
.word-meta-list-item-inline {
    display: inline;
    white-space: nowrap;
}
.word-meta-list-item-inline .word-meta-list-label {
    margin-right: 0.3rem;
}
.word-meta-list-item-inline .word-meta-list-value {
    margin-right: 1.2rem;
}
.word-meta-item {
    text-align: center;
}
.word-meta-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.3rem;
}
.word-meta-value {
    font-size: 1rem;
    font-weight: bold;
    color: #2563eb;
}
.word-section {
    background: #fff;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0.05rem;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.word-section-basic {
    background: #fff;
    padding: 0.3rem 2rem 0.3rem 0.8rem;
    border-radius: 0;
    border: none;
    border-left: 4px solid #CCCCCC;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.word-section-detailed {
    background: #fff;
    padding: 1.2rem 2.5rem 1.2rem 0.8rem;
    border-radius: 0;
    border: none;
    border-left: 4px solid #CCCCCC;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.word-section-pos {
    background: #fff;
    padding: 1.2rem 2.5rem 1.2rem 0.8rem;
    border-radius: 0;
    border: none;
    border-left: 4px solid #CCCCCC;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.word-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2C2C2C;
    margin: 0 0 0.05rem 0;
    padding-bottom: 0.05rem;
    border-bottom: 2px solid #E0E0E0;
    font-family: 'KaiTi', '楷体', serif;
    display: block;
}
h2.word-section-title .word-title-char,
.word-section-title .word-title-char {
    font-size: 1.5rem !important;
    margin-right: 0.08rem !important;
    display: inline-block;
    vertical-align: baseline;
}
.word-section-title:first-child {
    margin-top: 0;
}
.word-subsection-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C2C2C;
    margin: 0.3rem 0 0.3rem 0;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #E0E0E0;
    font-family: 'KaiTi', '楷体', serif;
}
.word-subsection-title:first-child {
    margin-top: 0;
}
/* 国语释义样式 */
.guoyu-pos-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.3rem;
    gap: 1rem;
}
.guoyu-pos-label {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #B22C24;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0;
    margin-top: 0.2rem;
}
.guoyu-pos-content {
    flex: 1;
    min-width: 0;
}
.guoyu-definition-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: definition-counter;
}
.guoyu-pos-group .guoyu-definition-list {
    counter-reset: definition-counter;
}
.guoyu-definition-item {
    margin: 0.2rem 0;
    line-height: 1.8;
    color: #333;
    font-size: 0.95rem;
    position: relative;
    padding-left: 2rem;
}
.guoyu-definition-item::before {
    content: counter(definition-counter) ".";
    counter-increment: definition-counter;
    position: absolute;
    left: 0;
    color: #333;
    font-weight: normal;
    font-size: 0.95rem;
}
.basic-explanation-item {
    margin: 0.5rem 0;
    line-height: 1.8;
    color: #2C2C2C;
    font-size: 0.95rem;
    position: relative;
    max-width: none;
    width: 100%;
}
/* 主项（●开头的独立部分） */
.basic-explanation-main {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: normal;
    padding-left: 0;
}
.basic-explanation-main:first-child {
    margin-top: 0;
}
/* 子项（◎开头的下面的内容） */
.basic-explanation-sub {
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    padding-left: 1.5rem;
    color: #555;
    font-size: 0.9rem;
    position: relative;
}
.basic-explanation-sub::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.6rem;
    width: 0.5rem;
    height: 1px;
    background: #ccc;
}
.basic-explanation-item:not(.basic-explanation-main):not(.basic-explanation-sub) {
    padding-left: 0;
}
.basic-explanation-item:first-child:not(.basic-explanation-main):not(.basic-explanation-sub) {
    margin-top: 0;
    font-weight: normal;
    font-size: 0.95rem;
}
.basic-explanation-list {
    /* 编号已移除 */
}
.basic-explanation-item strong {
    color: #2563eb;
    font-weight: bold;
}
.english-translation {
    margin: 0.2rem 0;
    padding: 0.4rem;
    background: #fff;
    border: none;
    border-left: 4px solid #CCCCCC;
    border-radius: 0;
    font-size: 1rem;
    color: #2C2C2C;
    max-width: none;
    width: 100%;
    box-sizing: border-box;
}
.detailed-explanation-item {
    margin: 0.5rem 0;
    line-height: 1.8;
    color: #2C2C2C;
    font-size: 0.95rem;
    max-width: none;
    width: 100%;
}
/* ◎ 开头的内容加粗显示 */
.detailed-explanation-bold {
    font-weight: bold;
}
.detailed-explanation-item strong {
    color: #B22C24;
    font-weight: 600;
}
/* 词性标签红色样式 */
.detailed-explanation-item .pos-tag {
    display: inline-block;
    background-color: #B22C24;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.2rem 0.4rem;
    margin-right: 0.5rem;
    border-radius: 0;
    vertical-align: middle;
}
.detailed-explanation-item:first-child {
    margin-top: 0;
}
.part-of-speech-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #e3f2fd;
    color: #2563eb;
    border-radius: 4px;
    font-size: 0.9rem;
    margin: 0.3rem 0.3rem 0.3rem 0;
    font-weight: normal;
}
.words-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.2rem;
}
.word-item {
    padding: 0.3rem 0;
    background: transparent;
    border-radius: 0;
    border-left: none;
}
.word-item-name {
    font-weight: 600;
    color: #2C2C2C;
    font-size: 1rem;
    margin-right: 0.5rem;
    display: inline;
}
.word-item-pinyin {
    color: #8B7355;
    font-size: 0.9rem;
    display: inline;
}
.word-item-explanation {
    color: #414656;
    line-height: 1.8;
}
.homophones-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.2rem;
}
.homophone-item {
    padding: 0.3rem 0.6rem;
    background: #e3f2fd;
    border-radius: 4px;
    color: #64b5f6;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
}
.homophone-item:hover {
    background: #bbdefb;
}
.homophone-strokes {
    color: #666;
    font-size: 0.85rem;
    margin-left: 0.3rem;
    font-weight: normal;
}
.shuowen-text {
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    line-height: 2.2;
    color: #333;
    font-size: 0.95rem;
}
.shuowen-inline-image {
    display: inline-block;
    vertical-align: middle;
    margin: 0 0.2em;
}
.shuowen-inline-image img {
    vertical-align: middle;
    max-height: 2em;
    min-height: 1.2em;
    display: inline-block !important;
    width: auto;
    height: auto;
}
.kangxi-container {
    margin: 0.5rem 0;
    width: 100%;
    max-width: none;
    overflow: hidden;
    box-sizing: border-box;
}
.word-section .kangxi-container:last-child {
    margin-bottom: 0;
}
.kangxi-container::after {
    content: '';
    display: table;
    clear: both;
}
.kangxi-image-wrapper {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
}
.kangxi-image-wrapper .shuowen-image-grid {
    margin: 0;
}
.kangxi-text {
    line-height: 2.2;
    color: #333;
    font-size: 0.95rem;
    word-wrap: break-word;
    text-align: justify;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.shuowen-image-wrapper {
    text-align: center;
    margin: 0.2rem 0;
    position: relative;
    display: inline-block;
}
.shuowen-image-grid {
    display: inline-block;
    position: relative;
    border: 1px dashed #d0d0d0;
    box-sizing: border-box;
    background: #fff;
    width: 150px;
    height: 150px;
    /* 米字格：单条对角线 */
    background-image: 
        linear-gradient(135deg, transparent calc(50% - 0.5px), #d0d0d0 calc(50% - 0.5px), #d0d0d0 calc(50% + 0.5px), transparent calc(50% + 0.5px)),
        linear-gradient(45deg, transparent calc(50% - 0.5px), #d0d0d0 calc(50% - 0.5px), #d0d0d0 calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.shuowen-image-grid::before {
    /* 竖线（虚线） */
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 100%;
    border-left: 1px dashed #d0d0d0;
    transform: translateX(-50%);
}
.shuowen-image-grid::after {
    /* 横线（虚线） */
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 0;
    border-top: 1px dashed #d0d0d0;
    transform: translateY(-50%);
}
.shuowen-image-grid img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
}
.etymology-images {
    display: flex;
    gap: 0.5rem;
    margin: 0.2rem 0;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.etymology-item {
    text-align: left;
    flex: 0 0 auto;
    min-width: 120px;
}
.etymology-item-grid {
    display: inline-block;
    position: relative;
    border: 2px solid #d32f2f;
    box-sizing: border-box;
    background: #fff;
    /* 米字格：使用背景图实现所有线条 */
    background-image: 
        /* 竖线 */
        linear-gradient(to right, transparent calc(50% - 0.5px), #d32f2f calc(50% - 0.5px), #d32f2f calc(50% + 0.5px), transparent calc(50% + 0.5px)),
        /* 横线 */
        linear-gradient(to bottom, transparent calc(50% - 0.5px), #d32f2f calc(50% - 0.5px), #d32f2f calc(50% + 0.5px), transparent calc(50% + 0.5px)),
        /* 对角线：从左上到右下 */
        linear-gradient(135deg, transparent calc(50% - 0.5px), #d32f2f calc(50% - 0.5px), #d32f2f calc(50% + 0.5px), transparent calc(50% + 0.5px)),
        /* 对角线：从右上到左下 */
        linear-gradient(45deg, transparent calc(50% - 0.5px), #d32f2f calc(50% - 0.5px), #d32f2f calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.etymology-item-grid img {
    max-width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}
.etymology-item-label {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

/* Header样式 */
.word-detail-header {
    background: #fff;
    border-bottom: 1px solid #E0E0E0;
}
.word-detail-header-link {
    color: #2C2C2C;
}

/* Breadcrumb样式 */
.word-detail-breadcrumb {
    background: transparent;
    border-bottom: 1px solid #E0E0E0;
    padding-left: 1rem;
    padding-right: 1rem;
}
.word-detail-breadcrumb-link {
    color: #8B7355;
}
.word-detail-breadcrumb-separator {
    color: #8B7355;
}
.word-detail-breadcrumb-current {
    color: #2C2C2C;
}

/* 查看更多按钮样式 */
.word-detail-more-wrapper {
    margin-top: 1rem;
    text-align: center;
}
.word-detail-more-link {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: #2563eb;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}
.word-detail-more-link:hover {
    background-color: #1e40af;
}

/* 说文解字文本样式 */
.shuowen-text-bold {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.shuowen-text-margin-top {
    margin-top: 0.5rem;
}

/* 康熙字典word-meta-list样式 */
.word-meta-list-margin-bottom {
    margin-bottom: 0.5rem;
}

/* 旧格式pronunciations样式 */
.word-pronunciation-block {
    margin: 2rem 0;
}
.word-pronunciation-pinyin {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 1rem;
}
.word-explanation-block {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-left: 4px solid #2563eb;
    border-radius: 4px;
}
.word-explanation-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1rem;
}
.word-explanation-detail-wrapper {
    margin: 1rem 0;
    padding-left: 1rem;
}
.word-explanation-detail-item {
    margin: 0.8rem 0;
    line-height: 1.8;
    color: #555;
    padding-left: 1.5rem;
    position: relative;
}
.word-explanation-detail-bullet {
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    background: #2563eb;
    border-radius: 50%;
}
.word-explanation-detail-book {
    color: #999;
    font-size: 0.9rem;
    margin-left: 0.5rem;
    font-style: italic;
}
.word-explanation-words-wrapper {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}
.word-explanation-words-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.8rem;
}
.word-explanation-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.word-explanation-word-item {
    padding: 0.4rem 0.8rem;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 0.95rem;
}
.word-explanation-word-name {
    font-weight: bold;
    color: #2563eb;
    margin-right: 0.3rem;
}
.word-explanation-word-text {
    color: #666;
}

@media (max-width: 968px) {
    .word-detail-main {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
    }
    .word-detail-left,
    article.word-detail-left {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        order: 1 !important;
    }
    .word-detail-right,
    aside.word-detail-right {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        order: 2 !important;
    }
    .word-header-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .word-char-left {
        margin-bottom: 1.5rem;
    }
    .word-char-grid {
        width: 120px;
        height: 120px;
    }
    .word-char-grid-inner {
        font-size: 5rem;
    }
    .word-meta-right {
        width: 100%;
    }
    .word-meta-list {
        gap: 0.3rem 1.5rem;
        justify-content: flex-start;
    }
    .word-meta-list-item {
        justify-content: flex-start;
    }
    /* 移动端：国语释义部分，词性单独占一行 */
    .guoyu-pos-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    .guoyu-pos-label {
        width: auto;
        height: auto;
        padding: 0.3rem 0.6rem;
        margin-top: 0;
    }
    .guoyu-pos-content {
        width: 100%;
    }
    .guoyu-definition-item {
        word-wrap: break-word;
        word-break: break-all;
        white-space: normal;
    }
}

/* 词典详情页（词语详情页）特定样式 */
.word-chars-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 0.2rem;
}
.word-char-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1rem;
    border: 2px dashed #CCCCCC;
    border-radius: 0;
    background: #fff;
    min-width: 80px;
    text-align: center;
    transition: all 0.3s;
}
.word-char-block:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}
.word-char-pinyin {
    font-size: 0.9rem;
    color: #8B7355;
    font-weight: normal;
    margin-bottom: 0.3rem;
    line-height: 1.2;
}
.word-char-link {
    text-decoration: none;
    color: #2563eb;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'KaiTi', '楷体', serif;
    display: block;
    line-height: 1.2;
}
.word-char-link:hover {
    color: #1e40af;
    text-decoration: underline;
}
.word-char-no-link {
    color: #2C2C2C;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'KaiTi', '楷体', serif;
    display: block;
    line-height: 1.2;
    cursor: default;
}
.related-idioms-list {
    margin-top: 0.2rem;
    line-height: 1.6;
    font-size: 1rem;
}
.related-idiom-link {
    color: #2563eb;
    text-decoration: none;
    margin: 0 0.2rem;
    transition: color 0.2s;
}
.related-idiom-link:hover {
    color: #1e40af;
    text-decoration: underline;
}
.idiom-separator {
    color: #8B7355;
    margin: 0 0.3rem;
    font-weight: normal;
}
.word-content {
    line-height: 1.8;
    color: #2C2C2C;
    font-size: 1rem;
    margin-top: 0.1rem;
    max-width: none;
}
.word-content a {
    color: #2563eb;
    text-decoration: none;
}
.word-content a:hover {
    color: #1e40af;
    text-decoration: underline;
}
.word-source {
    margin-top: 0.2rem;
    padding: 0.5rem 0.8rem;
    background: #fff;
    border-left: 4px solid #8B7355;
    border-radius: 0;
}
.word-source-text {
    font-style: italic;
    color: #414656;
    margin-bottom: 0.2rem;
}
.word-source-book {
    color: #8B7355;
    font-size: 0.9rem;
}

/* 移动端汉堡菜单：本文件上文对 body.home-body .home-nav 等使用了 display:flex !important，会压过 style.css；
   顶栏第二行保留全站搜索，繁简/主题仍在抽屉内。 */
@media (max-width: 768px) {
    body.home-body .home-header,
    body.category-page .home-header,
    .home-header {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }

    body.home-body .home-header .header-controls,
    body.category-page .home-header .header-controls,
    .home-header .header-controls {
        display: flex !important;
        flex: 1 1 100% !important;
        width: 100% !important;
        order: 4;
        margin-left: 0 !important;
        padding: 8px 0 0 !important;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        gap: 8px;
        flex-wrap: wrap;
        justify-content: stretch;
        align-items: center;
        min-width: 0;
    }

    body.home-body .home-header .header-controls .language-toggle,
    body.home-body .home-header .header-controls .theme-toggle,
    body.category-page .home-header .header-controls .language-toggle,
    body.category-page .home-header .header-controls .theme-toggle,
    .home-header .header-controls .language-toggle,
    .home-header .header-controls .theme-toggle {
        display: none !important;
    }

    .header-site-search.guoxue-search-form {
        flex: 1 1 auto !important;
        max-width: none !important;
        width: 100% !important;
        min-width: 0;
    }

    body.home-body .home-header .home-nav,
    body.category-page .home-header .home-nav,
    .home-header .home-nav,
    header.home-header nav#primary-nav.home-nav {
        display: none !important;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        z-index: 100;
        margin-top: 2px;
        padding: 6px 14px 8px;
        background: #fff;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
        border-bottom: 1px solid #e0e0e0;
        width: 100%;
        box-sizing: border-box;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        margin-right: 0 !important;
        min-width: 0;
    }

    body.home-body .home-header.nav-open .home-nav,
    body.category-page .home-header.nav-open .home-nav,
    .home-header.nav-open .home-nav,
    header.home-header.nav-open nav#primary-nav.home-nav {
        display: block !important;
    }

    .home-header .menu-settings-row {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        width: 100%;
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid rgba(0, 0, 0, 0.03);
    }

    .home-header .home-nav > ul {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 12px !important;
        justify-content: flex-start !important;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .home-header .home-nav > ul > li {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
        list-style: none;
        box-sizing: border-box;
    }

    .home-header .home-nav > ul > li:not(:last-child)::after {
        content: none !important;
    }

    body.home-body .home-header .home-nav a,
    body.category-page .home-header .home-nav a,
    header.home-header nav#primary-nav.home-nav a,
    .home-header .home-nav a {
        display: inline-block !important;
        width: auto !important;
        min-width: 0;
        min-height: 0;
        padding: 4px 0 !important;
        font-size: 0.95rem !important;
        font-weight: 400;
        line-height: 1.4;
        color: #333 !important;
        text-align: left;
        border: none !important;
        border-radius: 0;
        background: transparent !important;
        box-shadow: none !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
        transition: color 0.15s ease, text-decoration-color 0.15s ease;
        text-decoration: underline !important;
        text-underline-offset: 0.2em !important;
        text-decoration-thickness: 1px !important;
        text-decoration-color: rgba(51, 51, 51, 0.35) !important;
    }

    body.home-body .home-header .home-nav a:hover,
    body.category-page .home-header .home-nav a:hover,
    header.home-header nav#primary-nav.home-nav a:hover,
    .home-header .home-nav a:hover {
        color: #111 !important;
        background: transparent !important;
        text-decoration: underline !important;
        text-decoration-color: rgba(17, 17, 17, 0.55) !important;
    }

    body.home-body .home-header .home-nav a:active,
    body.category-page .home-header .home-nav a:active,
    header.home-header nav#primary-nav.home-nav a:active,
    .home-header .home-nav a:active {
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
        text-decoration: underline !important;
        text-decoration-color: rgba(0, 0, 0, 0.65) !important;
    }

    body.home-body .home-header .home-nav a:focus-visible,
    body.category-page .home-header .home-nav a:focus-visible,
    header.home-header nav#primary-nav.home-nav a:focus-visible,
    .home-header .home-nav a:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }

    .home-header .menu-settings-row .menu-settings-btn {
        display: inline-block !important;
        flex: 0 0 auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        padding: 0 !important;
        font-size: 0.82rem !important;
        font-weight: 400;
        color: #666 !important;
        border: none !important;
        border-radius: 0;
        background: transparent !important;
        box-shadow: none !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
        transition: color 0.15s ease, text-decoration-color 0.15s ease;
        text-decoration: underline;
        text-underline-offset: 0.2em;
        text-decoration-thickness: 1px;
        text-decoration-color: rgba(102, 102, 102, 0.45);
    }

    .home-header .menu-settings-row .menu-settings-btn:hover {
        color: #111 !important;
        background: transparent !important;
        border: none !important;
        text-decoration-color: rgba(17, 17, 17, 0.55);
    }

    .home-header .menu-settings-row .menu-settings-btn:active {
        color: #000 !important;
        background: transparent !important;
        text-decoration-color: rgba(0, 0, 0, 0.65);
    }

    .home-header .menu-settings-row .menu-settings-btn:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }

    .home-header .menu-toggle {
        display: block;
        margin-left: auto;
        flex-shrink: 0;
    }
}

/* 词典详情 / 成语详情 / 汉字详情等 category 页顶栏搜索：本文件在 style.css 之后加载，用更高选择器权重压过正文「印章」圆形按钮与原生 button 高光条 */
body.category-page .home-header .header-controls .header-site-search.guoxue-search-form .guoxue-search-btn,
body.home-body .home-header .header-controls .header-site-search.guoxue-search-form .guoxue-search-btn {
    -webkit-appearance: none;
    appearance: none;
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    border: none !important;
    color: #fff !important;
    background-color: #2563eb !important;
    background-image: none !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25) !important;
}

body.category-page .home-header .header-controls .header-site-search.guoxue-search-form .guoxue-search-btn:hover,
body.home-body .home-header .header-controls .header-site-search.guoxue-search-form .guoxue-search-btn:hover {
    background-color: #1d4ed8 !important;
    background-image: none !important;
    filter: none !important;
    transform: none !important;
}

body.category-page .home-header .header-controls .header-site-search.guoxue-search-form .guoxue-search-btn::before,
body.home-body .home-header .header-controls .header-site-search.guoxue-search-form .guoxue-search-btn::before {
    content: none !important;
    display: none !important;
}

/* 右边栏淘宝客推广 */
.dict-sidebar-promos {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #d0d0d0;
}

.dict-sidebar-promo-item {
    border-radius: 4px;
    overflow: hidden;
    background: #fafafa;
}

.dict-sidebar-promo-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.dict-sidebar-promo-link:hover {
    opacity: 0.92;
}

.dict-sidebar-promo-caption {
    margin: 0;
    padding: 0.65rem 0.5rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    color: #5a4a3a;
}

.dict-sidebar-promo-link img {
    display: block;
    width: 100%;
    height: auto;
}

body.dark-mode .dict-sidebar-promos {
    border-bottom-color: #404040;
}

body.dark-mode .dict-sidebar-promo-item {
    background: #363636;
}

body.dark-mode .dict-sidebar-promo-caption {
    color: #d8cbb8;
}

/* 正文内自营广告（横向滚动） */
.self-ad-in-page-slot {
    margin: 1.25rem 0;
    clear: both;
}

.self-ad-in-page {
    width: 100%;
    overflow: hidden;
}

.self-ad-in-page-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 0.25rem 0 0.5rem;
}

.self-ad-in-page-card {
    flex: 0 0 auto;
    width: min(200px, 42vw);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e8e0d6;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
    transition: opacity 0.2s ease;
}

.self-ad-in-page-card:hover {
    opacity: 0.92;
}

.self-ad-in-page-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.self-ad-in-page-label {
    display: block;
    padding: 0.5rem 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    color: #5a4a3a;
}

@media (min-width: 768px) {
    .self-ad-in-page-track {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .self-ad-in-page-card {
        width: calc(25% - 0.6rem);
        min-width: 140px;
    }
}

body.dark-mode .self-ad-in-page-card {
    border-color: #404040;
    background: #363636;
}

body.dark-mode .self-ad-in-page-label {
    color: #d8cbb8;
}

