/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto !important;
    background-color: #fff;
}

html, body {
    scroll-padding-top: 0;
    scroll-margin-top: 0;
}

body {
    font-family: 'Microsoft YaHei', 'SimSun', Arial, sans-serif;
    background-color: #fff !important;
    color: #333;
    line-height: 1.6;
}

/* 全局链接样式 */
a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s ease;
}

a:hover {
    color: #34495e;
}

/* 导航链接和章节链接样式在下面定义，确保优先级 */

/* 首页布局 */
.home-body {
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.home-header {
    background: #fff;
    border-bottom: 1px solid #d4d4d4;
    padding: 4px 20px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: none;
    position: relative;
}

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

/* Logo 链接样式 - 替代内联样式 */
.home-header .logo a,
.home-header .logo div a {
    text-decoration: none;
    color: inherit;
}

/* 导航链接样式 - 替代内联样式 */
.home-hero.category-hero h2 a,
.hero-text h2 a {
    text-decoration: none;
    color: inherit;
}

.home-header .home-nav {
    display: flex;
    align-items: center;
    gap: 0;
    margin-right: auto;
    flex: 0 0 auto;
}

/* 汉堡菜单：桌面端隐藏按钮；繁简/主题由顶栏 .header-controls 负责 */
.menu-toggle {
    display: none;
    margin-left: 8px;
    padding: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
}

.menu-toggle:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.menu-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #222;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle-bar + .menu-toggle-bar {
    margin-top: 4px;
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.menu-settings-btn {
    border: none;
    background: transparent;
    font-size: 0.82rem;
    color: #666;
    cursor: pointer;
    padding: 4px 0;
}

.menu-settings-btn:hover {
    color: #111;
}

.menu-settings-row {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 成语页面的搜索框在导航中 */
.home-header .home-nav .chengyu-search-form {
    margin-left: 8px;
    display: none !important;
}

.home-header .header-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto !important;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding-left: 8px;
}

/* 顶栏内嵌搜索（对齐 gushici_www） */
.header-site-search.guoxue-search-form {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    max-width: none;
    margin: 0;
    flex: 1 1 14rem;
    min-width: 0;
    max-width: 32rem;
    gap: 6px;
}

/* 顶栏下拉：需容纳「國學書庫」「成語詞典」等，勿用过窄 min-width */
.header-site-search .guoxue-search-select {
    flex: 0 0 auto;
    flex-shrink: 0;
    width: auto;
    min-width: 7.5rem;
    max-width: 42%;
    height: 36px;
    padding: 0 1.75rem 0 0.5rem;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.header-site-search .guoxue-search-input {
    min-width: 0;
    flex: 1 1 auto;
    height: 36px;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    box-sizing: border-box;
}

/* 与正文「印章圆形搜」按钮解耦：顶栏用矩形文字按钮，去掉 ::before「搜」避免与「搜索」叠字 */
.header-site-search .guoxue-search-btn {
    -webkit-appearance: none;
    appearance: none;
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
    min-width: 3rem;
    height: 36px !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.88rem !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
    box-sizing: border-box;
    flex-shrink: 0;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-indent: 0 !important;
    overflow: visible !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;
}

.header-site-search .guoxue-search-btn::before {
    content: none !important;
    display: none !important;
}

.header-site-search .guoxue-search-btn:hover {
    transform: none !important;
    background-color: #1d4ed8 !important;
    background-image: none !important;
    filter: none;
}

/* 切换按钮在header-controls中的样式 */
.header-controls .language-toggle,
.header-controls .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: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.header-controls .theme-toggle {
    font-size: 16px;
}

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

.home-header .home-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

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

.home-header .logo p {
    margin-top: 0;
    margin-bottom: 0;
    color: #999;
    font-size: 12px;
    line-height: 1.2;
}

.home-nav ul {
    list-style: none;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    align-items: center;
}

.home-nav ul li {
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
}

.home-nav ul li:not(:last-child)::after {
    content: '|';
    color: #d4d4d4;
    margin: 0 4px;
}

/* 导航链接样式 - 使用!important确保优先级 */
.home-nav a,
.category-page .home-nav a {
    color: #333 !important;
    font-weight: 400 !important;
    padding: 4px 8px !important;
    border-radius: 0 !important;
    font-size: 15px !important;
    transition: color 0.2s ease !important;
    display: inline-block !important;
    text-decoration: none !important;
    background-color: #f8f9fa !important;
}

.home-nav a:hover,
.category-page .home-nav a:hover {
    background: transparent !important;
    color: #0066cc !important;
    text-decoration: underline !important;
}

.home-main {
    flex: 1;
    padding: 10px; /* 减少PC端与浏览器的间隔 */
}

.home-hero {
    background: #fff;
    border-radius: 24px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e0e0e0;
}

/* 书籍页面面包屑导航 - 去掉边框 */
body.category-page .home-hero.category-hero {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.category-hero {
    margin-bottom: 0;
    justify-content: flex-start !important;
}

/* 章节页标题栏 - 无边框 */
.chapter-page .category-hero {
    box-shadow: none !important;
    border: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

.category-main {
    padding: 3px 10px 3px 10px; /* PC端顶部间距更小 */
}

.hero-text h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

/* 章节页标题栏样式 - 与文章内容一致 */
.chapter-page .category-hero .hero-text h2 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: none !important;
    line-height: 1.4;
    text-align: left;
}

/* 书籍章节列表页标题字号（与简介文字大小接近） */
.category-page .category-hero .hero-text h2 {
    font-size: 14px;
    margin-bottom: 2px;
}

.hero-text p {
    color: #555;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: #e8ddd0;
    color: #6a5a4a;
    box-shadow: 0 2px 4px rgba(232, 221, 208, 0.3);
}

.btn-primary:hover {
    background: #f0e5d8;
    box-shadow: 0 4px 8px rgba(232, 221, 208, 0.4);
    color: #5a4a3a;
}

.btn-ghost {
    border: 1px solid #d0d0d0;
    color: #333;
    background: #fff;
}

.btn-ghost:hover {
    border-color: #999;
    color: #000;
    background: #f5f5f5;
}


.hero-stats {
    display: flex;
    gap: 15px;
    align-items: center;
}

.hero-stats div {
    text-align: center;
}

.hero-stats strong {
    display: block;
    font-size: 20px;
    color: #2c3e50;
    line-height: 1.2;
    margin-bottom: 4px;
}

.hero-stats span {
    color: #7f8c8d;
    font-size: 12px;
    line-height: 1.2;
}

.breadcrumb-nav {
    background: #fff;
    border-radius: 0;
    padding: 4px 10px !important;
    margin-bottom: 0;
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-shadow: none;
    border: none;
    font-size: 13px;
}

.breadcrumb-nav a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #6b7280;
}

.breadcrumb-current {
    color: #2c3e50;
    font-weight: 500;
}

.category-navigation {
    background: transparent;
    border-radius: 0;
    padding: 10px 3px;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    margin-top: 10px;
}

.category-navigation .section-title {
    margin-bottom: 6px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    background: #f5f5f5;
    border-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-card__icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.category-card__name {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: #2c3e50;
}

/* 类目导航简单列表样式（每行一个类目） */
.category-list-simple {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    padding: 0;
    margin: 0;
}

.category-item a {
    display: block;
    padding: 10px 15px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.category-item:last-child a {
    border-bottom: none;
}

.category-item a:hover {
    color: #2563eb;
    background-color: #f8f9fa;
    padding-left: 20px;
}

.home-layout {
    display: grid;
    grid-template-columns: 4fr 1fr;
    gap: 8px;
    margin-top: 0;
}

.home-content {
    background: #fff;
    border-radius: 20px;
    padding: 10px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: none;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px !important;
}

.home-content .section-title {
    margin-bottom: 10px !important;
}

.section-title h3 {
    margin: 0;
    color: #2c3e50;
}

/* 书籍列表样式 */
.book-list {
    margin-top: 0;
}

.book-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.book-list-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 0;
    transition: background-color 0.2s ease;
}

.book-list-item:last-child {
    border-bottom: none;
}

.book-list-item:hover {
    background-color: #f8f9fa;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 8px;
}

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

.book-list-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 3px;
    transition: color 0.2s ease;
}

.book-list-link:hover .book-list-title {
    color: #2563eb;
}

.book-list-author {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 3px;
    font-style: italic;
}

.book-list-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.section-title a {
    color: #34495e;
    font-size: 14px;
}

.featured-books {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 0 !important;
}

.home-content .featured-books {
    margin-top: 0 !important;
}

.featured-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-card__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    margin-bottom: 8px;
    flex: 1;
}

.featured-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2c3e50;
    font-weight: 600;
}

.featured-card__header h4 {
    margin: 0;
    font-size: 16px;
    color: inherit;
    transition: color 0.2s ease;
}

.featured-card__content:hover .featured-card__header h4 {
    color: #0a58ca;
}

.chapter-count {
    font-size: 13px;
    color: #7f8c8d;
}

.featured-card__description {
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    min-height: 60px;
    margin: 0;
}

.featured-card .book-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 8px;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
}

.featured-card .book-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.featured-card__actions {
    margin-top: auto;
}

.featured-card__actions .btn-primary {
    padding: 8px 18px;
}

.home-sidebar {
    background: #fff;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e0e0e0;
}

.home-sidebar .sidebar-section h4 {
    border-bottom: 2px solid #f0f0f0 !important;
}

.home-footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 14px;
}

/* 分类页布局 */
.category-page {
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

.category-main {
    flex: 1;
    padding: 5px 10px 10px 10px; /* PC端顶部间距更小 */
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.category-layout {
    display: grid !important;
    grid-template-columns: 4fr 1fr !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.category-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    width: 100% !important;
    grid-column: 1 / 2 !important;
    display: block !important;
    overflow: visible;
    margin: 0;
}

.category-sidebar {
    background: #fff;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e0e0e0;
    width: 100% !important;
    grid-column: 2 / 3 !important;
    display: block !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* 书籍页和章节页右侧栏移除边框 */
body.category-page .category-sidebar,
.category-page .category-sidebar {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}
.featured-books--stacked {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.no-data {
    padding: 40px;
    text-align: center;
    color: #888;
}

/* 顶部菜单栏样式 */
.top-menu-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

.top-menu-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 100%;
}

.logo div {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.book-menu {
    flex: 1;
    margin-left: 40px;
}

.book-list {
    list-style: none;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.book-list li {
    margin: 0;
}

.book-list a {
    color: #fff;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 4px;
    display: block;
    transition: background-color 0.3s ease;
}

.book-list a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 主内容区域样式 */
.main-content-body {
    background-color: #fff;
    padding: 30px;
    height: 100%;
    overflow-y: auto;
}

.welcome-container {
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-container h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 32px;
}

.welcome-container > p {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

/* 这个规则可能影响其他页面，保留但添加更具体的规则覆盖首页 */
.home-content .featured-books {
    margin-top: 0 !important;
}

.featured-books h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.book-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.book-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

.book-card p {
    color: #666;
    font-size: 14px;
}

.book-summary {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    min-height: 56px;
}

/* 侧边栏样式 */
.sidebar-body {
    background-color: #f9f9f9;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    border-left: 1px solid #e0e0e0;
}

.sidebar-container {
    max-width: 100%;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section h3,
.sidebar-section h4 {
    color: #6a5a4a;
    font-size: 18px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0 !important;
}

.history-list,
.ranking-list,
.nav-list {
    list-style: none;
}

.history-list li,
.nav-list li {
    padding: 8px 0;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.history-list li:last-child,
.nav-list li:last-child {
    border-bottom: none;
}

.ranking-list {
    counter-reset: ranking;
}

.ranking-list li {
    padding: 8px 0;
    color: #6a5a4a;
    font-size: 14px;
    counter-increment: ranking;
    position: relative;
    padding-left: 25px;
}

.ranking-list li::before {
    content: counter(ranking);
    position: absolute;
    left: 0;
    color: #d4c5a9;
    font-weight: bold;
}

/* 书籍页和章节页右侧栏书籍列表去掉编号 */
body.category-page .category-sidebar .ranking-list,
.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,
.category-page .category-sidebar .ranking-list li {
    counter-increment: none !important;
    padding-left: 0 !important;
}

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

.ranking-list li a {
    color: #6a5a4a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ranking-list li a:hover {
    color: #5a4a3a;
    text-decoration: underline;
}

.nav-list a {
    color: #0066cc;
    display: block;
}

/* 推荐书籍卡片样式 - 使用featured-card */
.recommended-books {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 侧边栏中的featured-card样式调整 */
.sidebar-section .featured-card {
    margin-bottom: 0;
    border-color: #e8ddd0;
}

.sidebar-section .featured-card__header h4 {
    font-size: 16px;
    color: #6a5a4a;
}

.sidebar-section .featured-card p {
    font-size: 13px;
    line-height: 1.6;
    min-height: 50px;
    margin-bottom: 12px;
    color: #6a5a4a;
}

.sidebar-section .featured-card__actions .btn-primary {
    padding: 6px 14px;
    font-size: 13px;
    background: #e8ddd0;
    color: #6a5a4a;
    border-color: #d4c5a9;
}

.sidebar-section .featured-card__actions .btn-primary:hover {
    background: #f0e5d8;
    color: #5a4a3a;
    box-shadow: 0 2px 8px rgba(232, 221, 208, 0.3);
}

.nav-list a {
    color: #0066cc;
    display: block;
    padding: 8px 0;
}

.nav-list a:hover {
    color: #004499;
}

/* 类型书籍列表页样式 */
.category-list-body {
    background-color: #fff;
    padding: 30px;
    height: 100%;
    overflow-y: auto;
}

.category-list-container {
    max-width: 1200px;
    margin: 0 auto;
}

.category-header {
    background: #fff;
    color: #2c3e50;
    padding: 5px 15px 5px 15px;
    border-radius: 12px;
    margin-bottom: 8px;
    margin-left: 0;
    margin-right: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: nowrap;
}

.category-header h1,
#bookTitle {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.4;
    margin: 0;
    color: #333;
}

.category-header .chapter-nav-header {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.category-header .chapter-nav-title {
    font-size: 16px;
    line-height: 1.3;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.category-header .chapter-nav {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.category-description {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

.books-grid-container {
    padding: 10px 10px 10px 10px;
}

.books-grid-container h2 {
    color: #2b2f55;
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d0d0d0;
    font-weight: 600;
}

.books-grid-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.books-grid-toolbar .summary-count {
    font-size: 14px;
    color: #8d9ab8;
}
.summary-count {
    font-size: 12px;
    color: #7f8c8d;
}

.books-grid-toolbar .search-input {
    border: 1px solid rgba(143, 160, 227, 0.5);
    border-radius: 999px;
    padding: 6px 18px;
    font-size: 14px;
    background-color: rgba(247, 249, 255, 0.9);
    color: #9aa7c7;
    box-shadow: inset 0 2px 4px rgba(103, 126, 234, 0.08);
    cursor: not-allowed;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 5px;
    padding: 0 0 5px 5px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 25px;
    padding: 15px 0;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    color: #999;
    background: #fff;
    border: 1px solid rgba(200, 200, 200, 0.5);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

.pagination-link:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #888;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(200, 200, 200, 0.3);
}

.pagination-link.active {
    background: #e8e8e8;
    color: #999;
    border-color: #c0c0c0;
    box-shadow: 0 4px 12px rgba(200, 200, 200, 0.4);
    font-weight: 600;
}

.pagination-link.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(200, 200, 200, 0.5);
    background: #f0f0f0;
}

.pagination-link.pagination-prev,
.pagination-link.pagination-next {
    font-weight: 600;
    padding: 0 16px;
}

.pagination-link.pagination-prev:hover,
.pagination-link.pagination-next:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(200, 200, 200, 0.3);
}

.book-card {
    position: relative;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card::after {
    display: none;
}

.book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 221, 208, 0.4);
    border-color: #e8ddd0;
}

.book-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #7f8c8d;
    background: #ecf0f1;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.book-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
    margin-bottom: 8px;
}

.book-card-link:hover {
    text-decoration: none;
}

.book-card h4 {
    position: relative;
    z-index: 1;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.book-card-link:hover h4 {
    color: #5a4a3a;
}

.book-summary {
    position: relative;
    z-index: 1;
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 8px;
    min-height: 60px;
    flex: 1;
    transition: color 0.3s ease;
}

.book-card-link:hover .book-summary {
    color: #5a4a3a;
}

.book-meta {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #9aa2c7;
    margin-bottom: 6px;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}

.book-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.book-meta span::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #bdc3c7;
}

.book-meta span:first-child::before {
    display: none;
}

.book-actions {
    position: relative;
    z-index: 1;
    margin-top: 0;
}

.btn-read {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e8ddd0;
    color: #6a5a4a;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    font-weight: 500;
}

.btn-read::after {
    content: "→";
    font-size: 12px;
}

.btn-read:hover {
    box-shadow: 0 4px 8px rgba(232, 221, 208, 0.4);
    color: #5a4a3a;
    background: #f0e5d8;
}

/* 书籍列表页样式 */
.book-list-body {
    background-color: #fff;
    padding: 30px;
    height: 100%;
    overflow-y: auto;
}

.book-list-container {
    max-width: 1000px;
    margin: 0 auto;
}

.book-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.book-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.book-author {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.book-description {
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.95;
}

.chapter-list-container h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.book-description {
    padding: 18px 0.7rem;
    margin-bottom: 20px;
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #d0d0d0;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}

/* 章节列表样式 - 确保优先级 */
.chapter-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.volume-section {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 1px solid #e0e0e0 !important;
    grid-column: 1 / -1 !important;
}

.volume-title {
    display: block !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    color: #333 !important;
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important;
}

.chapter-group {
    margin-bottom: 1rem;
}

.chapter-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin: 0 0 0.5rem 0;
}

.volume-chapters {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    align-items: center !important;
}

/* 简洁的章节列表样式 - 按行展示 */
.chapter-list-simple {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.chapter-row {
    display: block !important;
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transition: background-color 0.2s !important;
}

.chapter-row:hover {
    background-color: #f8f8f8 !important;
}

.chapter-row:last-child {
    border-bottom: none !important;
}

.chapter-row a {
    display: block !important;
    text-decoration: none !important;
    color: #333 !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
}

.chapter-row a:hover {
    color: #0066cc !important;
}

.chapter-item {
    background: #fff !important;
    border: 1px solid rgba(232, 221, 208, 0.5) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(232, 221, 208, 0.2) !important;
}

.chapter-item:hover {
    background: #f0e5d8 !important;
    color: #5a4a3a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(232, 221, 208, 0.4) !important;
    border-color: #e8ddd0 !important;
}

/* 书籍页面章节列表 - 去掉边框，悬浮浅灰色 */
body.category-page .chapter-item {
    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;
    border: none !important;
    border-radius: 0 !important;
    transition: all 0.3s ease;
    background: transparent !important;
}

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

/* 章节链接样式 - 使用!important确保优先级最高 */
.chapter-item a {
    color: #6a5a4a !important;
    font-size: 14px !important;
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    word-wrap: break-word !important;
    word-break: break-all !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
}

.chapter-item:hover a {
    color: #5a4a3a !important;
}

/* 按卷分组的章节样式 - 允许换行 */
.volume-chapters .chapter-item a {
    word-wrap: break-word !important;
    word-break: break-all !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

/* 章节内容页样式 */
.chapter-body {
    background-color: #fff;
    padding: 30px;
    height: 100%;
    overflow-y: auto;
}

.chapter-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
}

.chapter-title-header {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e0e0e0;
}

.chapter-title-header h1 {
    color: #333;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 0;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chapter-nav-top {
    margin-bottom: 8px;
    padding-bottom: 6px;
}

.chapter-nav-top .chapter-nav {
    display: flex;
    flex-direction: row;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.chapter-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.chapter-header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.chapter-nav {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    background-color: #e0e0e0;
    color: #666666;
    border: 1px solid rgba(208, 208, 208, 0.5);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.nav-btn:hover {
    background-color: #d3d3d3;
    border-color: #c0c0c0;
    color: #555555;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.nav-btn.disabled {
    background-color: #e8e8e8 !important;
    cursor: not-allowed !important;
    color: #999999 !important;
    border-color: #d0d0d0 !important;
    opacity: 0.6;
}

.nav-btn:disabled {
    background-color: #e8e8e8;
    cursor: not-allowed;
}

.chapter-content {
    font-size: 18px;
    line-height: 2;
    color: #333;
    padding: 15px 15px;
    text-align: justify;
    text-indent: 2em;
}

.chapter-content p {
    margin-bottom: 20px;
    text-indent: 2em;
}

/* 诗歌样式 */
.chapter-content blockquote {
    margin: 1.5em 0;
    padding: 0;
    border: none;
    font-style: normal;
    color: #333;
}

.chapter-content blockquote p {
    margin-bottom: 0.8em;
    text-indent: 0;
    padding-left: 2em;
    line-height: 1.8;
    color: #333;
}

/* 批注样式（眉批、旁批） */
.chapter-content em code {
    display: block;
    margin-top: 0.8em;
    margin-bottom: 1.2em;
    padding-left: 2em;
    font-style: normal;
    font-family: inherit;
    font-size: 0.95em;
    color: #2563eb;
    line-height: 1.6;
    background: transparent;
    border: none;
}

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

.chapter-content a[href*="/chengyu/"]:hover {
    color: #5a6b8a;
    opacity: 0.8;
}

/* 解析内容样式 - 与原文内容样式一致 */
.chapter-analysis {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid #e0e0e0;
}

.chapter-analysis h2 {
    font-size: 1.2em;
    margin-top: 1.5em;
    margin-bottom: 0.3em;
    color: #2563eb;
    font-weight: bold;
    text-indent: 0;
    line-height: 1.5;
}

.chapter-analysis h3 {
    font-size: 0.95em;
    margin-top: 1.2em;
    margin-bottom: 0.8em;
    color: #333;
    font-weight: bold;
    text-indent: 0;
    line-height: 1.5;
}

.chapter-analysis .analysis-content {
    font-size: 18px;
    line-height: 2;
    color: #333;
    text-align: justify;
    text-indent: 2em;
    margin-top: 0;
    margin-bottom: 1.5em;
}

.chapter-analysis .analysis-content p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.chapter-analysis .analysis-content br {
    line-height: 2;
}

.chapter-analysis .analysis-content em {
    font-style: italic;
}

.chapter-analysis .analysis-content strong {
    font-weight: bold;
}

.chapter-analysis .analysis-content blockquote {
    margin: 1.5em 0;
    padding: 0;
    border: none;
    font-style: normal;
    color: #333;
}

.chapter-analysis .analysis-content blockquote p {
    margin-bottom: 0.8em;
    text-indent: 0;
    padding-left: 2em;
    line-height: 1.8;
    color: #333;
}

.chapter-analysis .analysis-content h4 {
    font-size: 1.1em;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: #333;
    font-weight: bold;
    text-indent: 0;
    line-height: 1.5;
}

.chapter-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

/* 错误页面样式 */
.error-body {
    background-color: #fff;
    height: 100%;
    overflow-y: auto;
}

.error-body .home-header {
    display: flex !important;
    visibility: visible !important;
}

.error-body .home-main {
    padding: 30px 20px;
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.error-container h1 {
    color: #e74c3c;
    font-size: 48px;
    margin-bottom: 20px;
}

.error-container p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* 响应式设计 - 移动端适配 */
@media (max-width: 768px) {
    /* 移动端整体背景与文字颜色（仅在暗色模式下生效） */
    body.dark-mode {
        background-color: #000;
        color: #666;
    }

    body.dark-mode .category-page {
        background-color: #000;
    }

    /* 主要内容容器在移动端使用深色背景，仅暗色模式 */
    body.dark-mode .home-content,
    body.dark-mode .category-content,
    body.dark-mode .book-content,
    body.dark-mode .chapter-content-wrapper,
    body.dark-mode .zhuzibaijia-content {
        background-color: #000 !important;
        color: #666 !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* 作者介绍 / 简介 / 章节内容等卡片改为黑底亮灰字，提升对比度，仅暗色模式 */
    body.dark-mode .book-author,
    body.dark-mode .book-description,
    body.dark-mode .book-intro,
    body.dark-mode .chapter-content,
    body.dark-mode .zhuzibaijia-content .book-intro,
    body.dark-mode .zhuzibaijia-content .chapter-table-container {
        background-color: transparent !important;
        color: #f5f5f5 !important;
        border: none !important;
        border-bottom: 1px solid #404040 !important;
    }

    body.dark-mode .chapter-content p {
        color: #f0f0f0 !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;
    }

    /* 首页头部 - 与字典页保持一致 */
    .home-header {
        padding: 6px 8px !important;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.2rem !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .home-header .logo {
        flex: 0 0 auto;
        min-width: 0;
        white-space: nowrap;
        flex-shrink: 0 !important;
        margin-right: 0.2rem !important;
    }
    
    .home-header .logo div {
        font-size: 21px !important;
        margin: 0;
        white-space: nowrap;
        gap: 0.15rem !important;
        display: flex;
        align-items: center;
    }
    
    .home-header .logo a {
        gap: 0.15rem !important;
        display: flex;
        align-items: center;
    }
    
    .home-header .logo div a {
        font-size: 21px !important;
    }
    
    .home-header .logo p {
        font-size: 11px;
        margin-top: 2px;
        display: none; /* 移动版隐藏副标题 */
    }
    
    .home-nav {
        width: auto;
        flex-shrink: 0;
        gap: 0.2rem !important;
        margin-right: 0.2rem !important;
        display: flex !important;
        align-items: center !important;
        min-width: fit-content;
    }
    
    .home-nav ul {
        flex-wrap: nowrap;
        gap: 0.6rem !important;
        padding-bottom: 0;
        justify-content: flex-end;
        margin: 0;
        align-items: center;
        list-style: none;
        flex-shrink: 0;
    }
    
    .home-nav ul li {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .home-nav ul li:not(:last-child)::after {
        content: none !important;
    }
    
    .home-nav a {
        font-size: 15px !important;
        padding: 4px 6px !important;
        white-space: nowrap;
        background-color: #f8f9fa !important;
    }
    
    /* 移动端header-controls样式 - 统一首页和字典页 */
    .home-header .header-controls,
    body.category-page .home-header .header-controls,
    body.home-body .home-header .header-controls {
        gap: 0 !important;
        margin-left: 0.2rem !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .home-header .header-controls .language-toggle,
    .home-header .header-controls .theme-toggle,
    body.category-page .home-header .header-controls .language-toggle,
    body.category-page .home-header .header-controls .theme-toggle,
    body.home-body .home-header .header-controls .language-toggle,
    body.home-body .home-header .header-controls .theme-toggle {
        width: 26px !important;
        height: 26px !important;
        font-size: 11px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
    
    .home-header .header-controls .language-toggle,
    body.category-page .home-header .header-controls .language-toggle,
    body.home-body .home-header .header-controls .language-toggle {
        margin-right: 1px !important;
    }
    
    /* 首页主内容 */
    .home-main {
        padding: 15px;
    }
    
    .category-main {
        padding: 15px 15px 15px 15px; /* 增加右侧padding，与浏览器右侧保持间隔 */
    }

    .breadcrumb-nav {
        padding: 8px 12px;
        font-size: 13px;
        margin-bottom: 8px;
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
        text-align: left;
    }
    
    /* Hero区域 */
    .home-hero {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    
    /* 分类页和章节页的 Hero 区域，右侧增加间隔 */
    .category-hero {
        padding: 15px 15px 15px 15px !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        border-radius: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        text-align: left !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }
    
    /* 书籍页面面包屑导航移动端左对齐 */
    .category-hero .hero-text {
        text-align: left !important;
        width: 100% !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
    }
    
    .category-hero .hero-text h2 {
        text-align: left !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        width: 100% !important;
    }
    
    /* 章节页标题 - 左侧保留间隔 */
    .chapter-page .category-main {
        padding-left: 3px !important;
    }
    
    .chapter-page .category-hero {
        padding-left: 0 !important;
        padding-right: 15px !important;
        border-radius: 16px !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        text-align: left !important;
    }
    
    .chapter-page .category-hero .hero-text {
        padding-left: 3px !important;
        margin-left: 0 !important;
        text-align: left !important;
        width: 100% !important;
    }
    
    .chapter-page .category-hero .hero-text h2,
    .chapter-page .category-hero .hero-text h2#chapterTitle {
        font-size: 14px;
        text-align: left !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        width: 100% !important;
    }
    
    .hero-text h2 {
        font-size: 22px;
        text-align: left !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    .hero-text {
        text-align: left !important;
    }
    
    .hero-text p {
        font-size: 13px;
    }
    
    .hero-actions {
        gap: 8px;
    }
    
    .btn-primary,
    .btn-ghost {
        padding: 7px 14px;
        font-size: 13px;
    }
    
    .hero-stats {
        gap: 20px;
        width: 100%;
        justify-content: space-around;
    }
    
    .hero-stats strong {
        font-size: 18px;
    }
    
    .hero-stats span {
        font-size: 11px;
    }
    
    /* 布局改为单列 */
    .category-navigation-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .category-navigation-sidebar {
        display: none;
    }
    .category-navigation {
        padding: 10px 3px;
        border-radius: 0;
        margin-top: 10px;
        background: transparent;
        box-shadow: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .category-navigation .section-title {
        margin-bottom: 5px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 5px;
    }

    .category-card {
        padding: 8px 5px;
    }

    .category-card__icon {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .category-card__name {
        font-size: 11px;
    }

    .home-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-layout {
        grid-template-columns: 1fr !important;
        gap: 15px;
        margin-top: 0 !important;
    }
    
    /* 章节页布局 - 左侧保留间隔 */
    .chapter-page .category-layout {
        margin-left: 0 !important;
        padding-left: 3px !important;
    }
    
    .book-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .chapter-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* 内容区域 - 确保在主内容区域 */
    .home-content {
        padding: 15px 15px 15px 15px; /* 增加右侧padding，与浏览器右侧保持间隔 */
        border-radius: 16px;
        order: 1;
    }
    
    .category-content {
        order: 1;
        grid-column: 1 / -1 !important; /* 重置 grid-column，让内容占据整行 */
    }
    
    .book-content {
        order: 1;
    }
    
    .chapter-content-wrapper {
        order: 1;
    }
    
    .home-sidebar,
    .category-sidebar,
    .book-content,
    .book-sidebar,
    .chapter-content-wrapper,
    .chapter-sidebar {
        padding: 15px;
        border-radius: 16px;
    }
    
    /* 章节页内容容器 - 左侧保留间隔 */
    .chapter-page .chapter-content-wrapper {
        padding-left: 3px !important;
        padding-right: 15px !important;
    }
    
    /* 侧边栏 - 确保在底部显示 */
    .home-sidebar,
    .category-sidebar,
    .book-sidebar,
    .chapter-sidebar {
        order: 2;
        display: block !important;
        grid-column: 1 / -1 !important; /* 重置 grid-column，让侧边栏占据整行并显示在底部 */
    }
    
    .category-content {
        padding: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        border: none;
    }
    
    /* 章节页内容区域 - 左侧保留间隔 */
    .chapter-page .category-content {
        padding-left: 3px !important;
    }
    
    .books-grid-container {
        padding: 10px 15px 10px 10px; /* 增加右侧padding，与div保持间隔 */
    }
    
    /* 书籍描述 - 移动端与作者信息保持一致 */
    .book-description {
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
    }
    
    .section-title h3 {
        font-size: 18px;
    }
    
    /* 卡片网格 */
    .featured-books {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .book-list-item {
        padding: 12px 0;
    }

    .book-list-title {
        font-size: 16px;
    }

    .book-list-description {
        font-size: 13px;
    }
    
    /* 卷和章节列表 */
    .volume-section {
        margin-bottom: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    
    .volume-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .volume-chapters {
        gap: 0.4rem !important;
    }
    
    .volume-chapters .chapter-item a {
        padding: 0.4rem 0.8rem !important;
        font-size: 13px !important;
    }
    
    .featured-card {
        padding: 12px;
    }
    
    .featured-card__header h4 {
        font-size: 16px;
    }
    
    .featured-card p {
        font-size: 13px;
        min-height: 0;
    }
    
    /* 书籍列表 */
    .book-list {
        gap: 12px;
    }
    
    .book-card {
        padding: 15px;
    }
    
    .book-card h4 {
        font-size: 16px;
    }
    
    .book-summary {
        font-size: 13px;
    }
    
    /* 章节列表 */
    .chapter-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .chapter-item {
        padding: 10px 12px;
    }
    
    .chapter-item a {
        font-size: 14px;
    }
    
    /* 章节内容 */
    .chapter-content {
        font-size: 16px;
        line-height: 1.8;
        padding: 15px 5px 15px 3px !important; /* 左侧保留间隔，右侧保留小间隔 */
    }
    
    .chapter-content p {
        margin-bottom: 1em;
    }
    
    /* 章节导航 */
    .chapter-nav {
        flex-direction: column;
        gap: 8px;
    }
    
    .chapter-nav-top {
        padding: 10px 0 10px 3px !important; /* 左侧保留间隔 */
    }
    
    .chapter-nav-top .chapter-nav {
        flex-direction: row;
        gap: 8px;
    }
    
    .chapter-footer {
        padding: 20px 0 0 3px !important; /* 左侧保留间隔 */
        margin-top: 30px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 14px;
        flex: 1;
        text-align: center;
    }
    
    .chapter-title-header {
        padding: 10px 0 10px 3px !important; /* 左侧保留间隔 */
    }
    
    .chapter-title-header h1 {
        font-size: 18px;
        line-height: 1.4;
    }
    
    /* 分类页标题 */
    .category-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .category-header h1 {
        font-size: 20px;
    }
    
    /* 分页 */
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }
    
    .pagination-link {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 36px;
    }
    
    /* 侧边栏在移动端已通过上面的 order: 2 设置显示在底部 */
    
    .sidebar-section {
        margin-bottom: 15px;
    }
    
    .sidebar-section h3,
    .sidebar-section h4 {
        font-size: 16px;
    }
    
    .ranking-list li {
        padding: 8px 0 8px 25px; /* 保留左侧padding，避免编号和文本重合 */
        font-size: 14px;
    }
    
    /* 顶部菜单 */
    .top-menu-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .book-list a {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    /* 导航栏样式调整 - 让按钮显示在右侧 */
    .home-nav {
        width: auto;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        flex-shrink: 0;
    }
    
    .home-nav ul {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 0;
        padding-bottom: 0;
        justify-content: flex-end;
    }
    
    /* 按钮容器 - 固定在导航栏右侧 */
    .home-nav .language-toggle,
    .home-nav .theme-toggle {
        position: relative !important; /* 在导航栏中使用相对定位 */
        width: 32px !important;
        height: 32px !important;
        margin-left: 6px !important;
        flex-shrink: 0 !important;
        border-radius: 50% !important; /* 确保圆形 */
        border: 1px solid #e0e0e0 !important; /* 确保有边框 */
    }
    
    /* 语言切换按钮 - 在导航栏中，横向排列在主题切换按钮左侧 */
    .language-toggle {
        order: 1; /* 确保在主题切换按钮前面 */
        font-size: 14px !important;
        border-radius: 50% !important; /* 确保圆形 */
        border: 1px solid #e0e0e0 !important; /* 确保有边框 */
    }
    
    /* 主题切换按钮 - 在导航栏中 */
    .theme-toggle {
        order: 2; /* 确保在语言切换按钮后面 */
        font-size: 16px !important;
    }

    /* 移动端：主导航默认收起，点击汉堡展开（与古诗词站一致） */
    .home-header {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        align-items: center;
        row-gap: 6px;
    }

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

    /* 移动端：第二行全宽搜索；繁简/主题仍在抽屉 */
    .home-header .header-controls,
    body.category-page .home-header .header-controls,
    body.home-body .home-header .header-controls {
        display: flex !important;
        flex: 1 1 100% !important;
        width: 100% !important;
        order: 4;
        margin-left: 0 !important;
        margin-top: 0;
        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;
    }

    .home-header .header-controls .language-toggle,
    .home-header .header-controls .theme-toggle,
    body.category-page .home-header .header-controls .language-toggle,
    body.category-page .home-header .header-controls .theme-toggle,
    body.home-body .home-header .header-controls .language-toggle,
    body.home-body .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;
    }

    .header-site-search .guoxue-search-select {
        min-width: 6.75rem !important;
        max-width: 38% !important;
        flex-shrink: 0 !important;
    }

    .header-site-search .guoxue-search-btn {
        -webkit-appearance: none;
        appearance: none;
        position: relative !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        width: auto !important;
        height: 36px !important;
        min-width: 3rem !important;
        border-radius: 6px !important;
        padding: 0.35rem 0.65rem !important;
        border: none !important;
        color: #fff !important;
        background-color: #2563eb !important;
        background-image: none !important;
    }

    .header-site-search .guoxue-search-btn::before {
        content: none !important;
        display: none !important;
    }

    .header-site-search .guoxue-search-btn:hover {
        transform: none !important;
        background-color: #1d4ed8 !important;
        background-image: none !important;
        filter: none;
    }

    .home-header .home-nav,
    body.category-page .home-header .home-nav,
    body.home-body .home-header .home-nav,
    header.home-header nav#primary-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;
        align-items: stretch !important;
        gap: 0 !important;
        margin-right: 0 !important;
        min-width: 0;
    }

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

    /* 抽屉内排列参考 gushici_www：横向换行 + 文字链 + 底部分隔线下的设置行 */
    .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;
    }

    /* 压过全局 .home-nav a { text-decoration: none !important } */
    body.category-page .home-header .home-nav a,
    body.home-body .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.category-page .home-header .home-nav a:hover,
    body.home-body .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.category-page .home-header .home-nav a:active,
    body.home-body .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.category-page .home-header .home-nav a:focus-visible,
    body.home-body .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;
    }
}

/* 隐私政策页面 */
.policy-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(232, 221, 208, 0.6);
    line-height: 1.8;
    color: #4a3c2f;
}

.policy-card h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: #6a5a4a;
    font-size: 20px;
}

.policy-card h3:first-child {
    margin-top: 0;
}

.policy-card p {
    margin-bottom: 12px;
}

.policy-card ul {
    margin: 0 0 16px 20px;
    padding: 0;
    list-style: disc;
}

.policy-card li {
    margin-bottom: 6px;
}

.faq-list {
    list-style: disc;
    padding-left: 20px;
    color: #6a5a4a;
    line-height: 1.6;
}

.faq-list li {
    margin-bottom: 6px;
}

/* 诸子百家章节列表专用样式 */
.zhuzibaijia-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.zhuzibaijia-content {
    flex: 1;
    min-width: 0;
}

.zhuzibaijia-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.zhuzibaijia-content .book-intro,
.zhuzibaijia-content .chapter-table-container {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    border: 1px solid rgba(232, 221, 208, 0.8);
    box-shadow: 0 6px 14px rgba(232, 221, 208, 0.35);
    margin-bottom: 0.4rem;
}

.zhuzibaijia-content .chapter-table-container h3,
.zhuzibaijia-content .book-intro h3 {
    margin-top: 0;
    margin-bottom: 0.3rem;
    color: #6a5a4a;
    font-size: 18px;
    border-bottom: 2px solid rgba(232, 221, 208, 0.9);
    padding-bottom: 0.3rem;
}

.zhuzibaijia-content .chapter-table,
.zhuzibaijia-content .volume-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
}

.zhuzibaijia-content .chapter-table thead,
.zhuzibaijia-content .volume-table thead {
    background: #fffefc;
}

.zhuzibaijia-content .chapter-table th,
.zhuzibaijia-content .volume-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #7c6a59;
    border-bottom: 2px solid rgba(232, 221, 208, 0.5);
}

.zhuzibaijia-content .chapter-table td,
.zhuzibaijia-content .volume-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(232, 221, 208, 0.6);
    color: #4a3c2f;
}

.zhuzibaijia-content .chapter-table tbody tr:hover,
.zhuzibaijia-content .volume-table tbody tr:hover {
    background: #f0e5d8;
}

.zhuzibaijia-content .chapter-table tbody tr:last-child td {
    border-bottom: none;
}

.zhuzibaijia-content .chapter-number {
    width: 80px;
    color: #b38c5a;
    font-weight: 500;
}

.zhuzibaijia-content .chapter-title {
    flex: 1;
}

.zhuzibaijia-content .chapter-title a {
    color: #6a5a4a;
    text-decoration: none;
    transition: color 0.2s;
}

.zhuzibaijia-content .chapter-title a:hover {
    color: #5a4a3a;
}

.zhuzibaijia-content .volume-section-table {
    margin-bottom: 30px;
    border: 1px solid rgba(232, 221, 208, 0.8);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 14px rgba(232, 221, 208, 0.35);
}

.zhuzibaijia-content .volume-header {
    background: #fffefc;
    color: #897664;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(232, 221, 208, 0.45);
    font-size: 16px;
    font-weight: 600;
}

.zhuzibaijia-content .chapter-group-table {
    margin-bottom: 20px;
}

.zhuzibaijia-content .chapter-group-header {
    background: #f4ebdf;
    padding: 10px 15px;
    font-weight: 600;
    color: #5a4a3a;
    border-left: 4px solid #d4c5a9;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .zhuzibaijia-layout {
        flex-direction: column;
        gap: 15px;
    }

    .zhuzibaijia-sidebar {
        width: 100%;
        order: 2;
    }

    .zhuzibaijia-content {
        order: 1;
    }

    .zhuzibaijia-content .chapter-table,
    .zhuzibaijia-content .volume-table {
        font-size: 14px;
    }

    .zhuzibaijia-content .chapter-table th,
    .zhuzibaijia-content .chapter-table td,
    .zhuzibaijia-content .volume-table th,
    .zhuzibaijia-content .volume-table td {
        padding: 8px;
    }

    .zhuzibaijia-content .book-intro,
    .zhuzibaijia-content .chapter-table-container {
        padding: 15px;
    }
}

/* 小屏幕手机 (最大宽度 480px) */
@media (max-width: 480px) {
    .home-main {
        padding: 10px;
    }
    
    .category-main {
        padding: 10px 12px 10px 10px; /* 增加右侧padding，与浏览器右侧保持间隔 */
    }

    .breadcrumb-nav {
        padding: 6px 10px;
        font-size: 12px;
        margin-bottom: 6px;
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
        text-align: left;
    }
    
    .home-hero {
        padding: 12px;
    }

    .category-navigation {
        padding: 8px 3px;
        border-radius: 0;
        margin-top: 8px;
        background: transparent;
        box-shadow: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .category-navigation .section-title {
        margin-bottom: 4px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
        gap: 4px;
    }

    .category-card {
        padding: 6px 3px;
    }

    .category-card__icon {
        font-size: 16px;
        margin-bottom: 1px;
    }

    .category-card__name {
        font-size: 9px;
    }
    
    /* 分类页和章节页的 Hero 区域，右侧增加间隔 */
    .category-hero {
        padding: 12px 12px 12px 12px !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        border-radius: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 章节页标题靠近浏览器左侧，无间隔 */
    .chapter-page .category-main {
        padding-left: 3px !important;
    }
    
    .chapter-page .category-hero {
        padding-left: 0 !important;
        padding-right: 12px !important;
        border-radius: 12px !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        text-align: left !important;
    }
    
    .chapter-page .category-hero .hero-text {
        padding-left: 3px !important;
        margin-left: 0 !important;
        text-align: left !important;
        width: 100% !important;
    }
    
    .chapter-page .category-hero .hero-text h2,
    .chapter-page .category-hero .hero-text h2#chapterTitle {
        font-size: 13px;
        text-align: left !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        width: 100% !important;
    }
    
    .hero-text h2 {
        font-size: 20px;
        text-align: left !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    .hero-text {
        text-align: left !important;
    }
    
    /* 卷和章节列表 - 小屏幕 */
    .volume-section {
        margin-bottom: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    
    .volume-title {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .volume-chapters {
        gap: 0.3rem !important;
    }
    
    .volume-chapters .chapter-item a {
        padding: 0.35rem 0.7rem !important;
        font-size: 12px !important;
    }
    
    .hero-stats {
        gap: 15px;
    }
    
    .hero-stats strong {
        font-size: 16px;
    }
    
    .home-content {
        padding: 12px 12px 12px 12px; /* 增加右侧padding，与浏览器右侧保持间隔 */
        border-radius: 12px;
    }
    
    .home-sidebar,
    .category-sidebar,
    .book-content,
    .book-sidebar,
    .chapter-content-wrapper,
    .chapter-sidebar {
        padding: 12px;
        border-radius: 12px;
    }
    
    /* 章节页内容容器 - 左侧对齐 */
    .chapter-page .chapter-content-wrapper {
        padding-left: 3px !important;
        padding-right: 12px !important;
    }
    
    .category-content {
        padding: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        border: none;
    }
    
    /* 章节页内容区域 - 左侧保留间隔 */
    .chapter-page .category-content {
        padding-left: 3px !important;
    }
    
    .books-grid-container {
        padding: 10px 12px 10px 10px; /* 增加右侧padding，与div保持间隔 */
    }
    
    /* 书籍描述 - 小屏幕与作者信息保持一致 */
    .book-description {
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
    }
    
    .featured-card,
    .book-card {
        padding: 12px;
    }

    .book-list-item {
        padding: 10px 0;
    }

    .book-list-title {
        font-size: 15px;
    }

    .book-list-description {
        font-size: 12px;
    }
    
    .chapter-content {
        font-size: 15px;
        padding: 12px 5px 12px 3px !important; /* 左侧保留间隔，右侧保留小间隔 */
    }
    
    .chapter-footer {
        padding: 15px 0 0 3px !important; /* 左侧保留间隔 */
        margin-top: 25px;
    }
    
    .chapter-title-header h1 {
        font-size: 16px;
    }
    
    .category-header h1 {
        font-size: 18px;
    }
    
    .pagination-link {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 32px;
    }
    
    /* 小屏幕手机 - 按钮样式保持一致 */
    .home-nav .language-toggle,
    .home-nav .theme-toggle {
        width: 32px !important;
        height: 32px !important;
        margin-left: 6px !important;
        border-radius: 50% !important; /* 确保圆形 */
        border: 1px solid #e0e0e0 !important; /* 确保有边框 */
    }
    
    .home-nav .language-toggle {
        font-size: 14px !important;
        border-radius: 50% !important; /* 确保圆形 */
        border: 1px solid #e0e0e0 !important; /* 确保有边框 */
    }
    
    .home-nav .theme-toggle {
        font-size: 16px !important;
    }
}

/* 国学书库主页面样式 - 表格网格布局 */
.page-title {
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
    text-align: left;
}

/* 旧样式 - 非国学页面使用，国学页面由 guoxue-style.css 覆盖 */
/* 国学书库各部页面简介栏 */
.shuku-section-intro {
    background: #f8f9fa;
    border-left: 4px solid #1976d2;
    padding: 12px 20px;
    margin-bottom: 16px;
    border-radius: 4px;
}

.shuku-section-intro p {
    color: #555;
    font-size: 15px;
    line-height: 1.8;
    margin: 0;
    text-indent: 2em;
}

.shuku-sections-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shuku-section-block {
    background: #fff;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.section-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 2px;
    border-bottom: 1px solid #d0d0d0;
}

.section-block-title {
    font-size: 20px;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.section-view-all {
    color: #1976d2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.section-view-all:hover {
    color: #1565c0;
    text-decoration: underline;
}

.section-books-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    line-height: 2;
    border-top: 1px solid #e8e8e8;
}

.book-item-link {
    color: #1976d2;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: block;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.book-item-link:nth-child(5n) {
    border-right: none;
}

.book-item-link:hover {
    background-color: #f5f5f5;
    color: #1565c0;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .section-books-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .book-item-link:nth-child(5n) {
        border-right: 1px solid #f0f0f0;
    }
    
    .book-item-link:nth-child(4n) {
        border-right: none;
    }
}

@media (max-width: 768px) {
    .section-books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .book-item-link:nth-child(4n) {
        border-right: 1px solid #f0f0f0;
    }
    
    .book-item-link:nth-child(3n) {
        border-right: none;
    }
    
    .page-title {
        font-size: 15px;
    }
    
    .section-block-title {
        font-size: 18px;
    }
    
    .book-item-link {
        font-size: 13px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .section-books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .book-item-link:nth-child(3n) {
        border-right: 1px solid #f0f0f0;
    }
    
    .book-item-link:nth-child(2n) {
        border-right: none;
    }
}

