/* 新版排行榜 — 三列横向并排 */

/* 容器：我们的 widget */
.zm-ranking-wrap {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}
.zm-ranking-wrap .list.clearfix {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    padding: 0;
    width: 100%;
    background: transparent !important;
    margin-bottom: 20px;
}

/* 兼容原始腾飞选择器 */
.zib-widget.tengfei-ranking-widget {
    padding: 0 !important; margin: 0 !important;
    border: none !important; background: transparent !important;
}
.zib-widget.tengfei-ranking-widget .list.clearfix {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    padding: 0;
    width: 100%;
    background: transparent !important;
    margin-bottom: 20px;
}

/* ── 每列排行榜卡片 ── */
.ranking-item {
    flex: 1 1 0;
    min-width: 0;
    background: #fff;
    border-radius: 16px;
    position: relative;
    transition: all .3s ease;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,.05), 0 8px 10px -6px rgba(0,0,0,.02);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 25px;
}
.ranking-item:hover {
    box-shadow: 0 20px 30px -10px rgba(0,0,0,.1), 0 10px 15px -5px rgba(0,0,0,.04);
}

/* ── 顶部标题标签 ── */
.top-icon {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #fff !important;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0,0,0,.2);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.top-icon:hover, .top-icon:focus { color: #fff !important; }
.js-rank-bottom1 { background: linear-gradient(135deg, #7367f0 0%, #9f94ff 100%); }
.js-rank-bottom2 { background: linear-gradient(135deg, #0fc6c2 0%, #00d9c5 100%); }
.js-rank-bottom3 { background: linear-gradient(135deg, #ff9f43 0%, #ffc312 100%); }

/* ── 内容区 ── */
.class-box {
    padding: 25px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ── 底部链接 ── */
.bottom-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 18px;
    padding: 9px 0;
    font-size: 13px;
    color: #7367f0;
    border-radius: 8px;
    background-color: rgba(115,103,240,.07);
    transition: all .2s ease;
    font-weight: 500;
}
.bottom-link:hover {
    background-color: rgba(115,103,240,.12);
    color: #5e51e5;
}
.bottom-link i {
    margin-left: 6px;
    transition: transform .2s ease;
}
.bottom-link:hover i { transform: translateX(3px); }

/* ── 单条排行项 ── */
.class-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    background-color: transparent;
    margin-bottom: 0;
    position: relative;
    border: 1px solid transparent;
    transition: all .3s ease-in-out;
}
.class-item:hover {
    border: 1px solid var(--focus-color);
    background-color: var(--focus-color-opacity1);
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 8px 30px var(--hover-shadow-color);
    z-index: 2;
}

/* ── 序号圆标 ── */
.num-icon {
    width: 26px; height: 26px;
    flex-shrink: 0;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50%;
}
.num-icon1, .num-icon2, .num-icon3 { color: #fff; }
.num-icon1 { background: linear-gradient(135deg, #7367f0 0%, #9f94ff 100%); }
.num-icon2 { background: linear-gradient(135deg, #0fc6c2 0%, #00d9c5 100%); }
.num-icon3 { background: linear-gradient(135deg, #ff9f43 0%, #ffc312 100%); }
.num-icon4, .num-icon5, .num-icon6 { color: #8c8c8c; background-color: #f0f2f5; }

/* ── 缩略图 ── */
.syphimg {
    width: 64px; height: 64px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.syphimg img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.class-item:hover .syphimg img { transform: scale(1.05); }

/* ── 文章信息 ── */
.class-info { flex: 1; min-width: 0; }
.name {
    font-size: 15px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .2s ease;
    font-weight: 500;
}
.class-item:hover .name { color: var(--focus-color); }

.badgg {
    font-size: 12px;
    color: #8c8c8c;
    background-color: #f0f2f5;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}
.badgg i { margin-right: 4px; font-size: 11px; }

.no-posts {
    text-align: center;
    padding: 40px 0;
    color: #8c8c8c;
    font-size: 14px;
}

/* ── 响应式 ── */
@media (max-width: 992px) {
    .zm-ranking-wrap .list.clearfix,
    .zib-widget.tengfei-ranking-widget .list.clearfix {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .ranking-item {
        min-width: 280px;
        flex: 0 0 280px;
    }
}
@media (max-width: 768px) {
    .zm-ranking-wrap .list.clearfix,
    .zib-widget.tengfei-ranking-widget .list.clearfix {
        flex-wrap: wrap;
        overflow-x: visible;
    }
    .ranking-item {
        flex: 1 1 100%;
        min-width: unset;
        margin-bottom: 30px;
    }
}

/* ── 暗色主题 ── */
.dark-theme .zm-ranking-wrap .list.clearfix,
.dark-theme .zib-widget.tengfei-ranking-widget .list.clearfix {
    background: transparent !important;
}
.dark-theme .ranking-item {
    background: var(--main-bg-color);
    box-shadow: rgba(0,0,0,.5) 0 10px 25px -5px, rgba(0,0,0,.5) 0 8px 10px -6px;
    border: 1px solid var(--widget-deep-blue-border, #2a3b4d);
}
.dark-theme .ranking-item:hover {
    box-shadow: rgba(0,0,0,.5) 0 20px 30px -10px, rgba(0,0,0,.5) 0 10px 15px -5px;
}
.dark-theme .top-icon {
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
    box-shadow: rgba(0,0,0,.5) 0 6px 16px;
}
.dark-theme .bottom-link { color: #7367f0; background-color: rgba(115,103,240,.07); }
.dark-theme .bottom-link:hover { background-color: rgba(129,116,255,.2); }
.dark-theme .class-item { background: var(--main-bg-color); }
.dark-theme .class-item:hover { background-color: var(--focus-color-opacity1); }
.dark-theme .num-icon4,
.dark-theme .num-icon5,
.dark-theme .num-icon6 { color: #b0bec5; background-color: rgba(40,50,60,.7); }
.dark-theme .syphimg { box-shadow: rgba(0,0,0,.5) 0 4px 12px; }
.dark-theme .name { color: #e1e8f0; }
.dark-theme .class-item:hover .name { color: #58a6ff; }
.dark-theme .badgg { color: #b0bec5; background-color: rgba(40,50,60,.7); }
.dark-theme .no-posts { color: #b0bec5; }
