/* 章节阅读页通用样式 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Droid Sans",Noto;
    line-height: 1.8;
    color: #333;
    background-color: #f8f8f8;
    overflow-x: hidden;
}

/* 响应式布局容器 */
.chapter_container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    /*box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);*/
}

/* 主内容区域 */
.main-content {
    flex: 1;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

/* 内容包装器 - 确保内容始终居中 */
.content-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 65px;
    padding-bottom: 90px; /* 为底部双行设置栏留出空间 */
}

/* 章节标题 */
.chapter-header {
    text-align: center;
    padding: 0px 40px 0px 40px;
    border-bottom: 1px solid #eee;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: #fff;
    z-index: 99;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 章节头部内容布局 */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    max-height: 80px;
    padding: 10px 0;
}

/* 返回书籍链接 */
.back-to-book {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 50%;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.back-to-book:hover {
    background: #e9ecef;
    color: #000;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-to-book:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.back-to-book i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.back-to-book:hover i {
    transform: translateX(-2px);
}

/* 章节标题 */
.chapter-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    text-align: left;
    padding: 0 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%; /* 设置最大宽度为70%，给进度条留出30%空间 */
}

/* 阅读进度 */
.reading-progress {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 20%; /* 设置进度条占用20%宽度 */
    justify-content: flex-end;
}

.progress-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.progress-bar {
    width: 100%; /* 让进度条占满容器的100% */
    height: 24px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 12px;
    transition: width 0.3s ease;
    position: absolute;
    left: 0;
    top: 0;
}

.progress-text {
    font-size: 11px;
    color: #495057;
    font-weight: 600;
    z-index: 2;
    position: relative;
    text-shadow: 
        0 0 2px #fff,
        0 0 4px #fff,
        0 0 6px #fff,
        0 1px 2px rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* 涟漪效果样式 */
.click-ripple {
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(52, 152, 219, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1000;
    transition: all 0.3s ease-out;
}

.click-ripple.ripple-active {
    width: 100px;
    height: 100px;
    opacity: 0;
}

/* 移动端触摸优化 */
@media (max-width: 768px) {
    .chapter_container {
        flex-direction: column;
        margin: 0;
        box-shadow: none;
    }
    
    .main-content {
        margin-left: 0;
        align-items: stretch;
    }
    
    .content-wrapper {
        align-items: stretch;
        padding-top:55px;
        padding-bottom: 85px; /* 移动端调整底部空间 */
    }
    
    .chapter-header {
        padding: 5px 15px;
    }
    
    .header-content {
        gap: 10px;
        margin: 0;
        max-height: 60px;
        padding: 5px 0;
    }
    
    .back-to-book {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .back-to-book i {
        font-size: 16px;
    }
    
    .chapter-title {
        font-size: 16px;
        padding: 0 10px;
        max-width: 75%; /* 移动端稍微减少标题宽度 */
    }
    
    .reading-progress {
        width: 20%; /* 移动端增加进度条宽度 */
    }
    
    .progress-bar {
        height: 20px;
    }
    
    .progress-text {
        font-size: 10px;
    }
}

.no-content {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 40px 0;
}

/* 底部设置栏 */
.mobile-settings-bar {
    display: flex;
    flex-direction: column;
    padding: 10px 20px 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    transition: transform 0.3s ease;
    max-width: 900px;
    margin: 0 auto;
    gap: 8px;
}

/* 分页导航区域 - 重新设计为三列布局 */
.pageing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:0 8px 8px 8px;
    border-bottom: 1px solid #e9ecef;
    gap: 12px;
}

/* 反馈问题按钮 - 居中显示 */
.feedback-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    background: #fff;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    white-space: nowrap;
    gap: 6px;
}

.feedback-btn:hover {
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.feedback-btn i {
    font-size: 16px;
    color: #e74c3c;
}

.feedback-btn span {
    font-weight: 500;
}

/* 功能按钮区域 */
.feature {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 5px 0;
}

/* 滚动隐藏底部设置栏 */
.mobile-settings-bar.settings-hidden {
    transform: translateY(100%);
}

.settings-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 12px;
    color: #666;
    min-width: 60px;
    text-decoration: none;
}

.settings-item:hover {
    background: #e9ecef;
    color: #333;
    text-decoration: none;
}

.settings-item i {
    font-size: 18px;
    margin-bottom: 4px;
}

/* 分页区域的设置项样式 */
.pageing .settings-item {
    flex-direction: row;
    gap: 8px;
    min-width: 80px;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pageing .settings-item:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pageing .settings-item i {
    font-size: 16px;
    margin-bottom: 0;
}

.pageing .settings-item span {
    font-weight: 500;
}

/* 空的分页项（占位符）不显示 */
.pageing .settings-item:empty {
    visibility: hidden;
    opacity: 0;
}

/* 功能区域的设置项样式 */
.feature .settings-item {
    flex-direction: column;
    min-width: 50px;
    padding: 8px 6px;
}

.feature a {
    text-decoration: none;
}

.feature .settings-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.feature .settings-item span {
    font-size: 11px;
}

/* 收藏按钮特殊样式 */
.feature .settings-item.followed {
    color: #e74c3c;
}

.feature .settings-item.followed:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

.feature .settings-item.followed i {
    color: #e74c3c;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* 移动端设置栏优化 */
@media (max-width: 768px) {
    .mobile-settings-bar {
        padding: 8px 15px 12px 15px;
        gap: 6px;
    }
    
    .pageing {
        padding: 6px 0;
        gap: 8px;
    }
    
    .feedback-btn {
        min-width: 120px;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .feedback-btn i {
        font-size: 16px;
    }
    
    .feature {
        padding: 4px 0;
    }
    
    .pageing .settings-item {
        min-width: 70px;
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .pageing .settings-item i {
        font-size: 14px;
    }
    
    .feature .settings-item {
        min-width: 45px;
        padding: 6px 4px;
    }
    
    .feature .settings-item i {
        font-size: 18px;
    }
    
    .feature .settings-item span {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .mobile-settings-bar {
        padding: 6px 10px 10px 10px;
        gap: 5px;
    }
    
    .pageing {
        padding: 5px 0;
        gap: 6px;
    }
    
    .feedback-btn {
        min-width: 120px;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .feedback-btn i {
        font-size: 16px;
    }
    
    .feature {
        padding: 3px 0;
    }
    
    .settings-item {
        font-size: 10px;
        padding: 6px;
    }
    
    .settings-item i {
        font-size: 14px;
    }
    
    .pageing .settings-item {
        min-width: 60px;
        padding: 6px 10px;
        font-size: 10px;
        gap: 6px;
    }
    
    .pageing .settings-item i {
        font-size: 12px;
    }
    
    .feature .settings-item {
        min-width: 40px;
        padding: 5px 3px;
    }
    
    .feature .settings-item i {
        font-size: 16px;
    }
    
    .feature .settings-item span {
        font-size: 9px;
    }
}

/* 弹窗样式 */
.modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: bold;
    color: #000;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* 章节列表弹窗 */
.chapter-list-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.chapter-list-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    color: #000;
}

.book-status {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.status-text {
    background: #e8f5e8;
    color: #27ae60;
    padding: 4px 8px;
    border-radius: 4px;
}

.chapter-count {
    background: #e8f4f8;
    color: #3498db;
    padding: 4px 8px;
    border-radius: 4px;
}

.chapter-list {
    height: 100%;
    overflow-y: auto;
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chapter-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin-bottom: 2px;
    position: relative;
}

.chapter-item:hover {
    background: #f8f9fa;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chapter-item.current {
    background: linear-gradient(135deg, #e8f4f8, #f0f8ff);
    color: #3498db;
    font-weight: bold;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 12px rgba(52, 152, 219, 0.2);
}

.chapter-item.current::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3498db, #2980b9);
    border-radius: 0 2px 2px 0;
}

.chapter-item .chapter-index {
    font-size: 12px;
    color: #666;
    min-width: 45px;
    font-weight: 600;
    margin-right: 12px;
    text-align: left;
    flex-shrink: 0;
}

.chapter-item .chapter-name {
    flex: 1;
    font-size: 14px;
    margin-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.chapter-item .chapter-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

/* 状态图标样式 */
.chapter-state.state-free {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
}

.chapter-state.state-free-time {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.3);
}

.chapter-state.state-login {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.chapter-state.state-vip {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: #fff;
    box-shadow: 0 2px 6px rgba(155, 89, 182, 0.3);
}

.chapter-state.state-lock {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.chapter-state.state-purchased {
    background: linear-gradient(135deg, #1abc9c, #16a085);
    color: #fff;
    box-shadow: 0 2px 6px rgba(26, 188, 156, 0.3);
}

/* 悬停效果 */
.chapter-item:hover .chapter-state {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 状态提示文字 */
.chapter-state::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.chapter-state:hover::after {
    opacity: 1;
}

/* 分页导航包装器 */
.pagination-wrapper {
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    border-bottom: 1px solid #eee;
    /*margin-bottom: 15px;*/
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 分页箭头 */
.pagination-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 50px;
    background: #f8f9fa;
    color: #495057;
    font-size: 18px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    z-index: 11;
    flex-shrink: 0;
}



.pagination-arrow:active {
    transform: scale(0.95);
    background: #dee2e6;
}

.pagination-arrow.dragging {
    background: #d1ecf1;
    color: #0c5460;
    cursor: grabbing;
    transform: scale(1.02);
}

.pagination-arrow-left {
    border-radius: 0 25px 25px 0;
    border-right: none;
}

.pagination-arrow-right {
    border-radius: 25px 0 0 25px;
    border-left: none;
}

/* 分页导航样式 */
.pagination-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    padding: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    /* 显示横向滚动条 - PC端使用较厚滚动条 */
    scrollbar-width: auto;
    -ms-overflow-style: auto;
}

/* 移动端使用较细的滚动条 */
@media (max-width: 768px) {
    .pagination-nav {
        scrollbar-width: thin;
    }
}



/* 移动端滑动提示 */
@media (max-width: 768px) {
    /* 章节列表弹窗移动端优化 */
    .chapter-list-modal .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    /* 首次加载时显示滑动提示 */
    .pagination-nav.show-swipe-hint::after {
        content: '← 滑动查看更多 →';
        position: absolute;
        bottom: -35px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 12px;
        font-weight: bold;
        color: #3498db;
        background: rgba(255, 255, 255, 0.95);
        padding: 6px 12px;
        border-radius: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        border: 1px solid #e9ecef;
        animation: fadeInOut 6s ease-in-out;
        pointer-events: none;
        white-space: nowrap;
        z-index: 10;
    }
    
    @keyframes fadeInOut {
        0%, 100% { opacity: 0; }
        15%, 85% { opacity: 1; }
    }
}

/* Webkit内核浏览器的滚动条样式 */
.pagination-nav::-webkit-scrollbar {
    height: 24px; /* PC端使用更厚的滚动条，便于点击 */
}

.pagination-nav::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.pagination-nav::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 12px;
    border: 3px solid #f8f9fa;
    background-clip: content-box;
}

.pagination-nav::-webkit-scrollbar-thumb:hover {
    background: #999;
    border: 3px solid #f8f9fa;
    background-clip: content-box;
}

/* 移动端使用较细的滚动条 */
@media (max-width: 768px) {
    .pagination-nav::-webkit-scrollbar {
        height: 6px;
    }
    
    .pagination-nav::-webkit-scrollbar-track {
        background: transparent;
        border: none;
        border-radius: 3px;
    }
    
    .pagination-nav::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
        border: none;
        background-clip: initial;
    }
    
    .pagination-nav::-webkit-scrollbar-thumb:hover {
        background: #999;
        border: none;
        background-clip: initial;
    }
}

.page-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
    /* 防止按钮被压缩 */
    flex-shrink: 0;
    white-space: nowrap;
}

.page-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-btn.current {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
    font-weight: bold;
}

.page-btn.current:hover {
    background: #2980b9;
    border-color: #2980b9;
    color: #fff;
}

.page-btn.first {
    border-left: 2px solid #3498db;
}

.page-btn.last {
    border-right: 2px solid #3498db;
}

/* 章节容器 */
.chapters-container {
    max-height: 320px;
    overflow-y: auto;
    padding-top: 10px;
    margin-top: 5px;
    border-radius: 8px;
    overflow-x: hidden;
}

.no-chapters {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 40px 0;
}

/* 移动端分页优化 */
@media (max-width: 768px) {
    .pagination-wrapper {
        margin-bottom: 12px;
    }
    
    .pagination-arrow {
        width: 35px;
        height: 45px;
        font-size: 16px;
    }
    
    .pagination-nav {
        gap: 6px;
        padding: 12px;
        -webkit-overflow-scrolling: touch;
    }
    
    .page-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 50px;
    }
    
    .chapters-container {
        padding-top: 8px;
    }
    
    /* 移动端章节项优化 */
    .chapter-item {
        padding: 10px 12px;
        margin-bottom: 1px;
    }
    
    .chapter-item .chapter-index {
        min-width: 35px;
        font-size: 11px;
        margin-right: 8px;
    }
    
    .chapter-item .chapter-name {
        font-size: 13px;
        margin-right: 8px;
    }
    
    .chapter-item .chapter-state {
        min-width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .chapter-state::after {
        font-size: 9px;
        bottom: -25px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding-top:50px;
        padding-bottom: 80px; /* 小屏幕调整底部空间 */
    }
    
    .chapter-header {
        padding: 5px 10px;
    }
    
    .header-content {
        gap: 8px;
        max-height: 50px;
        padding: 3px 0;
    }
    
    .back-to-book {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .back-to-book i {
        font-size: 14px;
    }
    
    .chapter-title {
        font-size: 14px;
        padding: 0 8px;
        max-width: 60%; /* 小屏幕进一步减少标题宽度 */
    }
    
    .reading-progress {
        width: 30%; /* 小屏幕增加进度条宽度 */
    }
    
    .progress-bar {
        height: 18px;
    }
    
    .progress-text {
        font-size: 9px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .pagination-arrow {
        width: 30px;
        height: 40px;
        font-size: 14px;
    }
    
    .pagination-nav {
        gap: 4px;
        padding: 10px;
    }
    
    .page-btn {
        padding: 5px 8px;
        font-size: 12px;
        min-width: 45px;
    }
    
    .chapters-container {
        max-height: 330px;
        padding-top: 6px;
    }
}

/* 设置弹窗 */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.settings-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group h4 {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 15px;
}

/* 主题网格布局 */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.theme-card {
    height: 45px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    position: relative;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    user-select: none;
}

.theme-card:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.theme-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.theme-card.active {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.theme-card.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 各主题背景色 */
.theme-card[data-theme="bg-1"] {
    background: #fff;
    color: #000;
    border: 1px solid #e9ecef;
}

.theme-card[data-theme="bg-2"] {
    background: #f4f1e8;
    color: #5d4037;
}

.theme-card[data-theme="bg-3"] {
    background: #e8f5e8;
    color: #2e7d32;
}

.theme-card[data-theme="bg-4"] {
    background: #e8f4f8;
    color: #1976d2;
}

.theme-card[data-theme="bg-5"] {
    background: #f8e8f4;
    color: #c2185b;
}

.theme-card[data-theme="bg-7"] {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
}

/* 阅读设置表格样式 */
.reading-settings-table {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    width: 100%;
    margin: 0 auto;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: 15px;
    font-weight: 500;
    color: #000;
    width: 100px;
    text-align: left;
    flex-shrink: 0;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 220px;
    justify-content: space-between;
}

.control-btn {
    background: #3498db;
    color: #fff;
    border: none;
    width: 40px;
    height: 35px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
    flex-shrink: 0;
}

.control-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.control-btn.decrease-btn {
    background: #e74c3c;
}

.control-btn.decrease-btn:hover {
    background: #c0392b;
}

.control-btn.increase-btn {
    background: #27ae60;
}

.control-btn.increase-btn:hover {
    background: #229954;
}

.control-value {
    font-size: 15px;
    font-weight: bold;
    color: #000;
    width: 100px;
    text-align: center;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* 主题样式 */
.main-content.bg-1 { background: #fff; }
.main-content.bg-1 .chapter-header { background: #fff; }
body.bg-1 { background-color: #fff; }

.main-content.bg-2 { background: #f4f1e8; }
.main-content.bg-2 .chapter-header { background: #f4f1e8; }
body.bg-2 { background-color: #f4f1e8; }

.main-content.bg-3 { background: #e8f5e8; }
.main-content.bg-3 .chapter-header { background: #e8f5e8; }
body.bg-3 { background-color: #e8f5e8; }

.main-content.bg-4 { background: #e8f4f8; }
.main-content.bg-4 .chapter-header { background: #e8f4f8; }
body.bg-4 { background-color: #e8f4f8; }

.main-content.bg-5 { background: #f8e8f4; }
.main-content.bg-5 .chapter-header { background: #f8e8f4; }
body.bg-5 { background-color: #f8e8f4; }

.main-content.bg-7 { 
    background: #000; 
    color: #fff;
}
body.bg-7 { 
    background-color: #000; 
    color: #fff;
}

.main-content.bg-7 .chapter-title {
    color: #fff;
}

.main-content.bg-7 .reading-progress {
    background: #333;
    color: #ccc;
}

.main-content.bg-7 .progress-bar {
    background: #2d3748;
    border: 1px solid #4a5568;
}

.main-content.bg-7 .progress-fill {
    background: linear-gradient(90deg, #4299e1, #3182ce);
}

.main-content.bg-7 .progress-text {
    color: #f7fafc;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.main-content.bg-7 .chapter_container {
    background: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.main-content.bg-7 .mobile-settings-bar {
    background: #000;
    border-top: 1px solid #333;
}

.main-content.bg-7 .pageing {
    border-bottom: 1px solid #333;
}

.main-content.bg-7 .settings-item {
    color: #ccc;
}

.main-content.bg-7 .settings-item:hover {
    background: #333;
    color: #fff;
}

.main-content.bg-7 .pageing .settings-item {
    background: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
}

.main-content.bg-7 .pageing .settings-item:hover {
    background: #4a5568;
    color: #f7fafc;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}

.main-content.bg-7 .feature .settings-item {
    color: #a0aec0;
}

.main-content.bg-7 .feature .settings-item:hover {
    background: #2d3748;
    color: #f7fafc;
}

.main-content.bg-7 .feature .settings-item.followed {
    color: #f56565;
}

.main-content.bg-7 .feature .settings-item.followed:hover {
    background: rgba(245, 101, 101, 0.1);
    color: #feb2b2;
}

.main-content.bg-7 .feature .settings-item.followed i {
    color: #f56565;
}

/* 夜间模式反馈按钮样式 */
.main-content.bg-7 .feedback-btn {
    background: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
}

.main-content.bg-7 .feedback-btn:hover {
    background: #4a5568;
    color: #f7fafc;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}

.main-content.bg-7 .feedback-btn i {
    color: #f56565;
}

.main-content.bg-7 .modal-content {
    background: #000;
    color: #fff;
}

.main-content.bg-7 .modal-header {
    border-bottom: 1px solid #333;
}

.main-content.bg-7 .modal-header h3 {
    color: #fff;
}

.main-content.bg-7 .close-btn {
    color: #ccc;
}

.main-content.bg-7 .close-btn:hover {
    color: #fff;
}

.main-content.bg-7 .setting-group h4 {
    color: #fff;
}

/* 夜间模式 - 阅读设置表格样式 */
.main-content.bg-7 .reading-settings-table {
    background: #1a202c;
    border: 1px solid #2d3748;
}

.main-content.bg-7 .setting-label {
    color: #e2e8f0;
}

.main-content.bg-7 .control-value {
    color: #f7fafc;
    background: #2d3748;
    border: 1px solid #4a5568;
}

.main-content.bg-7 .control-btn {
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

.main-content.bg-7 .control-btn:hover {
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

.main-content.bg-7 .control-btn.decrease-btn {
    background: #e53e3e;
}

.main-content.bg-7 .control-btn.decrease-btn:hover {
    background: #c53030;
}

.main-content.bg-7 .control-btn.increase-btn {
    background: #38a169;
}

.main-content.bg-7 .control-btn.increase-btn:hover {
    background: #2f855a;
}

/* 夜间模式主题卡片样式 */
.main-content.bg-7 .theme-card {
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

.main-content.bg-7 .theme-card:hover {
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.15);
}

.main-content.bg-7 .theme-card.active {
    border-color: #4299e1;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.main-content.bg-7 .theme-card.active::after {
    background: #4299e1;
}

.main-content.bg-7 .theme-card[data-theme="bg-1"] {
    border: 1px solid #4a5568;
}

.main-content.bg-7 .theme-card[data-theme="bg-7"] {
    border: 1px solid #4a5568;
}

.main-content.bg-7 .chapter-item {
    border-bottom: 1px solid #333;
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.main-content.bg-7 .chapter-item:hover {
    background: #2d3748;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.main-content.bg-7 .chapter-item.current {
    background: linear-gradient(135deg, #1a365d, #2d3748);
    color: #4299e1;
    border-left: 4px solid #4299e1;
    box-shadow: 0 2px 12px rgba(66, 153, 225, 0.3);
}

.main-content.bg-7 .chapter-item.current::before {
    background: linear-gradient(180deg, #4299e1, #3182ce);
}

.main-content.bg-7 .chapter-item .chapter-index {
    color: #a0aec0;
}

.main-content.bg-7 .chapter-item .chapter-name {
    color: #e2e8f0;
}

/* 夜间模式状态图标样式调整 */
.main-content.bg-7 .chapter-state.state-free {
    background: linear-gradient(135deg, #38a169, #48bb78);
    box-shadow: 0 2px 6px rgba(56, 161, 105, 0.4);
}

.main-content.bg-7 .chapter-state.state-free-time {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    box-shadow: 0 2px 6px rgba(237, 137, 54, 0.4);
}

.main-content.bg-7 .chapter-state.state-login {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    box-shadow: 0 2px 6px rgba(66, 153, 225, 0.4);
}

.main-content.bg-7 .chapter-state.state-vip {
    background: linear-gradient(135deg, #b794f6, #9f7aea);
    box-shadow: 0 2px 6px rgba(183, 148, 246, 0.4);
}

.main-content.bg-7 .chapter-state.state-lock {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    box-shadow: 0 2px 6px rgba(245, 101, 101, 0.4);
}

.main-content.bg-7 .chapter-state.state-purchased {
    background: linear-gradient(135deg, #4fd1c7, #38b2ac);
    box-shadow: 0 2px 6px rgba(79, 209, 199, 0.4);
}

.main-content.bg-7 .chapter-state::after {
    background: rgba(26, 32, 44, 0.9);
    color: #f7fafc;
}

.main-content.bg-7 .chapter-header {
    border-bottom: 1px solid #333;
    background: #000;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* 夜间模式返回书籍链接样式 */
.main-content.bg-7 .back-to-book {
    background: #2d3748;
    color: #e2e8f0;
    border: 1px solid #4a5568;
}

.main-content.bg-7 .back-to-book:hover {
    background: #4a5568;
    color: #f7fafc;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

/* 夜间模式分页样式 */
.main-content.bg-7 .pagination-wrapper {
    background: #000;
    border-bottom: 1px solid #333;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

.main-content.bg-7 .pagination-arrow {
    background: #2d3748;
    color: #e2e8f0;
    border: 1px solid #4a5568;
}



.main-content.bg-7 .pagination-arrow:active {
    background: #1a202c;
}

.main-content.bg-7 .pagination-arrow.dragging {
    background: #2b6cb0;
    color: #bee3f8;
}

.main-content.bg-7 .pagination-nav {
    background: #000;
    scrollbar-color: #666 transparent;
}

/* 夜间模式滚动条样式 */
.main-content.bg-7 .pagination-nav::-webkit-scrollbar-track {
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 12px;
}

.main-content.bg-7 .pagination-nav::-webkit-scrollbar-thumb {
    background: #666;
    border: 3px solid #2d3748;
    background-clip: content-box;
    border-radius: 12px;
}

.main-content.bg-7 .pagination-nav::-webkit-scrollbar-thumb:hover {
    background: #888;
    border: 3px solid #2d3748;
    background-clip: content-box;
}

/* 夜间模式移动端滚动条 */
@media (max-width: 768px) {
    .main-content.bg-7 .pagination-nav::-webkit-scrollbar-track {
        background: transparent;
        border: none;
    }
    
    .main-content.bg-7 .pagination-nav::-webkit-scrollbar-thumb {
        background: #666;
        border: none;
        background-clip: initial;
    }
    
    .main-content.bg-7 .pagination-nav::-webkit-scrollbar-thumb:hover {
        background: #888;
        border: none;
        background-clip: initial;
    }
}



/* 夜间模式滑动提示 */
@media (max-width: 768px) {
    .main-content.bg-7 .pagination-nav.show-swipe-hint::after {
        color: #64b5f6;
        background: rgba(30, 30, 30, 0.95);
        border: 1px solid #555;
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    }
    
    .main-content.bg-7 .settings-modal .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .main-content.bg-7 .theme-grid {
        gap: 6px;
    }
    
    .main-content.bg-7 .theme-card {
        height: 40px;
        font-size: 12px;
    }
}

.main-content.bg-7 .page-btn {
    background: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
}

.main-content.bg-7 .page-btn:hover {
    background: #4a5568;
    border-color: #718096;
    color: #f7fafc;
}

.main-content.bg-7 .page-btn.current {
    background: #4299e1;
    border-color: #4299e1;
    color: #fff;
}

.main-content.bg-7 .page-btn.current:hover {
    background: #3182ce;
    border-color: #3182ce;
    color: #fff;
}

.main-content.bg-7 .page-btn.first {
    border-left: 2px solid #4299e1;
}

.main-content.bg-7 .page-btn.last {
    border-right: 2px solid #4299e1;
}

.main-content.bg-7 .no-chapters {
    color: #a0aec0;
}

.main-content.bg-7 .chapters-container {
    border-radius: 8px;
}

/* 滚动隐藏头部 */
.chapter-header.header-hidden {
    transform: translateY(-100%);
}

/* 夜间模式章节列表 */
.main-content.bg-7 .chapter-list {
    background: #000;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .chapter_container {
        max-width: 100%;
        box-shadow: none;
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* 移动端主题优化 */
@media (max-width: 768px) {
    .settings-modal .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .theme-grid {
        gap: 6px;
    }
    
    .theme-card {
        height: 40px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .theme-grid {
        gap: 5px;
    }
    
    .theme-card {
        height: 35px;
        font-size: 11px;
    }
    
    .theme-card.active::after {
        width: 16px;
        height: 16px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }
    
    /* 移动端阅读设置表格样式 */
    .setting-label {
        font-size: 14px;
        width: 90px;
    }
    
    .setting-control {
        gap: 8px;
        width: 200px;
    }
    
    .control-btn {
        width: 35px;
        height: 32px;
        font-size: 14px;
    }
    
    .control-value {
        font-size: 14px;
        width: 80px;
        padding: 6px 8px;
    }
}

/* 超小屏幕（380px以下）进一步优化 */
@media (max-width: 380px) {
    .setting-label {
        font-size: 13px;
        width: 70px;
    }
    
    .setting-control {
        gap: 6px;
        width: 180px;
    }
    
    .control-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    
    .control-value {
        font-size: 13px;
        width: 60px;
        padding: 5px 6px;
    }
}

/* 图标字体 */
.icon-catalog::before { content: "📚"; }
.icon-settings::before { content: "⚙️"; }
.icon-arrow-left::before,
.icon-back::before { content: "←"; }
.icon-arrow-right::before { content: "→"; }
.icon-close::before { content: "×"; }
.icon-night::before { content: "🌙"; }
.icon-home::before { content: "🏠"; }
.icon-follow::before { content: "♡"; }
.icon-followed::before { content: "❤️"; }
.icon-feedback::before { content: "💬"; }

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #3498db;
    margin-right: 8px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading::after {
    content: '加载中...';
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 夜间模式加载状态 */
.main-content.bg-7 .loading {
    color: #ccc;
}

.main-content.bg-7 .loading::before {
    background: #4299e1;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 大屏幕优化 */
@media (min-width: 900px) {
    .chapter_container {
        max-width: 900px;
        margin: 0 auto;
    }
}

/* 超宽屏幕优化 */
@media (min-width: 1920px) {
    .chapter_container {
        max-width: 1600px;
    }
}

/* 夜间模式滚动条样式 */
body.bg-7 ::-webkit-scrollbar-track {
    background: #333;
}

body.bg-7 ::-webkit-scrollbar-thumb {
    background: #666;
}

body.bg-7 ::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* 下一章按钮包装器 */
.next-chapter-wrapper {
    margin: 0px 0 40px 0;
    padding: 0;
    width:100%;
    position: relative;
}

/* 章节结束分隔区域 */
.chapter-end-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    padding: 30px 20px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.chapter-end-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #f39c12, #e74c3c, #9b59b6);
    background-size: 200% 100%;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 章节完成提示 */
.chapter-complete-info {
    text-align: center;
    margin-bottom: 25px;
}

.chapter-complete-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.chapter-complete-title::before,
.chapter-complete-title::after {
    content: '';
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3498db, transparent);
}

/* 章节导航区域 */
.chapter-navigation {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

/* 上一章按钮 */
.prev-chapter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(149, 165, 166, 0.3);
    min-width: 100px;
    justify-content: center;
}

.prev-chapter-btn:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(149, 165, 166, 0.4);
    color: #fff;
    text-decoration: none;
}

.prev-chapter-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.prev-chapter-btn:hover i {
    transform: translateX(-3px);
}

/* 下一章按钮 - 重新设计 */
.chapter-content .nextChantper,
.next-chapter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    min-width: 140px;
    justify-content: center;
}

.chapter-content .nextChantper::before,
.next-chapter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.chapter-content .nextChantper:hover::before,
.next-chapter-btn:hover::before {
    left: 100%;
}

.chapter-content .nextChantper:hover,
.next-chapter-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.5);
    color: #fff;
    text-decoration: none;
}

.chapter-content .nextChantper i,
.next-chapter-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.chapter-content .nextChantper:hover i,
.next-chapter-btn:hover i {
    transform: translateX(3px);
}

.chapter-content .nextChantper:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

/* 章节信息预览 */
.next-chapter-preview {
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid #3498db;
}

.next-chapter-preview-title {
    font-size: 14px;
    color: #3498db;
    font-weight: 600;
    margin-bottom: 5px;
}

.next-chapter-preview-name {
    font-size: 16px;
    color: #000;
    font-weight: 500;
    margin-bottom: 8px;
}

.next-chapter-preview-desc {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.4;
}

/* 章节统计信息 */
.chapter-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.stat-item {
    text-align: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    min-width: 60px;
}

.stat-number {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 移动端下一章按钮优化 */
@media (max-width: 768px) {
    .next-chapter-wrapper {
        margin: 40px 0 30px 0;
    }
    
    .chapter-end-section {
        margin: 30px 0;
        padding: 25px 15px;
        border-radius: 12px;
    }
    
    .chapter-complete-title {
        font-size: 16px;
    }
    
    .chapter-complete-title::before,
    .chapter-complete-title::after {
        width: 20px;
    }

    .chapter-navigation {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .prev-chapter-btn {
        padding: 10px 18px;
        font-size: 13px;
        min-width: 90px;
        border-radius: 10px;
    }
    
    .chapter-content .nextChantper,
    .next-chapter-btn {
        padding: 14px 24px;
        font-size: 15px;
        min-width: 120px;
        border-radius: 10px;
    }
    
    .next-chapter-preview {
        padding: 12px;
        margin-top: 15px;
        border-radius: 8px;
    }
    
    .next-chapter-preview-title {
        font-size: 13px;
    }
    
    .next-chapter-preview-name {
        font-size: 15px;
    }
    
    .next-chapter-preview-desc {
        font-size: 11px;
    }
    
    .chapter-stats {
        gap: 15px;
        margin-top: 15px;
        padding-top: 15px;
        flex-wrap: wrap;
    }
    
    .stat-item {
        padding: 6px 10px;
        min-width: 50px;
    }
    
    .stat-number {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .next-chapter-wrapper {
        margin: 30px 0 20px 0;
    }
    
    .chapter-end-section {
        margin: 20px 0;
        padding: 20px 12px;
        border-radius: 10px;
    }
    
    .chapter-complete-title {
        font-size: 15px;
        gap: 8px;
    }
    
    .chapter-complete-title::before,
    .chapter-complete-title::after {
        width: 15px;
    }

    .chapter-navigation {
        gap: 10px;
    }
    
    .prev-chapter-btn {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 80px;
        border-radius: 8px;
    }
    
    .chapter-content .nextChantper,
    .next-chapter-btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 100px;
        border-radius: 8px;
    }
    
    .next-chapter-preview {
        padding: 10px;
        margin-top: 12px;
    }
    
    .next-chapter-preview-title {
        font-size: 12px;
    }
    
    .next-chapter-preview-name {
        font-size: 14px;
    }
    
    .next-chapter-preview-desc {
        font-size: 10px;
    }
    
    .chapter-stats {
        gap: 10px;
        margin-top: 12px;
        padding-top: 12px;
    }
    
    .stat-item {
        padding: 5px 8px;
        min-width: 45px;
    }
    
    .stat-number {
        font-size: 14px;
    }
    
    .stat-label {
        font-size: 9px;
    }
}

/* 夜间模式下一章按钮样式 */
.main-content.bg-7 .next-chapter-wrapper {
    border-top: none;
}

.main-content.bg-7 .chapter-end-section {
    background: linear-gradient(135deg, #1a202c, #2d3748);
    border: 1px solid #4a5568;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.main-content.bg-7 .chapter-end-section::before {
    background: linear-gradient(90deg, #4299e1, #48bb78, #ed8936, #f56565, #b794f6);
}

.main-content.bg-7 .chapter-complete-title {
    color: #f7fafc;
}

.main-content.bg-7 .chapter-complete-title::before,
.main-content.bg-7 .chapter-complete-title::after {
    background: linear-gradient(90deg, transparent, #4299e1, transparent);
}

.main-content.bg-7 .prev-chapter-btn {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    box-shadow: 0 3px 12px rgba(74, 85, 104, 0.4);
}

.main-content.bg-7 .prev-chapter-btn:hover {
    background: linear-gradient(135deg, #2d3748, #1a202c);
    box-shadow: 0 5px 18px rgba(74, 85, 104, 0.5);
}

.main-content.bg-7 .chapter-content .nextChantper,
.main-content.bg-7 .next-chapter-btn {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    box-shadow: 0 4px 20px rgba(66, 153, 225, 0.4);
}

.main-content.bg-7 .chapter-content .nextChantper:hover,
.main-content.bg-7 .next-chapter-btn:hover {
    background: linear-gradient(135deg, #3182ce, #2c5aa0);
    box-shadow: 0 6px 25px rgba(66, 153, 225, 0.5);
}

.main-content.bg-7 .next-chapter-preview {
    background: rgba(66, 153, 225, 0.15);
    border-left: 4px solid #4299e1;
}

.main-content.bg-7 .next-chapter-preview-title {
    color: #4299e1;
}

.main-content.bg-7 .next-chapter-preview-name {
    color: #f7fafc;
}

.main-content.bg-7 .next-chapter-preview-desc {
    color: #a0aec0;
}

.main-content.bg-7 .chapter-stats {
    border-top: 1px solid #4a5568;
}

.main-content.bg-7 .stat-item {
    background: #2d3748;
    border: 1px solid #4a5568;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.main-content.bg-7 .stat-number {
    color: #4299e1;
}

.main-content.bg-7 .stat-label {
    color: #a0aec0;
}

/* 章节要求遮罩层和提示框样式 */

/* 遮罩层 */
.chapter-reqire-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.3) 0%, 
        rgba(0, 0, 0, 0.25) 50%, 
        rgba(0, 0, 0, 0.35) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    animation: maskFadeIn 0.4s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes maskFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
}

/* 提示框容器 */
.chapter-reqire-info {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: infoSlideUp 0.5s ease-out;
    max-width: 900px;
    margin: 0 auto;
}

@keyframes infoSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 提示框内容 */
.chapter-reqire-purchase,
.chapter-reqire-login {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chapter-reqire-purchase::before,
.chapter-reqire-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #f39c12, #e74c3c);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

/* 购买提示框样式 */
.chapter-reqire-purchase .nocoin {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chapter-reqire-purchase .buy {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 价格信息 */
.chapter-price {
    background: linear-gradient(135deg, #e8f4f8, #f0f8ff);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e1f0fa;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chapter-price span {
    color: #7f8c8d;
    font-weight: 500;
}

/* 用户余额 */
.user-balance {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* 自动购买选项 */
.auto-purchase {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.auto-purchase label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #000;
    cursor: pointer;
    user-select: none;
}

.auto-purchase input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3498db;
    cursor: pointer;
    border-radius: 4px;
}

/* 购买按钮区域 */
.purchase-btn {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.purchase-btn button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.purchase-btn button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.purchase-btn button:hover::before {
    left: 100%;
}

.purchase-btn button:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.purchase-btn button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.purchase-btn a {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(231, 76, 60, 0.3);
    display: inline-block;
    text-align: center;
}

.purchase-btn a:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    color: white;
    text-decoration: none;
}

/* 登录提示框样式 */
.chapter-reqire-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 20px;
}

/* 链接导航区域 */
.chapter-reqire-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
    margin-bottom: 5px;
}

.chapter-reqire-links a {
    color: #3498db;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.1);
    min-width: 60px;
    text-align: center;
}

.chapter-reqire-links a:hover {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
    color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.chapter-reqire-links a:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(52, 152, 219, 0.15);
}

.chapter-reqire-login button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chapter-reqire-login button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.chapter-reqire-login button:hover::before {
    left: 100%;
}

.chapter-reqire-login button:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.chapter-reqire-login button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* 添加登录图标 */
.chapter-reqire-login button::after {
    content: '🔐';
    font-size: 16px;
}

/* 移动端章节要求遮罩层优化 */
@media (max-width: 768px) {
    .chapter-reqire-info {
        padding: 15px;
    }
    
    .chapter-reqire-purchase,
    .chapter-reqire-login {
        padding: 25px 20px;
        border-radius: 16px;
        max-width: 350px;
    }
    
    .chapter-reqire-links {
        gap: 15px;
        padding: 12px 0;
    }
    
    .chapter-reqire-links a {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 50px;
    }
    
    .chapter-price {
        padding: 12px;
        font-size: 15px;
    }
    
    .user-balance {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .auto-purchase {
        padding: 8px;
    }
    
    .auto-purchase label {
        font-size: 13px;
    }
    
    .purchase-btn button {
        padding: 14px 28px;
        font-size: 15px;
        min-width: 100px;
    }
    
    .purchase-btn a {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .chapter-reqire-login button {
        padding: 16px 32px;
        font-size: 15px;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .chapter-reqire-info {
        padding: 10px;
    }
    
    .chapter-reqire-purchase,
    .chapter-reqire-login {
        padding: 20px 15px;
        border-radius: 12px;
        max-width: 320px;
    }
    
    .chapter-reqire-links {
        gap: 10px;
        padding: 10px 0;
        flex-wrap: wrap;
    }
    
    .chapter-reqire-links a {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 45px;
        flex: 1;
        max-width: 80px;
    }
    
    .chapter-price {
        padding: 10px;
        font-size: 14px;
    }
    
    .user-balance {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .auto-purchase {
        padding: 6px;
    }
    
    .auto-purchase label {
        font-size: 12px;
    }
    
    .auto-purchase input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
    
    .purchase-btn button {
        padding: 12px 24px;
        font-size: 14px;
        min-width: 90px;
    }
    
    .purchase-btn a {
        padding: 10px 18px;
        font-size: 12px;
    }
    
    .chapter-reqire-login button {
        padding: 14px 28px;
        font-size: 14px;
        min-width: 100px;
    }
}

/* 响应式设计优化 */
@media (max-height: 600px) {
    .chapter-reqire-info {
        padding: 10px;
    }
    
    .chapter-reqire-purchase,
    .chapter-reqire-login {
        padding: 20px 15px;
    }
    
    .chapter-reqire-purchase .nocoin {
        gap: 15px;
    }
    
    .chapter-reqire-purchase .buy {
        gap: 12px;
    }
}

/* 动画优化 */
.chapter-reqire-mask,
.chapter-reqire-info {
    will-change: transform, opacity;
}

/* 夜间模式章节要求遮罩层样式 */
.main-content.bg-7 .chapter-reqire-links {
    border-bottom: 1px solid rgba(66, 153, 225, 0.2);
}

.main-content.bg-7 .chapter-reqire-links a {
    color: #4299e1;
    background: rgba(66, 153, 225, 0.1);
    border: 1px solid rgba(66, 153, 225, 0.2);
}

.main-content.bg-7 .chapter-reqire-links a:hover {
    background: rgba(66, 153, 225, 0.2);
    border-color: rgba(66, 153, 225, 0.4);
    color: #63b3ed;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.main-content.bg-7 .chapter-reqire-links a:active {
    box-shadow: 0 1px 4px rgba(66, 153, 225, 0.25);
}

/* 无障碍优化 */
.chapter-reqire-purchase button:focus,
.chapter-reqire-login button:focus,
.purchase-btn button:focus,
.purchase-btn a:focus,
.chapter-reqire-links a:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* 夜间模式无障碍优化 */
.main-content.bg-7 .chapter-reqire-links a:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}
