/* =========================================
   排行页专用样式 - rank.css
   ========================================= */

/* 排行页包裹容器 */
.rank-wrapper {
    padding-top: 16px;
}

/* 页面头部 */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    padding: 20px 24px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.page-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-info {
    flex: 1;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.page-desc {
    font-size: 14px;
    color: var(--text-sub);
}

/* 筛选卡片 */
.rank-filter-card {
    background: #fff;
    padding: 16px 20px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 13px;
    color: var(--text-sub);
    flex-shrink: 0;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 2px;
    color: var(--text-sub);
    background: var(--bg-body);
    transition: all 0.2s;
}

.filter-tag:hover {
    color: var(--primary);
    background: var(--blue-light);
}

.filter-tag.active {
    color: #fff;
    background: var(--primary);
}

/* 排行页主布局 */
.rank-main {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}

.rank-content {
    min-width: 0;
}

.rank-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 排行列表卡片 */
.rank-list-card {
    background: #fff;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

/* 排行项 */
.rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-body);
    transition: background 0.2s;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-item:hover {
    background: var(--bg-body);
}

/* 排名数字 */
.rank-num {
    width: 28px;
    height: 28px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    line-height: 28px;
    border-radius: 4px;
    flex-shrink: 0;
}

.rank-num.no-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.rank-num.no-2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.rank-num.no-3 { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; }

/* 排行图标 */
.rank-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
}

/* 排行信息 */
.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-desc {
    font-size: 12px;
    color: var(--text-sub);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 下载统计 */
.rank-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: 60px;
}

.stat-downloads {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-light);
}

/* 趋势 */
.rank-trend {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    font-weight: 600;
    min-width: 50px;
    justify-content: flex-end;
}

.rank-trend.up {
    color: var(--green);
}

.rank-trend.down {
    color: var(--red);
}

.rank-trend.flat {
    color: var(--text-light);
}

/* 飙升榜 */
.rise-list {
    display: flex;
    flex-direction: column;
}

.rise-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-body);
}

.rise-item:last-child {
    border-bottom: none;
}

.rise-item:hover .rise-name {
    color: var(--primary);
}

.rise-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.rise-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-main);
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rise-percent {
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
}

/* 新晋榜 */
.new-list {
    display: flex;
    flex-direction: column;
}

.new-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-body);
}

.new-item:last-child {
    border-bottom: none;
}

.new-item:hover .new-name {
    color: var(--primary);
}

.new-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    background: var(--red);
    color: #fff;
}

.new-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-main);
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
