/** 首页排行榜列表 - 终极兼容版 **/
/* 基础重置，防止主题样式冲突 */
#syphb * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 容器 - 负margin抵消子元素的左右间距 */
#syphb.list.clearfix {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px !important;
    margin-right: -10px !important;
    float: none !important;
}

/* 单个排行榜卡片 */
#syphb .ranking-item {
    position: relative;
    width: calc(33.3333% - 20px) !important;
    background: var(--main-bg-color);
    box-shadow: 0 0 10px var(--main-shadow);
    border-radius: var(--main-radius);
    padding-bottom: 20px;
    padding-top: 25px; /* 给顶部留出标签的空间 */
    margin: 25px 10px 20px 10px !important; /* 增加顶部外边距，让标签不被上面的内容挡住 */
    flex-shrink: 0 !important;
}

/* 顶部分类标签 */
#syphb .top-icon {
    display: block;
    width: 129px;
    height: 43px;
    line-height: 32px;
    position: absolute;
    left: 50%;
    top: -10px;
    transform: translateX(-50%);
    font-size: 18px;
    color: #fff;
    font-weight: 600;
    text-align: center;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    z-index: 10;
}

/* 三个不同标签的背景图 */
#syphb .ranking-item:nth-child(1) .top-icon {
    background-image: url('../pic/ranking1.png');
}

#syphb .ranking-item:nth-child(2) .top-icon {
    background-image: url('../pic/ranking2.png');
}

#syphb .ranking-item:nth-child(3) .top-icon {
    background-image: url('../pic/ranking3.png');
}

/* 文章列表容器 */
#syphb .class-box {
    margin-top: 20px;
    padding: 0 15px;
}

/* 单个文章项 */
#syphb a.class-item.js-rank {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--main-border-color, #eee);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

#syphb a.class-item.js-rank:last-child {
    border-bottom: none;
}

#syphb a.class-item.js-rank:hover {
    opacity: 0.9;
}

/* 排名数字图标 */
#syphb .num-icon {
    width: 40px;
    height: 22px;
    margin: 0 12px 0 5px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    flex-shrink: 0;
}

#syphb .num-icon.num-icon1 {
    background-image: url('../pic/top1.png');
}

#syphb .num-icon.num-icon2 {
    background-image: url('../pic/top2.png');
}

#syphb .num-icon.num-icon3 {
    background-image: url('../pic/top3.png');
}

#syphb .num-icon.num-icon4 {
    background-image: url('../pic/top4.png');
}

#syphb .num-icon.num-icon5 {
    background-image: url('../pic/top5.png');
}

/* 文章缩略图 */
#syphb .syphimg {
    width: 90px;
    height: 60px;
    margin-right: 10px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
}

#syphb .syphimg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#syphb a.class-item.js-rank:hover .syphimg img {
    transform: scale(1.05);
}

/* 文章信息 */
#syphb .class-info {
    flex: 1;
    font-size: 12px;
}

#syphb .name {
    color: var(--main-color);
    line-height: 1.5;
    font-weight: 400;
    margin-bottom: 5px;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

#syphb a.class-item.js-rank:hover .name {
    color: var(--theme-color);
}

/* 热度值 */
#syphb .badg.b-theme.badg-sm {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--theme-color);
    color: #fff;
    font-size: 11px;
}

/* 底部查看更多链接 */
#syphb a.bottom-link.js-rank-bottom {
    width: 120px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto 0;
    font-size: 12px;
    color: #fff;
    line-height: 1;
    font-weight: 500;
    background-image: linear-gradient(270deg, #ff4f39 0, #fd6400 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
}

#syphb a.bottom-link.js-rank-bottom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 79, 57, 0.4);
}

/* 响应式设计 */
/* 平板（768px-1024px）：两列显示 */
@media (max-width: 1024px) {
    #syphb .ranking-item {
        width: calc(50% - 20px) !important;
    }
}

/* 手机（768px以下）：单列显示 */
@media (max-width: 768px) {
    #syphb .ranking-item {
        width: 100% !important;
    }
    
    #syphb .syphimg {
        width: 80px;
        height: 54px;
    }
    
    #syphb .name {
        font-size: 14px;
    }
}
/** 首页排行榜列表结束 **/