/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #4CAF50;
    --primary-orange: #FF9800;
    --primary-blue: #2196F3;
    --dark-text: #1a1a1a;
    --light-text: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-green);
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-green);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--dark-text);
    transition: all 0.3s;
}

/* Buttons */
.btn-primary {
    background: var(--primary-green);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-green);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s;
    border: 2px solid var(--primary-green);
}

.btn-secondary:hover {
    background: var(--primary-green);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 80px 0;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--dark-text);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--light-text);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 32px;
    overflow: hidden;
}

.app-preview {
    padding: 24px;
    height: 100%;
    background: linear-gradient(180deg, #fff3e0 0%, #fff 100%);
}

.app-header {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 24px;
    text-align: center;
}

.preview-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.preview-icon {
    font-size: 32px;
}

.preview-text {
    font-weight: 600;
    color: var(--dark-text);
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark-text);
}

.section-header p {
    font-size: 18px;
    color: var(--light-text);
}

/* About Section */
.about {
    background: var(--bg-white);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.mission-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--bg-light);
    border-radius: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.mission-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.mission-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.mission-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--dark-text);
}

.mission-card p {
    color: var(--light-text);
    line-height: 1.8;
}

/* How It Works */
.how-it-works {
    background: var(--bg-light);
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.role-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.role-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.role-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.donor-badge {
    background: var(--primary-green);
    color: white;
}

.rescuer-badge {
    background: var(--primary-orange);
    color: white;
}

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

.role-icon {
    font-size: 64px;
    margin: 24px 0;
    text-align: center;
}

.role-card h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark-text);
}

.role-description {
    color: var(--light-text);
    margin-bottom: 24px;
    line-height: 1.8;
}

.role-benefits {
    list-style: none;
    margin-bottom: 32px;
}

.role-benefits li {
    padding: 12px 0;
    color: var(--dark-text);
    font-weight: 500;
}

.role-stats {
    display: flex;
    gap: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

.role-stat {
    flex: 1;
    text-align: center;
}

.role-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.role-stat-label {
    font-size: 12px;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Leaderboards */
.leaderboards {
    background: var(--bg-white);
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 12px 32px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--dark-text);
}

.tab-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.tab-btn.active {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
}

.leaderboard-panel {
    display: none;
}

.leaderboard-panel.active {
    display: block;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 60px 1fr 150px;
    padding: 16px 24px;
    background: var(--bg-light);
    border-radius: 12px 12px 0 0;
    font-weight: 600;
    color: var(--light-text);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

#rescuers-panel .leaderboard-header {
    grid-template-columns: 60px 1fr 120px 120px;
}

.leaderboard-list {
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow);
    min-height: 400px;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 60px 1fr 150px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    transition: background 0.2s;
}

.leaderboard-item:hover {
    background: var(--bg-light);
}

#rescuers-panel .leaderboard-item {
    grid-template-columns: 60px 1fr 120px 120px;
}

.rank {
    font-size: 24px;
    font-weight: 700;
    color: var(--light-text);
}

.rank.top-1 {
    color: #FFD700;
}

.rank.top-2 {
    color: #C0C0C0;
}

.rank.top-3 {
    color: #CD7F32;
}

.leader-name {
    font-weight: 600;
    font-size: 18px;
    color: var(--dark-text);
}

.leader-value {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-green);
    text-align: right;
}

.leader-hours {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-orange);
    text-align: right;
}

.loading {
    text-align: center;
    padding: 60px;
    color: var(--light-text);
}

.empty-state {
    text-align: center;
    padding: 60px;
    color: var(--light-text);
}

/* Download Section */
.download {
    background: linear-gradient(135deg, var(--primary-green) 0%, #45a049 100%);
    color: white;
    text-align: center;
}

.download-content h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
}

.download-content > p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-block;
    transition: transform 0.2s;
}

.download-btn:hover {
    transform: scale(1.05);
}

.download-note {
    font-size: 14px;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-logo .logo-icon {
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.footer-description {
    color: #999;
    margin-bottom: 24px;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    transition: background 0.2s;
}

.social-link:hover {
    background: var(--primary-green);
}

.footer-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #333;
    color: #999;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        order: -1;
    }

    .mission-grid,
    .roles-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .role-card {
        padding: 24px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 24px;
        box-shadow: var(--shadow-lg);
        gap: 16px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.leaderboard-item {
    animation: fadeIn 0.3s ease-out;
    animation-fill-mode: both;
}

.leaderboard-item:nth-child(1) { animation-delay: 0.05s; }
.leaderboard-item:nth-child(2) { animation-delay: 0.1s; }
.leaderboard-item:nth-child(3) { animation-delay: 0.15s; }
.leaderboard-item:nth-child(4) { animation-delay: 0.2s; }
.leaderboard-item:nth-child(5) { animation-delay: 0.25s; }
.leaderboard-item:nth-child(6) { animation-delay: 0.3s; }
.leaderboard-item:nth-child(7) { animation-delay: 0.35s; }
.leaderboard-item:nth-child(8) { animation-delay: 0.4s; }
.leaderboard-item:nth-child(9) { animation-delay: 0.45s; }
.leaderboard-item:nth-child(10) { animation-delay: 0.5s; }

