:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --nav-height: 70px;
}

body.dark-mode {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --primary: #60a5fa;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; transition: background 0.3s, color 0.3s; }
body { background: var(--bg-body); color: var(--text-main); padding-top: var(--nav-height); overflow-x: hidden; }

/* VIEW SWITCHING */
.hidden-view { display: none !important; }
.active-view { display: block !important; }
#landing-page.active-view { display: flex !important; }

/* LANDING PAGE */
#landing-page { position: fixed; inset: 0; z-index: 5000; background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 50%, #86efac 100%); align-items: center; justify-content: center; overflow: hidden; }
.landing-content { z-index: 2; text-align: center; max-width: 1000px; padding: 2rem; width: 100%; }
.brand-hero h1 { font-size: 4rem; font-weight: 800; margin: 1rem 0; color: #1e293b; letter-spacing: -2px; }
.highlight { color: var(--primary); }
.tagline { font-size: 1.5rem; color: #475569; margin-bottom: 3rem; }
.usp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 3rem; }
.usp-card { background: white; padding: 2rem; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.landing-actions { display: flex; flex-direction: column; align-items: center; gap: 1rem; max-width: 400px; margin: 0 auto; }

/* Landing Animations */
.landing-bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.anim-item { position: absolute; font-size: 3rem; }
.sun { top: 5%; right: 5%; font-size: 6rem; opacity: 0.9; animation: spin 40s linear infinite; }
.cloud-1 { top: 15%; left: 10%; font-size: 5rem; opacity: 0.8; animation: float 20s infinite alternate; }
.cloud-2 { top: 25%; right: 20%; font-size: 4rem; opacity: 0.6; animation: float 15s infinite alternate-reverse; }
.tree-1 { bottom: 15%; left: 5%; font-size: 5rem; }
.tree-2 { bottom: 15%; right: 5%; font-size: 6rem; }
.farmer { bottom: 15%; left: 20%; animation: bounce 4s infinite ease-in-out; }
.cleaner { bottom: 15%; right: 20%; animation: bounce 5s infinite ease-in-out; }
.bird-1 { top: 20%; left: -10%; animation: fly 15s linear infinite; }
.car { bottom: 15%; left: -100px; font-size: 4rem; animation: drive 20s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes float { from { transform: translateX(0); } to { transform: translateX(50px); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fly { to { transform: translateX(110vw); } }
@keyframes drive { 0% { transform: translateX(-100px); } 100% { transform: translateX(120vw); } }

/* BUTTONS */
.btn-xl, .btn-primary { 
    padding: 14px 24px; font-size: 1rem; border-radius: 12px; 
    background: var(--primary); color: white; border: none; 
    cursor: pointer; font-weight: 700; width: 100%; text-align: center;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}
.btn-secondary { background: white; border: 1px solid #cbd5e1; padding: 12px; border-radius: 12px; cursor: pointer; width: 100%; font-weight: 600; color: var(--text-main); }
.admin-btn-landing { background: white; border: 2px solid #cbd5e1; color: #64748b; padding: 14px 24px; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }

/* APP LAYOUT */
.navbar { position: fixed; top: 0; width: 100%; height: var(--nav-height); background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; padding: 0 5%; z-index: 1000; }
.logo-container { display: flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 800; font-size: 1.2rem; cursor: pointer; }
.nav-links { display: flex; gap: 5px; }
.nav-item { background: none; border: none; padding: 8px 16px; color: var(--text-muted); font-weight: 600; cursor: pointer; border-radius: 8px; }
.nav-item.active { color: var(--primary); background: rgba(59, 130, 246, 0.1); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.main-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.page-section { display: none; animation: fadeUp 0.4s ease; }
.page-section.active { display: block; }

/* DASHBOARD */
.welcome-banner { background: linear-gradient(135deg, var(--primary), #60a5fa); border-radius: 24px; padding: 3rem; color: white; margin-bottom: 2rem; box-shadow: var(--shadow-md); }
.dashboard-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.dash-card { background: var(--bg-card); padding: 1.5rem; border-radius: 20px; display: flex; align-items: center; gap: 1rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.icon-bg { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; }
.icon-bg.blue { background: #3b82f6; } .icon-bg.green { background: #10b981; } .icon-bg.orange { background: #f59e0b; }

/* LIVE UPDATES LIST */
.updates-grid { display: flex; flex-direction: column; gap: 10px; }
.update-card { 
    display: flex; gap: 15px; align-items: center; 
    background: var(--bg-card); padding: 15px; border-radius: 12px; 
    border: 1px solid var(--border); transition: 0.2s;
}
.update-card:hover { transform: translateX(5px); border-color: var(--primary); }
.update-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; background: #e2e8f0; }

/* MAP */
.map-container { height: 500px; width: 100%; border-radius: 16px; box-shadow: var(--shadow-md); border: 1px solid var(--border); z-index: 1; }

/* SERVICES GRID */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.service-card { background: var(--bg-card); padding: 1.5rem; border-radius: 16px; border: 1px solid var(--border); text-align: center; cursor: pointer; transition: 0.2s; box-shadow: var(--shadow-sm); }
.service-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow-md); }
.s-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 0.8rem; }
.s-icon.danger { color: #ef4444; } .s-icon.success { color: #22c55e; }

/* GAMIFICATION & GAMES */
.gamification-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; margin-top: 1rem; }
.level-card { background: linear-gradient(135deg, #2563eb, #4f46e5); color: white; padding: 2rem; border-radius: 20px; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.game-panel { background: var(--bg-card); padding: 1.5rem; border-radius: 20px; border: 1px solid var(--border); }
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.game-card { 
    background: #f0f9ff; padding: 1.5rem; border-radius: 16px; text-align: center; 
    cursor: pointer; border: 2px solid transparent; transition: 0.2s;
}
.game-card:hover { border-color: #22c55e; background: #dcfce7; transform: scale(1.02); }
.game-emoji { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.leaderboard-panel { background: var(--bg-card); border-radius: 20px; padding: 1.5rem; border: 1px solid var(--border); margin-top: 2rem; grid-column: span 2; }

/* FORM MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 9999; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--bg-card); padding: 2rem; width: 90%; max-width: 500px; border-radius: 24px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.form-row { display: flex; gap: 1rem; }
.form-group { margin-bottom: 1rem; width: 100%; }
.form-group.half { width: 50%; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: var(--bg-body); color: var(--text-main); }
.location-tag { background: #dbeafe; color: var(--primary); padding: 4px 8px; border-radius: 6px; font-size: 0.85rem; font-weight: 700; }

/* ADMIN TABLE */
.table-container { overflow-x: auto; background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.admin-table th, .admin-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.vote-badge { display: inline-flex; gap: 8px; background: #f1f5f9; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }

/* UTILS */
.full-width { width: 100%; }
#toast { visibility: hidden; background: #333; color: white; text-align: center; border-radius: 50px; padding: 12px 24px; position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 3000; }
#toast.show { visibility: visible; }

@media (max-width: 768px) {
    .gamification-layout { grid-template-columns: 1fr; }
    .leaderboard-panel { grid-column: span 1; }
    .usp-grid { grid-template-columns: 1fr; }
}
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --border: #e2e8f0;
}

body.dark-mode {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --border: #334155;
    --primary: #60a5fa;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; transition: background 0.3s, color 0.3s; }
body { background: var(--bg-body); color: var(--text-main); padding-top: 70px; overflow-x: hidden; }

.hidden-view { display: none !important; }
.active-view { display: block !important; }
#landing-page.active-view { display: flex !important; }

/* LANDING */
#landing-page { position: fixed; inset: 0; z-index: 5000; background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 50%, #86efac 100%); align-items: center; justify-content: center; }
.landing-content { z-index: 2; text-align: center; max-width: 1000px; padding: 2rem; width: 100%; }
.landing-bg { position: absolute; inset: 0; pointer-events: none; }
.anim-item { position: absolute; font-size: 3rem; }
/* ... (Animations kept same as before) ... */
.sun { top: 5%; right: 5%; font-size: 6rem; opacity: 0.9; animation: spin 40s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* BUTTONS */
.btn-xl, .btn-primary { 
    padding: 14px 24px; font-size: 1rem; border-radius: 12px; background: var(--primary); color: white; border: none; cursor: pointer; font-weight: 700; width: 100%; text-align: center; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}
.btn-secondary { background: white; border: 1px solid #cbd5e1; padding: 12px; border-radius: 12px; cursor: pointer; width: 100%; font-weight: 600; color: var(--text-main); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; background: var(--primary); color: white; border: none; cursor: pointer; }
.mt-2 { margin-top: 0.8rem; }

/* LAYOUT */
.navbar { position: fixed; top: 0; width: 100%; height: 70px; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; padding: 0 5%; z-index: 1000; }
.nav-links { display: flex; gap: 5px; }
.nav-item { background: none; border: none; padding: 8px 16px; font-weight: 600; cursor: pointer; border-radius: 8px; color: var(--secondary); }
.nav-item.active { color: var(--primary); background: rgba(59, 130, 246, 0.1); }
.main-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.page-section { display: none; }
.page-section.active { display: block; }

/* DASHBOARD & SERVICES */
.dashboard-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.dash-card { background: var(--bg-card); padding: 1.5rem; border-radius: 20px; display: flex; align-items: center; gap: 1rem; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.icon-bg { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; }
.icon-bg.blue { background: #3b82f6; } .icon-bg.green { background: #10b981; } .icon-bg.orange { background: #f59e0b; }

.updates-grid { display: flex; flex-direction: column; gap: 10px; }
.update-card { display: flex; gap: 15px; align-items: center; background: var(--bg-card); padding: 15px; border-radius: 12px; border: 1px solid var(--border); }
.update-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; background: #e2e8f0; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.service-card { background: var(--bg-card); padding: 1.5rem; border-radius: 16px; border: 1px solid var(--border); text-align: center; cursor: pointer; transition: 0.2s; }
.service-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.s-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 0.8rem; }

/* MAP */
.map-container { height: 500px; width: 100%; border-radius: 16px; border: 1px solid var(--border); z-index: 1; }

/* GAMES & REWARDS */
.gamification-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; margin-top: 1rem; }
.level-card { background: linear-gradient(135deg, #2563eb, #4f46e5); color: white; padding: 2rem; border-radius: 20px; position: relative; }
.game-panel { background: var(--bg-card); padding: 1.5rem; border-radius: 20px; border: 1px solid var(--border); grid-column: span 2; }
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.game-card { background: #f0f9ff; padding: 1.5rem; border-radius: 16px; text-align: center; border: 1px solid transparent; }
.game-card:hover { border-color: #22c55e; background: #dcfce7; }
.game-emoji { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
/* Proof Tracker Dots */
.proof-tracker { display: flex; justify-content: center; gap: 5px; margin: 10px 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; }
.dot.filled { background: #22c55e; }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 9999; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--bg-card); padding: 2rem; width: 90%; max-width: 500px; border-radius: 24px; animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.form-row { display: flex; gap: 1rem; }
.form-group { margin-bottom: 1rem; width: 100%; }
.form-group.half { width: 50%; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: var(--bg-body); color: var(--text-main); }
.location-tag { background: #dbeafe; color: var(--primary); padding: 4px 8px; border-radius: 6px; font-size: 0.85rem; font-weight: 700; }

/* ADMIN */
.table-container { overflow-x: auto; background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.admin-table th, .admin-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.vote-badge { display: inline-flex; gap: 8px; background: #f1f5f9; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }

#toast { visibility: hidden; background: #333; color: white; text-align: center; border-radius: 50px; padding: 12px 24px; position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 3000; }
#toast.show { visibility: visible; }

@media (max-width: 768px) {
    .gamification-layout { grid-template-columns: 1fr; }
    .game-panel { grid-column: span 1; }
    .game-grid { grid-template-columns: 1fr; }
}
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --border: #e2e8f0;
    --success-color: #10b981;
}

body.dark-mode {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --border: #334155;
    --primary: #60a5fa;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; transition: background 0.3s, color 0.3s; }
body { background: var(--bg-body); color: var(--text-main); padding-top: 70px; overflow-x: hidden; }

.hidden-view { display: none !important; }
.active-view { display: block !important; }
#landing-page.active-view { display: flex !important; }

/* LANDING */
#landing-page { position: fixed; inset: 0; z-index: 5000; background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 50%, #86efac 100%); align-items: center; justify-content: center; }
.landing-content { z-index: 2; text-align: center; max-width: 1000px; padding: 2rem; width: 100%; }
.landing-bg { position: absolute; inset: 0; pointer-events: none; }
.anim-item { position: absolute; font-size: 3rem; }
.sun { top: 5%; right: 5%; font-size: 6rem; opacity: 0.9; animation: spin 40s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* BUTTONS */
.btn-xl, .btn-primary { 
    padding: 14px 24px; font-size: 1rem; border-radius: 12px; background: var(--primary); color: white; border: none; cursor: pointer; font-weight: 700; width: 100%; text-align: center; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}
.btn-secondary { background: white; border: 1px solid #cbd5e1; padding: 12px; border-radius: 12px; cursor: pointer; width: 100%; font-weight: 600; color: var(--text-main); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; background: var(--primary); color: white; border: none; cursor: pointer; }
.mt-2 { margin-top: 0.8rem; }
.admin-btn-landing { background: white; border: 2px solid #cbd5e1; color: #64748b; padding: 14px 24px; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }

/* ADDED: Success Button Style */
.btn-success {
    padding: 14px 24px; font-size: 1rem; border-radius: 12px; background: var(--success-color); color: white; border: none; cursor: pointer; font-weight: 700; width: 100%; text-align: center; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}
.btn-success:hover { background-color: #059669; }


/* LAYOUT */
.navbar { position: fixed; top: 0; width: 100%; height: 70px; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; padding: 0 5%; z-index: 1000; }
.nav-links { display: flex; gap: 5px; }
.nav-item { background: none; border: none; padding: 8px 16px; font-weight: 600; cursor: pointer; border-radius: 8px; color: var(--secondary); }
.nav-item.active { color: var(--primary); background: rgba(59, 130, 246, 0.1); }
.main-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.page-section { display: none; }
.page-section.active { display: block; }

/* DASHBOARD & SERVICES */
.dashboard-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.dash-card { background: var(--bg-card); padding: 1.5rem; border-radius: 20px; display: flex; align-items: center; gap: 1rem; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.icon-bg { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; }
.icon-bg.blue { background: #3b82f6; } .icon-bg.green { background: #10b981; } .icon-bg.orange { background: #f59e0b; }

.updates-grid { display: flex; flex-direction: column; gap: 10px; }
.update-card { display: flex; gap: 15px; align-items: center; background: var(--bg-card); padding: 15px; border-radius: 12px; border: 1px solid var(--border); }
.update-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; background: #e2e8f0; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.service-card { background: var(--bg-card); padding: 1.5rem; border-radius: 16px; border: 1px solid var(--border); text-align: center; cursor: pointer; transition: 0.2s; }
.service-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.s-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 0.8rem; }

/* MAP */
.map-container { height: 500px; width: 100%; border-radius: 16px; border: 1px solid var(--border); z-index: 1; }

/* GAMES & REWARDS */
.gamification-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; margin-top: 1rem; }
.level-card { background: linear-gradient(135deg, #2563eb, #4f46e5); color: white; padding: 2rem; border-radius: 20px; position: relative; }
.game-panel { background: var(--bg-card); padding: 1.5rem; border-radius: 20px; border: 1px solid var(--border); grid-column: span 2; }
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.game-card { background: #f0f9ff; padding: 1.5rem; border-radius: 16px; text-align: center; border: 1px solid transparent; }
.game-card:hover { border-color: #22c55e; background: #dcfce7; }
.game-emoji { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.proof-tracker { display: flex; justify-content: center; gap: 5px; margin: 10px 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; }
.dot.filled { background: #22c55e; }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 9999; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--bg-card); padding: 2rem; width: 90%; max-width: 500px; border-radius: 24px; animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.form-row { display: flex; gap: 1rem; }
.form-group { margin-bottom: 1rem; width: 100%; }
.form-group.half { width: 50%; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: var(--bg-body); color: var(--text-main); }
.location-tag { background: #dbeafe; color: var(--primary); padding: 4px 8px; border-radius: 6px; font-size: 0.85rem; font-weight: 700; }

/* ADMIN */
.table-container { overflow-x: auto; background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.admin-table th, .admin-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.vote-badge { display: inline-flex; gap: 8px; background: #f1f5f9; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }

#toast { visibility: hidden; background: #333; color: white; text-align: center; border-radius: 50px; padding: 12px 24px; position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 3000; }
#toast.show { visibility: visible; }

@media (max-width: 768px) {
    .gamification-layout { grid-template-columns: 1fr; }
    .game-panel { grid-column: span 1; }
    .game-grid { grid-template-columns: 1fr; }
}

/* --- ADDED: REVERSED ANIMATIONS (Overrides previous ones) --- */
@keyframes fly { 
    from { transform: translateX(110vw); } 
    to { transform: translateX(-10vw); } 
}
@keyframes drive { 
    0% { transform: translateX(110vw) scaleX(-1); } /* scaleX(-1) flips the car image */
    100% { transform: translateX(-110vw) scaleX(-1); } 
}
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --border: #e2e8f0;
    --success-color: #10b981;
}

body.dark-mode {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --border: #334155;
    --primary: #60a5fa;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; transition: background 0.3s, color 0.3s; }
body { background: var(--bg-body); color: var(--text-main); padding-top: 70px; overflow-x: hidden; }

.hidden-view { display: none !important; }
.active-view { display: block !important; }
#landing-page.active-view { display: flex !important; }

/* LANDING */
#landing-page { position: fixed; inset: 0; z-index: 5000; background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 50%, #86efac 100%); align-items: center; justify-content: center; }
.landing-content { z-index: 2; text-align: center; max-width: 1000px; padding: 2rem; width: 100%; }
.landing-bg { position: absolute; inset: 0; pointer-events: none; }
.anim-item { position: absolute; font-size: 3rem; }
.sun { top: 5%; right: 5%; font-size: 6rem; opacity: 0.9; animation: spin 40s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* BUTTONS */
.btn-xl, .btn-primary { 
    padding: 14px 24px; font-size: 1rem; border-radius: 12px; background: var(--primary); color: white; border: none; cursor: pointer; font-weight: 700; width: 100%; text-align: center; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}
.btn-secondary { background: white; border: 1px solid #cbd5e1; padding: 12px; border-radius: 12px; cursor: pointer; width: 100%; font-weight: 600; color: var(--text-main); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; background: var(--primary); color: white; border: none; cursor: pointer; }
.mt-2 { margin-top: 0.8rem; }
.admin-btn-landing { background: white; border: 2px solid #cbd5e1; color: #64748b; padding: 14px 24px; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-success {
    padding: 14px 24px; font-size: 1rem; border-radius: 12px; background: var(--success-color); color: white; border: none; cursor: pointer; font-weight: 700; width: 100%; text-align: center; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}
.btn-success:hover { background-color: #059669; }

/* DANGER BUTTON (DELETE) */
.btn-icon-danger {
    background: #fee2e2; color: #991b1b; border: none; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.btn-icon-danger:hover { background: #fecaca; color: #7f1d1d; }

/* LAYOUT */
.navbar { position: fixed; top: 0; width: 100%; height: 70px; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; padding: 0 5%; z-index: 1000; }
.nav-links { display: flex; gap: 5px; }
.nav-item { background: none; border: none; padding: 8px 16px; font-weight: 600; cursor: pointer; border-radius: 8px; color: var(--secondary); }
.nav-item.active { color: var(--primary); background: rgba(59, 130, 246, 0.1); }
.main-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.page-section { display: none; }
.page-section.active { display: block; }

/* DASHBOARD & SERVICES */
.dashboard-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.dash-card { background: var(--bg-card); padding: 1.5rem; border-radius: 20px; display: flex; align-items: center; gap: 1rem; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.icon-bg { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; }
.icon-bg.blue { background: #3b82f6; } .icon-bg.green { background: #10b981; } .icon-bg.orange { background: #f59e0b; }

.updates-grid { display: flex; flex-direction: column; gap: 10px; }
.update-card { display: flex; gap: 15px; align-items: center; background: var(--bg-card); padding: 15px; border-radius: 12px; border: 1px solid var(--border); }
.update-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; background: #e2e8f0; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.service-card { background: var(--bg-card); padding: 1.5rem; border-radius: 16px; border: 1px solid var(--border); text-align: center; cursor: pointer; transition: 0.2s; }
.service-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.s-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 0.8rem; }

/* MAP */
.map-container { height: 500px; width: 100%; border-radius: 16px; border: 1px solid var(--border); z-index: 1; }

/* GAMES & REWARDS */
.gamification-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; margin-top: 1rem; }
.level-card { background: linear-gradient(135deg, #2563eb, #4f46e5); color: white; padding: 2rem; border-radius: 20px; position: relative; }
.game-panel { background: var(--bg-card); padding: 1.5rem; border-radius: 20px; border: 1px solid var(--border); grid-column: span 2; }
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.game-card { background: #f0f9ff; padding: 1.5rem; border-radius: 16px; text-align: center; border: 1px solid transparent; }
.game-card:hover { border-color: #22c55e; background: #dcfce7; }
.game-emoji { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.proof-tracker { display: flex; justify-content: center; gap: 5px; margin: 10px 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; }
.dot.filled { background: #22c55e; }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 9999; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--bg-card); padding: 2rem; width: 90%; max-width: 500px; border-radius: 24px; animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.form-row { display: flex; gap: 1rem; }
.form-group { margin-bottom: 1rem; width: 100%; }
.form-group.half { width: 50%; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: var(--bg-body); color: var(--text-main); }
.location-tag { background: #dbeafe; color: var(--primary); padding: 4px 8px; border-radius: 6px; font-size: 0.85rem; font-weight: 700; }

/* ADMIN */
.table-container { overflow-x: auto; background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.admin-table th, .admin-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.vote-badge { display: inline-flex; gap: 8px; background: #f1f5f9; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }

#toast { visibility: hidden; background: #333; color: white; text-align: center; border-radius: 50px; padding: 12px 24px; position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 3000; }
#toast.show { visibility: visible; }

@media (max-width: 768px) {
    .gamification-layout { grid-template-columns: 1fr; }
    .game-panel { grid-column: span 1; }
    .game-grid { grid-template-columns: 1fr; }
}

@keyframes fly { 
    from { transform: translateX(110vw); } 
    to { transform: translateX(-10vw); } 
}
@keyframes drive { 
    0% { transform: translateX(110vw) scaleX(-1); }
    100% { transform: translateX(-110vw) scaleX(-1); } 
}
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --border: #e2e8f0;
    --success-color: #10b981;
}

body.dark-mode {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --border: #334155;
    --primary: #60a5fa;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; transition: background 0.3s, color 0.3s; }
body { background: var(--bg-body); color: var(--text-main); padding-top: 70px; overflow-x: hidden; }

/* DANGER BUTTON (FOR DELETE) */
.btn-icon-danger {
    background: #fee2e2; color: #991b1b; border: none; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.btn-icon-danger:hover { background: #fecaca; color: #7f1d1d; }

/* ... (Rest of styles remain same as previous response) ... */
.hidden-view { display: none !important; }
.active-view { display: block !important; }
#landing-page.active-view { display: flex !important; }
#landing-page { position: fixed; inset: 0; z-index: 5000; background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 50%, #86efac 100%); align-items: center; justify-content: center; }
.landing-content { z-index: 2; text-align: center; max-width: 1000px; padding: 2rem; width: 100%; }
.landing-bg { position: absolute; inset: 0; pointer-events: none; }
.anim-item { position: absolute; font-size: 3rem; }
.btn-xl, .btn-primary { padding: 14px 24px; font-size: 1rem; border-radius: 12px; background: var(--primary); color: white; border: none; cursor: pointer; font-weight: 700; width: 100%; text-align: center; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3); }
.btn-secondary { background: white; border: 1px solid #cbd5e1; padding: 12px; border-radius: 12px; cursor: pointer; width: 100%; font-weight: 600; color: var(--text-main); }
.admin-btn-landing { background: white; border: 2px solid #cbd5e1; color: #64748b; padding: 14px 24px; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }
.navbar { position: fixed; top: 0; width: 100%; height: 70px; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; padding: 0 5%; z-index: 1000; }
.nav-links { display: flex; gap: 5px; }
.nav-item { background: none; border: none; padding: 8px 16px; font-weight: 600; cursor: pointer; border-radius: 8px; color: var(--secondary); }
.nav-item.active { color: var(--primary); background: rgba(59, 130, 246, 0.1); }
.main-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.page-section { display: none; }
.page-section.active { display: block; }
.dashboard-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.dash-card { background: var(--bg-card); padding: 1.5rem; border-radius: 20px; display: flex; align-items: center; gap: 1rem; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.icon-bg { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; }
.icon-bg.blue { background: #3b82f6; } .icon-bg.green { background: #10b981; } .icon-bg.orange { background: #f59e0b; }
.updates-grid { display: flex; flex-direction: column; gap: 10px; }
.update-card { display: flex; gap: 15px; align-items: center; background: var(--bg-card); padding: 15px; border-radius: 12px; border: 1px solid var(--border); }
.update-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; background: #e2e8f0; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.service-card { background: var(--bg-card); padding: 1.5rem; border-radius: 16px; border: 1px solid var(--border); text-align: center; cursor: pointer; transition: 0.2s; }
.service-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.s-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 0.8rem; }
.map-container { height: 500px; width: 100%; border-radius: 16px; border: 1px solid var(--border); z-index: 1; }
.gamification-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; margin-top: 1rem; }
.level-card { background: linear-gradient(135deg, #2563eb, #4f46e5); color: white; padding: 2rem; border-radius: 20px; position: relative; }
.game-panel { background: var(--bg-card); padding: 1.5rem; border-radius: 20px; border: 1px solid var(--border); grid-column: span 2; }
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.game-card { background: #f0f9ff; padding: 1.5rem; border-radius: 16px; text-align: center; border: 1px solid transparent; }
.game-card:hover { border-color: #22c55e; background: #dcfce7; }
.proof-tracker { display: flex; justify-content: center; gap: 5px; margin: 10px 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; }
.dot.filled { background: #22c55e; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 9999; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--bg-card); padding: 2rem; width: 90%; max-width: 500px; border-radius: 24px; animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.form-row { display: flex; gap: 1rem; }
.form-group { margin-bottom: 1rem; width: 100%; }
.form-group.half { width: 50%; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: var(--bg-body); color: var(--text-main); }
.table-container { overflow-x: auto; background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.admin-table th, .admin-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.vote-badge { display: inline-flex; gap: 8px; background: #f1f5f9; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
#toast { visibility: hidden; background: #333; color: white; text-align: center; border-radius: 50px; padding: 12px 24px; position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 3000; }
#toast.show { visibility: visible; }
@media (max-width: 768px) { .gamification-layout { grid-template-columns: 1fr; } .game-panel { grid-column: span 1; } .game-grid { grid-template-columns: 1fr; } }
.sun { top: 5%; right: 5%; font-size: 6rem; opacity: 0.9; animation: spin 40s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.farmer { bottom: 15%; left: 20%; animation: bounce 4s infinite ease-in-out; }
.cleaner { bottom: 15%; right: 20%; animation: bounce 5s infinite ease-in-out; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.bird-1 { top: 20%; left: -10%; animation: fly 15s linear infinite; }
.car { bottom: 15%; left: -100px; font-size: 4rem; animation: drive 20s linear infinite; }
@keyframes fly { from { transform: translateX(110vw); } to { transform: translateX(-10vw); } }
@keyframes drive { 0% { transform: translateX(110vw) scaleX(-1); } 100% { transform: translateX(-110vw) scaleX(-1); } }

/* === AUTHENTICATION MODAL STYLES === */
.auth-modal-box {
    max-width: 450px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    background: var(--bg-body);
    border-radius: 12px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.2s;
    color: var(--text-muted);
}

.auth-tab.active {
    background: var(--primary);
    color: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    padding: 8px 16px;
}

.btn-text:hover {
    color: var(--primary);
}

.status-select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-body);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
}
