/* ==================== 分类列表页样式 ==================== */

/* 排序栏 */
.sort-bar { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); padding: 12px 20px; margin-bottom: 20px; }
.sort-bar a { display: inline-block; padding: 6px 18px; margin-right: 10px; background: #ebf5fb; color: #333; border-radius: 5px; font-size: 13px; transition: all 0.3s; }
.sort-bar a:hover, .sort-bar a.active { background: #3498db; color: #fff; }

/* 分类推荐 */
.cat-recommend { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin: 20px 0; overflow: hidden; }
.cat-recommend .section-header { background: linear-gradient(135deg, #3498db, #5dade2); color: #fff; padding: 12px 20px; font-weight: bold; font-size: 15px; }
.recommend-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; padding: 20px; }
.recommend-item { display: flex; gap: 12px; padding: 10px; border: 1px solid #d6eaf8; border-radius: 5px; transition: all 0.3s; }
.recommend-item:hover { box-shadow: 0 4px 12px rgba(52,152,219,0.15); transform: translateY(-2px); border-color: #3498db; }
.recommend-cover { width: 80px; height: 100px; background: #f0f8ff; border-radius: 5px; overflow: hidden; flex-shrink: 0; }
.recommend-cover img { width: 100%; height: 100%; object-fit: cover; }
.recommend-info { flex: 1; overflow: hidden; }
.recommend-title { font-size: 13px; font-weight: bold; margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 8em; }
.recommend-title a { color: #333; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recommend-title a:hover { color: #3498db; }
.recommend-author { font-size: 11px; color: #999; margin-bottom: 8px; }
.recommend-intro { font-size: 11px; color: #666; line-height: 1.4; height: 45px; overflow: hidden; }

/* 列表区 */
.list-grid { display: grid; grid-template-columns: 2.5fr 1fr; gap: 20px; margin-bottom: 20px; }
.list { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: hidden; }
.category-title { background: linear-gradient(135deg, #3498db, #5dade2); color: #fff; padding: 12px 20px; font-weight: bold; font-size: 15px; }
.list-content { padding: 15px; }
.list-item { display: grid; grid-template-columns: 80px 120px 1fr 90px 60px; align-items: center; padding: 10px; border-bottom: 1px solid #eee; font-size: 13px; gap: 10px; }
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: #ebf5fb; }
.list-item .cat-tag { color: #3498db; font-weight: bold; font-size: 12px; }
.list-item .book-name a { color: #333; }
.list-item .book-name a:hover { color: #3498db; }
.list-item .chapter a { color: #666; font-size: 12px; }
.list-item .chapter a:hover { color: #3498db; }
.list-item .author { color: #999; font-size: 12px; text-align: right; }
.list-item .date { color: #999; font-size: 12px; text-align: right; }
.list-item-mini { display: grid; grid-template-columns: 40px 1fr 100px; align-items: center; padding: 10px; border-bottom: 1px solid #eee; font-size: 13px; }
.list-item-mini:last-child { border-bottom: none; }
.list-item-mini:hover { background: #ebf5fb; }

/* 分页 */
.pagination { text-align: center; padding: 20px; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin: 20px 0; }
.pagination a, .pagination span { display: inline-block; padding: 8px 15px; margin: 0 3px; background: #fff; border: 1px solid #d6eaf8; color: #333; border-radius: 5px; font-size: 13px; transition: all 0.3s; }
.pagination a:hover { background: #3498db; color: #fff; border-color: #3498db; }
.pagination .current { background: #3498db; color: #fff; border-color: #3498db; }
.pagination .disabled { color: #999; pointer-events: none; background: #f5f5f5; }

/* 响应式 */
@media (max-width: 1024px) {
    .recommend-grid { grid-template-columns: repeat(3, 1fr); }
    .list-grid { grid-template-columns: 2fr 1fr; }
}
@media (max-width: 768px) {
    .recommend-grid { grid-template-columns: repeat(2, 1fr); }
    .list-grid { grid-template-columns: 1fr; }
    .list-item { grid-template-columns: 1fr; gap: 5px; font-size: 12px; }
    .list-item .cat-tag { display: none; }
    .list-item-mini { grid-template-columns: 30px 1fr 80px; }
    .pagination a, .pagination span { padding: 6px 10px; font-size: 12px; }
}
@media (max-width: 480px) {
    .recommend-grid { grid-template-columns: 1fr; }
    .recommend-cover { width: 60px; height: 75px; }
    .recommend-title { max-width: 100%; }
    .sort-bar a { padding: 5px 12px; font-size: 12px; margin-right: 5px; }
}
