/* 轮播幻灯片 + 热点排行榜模块 */
.module-carousel-hot-ranking {
    margin-bottom: 20px;
}

.chr-wrap {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.chr-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chr-right {
    flex: 0 0 311px;
    width: 311px;
    display: flex;
    flex-direction: column;
}

/* 幻灯片 */
.chr-slider {
    flex: 0 0 auto;
    margin-bottom: 0;
    border-radius: var(--main-radius, 8px);
    overflow: hidden;
}

.chr-slider .swiper-container {
    height: 410px;
}

.chr-slider .swiper-wrapper {
    position: relative;
    height: 100%;
}

.chr-slider .swiper-slide {
    overflow: hidden;
}

/* Swiper 未加载时的简单淡入淡出回退 */
.chr-fallback-slider .swiper-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
}

.chr-fallback-slider .swiper-slide.chr-active {
    opacity: 1;
    z-index: 1;
}

.chr-slider .swiper-slide a {
    display: block;
    height: 100%;
}

.chr-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.chr-slider .swiper-slide:hover img {
    transform: scale(1.02);
}

.chr-slider .swiper-pagination {
    bottom: 10px !important;
}

.chr-slider .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.chr-slider .swiper-pagination-bullet-active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

/* 四图卡片 */
.chr-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
    flex: 0 0 auto;
}

.chr-card a {
    display: block;
}

.chr-card-img {
    position: relative;
    height: 140px;
    border-radius: var(--main-radius, 8px);
    overflow: hidden;
}

.chr-card-img img,
.chr-card-img .chr-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.chr-card:hover img,
.chr-card:hover .chr-img {
    transform: scale(1.1);
}

.chr-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    border-radius: 0 0 var(--main-radius, 8px) var(--main-radius, 8px);
}

.chr-card-title {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    font-size: 14px;
    line-height: 1.4;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 排行榜 */
.chr-ranking-wrap {
    overflow: hidden;
    position: relative;
    background: var(--main-bg-color, #fff);
    border: 1px solid var(--main-border-color, #ebedf0);
    border-radius: var(--main-radius, 8px);
    padding: 12px 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chr-ranking-wrap.chr-expanded {
    flex: none;
    height: auto;
    overflow: visible;
}

.chr-ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 0 0 auto;
}

.chr-ranking-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--main-color, #333);
}

.chr-ranking-title i {
    margin-right: 6px;
    color: #ff4757;
}

.chr-ranking-nav {
    display: flex;
    gap: 8px;
}

.chr-nav-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--main-border-color, #ebedf0);
    border-radius: var(--main-radius, 6px);
    cursor: pointer;
    background: var(--main-bg-color, #fff);
    font-weight: bold;
    font-size: 16px;
    color: var(--muted-2-color, #666);
    transition: all .3s ease;
    user-select: none;
}

.chr-nav-btn:hover:not(.disabled) {
    border-color: var(--focus-color, #306AF1);
    color: var(--focus-color, #306AF1);
}

.chr-nav-btn.disabled {
    opacity: .4;
    cursor: not-allowed;
}

.chr-ranking-list {
    display: flex;
    gap: 0;
    transition: transform .3s ease;
    flex: 1;
    overflow: hidden;
    margin-top: 12px;
}

.chr-ranking-wrap.chr-expanded .chr-ranking-list {
    flex: none;
    height: auto;
    overflow: visible;
    display: block;
}

.chr-ranking-page {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.chr-ranking-wrap.chr-expanded .chr-ranking-page {
    height: auto;
    display: block;
}

.chr-ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    box-sizing: border-box;
    border: 1px solid var(--main-border-color, #ebedf0);
    border-radius: var(--main-radius, 8px);
    background: var(--main-bg-color, #fff);
    transition: all .3s ease;
    text-decoration: none;
    color: var(--main-color, #333);
    flex: 1;
    min-height: 0;
}

.chr-ranking-wrap.chr-expanded .chr-ranking-item {
    flex: 0 0 auto;
    margin-bottom: 10px;
}

.chr-ranking-wrap.chr-expanded .chr-ranking-item:last-child {
    margin-bottom: 0;
}

.chr-ranking-item:hover {
    background: var(--body-bg-color, #f0f4fe);
    border-color: var(--focus-color, #306AF1);
}

.chr-num {
    font-weight: 600;
    min-width: 32px;
    font-size: 26px;
    color: var(--muted-2-color, #C3C7CD);
    flex-shrink: 0;
    padding-top: 2px;
    font-style: italic;
}

.chr-num-1 {
    color: #ff4757;
}

.chr-num-2 {
    color: #ff7f50;
}

.chr-num-3 {
    color: #ffa502;
}

.chr-item-1 {
    border-color: rgba(255, 71, 87, 0.3);
}

.chr-item-2 {
    border-color: rgba(255, 127, 80, 0.3);
}

.chr-item-3 {
    border-color: rgba(255, 165, 2, 0.3);
}

.chr-ranking-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chr-ranking-t {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chr-ranking-desc {
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted-2-color, #999);
    padding: 8px 10px;
    background: var(--body-bg-color, #f5f7fa);
    border-radius: var(--main-radius, 6px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 显示更多 */
.chr-show-more {
    margin-top: 12px;
    text-align: center;
}

.chr-show-more a,
.chr-show-more-btn {
    display: inline-block;
    padding: 8px 18px;
    font-size: 13px;
    color: var(--muted-2-color, #666);
    border: 1px solid var(--main-border-color, #ebedf0);
    border-radius: var(--main-radius, 6px);
    background: var(--body-bg-color, #f5f7fa);
    cursor: pointer;
    transition: all .3s ease;
    text-decoration: none;
}

.chr-show-more a:hover,
.chr-show-more-btn:hover {
    color: var(--focus-color, #306AF1);
    border-color: var(--focus-color, #306AF1);
    background: var(--main-bg-color, #fff);
}

/* 响应式 */
@media (max-width: 991px) {
    .chr-wrap {
        flex-direction: column;
    }

    .chr-left,
    .chr-right {
        flex: 0 0 100%;
        width: 100%;
        height: auto;
    }

    .chr-ranking-wrap {
        flex: none;
        height: auto;
        min-height: 360px;
    }

    .chr-ranking-list {
        flex: none;
        min-height: 280px;
    }
}

@media (max-width: 768px) {
    .chr-slider-hide-mobile,
    .chr-ranking-hide-mobile {
        display: none !important;
    }

    .chr-cards {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 12px;
    }

    .chr-cards-hide-mobile {
        display: none !important;
    }

    .chr-num {
        font-size: 22px;
    }

    .chr-ranking-title {
        font-size: 15px;
    }

    .chr-ranking-item {
        padding: 12px;
    }
}
