/**
 * 漫画展示多样化布局：hero、strip、混合网格、列表行
 */
/* ========== Hero 大卡（单本重点） ========== */
.comic-hero {
    display: flex;
    gap: 24px;
    background: var(--site-card-bg);
    border-radius: var(--site-radius);
    overflow: hidden;
    box-shadow: var(--site-shadow);
    transition: box-shadow 0.22s;
    text-decoration: none;
    color: inherit;
}

.comic-hero:hover {
    box-shadow: var(--site-shadow-hover);
}

.comic-hero__cover {
    flex-shrink: 0;
    width: 280px;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
}

.comic-hero__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--site-primary);
    border-radius: var(--site-radius-sm);
    z-index: 1;
}

.comic-hero__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comic-hero__body {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.comic-hero__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--site-text);
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comic-hero__author {
    font-size: 14px;
    color: var(--site-text-muted);
    margin: 0 0 12px 0;
}

.comic-hero__desc {
    font-size: 14px;
    color: var(--site-text-muted);
    line-height: 1.5;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comic-hero__meta {
    font-size: 13px;
    color: var(--site-text-muted);
    margin: 0 0 12px 0;
}

.comic-hero__meta span + span::before {
    content: ' · ';
    margin: 0 4px;
    color: var(--site-text-muted);
}

.comic-hero__subtitle {
    font-size: 12px;
    color: var(--site-text-muted);
    margin: 4px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comic-hero__btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background: var(--site-primary);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--site-radius-sm);
    text-decoration: none;
    transition: background 0.2s;
    align-self: flex-start;
}

.comic-hero__btn:hover {
    background: var(--site-primary-hover);
    color: #fff;
}

/* ========== 横向滚动条 ========== */
.comic-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin: 0 -4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.comic-strip::-webkit-scrollbar {
    height: 6px;
}

.comic-strip::-webkit-scrollbar-thumb {
    background: var(--site-border);
    border-radius: 3px;
}

.comic-strip__item {
    flex-shrink: 0;
    width: 140px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    background: var(--site-card-bg);
    border-radius: var(--site-radius);
    overflow: hidden;
    box-shadow: var(--site-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.comic-strip__item:hover {
    transform: translateY(-4px);
    box-shadow: var(--site-shadow-hover);
}

.comic-strip__item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}

.comic-strip__item .info {
    padding: 10px 12px;
}

.comic-strip__item .title {
    font-size: 14px;
    font-weight: 600;
    color: var(--site-text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comic-strip__item .author {
    font-size: 12px;
    color: var(--site-text-muted);
    margin: 4px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 混合网格（第一项大） ========== */
.comic-grid--featured {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.comic-grid--featured .comic-grid__featured {
    grid-column: span 2;
    grid-row: span 2;
}

.comic-grid--featured .comic-grid__featured .comic-hero {
    flex-direction: column;
    height: 100%;
}

.comic-grid--featured .comic-grid__featured .comic-hero__cover {
    width: 100%;
    aspect-ratio: 16/10;
}

.comic-grid--featured .comic-grid__featured .comic-hero__body {
    padding: 16px;
}

.comic-grid--featured .comic-grid__featured .comic-hero__title {
    font-size: 18px;
}

.comic-grid--featured li:not(.comic-grid__featured) {
    list-style: none;
}

@media (max-width: 900px) {
    .comic-grid--featured {
        grid-template-columns: repeat(2, 1fr);
    }
    .comic-grid--featured .comic-grid__featured {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* ========== 列表行（缩略图 + 信息） ========== */
.comic-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--site-border);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.comic-row:hover {
    background: rgba(0,0,0,0.02);
}

.comic-row:last-child {
    border-bottom: none;
}

.comic-row__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: var(--site-radius-sm);
    overflow: hidden;
    background: #f3f4f6;
}

.comic-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comic-row__body {
    flex: 1;
    min-width: 0;
}

.comic-row__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--site-text);
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comic-row__meta {
    font-size: 13px;
    color: var(--site-text-muted);
}

.comic-row__rank {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--site-text-muted);
    background: var(--site-main-bg);
    border-radius: 6px;
}

.comic-row__rank.rank-1 { background: linear-gradient(135deg, #ffd700, #ffb347); color: #fff; }
.comic-row__rank.rank-2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #fff; }
.comic-row__rank.rank-3 { background: linear-gradient(135deg, #cd7f32, #b87333); color: #fff; }

/* ========== 排行榜区块（首页与排行榜页共用） ========== */
.ranking-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 768px) {
    .ranking-grid { grid-template-columns: 1fr; }
}
.ranking-block {
    min-width: 0;
    background: var(--site-card-bg);
    border-radius: var(--site-radius);
    box-shadow: var(--site-shadow);
    padding: 20px;
}
.ranking-first {
    display: flex;
    gap: 16px;
    background: var(--site-main-bg);
    border-radius: var(--site-radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
}
.ranking-first:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.ranking-first__cover {
    flex-shrink: 0;
    width: 130px;
    height: 130px;
    overflow: hidden;
    background: #f3f4f6;
    border-radius: var(--site-radius-sm);
}
.ranking-first__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ranking-first__body {
    flex: 1;
    min-width: 0;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.ranking-first__rank {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    border-radius: 8px;
    margin-bottom: 10px;
}
.ranking-first__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--site-text);
    margin: 0 0 6px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ranking-first__author {
    font-size: 13px;
    color: var(--site-text-muted);
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ranking-first__desc {
    font-size: 13px;
    color: var(--site-text-muted);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ranking-list li {
    list-style: none;
}
.ranking-list .comic-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--site-border);
}
.ranking-list .comic-row:last-child {
    border-bottom: none;
}
.ranking-list .comic-row__thumb {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: var(--site-radius-sm);
}
.ranking-list .comic-row__title {
    font-size: 14px;
    -webkit-line-clamp: 1;
}
.ranking-list .comic-row__meta {
    font-size: 12px;
}
