Spaces:
Running
Running
File size: 31,484 Bytes
5bc7597 5d62a18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 | <!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Refara - Fair Referral Routing</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
primary: {
50: '#f0f9ff',
100: '#e0f2fe',
200: '#bae6fd',
300: '#7dd3fc',
400: '#38bdf8',
500: '#0ea5e9',
600: '#0284c7',
700: '#0369a1',
800: '#075985',
900: '#0c4a6e',
950: '#082f49',
},
secondary: {
50: '#faf5ff',
100: '#f3e8ff',
200: '#e9d5ff',
300: '#d8b4fe',
400: '#c084fc',
500: '#a855f7',
600: '#9333ea',
700: '#7e22ce',
800: '#6b21a8',
900: '#581c87',
950: '#3b0764',
}
},
fontFamily: {
'sans': ['Inter', 'system-ui', 'sans-serif'],
'display': ['Space Grotesk', 'system-ui', 'sans-serif'],
},
animation: {
'pulse-glow': 'pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
'float': 'float 6s ease-in-out infinite',
'shimmer': 'shimmer 3s linear infinite',
},
keyframes: {
'pulse-glow': {
'0%, 100%': { opacity: 1 },
'50%': { opacity: 0.5, transform: 'scale(1.05)' },
},
'float': {
'0%, 100%': { transform: 'translateY(0px)' },
'50%': { transform: 'translateY(-20px)' },
},
'shimmer': {
'0%': { backgroundPosition: '-1000px 0' },
'100%': { backgroundPosition: '1000px 0' },
}
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
* {
scroll-behavior: smooth;
}
.bg-grid-pattern {
background-image:
radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
background-size: 40px 40px;
}
.text-gradient-primary {
background: linear-gradient(135deg, #0ea5e9 0%, #a855f7 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.text-gradient-secondary {
background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.glass-effect {
background: rgba(15, 23, 42, 0.7);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(148, 163, 184, 0.1);
}
.gradient-border {
position: relative;
border: 2px solid transparent;
background: linear-gradient(#0f172a, #0f172a) padding-box,
linear-gradient(135deg, #0ea5e9, #a855f7) border-box;
}
.hover-lift {
transition: all 0.3s ease;
}
.hover-lift:hover {
transform: translateY(-4px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.stat-card {
background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.6));
border: 1px solid rgba(148, 163, 184, 0.1);
}
.router-node {
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.typewriter {
overflow: hidden;
border-right: 3px solid #0ea5e9;
white-space: nowrap;
animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
@keyframes blink-caret {
from, to { border-color: transparent }
50% { border-color: #0ea5e9 }
}
#vanta-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
}
</style>
</head>
<body class="dark:bg-gray-900 bg-gray-50 text-gray-900 dark:text-gray-100 font-sans overflow-x-hidden">
<!-- Vanta.js Background -->
<div id="vanta-bg"></div>
<!-- Navigation -->
<nav class="fixed w-full z-50 glass-effect py-4 px-6 md:px-12">
<div class="max-w-7xl mx-auto flex items-center justify-between">
<div class="flex items-center space-x-2">
<div class="w-10 h-10 rounded-full bg-gradient-to-br from-primary-500 to-secondary-500 flex items-center justify-center">
<i data-feather="share-2" class="text-white w-5 h-5"></i>
</div>
<span class="text-xl font-display font-bold text-gradient-primary">Refara</span>
</div>
<div class="hidden md:flex items-center space-x-8">
<a href="#home" class="text-gray-300 hover:text-primary-400 transition-colors duration-300">Home</a>
<a href="#how" class="text-gray-300 hover:text-primary-400 transition-colors duration-300">How It Works</a>
<a href="#stats" class="text-gray-300 hover:text-primary-400 transition-colors duration-300">Live Stats</a>
<a href="#submit" class="text-gray-300 hover:text-primary-400 transition-colors duration-300">Submit</a>
<button class="px-6 py-2 bg-gradient-to-r from-primary-600 to-secondary-600 text-white rounded-full hover-lift font-semibold">
Get Referral
</button>
</div>
<button class="md:hidden text-gray-300">
<i data-feather="menu" class="w-6 h-6"></i>
</button>
</div>
</nav>
<!-- Hero Section -->
<section id="home" class="relative min-h-screen pt-24 px-6 md:px-12 flex items-center">
<div class="max-w-7xl mx-auto relative z-10">
<div class="grid lg:grid-cols-2 gap-12 items-center">
<div class="space-y-8">
<div class="inline-flex items-center space-x-3 px-4 py-2 rounded-full bg-primary-900/30 border border-primary-500/20">
<div class="w-2 h-2 rounded-full bg-primary-500 animate-pulse-glow"></div>
<span class="text-sm font-medium text-primary-300">Live Routing Engine Active</span>
</div>
<h1 class="text-5xl md:text-7xl font-display font-bold leading-tight">
<span class="text-gradient-primary">Fair</span> Referrals,
<br>
<span class="text-gradient-secondary">Powered</span> by Community
</h1>
<p class="text-xl text-gray-400 max-w-2xl">
Refara is the transparent routing layer that gives every contributor an equal chance.
No algorithms. No bias. Just fair distribution of referral opportunities.
</p>
<div class="flex flex-col sm:flex-row gap-4">
<button class="px-8 py-4 bg-gradient-to-r from-primary-600 to-secondary-600 text-white rounded-xl hover-lift font-semibold text-lg flex items-center justify-center space-x-3">
<i data-feather="play" class="w-5 h-5"></i>
<span>Request Referral</span>
</button>
<button class="px-8 py-4 glass-effect rounded-xl hover-lift font-semibold text-lg flex items-center justify-center space-x-3">
<i data-feather="info" class="w-5 h-5"></i>
<span>Learn More</span>
</button>
</div>
</div>
<div class="relative">
<div class="absolute -inset-4 bg-gradient-to-r from-primary-500/20 to-secondary-500/20 rounded-3xl blur-3xl"></div>
<div class="relative glass-effect rounded-2xl p-8">
<div class="flex items-center justify-between mb-8">
<h3 class="text-xl font-display font-bold">Live Router Visualization</h3>
<div class="flex items-center space-x-2">
<div class="w-2 h-2 rounded-full bg-green-500 animate-pulse"></div>
<span class="text-sm text-green-400">Active</span>
</div>
</div>
<div class="relative h-64 bg-gray-800/50 rounded-xl overflow-hidden">
<!-- Animated router visualization -->
<div class="absolute inset-0 flex items-center justify-center">
<div class="w-16 h-16 rounded-full bg-gradient-to-br from-primary-500 to-secondary-500 flex items-center justify-center animate-float">
<i data-feather="cpu" class="text-white w-8 h-8"></i>
</div>
</div>
<!-- Animated nodes -->
<div class="router-node absolute top-1/4 left-1/4 w-8 h-8 rounded-full bg-primary-500/30 border-2 border-primary-500"></div>
<div class="router-node absolute top-1/4 right-1/4 w-8 h-8 rounded-full bg-secondary-500/30 border-2 border-secondary-500" style="animation-delay: 0.5s"></div>
<div class="router-node absolute bottom-1/4 left-1/3 w-8 h-8 rounded-full bg-primary-500/30 border-2 border-primary-500" style="animation-delay: 1s"></div>
<div class="router-node absolute bottom-1/4 right-1/3 w-8 h-8 rounded-full bg-secondary-500/30 border-2 border-secondary-500" style="animation-delay: 1.5s"></div>
<!-- Connection lines -->
<svg class="absolute inset-0 w-full h-full">
<line x1="25%" y1="25%" x2="50%" y2="50%" stroke="rgba(14, 165, 233, 0.3)" stroke-width="2" />
<line x1="75%" y1="25%" x2="50%" y2="50%" stroke="rgba(168, 85, 247, 0.3)" stroke-width="2" />
<line x1="33%" y1="75%" x2="50%" y2="50%" stroke="rgba(14, 165, 233, 0.3)" stroke-width="2" />
<line x1="67%" y1="75%" x2="50%" y2="50%" stroke="rgba(168, 85, 247, 0.3)" stroke-width="2" />
</svg>
</div>
<div class="mt-6 grid grid-cols-3 gap-4">
<div class="stat-card p-4 rounded-lg text-center">
<div class="text-2xl font-bold text-primary-400">128</div>
<div class="text-sm text-gray-400">Active Nodes</div>
</div>
<div class="stat-card p-4 rounded-lg text-center">
<div class="text-2xl font-bold text-secondary-400">642</div>
<div class="text-sm text-gray-400">Routes Today</div>
</div>
<div class="stat-card p-4 rounded-lg text-center">
<div class="text-2xl font-bold text-green-400">99.8%</div>
<div class="text-sm text-gray-400">Uptime</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- How It Works Section -->
<section id="how" class="py-20 px-6 md:px-12 bg-grid-pattern">
<div class="max-w-7xl mx-auto">
<div class="text-center mb-16">
<h2 class="text-4xl md:text-5xl font-display font-bold mb-4">
How <span class="text-gradient-primary">Refara</span> Works
</h2>
<p class="text-xl text-gray-400 max-w-3xl mx-auto">
A simple, transparent process that ensures fairness for both seekers and contributors
</p>
</div>
<div class="grid md:grid-cols-2 lg:grid-cols-4 gap-8">
<div class="glass-effect p-8 rounded-2xl hover-lift">
<div class="w-16 h-16 rounded-xl bg-gradient-to-br from-primary-500 to-primary-700 flex items-center justify-center mb-6">
<i data-feather="search" class="text-white w-8 h-8"></i>
</div>
<h3 class="text-xl font-display font-bold mb-3">Choose Platform</h3>
<p class="text-gray-400">
Select from our growing list of supported platforms for referral links.
</p>
</div>
<div class="glass-effect p-8 rounded-2xl hover-lift">
<div class="w-16 h-16 rounded-xl bg-gradient-to-br from-secondary-500 to-secondary-700 flex items-center justify-center mb-6">
<i data-feather="refresh-cw" class="text-white w-8 h-8"></i>
</div>
<h3 class="text-xl font-display font-bold mb-3">Fair Routing</h3>
<p class="text-gray-400">
Our engine randomly selects from all active contributors with equal probability.
</p>
</div>
<div class="glass-effect p-8 rounded-2xl hover-lift">
<div class="w-16 h-16 rounded-xl bg-gradient-to-br from-primary-500 to-secondary-500 flex items-center justify-center mb-6">
<i data-feather="link" class="text-white w-8 h-8"></i>
</div>
<h3 class="text-xl font-display font-bold mb-3">Get Redirected</h3>
<p class="text-gray-400">
Seamlessly redirected to the selected contributor's referral link.
</p>
</div>
<div class="glass-effect p-8 rounded-2xl hover-lift">
<div class="w-16 h-16 rounded-xl bg-gradient-to-br from-green-500 to-emerald-600 flex items-center justify-center mb-6">
<i data-feather="users" class="text-white w-8 h-8"></i>
</div>
<h3 class="text-xl font-display font-bold mb-3">Community Grows</h3>
<p class="text-gray-400">
Contributors gain exposure, community thrives, and the cycle continues.
</p>
</div>
</div>
</div>
</section>
<!-- Live Stats Section -->
<section id="stats" class="py-20 px-6 md:px-12">
<div class="max-w-7xl mx-auto">
<div class="gradient-border rounded-3xl p-8 md:p-12">
<div class="flex flex-col lg:flex-row items-center justify-between mb-12">
<div>
<h2 class="text-4xl md:text-5xl font-display font-bold mb-4">
Live <span class="text-gradient-secondary">Routing</span> Statistics
</h2>
<p class="text-gray-400">
Real-time data from our fair routing engine
</p>
</div>
<div class="flex items-center space-x-2 mt-4 lg:mt-0">
<div class="w-3 h-3 rounded-full bg-green-500 animate-pulse"></div>
<span class="text-green-400 font-medium">Live Updates</span>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
<div class="stat-card p-6 rounded-xl">
<div class="flex items-center justify-between mb-4">
<i data-feather="users" class="w-6 h-6 text-primary-400"></i>
<span class="text-sm text-green-400">+12 today</span>
</div>
<div class="text-3xl font-bold mb-1" id="contributorCount">142</div>
<div class="text-gray-400">Active Contributors</div>
</div>
<div class="stat-card p-6 rounded-xl">
<div class="flex items-center justify-between mb-4">
<i data-feather="refresh-cw" class="w-6 h-6 text-secondary-400"></i>
<span class="text-sm text-green-400">+48 last hour</span>
</div>
<div class="text-3xl font-bold mb-1" id="routeCount">690</div>
<div class="text-gray-400">Successful Routes</div>
</div>
<div class="stat-card p-6 rounded-xl">
<div class="flex items-center justify-between mb-4">
<i data-feather="clock" class="w-6 h-6 text-primary-400"></i>
<span class="text-sm text-green-400">Real-time</span>
</div>
<div class="text-3xl font-bold mb-1">1.2s</div>
<div class="text-gray-400">Avg. Routing Time</div>
</div>
<div class="stat-card p-6 rounded-xl">
<div class="flex items-center justify-between mb-4">
<i data-feather="heart" class="w-6 h-6 text-red-400"></i>
<span class="text-sm text-green-400">Stable</span>
</div>
<div class="text-3xl font-bold mb-1">99.8%</div>
<div class="text-gray-400">User Satisfaction</div>
</div>
</div>
<!-- Live Activity Feed -->
<div class="mt-12">
<h3 class="text-2xl font-display font-bold mb-6">Live Activity Feed</h3>
<div class="space-y-3">
<div class="glass-effect p-4 rounded-xl flex items-center space-x-4">
<div class="w-10 h-10 rounded-lg bg-primary-500/20 flex items-center justify-center">
<i data-feather="user" class="w-5 h-5 text-primary-400"></i>
</div>
<div class="flex-1">
<div class="font-medium">New contributor joined</div>
<div class="text-sm text-gray-400">@crypto_trader_42 • 2 minutes ago</div>
</div>
<div class="px-3 py-1 rounded-full bg-primary-500/20 text-primary-400 text-sm">
Stake.us
</div>
</div>
<div class="glass-effect p-4 rounded-xl flex items-center space-x-4">
<div class="w-10 h-10 rounded-lg bg-secondary-500/20 flex items-center justify-center">
<i data-feather="refresh-cw" class="w-5 h-5 text-secondary-400"></i>
</div>
<div class="flex-1">
<div class="font-medium">Referral routed successfully</div>
<div class="text-sm text-gray-400">To @digital_nomad_7 • 5 minutes ago</div>
</div>
<div class="px-3 py-1 rounded-full bg-secondary-500/20 text-secondary-400 text-sm">
Route #689
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Submit Section -->
<section id="submit" class="py-20 px-6 md:px-12 bg-grid-pattern">
<div class="max-w-4xl mx-auto">
<div class="text-center mb-12">
<h2 class="text-4xl md:text-5xl font-display font-bold mb-4">
Contribute Your <span class="text-gradient-primary">Link</span>
</h2>
<p class="text-xl text-gray-400">
Join the fair routing pool. Every submission helps the community find better referrals.
</p>
</div>
<div class="glass-effect rounded-2xl p-8">
<form id="referralForm" class="space-y-6">
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Platform</label>
<select class="w-full bg-gray-800/50 border border-gray-700 rounded-lg px-4 py-3 text-white focus:ring-2 focus:ring-primary-500 focus:border-transparent">
<option>Stake.us</option>
<option>Binance</option>
<option>Coinbase</option>
<option>Kraken</option>
<option>Other Platform</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-300 mb-2">Your Referral URL</label>
<input type="url"
class="w-full bg-gray-800/50 border border-gray-700 rounded-lg px-4 py-3 text-white focus:ring-2 focus:ring-primary-500 focus:border-transparent"
placeholder="https://stake.us/?c=yourcode"
required>
</div>
<div class="flex items-center space-x-3 text-sm text-gray-400">
<i data-feather="shield" class="w-4 h-4"></i>
<span>Your link is stored securely and used only for fair routing</span>
</div>
<button type="submit"
class="w-full py-4 bg-gradient-to-r from-primary-600 to-secondary-600 text-white rounded-xl hover-lift font-semibold text-lg flex items-center justify-center space-x-3">
<i data-feather="upload" class="w-5 h-5"></i>
<span>Submit to Routing Pool</span>
</button>
</form>
<div class="mt-8 p-4 bg-gradient-to-r from-primary-900/20 to-secondary-900/20 rounded-xl border border-primary-500/20">
<div class="flex items-start space-x-3">
<i data-feather="info" class="w-5 h-5 text-primary-400 mt-0.5"></i>
<div>
<h4 class="font-semibold mb-1">How Submission Works</h4>
<p class="text-sm text-gray-400">
Your link enters our fair rotation pool. When someone requests a referral for your platform,
our system randomly selects from all active links with equal probability. No ranking, no favoritism.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="py-12 px-6 md:px-12 border-t border-gray-800">
<div class="max-w-7xl mx-auto">
<div class="flex flex-col md:flex-row items-center justify-between">
<div class="flex items-center space-x-2 mb-6 md:mb-0">
<div class="w-8 h-8 rounded-full bg-gradient-to-br from-primary-500 to-secondary-500 flex items-center justify-center">
<i data-feather="share-2" class="text-white w-4 h-4"></i>
</div>
<span class="text-xl font-display font-bold">Refara</span>
</div>
<div class="flex items-center space-x-6">
<a href="#" class="text-gray-400 hover:text-primary-400 transition-colors">Privacy</a>
<a href="#" class="text-gray-400 hover:text-primary-400 transition-colors">Terms</a>
<a href="#" class="text-gray-400 hover:text-primary-400 transition-colors">API</a>
<a href="#" class="text-gray-400 hover:text-primary-400 transition-colors">Contact</a>
</div>
</div>
<div class="mt-8 pt-8 border-t border-gray-800 text-center text-gray-500 text-sm">
<p>© 2024 Refara - The Fair Referral Router. All rights reserved.</p>
<p class="mt-2">Making referral distribution fair, one route at a time.</p>
</div>
</div>
</footer>
<script>
// Initialize Vanta.js background
VANTA.GLOBE({
el: "#vanta-bg",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
color: 0x0ea5e9,
color2: 0xa855f7,
backgroundColor: 0x0f172a,
size: 0.8
});
// Initialize Feather Icons
feather.replace();
// Animated stats counter
function animateCounter(elementId, targetValue, duration = 2000) {
const element = document.getElementById(elementId);
const startValue = parseInt(element.textContent);
const increment = (targetValue - startValue) / (duration / 16);
let current = startValue;
const timer = setInterval(() => {
current += increment;
element.textContent = Math.floor(current);
if ((increment > 0 && current >= targetValue) ||
(increment < 0 && current <= targetValue)) {
element.textContent = targetValue;
clearInterval(timer);
}
}, 16);
}
// Simulate live stats updates
setInterval(() => {
const currentRoutes = parseInt(document.getElementById('routeCount').textContent);
const newRoutes = currentRoutes + Math.floor(Math.random() * 3) + 1;
animateCounter('routeCount', newRoutes, 1000);
}, 5000);
// Form submission
document.getElementById('referralForm').addEventListener('submit', function(e) {
e.preventDefault();
// Simulate submission
const submitBtn = this.querySelector('button[type="submit"]');
const originalText = submitBtn.innerHTML;
submitBtn.innerHTML = '<i data-feather="loader" class="w-5 h-5 animate-spin"></i><span>Submitting...</span>';
feather.replace();
setTimeout(() => {
submitBtn.innerHTML = originalText;
feather.replace();
// Show success message
const successMsg = document.createElement('div');
successMsg.className = 'mt-4 p-4 bg-green-900/20 border border-green-500/30 rounded-xl text-green-400';
successMsg.innerHTML = `
<div class="flex items-center space-x-3">
<i data-feather="check-circle" class="w-5 h-5"></i>
<span>Your referral link has been added to the routing pool!</span>
</div>
`;
document.getElementById('referralForm').appendChild(successMsg);
feather.replace();
// Remove message after 5 seconds
setTimeout(() => successMsg.remove(), 5000);
}, 1500);
});
// Smooth scroll for navigation links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const targetId = this.getAttribute('href');
if(targetId === '#') return;
const targetElement = document.querySelector(targetId);
if(targetElement) {
window.scrollTo({
top: targetElement.offsetTop - 80,
behavior: 'smooth'
});
}
});
});
// Update contributor count randomly
setInterval(() => {
const currentContributors = parseInt(document.getElementById('contributorCount').textContent);
const shouldAdd = Math.random() > 0.7;
if(shouldAdd && currentContributors < 200) {
const newCount = currentContributors + 1;
animateCounter('contributorCount', newCount, 800);
}
}, 10000);
</script>
</body>
</html>
|