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

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

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

body.dark-mode .home-header .logo p {
    color: #e8e8e8;
}

body.dark-mode .home-nav a {
    color: #e8e8e8 !important;
}

body.dark-mode .home-nav a:hover {
    color: #fff !important;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

body.dark-mode .home-footer {
    color: #a0a0a0;
}

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

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

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

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

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

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

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

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

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

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

body.dark-mode .nav-btn:hover {
    background: #3d3d3d;
    color: #e8e8e8;
    border-color: #555;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

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

/* 书籍详情页夜间模式 - 与右侧栏背景一致，但文字更亮，保证可读性 */
body.dark-mode .book-description,
body.dark-mode .book-author,
body.dark-mode .book-intro {
    background: #1a1a1a !important;
    color: #f5f5f5 !important;
    border-color: #404040 !important;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

