/* ===================================
   LEADERBOARD PAGE STYLES
   =================================== */

/* Page Header */
.page-header {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, #0D0E12 0%, rgba(26, 28, 36, 0.5) 100%);
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 20px;
    color: #00D9FF;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    margin-bottom: 24px;
}

.page-title {
    font-size: 48px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #00D9FF, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 18px;
    color: #9CA3AF;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Leaderboard Content */
.leaderboard-content {
    padding: 40px 0 80px;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    background: #1A1C24;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid #2A2D3A;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: #9CA3AF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #00D9FF, #8B5CF6);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.tab-btn:hover {
    color: #00D9FF;
}

.tab-btn.active {
    color: #FFFFFF;
}

.tab-btn.active::before {
    opacity: 1;
}

.tab-btn svg,
.tab-btn span {
    position: relative;
    z-index: 1;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.stat-card {
    background: linear-gradient(145deg, #1A1C24, #0D0E12);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 12px 32px rgba(0, 217, 255, 0.15);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card.total {
    color: #00D9FF;
}

.stat-card.monthly {
    color: #00FF9C;
}

.stat-card.weekly {
    color: #8B5CF6;
}

.stat-card.web3 {
    color: #FFA500;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.stat-card.total .stat-icon {
    background: rgba(0, 217, 255, 0.1);
    color: #00D9FF;
}

.stat-card.monthly .stat-icon {
    background: rgba(0, 255, 156, 0.1);
    color: #00FF9C;
}

.stat-card.weekly .stat-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.stat-card.web3 .stat-icon {
    background: rgba(255, 165, 0, 0.1);
    color: #FFA500;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: #9CA3AF;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.stat-badge.positive {
    background: rgba(0, 255, 156, 0.1);
    color: #00FF9C;
}

.stat-badge.info {
    background: rgba(0, 217, 255, 0.1);
    color: #00D9FF;
}

.stat-badge.neutral {
    background: rgba(255, 165, 0, 0.1);
    color: #FFA500;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #1A1C24;
    border: 1px solid #2A2D3A;
    border-radius: 10px;
    color: #00D9FF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: #00D9FF;
    transform: translateY(-2px);
}

.action-btn:active {
    transform: translateY(0);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 20px;
}

.loading-state.hidden {
    display: none;
}

.loading-state p {
    color: #9CA3AF;
    font-size: 16px;
}

/* Users Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.users-grid.hidden {
    display: none;
}

.user-card {
    background: linear-gradient(145deg, #1A1C24, #0D0E12);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #00D9FF, #8B5CF6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 12px 32px rgba(0, 217, 255, 0.15);
}

.user-card:hover::before {
    opacity: 1;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00D9FF, #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-address {
    font-size: 16px;
    font-weight: 600;
    color: #00D9FF;
    font-family: 'Courier New', monospace;
    margin-bottom: 4px;
    word-break: break-all;
}

.user-joined {
    font-size: 13px;
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-details {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.user-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 12px;
    color: #9CA3AF;
}

.user-detail.web3 {
    background: rgba(0, 217, 255, 0.1);
    color: #00D9FF;
}

.user-detail.referrals {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.user-detail svg {
    width: 14px;
    height: 14px;
}

/* Leaderboard Header */
.leaderboard-header {
    text-align: center;
    margin-bottom: 48px;
}

.trophy-icon {
    margin-bottom: 24px;
}

.trophy-icon svg {
    color: #FFD700;
    filter: drop-shadow(0 4px 16px rgba(255, 215, 0, 0.4));
}

.leaderboard-title {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.leaderboard-subtitle {
    font-size: 16px;
    color: #9CA3AF;
}

/* Podium */
.podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 20px;
    margin-bottom: 48px;
    padding: 0 20px;
}

.podium-container.hidden {
    display: none;
}

.podium-card {
    flex: 1;
    max-width: 280px;
    background: linear-gradient(145deg, #1A1C24, #0D0E12);
    border: 2px solid;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.podium-card.first {
    border-color: #FFD700;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    transform: translateY(-20px);
}

.podium-card.second {
    border-color: #C0C0C0;
    box-shadow: 0 8px 32px rgba(192, 192, 192, 0.2);
}

.podium-card.third {
    border-color: #CD7F32;
    box-shadow: 0 8px 32px rgba(205, 127, 50, 0.2);
}

.podium-rank {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    border: 3px solid #0D0E12;
}

.podium-card.first .podium-rank {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #0D0E12;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.5);
}

.podium-card.second .podium-rank {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: #0D0E12;
}

.podium-card.third .podium-rank {
    background: linear-gradient(135deg, #CD7F32, #B8733B);
    color: #0D0E12;
}

.podium-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00D9FF, #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #FFFFFF;
}

.podium-card.first .podium-avatar {
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
}

.podium-address {
    font-size: 14px;
    font-weight: 600;
    color: #00D9FF;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
    word-break: break-all;
}

.podium-earnings {
    font-size: 24px;
    font-weight: 700;
    color: #00FF9C;
    font-family: 'Courier New', monospace;
    margin-bottom: 4px;
}

.podium-earnings-usd {
    font-size: 16px;
    color: #6B7280;
}

.podium-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.podium-stat {
    text-align: center;
}

.podium-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
}

.podium-stat-label {
    font-size: 11px;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Leaderboard List */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.leaderboard-list.hidden {
    display: none;
}

.leaderboard-item {
    background: linear-gradient(145deg, #1A1C24, #0D0E12);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(4px);
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.1);
}

.rank-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #9CA3AF;
    flex-shrink: 0;
}

.leaderboard-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00D9FF, #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    flex-shrink: 0;
}

.leaderboard-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-address {
    font-size: 16px;
    font-weight: 600;
    color: #00D9FF;
    font-family: 'Courier New', monospace;
    margin-bottom: 6px;
    word-break: break-all;
}

.leaderboard-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #6B7280;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.leaderboard-earnings {
    text-align: right;
    flex-shrink: 0;
}

.earnings-bnb {
    font-size: 20px;
    font-weight: 700;
    color: #00FF9C;
    font-family: 'Courier New', monospace;
    margin-bottom: 4px;
}

.earnings-usd {
    font-size: 14px;
    color: #6B7280;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state.hidden {
    display: none;
}

.empty-icon {
    margin-bottom: 24px;
}

.empty-icon svg {
    color: #6B7280;
}

.empty-state h3 {
    font-size: 24px;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    color: #9CA3AF;
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .podium-container {
        flex-direction: column;
        align-items: center;
    }

    .podium-card {
        width: 100%;
        max-width: 400px;
        transform: translateY(0) !important;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 60px 0 40px;
    }

    .page-title {
        font-size: 36px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    .tab-navigation {
        flex-direction: column;
        gap: 8px;
    }

    .tab-btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-value {
        font-size: 28px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .users-grid {
        grid-template-columns: 1fr;
    }

    .leaderboard-title {
        font-size: 28px;
    }

    .leaderboard-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .leaderboard-info,
    .leaderboard-earnings {
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 48px 0 32px;
    }

    .page-title {
        font-size: 28px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .stat-card {
        padding: 16px;
        gap: 16px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-value {
        font-size: 24px;
    }

    .section-title {
        font-size: 20px;
    }

    .user-card {
        padding: 16px;
    }

    .user-avatar {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .leaderboard-title {
        font-size: 24px;
    }

    .trophy-icon svg {
        width: 48px;
        height: 48px;
    }

    .podium-avatar {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }

    .podium-earnings {
        font-size: 20px;
    }

    .leaderboard-item {
        padding: 16px;
    }

    .rank-badge {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .leaderboard-avatar {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .earnings-bnb {
        font-size: 18px;
    }
}