/* ==================== 首页样式 ==================== */

/* 推荐区 */
.recommend-section { display: flex; gap: 17px; margin-bottom: 20px; margin-top: 20px; }
.pic-recommend { width: 772px; flex-shrink: 0; }
.classic-recommend { width: 376px; flex-shrink: 0; }
.pic-recommend { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: hidden; }
.pic-recommend-title { background: linear-gradient(135deg, #3498db, #5dade2); color: #fff; padding: 12px 20px; font-weight: bold; font-size: 15px; }
.pic-recommend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 15px; }
.pic-recommend-grid .img-card { display: flex; gap: 10px; padding: 10px; border: 1px solid #eee; border-radius: 8px; transition: all 0.3s; text-decoration: none; color: inherit; align-items: flex-start; overflow: hidden; }
.pic-recommend-grid .img-card:hover { transform: translateY(-2px); border-color: #3498db; box-shadow: 0 4px 12px rgba(52,152,219,0.15); }
.pic-recommend-grid .img-cover { width: 96px; height: 127px; border-radius: 5px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); flex-shrink: 0; }
.pic-recommend-grid .img-cover img { width: 100%; height: 100%; object-fit: cover; }
.pic-recommend-grid .img-info { flex: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden; min-width: 0; max-width: calc(100% - 106px); }
.pic-recommend-grid .img-name { font-size: 14px; font-weight: bold; color: #3498db; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 6px; }
.pic-recommend-grid .img-author { font-size: 12px; color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 4px; }
.pic-recommend-grid .img-date { font-size: 11px; color: #aaa; margin-bottom: 4px; }
.pic-recommend-grid .img-intro { font-size: 12px; color: #666; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }

.classic-recommend { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: hidden; }
.classic-recommend-title { background: linear-gradient(135deg, #3498db, #5dade2); color: #fff; padding: 12px 20px; font-weight: bold; font-size: 15px; }
.classic-list { padding: 10px 15px; }
.classic-item { padding: 8px 0; border-bottom: 1px dashed #eee; display: flex; align-items: center; gap: 8px; }
.classic-item:last-child { border-bottom: none; }
.classic-item-rank { width: 20px; height: 20px; border-radius: 4px; font-size: 12px; font-weight: bold; color: #fff; background: #bbb; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.classic-item:nth-child(-n+3) .classic-item-rank { background: #3498db; }
.classic-item-name { font-size: 13px; color: #3498db; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.classic-item-info { font-size: 11px; color: #999; white-space: nowrap; text-align: right; }

/* 分类区 */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.category-item { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: hidden; }
.category-header { background: linear-gradient(135deg, #3498db, #5dade2); color: #fff; padding: 10px 15px; font-weight: bold; font-size: 15px; }
.category-body { padding: 15px; }
.cat-pic-row { display: flex; gap: 15px; padding: 8px 0; border-bottom: 1px dashed #eee; margin-bottom: 10px; }
.cat-pic-cover { width: 70px; height: 93px; flex-shrink: 0; border-radius: 3px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.cat-pic-cover img { width: 100%; height: 100%; object-fit: cover; }
.cat-pic-info { flex: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden; min-width: 0; }
.cat-pic-title-row { display: flex; align-items: center; margin-bottom: 5px; overflow: hidden; gap: 6px; }
.cat-pic-title { font-size: 14px; font-weight: bold; color: #3498db; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex-shrink: 1; }
.cat-pic-title a { color: #3498db; }
.cat-pic-author { font-size: 12px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 90px; }
.cat-pic-intro { font-size: 12px; color: #666; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cat-grid-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.cat-grid-row a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #333; text-align: left; }
.cat-grid-row a:hover { color: #3498db; }
.cat-grid-row span { font-size: 11px; color: #999; white-space: nowrap; margin-left: 5px; }

/* 列表区 */
.list-grid { display: flex; gap: 17px; margin-bottom: 20px; }
.list-grid .block:first-child { width: 773px; flex-shrink: 0; }
.list-grid .block:last-child { width: 377px; flex-shrink: 0; }
.block { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: hidden; }
.block-title { background: linear-gradient(135deg, #3498db, #5dade2); color: #fff; padding: 12px 20px; font-weight: bold; font-size: 15px; }
.block-content { padding: 10px 15px; }
.update-row { display: grid; grid-template-columns: 50px 170px 1fr 68px 50px; align-items: center; padding: 7px 4px; border-bottom: 1px solid #f0f0f0; font-size: 13px; gap: 6px; white-space: nowrap; }
.update-row:last-child { border-bottom: none; }
.update-row:hover { background: #ebf5fb; }
.update-category { color: #3498db; font-weight: bold; font-size: 12px; white-space: nowrap; text-align: center; background: #ebf5fb; border-radius: 3px; padding: 2px 4px; }
.update-book { color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.update-book:hover { color: #3498db; }
.update-chapter { color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; text-align: left; }
.update-chapter:hover { color: #3498db; }
.update-author { color: #999; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.update-date { color: #bbb; font-size: 11px; text-align: right; }
.new-rank { width: 20px; height: 20px; border-radius: 4px; font-size: 12px; font-weight: bold; color: #fff; background: #bbb; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.newbook-row { display: flex; align-items: center; padding: 9px 5px; border-bottom: 1px solid #f0f0f0; font-size: 13px; gap: 10px; }
.newbook-row:last-child { border-bottom: none; }
.newbook-row:hover { background: #ebf5fb; }
.newbook-row:nth-child(-n+3) .new-rank { background: #3498db; }
.newbook-name { color: #333; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.newbook-name:hover { color: #3498db; }
.newbook-author { color: #999; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; flex-shrink: 0; }

/* 响应式 */
@media (max-width: 1024px) {
    .pic-recommend { width: 65%; }
    .classic-recommend { width: 35%; }
    .pic-recommend-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .list-grid .block:first-child { width: 65%; }
    .list-grid .block:last-child { width: 35%; }
}
@media (max-width: 768px) {
    .recommend-section { flex-direction: column; }
    .pic-recommend, .classic-recommend { width: 100%; }
    .pic-recommend-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: 1fr; }
    .list-grid { flex-direction: column; }
    .list-grid .block:first-child, .list-grid .block:last-child { width: 100%; }
    .update-row { grid-template-columns: 1fr; gap: 5px; font-size: 12px; }
    .update-category { display: none; }
    .update-chapter { width: auto; }
    .cat-grid-4 { grid-template-columns: 1fr; }
    .cat-pic-row { flex-direction: column; align-items: center; text-align: center; }
    .cat-pic-cover { width: 80px; height: 106px; }
}
@media (max-width: 480px) {
    .pic-recommend-grid { grid-template-columns: 1fr; }
    .pic-recommend-grid .img-cover { width: 70px; height: 93px; }
    .pic-recommend-grid .img-info { max-width: 100%; }
    .update-row { font-size: 11px; }
    .newbook-author { display: none; }
}
