/**
 * 首页样式 v2 - 柔和少女漫风格
 */

/* ----- 顶部布局 ----- */
.home-top {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    margin: 28px 0 24px;
}

/* ----- Banner ----- */
.banner-wrapper {
    height: 360px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-md);
    position: relative;
}
.banner-placeholder {
    height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-tip);
    background: linear-gradient(135deg, var(--primary-softer), #fff);
    font-size: 15px;
}
.banner-slider {
    position: relative; width: 100%; height: 100%; overflow: hidden;
}
.banner-track { position: relative; width: 100%; height: 100%; }
.banner-item {
    position: absolute; inset: 0;
    display: block;
    opacity: 0;
    transition: opacity .6s ease;
}
.banner-item.active { opacity: 1; z-index: 1; }
.banner-item img { width: 100%; height: 100%; object-fit: cover; }

.banner-dots {
    position: absolute; bottom: 18px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 2;
    background: rgba(0,0,0,0.25);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(8px);
}
.banner-dots .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.55);
    cursor: pointer; transition: all .3s;
}
.banner-dots .dot.active {
    width: 24px; border-radius: 4px;
    background: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,0.6);
}
.banner-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    line-height: 40px;
    text-align: center; font-size: 22px;
    background: rgba(255,255,255,0.85);
    color: var(--primary);
    cursor: pointer; z-index: 2;
    transition: all .25s;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    opacity: 0;
}
.banner-wrapper:hover .banner-arrow { opacity: 1; }
.banner-arrow.prev { left: 14px; }
.banner-arrow.next { right: 14px; }
.banner-arrow:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-50%) scale(1.08);
}

/* ----- 排行榜卡片 ----- */
.home-rank-card, .home-rank-card-2 {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(251,100,173,0.04);
    position: relative;
    overflow: hidden;
}
/* 排行榜顶部装饰 */
.home-rank-card::before, .home-rank-card-2::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: radial-gradient(ellipse 200px 60px at 50% 0%, rgba(251,100,173,0.10), transparent);
    pointer-events: none;
}
.home-rank-card { height: 360px; overflow: hidden; }
.home-rank-card .card-title,
.home-rank-card-2 .card-title { margin-bottom: 12px; }

.rank-list { margin: 0; padding: 0; list-style: none; position: relative; z-index: 1; }
.rank-list li {
    display: flex; align-items: center;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px dashed transparent;
    transition: all .2s;
}
.rank-list li:hover {
    border-bottom-color: var(--border-light);
    padding-left: 4px;
}
.rank-num {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 24px; height: 24px;
    text-align: center; font-size: 12px;
    margin-right: 12px;
    border-radius: 7px;
    background: #F5EBF1;
    color: #B5A3B0;
    font-weight: 700;
    font-family: -apple-system, "Helvetica Neue", sans-serif;
    flex-shrink: 0;
}
.rank-num.rank-1 {
    background: linear-gradient(135deg, #FFD86F, #FFA500);
    color: #fff;
    box-shadow: 0 3px 8px rgba(255,165,0,0.35);
}
.rank-num.rank-2 {
    background: linear-gradient(135deg, #E8E8E8, #B0B0B0);
    color: #fff;
    box-shadow: 0 3px 8px rgba(160,160,160,0.30);
}
.rank-num.rank-3 {
    background: linear-gradient(135deg, #E8A66B, #C97B3E);
    color: #fff;
    box-shadow: 0 3px 8px rgba(201,123,62,0.30);
}
.rank-title {
    flex: 1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--text-main);
    font-weight: 500;
}
.rank-title:hover { color: var(--primary); }
.rank-count {
    font-size: 12px; color: var(--text-tip);
    margin-left: 8px; flex-shrink: 0;
}

/* ----- 分类快捷 ----- */
.category-quick {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
    border: 1px solid rgba(251,100,173,0.04);
    position: relative;
    overflow: hidden;
}
.category-quick::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(251,100,173,0.08), transparent 70%);
    pointer-events: none;
}
.cat-item {
    display: flex; flex-direction: column; align-items: center;
    padding: 10px 6px;
    border-radius: var(--radius-md);
    text-align: center; transition: all .25s cubic-bezier(.4,.0,.2,1);
    color: var(--text-sub);
    position: relative;
    z-index: 1;
}
.cat-item:hover {
    color: var(--primary);
    transform: translateY(-4px);
}
.cat-item:hover i {
    background: var(--primary-grad);
    color: #fff;
    box-shadow: 0 6px 16px rgba(251,100,173,0.40);
    transform: rotate(-6deg);
}
.cat-item i {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 46px; height: 46px;
    font-size: 20px;
    margin-bottom: 8px;
    background: var(--primary-softer);
    color: var(--primary);
    border-radius: 14px;
    transition: all .3s cubic-bezier(.4,.0,.2,1);
}
.cat-item span {
    font-size: 13px;
    font-weight: 500;
}

/* ----- 底部布局: 新作 + 评分榜 ----- */
.home-bottom {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    margin-bottom: 36px;
}
.home-new-comics { margin-bottom: 0; }
.home-rank-card-2 { margin-bottom: 0; }
