/* 排行页：我的排名 + 排行榜列表 */

.tab-page-rank {
    padding: 0;
}

.rank-page {
    padding: 12px 12px calc(16px + var(--safe-bottom));
}

.rank-my-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.16), rgba(26, 26, 32, 0.95));
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 14px;
}

.rank-my-label {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.rank-my-stats {
    display: flex;
    gap: 24px;
}

.rank-my-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.rank-my-stat-label {
    margin-top: 4px;
    font-size: 15px;
    color: var(--color-text-muted);
}

.rank-my-login-tip {
    font-size: 16px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.rank-section-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text-muted);
    margin: 16px 0 10px;
}

.rank-podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 8px;
    align-items: end;
    margin-bottom: 14px;
}

.rank-podium-slot {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 12px 8px 14px;
    text-align: center;
}

.rank-podium-1 {
    padding-top: 22px;
    padding-bottom: 20px;
    border-color: rgba(201, 162, 39, 0.45);
    background: linear-gradient(180deg, rgba(201, 162, 39, 0.18), var(--color-surface));
}

.rank-podium-2 {
    border-color: rgba(192, 192, 192, 0.35);
}

.rank-podium-3 {
    border-color: rgba(205, 127, 50, 0.35);
}

.rank-podium-place {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.rank-podium-2 .rank-podium-place { color: #b8b8b8; }
.rank-podium-3 .rank-podium-place { color: #cd7f32; }

.rank-podium-avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    border: 2px solid rgba(201, 162, 39, 0.35);
    color: var(--color-primary);
    font-weight: 700;
}

.rank-podium-1 .rank-podium-avatar {
    width: 68px;
    height: 68px;
}

.rank-podium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-podium-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-podium-score {
    font-size: 15px;
    color: var(--color-primary);
    font-weight: 700;
}

.rank-podium-empty {
    font-size: 15px;
    color: var(--color-text-muted);
    padding: 24px 0;
}

.rank-mushroom-card {
    padding: 12px 14px;
    margin-bottom: 4px;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.08);
}

.rank-mushroom-label {
    font-size: 15px;
    color: #f59e0b;
    font-weight: 700;
    margin-bottom: 8px;
}

.rank-mushroom-body {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.rank-item.is-me {
    border-color: rgba(201, 162, 39, 0.35);
    background: rgba(201, 162, 39, 0.06);
}

.rank-no {
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-muted);
}

.rank-no.rank-no-top1 {
    color: #ffd700;
}

.rank-no.rank-no-top2 {
    color: #c0c0c0;
}

.rank-no.rank-no-top3 {
    color: #cd7f32;
}

.rank-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2418, #1a1a20);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
    color: var(--color-primary);
    overflow: hidden;
}

.rank-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-body {
    flex: 1;
    min-width: 0;
}

.rank-name {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-meta {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.rank-score {
    flex-shrink: 0;
    text-align: right;
}

.rank-score-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.rank-score-label {
    margin-top: 2px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.rank-loading,
.rank-empty,
.rank-error {
    text-align: center;
    padding: 40px 16px;
    font-size: 17px;
    color: var(--color-text-muted);
}

.rank-error {
    color: #f87171;
}
