/* Leaderboard Styles - flexbio.link */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #5865F2;
    --primary-hover: #4752C4;
    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 30, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --gold: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.3);
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --border: rgba(255, 255, 255, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* Animated Background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(88, 101, 242, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(88, 101, 242, 0.05) 0%, transparent 50%),
        radial-gradient(2px 2px at 10% 10%, rgba(255,255,255,0.15), transparent),
        radial-gradient(2px 2px at 20% 80%, rgba(255,255,255,0.1), transparent),
        radial-gradient(1px 1px at 40% 40%, rgba(255,255,255,0.15), transparent),
        radial-gradient(2px 2px at 60% 20%, rgba(255,255,255,0.1), transparent),
        radial-gradient(1px 1px at 80% 60%, rgba(255,255,255,0.15), transparent),
        radial-gradient(2px 2px at 90% 90%, rgba(255,255,255,0.1), transparent);
    background-size: 100% 100%, 100% 100%, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px;
    z-index: 0;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.back-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Hero */
.hero {
    text-align: center;
    padding: 1rem 0 2rem;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}

.hero h1 i {
    color: var(--gold);
    font-size: 1.8rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem;
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    background: var(--primary);
    color: white;
}

.tab i {
    font-size: 0.8rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==================== PODIUM ==================== */
.podium-section {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.podium-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 180px;
    position: relative;
    transition: all 0.3s;
}

.podium-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.12);
}

/* 1st Place - Center & Bigger */
.podium-card.first {
    width: 200px;
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.08) 0%, var(--bg-card) 50%);
    border-color: rgba(255, 215, 0, 0.2);
    order: 2;
}

.podium-card.second {
    order: 1;
}

.podium-card.third {
    order: 3;
}

/* Crown */
.crown {
    position: absolute;
    top: -15px;
    font-size: 1.5rem;
    color: var(--gold);
    filter: drop-shadow(0 0 8px var(--gold-glow));
}

/* Avatar Container */
.podium-avatar {
    position: relative;
    margin-bottom: 1rem;
}

.podium-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    background: var(--bg-dark);
}

.podium-card.first .podium-avatar img {
    width: 85px;
    height: 85px;
    border-color: var(--gold);
    box-shadow: 0 0 25px var(--gold-glow);
}

.podium-card.second .podium-avatar img {
    border-color: var(--silver);
}

.podium-card.third .podium-avatar img {
    border-color: var(--bronze);
}

/* Rank Badge */
.rank-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #000;
    border: 2px solid var(--bg-card);
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffed4a);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #dda15e);
}

/* Podium Info */
.podium-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.podium-card.first .podium-name {
    font-size: 1.05rem;
}

.podium-stat {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.podium-card.first .podium-stat {
    color: var(--gold);
    font-weight: 500;
}

/* Visit Button */
.podium-btn {
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.podium-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.podium-card.first .podium-btn {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: var(--gold);
}

.podium-card.first .podium-btn:hover {
    background: var(--gold);
    color: #000;
}

/* ==================== RANKINGS LIST ==================== */
.rankings-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.rank-item:hover {
    background: rgba(88, 101, 242, 0.08);
    border-color: rgba(88, 101, 242, 0.2);
}

.rank-number {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-right: 0.8rem;
}

.rank-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.8rem;
    border: 2px solid var(--border);
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-username {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-handle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rank-stat {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.rank-stat span {
    color: var(--text-muted);
    font-weight: 400;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 700px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .podium-section {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .podium-card {
        width: 100%;
        max-width: 280px;
        flex-direction: row;
        padding: 1rem;
        gap: 1rem;
    }
    
    .podium-card.first {
        width: 100%;
        max-width: 280px;
        padding: 1rem;
        order: 1;
    }
    
    .podium-card.second {
        order: 2;
    }
    
    .podium-card.third {
        order: 3;
    }
    
    .crown {
        top: 50%;
        left: -10px;
        transform: translateY(-50%);
        font-size: 1.2rem;
    }
    
    .podium-avatar {
        margin-bottom: 0;
    }
    
    .podium-avatar img,
    .podium-card.first .podium-avatar img {
        width: 50px;
        height: 50px;
    }
    
    .podium-info {
        flex: 1;
        text-align: left;
    }
    
    .podium-name,
    .podium-card.first .podium-name {
        font-size: 0.9rem;
    }
    
    .podium-stat {
        margin-bottom: 0;
    }
    
    .podium-btn {
        margin-left: auto;
    }
    
    .tabs {
        width: 100%;
    }
    
    .tab {
        flex: 1;
        justify-content: center;
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.4rem;
    }
    
    .tab span {
        display: none;
    }
    
    .tab i {
        font-size: 1rem;
    }
}
