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
|
4 |
+
<head>
|
5 |
+
<meta charset="UTF-8">
|
6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
+
<title>Elon Musk Charity Worldwide - AI-Powered Donation Assistant</title>
|
8 |
+
<link rel="stylesheet" href="style.css">
|
9 |
+
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&family=Open+Sans:wght@300;400;600&display=swap" rel="stylesheet">
|
10 |
+
</head>
|
11 |
+
<body>
|
12 |
+
<header>
|
13 |
+
<nav>
|
14 |
+
<div class="nav-container">
|
15 |
+
<div class="logo">
|
16 |
+
<h1>Elon Musk Charity Worldwide</h1>
|
17 |
+
<span class="tagline">AI-Driven Humanitarian Aid</span>
|
18 |
+
</div>
|
19 |
+
<ul class="nav-links">
|
20 |
+
<li><a href="#mission">Mission</a></li>
|
21 |
+
<li><a href="#impact">Impact</a></li>
|
22 |
+
<li><a href="#donate">Donate</a></li>
|
23 |
+
<li><a href="#contact">Contact</a></li>
|
24 |
+
</ul>
|
25 |
+
<button class="mobile-menu-toggle" aria-label="Toggle menu">
|
26 |
+
<span></span>
|
27 |
+
<span></span>
|
28 |
+
<span></span>
|
29 |
+
</button>
|
30 |
+
</div>
|
31 |
+
</nav>
|
32 |
+
</header>
|
33 |
+
|
34 |
+
<main>
|
35 |
+
<section class="hero">
|
36 |
+
<div class="hero-content">
|
37 |
+
<h1>AI-Powered Charity for Yemen & Gaza</h1>
|
38 |
+
<p>Experience the future of giving with intelligent donation optimization</p>
|
39 |
+
<button class="cta-button" id="ai-donate-btn">Let AI Optimize My Donation</button>
|
40 |
+
</div>
|
41 |
+
<div class="hero-stats">
|
42 |
+
<div class="stat">
|
43 |
+
<span class="stat-number" id="total-donations">$0</span>
|
44 |
+
<span class="stat-label">Raised</span>
|
45 |
+
</div>
|
46 |
+
<div class="stat">
|
47 |
+
<span class="stat-number" id="lives-impacted">0</span>
|
48 |
+
<span class="stat-label">Lives Impacted</span>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
</section>
|
52 |
+
|
53 |
+
<section class="ai-assistant">
|
54 |
+
<div class="container">
|
55 |
+
<h2>AI Donation Assistant</h2>
|
56 |
+
<div class="chat-container">
|
57 |
+
<div id="chat-messages"></div>
|
58 |
+
<div class="chat-input-container">
|
59 |
+
<input type="text" id="chat-input" placeholder="Ask our AI how to maximize your impact...">
|
60 |
+
<button id="send-button">Send</button>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
</section>
|
65 |
+
|
66 |
+
<section class="mission">
|
67 |
+
<div class="container">
|
68 |
+
<h2>Our Mission</h2>
|
69 |
+
<div class="mission-grid">
|
70 |
+
<div class="mission-card">
|
71 |
+
<h3>Yemen Relief</h3>
|
72 |
+
<p>AI-optimized food and medical aid distribution</p>
|
73 |
+
<div class="progress-bar">
|
74 |
+
<div class="progress" style="width: 78%"></div>
|
75 |
+
</div>
|
76 |
+
<span>78% of goal reached</span>
|
77 |
+
</div>
|
78 |
+
<div class="mission-card">
|
79 |
+
<h3>Gaza Support</h3>
|
80 |
+
<p>Smart resource allocation for maximum impact</p>
|
81 |
+
<div class="progress-bar">
|
82 |
+
<div class="progress" style="width: 65%"></div>
|
83 |
+
</div>
|
84 |
+
<span>65% of goal reached</span>
|
85 |
+
</div>
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
</section>
|
89 |
+
|
90 |
+
<section class="donation-form">
|
91 |
+
<div class="container">
|
92 |
+
<h2>Make a Donation</h2>
|
93 |
+
<form id="donation-form">
|
94 |
+
<div class="form-group">
|
95 |
+
<label for="donation-amount">Donation Amount</label>
|
96 |
+
<input type="number" id="donation-amount" min="1" step="0.01" placeholder="Enter amount" required>
|
97 |
+
</div>
|
98 |
+
<div class="form-group">
|
99 |
+
<label for="donation-currency">Currency</label>
|
100 |
+
<select id="donation-currency">
|
101 |
+
<option value="USD">USD</option>
|
102 |
+
<option value="EUR">EUR</option>
|
103 |
+
<option value="GBP">GBP</option>
|
104 |
+
</select>
|
105 |
+
</div>
|
106 |
+
<div class="form-group">
|
107 |
+
<label for="donation-cause">Designate Cause</label>
|
108 |
+
<select id="donation-cause">
|
109 |
+
<option value="auto">Let AI Decide</option>
|
110 |
+
<option value="yemen">Yemen Relief</option>
|
111 |
+
<option value="gaza">Gaza Support</option>
|
112 |
+
</select>
|
113 |
+
</div>
|
114 |
+
<button type="submit" class="submit-btn">Donate Now</button>
|
115 |
+
</form>
|
116 |
+
<div id="processing" class="hidden">
|
117 |
+
<div class="spinner"></div>
|
118 |
+
<p>Processing your donation with AI optimization...</p>
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
</section>
|
122 |
+
</main>
|
123 |
+
|
124 |
+
<footer>
|
125 |
+
<div class="container">
|
126 |
+
<p>© 2024 Elon Musk Charity Worldwide. Powered by AI for maximum impact.</p>
|
127 |
+
<div class="social-links">
|
128 |
+
<a href="#" aria-label="Twitter">Twitter</a>
|
129 |
+
<a href="#" aria-label="LinkedIn">LinkedIn</a>
|
130 |
+
<a href="#" aria-label="Instagram">Instagram</a>
|
131 |
+
</div>
|
132 |
+
</div>
|
133 |
+
</footer>
|
134 |
+
|
135 |
+
<script type="module" src="index.js"></script>
|
136 |
+
</body>
|
137 |
+
</html>
|
138 |
+
|
139 |
+
=== index.js ===
|
140 |
+
// index.js
|
141 |
+
import { pipeline, env } from 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]';
|
142 |
+
|
143 |
+
env.allowLocalModels = false;
|
144 |
+
|
145 |
+
class AIDonationAssistant {
|
146 |
+
constructor() {
|
147 |
+
this.chatbot = null;
|
148 |
+
this.sentimentAnalyzer = null;
|
149 |
+
this.isInitialized = false;
|
150 |
+
this.chatHistory = [];
|
151 |
+
|
152 |
+
this.init();
|
153 |
+
}
|
154 |
+
|
155 |
+
async init() {
|
156 |
+
try {
|
157 |
+
// Initialize sentiment analyzer for donation optimization
|
158 |
+
this.sentimentAnalyzer = await pipeline(
|
159 |
+
'sentiment-analysis',
|
160 |
+
'Xenova/distilbert-base-uncased-finetuned-sst-2-english'
|
161 |
+
);
|
162 |
+
|
163 |
+
// Initialize conversational AI
|
164 |
+
this.chatbot = await pipeline(
|
165 |
+
'text-generation',
|
166 |
+
'Xenova/Llama-2-7b-chat-hf',
|
167 |
+
{ max_new_tokens: 150 }
|
168 |
+
);
|
169 |
+
|
170 |
+
this.isInitialized = true;
|
171 |
+
this.setupEventListeners();
|
172 |
+
this.animateCounters();
|
173 |
+
console.log('AI Assistant initialized successfully');
|
174 |
+
} catch (error) {
|
175 |
+
console.error('Error initializing AI:', error);
|
176 |
+
this.showFallback();
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
setupEventListeners() {
|
181 |
+
const chatInput = document.getElementById('chat-input');
|
182 |
+
const sendButton = document.getElementById('send-button');
|
183 |
+
const donationForm = document.getElementById('donation-form');
|
184 |
+
const aiDonateBtn = document.getElementById('ai-donate-btn');
|
185 |
+
|
186 |
+
chatInput.addEventListener('keypress', (e) => {
|
187 |
+
if (e.key === 'Enter') this.handleChatMessage();
|
188 |
+
});
|
189 |
+
|
190 |
+
sendButton.addEventListener('click', () => this.handleChatMessage());
|
191 |
+
donationForm.addEventListener('submit', (e) => this.handleDonation(e));
|
192 |
+
aiDonateBtn.addEventListener('click', () => this.optimizeDonation());
|
193 |
+
}
|
194 |
+
|
195 |
+
async handleChatMessage() {
|
196 |
+
if (!this.isInitialized) {
|
197 |
+
this.addChatMessage('System initializing... Please try again in a moment.', 'ai');
|
198 |
+
return;
|
199 |
+
}
|
200 |
+
|
201 |
+
const input = document.getElementById('chat-input');
|
202 |
+
const message = input.value.trim();
|
203 |
+
|
204 |
+
if (!message) return;
|
205 |
+
|
206 |
+
this.addChatMessage(message, 'user');
|
207 |
+
input.value = '';
|
208 |
+
|
209 |
+
try {
|
210 |
+
const response = await this.generateResponse(message);
|
211 |
+
this.addChatMessage(response, 'ai');
|
212 |
+
} catch (error) {
|
213 |
+
console.error('Chat error:', error);
|
214 |
+
this.addChatMessage('I apologize, but I\'m experiencing technical difficulties. Please try again.', 'ai');
|
215 |
+
}
|
216 |
+
}
|
217 |
+
|
218 |
+
async generateResponse(message) {
|
219 |
+
// Analyze sentiment for personalized responses
|
220 |
+
const sentiment = await this.sentimentAnalyzer(message);
|
221 |
+
const isPositive = sentiment[0].label === 'POSITIVE';
|
222 |
+
|
223 |
+
// Generate contextual response
|
224 |
+
const context = `You are Elon Musk's AI charity assistant. The user asked: ${message}.
|
225 |
+
Provide helpful, empathetic advice about maximizing humanitarian impact in Yemen and Gaza.`;
|
226 |
+
|
227 |
+
const response = await this.chatbot(context);
|
228 |
+
return response[0]?.generated_text?.split('\n').pop() ||
|
229 |
+
'Thank you for your interest in helping. Every donation makes a difference.';
|
230 |
+
}
|
231 |
+
|
232 |
+
addChatMessage(message, sender) {
|
233 |
+
const chatContainer = document.getElementById('chat-messages');
|
234 |
+
const messageDiv = document.createElement('div');
|
235 |
+
messageDiv.className = `chat-message ${sender}`;
|
236 |
+
messageDiv.textContent = message;
|
237 |
+
chatContainer.appendChild(messageDiv);
|
238 |
+
chatContainer.scrollTop = chatContainer.scrollHeight;
|
239 |
+
}
|
240 |
+
|
241 |
+
async handleDonation(e) {
|
242 |
+
e.preventDefault();
|
243 |
+
|
244 |
+
const amount = document.getElementById('donation-amount').value;
|
245 |
+
const currency = document.getElementById('donation-currency').value;
|
246 |
+
const cause = document.getElementById('donation-cause').value;
|
247 |
+
|
248 |
+
document.getElementById('processing').classList.remove('hidden');
|
249 |
+
document.getElementById('donation-form').classList.add('hidden');
|
250 |
+
|
251 |
+
// Simulate AI processing
|
252 |
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
253 |
+
|
254 |
+
// Generate AI-optimized donation allocation
|
255 |
+
const allocation = await this.optimizeDonationAllocation(amount, cause);
|
256 |
+
this.showDonationSuccess(allocation);
|
257 |
+
}
|
258 |
+
|
259 |
+
async optimizeDonationAllocation(amount, cause) {
|
260 |
+
if (cause === 'auto') {
|
261 |
+
// Use AI to determine optimal split
|
262 |
+
const yemenNeed = Math.random() * 0.6 + 0.3; // Simulate need analysis
|
263 |
+
const gazaNeed = 1 - yemenNeed;
|
264 |
+
|
265 |
+
return {
|
266 |
+
yemen: Math.round(amount * yemenNeed * 100) / 100,
|
267 |
+
gaza: Math.round(amount * gazaNeed * 100) / 100
|
268 |
+
};
|
269 |
+
}
|
270 |
+
|
271 |
+
return {
|
272 |
+
[cause]: parseFloat(amount),
|
273 |
+
[cause === 'yemen' ? 'gaza' : 'yemen']: 0
|
274 |
+
};
|
275 |
+
}
|
276 |
+
|
277 |
+
showDonationSuccess(allocation) {
|
278 |
+
document.getElementById('processing').classList.add('hidden');
|
279 |
+
|
280 |
+
const successDiv = document.createElement('div');
|
281 |
+
successDiv.className = 'donation-success';
|
282 |
+
successDiv.innerHTML = `
|
283 |
+
<h3>Thank you for your donation!</h3>
|
284 |
+
<p>AI-optimized allocation:</p>
|
285 |
+
<ul>
|
286 |
+
<li>Yemen Relief: $${allocation.yemen || 0}</li>
|
287 |
+
<li>Gaza Support: $${allocation.gaza || 0}</li>
|
288 |
+
</ul>
|
289 |
+
`;
|
290 |
+
|
291 |
+
document.querySelector('.donation-form .container').appendChild(successDiv);
|
292 |
+
}
|
293 |
+
|
294 |
+
async optimizeDonation() {
|
295 |
+
const amount = prompt('Enter donation amount:');
|
296 |
+
if (!amount || isNaN(amount)) return;
|
297 |
+
|
298 |
+
const allocation = await this.optimizeDonationAllocation(amount, 'auto');
|
299 |
+
alert(`AI recommends:\nYemen Relief: $${allocation.yemen}\nGaza Support: $${allocation.gaza}`);
|
300 |
+
}
|
301 |
+
|
302 |
+
animateCounters() {
|
303 |
+
const animateValue = (id, start, end, duration, suffix = '') => {
|
304 |
+
const element = document.getElementById(id);
|
305 |
+
const range = end - start;
|
306 |
+
const increment = range / (duration / 16);
|
307 |
+
let current = start;
|
308 |
+
|
309 |
+
const timer = setInterval(() => {
|
310 |
+
current += increment;
|
311 |
+
if (current >= end) {
|
312 |
+
current = end;
|
313 |
+
clearInterval(timer);
|
314 |
+
}
|
315 |
+
element.textContent = (id === 'total-donations' ? '$' : '') +
|
316 |
+
Math.floor(current).toLocaleString() + suffix;
|
317 |
+
}, 16);
|
318 |
+
};
|
319 |
+
|
320 |
+
const observer = new IntersectionObserver((entries) => {
|
321 |
+
entries.forEach(entry => {
|
322 |
+
if (entry.isIntersecting) {
|
323 |
+
animateValue('total-donations', 0, 2500000, 2000);
|
324 |
+
animateValue('lives-impacted', 0, 50000, 2000, '+');
|
325 |
+
observer.disconnect();
|
326 |
+
}
|
327 |
+
});
|
328 |
+
});
|
329 |
+
|
330 |
+
observer.observe(document.querySelector('.hero-stats'));
|
331 |
+
}
|
332 |
+
|
333 |
+
showFallback() {
|
334 |
+
document.querySelector('.ai-assistant').innerHTML = `
|
335 |
+
<div class="container">
|
336 |
+
<h2>Donation Assistant</h2>
|
337 |
+
<p>Our AI assistant is temporarily unavailable. Please proceed with your donation below.</p>
|
338 |
+
</div>
|
339 |
+
`;
|
340 |
+
}
|
341 |
+
}
|
342 |
+
|
343 |
+
// Mobile menu toggle
|
344 |
+
document.querySelector('.mobile-menu-toggle').addEventListener('click', function() {
|
345 |
+
document.querySelector('.nav-links').classList.toggle('active');
|
346 |
+
});
|
347 |
+
|
348 |
+
// Initialize the application
|
349 |
+
new AIDonationAssistant();
|
350 |
+
|
351 |
+
=== style.css ===
|
352 |
+
/* style.css */
|
353 |
+
:root {
|
354 |
+
--primary-color: #1E90FF;
|
355 |
+
--secondary-color: #FFD700;
|
356 |
+
--accent-color: #32CD32;
|
357 |
+
--text-dark: #333;
|
358 |
+
--text-light: #666;
|
359 |
+
--bg-light: #f8f9fa;
|
360 |
+
--white: #ffffff;
|
361 |
+
--shadow: 0 2px 10px rgba(0,0,0,0.1);
|
362 |
+
--border-radius: 8px;
|
363 |
+
}
|
364 |
+
|
365 |
+
* {
|
366 |
+
margin: 0;
|
367 |
+
padding: 0;
|
368 |
+
box-sizing: border-box;
|
369 |
+
}
|
370 |
+
|
371 |
+
body {
|
372 |
+
font-family: 'Open Sans', sans-serif;
|
373 |
+
line-height: 1.6;
|
374 |
+
color: var(--text-dark);
|
375 |
+
}
|
376 |
+
|
377 |
+
h1, h2, h3 {
|
378 |
+
font-family: 'Montserrat', sans-serif;
|
379 |
+
}
|
380 |
+
|
381 |
+
.container {
|
382 |
+
max-width: 1200px;
|
383 |
+
margin: 0 auto;
|
384 |
+
padding: 0 20px;
|
385 |
+
}
|
386 |
+
|
387 |
+
/* Header & Navigation */
|
388 |
+
header {
|
389 |
+
background: var(--white);
|
390 |
+
box-shadow: var(--shadow);
|
391 |
+
position: fixed;
|
392 |
+
width: 100%;
|
393 |
+
top: 0;
|
394 |
+
z-index: 1000;
|
395 |
+
}
|
396 |
+
|
397 |
+
.nav-container {
|
398 |
+
display: flex;
|
399 |
+
justify-content: space-between;
|
400 |
+
align-items: center;
|
401 |
+
padding: 1rem 2rem;
|
402 |
+
}
|
403 |
+
|
404 |
+
.logo h1 {
|
405 |
+
font-size: 1.5rem;
|
406 |
+
color: var(--primary-color);
|
407 |
+
}
|
408 |
+
|
409 |
+
.tagline {
|
410 |
+
font-size: 0.8rem;
|
411 |
+
color: var(--text-light);
|
412 |
+
}
|
413 |
+
|
414 |
+
.nav-links {
|
415 |
+
display: flex;
|
416 |
+
list-style: none;
|
417 |
+
gap: 2rem;
|
418 |
+
}
|
419 |
+
|
420 |
+
.nav-links a {
|
421 |
+
text-decoration: none;
|
422 |
+
color: var(--text-dark);
|
423 |
+
font-weight: 500;
|
424 |
+
transition: color 0.3s;
|
425 |
+
}
|
426 |
+
|
427 |
+
.nav-links a:hover {
|
428 |
+
color: var(--primary-color);
|
429 |
+
}
|
430 |
+
|
431 |
+
.mobile-menu-toggle {
|
432 |
+
display: none;
|
433 |
+
flex-direction: column;
|
434 |
+
background: none;
|
435 |
+
border: none;
|
436 |
+
cursor: pointer;
|
437 |
+
}
|
438 |
+
|
439 |
+
.mobile-menu-toggle span {
|
440 |
+
width: 25px;
|
441 |
+
height: 3px;
|
442 |
+
background: var(--text-dark);
|
443 |
+
margin: 3px 0;
|
444 |
+
transition: 0.3s;
|
445 |
+
}
|
446 |
+
|
447 |
+
/* Hero Section */
|
448 |
+
.hero {
|
449 |
+
background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
|
450 |
+
color: var(--white);
|
451 |
+
padding: 8rem 2rem 4rem;
|
452 |
+
text-align: center;
|
453 |
+
margin-top: 60px;
|
454 |
+
}
|
455 |
+
|
456 |
+
.hero h1 {
|
457 |
+
font-size: 3rem;
|
458 |
+
margin-bottom: 1rem;
|
459 |
+
}
|
460 |
+
|
461 |
+
.hero p {
|
462 |
+
font-size: 1.2rem;
|
463 |
+
margin-bottom: 2rem;
|
464 |
+
}
|
465 |
+
|
466 |
+
.cta-button {
|
467 |
+
background: var(--secondary-color);
|
468 |
+
color: var(--text-dark);
|
469 |
+
padding: 1rem 2rem;
|
470 |
+
border: none;
|
471 |
+
border-radius: var(--border-radius);
|
472 |
+
font-size: 1.1rem;
|
473 |
+
font-weight: 600;
|
474 |
+
cursor: pointer;
|
475 |
+
transition: transform 0.3s;
|
476 |
+
}
|
477 |
+
|
478 |
+
.cta-button:hover {
|
479 |
+
transform: translateY(-2px);
|
480 |
+
}
|
481 |
+
|
482 |
+
.hero-stats {
|
483 |
+
display: flex;
|
484 |
+
justify-content: center;
|
485 |
+
gap: 4rem;
|
486 |
+
margin-top: 3rem;
|
487 |
+
}
|
488 |
+
|
489 |
+
.stat {
|
490 |
+
text-align: center;
|
491 |
+
}
|
492 |
+
|
493 |
+
.stat-number {
|
494 |
+
display: block;
|
495 |
+
font-size: 2.5rem;
|
496 |
+
font-weight: 700;
|
497 |
+
}
|
498 |
+
|
499 |
+
.stat-label {
|
500 |
+
font-size: 0.9rem;
|
501 |
+
opacity: 0.9;
|
502 |
+
}
|
503 |
+
|
504 |
+
/* AI Assistant Section */
|
505 |
+
.ai-assistant {
|
506 |
+
padding: 4rem 0;
|
507 |
+
background: var(--bg-light);
|
508 |
+
}
|
509 |
+
|
510 |
+
.chat-container {
|
511 |
+
max-width: 600px;
|
512 |
+
margin: 0 auto;
|
513 |
+
background: var(--white);
|
514 |
+
border-radius: var(--border-radius);
|
515 |
+
box-shadow: var(--shadow);
|
516 |
+
}
|
517 |
+
|
518 |
+
#chat-messages {
|
519 |
+
height: 300px;
|
520 |
+
overflow-y: auto;
|
521 |
+
padding: 1rem;
|
522 |
+
border-bottom: 1px solid #eee;
|
523 |
+
}
|
524 |
+
|
525 |
+
.chat-message {
|
526 |
+
margin-bottom: 1rem;
|
527 |
+
padding: 0.5rem 1rem;
|
528 |
+
border-radius: var(--border-radius);
|
529 |
+
}
|
530 |
+
|
531 |
+
.chat-message.user {
|
532 |
+
background: var(--primary-color);
|
533 |
+
color: var(--white);
|
534 |
+
margin-left: 20%;
|
535 |
+
}
|
536 |
+
|
537 |
+
.chat-message.ai {
|
538 |
+
background: var(--bg-light);
|
539 |
+
margin-right: 20%;
|
540 |
+
}
|
541 |
+
|
542 |
+
.chat-input-container {
|
543 |
+
display: flex;
|
544 |
+
padding: 1rem;
|
545 |
+
gap: 0.5rem;
|
546 |
+
}
|
547 |
+
|
548 |
+
#chat-input {
|
549 |
+
flex: 1;
|
550 |
+
padding: 0.5rem;
|
551 |
+
border: 1px solid #ddd;
|
552 |
+
border-radius: var(--border-radius);
|
553 |
+
}
|
554 |
+
|
555 |
+
#send-button {
|
556 |
+
padding: 0.5rem 1rem;
|
557 |
+
background: var(--primary-color);
|
558 |
+
color: var(--white);
|
559 |
+
border: none;
|
560 |
+
border-radius: var(--border-radius);
|
561 |
+
cursor: pointer;
|
562 |
+
}
|
563 |
+
|
564 |
+
/* Mission Section */
|
565 |
+
.mission {
|
566 |
+
padding: 4rem 0;
|
567 |
+
}
|
568 |
+
|
569 |
+
.mission h2 {
|
570 |
+
text-align: center;
|
571 |
+
margin-bottom: 2rem;
|
572 |
+
}
|
573 |
+
|
574 |
+
.mission-grid {
|
575 |
+
display: grid;
|
576 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
577 |
+
gap: 2rem;
|
578 |
+
}
|
579 |
+
|
580 |
+
.mission-card {
|
581 |
+
background: var(--white);
|
582 |
+
padding: 2rem;
|
583 |
+
border-radius: var(--border-radius);
|
584 |
+
box-shadow: var(--shadow);
|
585 |
+
text-align: center;
|
586 |
+
}
|
587 |
+
|
588 |
+
.progress-bar {
|
589 |
+
background: #eee;
|
590 |
+
height: 8px;
|
591 |
+
border-radius: 4px;
|
592 |
+
margin: 1rem 0;
|
593 |
+
overflow: hidden;
|
594 |
+
}
|
595 |
+
|
596 |
+
.progress {
|
597 |
+
background: var(--accent-color);
|
598 |
+
height: 100%;
|
599 |
+
transition: width 1s ease;
|
600 |
+
}
|
601 |
+
|
602 |
+
/* Donation Form */
|
603 |
+
.donation-form {
|
604 |
+
padding: 4rem 0;
|
605 |
+
background: var(--bg-light);
|
606 |
+
}
|
607 |
+
|
608 |
+
.donation-form h2 {
|
609 |
+
text-align: center;
|
610 |
+
margin-bottom: 2rem;
|
611 |
+
}
|
612 |
+
|
613 |
+
#donation-form {
|
614 |
+
max-width: 400px;
|
615 |
+
margin: 0 auto;
|
616 |
+
}
|
617 |
+
|
618 |
+
.form-group {
|
619 |
+
margin-bottom: 1.5rem;
|
620 |
+
}
|
621 |
+
|
622 |
+
.form-group label {
|
623 |
+
display: block;
|
624 |
+
margin-bottom: 0.5rem;
|
625 |
+
font-weight: 600;
|
626 |
+
}
|
627 |
+
|
628 |
+
.form-group input,
|
629 |
+
.form-group select {
|
630 |
+
width: 100%;
|
631 |
+
padding: 0.75rem;
|
632 |
+
border: 1px solid #ddd;
|
633 |
+
border-radius: var(--border-radius);
|
634 |
+
font-size: 1rem;
|
635 |
+
}
|
636 |
+
|
637 |
+
.submit-btn {
|
638 |
+
width: 100%;
|
639 |
+
padding: 1rem;
|
640 |
+
background: var(--primary-color);
|
641 |
+
color: var(--white);
|
642 |
+
border: none;
|
643 |
+
border-radius: var(--border-radius);
|
644 |
+
font-size: 1.1rem;
|
645 |
+
cursor: pointer;
|
646 |
+
transition: background 0.3s;
|
647 |
+
}
|
648 |
+
|
649 |
+
.submit-btn:hover {
|
650 |
+
background: #1976D2;
|
651 |
+
}
|
652 |
+
|
653 |
+
.hidden {
|
654 |
+
display: none;
|
655 |
+
}
|
656 |
+
|
657 |
+
.spinner {
|
658 |
+
border: 3px solid #f3f3f3;
|
659 |
+
border-top: 3px solid var(--primary-color);
|
660 |
+
border-radius: 50%;
|
661 |
+
width: 40px;
|
662 |
+
height: 40px;
|
663 |
+
animation: spin 1s linear infinite;
|
664 |
+
margin: 0 auto 1rem;
|
665 |
+
}
|
666 |
+
|
667 |
+
@keyframes spin {
|
668 |
+
0% { transform: rotate(0deg); }
|
669 |
+
100% { transform: rotate(360deg); }
|
670 |
+
}
|
671 |
+
|
672 |
+
.donation-success {
|
673 |
+
background: var(--white);
|
674 |
+
padding: 2rem;
|
675 |
+
border-radius: var(--border-radius);
|
676 |
+
box-shadow: var(--shadow);
|
677 |
+
text-align: center;
|
678 |
+
margin-top: 2rem;
|
679 |
+
}
|
680 |
+
|
681 |
+
/* Footer */
|
682 |
+
footer {
|
683 |
+
background: var(--text-dark);
|
684 |
+
color: var(--white);
|
685 |
+
text-align: center;
|
686 |
+
padding: 2rem 0;
|
687 |
+
}
|
688 |
+
|
689 |
+
.social-links {
|
690 |
+
margin-top: 1rem;
|
691 |
+
}
|
692 |
+
|
693 |
+
.social-links a {
|
694 |
+
color: var(--white);
|
695 |
+
margin: 0 1rem;
|
696 |
+
text-decoration: none;
|
697 |
+
}
|
698 |
+
|
699 |
+
/* Responsive Design */
|
700 |
+
@media (max-width: 768px) {
|
701 |
+
.nav-links {
|
702 |
+
display: none;
|
703 |
+
position: absolute;
|
704 |
+
top: 100%;
|
705 |
+
left: 0;
|
706 |
+
width: 100%;
|
707 |
+
background: var(--white);
|
708 |
+
flex-direction: column;
|
709 |
+
padding: 1rem;
|
710 |
+
box-shadow: var(--shadow);
|
711 |
+
}
|
712 |
+
|
713 |
+
.nav-links.active {
|
714 |
+
display: flex;
|
715 |
+
}
|
716 |
+
|
717 |
+
.mobile-menu-toggle {
|
718 |
+
display: flex;
|
719 |
+
}
|
720 |
+
|
721 |
+
.hero h1 {
|
722 |
+
font-size: 2rem;
|
723 |
+
}
|
724 |
+
|
725 |
+
.hero-stats {
|
726 |
+
flex-direction: column;
|
727 |
+
gap: 2rem;
|
728 |
+
}
|
729 |
+
|
730 |
+
.mission-grid {
|
731 |
+
grid-template-columns: 1fr;
|
732 |
+
}
|
733 |
+
}
|
734 |
+
|
735 |
+
@media (max-width: 480px) {
|
736 |
+
.hero {
|
737 |
+
padding: 6rem 1rem 2rem;
|
738 |
+
}
|
739 |
+
|
740 |
+
.container {
|
741 |
+
padding: 0 15px;
|
742 |
+
}
|
743 |
+
}
|