/* 排行榜固定顶栏（仿收藏页 top） */
.rank-page-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: 0 12px;
}

.rank-top-back {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rank-top-back:hover {
    color: #2563eb;
}

.rank-top-back .iconify {
    font-size: 24px;
}

.rank-page-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    white-space: nowrap;
}

.rank-page {
    padding: 58px 0 80px;
}

.rank-header {
    margin-bottom: 24px;
}

.rank-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.rank-tabs {
    display: flex;
    gap: 8px;
    padding: 0 12px;
    margin-bottom: 20px;
}

.tab-item {
    flex: 1;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e9edf3;
    border-radius: 4px;
    padding: 10px 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tab-item:hover,
.tab-item.active {
    background: #eff6ff;
    border-color: rgba(37, 99, 235, 0.3);
    color: #2563eb;
    font-weight: 500;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 12px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border-radius: 4px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.3s ease;
    border: 1px solid #e9edf3;
    position: relative;
    overflow: hidden;
}

.rank-item:hover {
    background: #f8fafc;
    border-color: rgba(37, 99, 235, 0.2);
}

.rank-position {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    flex-shrink: 0;
}

.rank-position.rank-top {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.rank-position.rank-top .iconify {
    font-size: 20px;
}

.rank-cover {
    width: 80px;
    height: 112px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f1f5f9 url('/assets/images/default_cover.png') center/cover no-repeat;
}

.rank-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rank-info .rank-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.rank-author {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.rank-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 2px;
}

.rank-badge {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffb700);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #b87333);
}

@media (max-width: 768px) {
    .rank-cover {
        width: 60px;
        height: 84px;
    }

    .rank-badge {
        display: none;
    }
}
