/* LGC Tournaments - Frontend Leaderboard Styles */

.lgc-leaderboard-container {
    width: 100%;
    margin: 2rem auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    position: relative;
}

/* Suble gradient header top border */
.lgc-leaderboard-container::before {
    content: '';
    display: block;
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
}

.lgc-leaderboard {
    width: 100%;
    min-width: 750px;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.lgc-leaderboard th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 16px 24px;
    border-bottom: 2px solid #e2e8f0;
}

.lgc-leaderboard td {
    padding: 16px 24px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

/* Hover effect */
.lgc-leaderboard tbody tr:hover td {
    background-color: #f8fafc;
}

.lgc-leaderboard tbody tr:last-child td {
    border-bottom: none;
}

/* Ranking column */
.col-rank {
    width: 60px;
    text-align: center;
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 auto;
}

/* Top 3 Medals */
.lgc-leaderboard tbody tr:nth-child(1) .rank-number {
    background-color: #fbbf24; /* Gold */
    color: #fff;
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.4);
}
.lgc-leaderboard tbody tr:nth-child(2) .rank-number {
    background-color: #94a3b8; /* Silver */
    color: #fff;
    box-shadow: 0 4px 10px rgba(148, 163, 184, 0.4);
}
.lgc-leaderboard tbody tr:nth-child(3) .rank-number {
    background-color: #b45309; /* Bronze */
    color: #fff;
    box-shadow: 0 4px 10px rgba(180, 83, 9, 0.4);
}

/* Name */
.col-name strong {
    font-size: 1.05rem;
    color: #0f172a;
}

/* Scores */
.col-score {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

/* Badges */
.lgc-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.lgc-badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.lgc-badge-warning {
    background-color: #fef9c3;
    color: #854d0e;
}

/* Responsive */
@media (max-width: 640px) {
    .lgc-leaderboard th,
    .lgc-leaderboard td {
        padding: 12px 10px;
    }
    .hide-mobile {
        display: none;
    }
    .col-name strong {
        font-size: 0.95rem;
    }
}

/* Accordion & Chart Styling */
.lgc-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background-color: #f1f5f9;
    color: #64748b;
    font-size: 14px;
    margin-left: 8px;
    font-weight: bold;
    transition: all 0.2s;
}

.lgc-row-player:hover .lgc-toggle-icon {
    background-color: #e2e8f0;
    color: #0f172a;
}

.lgc-row-chart td {
    padding: 0;
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.lgc-chart-wrapper {
    box-shadow: inset 0 3px 6px -3px rgba(0,0,0,0.1);
    background-color: #ffffff;
    border-radius: 0 0 8px 8px;
}

/* Mobile & Container Overflow Protection */
.lgc-leaderboard-wrapper {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.lgc-leaderboard-container {
    width: 100%;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .lgc-highlights {
        width: 100% !important;
    }
    .lgc-highlights > div {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .lgc-toggle-container {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
    }
    .lgc-tab-switch {
        flex: 1 1 calc(50% - 6px) !important;
        font-size: 13px !important;
        padding: 8px 10px !important;
        text-align: center !important;
        white-space: nowrap;
    }
    .lgc-live-player-search {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .lgc-podium-grid {
        grid-template-columns: 1fr !important;
    }
    .lgc-details-container {
        padding: 12px 10px !important;
        gap: 14px !important;
    }
    .lgc-history-list,
    .lgc-chart-wrapper {
        min-width: 0 !important;
        width: 100% !important;
        flex: 1 1 100% !important;
        box-sizing: border-box !important;
    }
    .lgc-history-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

