/* Games page: podium cards for the top three, then a table (same language as the leaderboard) */

.gm-list { display: block; }
.gm-list.loading { opacity: 0.5; }

/* platform chips */
.gt-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.gt-chip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 20px; border-radius: 6px; background: var(--chip-bg); border: 1px solid var(--chip-line);
}
.gt-chip img { width: 12px; height: 12px; }
.gt-chip-steam { --chip-bg: rgba(102,192,244,0.16); --chip-line: rgba(102,192,244,0.35); }
.gt-chip-ra    { --chip-bg: rgba(232,121,249,0.16); --chip-line: rgba(232,121,249,0.35); }
.gt-chip-psn   { --chip-bg: rgba(37,137,208,0.22);  --chip-line: rgba(37,137,208,0.5); }
.gt-chip-xbox  { --chip-bg: rgba(82,176,67,0.2);    --chip-line: rgba(82,176,67,0.45); }

.gt-title { color: var(--text-1); font-weight: 700; text-decoration: none; }
a.gt-title:hover { color: #a5b4fc; }
.gt-cover-ph {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #334155, #1e293b); color: rgba(255,255,255,0.55); font-weight: 800;
}

/* avatars (also used in the stack) */
.gm-av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; }
.gm-av-letter { align-items: center; justify-content: center; background: #334155; color: #e2e8f0; font-size: 0.75rem; font-weight: 800; }

/* ── Podium ──────────────────────────────────────────────────────── */
.gt-podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 16px; margin: 8px 0 22px; }
.gt-pod {
    position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
    padding: 34px 18px 16px;
    background: linear-gradient(180deg, var(--pod-tint) 0%, var(--card-bg) 70%);
    border: 1px solid var(--pod-line); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.gt-pod-1 { --pod-c: var(--gold);   --pod-tint: rgba(245,158,11,0.16);  --pod-line: rgba(245,158,11,0.45); padding-top: 44px; }
.gt-pod-2 { --pod-c: var(--silver); --pod-tint: rgba(148,163,184,0.13); --pod-line: rgba(148,163,184,0.35); }
.gt-pod-3 { --pod-c: var(--bronze); --pod-tint: rgba(201,124,58,0.14);  --pod-line: rgba(201,124,58,0.38); }
.gt-pod-rank {
    position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
    width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--pod-c); color: #0b1120; font-weight: 800; box-shadow: 0 0 0 4px var(--dark-bg), 0 0 18px var(--pod-c);
}
.gt-pod-cover { width: 88px; height: 88px; border-radius: 16px; object-fit: cover; border: 3px solid var(--pod-c); font-size: 2rem; }
.gt-pod-1 .gt-pod-cover { width: 104px; height: 104px; }
.gt-pod .gt-title { font-size: 1.05rem; line-height: 1.25; max-width: 100%; }
.gt-pod .gt-chips { justify-content: center; }
.gt-pod-stats { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 6px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.07); border-bottom: 1px solid rgba(255,255,255,0.07); }
.gt-pod-stats b { display: block; font-size: 1.15rem; color: var(--pod-c); font-variant-numeric: tabular-nums; }
.gt-pod-stats span { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.gt-pod-top { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; counter-reset: gt; }
.gt-pod-top li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.82rem; counter-increment: gt; }
.gt-pod-top li::before { content: counter(gt); width: 12px; color: var(--text-2); font-weight: 700; font-size: 0.75rem; }
.gt-pod-top a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--text-1); text-decoration: none; }
.gt-pod-top a:hover .gt-name { color: #a5b4fc; }
.gt-pod-top .gm-av { width: 22px; height: 22px; }
.gt-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-val { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Table ───────────────────────────────────────────────────────── */
.gt-head, .gt-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) 110px 120px 280px; align-items: center; }
.gt-head {
    position: sticky; top: var(--gh-nav-h, 60px); z-index: 5;
    height: 42px; padding: 0 12px;
    background: #0f1828; border: 1px solid var(--border-mid); border-radius: 12px 12px 0 0;
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-2);
}
.gt-head > span { padding: 0 12px; }
.gt-head .r, .gt-num { text-align: right; }
.gt-row {
    padding: 0 12px; min-height: 62px; background: var(--card-bg);
    border: 1px solid var(--border-mid); border-top: 1px solid rgba(255,255,255,0.035);
    border-bottom: 0;
}
.gt-row:nth-of-type(even) { background: #111b2d; }
.gt-row:hover { background: #1b2a45; }
.gt-row:last-child { border-bottom: 1px solid var(--border-mid); border-radius: 0 0 12px 12px; }
.gt-row > div { padding: 8px 12px; min-width: 0; }
.gt-rank { text-align: center; }
.rk { font-weight: 700; font-size: 0.85rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rk-1, .rk-2, .rk-3 { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; color: #0b1120; font-weight: 800; }
.rk-1 { background: var(--gold); } .rk-2 { background: var(--silver); } .rk-3 { background: var(--bronze); }

.gt-game { display: flex; align-items: center; gap: 12px; }
.gt-cover { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; font-size: 1.1rem; }
.gt-info { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.gt-row .gt-title { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-row .gt-chip { width: 20px; height: 16px; border-radius: 5px; }
.gt-row .gt-chip img { width: 10px; height: 10px; }
.gt-num { font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; font-size: 0.9rem; }

.gt-top { display: flex; align-items: center; gap: 10px; }
.gt-stack { display: inline-flex; flex: none; }
.gt-stack a { display: inline-flex; margin-left: -8px; border-radius: 50%; box-shadow: 0 0 0 2px var(--card-bg); transition: transform 0.15s; }
.gt-stack a:first-child { margin-left: 0; }
.gt-stack a:hover { transform: translateY(-3px); z-index: 1; }
.gt-first { min-width: 0; display: flex; flex-direction: column; font-size: 0.72rem; color: var(--text-2); line-height: 1.3; }
.gt-first b { color: var(--text-1); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .gt-head, .gt-row { grid-template-columns: 50px minmax(0, 1fr) 90px 110px 170px; }
    .gt-first { display: none; }
}
@media (max-width: 900px) {
    .gt-podium { grid-template-columns: 1fr; gap: 26px; }
    .gt-pod-1 { order: -1; }
    .gt-pod { flex-direction: row; flex-wrap: wrap; text-align: left; padding: 18px 16px 14px 56px; gap: 8px 14px; }
    .gt-pod-1 { padding-top: 18px; }
    .gt-pod-rank { top: 50%; left: 12px; transform: translateY(-50%); width: 30px; height: 30px; box-shadow: 0 0 10px var(--pod-c); }
    .gt-pod-cover, .gt-pod-1 .gt-pod-cover { width: 56px; height: 56px; border-width: 2px; font-size: 1.3rem; }
    .gt-pod .gt-title { flex: 1; min-width: 0; align-self: center; }
    .gt-pod .gt-chips, .gt-pod-top { display: none; }
    .gt-pod-stats { border: 0; padding: 0; }
    .gt-pod-stats b { display: inline; font-size: 1rem; margin-right: 4px; }
    .gt-head, .gt-row { grid-template-columns: 44px minmax(0, 1fr) 100px; }
    .gt-head > span:nth-child(3), .gt-head > span:nth-child(5),
    .gt-row > div:nth-child(3), .gt-row > div:nth-child(5) { display: none; }
}
@media (max-width: 600px) {
    .gt-head, .gt-row { padding: 0 4px; }
    .gt-row > div { padding: 8px 6px; }
    .gt-cover { width: 38px; height: 38px; }
    .gt-row .gt-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
