/* 全局变量 */
:root {
    --primary-color: #4e8cbb;
    --primary-dark: #3a7cb2;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #f5f5f5;
    --border-color: #e6d8b6;
    --hover-color: #b89b5b;
    --section-bg: #f9f6ec;
    --card-shadow: 0 2px 12px rgba(180,160,100,0.10);
}

/* 主体内容区域样式 */
.g-bd {
    margin: 0;
    background: var(--bg-color);
}

.m-booklist {
    background: var(--section-bg);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

/* 书籍简介样式 - 重新设计 */
.book-intro {
    display: flex;
    flex-direction: row;
    gap: 30px;
    margin-bottom: 5px;
    padding: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #fefcf8 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(180,160,100,0.12);
    border: 1px solid rgba(230, 216, 182, 0.3);
    position: relative;
    overflow: hidden;
}

.book-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #b89b5b, #d4c4a0, #b89b5b);
}

.book-cover {
    position: relative;
    width: 140px;
    height: 180px;
    background: linear-gradient(145deg, #fcf9f3 0%, #f5f1e8 100%);
    border-radius: 12px;
    box-shadow: 
        0 8px 24px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(230, 216, 182, 0.4);
    transition: transform 0.3s ease;
}

.book-cover:hover {
    transform: translateY(-2px);
}

.book-cover-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #b89b5b 0%, #d4c4a0 50%, #b89b5b 100%);
    border-radius: 12px 12px 0 0;
}

.book-cover-left {
    position: absolute;
    top: 15px;
    left: 15px;
    bottom: 15px;
    width: 3px;
    background: linear-gradient(180deg, #e6d8b6 0%, #d4c4a0 100%);
    border-radius: 2px;
}

.book-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #d5b788 0%, #b89b5b 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(139, 107, 74, 0.3);
    border: 2px solid rgba(255,255,255,0.2);
}

.book-icon span {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.book-title {
    font-size: 16px;
    font-weight: 600;
    color: #5a442e;
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.3;
    max-width: 120px;
    word-wrap: break-word;
}

.book-author {
    font-size: 13px;
    color: #8b7355;
    text-align: center;
    font-weight: 500;
}

.book-info {
    flex: 1;
    min-width: 0;
}

.book-info h1 {
    font-size: 28px;
    color: #2c1810;
    margin: 0 0 20px 0;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.book-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 5px;
}

.meta-item {
    display: flex;
    align-items: center;
    padding: 12px 5px;
    background: rgba(248, 245, 238, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(230, 216, 182, 0.3);
}

.meta-label {
    font-weight: 600;
    color: #5a442e;
    margin-right: 8px;
    min-width: 60px;
}

.meta-value {
    color: #6d5b3b;
    flex: 1;
}

.book-info .desc {
    background: rgba(249, 246, 236, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(230, 216, 182, 0.3);
}

.book-info .desc h3 {
    font-size: 18px;
    color: #5a442e;
    margin: 0 0 2px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.book-info .desc h3::before {
    content: '📖';
    margin-right: 8px;
    font-size: 16px;
}

.book-info .desc p {
    color: #6d5b3b;
    line-height: 1.7;
    font-size: 16px;
    margin: 0;
    text-align: justify;
}

/* 响应式设计 - 手机端优化 */
@media (max-width: 768px) {
    .book-intro {
        flex-direction: column;
        gap: 10px;
        padding: 5px;
        text-align: center;
    }
    
    .book-cover {
        width: 120px;
        height: 160px;
        margin: 0 auto;
    }
    
    .book-info h1 {
        font-size: 24px;
        text-align: center;
    }
    
    .book-meta {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    
    .meta-item {
        justify-content: center;
        text-align: center;
    }
    
    .meta-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {

    
    .book-cover {
        width: 200px;
        height: 150px;
    }
    
    .book-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .book-icon span {
        font-size: 20px;
    }
    
    .book-title {
        font-size: 16px;
    }
    
    .book-author {
        font-size: 16px;
    }
    
 
    
    .book-info .desc {
        padding: 1px;
    }
}

/* 分类筛选样式 */
.category-filter {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fefcf8 100%);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(180,160,100,0.08);
    border: 1px solid rgba(230, 216, 182, 0.3);
}

.category-filter h3 {
    font-size: 20px;
    color: #5a442e;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-tab {
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e6d8b6;
    border-radius: 8px;
    text-decoration: none;
    color: #6d5b3b;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(180,160,100,0.05);
}

.filter-tab:hover {
    background: #f8f5f0;
    text-decoration: none;
    color: #5a442e;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(180,160,100,0.12);
}

.filter-tab.active {
    background: linear-gradient(135deg, #b89b5b 0%, #d4c4a0 100%);
    color: #fff;
    border-color: #b89b5b;
    box-shadow: 0 4px 12px rgba(184, 155, 91, 0.3);
}

.chapter-count {
    color: inherit;
    font-size: 13px;
    opacity: 0.8;
}

.filter-tab.active .chapter-count {
    color: rgba(255,255,255,0.9);
}

@media (max-width: 768px) {
    .category-filter {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .filter-tabs {
        gap: 8px;
    }
    
    .filter-tab {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* 分类列表样式 */
.category-list {
    margin-bottom: 5px;
}

.category-item {
    margin-bottom: 5px;
    background: var(--section-bg);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

 

    .category-item:last-child {
        margin-bottom: 0;
    }

.category-title {
    background:#fff;
    font-size: 22px;
    padding-left:10px;
    color: #5a4321;
    margin-bottom: 5px;
    padding-bottom: 2px;
    border-bottom: 2px solid var(--hover-color);
    font-weight: 600;
}

.chapter-list ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    list-style: none;
    padding: 0;
}

.chapter-list li {
    margin-bottom: 2px;
    background:#fff;
}

.chapter-list a {
    display: block;
    padding: 12px 18px;
    color: #6d5b3b;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(180,160,100,0.05);
    border: 1px solid var(--border-color);
}



/* 分页样式 */
.pagination {
    text-align: center;
    margin-top: 30px;
}

    .pagination a,
    .pagination span {
        display: inline-block;
        padding: 8px 16px;
        margin: 0 4px;
        color: #6d5b3b;
        text-decoration: none;
        background: #f3e9d7;
        border-radius: 6px;
        border: 1px solid var(--border-color);
        transition: all 0.3s ease;
    }

      

@media screen and (max-width: 768px) {
  

  
    .chapter-list ul {
        grid-template-columns: 1fr;
    }

  

    .category-title {
        font-size: 20px;
    }

    .pagination a,
    .pagination span {
        padding: 6px 12px;
        margin: 0 2px;
        font-size: 14px;
    }
}