:root {
    --primary: #6C5CE7;
    --primary-dark: #5849BE;
    --secondary: #00E676;
    --dark-bg: #0F172A;
    --card-bg: #1E293B;
    --text-light: #F8FAFC;
    --text-gray: #94A3B8;

    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding-top: 80px;
    /* For fixed navbar */
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.leaderboard-header h1 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #94A3B8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.leaderboard-header p {
    color: var(--text-gray);
    margin-top: 10px;
    font-size: 1.1rem;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 230, 118, 0.1);
    color: var(--secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 15px;
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(0, 230, 118, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
    }
}

/* Podium Section */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 60px;
    min-height: 350px;
}

.podium-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    position: relative;
    width: 280px;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.podium-card:hover {
    transform: translateY(-10px);
}

.podium-card.rank-1 {
    order: 2;
    height: 380px;
    border-color: rgba(255, 215, 0, 0.3);
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.05) 0%, var(--card-bg) 100%);
    z-index: 2;
}

.podium-card.rank-2 {
    order: 1;
    height: 320px;
    border-color: rgba(192, 192, 192, 0.3);
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.05) 0%, var(--card-bg) 100%);
}

.podium-card.rank-3 {
    order: 3;
    height: 290px;
    border-color: rgba(205, 127, 50, 0.3);
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.05) 0%, var(--card-bg) 100%);
}

.crown-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.rank-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.rank-1 .rank-badge {
    background: var(--gold);
    color: #000;
}

.rank-2 .rank-badge {
    background: var(--silver);
    color: #000;
}

.rank-3 .rank-badge {
    background: var(--bronze);
    color: #000;
}

.user-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--card-bg);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    object-fit: cover;
}

.rank-1 .user-avatar-large {
    box-shadow: 0 0 0 4px var(--gold);
}

.rank-2 .user-avatar-large {
    box-shadow: 0 0 0 4px var(--silver);
}

.rank-3 .user-avatar-large {
    box-shadow: 0 0 0 4px var(--bronze);
}

.user-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
}

.total-spent {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.total-spent span {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* List Section */
.leaderboard-list {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.list-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
    border-radius: 12px;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.item-rank {
    width: 40px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-gray);
    font-family: 'Rajdhani', sans-serif;
}

.item-user {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}

.item-name {
    font-weight: 600;
    color: #fff;
}

.item-amount {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
}

/* Loading State */
.loading-skeleton {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #1E293B 4%, #28364d 25%, #1E293B 36%);
    background-size: 1000px 100%;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@media (max-width: 768px) {
    .podium-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 40px;
    }

    .podium-card {
        width: 100%;
        max-width: none;
        height: auto !important;
        /* Reset height */
        min-height: 200px;
        padding: 15px 10px;
    }

    /* Rank 1: Full Width on Top */
    .podium-card.rank-1 {
        grid-column: 1 / -1;
        order: 1 !important;
        margin-bottom: 5px;
    }

    /* Rank 2 & 3: Side by Side */
    .podium-card.rank-2 {
        order: 2 !important;
    }

    .podium-card.rank-3 {
        order: 3 !important;
    }

    .leaderboard-header h1 {
        font-size: 2rem;
    }

    .user-avatar-large {
        width: 70px;
        height: 70px;
        margin-bottom: 10px;
    }

    .crown-icon {
        font-size: 2rem;
        margin-bottom: 5px;
    }

    .user-name {
        font-size: 1.1rem;
    }

    .total-spent {
        font-size: 1.2rem;
    }
}