Spaces:
Running
Running
File size: 66,991 Bytes
ef7e47d | 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 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 | <!DOCTYPE html>
<html lang="uk">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fuel Vouchers Ukraine | Save Money on Gasoline</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
scroll-behavior: smooth;
}
.hero-section {
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1612712191429-25b2ae8432f2?ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.voucher-card {
transition: all 0.3s ease;
}
.voucher-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.accordion-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease-out;
}
.animate-bounce-slow {
animation: bounce-slow 2s infinite;
}
@keyframes bounce-slow {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
/* Modal styles */
.modal {
transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-content {
transform: translateY(20px);
transition: transform 0.3s ease;
}
.modal-open .modal-content {
transform: translateY(0);
}
.voucher-code {
font-family: 'Courier New', monospace;
letter-spacing: 2px;
}
/* Credit card input styling */
.card-input {
position: relative;
}
.card-input input {
padding-left: 40px;
}
.card-icon {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
color: #999;
}
/* Input error */
.input-error {
border-color: #f87171 !important;
}
.error-message {
color: #f87171;
font-size: 0.875rem;
margin-top: 0.25rem;
display: none;
}
.shake {
animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes shake {
10%, 90% { transform: translateX(-1px); }
20%, 80% { transform: translateX(2px); }
30%, 50%, 70% { transform: translateX(-4px); }
40%, 60% { transform: translateX(4px); }
}
/* Payment processing */
.payment-processing {
display: none;
opacity: 0;
transition: opacity 0.3s ease;
}
/* Card logos */
.card-logo {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
height: 24px;
opacity: 0;
transition: opacity 0.3s ease;
}
.card-logo.visible {
opacity: 1;
}
/* How it works steps */
.step-container {
position: relative;
}
.step-number {
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #10b981;
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
position: absolute;
left: -20px;
top: -20px;
z-index: 10;
}
/* Partner logos */
.partner-logo {
filter: grayscale(100%);
opacity: 0.7;
transition: all 0.3s ease;
}
.partner-logo:hover {
filter: grayscale(0%);
opacity: 1;
}
/* FAQ accordion */
.accordion-button {
transition: all 0.3s ease;
}
.accordion-button:not(.collapsed) {
background-color: #f0fdf4;
color: #047857;
}
.accordion-button:not(.collapsed)::after {
transform: rotate(-180deg);
color: #047857;
}
/* Contact form */
.contact-form input,
.contact-form textarea {
transition: all 0.3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
border-color: #10b981;
box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}
</style>
</head>
<body class="bg-gray-50">
<!-- Navigation -->
<nav class="bg-white shadow-lg sticky top-0 z-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i class="fas fa-gas-pump text-green-600 text-2xl mr-2"></i>
<span class="text-xl font-bold text-gray-900">Fuel<span class="text-green-500">Save</span></span>
</div>
</div>
<div class="hidden md:ml-6 md:flex md:items-center md:space-x-8">
<a href="#how-it-works" class="text-gray-700 hover:text-green-600 px-3 py-2 text-sm font-medium">Як це працює</a>
<a href="#vouchers" class="text-gray-700 hover:text-green-600 px-3 py-2 text-sm font-medium">Ваучери</a>
<a href="#advantages" class="text-gray-700 hover:text-green-600 px-3 py-2 text-sm font-medium">Переваги</a>
<a href="#faq" class="text-gray-700 hover:text-green-600 px-3 py-2 text-sm font-medium">FAQ</a>
<a href="#contact" class="text-gray-700 hover:text-green-600 px-3 py-2 text-sm font-medium">Контакти</a>
<a href="#vouchers" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-md text-sm font-medium transition duration-300">Купити ваучер</a>
</div>
<div class="-mr-2 flex items-center md:hidden">
<button type="button" id="mobile-menu-button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-700 hover:text-green-600 hover:bg-gray-100 focus:outline-none">
<svg class="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
</div>
</div>
</div>
<!-- Mobile menu -->
<div id="mobile-menu" class="hidden md:hidden bg-white border-t border-gray-200">
<div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
<a href="#how-it-works" class="text-gray-700 hover:text-green-600 block px-3 py-2 text-base font-medium">Як це працює</a>
<a href="#vouchers" class="text-gray-700 hover:text-green-600 block px-3 py-2 text-base font-medium">Ваучери</a>
<a href="#advantages" class="text-gray-700 hover:text-green-600 block px-3 py-2 text-base font-medium">Переваги</a>
<a href="#faq" class="text-gray-700 hover:text-green-600 block px-3 py-2 text-base font-medium">FAQ</a>
<a href="#contact" class="text-gray-700 hover:text-green-600 block px-3 py-2 text-base font-medium">Контакти</a>
<a href="#vouchers" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-md text-sm font-medium transition duration-300 block w-full text-center mt-2">Купити ваучер</a>
</div>
</div>
</nav>
<!-- Purchase Modal -->
<div id="purchaseModal" class="modal fixed inset-0 z-50 flex items-center justify-center opacity-0 invisible">
<div class="modal-overlay absolute inset-0 bg-gray-900 opacity-50"></div>
<div class="modal-content bg-white w-full max-w-md mx-4 rounded-lg shadow-xl z-50 relative">
<button onclick="closeModal()" class="absolute top-3 right-3 text-gray-400 hover:text-gray-600">
<i class="fas fa-times text-xl"></i>
</button>
<div class="p-6">
<h2 class="text-2xl font-bold text-gray-800 mb-1" id="modalTitle">Оформити ваучер</h2>
<p class="text-gray-600 mb-6">Заповніть дані для оплати</p>
<div id="paymentForm">
<div class="mb-4">
<label class="block text-gray-700 text-sm font-medium mb-2" for="email">Електронна пошта</label>
<input type="email" id="email" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500" placeholder="your@email.com" required>
<p class="error-message" id="email-error">Будь ласка, введіть дійсну електронну пошту</p>
</div>
<div class="mb-4">
<label class="block text-gray-700 text-sm font-medium mb-2" for="name">Ім'я на картці</label>
<input type="text" id="name" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500" placeholder="John Doe" required>
<p class="error-message" id="name-error">Будь ласка, введіть ім'я</p>
</div>
<div class="mb-4">
<label class="block text-gray-700 text-sm font-medium mb-2" for="card">Номер картки</label>
<div class="card-input relative">
<i class="card-icon fas fa-credit-card text-green-600"></i>
<input type="text" id="card" class="w-full pl-10 pr-12 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500" placeholder="4242 4242 4242 4242" required maxlength="19">
<!-- Card logos -->
<img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/visa/visa-original.svg" class="card-logo visa" alt="Visa">
<img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/mastercard/mastercard-original.svg" class="card-logo mastercard" alt="Mastercard">
<img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/americanexpress/americanexpress-original.svg" class="card-logo amex" alt="Amex">
<img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/discover/discover-original.svg" class="card-logo discover" alt="Discover">
</div>
<p class="error-message" id="card-error">Будь ласка, введіть дійсний номер картки</p>
</div>
<div class="grid grid-cols-2 gap-4 mb-4">
<div>
<label class="block text-gray-700 text-sm font-medium mb-2" for="expiry">Термін дії</label>
<input type="text" id="expiry" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500 dapitplaceholder="MM/YY" required maxlength="5">
<p class="error-message" id="expiry-error">Невірний формат (MM/YY)</p>
</div>
<div>
<label class="block text-gray-700 text-sm font-medium mb-2" for="cvc">CVC</label>
<input type="text" id="cvc" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500" placeholder="123" required maxlength="4">
<p class="error-message" id="cvc-error">Будь ласка, введіть правильний CVC</p>
</div>
</div>
<div class="mb-6">
<label class="flex items-center">
<input type="checkbox" class="form-checkbox h-5 w-5 text-green-600">
<span class="ml-2 text-gray-700">Зберігати цю картку для майбутніх покупок</span>
</label>
</div>
<div class="bg-green-50 p-4 rounded-md mb-4 flex items-center">
<i class="fas fa-info-circle text-green-600 mr-2"></i>
<p class="text-sm text-green-700">Усі транзакції захищені 256-бітним SSL-шифруванням</p>
</div>
<!-- Payment processing indicator -->
<div id="paymentProcessing" class="payment-processing flex items-center justify-center mb-4">
<div class="animate-spin rounded-full h-6 w-6 border-b-2 border-green-600 mr-2"></div>
<span>Виконується оплата...</span>
</div>
<!-- Payment error -->
<div id="paymentError" class="hidden bg-red-50 p-4 rounded-md mb-4 flex items-start">
<i class="fas fa-exclamation-circle text-red-600 mr-2 mt-0.5"></i>
<p class="text-sm text-red-700" id="paymentErrorMessage">Помилка оплати. Будь ласка, спробуйте ще раз.</p>
</div>
<button onclick="validateAndProcessPayment()" class="w-full py-3 px-4 bg-green-600 hover:bg-green-700 text-white font-medium rounded-md shadow-sm transition duration-300">
Оплатити <span id="voucherPrice">95₴</span>
</button>
</div>
<!-- Voucher confirmation -->
<div id="voucherConfirmation" class="hidden">
<div class="text-center">
<div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
<i class="fas fa-check text-green-600 text-2xl"></i>
</div>
<h3 class="text-xl font-bold text-gray-800 mb-2">Дякуємо за покупку!</h3>
<p class="text-gray-600 mb-6">Ваш паливний ваучер успішно створено.</p>
<div class="bg-gray-50 p-4 rounded-md mb-4">
<h4 class="font-medium text-gray-700 mb-2">Ваш код ваучера:</h4>
<div class="bg-white p-3 rounded border-2 border-green-200">
<p class="voucher-code font-bold text-xl text-green-600 tracking-wider" id="voucherCode">FUEL-XXXX-XXXX-XXXX</p>
</div>
</div>
<div class="text-left bg-yellow-50 p-4 rounded-md mb-6">
<h4 class="font-medium text-gray-700 mb-1">Інструкція:</h4>
<ul class="list-disc list-inside text-sm text-gray-600 space-y-1">
<li>Код також надіслано на вашу електронну пошту</li>
<li>Покажіть цей код на заправці при оплаті</li>
<li>Термін дії: 6 місяців з сьогоднішнього дня</li>
</ul>
</div>
<button onclick="closeModal()" class="w-full py-3 px-4 bg-green-600 hover:bg-green-700 text-white font-medium rounded-md shadow-sm transition duration-300">
Закрити
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Hero Section -->
<section class="hero-section relative flex items-center justify-center h-screen">
<div class="absolute inset-0 bg-black opacity-40"></div>
<div class="text-center z-10 px-4 sm:px-6 lg:px-8">
<h1 class="text-4xl md:text-6xl font-extrabold tracking-tight text-white mb-6 animate-bounce-slow">Економте на паливі!</h1>
<p class="text-xl md:text-2xl text-gray-100 mb-8 max-w-3xl mx-auto">
Купуйте цифрові паливні ваучери зі знижкою до 15% та заправляйтеся дешевше на заправках по всій Україні.
</p>
<div class="space-y-4 sm:space-x-4 sm:space-y-0">
<a href="#vouchers" class="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-green-600 hover:bg-green-700 transition duration-300">
Купити ваучери
<i class="fas fa-arrow-right ml-2"></i>
</a>
<a href="#how-it-works" class="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md text-white bg-transparent hover:bg-white hover:text-green-600 transition duration-300 border-white">
Дізнатися більше
</a>
</div>
</div>
<div class="absolute bottom-10 left-0 right-0 text-center">
<a href="#how-it-works" class="text-white animate-bounce">
<i class="fas fa-chevron-down text-2xl"></i>
</a>
</div>
</section>
<!-- How It Works Section -->
<section id="how-it-works" class="py-20 bg-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h2 class="text-3xl md:text-4xl font-bold text-gray-900 mb-4">Як працюють наші ваучери</h2>
<p class="text-lg text-gray-600 max-w-3xl mx-auto">
Наша система дозволяє вам заощаджувати на паливі легко та зручно
</p>
</div>
<div class="grid md:grid-cols-3 gap-10">
<!-- Step 1 -->
<div class="step-container relative bg-gray-50 rounded-lg p-8 shadow-sm hover:shadow-md transition duration-300">
<div class="step-number">1</div>
<div class="text-center">
<div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
<i class="fas fa-shopping-cart text-green-600 text-2xl"></i>
</div>
<h3 class="text-xl font-semibold text-gray-800 mb-3">Купуєте ваучер</h3>
<p class="text-gray-600">
Оберіть потрібну кількість літрів або суму, здійсніть оплату онлайн
</p>
</div>
</div>
<!-- Step 2 -->
<div class="step-container relative bg-gray-50 rounded-lg p-8 shadow-sm hover:shadow-md transition duration-300">
<div class="step-number">2</div>
<div class="text-center">
<div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
<i class="fas fa-envelope text-green-600 text-2xl"></i>
</div>
<h3 class="text-xl font-semibold text-gray-800 mb-3">Отримуєте код</h3>
<p class="text-gray-600">
Миттєво отримуєте унікальний код на email та у особистому кабінеті
</p>
</div>
</div>
<!-- Step 3 -->
<div class="step-container relative bg-gray-50 rounded-lg p-8 shadow-sm hover:shadow-md transition duration-300">
<div class="step-number">3</div>
<div class="text-center">
<div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
<i class="fas fa-gas-pump text-green-600 text-2xl"></i>
</div>
<h3 class="text-xl font-semibold text-gray-800 mb-3">Заправляєтесь</h3>
<p class="text-gray-600">
Назвіть код на заправці-партнері та отримайте знижку на пальне
</p>
</div>
</div>
</div>
</div>
</section>
<!-- Vouchers Section -->
<section id="vouchers" class="py-20 bg-gray-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h2 class="text-3xl md:text-4xl font-bold text-gray-900 mb-4">Виберіть ваші ваучери</h2>
<p class="text-lg text-gray-600 max-w-3xl mx-auto">
Обирайте зручний для вас варіант економії на паливі
</p>
</div>
<div class="grid md:grid-cols-3 gap-8">
<!-- Voucher 1 -->
<div class="voucher-card bg-white rounded-lg overflow-hidden shadow-md">
<div class="bg-green-600 text-white py-4 text-center">
<h3 class="text-xl font-bold">Стандартний</h3>
<p class="text-sm opacity-90">20 літрів знижки</p>
</div>
<div class="p-6">
<div class="flex justify-center mb-4">
<span class="text-4xl font-bold text-gray-900">95₴</span>
</div>
<ul class="space-y-3 mb-6">
<li class="flex items-start">
<i class="fas fa-check text-green-500 mt-1 mr-2"></i>
<span>Знижка 5% на 20 літрів палива</span>
</li>
<li class="flex items-start">
<i class="fas fa-check text-green-500 mt-1 mr-2"></i>
<span>Дійсний 3 місяці</span>
</li>
<li class="flex items-start">
<i class="fas fa-check text-green-500 mt-1 mr-2"></i>
<span>Використання у будь-якій мережі</span>
</li>
</ul>
<button onclick="openPurchaseModal('Стандартний', 95)" class="w-full py-3 px-4 bg-green-600 hover:bg-green-700 text-white font-medium rounded-md transition duration-300">
Купити зараз
</button>
</div>
</div>
<!-- Voucher 2 (Featured) -->
<div class="voucher-card bg-white rounded-lg overflow-hidden shadow-md transform scale-105 border-2 border-green-400">
<div class="bg-green-700 text-white py-4 text-center relative">
<div class="absolute top-0 left-0 bg-yellow-400 text-green-900 font-bold px-3 py-1 text-xs uppercase">Найпопулярніший</div>
<h3 class="text-xl font-bold">Преміум</h3>
<p class="text-sm opacity-90">50 літрів знижки</p>
</div>
<div class="p-6">
<div class="flex justify-center mb-4">
<span class="text-4xl font-bold text-gray-900">225₴</span>
</div>
<ul class="space-y-3 mb-6">
<li class="flex items-start">
<i class="fas fa-check text-green-500 mt-1 mr-2"></i>
<span>Знижка 10% на 50 літрів палива</span>
</li>
<li class="flex items-start">
<i class="fas fa-check text-green-500 mt-1 mr-2"></i>
<span>Дійсний 6 місяців</span>
</li>
<li class="flex items-start">
<i class="fas fa-check text-green-500 mt-1 mr-2"></i>
<span>Швидке поповнення онлайн</span>
</li>
<li class="flex items-start">
<i class="fas fa-check text-green-500 mt-1 mr-2"></i>
<span>Пріоритетна підтримка</span>
</li>
</ul>
<button onclick="openPurchaseModal('Преміум', 225)" class="w-full py-3 px-4 bg-green-600 hover:bg-green-700 text-white font-medium rounded-md transition duration-300">
Купити зараз
</button>
</div>
</div>
<!-- Voucher 3 -->
<div class="voucher-card bg-white rounded-lg overflow-hidden shadow-md">
<div class="bg-green-600 text-white py-4 text-center">
<h3 class="text-xl font-bold">Бізнес</h3>
<p class="text-sm opacity-90">100+ літрів</p>
</div>
<div class="p-6">
<div class="flex justify-center mb-4">
<span class="text-4xl font-bold text-gray-900">400₴</span>
</div>
<ul class="space-y-3 mb-6">
<li class="flex items-start">
<i class="fas fa-check text-green-500 mt-1 mr-2"></i>
<span>Знижка 15% на 100 літрів палива</span>
</li>
<li class="flex items-start">
<i class="fas fa-check text-green-500 mt-1 mr-2"></i>
<span>Дійсний 12 місяців</span>
</li>
<li class="flex items-start">
<i class="fas fa-check text-green-500 mt-1 mr-2"></i>
<span>Керування кількома водіями</span>
</li>
<li class="flex items-start">
<i class="fas fa-check text-green-500 mt-1 mr-2"></i>
<span>Детальна статистика витрат</span>
</li>
</ul>
<button onclick="openPurchaseModal('Бізнес', 400)" class="w-full py-3 px-4 bg-green-600 hover:bg-green-700 text-white font-medium rounded-md transition duration-300">
Купити зараз
</button>
</div>
</div>
</div>
<div class="mt-12 text-center">
<a href="#" class="inline-flex items-center text-green-600 font-medium">
Дивитись усі пропозиції
<i class="fas fa-chevron-right ml-2"></i>
</a>
</div>
</div>
</section>
<!-- Advantages Section -->
<section id="advantages" class="py-20 bg-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h2 class="text-3xl md:text-4xl font-bold text-gray-900 mb-4">Наші переваги</h2>
<p class="text-lg text-gray-600 max-w-3xl mx-auto">
Чому клієнти обирають наш сервіс для економії на паливі
</p>
</div>
<div class="grid md:grid-cols-2 lg:grid-cols-4 gap-8">
<div class="text-center">
<div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
<i class="fas fa-percentage text-green-600 text-2xl"></i>
</div>
<h3 class="text-xl font-semibold text-gray-800 mb-2">Максимальна знижка</h3>
<p class="text-gray-600">До 15% економії на кожному літрі палива</p>
</div>
<div class="text-center">
<div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
<i class="fas fa-sitemap text-green-600 text-2xl"></i>
</div>
<h3 class="text-xl font-semibold text-gray-800 mb-2">100+ заправок</h3>
<p class="text-gray-600">Широка мережа партнерів по всій Україні</p>
</div>
<div class="text-center">
<div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
<i class="fas fa-bolt text-green-600 text-2xl"></i>
</div>
<h3 class="text-xl font-semibold text-gray-800 mb-2">Миттєва активація</h3>
<p class="text-gray-600">Код дійсний одразу після оплати</p>
</div>
<div class="text-center">
<div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
<i class="fas fa-shield-alt text-green-600 text-2xl"></i>
</div>
<h3 class="text-xl font-semibold text-gray-800 mb-2">Безпека</h3>
<p class="text-gray-600">Захищені платежі та гарантоване виконання</p>
</div>
</div>
<div class="mt-16">
<h3 class="text-2xl font-bold text-center text-gray-900 mb-6">Наші партнери</h3>
<div class="flex flex-wrap justify-center items-center gap-8 md:gap-12">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/WOG_oil_station_logo.svg/1200px-WOG_oil_station_logo.svg.png" alt="WOG" class="partner-logo h-12">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/OKKO.svg/1200px-OKKO.svg.png" alt="OKKO" class="partner-logo h-12">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/SOCAR_Logo.svg/1200px-SOCAR_Logo.svg.png" alt="SOCAR" class="partner-logo h-12">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/AMIC_Energy_Logo.svg/1200px-AMIC_Energy_Logo.svg.png" alt="AMIC" class="partner-logo h-12">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Ukrzaliznytsia_Logo.svg/1200px-Ukrzaliznytsia_Logo.svg.png" alt="Ukrnafta" class="partner-logo h-12">
</div>
</div>
</div>
</section>
<!-- FAQ Section -->
<section id="faq" class="py-20 bg-gray-50">
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-12">
<h2 class="text-3xl md:text-4xl font-bold text-gray-900 mb-4">Часті запитання</h2>
<p class="text-lg text-gray-600 max-w-3xl mx-auto">
Знайдіть відповіді на популярні питання про наш сервіс
</p>
</div>
<div class="space-y-4">
<!-- FAQ Item 1 -->
<div class="border border-gray-200 rounded-lg overflow-hidden">
<button class="accordion-button w-full flex justify-between items-center p-4 text-left bg-white hover:bg-gray-50 focus:outline-none">
<span class="font-medium text-gray-800">Як використовувати паливні ваучери?</span>
<i class="fas fa-chevron-down text-gray-400 transform transition-transform duration-300"></i>
</button>
<div class="accordion-content">
<div class="p-4 bg-gray-50 border-t border-gray-200">
<p class="text-gray-600">
1. Придбайте ваучер на нашому сайті та отримайте унікальний код.<br>
2. Приїжджайте на заправку-партнера.<br>
3. Назвіть або покажіть код оператору перед заправкою.<br>
4. Пальне буде відпущено з урахуванням вашої знижки.
</p>
</div>
</div>
</div>
<!-- FAQ Item 2 -->
<div class="border border-gray-200 rounded-lg overflow-hidden">
<button class="accordion-button w-full flex justify-between items-center p-4 text-left bg-white hover:bg-gray-50 focus:outline-none">
<span class="font-medium text-gray-800">Який термін дії ваучерів?</span>
<i class="fas fa-chevron-down text-gray-400 transform transition-transform duration-300"></i>
</button>
<div class="accordion-content">
<div class="p-4 bg-gray-50 border-t border-gray-200">
<p class="text-gray-600">
Термін дії залежить від типу ваучера:<br>
- Стандартний: 3 місяці<br>
- Преміум: 6 місяців<br>
- Бізнес: 12 місяців<br>
Термін починається з моменту покупки.
</p>
</div>
</div>
</div>
<!-- FAQ Item 3 -->
<div class="border border-gray-200 rounded-lg overflow-hidden">
<button class="accordion-button w-full flex justify-between items-center p-4 text-left bg-white hover:bg-gray-50 focus:outline-none">
<span class="font-medium text-gray-800">Чи можна повернути невикористані ваучери?</span>
<i class="fas fa-chevron-down text-gray-400 transform transition-transform duration-300"></i>
</button>
<div class="accordion-content">
<div class="p-4 bg-gray-50 border-t border-gray-200">
<p class="text-gray-600">
Так, ви можете повернути невикористані ваучери протягом 14 днів з моменту покупки.
Сума буде повернена на вашу картку за вирахуванням 2% комісії платіжної системи.
Після 14 днів повернення неможливе.
</p>
</div>
</div>
</div>
<!-- FAQ Item 4 -->
<div class="border border-gray-200 rounded-lg overflow-hidden">
<button class="accordion-button w-full flex justify-between items-center p-4 text-left bg-white hover:bg-gray-50 focus:outline-none">
<span class="font-medium text-gray-800">Чи можна використовувати один ваучер на кількох заправках?</span>
<i class="fas fa-chevron-down text-gray-400 transform transition-transform duration-300"></i>
</button>
<div class="accordion-content">
<div class="p-4 bg-gray-50 border-t border-gray-200">
<p class="text-gray-600">
Так, ви можете використовувати один ваучер частинами на різних заправках.
Сума знижки буде вираховуватися від загального обсягу ваучера до його повного використання.
Наприклад, якщо ви купили ваучер на 50 літрів, можете заправити 20 літрів сьогодні, а 30 - через кілька днів.
</p>
</div>
</div>
</div>
<!-- FAQ Item 5 -->
<div class="border border-gray-200 rounded-lg overflow-hidden">
<button class="accordion-button w-full flex justify-between items-center p-4 text-left bg-white hover:bg-gray-50 focus:outline-none">
<span class="font-medium text-gray-800">Як відстежити використання ваучерів?</span>
<i class="fas fa-chevron-down text-gray-400 transform transition-transform duration-300"></i>
</button>
<div class="accordion-content">
<div class="p-4 bg-gray-50 border-t border-gray-200">
<p class="text-gray-600">
Ми надсилаємо повідомлення на вашу електронну пошту після кожної операції з використання ваучера.
Також ви можете зареєструвати особистий кабінет на нашому сайті, де буде доступна детальна інформація
про всі ваші ваучери та їх використання.
</p>
</div>
</div>
</div>
</div>
<div class="mt-12 text-center">
<p class="text-gray-600 mb-4">Не знайшли відповідь на своє питання?</p>
<a href="#contact" class="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-green-600 hover:bg-green-700 transition duration-300">
Зв'язатися з нами
</a>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="py-20 bg-green-700 text-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h2 class="text-3xl md:text-4xl font-bold mb-4">Зв'яжіться з нами</h2>
<p class="text-lg opacity-90 max-w-3xl mx-auto">
Маєте питання чи пропозиції? Напишіть нам, і ми обов'язково відповімо!
</p>
</div>
<div class="grid md:grid-cols-2 gap-12">
<!-- Contact Form -->
<div class="bg-white rounded-lg shadow-lg p-8 contact-form">
<h3 class="text-xl font-bold text-gray-900 mb-6">Напишіть нам</h3>
<form>
<div class="mb-4">
<label for="contact-name" class="block text-gray-700 text-sm font-medium mb-2">Ваше ім'я</label>
<input type="text" id="contact-name" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500" placeholder="Іван Петренко">
</div>
<div class="mb-4">
<label for="contact-email" class="block text-gray-700 text-sm font-medium mb-2">Електронна пошта</label>
<input type="email" id="contact-email" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500" placeholder="ваша@пошта.укр">
</div>
<div class="mb-4">
<label for="contact-subject" class="block text-gray-700 text-sm font-medium mb-2">Тема</label>
<input type="text" id="contact-subject" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500" placeholder="Тема повідомлення">
</div>
<div class="mb-6">
<label for="contact-message" class="block text-gray-700 text-sm font-medium mb-2">Повідомлення</label>
<textarea id="contact-message" rows="4" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500" placeholder="Ваше повідомлення..."></textarea>
</div>
<button type="submit" class="w-full py-3 px-4 bg-green-600 hover:bg-green-700 text-white font-medium rounded-md shadow-sm transition duration-300">
Надіслати повідомлення
</button>
</form>
</div>
<!-- Contact Info -->
<div class="flex flex-col justify-center">
<div class="mb-8">
<h3 class="text-xl font-bold mb-4">Контактна інформація</h3>
<p class="mb-6 opacity-90">
Ми завжди раді допомогти вам з будь-якими питаннями щодо наших паливних ваучерів.
</p>
<div class="space-y-4">
<div class="flex items-start">
<i class="fas fa-map-marker-alt mt-1 mr-4 text-green-300"></i>
<p>м. Київ, вул. Хрещатик, 44, офіс 12</p>
</div>
<div class="flex items-start">
<i class="fas fa-phone-alt mt-1 mr-4 text-green-300"></i>
<p>
<a href="tel:+380441234567">+38 (044) 123-45-67</a><br>
<a href="tel:+380671234567">+38 (067) 123-45-67</a>
</p>
</div>
<div class="flex items-start">
<i class="fas fa-envelope mt-1 mr-4 text-green-300"></i>
<p>
<a href="mailto:info@fuelsave.ua">info@fuelsave.ua</a><br>
<a href="mailto:support@fuelsave.ua">support@fuelsave.ua</a>
</p>
</div>
</div>
</div>
<div>
<h3 class="text-xl font-bold mb-4">Графік роботи</h3>
<div class="space-y-2">
<div class="flex justify-between border-b border-green-600 pb-2">
<span>Понеділок - П'ятниця</span>
<span>09:00 - 18:00</span>
</div>
<div class="flex justify-between border-b border-green-600 pb-2">
<span>Субота</span>
<span>10:00 - 15:00</span>
</div>
<div class="flex justify-between">
<span>Неділя</span>
<span>вихідний</span>
</div>
</div>
</div>
<div class="mt-8">
<h3 class="text-xl font-bold mb-4">Слідкуйте за нами</h3>
<div class="flex space-x-4">
<a href="#" class="w-10 h-10 rounded-full bg-green-600 hover:bg-green-800 flex items-center justify-center transition duration-300">
<i class="fab fa-facebook-f"></i>
</a>
<a href="#" class="w-10 h-10 rounded-full bg-green-600 hover:bg-green-800 flex items-center justify-center transition duration-300">
<i class="fab fa-instagram"></i>
</a>
<a href="#" class="w-10 h-10 rounded-full bg-green-600 hover:bg-green-800 flex items-center justify-center transition duration-300">
<i class="fab fa-telegram-plane"></i>
</a>
<a href="#" class="w-10 h-10 rounded-full bg-green-600 hover:bg-green-800 flex items-center justify-center transition duration-300">
<i class="fab fa-viber"></i>
</a>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-900 text-gray-400 py-12">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="grid md:grid-cols-4 gap-8 mb-8">
<div>
<h3 class="text-white font-bold text-lg mb-4">FuelSave</h3>
<p class="mb-4">
Сервіс цифрових паливних ваучерів, який допомагає заощаджувати на заправках по всій Україні.
</p>
<div class="flex space-x-4">
<a href="#" class="text-gray-400 hover:text-white">
<i class="fab fa-facebook-f"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i class="fab fa-instagram"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i class="fab fa-telegram-plane"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i class="fab fa-twitter"></i>
</a>
</div>
</div>
<div>
<h3 class="text-white font-bold text-lg mb-4">Інформація</h3>
<ul class="space-y-2">
<li><a href="#how-it-works" class="hover:text-white transition duration-300">Як це працює</a></li>
<li><a href="#vouchers" class="hover:text-white transition duration-300">Ваучери</a></li>
<li><a href="#advantages" class="hover:text-white transition duration-300">Переваги</a></li>
<li><a href="#faq" class="hover:text-white transition duration-300">FAQ</a></li>
<li><a href="#contact" class="hover:text-white transition duration-300">Контакти</a></li>
</ul>
</div>
<div>
<h3 class="text-white font-bold text-lg mb-4">Лізинговим компаніям</h3>
<ul class="space-y-2">
<li><a href="#" class="hover:text-white transition duration-300">Корпоративним клієнтам</a></li>
<li><a href="#" class="hover:text-white transition duration-300">Партнерська програма</a></li>
<li><a href="#" class="hover:text-white transition duration-300">API для бізнесу</a></li>
<li><a href="#" class="hover:text-white transition duration-300">Стати партнером</a></li>
</ul>
</div>
<div>
<h3 class="text-white font-bold text-lg mb-4">Юридична інформація</h3>
<ul class="space-y-2">
<li><a href="#" class="hover:text-white transition duration-300">Умови використання</a></li>
<li><a href="#" class="hover:text-white transition duration-300">Політика конфіденційності</a></li>
<li><a href="#" class="hover:text-white transition duration-300">Публічна оферта</a></li>
<li><a href="#" class="hover:text-white transition duration-300">Правила надання послуг</a></li>
</ul>
</div>
</div>
<div class="pt-8 mt-8 border-t border-gray-800 flex flex-col md:flex-row justify-between items-center">
<p class="text-sm mb-4 md:mb-0">
© 2023 FuelSave Ukraine. Усі права захищені.
</p>
<div class="flex space-x-6">
<a href="#" class="text-sm hover:text-white transition duration-300">Політика Cookie</a>
<a href="#" class="text-sm hover:text-white transition duration-300">Карта сайту</a>
</div>
</div>
</div>
</footer>
<!-- Script -->
<script>
// Mobile Menu Toggle
document.getElementById('mobile-menu-button').addEventListener('click', function() {
const menu = document.getElementById('mobile-menu');
menu.classList.toggle('hidden');
});
// Credit Card Input Formatting
document.getElementById('card').addEventListener('input', function(e) {
// Format card number with spaces every 4 digits
let value = e.target.value.replace(/\s+/g, '');
if (value.length > 0) {
value = value.match(new RegExp('.{1,4}', 'g')).join(' ');
}
e.target.value = value;
// Detect card type and show appropriate logo
detectCardType(value.replace(/\s/g, ''));
});
// Detect card type based on initial digits
function detectCardType(cardNumber) {
// Hide all logos first
document.querySelectorAll('.card-logo').forEach(logo => {
logo.classList.remove('visible');
});
if (!cardNumber) return;
// Show appropriate logo based on card number
if (/^4/.test(cardNumber)) {
document.querySelector('.card-logo.visa').classList.add('visible');
} else if (/^5[1-5]/.test(cardNumber)) {
document.querySelector('.card-logo.mastercard').classList.add('visible');
} else if (/^3[47]/.test(cardNumber)) {
document.querySelector('.card-logo.amex').classList.add('visible');
} else if (/^6(?:011|5)/.test(cardNumber)) {
document.querySelector('.card-logo.discover').classList.add('visible');
}
}
// Expiry date formatting
document.getElementById('expiry').addEventListener('input', function(e) {
let value = e.target.value.replace(/\D/g, '');
if (value.length > 2) {
value = value.slice(0, 2) + '/' + value.slice(2, 4);
}
e.target.value = value;
});
// Validate CVC length based on card type
document.getElementById('card').addEventListener('input', function() {
const cardNumber = this.value.replace(/\s/g, '');
const cvcField = document.getElementById('cvc');
if (/^3[47]/.test(cardNumber)) { // Amex
cvcField.maxLength = 4;
cvcField.placeholder = "4 digits";
} else { // Other cards
cvcField.maxLength = 3;
cvcField.placeholder = "3 digits";
}
});
// Reset errors when user starts typing
document.querySelectorAll('input').forEach(input => {
input.addEventListener('input', function() {
this.classList.remove('input-error');
const errorElement = document.getElementById(`${this.id}-error`);
if (errorElement) errorElement.style.display = 'none';
// Hide payment error when user starts correcting
document.getElementById('paymentError').classList.add('hidden');
});
});
// Form validation
function validateForm() {
let isValid = true;
// Validate email
const email = document.getElementById('email');
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(email.value)) {
email.classList.add('input-error');
document.getElementById('email-error').style.display = 'block';
isValid = false;
}
// Validate name
const name = document.getElementById('name');
if (name.value.trim() === '') {
name.classList.add('input-error');
document.getElementById('name-error').style.display = 'block';
isValid = false;
}
// Validate card number
const card = document.getElementById('card');
const cardValue = card.value.replace(/\s/g, '');
if (!/^\d{12,19}$/.test(cardValue) || !luhnCheck(cardValue)) {
card.classList.add('input-error');
document.getElementById('card-error').textContent = cardValue.length < 12 ? 'Номер картки занадто короткий' : 'Номер картки недійсний';
document.getElementById('card-error').style.display = 'block';
isValid = false;
}
// Validate expiry date
const expiry = document.getElementById('expiry');
const expiryRegex = /^(0[1-9]|1[0-2])\/?([0-9]{2})$/;
if (!expiryRegex.test(expiry.value)) {
expiry.classList.add('input-error');
document.getElementById('expiry-error').style.display = 'block';
isValid = false;
} else {
// Check if expiry date is in the future
const [month, year] = expiry.value.split('/');
const currentYear = new Date().getFullYear() % 100;
const currentMonth = new Date().getMonth() + 1;
if (parseInt(year) < currentYear ||
(parseInt(year) === currentYear && parseInt(month) < currentMonth)) {
expiry.classList.add('input-error');
document.getElementById('expiry-error').textContent = 'Термін дії картки минув';
document.getElementById('expiry-error').style.display = 'block';
isValid = false;
}
}
// Validate CVC
const cvc = document.getElementById('cvc');
const cvcLength = card.value.startsWith('34') || card.value.startsWith('37') ? 4 : 3;
if (cvc.value.length !== cvcLength || !/^\d+$/.test(cvc.value)) {
cvc.classList.add('input-error');
document.getElementById('cvc-error').textContent = cvcLength === 4 ? 'Введіть 4-значний CVC' : 'Введіть 3-значний CVV';
document.getElementById('cvc-error').style.display = 'block';
isValid = false;
}
return isValid;
}
// Luhn algorithm for card validation
function luhnCheck(cardNumber) {
if (!cardNumber) return false;
let sum = 0;
let shouldDouble = false;
for (let i = cardNumber.length - 1; i >= 0; i--) {
let digit = parseInt(cardNumber.charAt(i));
if (shouldDouble) {
digit *= 2;
if (digit > 9) {
digit -= 9;
}
}
sum += digit;
shouldDouble = !shouldDouble;
}
return (sum % 10) === 0;
}
// Simulate payment processing
function processPayment() {
// Show processing indicator
document.getElementById('paymentProcessing').style.display = 'flex';
document.getElementById('paymentProcessing').style.opacity = '1';
// Simulate API call
setTimeout(() => {
// Hide processing indicator
document.getElementById('paymentProcessing').style.opacity = '0';
// Determine if payment should fail (20% chance)
const shouldFail = Math.random() < 0.2;
if (shouldFail) {
// Show payment error
const errorMessages = [
"Не вдалося обробити оплату. Спробуйте ще раз.",
"На жаль, вашу картку відхилено. Перевірте дані або спробуйте іншу картку.",
"Недостатньо коштів на рахунку.",
"Термін дії картки минув або введено невірні дані."
];
const randomMessage = errorMessages[Math.floor(Math.random() * errorMessages.length)];
document.getElementById('paymentErrorMessage').textContent = randomMessage;
document.getElementById('paymentError').classList.remove('hidden');
// Shake the form for emphasis
document.getElementById('paymentForm').classList.add('shake');
setTimeout(() => {
document.getElementById('paymentForm').classList.remove('shake');
}, 500);
} else {
// Success - show voucher
generateVoucher();
}
}, 2000);
}
function validateAndProcessPayment() {
if (validateForm()) {
processPayment();
}
}
// Generate random voucher code (simulated)
function generateVoucher() {
// Hide the payment form and show confirmation
document.getElementById('paymentForm').classList.add('hidden');
// Generate random voucher code (simulated)
const chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ0123456789';
let code = 'FUEL-';
for (let i = 0; i < 12; i++) {
if (i > 0 && i % 4 === 0) code += '-';
code += chars.charAt(Math.floor(Math.random() * chars.length));
}
document.getElementById('voucherCode').textContent = code;
document.getElementById('voucherConfirmation').classList.remove('hidden');
}
// Purchase Modal Functions
function openPurchaseModal(voucherName, price) {
const modal = document.getElementById('purchaseModal');
document.getElementById('modalTitle').textContent = `Купити ваучер ${voucherName}`;
document.getElementById('voucherPrice').textContent = `${price}₴`;
// Reset form
document.getElementById('paymentForm').classList.remove('hidden');
document.getElementById('voucherConfirmation').classList.add('hidden');
document.getElementById('paymentError').classList.add('hidden');
// Clear fields and errors
document.querySelectorAll('input').forEach(input => {
input.value = '';
input.classList.remove('input-error');
});
document.querySelectorAll('.error-message').forEach(el => {
el.style.display = 'none';
});
// Hide card logos
document.querySelectorAll('.card-logo').forEach(logo => {
logo.classList.remove('visible');
});
modal.classList.remove('invisible', 'opacity-0');
document.body.classList.add('modal-open');
}
function closeModal() {
const modal = document.getElementById('purchaseModal');
modal.classList.add('invisible', 'opacity-0');
// Hide processing indicator if showing
document.getElementById('paymentProcessing').style.display = 'none';
document.getElementById('paymentProcessing').style.opacity = '0';
document.body.classList.remove('modal-open');
}
// FAQ Accordion
document.querySelectorAll('.accordion-button').forEach(button => {
button.addEventListener('click', function() {
this.classList.toggle('collapsed');
const content = this.nextElementSibling;
if (content.style.maxHeight) {
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + 'px';
}
// Rotate arrow icon
const icon = this.querySelector('i');
if (icon) {
if (this.classList.contains('collapsed')) {
icon.classList.remove('transform', 'rotate-180');
} else {
icon.classList.add('transform', 'rotate-180');
}
}
});
});
// Initialize all accordion items as collapsed
document.querySelectorAll('.accordion-button').forEach(button => {
button.classList.add('collapsed');
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=greatisiw92/looo" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |