Spaces:
Running
Running
File size: 61,790 Bytes
8ea809e c58c5ea 8ea809e |
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 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TrustNet Bank - Multi-Currency Banking</title>
<style>
/* Base Styles */
body {
margin: 0;
background: linear-gradient(135deg, #f5f7f8 0%, #e8ecf0 100%);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
color: #333;
min-height: 100vh;
position: relative;
padding-bottom: 30px;
}
.container {
max-width: 500px;
margin: 20px auto;
padding: 25px;
background: white;
border-radius: 15px;
box-shadow: 0 8px 32px rgba(0,0,0,0.12);
backdrop-filter: blur(10px);
border: 1px solid rgba(255,255,255,0.2);
}
/* Hero Section */
.hero {
text-align: center;
padding: 30px 20px;
background: linear-gradient(135deg, #0a3e80 0%, #1e5aa8 50%, #2d6bb8 100%);
color: white;
border-radius: 15px;
margin-bottom: 25px;
position: relative;
overflow: hidden;
box-shadow: 0 8px 25px rgba(10, 62, 128, 0.3);
}
.hero:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
}
.hero h1 {
margin: 0;
font-size: 32px;
font-weight: 700;
position: relative;
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.hero p {
margin: 15px 0 0;
font-size: 18px;
position: relative;
opacity: 0.95;
}
/* Features Grid */
.features-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 18px;
margin: 25px 0;
}
.feature-card {
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
border-radius: 12px;
padding: 20px;
text-align: center;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
border: 1px solid rgba(10, 62, 128, 0.1);
}
.feature-card:hover {
transform: translateY(-8px) scale(1.02);
box-shadow: 0 12px 30px rgba(10, 62, 128, 0.15);
}
.feature-icon {
font-size: 28px;
margin-bottom: 12px;
color: #0a3e80;
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.feature-card h4 {
margin: 0 0 8px 0;
color: #0a3e80;
font-weight: 600;
}
.feature-card p {
margin: 0;
font-size: 14px;
color: #666;
line-height: 1.4;
}
/* Balance Section */
.balance-section {
background: linear-gradient(135deg, #0a3e80 0%, #1e5aa8 100%);
color: white;
padding: 25px;
border-radius: 15px;
margin: 20px 0;
text-align: center;
box-shadow: 0 8px 25px rgba(10, 62, 128, 0.3);
}
.balance-amount {
font-size: 36px;
font-weight: 700;
margin: 10px 0;
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.balance-label {
font-size: 16px;
opacity: 0.9;
margin-bottom: 15px;
}
.balance-actions {
display: flex;
gap: 10px;
margin-top: 15px;
}
.balance-btn {
flex: 1;
background: rgba(255,255,255,0.2);
border: 2px solid rgba(255,255,255,0.3);
color: white;
padding: 10px;
border-radius: 8px;
cursor: pointer;
font-weight: 600;
transition: all 0.3s ease;
}
.balance-btn:hover {
background: rgba(255,255,255,0.3);
transform: translateY(-2px);
}
/* Visual Elements */
.visual-section {
display: flex;
justify-content: space-around;
margin: 25px 0;
padding: 20px;
background: linear-gradient(135deg, #f8fafc 0%, #e8ecf0 100%);
border-radius: 12px;
}
.visual-element {
text-align: center;
}
.visual-icon {
font-size: 32px;
color: #0a3e80;
margin-bottom: 8px;
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.visual-element small {
font-weight: 500;
color: #666;
}
/* Enhanced Receipt Styling */
.receipt-card {
background: #ffffff;
border-radius: 16px;
padding: 25px 20px;
box-shadow: 0 8px 32px rgba(0,0,0,0.12);
margin: 20px auto;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
max-width: 380px;
border: 1px solid #f0f0f0;
position: relative;
overflow: hidden;
}
.receipt-card:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, #0a3e80 0%, #1e5aa8 50%, #2d6bb8 100%);
}
.receipt-header {
text-align: center;
margin-bottom: 15px;
padding-bottom: 12px;
border-bottom: 1px solid #f5f5f5;
}
.receipt-logo {
font-size: 18px;
font-weight: 500;
color: #0a3e80;
margin-bottom: 3px;
}
.receipt-subtitle {
font-size: 12px;
color: #666;
margin: 0;
}
.receipt-amount {
font-size: 42px;
font-weight: 600;
margin: 15px 0;
color: #000000;
text-align: center;
letter-spacing: -1px;
}
.status-successful {
background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
color: white;
padding: 10px 16px;
border-radius: 8px;
text-align: center;
font-weight: 400;
font-size: 14px;
margin: 0 0 15px 0;
text-transform: capitalize;
box-shadow: 0 3px 10px rgba(40, 167, 69, 0.25);
}
.status-pending {
background: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%);
color: #000;
padding: 10px 16px;
border-radius: 8px;
text-align: center;
font-weight: 400;
font-size: 14px;
margin: 0 0 15px 0;
text-transform: capitalize;
box-shadow: 0 3px 10px rgba(255, 193, 7, 0.25);
}
.status-failed {
background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
color: white;
padding: 10px 16px;
border-radius: 8px;
text-align: center;
font-weight: 400;
font-size: 14px;
margin: 0 0 15px 0;
text-transform: capitalize;
box-shadow: 0 3px 10px rgba(220, 53, 69, 0.25);
}
.transaction-details {
margin: 0;
background: #f8fafc;
padding: 15px;
border-radius: 8px;
border: 1px solid #e2e8f0;
}
.detail-row {
margin-bottom: 10px;
font-size: 14px;
line-height: 1.4;
color: #333;
display: flex;
justify-content: space-between;
align-items: center;
}
.detail-label {
font-weight: 400;
color: #0a3e80;
flex: 1;
}
.detail-value {
color: #333;
font-weight: 300;
text-align: right;
flex: 1;
word-break: break-word;
}
.alert-caption {
color: #dc3545;
font-weight: bold;
font-size: 14px;
text-align: center;
margin: 0 0 20px 0;
padding: 12px 16px;
background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
border: 2px solid #dc3545;
border-radius: 8px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.receipt-buttons {
display: flex;
justify-content: space-between;
margin-top: 20px;
gap: 12px;
}
.receipt-buttons button {
width: 48%;
background: linear-gradient(135deg, #1e5aa8 0%, #0a3e80 100%);
color: white;
border: none;
padding: 12px 16px;
border-radius: 8px;
font-weight: 500;
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 3px 10px rgba(30, 90, 168, 0.25);
}
.receipt-buttons button:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(30, 90, 168, 0.4);
}
/* Success Animation */
.success-animation {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
color: white;
padding: 30px;
border-radius: 20px;
text-align: center;
font-size: 24px;
font-weight: bold;
z-index: 1000;
box-shadow: 0 15px 35px rgba(40, 167, 69, 0.4);
animation: successPulse 2s ease-in-out;
}
@keyframes successPulse {
0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
/* Original Styles Enhanced */
h2, h3 {
text-align: center;
color: #0a3e80;
font-weight: 600;
}
input, select, button {
width: 100%;
padding: 12px 16px;
margin-top: 12px;
border: 2px solid #e2e8f0;
border-radius: 8px;
font-size: 15px;
transition: all 0.3s ease;
box-sizing: border-box;
}
input:focus, select:focus {
outline: none;
border-color: #0a3e80;
box-shadow: 0 0 0 3px rgba(10, 62, 128, 0.1);
}
button {
background: linear-gradient(135deg, #0a3e80 0%, #1e5aa8 100%);
color: white;
font-weight: 600;
cursor: pointer;
border: none;
box-shadow: 0 4px 15px rgba(10, 62, 128, 0.3);
transition: all 0.3s ease;
}
button:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(10, 62, 128, 0.4);
}
.nav {
display: flex;
justify-content: space-between;
margin: 15px 0;
gap: 10px;
}
.nav button {
flex: 1;
margin: 0;
padding: 12px 8px;
font-size: 14px;
}
.hidden { display: none; }
/* Profile Section Enhancement */
#profile-pic-display, #dashboard-pic {
border-radius: 50%;
width: 100px;
height: 100px;
margin-bottom: 20px;
border: 4px solid #0a3e80;
box-shadow: 0 4px 15px rgba(10, 62, 128, 0.3);
}
.welcome-msg {
text-align: center;
font-size: 18px;
margin-top: 20px;
color: #0a3e80;
font-weight: 500;
}
.whatsapp-link { text-align: center; margin-top: 20px; }
.whatsapp-link a {
color: #25D366;
font-weight: bold;
text-decoration: none;
padding: 10px 20px;
background: rgba(37, 211, 102, 0.1);
border-radius: 25px;
transition: all 0.3s ease;
}
.whatsapp-link a:hover {
background: rgba(37, 211, 102, 0.2);
transform: translateY(-2px);
}
.history-item { margin-bottom: 20px; }
.loading { opacity: 0.6; pointer-events: none; }
.email-status {
margin-top: 12px;
padding: 12px 16px;
border-radius: 8px;
text-align: center;
font-weight: 600;
}
.email-success {
background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
color: #155724;
border: 1px solid #c3e6cb;
}
.email-error {
background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
color: #721c24;
border: 1px solid #f5c6cb;
}
.optional-field { margin-top: 18px; }
.optional-field label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #0a3e80;
}
/* Developer Contact Section */
.developer-contact {
background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
color: white;
padding: 20px;
border-radius: 12px;
margin-top: 25px;
text-align: center;
box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}
.developer-contact h4 {
margin: 0 0 12px 0;
font-size: 18px;
}
.developer-contact p {
margin: 8px 0;
font-size: 15px;
}
.whatsapp-support {
background: rgba(255,255,255,0.2);
color: white;
padding: 12px 24px;
border: 2px solid rgba(255,255,255,0.3);
border-radius: 25px;
font-weight: bold;
cursor: pointer;
margin-top: 15px;
text-decoration: none;
display: inline-block;
transition: all 0.3s ease;
}
.whatsapp-support:hover {
background: rgba(255,255,255,0.3);
color: white;
transform: translateY(-2px);
}
/* Modal Styles */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
backdrop-filter: blur(5px);
}
.modal-content {
background-color: white;
margin: 10% auto;
padding: 30px;
border-radius: 15px;
width: 90%;
max-width: 400px;
box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}
.close:hover {
color: #000;
}
/* Transaction Warning */
.transaction-warning {
margin-top: 15px;
padding: 12px;
background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
border: 1px solid #ffc107;
border-radius: 8px;
color: #856404;
text-align: center;
font-size: 14px;
font-weight: 500;
}
/* WhatsApp Group Section */
.whatsapp-group {
background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
color: white;
padding: 25px 20px;
border-radius: 15px;
text-align: center;
margin: 25px 0 0;
box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
position: relative;
overflow: hidden;
}
.whatsapp-group:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2) 0%, transparent 40%);
}
.whatsapp-group h3 {
margin-top: 0;
font-size: 22px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
}
.whatsapp-group p {
font-size: 16px;
margin-bottom: 20px;
position: relative;
}
.whatsapp-group-btn {
background: white;
color: #25D366;
padding: 14px 30px;
border-radius: 50px;
font-weight: 700;
text-decoration: none;
display: inline-block;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
transition: all 0.3s ease;
position: relative;
border: none;
font-size: 16px;
cursor: pointer;
}
.whatsapp-group-btn:hover {
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
/* Financial Tools Section */
.tools-section {
margin: 30px 0;
background: linear-gradient(135deg, #f8fafc 0%, #e8ecf0 100%);
border-radius: 15px;
padding: 20px;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.tools-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 15px;
margin-top: 20px;
}
.tool-card {
background: white;
border-radius: 12px;
padding: 15px;
text-align: center;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
transition: all 0.3s ease;
border: 1px solid rgba(10, 62, 128, 0.1);
}
.tool-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 20px rgba(10, 62, 128, 0.15);
}
.tool-icon {
font-size: 24px;
margin-bottom: 10px;
color: #0a3e80;
}
.tool-card h4 {
margin: 0 0 5px 0;
color: #0a3e80;
font-weight: 600;
}
.tool-card p {
margin: 0;
font-size: 13px;
color: #666;
}
/* Charts Container */
.chart-container {
margin: 20px 0;
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.chart {
height: 200px;
position: relative;
margin-top: 20px;
display: flex;
align-items: flex-end;
justify-content: space-around;
}
.chart-bar {
width: 30px;
background: linear-gradient(to top, #0a3e80, #2d6bb8);
border-radius: 5px 5px 0 0;
position: relative;
transition: all 0.5s ease;
}
.chart-bar-label {
position: absolute;
bottom: -25px;
left: 0;
width: 100%;
text-align: center;
font-size: 12px;
color: #666;
}
.chart-title {
text-align: center;
font-weight: 600;
color: #0a3e80;
margin-bottom: 10px;
}
/* Loan Calculator */
.calculator-container {
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
margin: 20px 0;
}
.calculator-result {
margin-top: 20px;
padding: 15px;
background: #f8fafc;
border-radius: 8px;
text-align: center;
font-weight: 600;
color: #0a3e80;
}
/* Responsive */
@media(max-width:600px){
.container { margin:10px; padding: 20px; }
.receipt-card { margin: 10px; padding: 25px 20px; max-width: 350px; }
.receipt-amount { font-size: 42px; }
.features-grid, .tools-grid { grid-template-columns: 1fr; }
.hero h1 { font-size: 28px; }
.hero p { font-size: 16px; }
.balance-actions { flex-direction: column; }
}
/* Footer WhatsApp Group */
.footer-whatsapp-group {
background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
color: white;
padding: 25px 20px;
border-radius: 15px;
text-align: center;
margin: 30px 0 0;
box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
position: relative;
overflow: hidden;
}
.footer-whatsapp-group:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2) 0%, transparent 40%);
}
.footer-whatsapp-group h3 {
margin-top: 0;
font-size: 22px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
}
.footer-whatsapp-group p {
font-size: 16px;
margin-bottom: 20px;
position: relative;
}
.footer-whatsapp-group-btn {
background: white;
color: #25D366;
padding: 14px 30px;
border-radius: 50px;
font-weight: 700;
text-decoration: none;
display: inline-block;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
transition: all 0.3s ease;
position: relative;
border: none;
font-size: 16px;
cursor: pointer;
}
.footer-whatsapp-group-btn:hover {
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
/* Currency badge */
.currency-badge {
position: fixed;
top: 20px;
right: 20px;
background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
color: white;
padding: 8px 15px;
border-radius: 20px;
font-weight: 600;
box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
z-index: 1000;
}
</style>
</head>
<body>
<div class="currency-badge">50+ Currencies Supported</div>
<!-- Auth Section -->
<div class="container" id="auth">
<!-- Hero Welcome Section -->
<div class="hero">
<h1>π¦ TrustNet Bank</h1>
<p>Multi-Currency Banking with 50+ Currencies</p>
</div>
<!-- Features Section -->
<div class="features-grid">
<div class="feature-card">
<div class="feature-icon">πΈ</div>
<h4>Global Transfers</h4>
<p>Send money in 50+ currencies</p>
</div>
<div class="feature-card">
<div class="feature-icon">π§Ύ</div>
<h4>Transaction Receipts</h4>
<p>Generate sharp transaction records</p>
</div>
<div class="feature-card">
<div class="feature-icon">π§</div>
<h4>Email Alerts</h4>
<p>Real-time notifications</p>
</div>
<div class="feature-card">
<div class="feature-icon">π</div>
<h4>Korean Won & More</h4>
<p>Supports KRW and 50+ currencies</p>
</div>
</div>
<!-- Visual Elements -->
<div class="visual-section">
<div class="visual-element">
<div class="visual-icon">πΊπΈ</div>
<small>USD Support</small>
</div>
<div class="visual-element">
<div class="visual-icon">π°π·</div>
<small>KRW Support</small>
</div>
<div class="visual-element">
<div class="visual-icon">πͺπΊ</div>
<small>EUR Support</small>
</div>
</div>
<!-- Financial Tools Section -->
<div class="tools-section">
<h3>Financial Tools</h3>
<div class="tools-grid">
<div class="tool-card">
<div class="tool-icon">π</div>
<h4>Currency Converter</h4>
<p>Convert between 50+ currencies</p>
</div>
<div class="tool-card">
<div class="tool-icon">π</div>
<h4>Budget Planner</h4>
<p>Plan your expenses</p>
</div>
<div class="tool-card">
<div class="tool-icon">πΉ</div>
<h4>Investment Simulator</h4>
<p>Simulate investment growth</p>
</div>
</div>
</div>
<!-- Call to Action -->
<div style="text-align: center; margin: 25px 0;">
<h3>Global Banking Experience</h3>
<p>Join thousands enjoying multi-currency banking</p>
<div style="background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%); padding: 20px; border-radius: 12px; margin: 20px 0; border: 1px solid rgba(10, 62, 128, 0.1);">
<p><strong>For any issues or feature requests:</strong></p>
<a href="https://wa.me/17062481811" style="background: linear-gradient(135deg, #25D366 0%, #128C7E 100%); color: white; padding: 12px 24px; border-radius: 25px; text-decoration: none; display: inline-block; margin-top: 12px; font-weight: 600; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3); transition: all 0.3s ease;">
π± Contact CBL on WhatsApp
</a>
</div>
</div>
<!-- Footer WhatsApp Group -->
<div class="footer-whatsapp-group">
<h3>π± Join Our Exclusive WhatsApp Group</h3>
<p>Get access to premium tools, updates, and financial insights</p>
<a href="https://chat.whatsapp.com/ER9UwcNHhFRCaUSZgvXJx9" class="footer-whatsapp-group-btn" target="_blank">
Join Group Now
</a>
</div>
<!-- Auth Content -->
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='%23e2e8f0'/%3E%3Ctext x='50' y='55' text-anchor='middle' font-size='20' fill='%23666'%3Eπ€%3C/text%3E%3C/svg%3E" id="profile-pic-display" class="hidden" alt="Profile Picture">
<div class="welcome-msg"><p>Register or Login to access your dashboard.</p></div>
<input type="text" id="username" placeholder="Username">
<input type="password" id="password" placeholder="Password">
<button onclick="register()">Register</button>
<button onclick="login()">Login</button>
</div>
<!-- Dashboard Section -->
<div class="container hidden" id="dashboard">
<h2>Welcome, <span id="user-name"></span> π</h2>
<img id="dashboard-pic" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='%23e2e8f0'/%3E%3Ctext x='50' y='55' text-anchor='middle' font-size='20' fill='%23666'%3Eπ€%3C/text%3E%3C/svg%3E" alt="Profile Picture" style="border-radius: 50%; width: 100px; height: 100px; margin-bottom: 10px;">
<!-- Balance Section -->
<div class="balance-section">
<div class="balance-label">Your Balance</div>
<div class="balance-amount" id="balance-display">$0.00</div>
<div class="balance-actions">
<button class="balance-btn" onclick="showAddFunds()">π° Add Funds</button>
<button class="balance-btn" onclick="showBalanceSettings()">βοΈ Settings</button>
</div>
</div>
<!-- Financial Insights -->
<div class="chart-container">
<div class="chart-title">Monthly Spending</div>
<div class="chart" id="spending-chart">
<!-- Chart bars will be generated by JS -->
</div>
</div>
<div class="nav">
<button onclick="showTransfer()">πΈ Transfer</button>
<button onclick="showHistory()">π History</button>
<button onclick="showSettings()">βοΈ Settings</button>
<button onclick="logout()">πͺ Logout</button>
</div>
<!-- Transfer Section -->
<div id="transfer">
<h3>π° Make a Transfer</h3>
<input type="text" id="sender-name" placeholder="Sender Name">
<input type="text" id="acc-number" placeholder="Recipient Account Number">
<input type="text" id="acc-name" placeholder="Recipient Account Name">
<input type="text" id="bank-name" placeholder="Bank Name">
<input type="text" id="swift-code" placeholder="SWIFT Code">
<input type="text" id="remark" placeholder="Remark / Description">
<input type="number" id="amount" placeholder="Amount">
<select id="currency">
<!-- Currencies will be populated by JavaScript -->
</select>
<select id="transaction-status">
<option value="success">β
Successful</option>
<option value="pending">β³ Pending</option>
<option value="failed">β Failed</option>
</select>
<div class="optional-field">
<label for="alert-caption">π¨ Alert Caption (Optional):</label>
<select id="alert-caption">
<option value="">None</option>
<option value="β οΈ Suspicious Transaction Detected">Suspicious Transaction</option>
<option value="π¨ High Risk Transfer">High Risk Transfer</option>
<option value="π Account Security Alert">Security Alert</option>
<option value="π° Large Transaction">Large Transaction</option>
<option value="π New Beneficiary">New Beneficiary</option>
</select>
</div>
<input type="email" id="recipient-email" placeholder="π§ Recipient Email" required>
<button onclick="submitTransfer()" id="submit-btn">π Submit Transfer</button>
<div id="email-status"></div>
<!-- Transaction warning -->
<div class="transaction-warning">
β οΈ Sending over 5 transactions in a single day can trigger system alerts and may lead to your account being banned.
</div>
</div>
<!-- History Section -->
<div id="history" class="hidden">
<h3>π Transaction History</h3>
<div id="history-list"></div>
</div>
<!-- Settings Section -->
<div id="settings" class="hidden">
<h3>βοΈ Settings</h3>
<input type="file" id="profile-pic" onchange="uploadProfilePic()">
<!-- Loan Calculator -->
<div class="calculator-container">
<h4>π Loan Calculator</h4>
<input type="number" id="loan-amount" placeholder="Loan Amount" value="1000">
<input type="number" id="interest-rate" placeholder="Interest Rate (%)" value="5">
<input type="number" id="loan-term" placeholder="Term (months)" value="12">
<button onclick="calculateLoan()">Calculate</button>
<div class="calculator-result" id="loan-result">Monthly Payment: $0.00</div>
</div>
<button onclick="deleteAccount()">ποΈ Delete Account</button>
<button onclick="borrowLoan()">π° Borrow Loan</button>
<div class="whatsapp-link">
<a href="https://wa.me/17062948306" target="_blank">π± Contact us on WhatsApp</a>
</div>
<!-- Developer Contact Section -->
<div class="developer-contact">
<h4>π§ Developer Support</h4>
<p><strong>CBL</strong></p>
<p>Need technical assistance or custom features?</p>
<a href="https://wa.me/17062481811" target="_blank" class="whatsapp-support">
π± WhatsApp Developer: +1 (706) 248-1811
</a>
</div>
</div>
<!-- Receipt Section -->
<div id="receipt" class="hidden">
<h3>π§Ύ Transaction Receipt</h3>
<div class="receipt-card" id="receipt-card">
<div class="receipt-header">
<div class="receipt-logo">π¦ TrustNet Bank</div>
<p class="receipt-subtitle">Transaction Receipt</p>
</div>
<div class="receipt-amount" id="receipt-amount">$0.00</div>
<div id="receipt-status-container"></div>
<div id="alert-caption-display"></div>
<div class="transaction-details">
<div class="detail-row">
<span class="detail-label">Transaction ID:</span>
<span class="detail-value" id="transaction-id">TN12345678</span>
</div>
<div class="detail-row">
<span class="detail-label">Sender Name:</span>
<span class="detail-value" id="sender-name-display">John Doe</span>
</div>
<div class="detail-row">
<span class="detail-label">Sender Account:</span>
<span class="detail-value" id="sender-account-display">1234567890</span>
</div>
<div class="detail-row">
<span class="detail-label">Recipient Name:</span>
<span class="detail-value" id="recipient-name-display">Jane Smith</span>
</div>
<div class="detail-row">
<span class="detail-label">Recipient Account:</span>
<span class="detail-value" id="recipient-account-display">0987654321</span>
</div>
<div class="detail-row">
<span class="detail-label">Bank Name:</span>
<span class="detail-value" id="bank-name-display">TrustNet Bank</span>
</div>
<div class="detail-row">
<span class="detail-label">SWIFT Code:</span>
<span class="detail-value" id="swift-code-display">TRUSTNGB</span>
</div>
<div class="detail-row">
<span class="detail-label">Remark:</span>
<span class="detail-value" id="remark-display">Trust Net Bank Transfer</span>
</div>
<div class="detail-row">
<span class="detail-label">Date & Time:</span>
<span class="detail-value" id="date-time-display">May 15, 2023, 14:30</span>
</div>
</div>
<div class="receipt-buttons">
<button onclick="downloadReceipt()">β¬οΈ Download</button>
<button onclick="shareReceipt()">βοΈ Share</button>
</div>
</div>
</div>
<!-- Footer WhatsApp Group -->
<div class="footer-whatsapp-group">
<h3>π± Join Our Exclusive WhatsApp Group</h3>
<p>Get access to premium tools, updates, and financial insights</p>
<a href="https://chat.whatsapp.com/ER9UwcNHhFRCaUSZgvXJx9" class="footer-whatsapp-group-btn" target="_blank">
Join Group Now
</a>
</div>
</div>
<!-- Modals -->
<div id="addFundsModal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeAddFunds()">×</span>
<h3>π° Add Funds to Account</h3>
<input type="number" id="fund-amount" placeholder="Amount" min="1">
<select id="fund-currency">
<!-- Currencies will be populated by JavaScript -->
</select>
<button onclick="addFunds()">π³ Add Funds</button>
</div>
</div>
<div id="balanceSettingsModal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeBalanceSettings()">×</span>
<h3>βοΈ Balance Settings</h3>
<label for="default-currency">Default Currency:</label>
<select id="default-currency">
<!-- Currencies will be populated by JavaScript -->
</select>
<button onclick="saveBalanceSettings()">πΎ Save Settings</button>
</div>
</div>
<!-- Success Animation Placeholder -->
<div id="success-animation-container"></div>
<!-- EmailJS SDK -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@emailjs/browser@4/dist/email.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js"></script>
<script>
// EmailJS Configuration
const EMAILJS_CONFIG = {
publicKey: 'wCZKkZhNFcmUjA5XG',
serviceId: 'service_v4mc8iq',
templateId: 'template_uypjmqi'
};
// Initialize EmailJS
(function() {
emailjs.init(EMAILJS_CONFIG.publicKey);
})();
// Define 50+ popular currencies including Korean Won
const currencies = [
{ code: "USD", symbol: "$", name: "US Dollar" },
{ code: "EUR", symbol: "β¬", name: "Euro" },
{ code: "GBP", symbol: "Β£", name: "British Pound" },
{ code: "JPY", symbol: "Β₯", name: "Japanese Yen" },
{ code: "KRW", symbol: "β©", name: "Korean Won" },
{ code: "AUD", symbol: "A$", name: "Australian Dollar" },
{ code: "CAD", symbol: "C$", name: "Canadian Dollar" },
{ code: "CHF", symbol: "Fr", name: "Swiss Franc" },
{ code: "CNY", symbol: "Β₯", name: "Chinese Yuan" },
{ code: "INR", symbol: "βΉ", name: "Indian Rupee" },
{ code: "MXN", symbol: "$", name: "Mexican Peso" },
{ code: "BRL", symbol: "R$", name: "Brazilian Real" },
{ code: "RUB", symbol: "β½", name: "Russian Ruble" },
{ code: "SGD", symbol: "S$", name: "Singapore Dollar" },
{ code: "HKD", symbol: "HK$", name: "Hong Kong Dollar" },
{ code: "NZD", symbol: "NZ$", name: "New Zealand Dollar" },
{ code: "SEK", symbol: "kr", name: "Swedish Krona" },
{ code: "NOK", symbol: "kr", name: "Norwegian Krone" },
{ code: "TRY", symbol: "βΊ", name: "Turkish Lira" },
{ code: "ZAR", symbol: "R", name: "South African Rand" },
{ code: "AED", symbol: "Ψ―.Ψ₯", name: "UAE Dirham" },
{ code: "SAR", symbol: "ο·Ό", name: "Saudi Riyal" },
{ code: "THB", symbol: "ΰΈΏ", name: "Thai Baht" },
{ code: "PLN", symbol: "zΕ", name: "Polish ZΕoty" },
{ code: "IDR", symbol: "Rp", name: "Indonesian Rupiah" },
{ code: "HUF", symbol: "Ft", name: "Hungarian Forint" },
{ code: "CZK", symbol: "KΔ", name: "Czech Koruna" },
{ code: "ILS", symbol: "βͺ", name: "Israeli Shekel" },
{ code: "CLP", symbol: "$", name: "Chilean Peso" },
{ code: "PHP", symbol: "β±", name: "Philippine Peso" },
{ code: "DKK", symbol: "kr", name: "Danish Krone" },
{ code: "MYR", symbol: "RM", name: "Malaysian Ringgit" },
{ code: "RON", symbol: "lei", name: "Romanian Leu" },
{ code: "TWD", symbol: "NT$", name: "New Taiwan Dollar" },
{ code: "EGP", symbol: "EΒ£", name: "Egyptian Pound" },
{ code: "PKR", symbol: "β¨", name: "Pakistani Rupee" },
{ code: "COP", symbol: "$", name: "Colombian Peso" },
{ code: "VND", symbol: "β«", name: "Vietnamese Dong" },
{ code: "BDT", symbol: "ΰ§³", name: "Bangladeshi Taka" },
{ code: "ARS", symbol: "$", name: "Argentine Peso" },
{ code: "UAH", symbol: "β΄", name: "Ukrainian Hryvnia" },
{ code: "PEN", symbol: "S/", name: "Peruvian Sol" },
{ code: "QAR", symbol: "ο·Ό", name: "Qatari Riyal" },
{ code: "KWD", symbol: "Ψ―.Ω", name: "Kuwaiti Dinar" },
{ code: "OMR", symbol: "ο·Ό", name: "Omani Rial" },
{ code: "BHD", symbol: ".Ψ―.Ψ¨", name: "Bahraini Dinar" },
{ code: "JOD", symbol: "Ψ―.Ψ§", name: "Jordanian Dinar" },
{ code: "LKR", symbol: "β¨", name: "Sri Lankan Rupee" },
{ code: "NGN", symbol: "β¦", name: "Nigerian Naira" }
];
// Populate currency dropdowns
function populateCurrencies() {
const transferCurrency = document.getElementById('currency');
const fundCurrency = document.getElementById('fund-currency');
const defaultCurrency = document.getElementById('default-currency');
currencies.forEach(currency => {
const option = document.createElement('option');
option.value = currency.symbol;
option.textContent = `${currency.code} (${currency.symbol}) - ${currency.name}`;
transferCurrency.appendChild(option.cloneNode(true));
fundCurrency.appendChild(option.cloneNode(true));
defaultCurrency.appendChild(option.cloneNode(true));
});
}
let user = localStorage.getItem('user');
let currentTransaction = null;
// Initialize user data
if (user) {
document.getElementById('auth').classList.add('hidden');
document.getElementById('dashboard').classList.remove('hidden');
document.getElementById('user-name').innerText = user;
document.getElementById('dashboard-pic').src = localStorage.getItem('profilePic') || 'data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'100\' height=\'100\' viewBox=\'0 0 100 100\'%3E%3Ccircle cx=\'50\' cy=\'50\' r=\'40\' fill=\'%23e2e8f0\'/%3E%3Ctext x=\'50\' y=\'55\' text-anchor=\'middle\' font-size=\'20\' fill=\'%23666\'%3Eπ€%3C/text%3E%3C/svg%3E';
updateBalanceDisplay();
generateSpendingChart();
}
// Populate currencies on page load
document.addEventListener('DOMContentLoaded', function() {
populateCurrencies();
document.getElementById('username').focus();
});
// Generate unique sender account number
function generateSenderAccount() {
const user = localStorage.getItem('user');
if (!user) return '1234567890';
let senderAccount = localStorage.getItem('senderAccount');
if (!senderAccount) {
// Generate unique 10-digit account number
senderAccount = '2' + Math.floor(Math.random() * 900000000) + Math.floor(Math.random() * 99);
localStorage.setItem('senderAccount', senderAccount);
}
return senderAccount;
}
// Balance Management
function updateBalanceDisplay() {
const balance = parseFloat(localStorage.getItem('balance') || '0');
const currency = localStorage.getItem('defaultCurrency') || '$';
document.getElementById('balance-display').textContent = currency + balance.toFixed(2);
}
function showAddFunds() {
document.getElementById('addFundsModal').style.display = 'block';
}
function closeAddFunds() {
document.getElementById('addFundsModal').style.display = 'none';
}
function addFunds() {
const amount = parseFloat(document.getElementById('fund-amount').value);
const currency = document.getElementById('fund-currency').value;
if (amount && amount > 0) {
const currentBalance = parseFloat(localStorage.getItem('balance') || '0');
const newBalance = currentBalance + amount;
localStorage.setItem('balance', newBalance.toString());
localStorage.setItem('defaultCurrency', currency);
updateBalanceDisplay();
closeAddFunds();
// Clear input
document.getElementById('fund-amount').value = '';
// Show success message
showSuccessAnimation('π° Funds Added Successfully! ππποΈ');
} else {
alert('Please enter a valid amount');
}
}
function showBalanceSettings() {
document.getElementById('balanceSettingsModal').style.display = 'block';
document.getElementById('default-currency').value = localStorage.getItem('defaultCurrency') || '$';
}
function closeBalanceSettings() {
document.getElementById('balanceSettingsModal').style.display = 'none';
}
function saveBalanceSettings() {
const currency = document.getElementById('default-currency').value;
localStorage.setItem('defaultCurrency', currency);
updateBalanceDisplay();
closeBalanceSettings();
alert('Settings saved successfully!');
}
// Success Animation with Sound
function showSuccessAnimation(message) {
const animation = document.createElement('div');
animation.className = 'success-animation';
animation.innerHTML = message;
document.getElementById('success-animation-container').appendChild(animation);
// Play success sound
playSuccessSound();
setTimeout(() => {
if (document.getElementById('success-animation-container').contains(animation)) {
document.getElementById('success-animation-container').removeChild(animation);
}
}, 3000);
}
function playSuccessSound() {
try {
// Create audio context for success sound
const audioContext = new (window.AudioContext || window.webkitAudioContext)();
const oscillator = audioContext.createOscillator();
const gainNode = audioContext.createGain();
oscillator.connect(gainNode);
gainNode.connect(audioContext.destination);
oscillator.frequency.setValueAtTime(800, audioContext.currentTime);
oscillator.frequency.setValueAtTime(1000, audioContext.currentTime + 0.1);
oscillator.frequency.setValueAtTime(1200, audioContext.currentTime + 0.2);
gainNode.gain.setValueAtTime(0.3, audioContext.currentTime);
gainNode.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.5);
oscillator.start(audioContext.currentTime);
oscillator.stop(audioContext.currentTime + 0.5);
} catch (error) {
console.log('Audio not supported');
}
}
function register() {
const username = document.getElementById('username').value.trim();
const password = document.getElementById('password').value.trim();
if (username && password) {
localStorage.setItem('user', username);
localStorage.setItem('password', password);
localStorage.setItem('balance', '0');
localStorage.setItem('defaultCurrency', '$');
location.reload();
} else {
alert('Please enter both username and password!');
}
}
function login() {
const username = document.getElementById('username').value.trim();
const password = document.getElementById('password').value.trim();
const savedUser = localStorage.getItem('user');
const savedPassword = localStorage.getItem('password');
if (savedUser && savedPassword && savedUser === username && savedPassword === password) {
document.getElementById('auth').classList.add('hidden');
document.getElementById('dashboard').classList.remove('hidden');
document.getElementById('user-name').innerText = savedUser;
document.getElementById('dashboard-pic').src = localStorage.getItem('profilePic') || 'data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'100\' height=\'100\' viewBox=\'0 0 100 100\'%3E%3Ccircle cx=\'50\' cy=\'50\' r=\'40\' fill=\'%23e2e8f0\'/%3E%3Ctext x=\'50\' y=\'55\' text-anchor=\'middle\' font-size=\'20\' fill=\'%23666\'%3Eπ€%3C/text%3E%3C/svg%3E';
updateBalanceDisplay();
generateSpendingChart();
} else {
alert('Invalid username or password. Please register if you don\'t have an account.');
}
}
function uploadProfilePic() {
const file = document.getElementById('profile-pic').files[0];
const reader = new FileReader();
reader.onloadend = function() {
localStorage.setItem('profilePic', reader.result);
document.getElementById('dashboard-pic').src = reader.result;
};
if (file) reader.readAsDataURL(file);
}
function logout() {
localStorage.removeItem('user');
localStorage.removeItem('password');
localStorage.removeItem('profilePic');
location.reload();
}
function showTransfer() {
document.getElementById('transfer').classList.remove('hidden');
document.getElementById('history').classList.add('hidden');
document.getElementById('settings').classList.add('hidden');
document.getElementById('receipt').classList.add('hidden');
}
function showHistory() {
document.getElementById('transfer').classList.add('hidden');
document.getElementById('history').classList.remove('hidden');
document.getElementById('settings').classList.add('hidden');
document.getElementById('receipt').classList.add('hidden');
let history = JSON.parse(localStorage.getItem('history')) || [];
let historyHTML = '';
if (history.length === 0) {
historyHTML = '<p style="text-align: center; color: #666; padding: 40px;">No transaction history yet. π</p>';
} else {
history.forEach((transaction, index) => {
const alertCaptionHTML = transaction.alertCaption ?
`<div class="alert-caption">${transaction.alertCaption}</div>` : '';
let statusClass, statusText;
if (transaction.status === 'success') {
statusClass = 'status-successful';
statusText = 'Successful';
} else if (transaction.status === 'pending') {
statusClass = 'status-pending';
statusText = 'Pending';
} else if (transaction.status === 'failed') {
statusClass = 'status-failed';
statusText = 'Failed';
}
historyHTML += `
<div class="history-item receipt-card">
<div class="receipt-header">
<div class="receipt-logo">π¦ TrustNet Bank</div>
<p class="receipt-subtitle">Transaction Receipt</p>
</div>
<div class="receipt-amount">${transaction.currency}${transaction.amount}</div>
<div class="${statusClass}">${statusText}</div>
${alertCaptionHTML}
<div class="transaction-details">
<div class="detail-row">
<span class="detail-label">Transaction ID:</span>
<span class="detail-value">${transaction.transferId}</span>
</div>
<div class="detail-row">
<span class="detail-label">Recipient:</span>
<span class="detail-value">${transaction.accName}</span>
</div>
<div class="detail-row">
<span class="detail-label">Date:</span>
<span class="detail-value">${transaction.date}</span>
</div>
</div>
<div style="text-align: center; margin-top: 15px;">
<button onclick="viewTransactionDetails(${index})" style="width: 100%; background: linear-gradient(135deg, #0a3e80 0%, #1e5aa8 100%); padding: 10px;">ποΈ View Full Receipt</button>
</div>
</div>`;
});
}
document.getElementById('history-list').innerHTML = historyHTML;
}
function viewTransactionDetails(index) {
let history = JSON.parse(localStorage.getItem('history')) || [];
if (index >= 0 && index < history.length) {
const transaction = history[index];
showTransactionReceipt(transaction);
}
}
function showTransactionReceipt(transaction) {
document.getElementById('transfer').classList.add('hidden');
document.getElementById('history').classList.add('hidden');
document.getElementById('settings').classList.add('hidden');
document.getElementById('receipt').classList.remove('hidden');
// Populate receipt data
document.getElementById('receipt-amount').innerText = transaction.currency + transaction.amount;
// Set status with proper class
const statusContainer = document.getElementById('receipt-status-container');
let statusClass, statusText;
if (transaction.status === 'success') {
statusClass = 'status-successful';
statusText = 'Successful';
} else if (transaction.status === 'pending') {
statusClass = 'status-pending';
statusText = 'Pending';
} else if (transaction.status === 'failed') {
statusClass = 'status-failed';
statusText = 'Failed';
}
statusContainer.innerHTML = `<div class="${statusClass}">${statusText}</div>`;
document.getElementById('transaction-id').innerText = transaction.transferId;
document.getElementById('sender-name-display').innerText = transaction.senderName;
document.getElementById('sender-account-display').innerText = transaction.senderAccount;
document.getElementById('recipient-name-display').innerText = transaction.accName;
document.getElementById('recipient-account-display').innerText = transaction.accNumber;
document.getElementById('bank-name-display').innerText = transaction.bankName;
document.getElementById('swift-code-display').innerText = transaction.swiftCode;
document.getElementById('remark-display').innerText = transaction.remark || '';
document.getElementById('date-time-display').innerText = transaction.date;
// Display alert caption if present
const alertCaptionDisplay = document.getElementById('alert-caption-display');
if (transaction.alertCaption) {
alertCaptionDisplay.innerHTML = `<div class="alert-caption">${transaction.alertCaption}</div>`;
} else {
alertCaptionDisplay.innerHTML = '';
}
currentTransaction = transaction;
}
function showSettings() {
document.getElementById('settings').classList.remove('hidden');
document.getElementById('transfer').classList.add('hidden');
document.getElementById('history').classList.add('hidden');
document.getElementById('receipt').classList.add('hidden');
}
// Enhanced function to send email notification
async function sendEmailNotification(transactionData) {
try {
const emailParams = {
name: transactionData.accName,
acc_number: transactionData.accNumber,
bank_name: transactionData.bankName,
swift: transactionData.swiftCode,
currency: transactionData.currency,
amount: transactionData.amount,
transactionNo: transactionData.transferId,
date_time: transactionData.date,
to_email: transactionData.recipientEmail,
sender_name: transactionData.senderName,
remark: transactionData.remark || 'Trust Net Bank Transfer',
alert_caption: transactionData.alertCaption || ''
};
console.log('Sending email with params:', emailParams);
const response = await emailjs.send(
EMAILJS_CONFIG.serviceId,
EMAILJS_CONFIG.templateId,
emailParams
);
console.log('Email sent successfully:', response);
return { success: true, response };
} catch (error) {
console.error('Email sending failed:', error);
return { success: false, error };
}
}
// Enhanced submit transfer function with email integration
async function submitTransfer() {
// Validate required fields
const requiredFields = [
'sender-name', 'acc-number', 'acc-name', 'bank-name',
'swift-code', 'amount', 'recipient-email'
];
for (let fieldId of requiredFields) {
const field = document.getElementById(fieldId);
if (!field.value.trim()) {
alert(`Please fill in the ${fieldId.replace('-', ' ')}`);
field.focus();
return;
}
}
// Validate email format
const email = document.getElementById('recipient-email').value;
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(email)) {
alert('Please enter a valid email address');
document.getElementById('recipient-email').focus();
return;
}
// Show loading state
const submitBtn = document.getElementById('submit-btn');
const emailStatus = document.getElementById('email-status');
submitBtn.classList.add('loading');
submitBtn.textContent = 'β³ Processing Transfer...';
submitBtn.disabled = true;
const data = {
senderName: document.getElementById('sender-name').value,
senderAccount: generateSenderAccount(),
accNumber: document.getElementById('acc-number').value,
accName: document.getElementById('acc-name').value,
bankName: document.getElementById('bank-name').value,
swiftCode: document.getElementById('swift-code').value,
remark: document.getElementById('remark').value || 'Trust Net Bank Transfer',
amount: document.getElementById('amount').value,
currency: document.getElementById('currency').value,
status: document.getElementById('transaction-status').value,
alertCaption: document.getElementById('alert-caption').value,
date: new Date().toLocaleString(),
transferId: 'TN' + Math.floor(Math.random() * 1000000000),
recipientEmail: document.getElementById('recipient-email').value
};
try {
// Save transaction to history
let history = JSON.parse(localStorage.getItem('history')) || [];
history.push(data);
localStorage.setItem('history', JSON.stringify(history));
// Send email notification
emailStatus.innerHTML = '<div class="email-status">π§ Sending email notification...</div>';
const emailResult = await sendEmailNotification(data);
if (emailResult.success) {
emailStatus.innerHTML = '<div class="email-status email-success">β
Email notification sent successfully!</div>';
} else {
emailStatus.innerHTML = '<div class="email-status email-error">β οΈ Transfer completed but email notification failed. Please contact support.</div>';
console.error('Email error:', emailResult.error);
}
// Update balance display
updateBalanceDisplay();
// Show transaction receipt
showTransactionReceipt(data);
// Show success animation with sound
showSuccessAnimation('π Transaction Successful! πποΈ');
// Clear form fields
document.getElementById('sender-name').value = '';
document.getElementById('acc-number').value = '';
document.getElementById('acc-name').value = '';
document.getElementById('bank-name').value = '';
document.getElementById('swift-code').value = '';
document.getElementById('remark').value = '';
document.getElementById('amount').value = '';
document.getElementById('alert-caption').value = '';
document.getElementById('recipient-email').value = '';
// Optional: Send to backend if you have one
try {
await fetch("/submit_transfer", {
method: "POST",
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({...data, emailSent: emailResult.success})
});
} catch (backendError) {
console.log('Backend submission failed (optional):', backendError);
}
} catch (error) {
console.error('Transfer submission error:', error);
emailStatus.innerHTML = '<div class="email-status email-error">β Transfer failed. Please try again.</div>';
} finally {
// Reset button state
submitBtn.classList.remove('loading');
submitBtn.textContent = 'π Submit Transfer';
submitBtn.disabled = false;
// Clear status after 5 seconds
setTimeout(() => {
emailStatus.innerHTML = '';
}, 5000);
}
}
function deleteAccount() {
if (confirm('Are you sure you want to delete your account? This cannot be undone.')) {
localStorage.clear();
alert('Account deleted.');
location.reload();
}
}
function borrowLoan() {
alert('π° Loan feature coming soon. Stay tuned!');
}
function downloadReceipt() {
if (!currentTransaction) {
alert('No receipt to download');
return;
}
html2canvas(document.querySelector("#receipt-card")).then(canvas => {
const link = document.createElement('a');
link.download = `trustnet-bank-receipt-${currentTransaction.transferId}.png`;
link.href = canvas.toDataURL();
link.click();
}).catch(error => {
console.error('Download failed:', error);
alert('Download failed. Please try again.');
});
}
function shareReceipt() {
if (!currentTransaction) {
alert('No receipt to share');
return;
}
if (navigator.share) {
html2canvas(document.querySelector("#receipt-card")).then(canvas => {
canvas.toBlob(blob => {
const file = new File([blob], `trustnet-receipt-${currentTransaction.transferId}.png`, { type: 'image/png' });
navigator.share({
title: 'TrustNet Bank Receipt',
text: `Transaction Receipt - ${currentTransaction.currency}${currentTransaction.amount}`,
files: [file]
});
});
});
} else {
// Fallback for browsers that don't support Web Share API
const receiptText = `π¦ TrustNet Bank Receiptπ° Amount: ${currentTransaction.currency}${currentTransaction.amount}π€ From: ${currentTransaction.senderName}π€ To: ${currentTransaction.accName}ποΈ Bank: ${currentTransaction.bankName}π
Date: ${currentTransaction.date}π Transaction ID: ${currentTransaction.transferId}
`;
if (navigator.clipboard) {
navigator.clipboard.writeText(receiptText).then(() => {
alert('Receipt details copied to clipboard!');
});
} else {
alert('Sharing not supported on this device');
}
}
}
// Generate spending chart
function generateSpendingChart() {
const chartContainer = document.getElementById('spending-chart');
chartContainer.innerHTML = '';
const categories = ['Food', 'Shopping', 'Bills', 'Entertainment', 'Transport'];
const amounts = [120, 200, 150, 80, 60];
const maxAmount = Math.max(...amounts);
categories.forEach((category, index) => {
const barHeight = (amounts[index] / maxAmount) * 150;
const bar = document.createElement('div');
bar.className = 'chart-bar';
bar.style.height = `${barHeight}px`;
const label = document.createElement('div');
label.className = 'chart-bar-label';
label.textContent = category;
const value = document.createElement('div');
value.className = 'chart-bar-value';
value.textContent = `$${amounts[index]}`;
value.style.position = 'absolute';
value.style.top = `-25px`;
value.style.left = '0';
value.style.width = '100%';
value.style.textAlign = 'center';
value.style.fontSize = '12px';
value.style.color = '#0a3e80';
value.style.fontWeight = '600';
bar.appendChild(value);
bar.appendChild(label);
chartContainer.appendChild(bar);
// Animate the bar
setTimeout(() => {
bar.style.height = `${barHeight}px`;
}, index * 200);
});
}
// Loan calculator
function calculateLoan() {
const amount = parseFloat(document.getElementById('loan-amount').value);
const interestRate = parseFloat(document.getElementById('interest-rate').value);
const term = parseFloat(document.getElementById('loan-term').value);
if (!amount || !interestRate || !term) {
document.getElementById('loan-result').textContent = 'Please fill all fields';
return;
}
const monthlyInterestRate = interestRate / 100 / 12;
const monthlyPayment = (amount * monthlyInterestRate) /
(1 - Math.pow(1 + monthlyInterestRate, -term));
if (isNaN(monthlyPayment)) {
document.getElementById('loan-result').textContent = 'Invalid calculation';
return;
}
document.getElementById('loan-result').textContent =
`Monthly Payment: $${monthlyPayment.toFixed(2)}`;
}
// Close modals when clicking outside
window.onclick = function(event) {
const addFundsModal = document.getElementById('addFundsModal');
const balanceSettingsModal = document.getElementById('balanceSettingsModal');
if (event.target == addFundsModal) {
closeAddFunds();
}
if (event.target == balanceSettingsModal) {
closeBalanceSettings();
}
}
</script>
</body>
</html> |