/* Leaderboards CSS */

.leaderboards-main {
    padding: 2rem 0 4rem;
    background: linear-gradient(135deg, #fdf2f8, #f3e8ff);
    min-height: 100vh;
}

.leaderboards-hero {
    background: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

/* Leaderboard Filters */
.leaderboard-filters {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-tab:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.filter-tab.active {
    background: #8b5cf6;
    border-color: #8b5cf6;
    color: white;
}

.game-selector {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #666;
    font-weight: 500;
    min-width: 200px;
}

.game-selector:focus {
    outline: none;
    border-color: #8b5cf6;
}

/* Podium Section */
.podium-section {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 2rem;
    margin-top: 2rem;
}

.podium-player {
    text-align: center;
    position: relative;
}

.podium-player.first {
    order: 2;
}

.podium-player.second {
    order: 1;
}

.podium-player.third {
    order: 3;
}

.podium-rank {
    font-size: 3rem;
    font-weight: 800;
    color: #8b5cf6;
    margin-bottom: 1rem;
}

.podium-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #8b5cf6;
}

.podium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.podium-crown {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #fcd34d;
    color: #92400e;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.podium-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.podium-score {
    font-size: 1.8rem;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 0.5rem;
}

.podium-location {
    color: #666;
    font-size: 0.9rem;
}

/* Leaderboard Table */
.leaderboard-section {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.leaderboard-table {
    margin: 2rem 0;
}

.table-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 100px 120px;
    gap: 1rem;
    padding: 1rem;
    background: #8b5cf6;
    color: white;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
}

.table-body {
    background: white;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 100px 120px;
    gap: 1rem;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
    transition: background-color 0.3s ease;
}

.leaderboard-row:hover {
    background: #f9fafb;
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.row-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: #8b5cf6;
    text-align: center;
}

.row-player {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.player-info {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.player-title {
    color: #8b5cf6;
    font-size: 0.9rem;
    font-weight: 500;
}

.row-score {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.row-games {
    text-align: center;
    color: #666;
    font-weight: 500;
}

.level-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    min-width: 40px;
}

.level-badge.level-50 {
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    color: #92400e;
}

.level-badge.level-48 {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: white;
}

.level-badge.level-47 {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
}

.level-badge.level-45 {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: white;
}

.level-badge.level-44 {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
}

.level-badge.level-43 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #92400e;
}

.level-badge.level-42 {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: white;
}

.level-badge.level-41 {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
}

.level-badge.level-40 {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: white;
}

.level-badge.level-39 {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
}

.row-country {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-weight: 500;
}

.country-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

/* Pagination */
.leaderboard-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.page-btn.active {
    background: #8b5cf6;
    border-color: #8b5cf6;
    color: white;
}

.pagination-dots {
    color: #666;
    font-weight: 500;
}

/* Achievements Section */
.achievements-section {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.achievement-card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.achievement-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.achievement-info h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.achievement-info p {
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.achievement-time {
    color: #8b5cf6;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Call to Action */
.leaderboard-cta {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    padding: 4rem 3rem;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 2rem;
}

.leaderboard-cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.leaderboard-cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .leaderboard-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-tabs {
        justify-content: center;
    }

    .podium {
        flex-direction: column;
        gap: 1rem;
    }

    .podium-player.first {
        order: 1;
    }

    .podium-player.second {
        order: 2;
    }

    .podium-player.third {
        order: 3;
    }

    .table-header,
    .leaderboard-row {
        grid-template-columns: 60px 1fr 100px 80px 80px 100px;
        gap: 0.5rem;
        padding: 1rem 0.5rem;
    }

    .player-avatar {
        width: 40px;
        height: 40px;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .achievement-card {
        flex-direction: column;
        text-align: center;
    }

    .leaderboard-cta {
        padding: 3rem 2rem;
    }

    .leaderboard-cta h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .podium-avatar {
        width: 100px;
        height: 100px;
    }

    .table-header,
    .leaderboard-row {
        grid-template-columns: 50px 1fr 80px 60px 60px 80px;
        font-size: 0.9rem;
    }

    .player-avatar {
        width: 35px;
        height: 35px;
    }

    .level-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        min-width: 30px;
    }

    .leaderboard-cta {
        padding: 2rem 1rem;
    }

    .leaderboard-cta h2 {
        font-size: 1.8rem;
    }
}
