.book-card-module{
    margin:24px 0;
    position: relative;
}
.module-header{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:14px;
}
.module-title{
    font-size:18px;
    font-weight:600;
    color:var(--caption-color);
    margin:0;
}
.slide-tip{
    font-size:13px;
    color:var(--text-secondary);
}

/* 滚动容器：仅开启滑动时生效 */
.book-scroll-wrap.scroll-enable{
    overflow-x:auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.book-scroll-wrap.scroll-enable::-webkit-scrollbar{
    display: none;
}

/* 修复问题2、问题3：区分滑动与非滑动布局 */
/* 滑动模式：横向不换行 */
.book-scroll-wrap.scroll-enable .book-card-list{
    display: flex;
    flex-wrap: nowrap;
    gap: 18px;
    padding: 4px 0 8px;
}

/* 非滑动模式：网格布局，按配置列数显示 */
.book-scroll-wrap:not(.scroll-enable) .book-card-list{
    display: grid;
    grid-template-columns: repeat(var(--col-count), 1fr);
    gap: 18px;
    padding: 4px 0 8px;
}

/* 卡片基础样式 */
.book-item{
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* 滑动模式下卡片固定宽度 */
.book-scroll-wrap.scroll-enable .book-item{
    width: 160px;
    flex-shrink: 0;
}

.book-item:hover{
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.book-cover img{
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    display: block;
}
.book-info{
    margin-top: 10px;
}
.book-name{
    font-size:14px;
    color:var(--text-primary);
    line-height:1.4;
    margin:0 0 8px;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    font-weight: 500;
}
.book-name a{
    color:inherit;
    text-decoration:none;
}
.book-tag-row{
    display:flex;
    gap:6px;
    margin-bottom:8px;
    flex-wrap:wrap;
    align-items:center;
}
.cate-tag{
    font-size:11px;
    padding:2px 6px;
    background: var(--theme-color);
    color: #fff;
    border-radius: 4px;
    opacity: 0.9;
    white-space: nowrap;
}
.sub-tag{
    font-size:11px;
    color:var(--text-tertiary);
    white-space: nowrap;
}
.book-data{
    display:flex;
    justify-content:space-between;
    font-size:12px;
    color:var(--text-secondary);
}
.data-item{
    display:flex;
    align-items:center;
    gap:3px;
}
.data-icon{
    width:12px;
    height:12px;
    flex-shrink:0;
}
.empty-tip{
    padding:40px 0;
    width:100%;
    text-align:center;
    color:var(--text-tertiary);
}

/* 左右滑动按钮样式 */
.slide-btn{
    position: absolute;
    top: calc(50% + 17px);
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.95);
    color: #333;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    user-select: none;
    padding: 0;
}
.slide-btn:hover{
    background: var(--theme-color);
    color: #fff;
}
.slide-prev{
    left: -10px;
}
.slide-next{
    right: -10px;
}

/* 深色模式适配按钮 */
html[data-theme="dark"] .slide-btn{
    background: rgba(40,40,40,0.95);
    color: #eee;
}
html[data-theme="dark"] .slide-btn:hover{
    background: var(--theme-color);
    color: #fff;
}