/* ===================================
   Volunteer Leaderboard Styles
   Based on main site design
   Updated: Oct 23, 2025
   =================================== */

/* === CSS Variables === */
:root {
    --primary-blue: #4285f4;
    --primary-red: #ea4335;
    --primary-yellow: #fbbc04;
    --primary-green: #34a853;
    --bg-dark: #000000;
    --bg-card: rgba(30, 30, 30, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: rgba(66, 133, 244, 0.2);
    --shadow-glow: 0 0 30px rgba(66, 133, 244, 0.15);
}

/* === Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Google Sans', 'Roboto', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === Particle Canvas === */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* === Container === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* === Header === */
.header {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.1), rgba(52, 168, 83, 0.1));
    border-radius: 50px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(66, 133, 244, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50px;
    padding: 3px;
    background: linear-gradient(90deg, 
        var(--primary-blue) 0%, 
        var(--primary-red) 25%, 
        var(--primary-yellow) 50%, 
        var(--primary-green) 75%,
        var(--primary-blue) 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
    animation: rgbBorderFlow 6s linear infinite;
}

@keyframes rgbBorderFlow {
    0% { 
        background: linear-gradient(90deg, 
            var(--primary-blue) 0%, 
            var(--primary-red) 25%, 
            var(--primary-yellow) 50%, 
            var(--primary-green) 75%,
            var(--primary-blue) 100%
        );
    }
    25% { 
        background: linear-gradient(90deg, 
            var(--primary-green) 0%, 
            var(--primary-blue) 25%, 
            var(--primary-red) 50%, 
            var(--primary-yellow) 75%,
            var(--primary-green) 100%
        );
    }
    50% { 
        background: linear-gradient(90deg, 
            var(--primary-yellow) 0%, 
            var(--primary-green) 25%, 
            var(--primary-blue) 50%, 
            var(--primary-red) 75%,
            var(--primary-yellow) 100%
        );
    }
    75% { 
        background: linear-gradient(90deg, 
            var(--primary-red) 0%, 
            var(--primary-yellow) 25%, 
            var(--primary-green) 50%, 
            var(--primary-blue) 75%,
            var(--primary-red) 100%
        );
    }
    100% { 
        background: linear-gradient(90deg, 
            var(--primary-blue) 0%, 
            var(--primary-red) 25%, 
            var(--primary-yellow) 50%, 
            var(--primary-green) 75%,
            var(--primary-blue) 100%
        );
    }
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.main-heading {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

/* === Action Buttons === */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(66, 133, 244, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* === Stats Section === */
.stats-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-blue);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* === Last Updated Badge === */
.last-updated {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(66, 133, 244, 0.1);
    border: 1px solid var(--primary-blue);
    border-radius: 50px;
    margin: 20px auto;
    width: fit-content;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* === Leaderboard Section === */
.leaderboard-section {
    margin-bottom: 40px;
}

.table-container {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 0;
    border: none;
    overflow-x: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.leaderboard-table thead {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
}

.leaderboard-table th {
    padding: 20px 15px;
    text-align: left;
    font-family: 'Google Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none;
    color: white;
    white-space: nowrap;
}

.leaderboard-table tbody tr {
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.leaderboard-table tbody tr:nth-child(even) {
    background: rgba(66, 133, 244, 0.03);
}

.leaderboard-table tbody tr:hover {
    background: rgba(66, 133, 244, 0.08);
    transform: scale(1.01);
    box-shadow: 0 4px 20px rgba(66, 133, 244, 0.15);
    z-index: 10;
}

.leaderboard-table td {
    padding: 20px 15px;
    font-size: 0.95rem;
    vertical-align: middle;
}

/* === Rank Cell === */
.rank-cell {
    text-align: center;
    width: 80px;
}

.rank-badge {
    font-size: 1.2rem;
    font-weight: 700;
}

.top-1 .rank-badge {
    color: #ffd700;
}

.top-2 .rank-badge {
    color: #c0c0c0;
}

.top-3 .rank-badge {
    color: #cd7f32;
}

/* === Name Cell === */
.volunteer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.volunteer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.volunteer-details {
    flex: 1;
}

.volunteer-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.volunteer-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* === Stat Numbers === */
.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-blue);
}

/* === Account Owners Cell === */
.owner-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* === Impact Cell === */
.impact-cell {
    text-align: center;
}

.impact-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    display: block;
}

.impact-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* === Badges === */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.badge-success {
    background: rgba(52, 168, 83, 0.2);
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
}

.badge-core-team {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    font-weight: 700;
}

.badge-eligible {
    background: rgba(251, 188, 4, 0.2);
    color: var(--primary-yellow);
    border: 1px solid var(--primary-yellow);
}

.badge-active {
    background: rgba(66, 133, 244, 0.2);
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.badge-inactive {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* === Streak Badge === */
.streak-badge {
    font-size: 1rem;
    font-weight: 600;
}

/* === Date Styles === */
.date-today {
    color: var(--primary-green);
    font-weight: 600;
}

.date-yesterday {
    color: var(--primary-yellow);
}

.date-recent {
    color: var(--text-secondary);
}

/* === Toast Notification === */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(52, 168, 83, 0.95);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 500;
    z-index: 1000;
    transition: bottom 0.3s ease;
    backdrop-filter: blur(10px);
}

.toast.show {
    bottom: 30px;
}

/* === Error Message === */
.error-message {
    background: rgba(234, 67, 53, 0.1);
    border: 1px solid var(--primary-red);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-red);
}

.error-icon {
    font-size: 1.5rem;
}

/* === Footer === */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.footer-note {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.footer-link {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-green);
}
