/* --- Root Variables & Base Styles --- */
:root {
    --primary-color: #1b5e20; 
    --accent-color: #4caf50;  
    --text-color: #2c3e50;
    --text-light: #546e7a;
    --bg-overlay: rgba(255, 255, 255, 0.85); 
}

* { 
    margin: 0; padding: 0; box-sizing: border-box; 
    font-family: 'Poppins', sans-serif; 
}

body { 
    background: url('https://images.unsplash.com/photo-1518531933037-91b2f5f229cc?auto=format&fit=crop&q=80') no-repeat center center fixed; 
    background-size: cover; 
    color: var(--text-color); 
    min-height: 100vh;
}

/* --- Header & Navigation --- */
header { 
    background: rgba(27, 94, 32, 0.9); 
    backdrop-filter: blur(10px); 
    color: white; 
    padding: 1rem 2rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    position: sticky; 
    top: 0; 
    z-index: 1000;
}

.logo { 
    font-size: 1.8rem; 
    font-weight: 700; 
    cursor: pointer; 
    letter-spacing: -1px; 
    transition: transform 0.3s; 
    flex-shrink: 0;
}
.logo:hover { transform: scale(1.08) rotate(-2deg); }

.nav-links { 
    list-style: none; 
    display: flex; 
    gap: 1.5rem; 
    align-items: center;
}

.nav-btn { 
    background: none; 
    border: none; 
    color: white; 
    font-size: 1rem; 
    cursor: pointer; 
    font-weight: 500; 
    opacity: 0.8; 
    transition: opacity 0.3s, transform 0.2s; 
}
.nav-btn:hover { opacity: 1; transform: translateY(-2px); }

/* --- Auth Controls & Profile --- */
.auth-controls { 
    display: flex; 
    gap: 12px; 
    align-items: center; 
    flex-shrink: 0; /* Prevents profile from disappearing on mobile */
}

.user-profile { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    background: rgba(255,255,255,0.1); 
    padding: 5px 12px 5px 5px; 
    border-radius: 50px; 
    border: 1px solid rgba(255,255,255,0.2);
}

.avatar { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 2px solid white; 
}

#userNameDisplay { 
    color: white; 
    font-weight: 500; 
    font-size: 0.9rem; 
}

.auth-btn { 
    background-color: white; 
    color: var(--primary-color); 
    padding: 0.5rem 1.2rem; 
    border: none; 
    border-radius: 50px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.3s; 
}

/* --- Core Layout & Cards --- */
main { 
    max-width: 950px; 
    margin: 2.5rem auto; 
    padding: 0 1rem; 
}

.card { 
    background: var(--bg-overlay); 
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5); 
    padding: 2.5rem; 
    border-radius: 24px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
    margin-bottom: 2rem;
}

/* --- Hero Section --- */
.hero-card { text-align: center; padding: 4rem 2rem; }
.hero-card h1 { 
    font-size: 3.2rem;
    background: linear-gradient(to right, #1b5e20, #4caf50);
    background-clip: text;
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.hero-card p { font-size: 1.1rem; margin-bottom: 2.5rem; color: var(--text-light); line-height: 1.6; }

/* --- Buttons --- */
.btn { 
    padding: 0.8rem 1.8rem; 
    border-radius: 50px; 
    cursor: pointer; 
    font-size: 1rem; 
    font-weight: 600; 
    border: none; 
    transition: all 0.3s ease; 
}

.primary-btn { 
    background-color: var(--accent-color); 
    color: white; 
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3); 
}
.primary-btn:hover { 
    background-color: var(--primary-color); 
    transform: translateY(-3px); 
}

.secondary-btn { 
    background-color: transparent; 
    color: var(--primary-color); 
    border: 2px solid var(--primary-color); 
}
.secondary-btn:hover { 
    background-color: var(--primary-color); 
    color: white; 
}

/* --- Floating Route Panel --- */
.floating-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    z-index: 10000;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.floating-panel.hidden { transform: translateY(150%); }

/* --- Forms & Inputs --- */
.form-group { margin-bottom: 1.2rem; }
label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.95rem; }
input, select { 
    width: 100%; 
    padding: 0.9rem 1.2rem; 
    border: 1px solid #cbd5e1; 
    border-radius: 12px; 
    font-size: 16px; /* Prevents auto-zoom on iOS */
    background: white;
}

/* --- Map Containers --- */
.map-container { 
    border-radius: 12px; 
    border: 2px solid white; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    overflow: hidden; 
    background: #e2e8f0;
}

/* --- Home Page Impact Elements --- */
.simple-steps {
    display: flex;
    justify-content: space-around;
    gap: 1.5rem;
    margin: 2rem 0;
}

.step-circle {
    width: 45px; height: 45px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    font-weight: 700;
}

.m-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

/* --- Mobile Responsiveness (The Polish) --- */
@media (max-width: 768px) {
    header { padding: 0.8rem 1rem; }
    
    .nav-links { display: none; } /* Hide text links on mobile */.nav-links { 
        display: flex; 
        gap: 0.8rem; 
        margin: 0 10px;
    }

    .nav-btn {
        font-size: 0.85rem; /* Smaller text for mobile */
        opacity: 0.9;
    }
    
    .logo { font-size: 1.3rem; }
    
    #userNameDisplay { display: none; } /* Hide "Hi, Name" text */
    
    .hero-card h1 { font-size: 2.2rem !important; }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    header {
        overflow-x: auto; /* Allows scrolling the header if it's too tight */
        white-space: nowrap;
    }

    .card { padding: 1.5rem; border-radius: 20px; }

    .floating-panel {
        width: 94%;
        left: 3%;
        right: 3%;
        bottom: 10px;
    }

    .m-stat strong { font-size: 1.2rem; }

    input, select, .btn { font-size: 16px !important; }
}

/* --- Utilities --- */
.hidden { display: none !important; }
.mt-2 { margin-top: 2rem; }

@keyframes fadeInUp { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}
.view-section:not(.hidden) { animation: fadeInUp 0.4s ease-out forwards; }



.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    color: white;
}

.logo img {
    height: 35px; /* Adjust this to match your font size */
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

@media (max-width: 768px) {
    .logo img {
        height: 28px; /* Slightly smaller for mobile */
    }
}

/* --- FINAL BUTTON COLOR FIXES --- */

/* 1. Delete/Cancel (Red) */
.delete-btn, .cancel-btn {
    background-color: #ef4444 !important;
    color: white !important;
    border: none !important;
    display: inline-block;
}
.delete-btn:hover, .cancel-btn:hover {
    background-color: #dc2626 !important;
}

/* 2. Claim & GPS Route (Blue) */
.claim-btn, .route-btn {
    background-color: #2563eb !important;
    color: white !important;
    border: none !important;
}
.claim-btn:hover, .route-btn:hover {
    background-color: #1d4ed8 !important;
}

/* 3. Refresh & Update Ranking Buttons (Slate/Grey-Blue) */
.refresh-btn {
    background-color: #64748b !important;
    color: white !important;
    border: none !important;
    margin-bottom: 1rem;
    width: 100%; /* Makes them consistent across cards */
}
.refresh-btn:hover {
    background-color: #475569 !important;
}

/* 4. Verification/Primary Pulse Buttons (Theme Green) */
.pulse-btn {
    background-color: var(--accent-color) !important;
    color: white !important;
}