Spaces:
Running
Running
File size: 69,123 Bytes
27ea911 d77937c ff55f5d 27ea911 9679556 ff55f5d 9679556 ff55f5d 27ea911 d77937c 6c2cf63 27ea911 6c2cf63 27ea911 84c7534 27ea911 fc114ad 27ea911 8e09cd3 6c2cf63 8e09cd3 27ea911 fc114ad 27ea911 fc114ad 27ea911 fc114ad 27ea911 6c2cf63 27ea911 6c2cf63 27ea911 6c2cf63 27ea911 6c2cf63 27ea911 6c2cf63 27ea911 d77937c 6c2cf63 27ea911 6c2cf63 27ea911 8e09cd3 6c2cf63 8e09cd3 27ea911 d2cb970 27ea911 d2cb970 27ea911 d2cb970 27ea911 d2cb970 d77937c d2cb970 d77937c d2cb970 d77937c d2cb970 d77937c d2cb970 d77937c d2cb970 d77937c d2cb970 d77937c d2cb970 d77937c d2cb970 d77937c d2cb970 d77937c d2cb970 d77937c d2cb970 84c7534 d2cb970 d77937c d2cb970 d77937c 6c2cf63 9679556 ff55f5d 9679556 ff55f5d 6c2cf63 9679556 ff55f5d 6c2cf63 d2cb970 d77937c d2cb970 9679556 d2cb970 8e09cd3 6c2cf63 9679556 6c2cf63 d2cb970 8e09cd3 6c2cf63 9679556 6c2cf63 d2cb970 d77937c d2cb970 d77937c d2cb970 fc114ad 8e09cd3 6c2cf63 8e09cd3 6c2cf63 8e09cd3 6c2cf63 ff55f5d 9679556 ff55f5d 6c2cf63 ff55f5d 6c2cf63 9679556 6c2cf63 9679556 d2cb970 8e09cd3 d2cb970 9679556 d2cb970 9679556 d2cb970 9679556 d2cb970 6c2cf63 d2cb970 9679556 d2cb970 9679556 d2cb970 9679556 d2cb970 8e09cd3 d2cb970 8e09cd3 6c2cf63 9679556 8e09cd3 9679556 8e09cd3 9679556 8e09cd3 9679556 8e09cd3 9679556 8e09cd3 9679556 8e09cd3 6c2cf63 9679556 6c2cf63 8e09cd3 9679556 8e09cd3 9679556 8e09cd3 9679556 8e09cd3 9679556 8e09cd3 9679556 8e09cd3 d2cb970 869a060 d2cb970 9679556 d2cb970 d77937c d2cb970 6c2cf63 d2cb970 27ea911 |
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 |
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SpySmartAI - Monitoramento de Concorrentes</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://js.stripe.com/v3/"></script>
<script src="https://assets.pagar.me/checkout/1.1.0/checkout.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@600&family=Inter:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
body {
font-family: 'Inter', sans-serif;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
background-attachment: fixed;
color: #ffffff;
}
.gradient-bg {
background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
}
.card-glass {
background: rgba(255, 255, 255, 0.08);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.card-shadow {
box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.3);
}
#data-visualization {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.7;
}
h1, h2, h3 {
font-family: 'Poppins', sans-serif;
}
.typing-cursor {
display: inline-block;
width: 10px;
height: 24px;
background: #a777e3;
margin-left: 4px;
animation: blink 1s infinite;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
.data-node {
position: absolute;
border-radius: 50%;
background: rgba(167, 119, 227, 0.6);
box-shadow: 0 0 20px rgba(167, 119, 227, 0.6);
}
.data-connection {
position: absolute;
height: 1px;
background: rgba(167, 119, 227, 0.4);
}
.social-icon {
transition: all 0.3s ease;
}
.social-icon:hover {
transform: translateY(-3px);
}
.plan-card {
transition: all 0.3s ease;
}
.plan-card:hover {
transform: translateY(-10px);
}
.feature-icon {
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 12px;
margin-bottom: 1rem;
}
.add-competitor-btn {
transition: all 0.3s ease;
box-shadow: 0 0 20px rgba(167, 119, 227, 0.7);
}
.add-competitor-btn:hover {
transform: scale(1.05);
box-shadow: 0 0 30px rgba(167, 119, 227, 0.9);
}
.video-container {
position: relative;
border-radius: 16px;
overflow: hidden;
}
.video-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
}
.video-overlay:hover {
background: rgba(0, 0, 0, 0.1);
}
.play-button {
width: 80px;
height: 80px;
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(5px);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.play-button:hover {
transform: scale(1.1);
background: rgba(255, 255, 255, 0.3);
}
.locked-feature {
position: relative;
filter: blur(2px);
pointer-events: none;
}
.locked-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.5);
border-radius: 12px;
z-index: 10;
}
.locked-icon {
background: rgba(255, 255, 255, 0.2);
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.login-container {
max-width: 400px;
margin: 0 auto;
padding: 2rem;
border-radius: 16px;
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.payment-method {
display: flex;
align-items: center;
padding: 1rem;
border-radius: 8px;
background: rgba(255, 255, 255, 0.05);
margin-bottom: 1rem;
cursor: pointer;
transition: all 0.3s ease;
}
.payment-method:hover {
background: rgba(255, 255, 255, 0.1);
}
.payment-method.active {
background: rgba(167, 119, 227, 0.2);
border: 1px solid rgba(167, 119, 227, 0.5);
}
.payment-icon {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 1rem;
border-radius: 6px;
}
.credit-card-form {
display: none;
}
.credit-card-form.active {
display: block;
}
.pix-form {
display: none;
}
.pix-form.active {
display: block;
}
.pagar-me-form {
display: none;
}
.pagar-me-form.active {
display: block;
}
.card-element {
padding: 12px;
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 8px;
background: rgba(255, 255, 255, 0.05);
margin-bottom: 1rem;
}
.gradient-text {
background: linear-gradient(135deg, #a777e3 0%, #6e8efb 100%);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.signup-container {
max-width: 600px;
margin: 0 auto;
padding: 2rem;
border-radius: 16px;
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.hidden {
display: none !important;
}
.upgrade-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease;
}
.upgrade-modal.active {
opacity: 1;
pointer-events: all;
}
.upgrade-content {
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
border-radius: 16px;
padding: 2rem;
max-width: 500px;
width: 90%;
border: 1px solid rgba(167, 119, 227, 0.3);
box-shadow: 0 10px 30px -15px rgba(167, 119, 227, 0.3);
}
.plan-counter {
background: rgba(167, 119, 227, 0.2);
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 0.9rem;
display: inline-block;
margin-bottom: 1rem;
}
</style>
</head>
<body class="min-h-screen">
<!-- Visualização de dados animada -->
<div id="data-visualization"></div>
<!-- Upgrade Modal -->
<div id="upgradeModal" class="upgrade-modal">
<div class="upgrade-content">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold">Upgrade Required</h3>
<button id="closeUpgradeModal" class="text-gray-400 hover:text-white">
<i class="fas fa-times"></i>
</button>
</div>
<p class="text-gray-300 mb-6" id="upgradeMessage">You've reached the limit of your current plan. Upgrade to Pro to continue using this feature.</p>
<div class="flex justify-between">
<button id="cancelUpgrade" class="bg-gray-700 text-white py-2 px-6 rounded-lg hover:bg-gray-600 transition">
Maybe Later
</button>
<button id="confirmUpgrade" class="gradient-bg text-white py-2 px-6 rounded-lg hover:opacity-90 transition">
Upgrade to Pro
</button>
</div>
</div>
</div>
<!-- Página Inicial (Landing Page) -->
<div id="landingPage" class="container mx-auto px-4 py-8">
<!-- Header -->
<header class="flex justify-between items-center py-6">
<div class="flex items-center">
<div class="w-10 h-10 rounded-full gradient-bg flex items-center justify-center mr-3">
<i class="fas fa-robot text-white"></i>
</div>
<h1 class="text-2xl font-bold">SpySmartAI</h1>
</div>
<div class="flex space-x-4">
<a href="#features" class="text-gray-300 hover:text-white">Recursos</a>
<a href="#pricing" class="text-gray-300 hover:text-white">Planos</a>
<a href="#how-it-works" class="text-gray-300 hover:text-white">Como Funciona</a>
<button id="loginBtn" class="text-white px-4 py-2 rounded-lg hover:opacity-90 transition gradient-bg">
Entrar
</button>
</div>
</header>
<!-- Hero Section -->
<section class="py-20 text-center">
<h1 class="text-5xl font-bold mb-6 max-w-3xl mx-auto">
Monitore seus concorrentes com <span id="typing-text" class="gradient-text">Inteligência Artificial</span><span class="typing-cursor"></span>
</h1>
<p class="text-xl text-gray-300 mb-10 max-w-2xl mx-auto">
Descubra estratégias, analise anúncios e acompanhe mudanças de preços automaticamente.
</p>
<div class="flex justify-center space-x-4">
<button id="startFreeTrial" class="gradient-bg text-white px-8 py-3 rounded-lg hover:opacity-90 transition font-medium">
Teste Grátis por 7 dias
</button>
<button id="watchDemo" class="bg-transparent border border-gray-600 text-white px-8 py-3 rounded-lg hover:bg-gray-800 transition font-medium flex items-center">
<i class="fas fa-play-circle mr-2"></i> Ver Demonstração
</button>
</div>
</section>
<!-- Video Demo -->
<section class="py-16">
<div class="video-container mx-auto max-w-4xl">
<img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Demo Video" class="w-full h-auto">
<div class="video-overlay">
<div class="play-button">
<i class="fas fa-play text-white text-2xl"></i>
</div>
</div>
</div>
</section>
<!-- Features -->
<section id="features" class="py-20">
<div class="text-center mb-16">
<h2 class="text-3xl font-bold mb-4">Recursos Poderosos</h2>
<p class="text-gray-300 max-w-2xl mx-auto">
Tudo que você precisa para ficar à frente da concorrência
</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div class="card-glass rounded-xl p-6 card-shadow">
<div class="feature-icon gradient-bg">
<i class="fas fa-chart-line text-white text-xl"></i>
</div>
<h3 class="text-xl font-bold mb-2">Monitoramento de Preços</h3>
<p class="text-gray-300">
Acompanhe automaticamente as mudanças de preços dos seus concorrentes e receba alertas em tempo real.
</p>
</div>
<div class="card-glass rounded-xl p-6 card-shadow">
<div class="feature-icon gradient-bg">
<i class="fas fa-ad text-white text-xl"></i>
</div>
<h3 class="text-xl font-bold mb-2">Análise de Anúncios</h3>
<p class="text-gray-300">
Descubra os anúncios que estão funcionando para seus concorrentes e identifique oportunidades.
</p>
</div>
<div class="card-glass rounded-xl p-6 card-shadow">
<div class="feature-icon gradient-bg">
<i class="fas fa-users text-white text-xl"></i>
</div>
<h3 class="text-xl font-bold mb-2">Público-Alvo</h3>
<p class="text-gray-300">
Entenda quem são os clientes dos seus concorrentes e como você pode alcançá-los melhor.
</p>
</div>
</div>
</section>
<!-- Dashboard Section (Hidden by default) -->
<section id="dashboardSection" class="py-20 hidden">
<div class="flex justify-between items-center mb-8">
<h2 class="text-2xl font-bold">Dashboard de Monitoramento</h2>
<div class="flex items-center">
<div id="planCounter" class="plan-counter mr-4">
Análises: <span id="analysisCount">0</span>/<span id="analysisLimit">0</span> (Starter)
</div>
<button id="addCompetitorBtn" class="gradient-bg text-white px-4 py-2 rounded-lg hover:opacity-90 transition">
<i class="fas fa-plus mr-2"></i> Adicionar Concorrente
</button>
</div>
</div>
<!-- Add Competitor Form -->
<div id="addCompetitorForm" class="card-glass rounded-xl p-6 mb-8 hidden">
<h3 class="text-xl font-bold mb-4">Adicionar Novo Concorrente</h3>
<form id="competitorForm">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
<div>
<label class="block text-gray-300 mb-1">Nome*</label>
<input type="text" id="competitorName" required class="w-full px-4 py-2 bg-gray-700 rounded-lg border border-gray-600">
</div>
<div>
<label class="block text-gray-300 mb-1">Site*</label>
<input type="url" id="competitorWebsite" required class="w-full px-4 py-2 bg-gray-700 rounded-lg border border-gray-600">
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
<div>
<label class="block text-gray-300 mb-1">Instagram</label>
<div class="flex">
<span class="inline-flex items-center px-3 rounded-l-lg bg-gray-600 text-gray-300">
<i class="fab fa-instagram"></i>
</span>
<input type="text" id="competitorInstagram" class="flex-1 px-4 py-2 bg-gray-700 rounded-r-lg border border-gray-600">
</div>
</div>
<div>
<label class="block text-gray-300 mb-1">Mercado Livre</label>
<div class="flex">
<span class="inline-flex items-center px-3 rounded-l-lg bg-gray-600 text-gray-300">
<i class="fas fa-store"></i>
</span>
<input type="url" id="competitorMercadoLivre" class="flex-1 px-4 py-2 bg-gray-700 rounded-r-lg border border-gray-600">
</div>
</div>
<div>
<label class="block text-gray-300 mb-1">TikTok</label>
<div class="flex">
<span class="inline-flex items-center px-3 rounded-l-lg bg-gray-600 text-gray-300">
<i class="fab fa-tiktok"></i>
</span>
<input type="text" id="competitorTikTok" class="flex-1 px-4 py-2 bg-gray-700 rounded-r-lg border border-gray-600">
</div>
</div>
</div>
<div class="mb-4">
<label class="block text-gray-300 mb-1">Tipo de Análise*</label>
<select id="analysisType" class="w-full px-4 py-2 bg-gray-700 rounded-lg border border-gray-600">
<option value="pricing">Preços</option>
<option value="content">Conteúdo</option>
<option value="traffic">Tráfego Pago</option>
<option value="complete">Análise Completa</option>
</select>
</div>
<div class="mb-4">
<label class="block text-gray-300 mb-1">Observações</label>
<textarea id="competitorNotes" rows="3" class="w-full px-4 py-2 bg-gray-700 rounded-lg border border-gray-600"></textarea>
</div>
<div class="flex justify-end space-x-3">
<button type="button" id="cancelAddCompetitor" class="bg-gray-700 text-white py-2 px-6 rounded-lg hover:bg-gray-600 transition">
Cancelar
</button>
<button type="submit" class="gradient-bg text-white py-2 px-6 rounded-lg hover:opacity-90 transition">
Iniciar Monitoramento
</button>
</div>
</form>
</div>
<!-- Competitors List -->
<div class="card-glass rounded-xl p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Concorrentes Monitorados</h3>
<div class="overflow-x-auto">
<table class="w-full">
<thead>
<tr class="text-left border-b border-gray-700">
<th class="pb-3">Nome</th>
<th class="pb-3">Site</th>
<th class="pb-3">Tipo de Análise</th>
<th class="pb-3">Última Atualização</th>
<th class="pb-3">Status</th>
<th class="pb-3">Ações</th>
</tr>
</thead>
<tbody id="competitorsList">
<!-- Competitors will be loaded here -->
</tbody>
</table>
</div>
</div>
<!-- AI Analysis Report -->
<div class="card-glass rounded-xl p-6 mb-8">
<h3 class="text-xl font-bold mb-4">Última Análise: <span id="currentCompetitor">Loja Exemplo</span></h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
<div class="bg-gray-700 bg-opacity-50 rounded-lg p-4">
<h4 class="font-bold text-purple-300 mb-2">Estratégias Detectadas</h4>
<ul id="detectedStrategies" class="list-disc list-inside text-sm text-gray-300 space-y-1">
<li>Promoções relâmpago às quartas-feiras</li>
<li>Uso intensivo de anúncios no Instagram</li>
<li>Preços dinâmicos baseados em concorrência</li>
</ul>
</div>
<div class="bg-gray-700 bg-opacity-50 rounded-lg p-4">
<h4 class="font-bold text-purple-300 mb-2">Pontos Fortes</h4>
<ul id="strengthsList" class="list-disc list-inside text-sm text-gray-300 space-y-1">
<li>Fotos de produtos em alta qualidade</li>
<li>Atendimento rápido via WhatsApp</li>
<li>Frete grátis acima de R$ 150</li>
</ul>
</div>
<div class="bg-gray-700 bg-opacity-50 rounded-lg p-4">
<h4 class="font-bold text-purple-300 mb-2">Sugestões</h4>
<ul id="suggestionsList" class="list-disc list-inside text-sm text-gray-300 space-y-1">
<li>Criar promoções nas mesmas datas</li>
<li>Melhorar descrições de produtos</li>
<li>Oferecer frete grátis em compras menores</li>
</ul>
</div>
</div>
<button id="downloadReport" class="text-purple-300 hover:text-white text-sm">
<i class="fas fa-download mr-1"></i> Baixar Relatório Completo
</button>
</div>
<!-- Alert Settings -->
<div class="card-glass rounded-xl p-6">
<h3 class="text-xl font-bold mb-4">Alertas Automáticos</h3>
<div class="space-y-4">
<div class="flex items-center justify-between">
<div>
<h4 class="font-medium">Mudanças de Preço</h4>
<p class="text-sm text-gray-400">Notificar quando houver variação superior a:</p>
</div>
<div class="flex items-center">
<input type="number" id="priceChangeThreshold" value="10" class="w-16 px-3 py-1 bg-gray-700 rounded-lg border border-gray-600 text-right">
<span class="ml-2">%</span>
</div>
</div>
<div class="flex items-center justify-between">
<div>
<h4 class="font-medium">Novos Anúncios</h4>
<p class="text-sm text-gray-400">Notificar sobre novos anúncios</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" id="newAdsAlert" class="sr-only peer" checked>
<div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-500"></div>
</label>
</div>
<div class="pt-4 border-t border-gray-700">
<h4 class="font-medium mb-2">Canais de Notificação</h4>
<div class="flex flex-wrap gap-3">
<label class="inline-flex items-center">
<input type="checkbox" id="emailAlerts" class="rounded bg-gray-700 border-gray-600 text-purple-500 focus:ring-purple-500" checked>
<span class="ml-2 text-gray-300">E-mail</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" id="whatsappAlerts" class="rounded bg-gray-700 border-gray-600 text-purple-500 focus:ring-purple-500">
<span class="ml-2 text-gray-300">WhatsApp</span>
</label>
<label class="inline-flex items-center">
<input type="checkbox" id="telegramAlerts" class="rounded bg-gray-700 border-gray-600 text-purple-500 focus:ring-purple-500">
<span class="ml-2 text-gray-300">Telegram</span>
</label>
</div>
</div>
</div>
</div>
</section>
<!-- How It Works -->
<section id="how-it-works" class="py-20 bg-gray-900 bg-opacity-50 rounded-3xl">
<div class="text-center mb-16">
<h2 class="text-3xl font-bold mb-4">Como Funciona</h2>
<p class="text-gray-300 max-w-2xl mx-auto">
Em apenas 3 passos você começa a monitorar seus concorrentes
</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 max-w-5xl mx-auto">
<div class="flex flex-col items-center text-center">
<div class="w-16 h-16 rounded-full gradient-bg flex items-center justify-center mb-4 text-white text-xl font-bold">1</div>
<h3 class="text-xl font-bold mb-2">Adicione Concorrentes</h3>
<p class="text-gray-300">
Insira os sites e redes sociais dos concorrentes que deseja monitorar.
</p>
</div>
<div class="flex flex-col items-center text-center">
<div class="w-16 h-16 rounded-full gradient-bg flex items-center justify-center mb-4 text-white text-xl font-bold">2</div>
<h3 class="text-xl font-bold mb-2">Configure Alertas</h3>
<p class="text-gray-300">
Defina quais tipos de mudanças você quer ser notificado.
</p>
</div>
<div class="flex flexocol items-center text-center">
<div class="w-16 h-16 rounded-full gradient-bg flex items-center justify-center mb-4 text-white text-xl font-bold">3</div>
<h3 class="text-xl font-bold mb-2">Receba Insights</h3>
<p class="text-gray-300">
Acesse relatórios completos e tome decisões baseadas em dados.
</p>
</div>
</div>
</section>
<!-- Pricing -->
<section id="pricing" class="py-20">
<div class="text-center mb-16">
<h2 class="text-3xl font-bold mb-4">Planos que se Adaptam a Você</h2>
<p class="text-gray-300 max-w-2xl mx-auto">
Teste grátis por 7 dias e depois escolha o plano ideal
</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8 max-w-4xl mx-auto">
<div class="plan-card card-glass rounded-xl p-6 card-shadow border-2 border-purple-500 relative">
<div class="absolute top-0 right-0 bg-purple-500 text-white px-3 py-1 text-xs font-bold rounded-bl-lg rounded-tr-lg">
POPULAR
</div>
<h3 class="text-xl font-bold mb-2">Starter</h3>
<p class="text-4xl font-bold mb-4">R$ 97<span class="text-lg text-gray-400">/mês</span></p>
<ul class="space-y-3 mb-8">
<li class="flex items-center">
<i class="fas fa-check text-green-400 mr-2"></i>
Até 3 Concorrentes
</li>
<li class="flex items-center">
<i class="fas fa-check text-green-400 mr-2"></i>
20 Análises/mês
</li>
<li class="flex items-center">
<i class="fas fa-check text-green-400 mr-2"></i>
Alertas Básicos (1x/dia)
</li>
<li class="flex items-center">
<i class="fas fa-check text-green-400 mr-2"></i>
Histórico de 7 dias
</li>
<li class="flex items-center text-gray-500">
<i class="fas fa-times text-red-400 mr-2"></i>
Exportação de Relatórios
</li>
<li class="flex items-center text-gray-500">
<i class="fas fa-times text-red-400 mr-2"></i>
API Access
</li>
</ul>
<button class="w-full gradient-bg text-white py-3 px-6 rounded-lg hover:opacity-90 transition select-plan-btn" data-plan="starter">
Teste Grátis
</button>
</div>
<div class="plan-card card-glass rounded-xl p-6 card-shadow">
<h3 class="text-xl font-bold mb-2">Pro</h3>
<p class="text-4xl font-bold mb-4">R$ 197<span class="text-lg text-gray-400">/mês</span></p>
<ul class="space-y-3 mb-8">
<li class="flex items-center">
<i class="fas fa-check text-green-400 mr-2"></i>
Concorrentes Ilimitados
</li>
<li class="flex items-center">
<i class="fas fa-check text-green-400 mr-2"></i>
Análises Ilimitadas
</li>
<li class="flex items-center">
<i class="fas fa-check text-green-400 mr-2"></i>
Alertas em Tempo Real
</li>
<li class="flex items-center">
<i class="fas fa-check text-green-400 mr-2"></i>
Histórico Completo
</li>
<li class="flex items-center">
<i class="fas fa-check text-green-400 mr-2"></i>
Exportar Relatórios (PDF/CSV)
</li>
<li class="flex items-center">
<i class="fas fa-check text-green-400 mr-2"></i>
API Access (Webhooks)
</li>
</ul>
<button class="w-full gradient-bg text-white py-3 px-6 rounded-lg hover:opacity-90 transition select-plan-btn" data-plan="pro">
Assinar Agora
</button>
</div>
</div>
</section>
<!-- Login Modal -->
<div id="loginModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50 hidden">
<div class="login-container">
<div class="text-center mb-6">
<h2 class="text-2xl font-bold">Acesse sua conta</h2>
<p class="text-gray-300">Entre para continuar</p>
</div>
<form id="loginForm">
<div class="mb-4">
<label for="loginEmail" class="block text-gray-300 mb-2">E-mail</label>
<input type="email" id="loginEmail" class="w-full px-4 py-2 bg-gray-800 rounded-lg border border-gray-700 focus:outline-none focus:ring-2 focus:ring-purple-500" required>
</div>
<div class="mb-6">
<label for="loginPassword" class="block text-gray-300 mb-2">Senha</label>
<input type="password" id="loginPassword" class="w-full px-4 py-2 bg-gray-800 rounded-lg border border-gray-700 focus:outline-none focus:ring-2 focus:ring-purple-500" required>
</div>
<button type="submit" class="w-full gradient-bg text-white py-2 px-4 rounded-lg hover:opacity-90 transition mb-4">
Entrar
</button>
<div class="text-center">
<p class="text-gray-400">Não tem uma conta? <a href="#" id="signupLink" class="text-purple-400 hover:text-purple-300">Cadastre-se</a></p>
</div>
</form>
</div>
</div>
<!-- Signup Modal -->
<div id="signupModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50 hidden">
<div class="signup-container">
<div class="text-center mb-6">
<h2 class="text-2xl font-bold">Crie sua conta</h2>
<p class="text-gray-300">Comece seu teste gratuito de 7 dias</p>
</div>
<form id="signupForm">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
<div>
<label for="firstName" class="block text-gray-300 mb-2">Nome</label>
<input type="text" id="firstName" class="w-full px-4 py-2 bg-gray-800 rounded-lg border border-gray-700 focus:outline-none focus:ring-2 focus:ring-purple-500" required>
</div>
<div>
<label for="lastName" class="block text-gray-300 mb-2">Sobrenome</label>
<input type="text" id="lastName" class="w-full px-4 py-2 bg-gray-800 rounded-lg border border-gray-700 focus:outline-none focus:ring-2 focus:ring-purple-500" required>
</div>
</div>
<div class="mb-4">
<label for="email" class="block text-gray-300 mb-2">E-mail</label>
<input type="email" id="email" class="w-full px-4 py-2 bg-gray-800 rounded-lg border border-gray-700 focus:outline-none focus:ring-2 focus:ring-purple-500" required>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
<div>
<label for="password" class="block text-gray-300 mb-2">Senha</label>
<input type="password" id="password" class="w-full px-4 py-2 bg-gray-800 rounded-lg border border-gray-700 focus:outline-none focus:ring-2 focus:ring-purple-500" required>
</div>
<div>
<label for="confirmPassword" class="block text-gray-300 mb-2">Confirme a Senha</label>
<input type="password" id="confirmPassword" class="w-full px-4 py-2 bg-gray-800 rounded-lg border border-gray-700 focus:outline-none focus:ring-2 focus:ring-purple-500" required>
</div>
</div>
<div class="mb-4">
<label for="company" class="block text-gray-300 mb-2">Empresa</label>
<input type="text" id="company" class="w-full px-4 py-2 bg-gray-800 rounded-lg border border-gray-700 focus:outline-none focus:ring-2 focus:ring-purple-500" required>
</div>
<div class="mb-4">
<label for="position" class="block text-gray-300 mb-2">Cargo</label>
<input type="text" id="position" class="w-full px-4 py-2 bg-gray-800 rounded-lg border border-gray-700 focus:outline-none focus:ring-2 focus:ring-purple-500" required>
</div>
<button type="submit" class="w-full gradient-bg text-white py-2 px-4 rounded-lg hover:opacity-90 transition mb-4">
Criar Conta
</button>
<div class="text-center">
<p class="text-gray-400">Já tem uma conta? <a href="#" id="loginLink" class="text-purple-400 hover:text-purple-300">Entre</a></p>
</div>
</form>
</div>
</div>
<!-- Upgrade Plan Modal -->
<div id="upgradePlanModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50 hidden">
<div class="login-container">
<div class="text-center mb-6">
<h2 class="text-2xl font-bold">Upgrade to Pro</h2>
<p class="text-gray-300">Unlock all features and remove limitations</p>
</div>
<div class="mb-6">
<div class="payment-method active" data-method="credit_card">
<div class="payment-icon gradient-bg">
<i class="fas fa-credit-card text-white"></i>
</div>
<div>
<h4 class="font-medium">Cartão de Crédito</h4>
<p class="text-sm text-gray-400">Pague com Visa, Mastercard ou outros</p>
</div>
</div>
<div class="payment-method" data-method="pix">
<div class="payment-icon gradient-bg">
<i class="fas fa-barcode text-white"></i>
</div>
<div>
<h4 class="font-medium">PIX</h4>
<p class="text-sm text-gray-400">Pagamento instantâneo via PIX</p>
</div>
</div>
<div class="payment-method" data-method="pagar_me">
<div class="payment-icon gradient-bg">
<i class="fas fa-credit-card text-white"></i>
</div>
<div>
<h4 class="font-medium">Pagar.me</h4>
<p class="text-sm text-gray-400">Pagamento via Pagar.me (cartão ou boleto)</p>
</div>
</div>
</div>
<div id="creditCardForm" class="credit-card-form active">
<div id="card-element" class="card-element"></div>
<button id="submitPayment" class="w-full gradient-bg text-white py-2 px-4 rounded-lg hover:opacity-90 transition">
Pagar R$ 197/mês
</button>
</div>
<div id="pixForm" class="pix-form">
<div class="text-center mb-4">
<p class="text-gray-300 mb-2">Você receberá um QR Code para pagamento via PIX</p>
<div class="bg-white p-4 rounded-lg inline-block">
<div class="w-48 h-48 bg-gray-200 flex items-center justify-center">
<p class="text-gray-500">QR Code PIX</p>
</div>
</div>
</div>
<button id="confirmPixPayment" class="w-full gradient-bg text-white py-2 px-4 rounded-lg hover:opacity-90 transition">
Gerar PIX
</button>
</div>
<div id="pagarMeForm" class="pagar-me-form">
<div class="text-center mb-4">
<p class="text-gray-300 mb-2">Você será redirecionado para o Pagar.me para finalizar o pagamento</p>
<div class="flex justify-center space-x-4">
<button id="pagarMeCreditCard" class="gradient-bg text-white py-2 px-4 rounded-lg hover:opacity-90 transition">
Cartão de Crédito
</button>
<button id="pagarMeBoleto" class="bg-gray-700 text-white py-2 px-4 rounded-lg hover:bg-gray-600 transition">
Boleto Bancário
</button>
</div>
</div>
</div>
<div class="text-center mt-6">
<button id="cancelUpgrade" class="text-gray-400 hover:text-white">
Cancelar
</button>
</div>
</div>
</div>
</div>
<script>
// =============================================
// CONFIGURAÇÕES DA APLICAÇÃO
// =============================================
const API_CONFIG = {
baseUrl: 'https://api.spysmartai.com/v1',
stripePublicKey: 'pk_test_your_stripe_public_key_here',
pagarmePublicKey: 'pk_test_your_pagarme_public_key_here',
mistralApiKey: 'sk_your_mistral_api_key_here',
n8nWebhookUrl: 'https://your-n8n-instance.com/webhook/path',
competitorEndpoint: 'https://seu-replit.seu-usuario.repl.co/add-competitor'
};
// =============================================
// BANCO DE DADOS SIMULADO (LOCALSTORAGE)
// =============================================
let usersDB = JSON.parse(localStorage.getItem('usersDB')) || [];
let currentUser = JSON.parse(localStorage.getItem('currentUser')) || null;
let competitors = JSON.parse(localStorage.getItem('competitors')) || [
{
id: '1',
name: 'Competidor 1',
website: 'www.competidor1.com.br',
instagram: '@competidor1',
mercadoLivre: 'loja.mercadolivre.com.br/competidor1',
tiktok: '@competidor1',
analysisType: 'complete',
notes: 'Principal concorrente no segmento de eletrônicos',
status: 'active',
lastUpdate: '2023-06-10'
},
{
id: '2',
name: 'Competidor 2',
website: 'www.competidor2.com.br',
instagram: '@competidor2',
mercadoLivre: 'loja.mercadolivre.com.br/competidor2',
tiktok: '@competidor2',
analysisType: 'pricing',
notes: 'Concorrente secundário com preços agressivos',
status: 'updating',
lastUpdate: '2023-06-09'
}
];
// =============================================
// ELEMENTOS DOM
// =============================================
const loginModal = document.getElementById('loginModal');
const loginBtn = document.getElementById('loginBtn');
const loginForm = document.getElementById('loginForm');
const signupModal = document.getElementById('signupModal');
const signupForm = document.getElementById('signupForm');
const signupLink = document.getElementById('signupLink');
const loginLink = document.getElementById('loginLink');
const startFreeTrialBtn = document.getElementById('startFreeTrial');
const typingText = document.getElementById('typing-text');
const landingPage = document.getElementById('landingPage');
const dashboardSection = document.getElementById('dashboardSection');
const addCompetitorBtn = document.getElementById('addCompetitorBtn');
const addCompetitorForm = document.getElementById('addCompetitorForm');
const cancelAddCompetitor = document.getElementById('cancelAddCompetitor');
const competitorForm = document.getElementById('competitorForm');
const competitorsList = document.getElementById('competitorsList');
const upgradeModal = document.getElementById('upgradeModal');
const closeUpgradeModal = document.getElementById('closeUpgradeModal');
const cancelUpgrade = document.getElementById('cancelUpgrade');
const confirmUpgrade = document.getElementById('confirmUpgrade');
const upgradePlanModal = document.getElementById('upgradePlanModal');
const paymentMethods = document.querySelectorAll('.payment-method');
const creditCardForm = document.getElementById('creditCardForm');
const pixForm = document.getElementById('pixForm');
const pagarMeForm = document.getElementById('pagarMeForm');
const pagarMeCreditCard = document.getElementById('pagarMeCreditCard');
const pagarMeBoleto = document.getElementById('pagarMeBoleto');
const planCounter = document.getElementById('planCounter');
const analysisCount = document.getElementById('analysisCount');
const analysisLimit = document.getElementById('analysisLimit');
const selectPlanBtns = document.querySelectorAll('.select-plan-btn');
// =============================================
// EVENT LISTENERS
// =============================================
loginBtn.addEventListener('click', showLoginModal);
startFreeTrialBtn.addEventListener('click', showSignupModal);
signupLink.addEventListener('click', switchToSignup);
loginLink.addEventListener('click', switchToLogin);
loginForm.addEventListener('submit', handleLogin);
signupForm.addEventListener('submit', handleSignup);
addCompetitorBtn.addEventListener('click', showAddCompetitorForm);
cancelAddCompetitor.addEventListener('click', hideAddCompetitorForm);
competitorForm.addEventListener('submit', handleAddCompetitor);
closeUpgradeModal?.addEventListener('click', hideUpgradeModal);
cancelUpgrade?.addEventListener('click', hideUpgradeModal);
confirmUpgrade?.addEventListener('click', showUpgradePlanModal);
paymentMethods.forEach(method => {
method.addEventListener('click', () => selectPaymentMethod(method));
});
selectPlanBtns.forEach(btn => {
btn.addEventListener('click', handlePlanSelection);
});
pagarMeCreditCard?.addEventListener('click', () => processPagarMePayment('credit_card'));
pagarMeBoleto?.addEventListener('click', () => processPagarMePayment('boleto'));
// Initialize Stripe
const stripe = Stripe(API_CONFIG.stripePublicKey);
const elements = stripe.elements();
const cardElement = elements.create('card');
cardElement.mount('#card-element');
// =============================================
// FUNÇÕES PRINCIPAIS
// =============================================
function showLoginModal() {
loginModal.classList.remove('hidden');
signupModal.classList.add('hidden');
document.body.style.overflow = 'hidden';
}
function hideLoginModal() {
loginModal.classList.add('hidden');
document.body.style.overflow = '';
}
function showSignupModal() {
signupModal.classList.remove('hidden');
loginModal.classList.add('hidden');
document.body.style.overflow = 'hidden';
}
function hideSignupModal() {
signupModal.classList.add('hidden');
document.body.style.overflow = '';
}
function switchToSignup(e) {
e.preventDefault();
loginModal.classList.add('hidden');
signupModal.classList.remove('hidden');
}
function switchToLogin(e) {
e.preventDefault();
signupModal.classList.add('hidden');
loginModal.classList.remove('hidden');
}
function showDashboard() {
landingPage.classList.add('hidden');
dashboardSection.classList.remove('hidden');
loadCompetitors();
updatePlanCounter();
}
function showLandingPage() {
dashboardSection.classList.add('hidden');
landingPage.classList.remove('hidden');
}
function showAddCompetitorForm() {
// Check plan limits
if (currentUser?.plan === 'starter' && competitors.length >= 3) {
showUpgradeModal('Você atingiu o limite de 3 concorrentes no plano Starter. Faça upgrade para Pro para adicionar mais concorrentes.');
return;
}
addCompetitorForm.classList.remove('hidden');
addCompetitorBtn.classList.add('hidden');
}
function hideAddCompetitorForm() {
addCompetitorForm.classList.add('hidden');
addCompetitorBtn.classList.remove('hidden');
competitorForm.reset();
}
function showUpgradeModal(message) {
document.getElementById('upgradeMessage').textContent = message;
upgradeModal.classList.add('active');
document.body.style.overflow = 'hidden';
}
function hideUpgradeModal() {
upgradeModal.classList.remove('active');
upgradePlanModal.classList.add('hidden');
document.body.style.overflow = '';
}
function showUpgradePlanModal() {
upgradePlanModal.classList.remove('hidden');
upgradeModal.classList.remove('active');
}
function selectPaymentMethod(method) {
paymentMethods.forEach(m => m.classList.remove('active'));
method.classList.add('active');
const methodType = method.getAttribute('data-method');
// Hide all forms first
creditCardForm.classList.remove('active');
pixForm.classList.remove('active');
pagarMeForm.classList.remove('active');
// Show selected form
if (methodType === 'credit_card') {
creditCardForm.classList.add('active');
} else if (methodType === 'pix') {
pixForm.classList.add('active');
} else if (methodType === 'pagar_me') {
pagarMeForm.classList.add('active');
}
}
function handlePlanSelection(e) {
const plan = e.currentTarget.getAttribute('data-plan');
if (plan === 'starter') {
showSignupModal();
} else {
showUpgradePlanModal();
}
}
function updatePlanCounter() {
if (!currentUser) return;
if (currentUser.plan === 'starter' || currentUser.plan === 'starter_trial') {
planCounter.classList.remove('hidden');
analysisCount.textContent = '5'; // Mock data
analysisLimit.textContent = '20';
} else {
planCounter.classList.add('hidden');
}
}
function processPagarMePayment(paymentMethod) {
// Configuração do checkout Pagar.me
const checkout = new PagarMeCheckout.Checkout({
encryption_key: API_CONFIG.pagarmePublicKey,
success: function(data) {
alert('Pagamento realizado com sucesso! ID da transação: ' + data.id);
hideUpgradeModal();
// Atualizar o plano do usuário para Pro
if (currentUser) {
currentUser.plan = 'pro';
localStorage.setItem('currentUser', JSON.stringify(currentUser));
alert('Seu plano foi atualizado para Pro com sucesso!');
updatePlanCounter();
}
},
error: function(err) {
console.error('Erro no pagamento:', err);
alert('Ocorreu um erro ao processar seu pagamento. Por favor, tente novamente.');
},
close: function() {
console.log('Modal de pagamento fechado');
}
});
// Configuração da transação
const paymentData = {
amount: 19700, // R$ 197,00 em centavos
buttonText: 'Pagar R$ 197,00',
customerData: 'true',
createToken: 'false',
paymentMethod: paymentMethod,
postbackUrl: API_CONFIG.n8nWebhookUrl,
items: [
{
id: 'pro_plan',
title: 'Plano Pro SpySmartAI',
unit_price: 19700,
quantity: 1,
tangible: false
}
],
customer: {
name: currentUser?.firstName + ' ' + currentUser?.lastName,
email: currentUser?.email,
external_id: currentUser?.id || 'guest_' + Date.now(),
type: 'individual',
country: 'br',
documents: [
{
type: 'cpf',
number: '00000000000' // Substituir por CPF real em produção
}
],
phone_numbers: ['+5511999999999'] // Substituir por telefone real em produção
},
billing: {
name: currentUser?.firstName + ' ' + currentUser?.lastName,
address: {
country: 'br',
state: 'sp',
city: 'São Paulo',
neighborhood: 'Centro',
street: 'Av. Paulista',
street_number: '1000',
zipcode: '01310000'
}
}
};
// Abrir modal de pagamento do Pagar.me
checkout.open(paymentData);
}
function handleLogin(e) {
e.preventDefault();
const email = document.getElementById('loginEmail').value;
const password = document.getElementById('loginPassword').value;
// Simulação de login
const user = usersDB.find(u => u.email === email && u.password === password);
if (user) {
currentUser = user;
localStorage.setItem('currentUser', JSON.stringify(currentUser));
hideLoginModal();
showDashboard();
alert('Login realizado com sucesso!');
} else {
alert('E-mail ou senha incorretos');
}
}
function handleSignup(e) {
e.preventDefault();
const firstName = document.getElementById('firstName').value;
const lastName = document.getElementById('lastName').value;
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
const confirmPassword = document.getElementById('confirmPassword').value;
const company = document.getElementById('company').value;
const position = document.getElementById('position').value;
if (password !== confirmPassword) {
alert('As senhas não coincidem');
return;
}
// Verificar se o usuário já existe
if (usersDB.some(u => u.email === email)) {
alert('Este e-mail já está cadastrado');
return;
}
// Criar novo usuário
const newUser = {
id: Date.now().toString(),
firstName,
lastName,
email,
password,
company,
position,
plan: 'starter_trial',
trialEnd: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000).toISOString(),
competitorsCount: 0,
analysisCount: 0
};
usersDB.push(newUser);
localStorage.setItem('usersDB', JSON.stringify(usersDB));
currentUser = newUser;
localStorage.setItem('currentUser', JSON.stringify(currentUser));
hideSignupModal();
showDashboard();
alert('Cadastro realizado com sucesso! Bem-vindo ao seu teste gratuito de 7 dias.');
}
function handleAddCompetitor(e) {
e.preventDefault();
// Check plan limits
if (currentUser?.plan === 'starter' && competitors.length >= 3) {
showUpgradeModal('Você atingiu o limite de 3 concorrentes no plano Starter. Faça upgrade para Pro para adicionar mais concorrentes.');
return;
}
const competitorData = {
id: Date.now().toString(),
name: document.getElementById('competitorName').value,
website: document.getElementById('competitorWebsite').value,
instagram: document.getElementById('competitorInstagram').value,
mercadoLivre: document.getElementById('competitorMercadoLivre').value,
tiktok: document.getElementById('competitorTikTok').value,
analysisType: document.getElementById('analysisType').value,
notes: document.getElementById('competitorNotes').value,
status: 'active',
lastUpdate: new Date().toISOString().split('T')[0]
};
// Simulação de chamada à API
try {
// Adiciona o concorrente localmente
competitors.push(competitorData);
localStorage.setItem('competitors', JSON.stringify(competitors));
// Atualiza a lista de concorrentes
loadCompetitors();
// Esconde o formulário
hideAddCompetitorForm();
alert('Concorrente adicionado com sucesso! A análise começará em breve.');
// Aqui você faria a chamada real à API
/*
const response = await fetch(API_CONFIG.competitorEndpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${localStorage.getItem('authToken')}`
},
body: JSON.stringify(competitorData)
});
if (response.ok) {
loadCompetitors();
hideAddCompetitorForm();
alert('Concorrente adicionado com sucesso!');
} else {
throw new Error('Erro ao adicionar concorrente');
}
*/
} catch (error) {
console.error('Erro:', error);
alert('Falha ao adicionar concorrente');
}
}
function loadCompetitors() {
competitorsList.innerHTML = '';
if (competitors.length === 0) {
competitorsList.innerHTML = `
<tr>
<td colspan="6" class="py-4 text-center text-gray-400">
Nenhum concorrente cadastrado ainda. Clique em "Adicionar Concorrente" para começar.
</td>
</tr>
`;
return;
}
competitors.forEach(competitor => {
const statusClass = competitor.status === 'active' ? 'bg-green-500' : 'bg-yellow-500';
const statusText = competitor.status === 'active' ? 'Ativo' : 'Em Análise';
competitorsList.innerHTML += `
<tr class="border-b border-gray-700 hover:bg-gray-800">
<td class="py-4">${competitor.name}</td>
<td class="py-4">
<a href="https://${competitor.website}" target="_blank" class="text-purple-300 hover:text-purple-200">
${competitor.website}
</a>
</td>
<td class="py-4 capitalize">${competitor.analysisType}</td>
<td class="py-4">${competitor.lastUpdate}</td>
<td class="py-4">
<span class="inline-block w-3 h-3 rounded-full ${statusClass} mr-2"></span>
${statusText}
</td>
<td class="py-4">
<button class="text-purple-300 hover:text-white mr-3 view-report-btn" data-id="${competitor.id}">
<i class="fas fa-chart-bar"></i>
</button>
<button class="text-gray-400 hover:text-white delete-competitor-btn" data-id="${competitor.id}">
<i class="fas fa-trash"></i>
</button>
</td>
</tr>
`;
});
// Adiciona event listeners aos botões
document.querySelectorAll('.view-report-btn').forEach(btn => {
btn.addEventListener('click', (e) => {
const competitorId = e.currentTarget.getAttribute('data-id');
viewCompetitorReport(competitorId);
});
});
document.querySelectorAll('.delete-competitor-btn').forEach(btn => {
btn.addEventListener('click', (e) => {
const competitorId = e.currentTarget.getAttribute('data-id');
deleteCompetitor(competitorId);
});
});
}
function viewCompetitorReport(competitorId) {
const competitor = competitors.find(c => c.id === competitorId);
if (!competitor) return;
// Check analysis limits for Starter plan
if (currentUser?.plan === 'starter' || currentUser?.plan === 'starter_trial') {
const remainingAnalyses = 20 - (currentUser.analysisCount || 0);
if (remainingAnalyses <= 0) {
showUpgradeModal('Você atingiu o limite de 20 análises mensais no plano Starter. Faça upgrade para Pro para análises ilimitadas.');
return;
}
// Increment analysis count
currentUser.analysisCount = (currentUser.analysisCount || 0) + 1;
localStorage.setItem('currentUser', JSON.stringify(currentUser));
updatePlanCounter();
}
// Atualiza o relatório na UI
document.getElementById('currentCompetitor').textContent = competitor.name;
// Aqui você buscaria os dados reais da API
// Por enquanto estamos usando dados mockados
const detectedStrategies = [
'Promoções relâmpago às quartas-feiras',
'Uso intensivo de anúncios no Instagram',
'Preços dinâmicos baseados em concorrência'
];
const strengthsList = [
'Fotos de produtos em alta qualidade',
'Atendimento rápido via WhatsApp',
'Frete grátis acima de R$ 150'
];
const suggestionsList = [
'Criar promoções nas mesmas datas',
'Melhorar descrições de produtos',
'Oferecer frete grátis em compras menores'
];
// Preenche as listas
const detectedStrategiesEl = document.getElementById('detectedStrategies');
const strengthsListEl = document.getElementById('strengthsList');
const suggestionsListEl = document.getElementById('suggestionsList');
detectedStrategiesEl.innerHTML = detectedStrategies.map(item => `<li>${item}</li>`).join('');
strengthsListEl.innerHTML = strengthsList.map(item => `<li>${item}</li>`).join('');
suggestionsListEl.innerHTML = suggestionsList.map(item => `<li>${item}</li>`).join('');
// Rola até a seção de relatórios
document.querySelector('#dashboardSection').scrollIntoView({
behavior: 'smooth'
});
}
function deleteCompetitor(competitorId) {
if (confirm('Tem certeza que deseja remover este concorrente?')) {
competitors = competitors.filter(c => c.id !== competitorId);
localStorage.setItem('competitors', JSON.stringify(competitors));
loadCompetitors();
alert('Concorrente removido com sucesso!');
}
}
// =============================================
// ANIMAÇÃO DE DIGITAÇÃO (HERO SECTION)
// =============================================
const typingWords = [
"Inteligência Artificial",
"Análise de Concorrentes",
"Monitoramento de Preços",
"Estratégias de Marketing",
"Dados em Tempo Real",
"Relatórios Automatizados"
];
let wordIndex = 0;
let charIndex = 0;
let isDeleting = false;
let typingSpeed = 100;
let pauseBetweenWords = 2000; // 2 segundos entre palavras
function typeWriter() {
const currentWord = typingWords[wordIndex];
const currentChar = currentWord.substring(0, charIndex);
typingText.textContent = currentChar;
if (!isDeleting && charIndex < currentWord.length) {
// Digitando
charIndex++;
typingSpeed = 100;
} else if (isDeleting && charIndex > 0) {
// Apagando
charIndex--;
typingSpeed = 50;
} else {
// Mudando de palavra
isDeleting = !isDeleting;
if (!isDeleting) {
wordIndex = (wordIndex + 1) % typingWords.length;
typingSpeed = 500; // Pausa antes de começar a digitar
} else {
typingSpeed = pauseBetweenWords; // Pausa antes de começar a apagar
}
}
setTimeout(typeWriter, typingSpeed);
}
// Iniciar animação de digitação
setTimeout(typeWriter, 1000);
// Check if user is logged in on page load
document.addEventListener('DOMContentLoaded', () => {
if (currentUser) {
showDashboard();
}
});
</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=xlorfx/spysmartai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |