/* 首页排行榜样式 - 修复颜色问题 */

/* 父容器：横向布局 */
#syphb.container.list.clearfix {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    padding: 0;
    width: calc(100% + 30px);
    background: transparent !important;
    margin-bottom: 20px;
}

/* 单个卡片容器：占 1/3 宽度 */
.ranking-item {
    width: calc(33.333% - 30px);
    background: #fff;
    border-radius: 16px;
    position: relative;
    margin: 0 15px 0;
    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;
    transform: translateY(0);
    padding-top: 25px;
}

/* 响应式：小屏幕下变为竖排 */
@media (max-width: 992px) {
    .ranking-item {
        width: calc(50% - 30px);
        margin-bottom: 30px;
    }
}
@media (max-width: 768px) {
    .ranking-item {
        width: calc(100% - 30px);
        margin-bottom: 30px;
    }
}

/* 顶部标题样式 */
.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;
    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);
}

.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: 12px 14px;
    border-radius: 10px;
    transition: all .2s ease;
    margin-bottom: 8px;
    background-color: #fff;
}
.class-item:hover {
    border: 1px solid #7367f0;
    background-color: rgba(85, 106, 241, 0.18);
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 8px 30px rgba(115, 103, 240, 0.15);
    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);
}

/* 标题和徽章样式 */
.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: #7367f0;
}

/* 徽章基础样式 */
.badg {
    font-size: 12px;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    margin-right: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* 小型徽章 */
.badg-sm {
    font-size: 11px;
    padding: 1px 6px;
}

/* 徽章颜色定义 - 这是缺少的部分！ */
.b-yellow {
    background-color: #ffc107;
    color: #333;
}
.b-blue {
    background-color: #2196f3;
    color: white;
}
.b-red {
    background-color: #f44336;
    color: white;
}
.b-green {
    background-color: #4caf50;
    color: white;
}

/* 添加其他颜色以完善 */
.b-purple {
    background-color: #9c27b0;
    color: white;
}
.b-cyan {
    background-color: #00bcd4;
    color: white;
}
.b-orange {
    background-color: #ff9800;
    color: white;
}
.b-pink {
    background-color: #e91e63;
    color: white;
}

/* 徽章图标 */
.badg i {
    margin-right: 4px;
    font-size: 11px;
}

/* 鼠标悬停效果 */
.class-item:hover .badg {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* 徽章之间的间距 */
.class-info .badg:last-child {
    margin-right: 0;
}

/* 插件特定样式 */
.zibll-hot-ranking-widget {
    margin: 20px 0;
}

.zibll-hot-ranking-widget .ranking-item {
    margin-bottom: 30px;
}