/* ============================================================
   home.css - Homepage: carousel slides, book cards, rank lists
   ============================================================ */
.carousel-slide {
  min-width: 100%; height: 320px; position: relative;
  display: flex; align-items: flex-end; padding: 32px; color: #fff;
}

.carousel-slide .slide-cover {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  width: 160px; height: 220px; border-radius: 8px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}

.carousel-slide .slide-cover img { width: 100%; height: 100%; object-fit: cover; }

.slide-info { position: relative; z-index: 2; max-width: 60%; }

.slide-tag { display: inline-block; padding: 3px 10px; background: rgba(255,255,255,.25); border-radius: 4px; font-size: 12px; margin-bottom: 10px; }

.slide-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; text-shadow: 0 2px 8px rgba(0,0,0,.2); }

.slide-desc { font-size: 14px; opacity: .9; margin-bottom: 16px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.slide-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 24px; background: #fff; color: #1a1a1a; border-radius: 6px; font-weight: 600; }

.book-card { cursor: pointer; display: flex; flex-direction: column; min-width: 0; width: 100%; }

.book-cover { position: relative; width: 100%; max-width: 100%; aspect-ratio: 3/4; border-radius: 6px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }

.book-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }

.book-card:hover .book-cover img { transform: scale(1.05); }

.book-body { padding: 8px 2px 0; flex: 1; display: flex; flex-direction: column; min-width: 0; width: 100%; }

.book-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.book-card:hover .book-title { color: var(--primary); }

.book-author { font-size: 12px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.book-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-4); margin-top: auto; padding-top: 4px; }

/* ============================================================
   RANK LIST
   ============================================================ */
.rank-list { background: var(--card); border-radius: var(--radius); padding: 8px 16px; border: 1px solid var(--border); }

.rank-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px dashed var(--border); cursor: pointer;
}

.rank-item:last-child { border-bottom: none; }

.rank-num {
  width: 24px; height: 24px; border-radius: 4px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: var(--bg); color: var(--text-3);
}

.rank-1 { background: #f53f3f; color: #fff; }

.rank-2 { background: #ff7d00; color: #fff; }

.rank-3 { background: #ffb400; color: #fff; }

.rank-info { flex: 1; min-width: 0; }

.rank-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rank-item:hover .rank-title { color: var(--primary); }

.rank-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.rank-val { font-size: 12px; color: var(--text-4); flex-shrink: 0; }

/* --- Fix 11: 移动端卡片封面高度一致性 ---
   确保所有book-cover使用aspect-ratio，不被内容撑开 */
.book-cover {
  aspect-ratio: 3 / 4;
  width: 100%;
}

.book-card {
  height: 100%;
}