/* ═══════════════════════════════════════════════════════════════════════════
   Global Investor Leaderboard — Styles v2.2
   ═══════════════════════════════════════════════════════════════════════════ */

.gi-lb-wrapper {
    max-width: 640px;
    margin: 40px auto;
}

/* ── Top Bar (Create Account) ──────────────────────────────────────────────── */
.gi-lb-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.gi-lb-create-account-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2ba3ff 0%, #1e8fe6 100%);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(43, 163, 255, 0.3);
}

.gi-lb-create-account-btn:hover {
    background: linear-gradient(135deg, #1e8fe6 0%, #1a7bc9 100%);
    box-shadow: 0 6px 16px rgba(43, 163, 255, 0.45);
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none !important;
}

/* ── Tab Navigation ─────────────────────────────────────────────────────────── */
.gi-lb-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    justify-content: center;
}

.gi-lb-tab {
    flex: 1;
    max-width: 300px;
    padding: 14px 24px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px 10px 0 0;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.gi-lb-tab:hover {
    background: #222;
    color: #888;
    border-color: #333;
}

.gi-lb-tab-active {
    background: #000;
    color: #2ba3ff;
    border-color: #2ba3ff;
    border-bottom: 1px solid #000;
    position: relative;
    z-index: 2;
}

.gi-lb-tab-active:hover {
    background: #000;
    color: #2ba3ff;
    border-color: #2ba3ff;
}

/* ── Tab Content ─────────────────────────────────────────────────────────────── */
.gi-lb-tab-content   { display: none; }
.gi-lb-tab-content-active { display: block; }

/* ── Container ───────────────────────────────────────────────────────────────── */
.gi-lb-container {
    background: #000;
    border: 1px solid #2a2a2a;
    border-radius: 0 0 16px 16px;
    padding: 36px 28px 32px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #eee;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

/* ── Header ──────────────────────────────────────────────────────────────────── */
.gi-lb-header { text-align: center; margin-bottom: 28px; }

.gi-lb-title {
    font-size: 24px;
    font-weight: 700;
    color: #2ba3ff;
    margin: 0 0 6px;
    letter-spacing: 0.5px;
}

.gi-lb-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* ── Table wrapper ───────────────────────────────────────────────────────────── */
.gi-lb-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Table ───────────────────────────────────────────────────────────────────── */
.gi-lb-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.gi-lb-table thead th {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    padding: 0 0 14px;
    border-bottom: 1px solid #1f1f1f;
    text-align: left;
}

.gi-lb-table thead th.gi-lb-col-rank {
    width: 60px;
    text-align: center;
}

.gi-lb-table thead th.gi-lb-col-time {
    text-align: right;
    white-space: nowrap;
}

/* ── Rows ────────────────────────────────────────────────────────────────────── */
.gi-lb-table tbody tr {
    border-bottom: 1px solid #151515;
    transition: background 0.2s ease;
}

.gi-lb-table tbody tr:last-child { border-bottom: none; }

.gi-lb-table tbody tr:hover { background: #111; }

.gi-lb-table tbody td {
    padding: 10px 0;
    font-size: 15px;
    vertical-align: middle;
}

/* ── Columns ─────────────────────────────────────────────────────────────────── */
.gi-lb-col-rank {
    text-align: center;
    font-weight: 700;
    color: #888;
    font-size: 14px;
    width: 60px;
    white-space: nowrap;
}

.gi-lb-col-name { color: #eee; font-weight: 500; }

.gi-lb-col-time {
    text-align: right;
    color: #4ecca3;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
    white-space: nowrap;
    padding-left: 16px !important;
}

/* ── Name + avatar wrapper inside the name cell ─────────────────────────────── */
.gi-lb-name-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.gi-lb-avatar-wrap {
    flex-shrink: 0;
    line-height: 0;   /* removes extra whitespace below inline-block img */
}

/* ── Avatar: all sizing via inline style on element, but override theme img styles here too ─ */
.gi-lb-table img {
    width:  36px !important;
    height: 36px !important;
    max-width:  36px !important;
    max-height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* ── Player name links ───────────────────────────────────────────────────────── */
.gi-lb-player-link {
    color: #2ba3ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.gi-lb-player-link:hover {
    color: #4ec9ff;
    text-decoration: underline;
}

.gi-lb-guest-name { color: #eee; }

/* ── Medal rows ──────────────────────────────────────────────────────────────── */
.gi-lb-rank-1 { background: linear-gradient(90deg, rgba(255,215,0,0.05) 0%, transparent 100%); }
.gi-lb-rank-1 .gi-lb-col-rank { color: #ffd700; text-shadow: 0 0 8px rgba(255,215,0,0.35); }
.gi-lb-rank-1 .gi-lb-col-name { color: #fff; font-weight: 700; }

.gi-lb-rank-2 { background: linear-gradient(90deg, rgba(192,192,192,0.05) 0%, transparent 100%); }
.gi-lb-rank-2 .gi-lb-col-rank { color: #c0c0c0; }
.gi-lb-rank-2 .gi-lb-col-name { color: #ddd; font-weight: 600; }

.gi-lb-rank-3 { background: linear-gradient(90deg, rgba(205,127,50,0.05) 0%, transparent 100%); border-bottom: 1px solid #2a2a2a !important; }
.gi-lb-rank-3 .gi-lb-col-rank { color: #cd7f32; }
.gi-lb-rank-3 .gi-lb-col-name { color: #ccc; font-weight: 600; }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.gi-lb-empty {
    text-align: center;
    color: #555;
    font-size: 14px;
    margin: 24px 0 0;
    font-style: italic;
}

/* ── Mobile ──────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .gi-lb-wrapper { margin: 20px 12px; max-width: 100%; }
    .gi-lb-tab { padding: 12px 14px; font-size: 13px; }
    .gi-lb-container { padding: 20px 14px 18px; }
    .gi-lb-title { font-size: 19px; }
    .gi-lb-table tbody td { padding: 9px 0; font-size: 14px; }
    .gi-lb-col-time { font-size: 13px; }
    .gi-lb-table img {
        width:  30px !important;
        height: 30px !important;
        max-width:  30px !important;
        max-height: 30px !important;
    }
}
