
/* ============================================================
   픽스터 랭킹 — my.ejs와 동일 톤(다크 + 라인) 2026-05-20
   ============================================================ */
.ranking-container {
    --c-bg-card:   #111a1a;
    --c-bg-deep:   #0c1414;
    --c-border:    rgba(255,255,255,0.07);
    --c-border-hi: rgba(255,255,255,0.12);
    --c-text:      #e2e8f0;
    --c-text-dim:  #94a3b8;
    --c-text-mute: #64748b;
    --c-teal:      #14b8a6;
    --c-teal-soft: rgba(20,184,166,0.08);
    --c-up:        #10b981;
    --c-down:      #ef4444;
    --c-gold:      #fbbf24;
    --c-silver:    #cbd5e1;
    --c-bronze:    #d97706;

    padding-bottom: 40px;
}

/* 포디움 — 단조 카드 3개, 1위만 약간 강조 */
.ranking-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.podium-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 22px 16px 18px;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 8px;
    text-align: center;
}
.podium-item::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--c-text-mute);
    opacity: 0.5;
}
.podium-1 { order: 2; }
.podium-2 { order: 1; }
.podium-3 { order: 3; }
.podium-1::before { background: var(--c-gold);   opacity: 1; }
.podium-2::before { background: var(--c-silver); opacity: 0.9; }
.podium-3::before { background: var(--c-bronze); opacity: 0.9; }

.podium-medal {
    font-size: 28px;
    line-height: 1;
}
.podium-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--c-bg-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--c-text-dim);
    font-weight: 700;
    border: 1px solid var(--c-border);
}
.podium-avatar img { width: 100%; height: 100%; object-fit: cover; }
.podium-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--c-text);
    font-size: 13.5px;
}
.rank-icon-sm { width: 18px; height: 18px; }
.podium-winrate {
    font-size: 18px;
    font-weight: 700;
    color: var(--c-up);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}
.podium-record {
    font-size: 11.5px;
    color: var(--c-text-mute);
}

/* 랭킹 테이블 */
.ranking-table {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 8px;
    overflow: hidden;
}
.ranking-table-header {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 140px 160px 80px;
    padding: 12px 18px;
    background: var(--c-bg-deep);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--c-text-mute);
    border-bottom: 1px solid var(--c-border);
    letter-spacing: 0.3px;
}
.ranking-row {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 140px 160px 80px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--c-border);
    align-items: center;
    font-size: 13px;
    transition: background .12s ease;
    overflow: hidden;
}
.ranking-row:last-child { border-bottom: none; }
.ranking-row:hover { background: rgba(255,255,255,0.02); }

.col-rank {
    text-align: center;
    font-weight: 700;
    color: var(--c-text-dim);
    font-variant-numeric: tabular-nums;
}
.ranking-row.top-rank .col-rank { font-size: 18px; }

.col-user {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}
.col-user > * { min-width: 0; }
.user-nickname {
    font-weight: 600;
    color: var(--c-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
}

.col-winrate {
    text-align: center;
    font-weight: 700;
    color: var(--c-up);
    font-variant-numeric: tabular-nums;
}
.col-winrate.high { color: var(--c-up); }
.col-winrate.mid  { color: var(--c-text); }
.col-winrate.low  { color: var(--c-down); }

.col-record {
    display: flex;
    gap: 8px;
    font-size: 12px;
    justify-content: center;
}
.col-record .win  { color: var(--c-up); font-weight: 600; }
.col-record .tie  { color: var(--c-text-mute); }
.col-record .loss { color: var(--c-down); font-weight: 600; }

.col-picks {
    text-align: center;
    color: var(--c-text-mute);
    font-variant-numeric: tabular-nums;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 8px;
}
.empty-state h3 {
    color: var(--c-text);
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
}
.empty-state p {
    color: var(--c-text-mute);
    font-size: 13px;
    margin: 0;
}

/* 태블릿: 포디움 3열 유지하되 폭 축소 + 전적 숨김 */
@media (max-width: 900px) {
    .ranking-podium { gap: 8px; }
    .podium-item { padding: 18px 12px 16px; }
    .podium-winrate { font-size: 16px; }
    .ranking-table-header,
    .ranking-row {
        grid-template-columns: 48px 1fr 130px 100px;
        padding: 12px 14px;
    }
    .col-picks { display: none; }
    .col-record { font-size: 11px; gap: 6px; justify-content: center; }
}

/* 모바일: 포디움 세로 + 1·2·3 순서 강제 + 랭킹 행 단순화 */
@media (max-width: 640px) {
    .ranking-podium {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-bottom: 14px;
    }
    .podium-item {
        flex-direction: row;
        gap: 12px;
        padding: 12px 14px;
        text-align: left;
        align-items: center;
    }
    .podium-item::before {
        top: 0; bottom: 0; right: auto; left: 0;
        width: 3px; height: auto;
    }
    .podium-1 { order: 1; }
    .podium-2 { order: 2; }
    .podium-3 { order: 3; }
    .podium-medal { font-size: 22px; min-width: 24px; }
    .podium-avatar { width: 38px; height: 38px; font-size: 14px; }
    .podium-name { flex: 1; min-width: 0; gap: 4px; font-size: 13px; }
    .podium-name .podium-nick-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .podium-winrate {
        font-size: 15px;
        margin-left: auto;
        white-space: nowrap;
    }
    .podium-record { display: none; }

    /* 랭킹 행: 순위 + 닉네임 + 금액만 (전적/총판수 숨김) */
    .ranking-table-header,
    .ranking-row {
        grid-template-columns: 36px 1fr 110px;
        padding: 10px 12px;
        font-size: 12.5px;
        gap: 4px;
    }
    .col-record { display: none; }
    .col-winrate { font-size: 13px; }
    .ranking-row.top-rank .col-rank { font-size: 16px; }
    .rank-icon-sm { width: 16px; height: 16px; }
}
