/* Leaderboard Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.header-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.filter-select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.filter-select option {
    background: #667eea;
    color: white;
}

/* Stats Overview */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.stat-description {
    font-size: 0.9rem;
    color: #666;
}

/* Leaderboard Section */
.leaderboard-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggles {
    display: flex;
    gap: 0.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 0.25rem;
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #666;
}

.toggle-btn.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Podium Styles */
.podium {
    display: flex;
    justify-content: center;
    align-items: end;
    margin-bottom: 3rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.podium-item {
    text-align: center;
    position: relative;
    min-width: 150px;
}

.podium-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background: #666;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}

.first-place .podium-rank {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
}

.second-place .podium-rank {
    background: linear-gradient(45deg, #c0c0c0, #e5e5e5);
    color: #333;
}

.third-place .podium-rank {
    background: linear-gradient(45deg, #cd7f32, #daa520);
    color: white;
}

.podium-content {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.first-place .podium-content {
    background: linear-gradient(145deg, #fff9e6, #ffffff);
    border: 2px solid #ffd700;
    transform: scale(1.05);
}

.second-place .podium-content {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 2px solid #c0c0c0;
}

.third-place .podium-content {
    background: linear-gradient(145deg, #fff5e6, #ffffff);
    border: 2px solid #cd7f32;
}

.crown {
    font-size: 2rem;
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    color: white;
    font-size: 1.5rem;
}

.avatar.champion {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    font-size: 2rem;
}

.volunteer-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.volunteer-score {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.champion-badge {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-block;
}

/* Leaderboard List */
.leaderboard-container {
    background: #f8f9fa;
    border-radius: 16px;
    overflow: hidden;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 60px 1fr 120px 150px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #e9ecef;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.leaderboard-list {
    max-height: 600px;
    overflow-y: auto;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 60px 1fr 120px 150px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    align-items: center;
    transition: background-color 0.3s ease;
    animation: slideInRight 0.5s ease-out;
}

.leaderboard-item:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: #495057;
    text-align: center;
}

.rank.top-10 {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.volunteer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.volunteer-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.volunteer-details h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.volunteer-meta {
    font-size: 0.8rem;
    color: #666;
}

.score {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    text-align: center;
}

.badges {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge.gold {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
}

.badge.silver {
    background: linear-gradient(45deg, #c0c0c0, #e5e5e5);
    color: #333;
}

.badge.bronze {
    background: linear-gradient(45deg, #cd7f32, #daa520);
    color: white;
}

/* Achievement Showcase */
.achievement-showcase {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.achievement-showcase h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #28a745;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-3px);
}

.achievement-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.achievement-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.achievement-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.achievement-meta {
    font-size: 0.8rem;
    color: #666;
}

.achievement-description {
    color: #495057;
    font-size: 0.9rem;
}

/* Personal Stats */
.personal-stats {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.personal-stats h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.personal-card {
    background: linear-gradient(145deg, #fff9e6, #ffffff);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid #ffd700;
}

.personal-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.personal-rank, .personal-score, .next-goal {
    text-align: center;
    font-size: 1rem;
    color: #495057;
}

.personal-rank span, .personal-score span, .next-goal span {
    font-weight: 700;
    color: #333;
    display: block;
    font-size: 1.2rem;
    margin-top: 0.25rem;
}

.progress-bar {
    background: #e9ecef;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(45deg, #28a745, #20c997);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 6px;
}

/* Loading States */
.loading-state {
    text-align: center;
    padding: 3rem;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error-state {
    text-align: center;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .stats-overview {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .view-toggles {
        justify-content: center;
    }

    .podium {
        flex-direction: column;
        align-items: center;
    }

    .podium-item {
        width: 100%;
        max-width: 250px;
    }

    .first-place {
        order: -1;
    }

    .leaderboard-header,
    .leaderboard-item {
        grid-template-columns: 50px 1fr 100px;
        font-size: 0.8rem;
    }

    .badges-col {
        display: none;
    }

    .personal-info {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }
}