death0074k commited on
Commit
1a95561
·
verified ·
1 Parent(s): c6383a9

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +849 -692
index.html CHANGED
@@ -1,724 +1,881 @@
1
  <!DOCTYPE html>
2
  <html lang="pt-BR">
 
3
  <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Login Interativo Moderno</title>
7
- <!-- Importando ícones (FontAwesome) -->
8
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
- <!-- Importando fonte (Poppins) -->
10
- <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- <style>
13
- :root {
14
- --primary-color: #4e54c8;
15
- --secondary-color: #8f94fb;
16
- --accent-color: #ff4b2b;
17
- --text-color: #333;
18
- --bg-color: #f6f5f7;
19
- --white: #ffffff;
20
- --error-color: #e74c3c;
21
- --success-color: #2ecc71;
22
- --transition-speed: 0.6s;
23
- }
24
-
25
- * {
26
- box-sizing: border-box;
27
- margin: 0;
28
- padding: 0;
29
- }
30
-
31
- body {
32
- font-family: 'Poppins', sans-serif;
33
- background: #f6f5f7;
34
- display: flex;
35
- justify-content: center;
36
- align-items: center;
37
- flex-direction: column;
38
- height: 100vh;
39
- overflow: hidden;
40
- /* Fundo gradiente animado */
41
- background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
42
- background-size: 400% 400%;
43
- animation: gradientBG 15s ease infinite;
44
- }
45
-
46
- @keyframes gradientBG {
47
- 0% { background-position: 0% 50%; }
48
- 50% { background-position: 100% 50%; }
49
- 100% { background-position: 0% 50%; }
50
- }
51
-
52
- /* --- Header / Branding --- */
53
- header {
54
- position: absolute;
55
- top: 20px;
56
- width: 100%;
57
- text-align: center;
58
- z-index: 10;
59
- }
60
-
61
- .brand-link {
62
- text-decoration: none;
63
- color: rgba(255, 255, 255, 0.9);
64
- font-size: 0.9rem;
65
- font-weight: 500;
66
- background: rgba(0, 0, 0, 0.2);
67
- padding: 8px 16px;
68
- border-radius: 20px;
69
- backdrop-filter: blur(5px);
70
- border: 1px solid rgba(255, 255, 255, 0.2);
71
- transition: all 0.3s ease;
72
- display: inline-flex;
73
- align-items: center;
74
- gap: 8px;
75
- }
76
-
77
- .brand-link:hover {
78
- background: rgba(255, 255, 255, 0.3);
79
- transform: translateY(-2px);
80
- box-shadow: 0 5px 15px rgba(0,0,0,0.1);
81
- }
82
-
83
- /* --- Container Principal --- */
84
- .container {
85
- background-color: var(--white);
86
- border-radius: 20px;
87
- box-shadow: 0 14px 28px rgba(0,0,0,0.25),
88
- 0 10px 10px rgba(0,0,0,0.22);
89
- position: relative;
90
- overflow: hidden;
91
- width: 850px; /* Largura padrão desktop */
92
- max-width: 100%;
93
- min-height: 550px;
94
- transition: all 0.3s ease;
95
- }
96
-
97
- /* --- Formulários --- */
98
- .form-container {
99
- position: absolute;
100
- top: 0;
101
- height: 100%;
102
- transition: all var(--transition-speed) ease-in-out;
103
- display: flex;
104
- align-items: center;
105
- justify-content: center;
106
- flex-direction: column;
107
- padding: 0 50px;
108
- text-align: center;
109
- background-color: var(--white);
110
- }
111
-
112
- form {
113
- background-color: var(--white);
114
- display: flex;
115
- align-items: center;
116
- justify-content: center;
117
- flex-direction: column;
118
- height: 100%;
119
- width: 100%;
120
- }
121
-
122
- h1 {
123
- font-weight: 700;
124
- margin-bottom: 20px;
125
- color: var(--text-color);
126
- }
127
-
128
- .social-container {
129
- margin: 20px 0;
130
- }
131
-
132
- .social-container a {
133
- border: 1px solid #ddd;
134
- border-radius: 50%;
135
- display: inline-flex;
136
- justify-content: center;
137
- align-items: center;
138
- margin: 0 5px;
139
- height: 40px;
140
- width: 40px;
141
- color: #333;
142
- text-decoration: none;
143
- transition: all 0.3s ease;
144
- }
145
-
146
- .social-container a:hover {
147
- background-color: var(--primary-color);
148
- color: white;
149
- border-color: var(--primary-color);
150
- transform: scale(1.1);
151
- }
152
-
153
- span {
154
- font-size: 12px;
155
- color: #888;
156
- margin-bottom: 15px;
157
- }
158
-
159
- /* --- Inputs Modernos --- */
160
- .input-group {
161
- position: relative;
162
- width: 100%;
163
- margin: 8px 0;
164
- }
165
-
166
- .input-group input {
167
- background-color: #eee;
168
- border: none;
169
- padding: 12px 15px;
170
- padding-right: 40px; /* Espaço para o ícone */
171
- width: 100%;
172
- border-radius: 8px;
173
- outline: none;
174
- font-size: 14px;
175
- transition: all 0.3s ease;
176
- }
177
-
178
- .input-group input:focus {
179
- background-color: #e0e0e0;
180
- box-shadow: 0 0 0 2px var(--secondary-color) inset;
181
- }
182
-
183
- /* Ícone de olho para senha */
184
- .password-toggle {
185
- position: absolute;
186
- right: 15px;
187
- top: 50%;
188
- transform: translateY(-50%);
189
- cursor: pointer;
190
- color: #888;
191
- font-size: 14px;
192
- transition: color 0.3s;
193
- }
194
-
195
- .password-toggle:hover {
196
- color: var(--primary-color);
197
- }
198
-
199
- a.forgot-pass {
200
- color: #333;
201
- font-size: 13px;
202
- text-decoration: none;
203
- margin: 15px 0;
204
- border-bottom: 1px dashed transparent;
205
- transition: border-bottom 0.3s;
206
- }
207
-
208
- a.forgot-pass:hover {
209
- border-bottom: 1px dashed #333;
210
- }
211
-
212
- /* --- Botões --- */
213
- button.action-btn {
214
- border-radius: 50px;
215
- border: 1px solid var(--accent-color);
216
- background-color: var(--accent-color);
217
- color: #ffffff;
218
- font-size: 12px;
219
- font-weight: bold;
220
- padding: 12px 45px;
221
- letter-spacing: 1px;
222
- text-transform: uppercase;
223
- transition: transform 80ms ease-in, background-color 0.3s, box-shadow 0.3s;
224
- cursor: pointer;
225
- margin-top: 10px;
226
- }
227
-
228
- button.action-btn:hover {
229
- background-color: #ff2a00;
230
- box-shadow: 0 5px 15px rgba(255, 75, 43, 0.4);
231
- }
232
-
233
- button.action-btn:active {
234
- transform: scale(0.95);
235
- }
236
-
237
- button:disabled {
238
- background-color: #ccc;
239
- border-color: #ccc;
240
- cursor: not-allowed;
241
- box-shadow: none;
242
- }
243
-
244
- /* --- Lógica de Posicionamento (Desktop) --- */
245
- .sign-in-container {
246
- left: 0;
247
- width: 50%;
248
- z-index: 2;
249
- }
250
-
251
- .sign-up-container {
252
- left: 0;
253
- width: 50%;
254
- opacity: 0;
255
- z-index: 1;
256
- }
257
-
258
- /* Quando a classe .right-panel-active é adicionada ao container */
259
- .container.right-panel-active .sign-in-container {
260
- transform: translateX(100%);
261
- opacity: 0;
262
- }
263
-
264
- .container.right-panel-active .sign-up-container {
265
- transform: translateX(100%);
266
- opacity: 1;
267
- z-index: 5;
268
- animation: show 0.6s;
269
- }
270
 
271
- @keyframes show {
272
- 0%, 49.99% {
273
- opacity: 0;
274
- z-index: 1;
275
- }
276
- 50%, 100% {
277
- opacity: 1;
278
- z-index: 5;
279
- }
280
- }
281
 
282
- /* --- Overlay (Painel Colorido) --- */
283
- .overlay-container {
284
- position: absolute;
285
- top: 0;
286
- left: 50%;
287
- width: 50%;
288
- height: 100%;
289
- overflow: hidden;
290
- transition: transform var(--transition-speed) ease-in-out;
291
- z-index: 100;
292
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
 
294
- .container.right-panel-active .overlay-container {
295
- transform: translateX(-100%);
296
- }
 
297
 
298
- .overlay {
299
- background: #ff416c;
300
- background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
301
- background-repeat: no-repeat;
302
- background-size: cover;
303
- background-position: 0 0;
304
- color: #ffffff;
305
- position: relative;
306
- left: -100%;
307
- height: 100%;
308
- width: 200%;
309
- transform: translateX(0);
310
- transition: transform var(--transition-speed) ease-in-out;
311
- }
312
 
313
- .container.right-panel-active .overlay {
314
- transform: translateX(50%);
315
- }
316
 
317
- .overlay-panel {
318
- position: absolute;
319
- display: flex;
320
- align-items: center;
321
- justify-content: center;
322
- flex-direction: column;
323
- padding: 0 40px;
324
- text-align: center;
325
- top: 0;
326
- height: 100%;
327
- width: 50%;
328
- transform: translateX(0);
329
- transition: transform var(--transition-speed) ease-in-out;
330
- }
331
 
332
- .overlay-left {
333
- transform: translateX(-20%);
334
- }
335
 
336
- .container.right-panel-active .overlay-left {
337
- transform: translateX(0);
338
- }
 
339
 
340
- .overlay-right {
341
- right: 0;
342
- transform: translateX(0);
343
- }
344
-
345
- .container.right-panel-active .overlay-right {
346
- transform: translateX(20%);
347
- }
348
 
349
- .overlay-panel h1 {
350
- color: white;
351
- font-size: 2.5rem;
352
- }
353
 
354
- .overlay-panel p {
355
- font-size: 14px;
356
- font-weight: 300;
357
- line-height: 20px;
358
- letter-spacing: 0.5px;
359
- margin: 20px 0 30px;
360
- }
361
 
362
- button.ghost {
363
- background-color: transparent;
364
- border-color: #ffffff;
365
- border: 1px solid white;
366
- color: white;
367
- border-radius: 50px;
368
- padding: 12px 45px;
369
- font-weight: bold;
370
- text-transform: uppercase;
371
- cursor: pointer;
372
- transition: all 0.3s ease;
373
- }
374
 
375
- button.ghost:hover {
376
- background-color: white;
377
- color: var(--primary-color);
378
- transform: scale(1.05);
379
- }
380
 
381
- /* --- Toast Notification (Substituto do Alert) --- */
382
- #toast-container {
383
- position: fixed;
384
- top: 80px;
385
- right: 20px;
386
- z-index: 1000;
387
- display: flex;
388
- flex-direction: column;
389
- gap: 10px;
390
- }
391
 
392
- .toast {
393
- background: white;
394
- padding: 15px 20px;
395
- border-radius: 8px;
396
- box-shadow: 0 5px 15px rgba(0,0,0,0.2);
397
- display: flex;
398
- align-items: center;
399
- gap: 12px;
400
- min-width: 300px;
401
- animation: slideIn 0.3s ease forwards;
402
- border-left: 5px solid;
403
- }
404
 
405
- .toast.success { border-left-color: var(--success-color); }
406
- .toast.error { border-left-color: var(--error-color); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
407
 
408
- .toast i { font-size: 1.2rem; }
409
- .toast.success i { color: var(--success-color); }
410
- .toast.error i { color: var(--error-color); }
411
 
412
- .toast-content h4 { font-size: 14px; margin-bottom: 2px; }
413
- .toast-content p { font-size: 12px; color: #666; }
414
 
415
- @keyframes slideIn {
416
- from { transform: translateX(100%); opacity: 0; }
417
- to { transform: translateX(0); opacity: 1; }
418
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
419
 
420
- @keyframes fadeOut {
421
- to { transform: translateX(100%); opacity: 0; }
422
- }
423
-
424
- /* --- Responsividade (Mobile) --- */
425
- @media (max-width: 768px) {
426
- .container {
427
- width: 100%;
428
- min-height: 100vh;
429
- border-radius: 0;
430
- box-shadow: none;
431
- flex-direction: column;
432
- }
433
-
434
- /* No mobile, escondemos o overlay e usamos links internos */
435
- .overlay-container {
436
- display: none;
437
- }
438
-
439
- .form-container {
440
- width: 100%;
441
- padding: 0 30px;
442
- position: absolute;
443
- opacity: 0;
444
- pointer-events: none;
445
- transition: opacity 0.4s ease;
446
- z-index: 1;
447
- }
448
-
449
- .form-container.active-mobile {
450
- opacity: 1;
451
- pointer-events: all;
452
- z-index: 5;
453
- position: relative;
454
- }
455
-
456
- .mobile-toggle {
457
- display: block;
458
- margin-top: 20px;
459
- font-size: 14px;
460
- color: var(--primary-color);
461
- cursor: pointer;
462
- text-decoration: underline;
463
- }
464
-
465
- /* Ajuste para desktop onde não deve aparecer */
466
- .desktop-only {
467
- display: none;
468
- }
469
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
470
 
471
- @media (min-width: 769px) {
472
- .mobile-toggle {
473
- display: none;
474
- }
475
- }
476
-
477
- </style>
478
- </head>
479
- <body>
480
-
481
- <!-- Header Obrigatório -->
482
- <header>
483
- <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="brand-link">
484
- <i class="fas fa-code"></i> Built with anycoder
485
- </a>
486
- </header>
487
-
488
- <!-- Container de Notificações -->
489
- <div id="toast-container"></div>
490
-
491
- <!-- Container Principal do App -->
492
- <div class="container" id="container">
493
 
494
- <!-- Formulário de Cadastro -->
495
- <div class="form-container sign-up-container" id="signUpFormContainer">
496
- <form id="formSignUp">
497
- <h1>Criar Conta</h1>
498
- <div class="social-container">
499
- <a href="#" aria-label="Facebook"><i class="fab fa-facebook-f"></i></a>
500
- <a href="#" aria-label="Google"><i class="fab fa-google-plus-g"></i></a>
501
- <a href="#" aria-label="LinkedIn"><i class="fab fa-linkedin-in"></i></a>
502
- </div>
503
- <span>ou use seu e-mail para cadastro</span>
504
-
505
- <div class="input-group">
506
- <input type="text" placeholder="Nome" id="regName" required />
507
- </div>
508
- <div class="input-group">
509
- <input type="email" placeholder="E-mail" id="regEmail" required />
510
- </div>
511
- <div class="input-group">
512
- <input type="password" placeholder="Senha" id="regPassword" required />
513
- <i class="fas fa-eye password-toggle" onclick="togglePassword('regPassword', this)"></i>
514
- </div>
515
-
516
- <button type="submit" class="action-btn">Cadastrar</button>
517
- <p class="mobile-toggle" onclick="showMobileLogin('in')">Já tem conta? Entre aqui</p>
518
- </form>
519
- </div>
520
-
521
- <!-- Formulário de Login -->
522
- <div class="form-container sign-in-container active-mobile" id="signInFormContainer">
523
- <form id="formSignIn">
524
- <h1>Entrar</h1>
525
- <div class="social-container">
526
- <a href="#" aria-label="Facebook"><i class="fab fa-facebook-f"></i></a>
527
- <a href="#" aria-label="Google"><i class="fab fa-google-plus-g"></i></a>
528
- <a href="#" aria-label="LinkedIn"><i class="fab fa-linkedin-in"></i></a>
529
- </div>
530
- <span>ou use sua conta</span>
531
-
532
- <div class="input-group">
533
- <input type="email" placeholder="E-mail" id="loginEmail" required />
534
- </div>
535
- <div class="input-group">
536
- <input type="password" placeholder="Senha" id="loginPassword" required />
537
- <i class="fas fa-eye password-toggle" onclick="togglePassword('loginPassword', this)"></i>
538
- </div>
539
-
540
- <a href="#" class="forgot-pass" onclick="forgotPassword()">Esqueceu sua senha?</a>
541
- <button type="submit" class="action-btn">Entrar</button>
542
- <p class="mobile-toggle" onclick="showMobileLogin('up')">Não tem conta? Cadastre-se</p>
543
- </form>
544
- </div>
545
-
546
- <!-- Container de Overlay (Animação Desktop) -->
547
- <div class="overlay-container">
548
- <div class="overlay">
549
- <!-- Painel Esquerdo (Visível quando está no Cadastro) -->
550
- <div class="overlay-panel overlay-left">
551
- <h1>Bem-vindo de volta!</h1>
552
- <p>Para se manter conectado conosco, faça login com suas informações pessoais</p>
553
- <button class="ghost" id="signIn">Entrar</button>
554
- </div>
555
- <!-- Painel Direito (Visível quando está no Login) -->
556
- <div class="overlay-panel overlay-right">
557
- <h1>Olá, Visitante!</h1>
558
- <p>Insira seus dados pessoais e comece sua jornada conosco</p>
559
- <button class="ghost" id="signUp">Cadastrar</button>
560
- </div>
561
- </div>
562
  </div>
563
- </div>
564
-
565
- <script>
566
- // --- Seleção de Elementos ---
567
- const container = document.getElementById('container');
568
- const signUpBtn = document.getElementById('signUp');
569
- const signInBtn = document.getElementById('signIn');
570
- const formSignIn = document.getElementById('formSignIn');
571
- const formSignUp = document.getElementById('formSignUp');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
572
 
573
- // Containers Mobile
574
- const signInContainer = document.getElementById('signInFormContainer');
575
- const signUpContainer = document.getElementById('signUpFormContainer');
576
-
577
- // --- Lógica de Alternância de Painel (Desktop) ---
578
- signUpBtn.addEventListener('click', () => {
579
- container.classList.add("right-panel-active");
580
- });
581
-
582
- signInBtn.addEventListener('click', () => {
583
- container.classList.remove("right-panel-active");
584
- });
585
-
586
- // --- Lógica Mobile (Troca de display) ---
587
- function showMobileLogin(type) {
588
- if (type === 'up') {
589
- signUpContainer.classList.add('active-mobile');
590
- signInContainer.classList.remove('active-mobile');
591
- } else {
592
- signInContainer.classList.add('active-mobile');
593
- signUpContainer.classList.remove('active-mobile');
594
- }
595
- }
596
-
597
- // --- Funcionalidade: Mostrar/Ocultar Senha ---
598
- function togglePassword(inputId, icon) {
599
- const input = document.getElementById(inputId);
600
- if (input.type === "password") {
601
- input.type = "text";
602
- icon.classList.remove("fa-eye");
603
- icon.classList.add("fa-eye-slash");
604
- } else {
605
- input.type = "password";
606
- icon.classList.remove("fa-eye-slash");
607
- icon.classList.add("fa-eye");
608
- }
609
- }
610
-
611
- // --- Sistema de Notificações (Toasts) ---
612
- function showToast(message, type = 'success') {
613
- const container = document.getElementById('toast-container');
614
- const toast = document.createElement('div');
615
- toast.className = `toast ${type}`;
616
-
617
- const iconClass = type === 'success' ? 'fa-check-circle' : 'fa-exclamation-circle';
618
- const title = type === 'success' ? 'Sucesso' : 'Erro';
619
-
620
- toast.innerHTML = `
621
- <i class="fas ${iconClass}"></i>
622
- <div class="toast-content">
623
- <h4>${title}</h4>
624
- <p>${message}</p>
625
- </div>
626
- `;
627
-
628
- container.appendChild(toast);
629
-
630
- // Remover após 3 segundos
631
- setTimeout(() => {
632
- toast.style.animation = 'fadeOut 0.5s ease forwards';
633
- toast.addEventListener('animationend', () => {
634
- toast.remove();
635
- });
636
- }, 3000);
637
- }
638
-
639
- // --- Simulação de "Esqueceu a Senha" ---
640
- function forgotPassword() {
641
- const email = document.getElementById('loginEmail').value;
642
- if (!email || !email.includes('@')) {
643
- showToast('Por favor, insira um e-mail válido no campo de login.', 'error');
644
- return;
645
- }
646
- showToast(`Link de recuperação enviado para ${email}`, 'success');
647
  }
 
 
648
 
649
- // --- Manipulação do Formulário de Login ---
650
- formSignIn.addEventListener('submit', (e) => {
651
- e.preventDefault();
652
- const email = document.getElementById('loginEmail').value;
653
- const password = document.getElementById('loginPassword').value;
654
- const btn = formSignIn.querySelector('button');
655
-
656
- // Efeito de carregamento
657
- const originalText = btn.innerText;
658
- btn.innerText = 'Entrando...';
659
- btn.disabled = true;
660
-
661
- // Simulação de delay de rede
662
- setTimeout(() => {
663
- btn.innerText = originalText;
664
- btn.disabled = false;
665
-
666
- // Validação simples
667
- if (password.length < 6) {
668
- showToast('A senha deve ter pelo menos 6 caracteres.', 'error');
669
- } else {
670
- showToast(`Bem-vindo de volta, ${email.split('@')[0]}!`, 'success');
671
- // Aqui você redirecionaria o usuário
672
- }
673
- }, 1500);
674
- });
675
-
676
- // --- Manipulação do Formulário de Cadastro ---
677
- formSignUp.addEventListener('submit', (e) => {
678
- e.preventDefault();
679
- const name = document.getElementById('regName').value;
680
- const email = document.getElementById('regEmail').value;
681
- const password = document.getElementById('regPassword').value;
682
- const btn = formSignUp.querySelector('button');
683
-
684
- // Efeito de carregamento
685
- const originalText = btn.innerText;
686
- btn.innerText = 'Criando conta...';
687
- btn.disabled = true;
688
-
689
- setTimeout(() => {
690
- btn.innerText = originalText;
691
- btn.disabled = false;
692
-
693
- // Validação
694
- if (password.length < 6) {
695
- showToast('A senha é muito curta.', 'error');
696
- } else {
697
- showToast(`Conta criada com sucesso para ${name}!`, 'success');
698
-
699
- // Resetar formulário e mudar para tela de login
700
- formSignUp.reset();
701
- if (window.innerWidth > 768) {
702
- container.classList.remove("right-panel-active");
703
- } else {
704
- showMobileLogin('in');
705
- }
706
- }
707
- }, 1500);
708
- });
709
-
710
- // --- Animação Inicial Sutil ---
711
- window.addEventListener('load', () => {
712
- container.style.opacity = '0';
713
- container.style.transform = 'translateY(20px)';
714
-
715
- setTimeout(() => {
716
- container.style.transition = 'opacity 0.8s ease, transform 0.8s ease';
717
- container.style.opacity = '1';
718
- container.style.transform = 'translateY(0)';
719
- }, 100);
720
- });
721
-
722
- </script>
723
  </body>
724
  </html>
 
1
  <!DOCTYPE html>
2
  <html lang="pt-BR">
3
+
4
  <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Login Criativo Neon</title>
8
+ <!-- Importando ícones (FontAwesome) -->
9
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
+ <!-- Importando fontes (Poppins & Orbitron para toque tech) -->
11
+ <link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
12
+
13
+ <style>
14
+ :root {
15
+ --primary: #00f260;
16
+ --secondary: #0575E6;
17
+ --accent: #ff0055;
18
+ --dark-bg: #0f0c29;
19
+ --glass-bg: rgba(255, 255, 255, 0.05);
20
+ --glass-border: rgba(255, 255, 255, 0.1);
21
+ --text-main: #ffffff;
22
+ --text-muted: #a0a0a0;
23
+ --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
24
+ }
25
+
26
+ * {
27
+ box-sizing: border-box;
28
+ margin: 0;
29
+ padding: 0;
30
+ }
31
+
32
+ body {
33
+ font-family: 'Poppins', sans-serif;
34
+ background-color: var(--dark-bg);
35
+ /* Gradiente de fundo estático para fallback */
36
+ background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
37
+ height: 100vh;
38
+ display: flex;
39
+ justify-content: center;
40
+ align-items: center;
41
+ overflow: hidden;
42
+ color: var(--text-main);
43
+ }
44
+
45
+ /* --- Canvas de Partículas --- */
46
+ #particle-canvas {
47
+ position: absolute;
48
+ top: 0;
49
+ left: 0;
50
+ width: 100%;
51
+ height: 100%;
52
+ z-index: 0;
53
+ pointer-events: none; /* Deixa cliques passarem para o login */
54
+ }
55
+
56
+ /* --- Header / Branding --- */
57
+ header {
58
+ position: absolute;
59
+ top: 0;
60
+ left: 0;
61
+ width: 100%;
62
+ padding: 20px;
63
+ display: flex;
64
+ justify-content: center;
65
+ z-index: 100;
66
+ }
67
+
68
+ .brand-link {
69
+ text-decoration: none;
70
+ color: rgba(255, 255, 255, 0.8);
71
+ font-size: 0.9rem;
72
+ font-weight: 600;
73
+ background: rgba(0, 0, 0, 0.3);
74
+ padding: 10px 20px;
75
+ border-radius: 30px;
76
+ backdrop-filter: blur(10px);
77
+ border: 1px solid var(--glass-border);
78
+ transition: var(--transition);
79
+ display: inline-flex;
80
+ align-items: center;
81
+ gap: 10px;
82
+ font-family: 'Orbitron', sans-serif;
83
+ letter-spacing: 1px;
84
+ }
85
+
86
+ .brand-link:hover {
87
+ background: rgba(255, 255, 255, 0.1);
88
+ border-color: var(--primary);
89
+ box-shadow: 0 0 15px rgba(0, 242, 96, 0.4);
90
+ transform: translateY(-2px);
91
+ color: #fff;
92
+ }
93
+
94
+ /* --- Container Principal (Glass Card) --- */
95
+ .main-container {
96
+ position: relative;
97
+ width: 900px;
98
+ max-width: 90%;
99
+ min-height: 600px;
100
+ background: var(--glass-bg);
101
+ backdrop-filter: blur(16px);
102
+ -webkit-backdrop-filter: blur(16px);
103
+ border: 1px solid var(--glass-border);
104
+ border-radius: 30px;
105
+ box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
106
+ overflow: hidden;
107
+ z-index: 10;
108
+ display: flex;
109
+ flex-direction: row;
110
+ transition: transform 0.3s ease;
111
+ }
112
+
113
+ /* --- Área dos Formulários --- */
114
+ .forms-wrapper {
115
+ position: relative;
116
+ width: 50%;
117
+ height: 100%;
118
+ display: flex;
119
+ flex-direction: column;
120
+ justify-content: center;
121
+ align-items: center;
122
+ padding: 40px;
123
+ transition: var(--transition);
124
+ }
125
+
126
+ form {
127
+ width: 100%;
128
+ max-width: 320px;
129
+ display: flex;
130
+ flex-direction: column;
131
+ gap: 20px;
132
+ position: absolute;
133
+ top: 50%;
134
+ left: 50%;
135
+ transform: translate(-50%, -50%);
136
+ opacity: 0;
137
+ pointer-events: none;
138
+ transition: var(--transition);
139
+ }
140
+
141
+ /* Estado Ativo do Formulário */
142
+ form.active-form {
143
+ opacity: 1;
144
+ pointer-events: all;
145
+ transform: translate(-50%, -50%) scale(1);
146
+ }
147
+
148
+ form.inactive-left {
149
+ transform: translate(-120%, -50%) scale(0.9);
150
+ opacity: 0;
151
+ }
152
+
153
+ form.inactive-right {
154
+ transform: translate(20%, -50%) scale(0.9);
155
+ opacity: 0;
156
+ }
157
+
158
+ h2 {
159
+ font-family: 'Orbitron', sans-serif;
160
+ font-size: 2rem;
161
+ margin-bottom: 10px;
162
+ background: linear-gradient(to right, #fff, #a0a0a0);
163
+ -webkit-background-clip: text;
164
+ -webkit-text-fill-color: transparent;
165
+ text-align: center;
166
+ }
167
+
168
+ .subtitle {
169
+ text-align: center;
170
+ color: var(--text-muted);
171
+ font-size: 0.9rem;
172
+ margin-bottom: 20px;
173
+ }
174
+
175
+ /* --- Inputs Criativos --- */
176
+ .input-box {
177
+ position: relative;
178
+ width: 100%;
179
+ height: 50px;
180
+ margin-bottom: 10px;
181
+ }
182
+
183
+ .input-box input {
184
+ width: 100%;
185
+ height: 100%;
186
+ background: rgba(255, 255, 255, 0.05);
187
+ border: 1px solid rgba(255, 255, 255, 0.1);
188
+ border-radius: 10px;
189
+ outline: none;
190
+ color: #fff;
191
+ padding: 0 45px 0 20px;
192
+ font-size: 1rem;
193
+ transition: var(--transition);
194
+ }
195
+
196
+ .input-box input:focus {
197
+ border-color: var(--primary);
198
+ background: rgba(255, 255, 255, 0.1);
199
+ box-shadow: 0 0 15px rgba(0, 242, 96, 0.2);
200
+ }
201
+
202
+ .input-box i.icon {
203
+ position: absolute;
204
+ right: 15px;
205
+ top: 50%;
206
+ transform: translateY(-50%);
207
+ color: var(--text-muted);
208
+ font-size: 1.1rem;
209
+ transition: var(--transition);
210
+ }
211
+
212
+ .input-box input:focus + i.icon {
213
+ color: var(--primary);
214
+ }
215
+
216
+ /* Botão Toggle Password */
217
+ .input-box i.toggle-pass {
218
+ right: 40px;
219
+ cursor: pointer;
220
+ }
221
+ .input-box input:focus ~ i.toggle-pass {
222
+ color: var(--text-muted);
223
+ }
224
+ .input-box i.toggle-pass:hover {
225
+ color: #fff !important;
226
+ }
227
+
228
+ /* --- Links --- */
229
+ .forgot-link {
230
+ text-align: right;
231
+ font-size: 0.85rem;
232
+ color: var(--text-muted);
233
+ text-decoration: none;
234
+ transition: 0.3s;
235
+ align-self: flex-end;
236
+ }
237
+
238
+ .forgot-link:hover {
239
+ color: var(--primary);
240
+ text-shadow: 0 0 8px rgba(0, 242, 96, 0.4);
241
+ }
242
+
243
+ /* --- Botões --- */
244
+ .btn-main {
245
+ width: 100%;
246
+ height: 50px;
247
+ background: linear-gradient(90deg, var(--secondary), var(--primary));
248
+ border: none;
249
+ border-radius: 25px;
250
+ color: #fff;
251
+ font-weight: 600;
252
+ font-size: 1rem;
253
+ cursor: pointer;
254
+ transition: var(--transition);
255
+ position: relative;
256
+ overflow: hidden;
257
+ display: flex;
258
+ justify-content: center;
259
+ align-items: center;
260
+ gap: 10px;
261
+ }
262
+
263
+ .btn-main::before {
264
+ content: '';
265
+ position: absolute;
266
+ top: 0;
267
+ left: -100%;
268
+ width: 100%;
269
+ height: 100%;
270
+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
271
+ transition: 0.5s;
272
+ }
273
+
274
+ .btn-main:hover {
275
+ transform: translateY(-3px);
276
+ box-shadow: 0 10px 20px rgba(0, 242, 96, 0.3);
277
+ }
278
+
279
+ .btn-main:hover::before {
280
+ left: 100%;
281
+ }
282
+
283
+ .btn-main:active {
284
+ transform: scale(0.98);
285
+ }
286
+
287
+ /* --- Painel Lateral (Overlay) --- */
288
+ .overlay-panel {
289
+ position: absolute;
290
+ top: 0;
291
+ left: 50%;
292
+ width: 50%;
293
+ height: 100%;
294
+ background: linear-gradient(135deg, rgba(5, 117, 230, 0.8), rgba(0, 242, 96, 0.6));
295
+ backdrop-filter: blur(20px);
296
+ display: flex;
297
+ justify-content: center;
298
+ align-items: center;
299
+ flex-direction: column;
300
+ padding: 40px;
301
+ transition: var(--transition);
302
+ z-index: 20;
303
+ clip-path: polygon(20% 0%, 100% 0, 100% 100%, 0% 100%);
304
+ }
305
+
306
+ .overlay-content {
307
+ text-align: center;
308
+ color: #fff;
309
+ transform: translateX(0);
310
+ transition: var(--transition);
311
+ }
312
+
313
+ .overlay-content h3 {
314
+ font-family: 'Orbitron', sans-serif;
315
+ font-size: 2.2rem;
316
+ margin-bottom: 15px;
317
+ text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
318
+ }
319
+
320
+ .overlay-content p {
321
+ font-size: 1rem;
322
+ margin-bottom: 30px;
323
+ line-height: 1.6;
324
+ opacity: 0.9;
325
+ }
326
+
327
+ .btn-ghost {
328
+ background: transparent;
329
+ border: 2px solid #fff;
330
+ color: #fff;
331
+ padding: 12px 40px;
332
+ border-radius: 25px;
333
+ font-weight: 600;
334
+ cursor: pointer;
335
+ transition: var(--transition);
336
+ font-size: 0.9rem;
337
+ backdrop-filter: blur(5px);
338
+ }
339
+
340
+ .btn-ghost:hover {
341
+ background: #fff;
342
+ color: var(--secondary);
343
+ box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
344
+ }
345
+
346
+ /* --- Lógica de Troca de Painel (Desktop) --- */
347
+ .main-container.switch-mode .overlay-panel {
348
+ left: 0;
349
+ clip-path: polygon(0 0, 80% 0, 100% 100%, 0% 100%);
350
+ background: linear-gradient(135deg, rgba(255, 0, 85, 0.7), rgba(5, 117, 230, 0.7));
351
+ }
352
+
353
+ .main-container.switch-mode .forms-wrapper {
354
+ /* Ajuste sutil se necessário */
355
+ }
356
+
357
+ /* Animação do conteúdo dentro do overlay */
358
+ .overlay-content.hidden-left {
359
+ transform: translateX(-50px);
360
+ opacity: 0;
361
+ pointer-events: none;
362
+ position: absolute;
363
+ }
364
+
365
+ .overlay-content.hidden-right {
366
+ transform: translateX(50px);
367
+ opacity: 0;
368
+ pointer-events: none;
369
+ position: absolute;
370
+ }
371
+
372
+ /* --- Toast Notification Neon --- */
373
+ #toast-container {
374
+ position: fixed;
375
+ top: 100px;
376
+ right: 20px;
377
+ z-index: 200;
378
+ display: flex;
379
+ flex-direction: column;
380
+ gap: 15px;
381
+ }
382
+
383
+ .toast {
384
+ background: rgba(15, 12, 41, 0.9);
385
+ border: 1px solid var(--glass-border);
386
+ color: #fff;
387
+ padding: 16px 24px;
388
+ border-radius: 12px;
389
+ display: flex;
390
+ align-items: center;
391
+ gap: 15px;
392
+ min-width: 300px;
393
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
394
+ backdrop-filter: blur(10px);
395
+ animation: slideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
396
+ border-left: 4px solid;
397
+ }
398
+
399
+ .toast.success { border-left-color: var(--primary); }
400
+ .toast.error { border-left-color: var(--accent); }
401
+
402
+ .toast i { font-size: 1.4rem; }
403
+ .toast.success i { color: var(--primary); text-shadow: 0 0 10px var(--primary); }
404
+ .toast.error i { color: var(--accent); text-shadow: 0 0 10px var(--accent); }
405
+
406
+ @keyframes slideIn {
407
+ from { transform: translateX(120%); opacity: 0; }
408
+ to { transform: translateX(0); opacity: 1; }
409
+ }
410
+
411
+ @keyframes fadeOut {
412
+ to { transform: translateX(100%); opacity: 0; }
413
+ }
414
+
415
+ /* --- Social Icons --- */
416
+ .social-icons {
417
+ display: flex;
418
+ gap: 15px;
419
+ margin-bottom: 20px;
420
+ }
421
 
422
+ .social-icons a {
423
+ width: 40px;
424
+ height: 40px;
425
+ border-radius: 50%;
426
+ border: 1px solid rgba(255,255,255,0.2);
427
+ display: flex;
428
+ align-items: center;
429
+ justify-content: center;
430
+ color: #fff;
431
+ text-decoration: none;
432
+ transition: 0.3s;
433
+ background: rgba(255,255,255,0.05);
434
+ }
435
+
436
+ .social-icons a:hover {
437
+ background: var(--primary);
438
+ border-color: var(--primary);
439
+ transform: rotate(360deg);
440
+ box-shadow: 0 0 15px var(--primary);
441
+ }
442
+
443
+ /* --- Responsividade --- */
444
+ @media (max-width: 768px) {
445
+ .main-container {
446
+ width: 100%;
447
+ height: 100vh;
448
+ border-radius: 0;
449
+ flex-direction: column;
450
+ overflow-y: auto;
451
+ }
452
+
453
+ .forms-wrapper {
454
+ width: 100%;
455
+ height: 70%;
456
+ padding: 20px;
457
+ }
458
+
459
+ .overlay-panel {
460
+ display: none; /* Esconder overlay complexo no mobile */
461
+ }
462
+
463
+ /* Modo Mobile Simplificado */
464
+ .mobile-toggle-btn {
465
+ display: block;
466
+ margin-top: 20px;
467
+ color: var(--primary);
468
+ cursor: pointer;
469
+ text-align: center;
470
+ font-size: 0.9rem;
471
+ text-decoration: underline;
472
+ }
473
+
474
+ /* Resetar posições para mobile stack */
475
+ form {
476
+ position: relative;
477
+ top: auto;
478
+ left: auto;
479
+ transform: none !important;
480
+ opacity: 1;
481
+ pointer-events: all;
482
+ display: none;
483
+ }
484
+
485
+ form.active-form {
486
+ display: flex;
487
+ animation: fadeIn 0.5s;
488
+ }
489
+
490
+ @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
491
+ }
492
+
493
+ @media (min-width: 769px) {
494
+ .mobile-toggle-btn { display: none; }
495
+ }
496
+ </style>
497
+ </head>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
498
 
499
+ <body>
 
 
 
 
 
 
 
 
 
500
 
501
+ <!-- Canvas para Animação de Fundo -->
502
+ <canvas id="particle-canvas"></canvas>
503
+
504
+ <!-- Header Obrigatório -->
505
+ <header>
506
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="brand-link">
507
+ <i class="fas fa-atom"></i> Built with anycoder
508
+ </a>
509
+ </header>
510
+
511
+ <!-- Container de Notificações -->
512
+ <div id="toast-container"></div>
513
+
514
+ <!-- Container Principal -->
515
+ <div class="main-container" id="mainContainer">
516
+
517
+ <!-- Área dos Formulários -->
518
+ <div class="forms-wrapper">
519
+
520
+ <!-- Formulário de Login -->
521
+ <form id="loginForm" class="active-form">
522
+ <h2>Bem-vindo</h2>
523
+ <p class="subtitle">Acesse sua conta para continuar</p>
524
+
525
+ <div class="social-icons">
526
+ <a href="#"><i class="fab fa-google"></i></a>
527
+ <a href="#"><i class="fab fa-github"></i></a>
528
+ <a href="#"><i class="fab fa-discord"></i></a>
529
+ </div>
530
 
531
+ <div class="input-box">
532
+ <input type="email" placeholder="E-mail" required id="loginEmail">
533
+ <i class="fas fa-envelope icon"></i>
534
+ </div>
535
 
536
+ <div class="input-box">
537
+ <input type="password" placeholder="Senha" required id="loginPassword">
538
+ <i class="fas fa-lock icon"></i>
539
+ <i class="fas fa-eye toggle-pass" onclick="togglePassword('loginPassword', this)"></i>
540
+ </div>
 
 
 
 
 
 
 
 
 
541
 
542
+ <a href="#" class="forgot-link" onclick="forgotPassword()">Esqueceu a senha?</a>
 
 
543
 
544
+ <button type="submit" class="btn-main">
545
+ Entrar <i class="fas fa-arrow-right"></i>
546
+ </button>
 
 
 
 
 
 
 
 
 
 
 
547
 
548
+ <div class="mobile-toggle-btn" onclick="toggleMode('up')">Não tem conta? Cadastre-se</div>
549
+ </form>
 
550
 
551
+ <!-- Formulário de Cadastro -->
552
+ <form id="registerForm" class="inactive-right">
553
+ <h2>Criar Conta</h2>
554
+ <p class="subtitle">Junte-se à nossa comunidade</p>
555
 
556
+ <div class="social-icons">
557
+ <a href="#"><i class="fab fa-google"></i></a>
558
+ <a href="#"><i class="fab fa-github"></i></a>
559
+ <a href="#"><i class="fab fa-discord"></i></a>
560
+ </div>
 
 
 
561
 
562
+ <div class="input-box">
563
+ <input type="text" placeholder="Nome Completo" required id="regName">
564
+ <i class="fas fa-user icon"></i>
565
+ </div>
566
 
567
+ <div class="input-box">
568
+ <input type="email" placeholder="E-mail" required id="regEmail">
569
+ <i class="fas fa-envelope icon"></i>
570
+ </div>
 
 
 
571
 
572
+ <div class="input-box">
573
+ <input type="password" placeholder="Senha" required id="regPassword">
574
+ <i class="fas fa-lock icon"></i>
575
+ <i class="fas fa-eye toggle-pass" onclick="togglePassword('regPassword', this)"></i>
576
+ </div>
 
 
 
 
 
 
 
577
 
578
+ <button type="submit" class="btn-main">
579
+ Cadastrar <i class="fas fa-user-plus"></i>
580
+ </button>
 
 
581
 
582
+ <div class="mobile-toggle-btn" onclick="toggleMode('in')">Já tem conta? Entrar</div>
583
+ </form>
 
 
 
 
 
 
 
 
584
 
585
+ </div>
 
 
 
 
 
 
 
 
 
 
 
586
 
587
+ <!-- Painel de Overlay (Animação Lateral) -->
588
+ <div class="overlay-panel">
589
+
590
+ <!-- Conteúdo Visível quando no Login -->
591
+ <div class="overlay-content" id="overlayLoginContent">
592
+ <h3>Novo por aqui?</h3>
593
+ <p>Descubra um mundo de possibilidades criativas interagindo com nossa plataforma.</p>
594
+ <button class="btn-ghost" id="btnToRegister">Cadastre-se</button>
595
+ </div>
596
+
597
+ <!-- Conteúdo Visível quando no Cadastro -->
598
+ <div class="overlay-content hidden-right" id="overlayRegisterContent">
599
+ <h3>Já é membro?</h3>
600
+ <p>Continue sua jornada de onde parou. Estamos ansiosos para te ver novamente.</p>
601
+ <button class="btn-ghost" id="btnToLogin">Entrar</button>
602
+ </div>
603
 
604
+ </div>
 
 
605
 
606
+ </div>
 
607
 
608
+ <script>
609
+ /**
610
+ * LÓGICA DE PARTÍCULAS (BACKGROUND)
611
+ */
612
+ const canvas = document.getElementById('particle-canvas');
613
+ const ctx = canvas.getContext('2d');
614
+
615
+ let particlesArray;
616
+
617
+ // Ajustar tamanho do canvas
618
+ canvas.width = window.innerWidth;
619
+ canvas.height = window.innerHeight;
620
+
621
+ // Mouse interaction
622
+ let mouse = {
623
+ x: null,
624
+ y: null,
625
+ radius: (canvas.height/80) * (canvas.width/80)
626
+ }
627
+
628
+ window.addEventListener('mousemove', (event) => {
629
+ mouse.x = event.x;
630
+ mouse.y = event.y;
631
+ });
632
+
633
+ // Classe da Partícula
634
+ class Particle {
635
+ constructor(x, y, directionX, directionY, size, color) {
636
+ this.x = x;
637
+ this.y = y;
638
+ this.directionX = directionX;
639
+ this.directionY = directionY;
640
+ this.size = size;
641
+ this.color = color;
642
+ }
643
+ // Desenhar partícula
644
+ draw() {
645
+ ctx.beginPath();
646
+ ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2, false);
647
+ ctx.fillStyle = this.color;
648
+ ctx.fill();
649
+ }
650
+ // Atualizar movimento e verificar colisão com mouse
651
+ update() {
652
+ if (this.x > canvas.width || this.x < 0) this.directionX = -this.directionX;
653
+ if (this.y > canvas.height || this.y < 0) this.directionY = -this.directionY;
654
+
655
+ // Verificar distância do mouse (efeito de repulsão suave)
656
+ let dx = mouse.x - this.x;
657
+ let dy = mouse.y - this.y;
658
+ let distance = Math.sqrt(dx*dx + dy*dy);
659
 
660
+ if (distance < mouse.radius + this.size) {
661
+ if (mouse.x < this.x && this.x < canvas.width - this.size * 10) this.x += 3;
662
+ if (mouse.x > this.x && this.x > this.size * 10) this.x -= 3;
663
+ if (mouse.y < this.y && this.y < canvas.height - this.size * 10) this.y += 3;
664
+ if (mouse.y > this.y && this.y > this.size * 10) this.y -= 3;
665
+ }
666
+
667
+ this.x += this.directionX;
668
+ this.y += this.directionY;
669
+ this.draw();
670
+ }
671
+ }
672
+
673
+ // Inicializar Partículas
674
+ function initParticles() {
675
+ particlesArray = [];
676
+ let numberOfParticles = (canvas.height * canvas.width) / 9000;
677
+ for (let i = 0; i < numberOfParticles; i++) {
678
+ let size = (Math.random() * 2) + 1;
679
+ let x = (Math.random() * ((innerWidth - size * 2) - (size * 2)) + size * 2);
680
+ let y = (Math.random() * ((innerHeight - size * 2) - (size * 2)) + size * 2);
681
+ let directionX = (Math.random() * 0.4) - 0.2;
682
+ let directionY = (Math.random() * 0.4) - 0.2;
683
+ let color = '#00f260';
684
+
685
+ particlesArray.push(new Particle(x, y, directionX, directionY, size, color));
686
+ }
687
+ }
688
+
689
+ // Loop de Animação
690
+ function animateParticles() {
691
+ requestAnimationFrame(animateParticles);
692
+ ctx.clearRect(0, 0, innerWidth, innerHeight);
693
+
694
+ for (let i = 0; i < particlesArray.length; i++) {
695
+ particlesArray[i].update();
696
+ }
697
+ connectParticles();
698
+ }
699
+
700
+ // Conectar partículas próximas com linhas
701
+ function connectParticles() {
702
+ let opacityValue = 1;
703
+ for (let a = 0; a < particlesArray.length; a++) {
704
+ for (let b = a; b < particlesArray.length; b++) {
705
+ let distance = ((particlesArray[a].x - particlesArray[b].x) * (particlesArray[a].x - particlesArray[b].x)) +
706
+ ((particlesArray[a].y - particlesArray[b].y) * (particlesArray[a].y - particlesArray[b].y));
707
+ if (distance < (canvas.width/7) * (canvas.height/7)) {
708
+ opacityValue = 1 - (distance/20000);
709
+ ctx.strokeStyle = 'rgba(0, 242, 96,' + opacityValue + ')';
710
+ ctx.lineWidth = 1;
711
+ ctx.beginPath();
712
+ ctx.moveTo(particlesArray[a].x, particlesArray[a].y);
713
+ ctx.lineTo(particlesArray[b].x, particlesArray[b].y);
714
+ ctx.stroke();
715
+ }
716
+ }
717
+ }
718
+ }
719
+
720
+ window.addEventListener('resize', () => {
721
+ canvas.width = innerWidth;
722
+ canvas.height = innerHeight;
723
+ mouse.radius = ((canvas.height/80) * (canvas.height/80));
724
+ initParticles();
725
+ });
726
+
727
+ // Iniciar Canvas
728
+ initParticles();
729
+ animateParticles();
730
+
731
+
732
+ /**
733
+ * LÓGICA DA UI E FORMULÁRIOS
734
+ */
735
+ const container = document.getElementById('mainContainer');
736
+ const btnToRegister = document.getElementById('btnToRegister');
737
+ const btnToLogin = document.getElementById('btnToLogin');
738
+
739
+ const loginForm = document.getElementById('loginForm');
740
+ const registerForm = document.getElementById('registerForm');
741
+
742
+ const overlayLoginContent = document.getElementById('overlayLoginContent');
743
+ const overlayRegisterContent = document.getElementById('overlayRegisterContent');
744
+
745
+ // Função para alternar modos (Desktop)
746
+ function switchPanel() {
747
+ container.classList.toggle('switch-mode');
748
+
749
+ // Animar textos do overlay
750
+ if (container.classList.contains('switch-mode')) {
751
+ overlayLoginContent.classList.add('hidden-left');
752
+ overlayLoginContent.classList.remove('hidden-right');
753
+ overlayRegisterContent.classList.remove('hidden-right');
754
 
755
+ // Trocar Forms
756
+ loginForm.classList.remove('active-form');
757
+ loginForm.classList.add('inactive-left');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
758
 
759
+ registerForm.classList.remove('inactive-right');
760
+ registerForm.classList.add('active-form');
761
+ } else {
762
+ overlayLoginContent.classList.remove('hidden-left');
763
+ overlayRegisterContent.classList.add('hidden-right');
764
+
765
+ // Trocar Forms
766
+ registerForm.classList.remove('active-form');
767
+ registerForm.classList.add('inactive-right');
768
+
769
+ loginForm.classList.remove('inactive-left');
770
+ loginForm.classList.add('active-form');
771
+ }
772
+ }
773
+
774
+ // Event Listeners Desktop
775
+ btnToRegister.addEventListener('click', switchPanel);
776
+ btnToLogin.addEventListener('click', switchPanel);
777
+
778
+ // Função Mobile (Simples troca de display)
779
+ function toggleMode(mode) {
780
+ if (mode === 'up') {
781
+ loginForm.classList.remove('active-form');
782
+ registerForm.classList.add('active-form');
783
+ } else {
784
+ registerForm.classList.remove('active-form');
785
+ loginForm.classList.add('active-form');
786
+ }
787
+ }
788
+
789
+ // Toggle Password Visibility
790
+ function togglePassword(inputId, icon) {
791
+ const input = document.getElementById(inputId);
792
+ if (input.type === "password") {
793
+ input.type = "text";
794
+ icon.classList.remove("fa-eye");
795
+ icon.classList.add("fa-eye-slash");
796
+ } else {
797
+ input.type = "password";
798
+ icon.classList.remove("fa-eye-slash");
799
+ icon.classList.add("fa-eye");
800
+ }
801
+ }
802
+
803
+ // Sistema de Toast (Notificações)
804
+ function showToast(message, type = 'success') {
805
+ const toastContainer = document.getElementById('toast-container');
806
+ const toast = document.createElement('div');
807
+ toast.className = `toast ${type}`;
808
+
809
+ const iconClass = type === 'success' ? 'fa-check-circle' : 'fa-exclamation-triangle';
810
+ const title = type === 'success' ? 'Sucesso' : 'Atenção';
811
+
812
+ toast.innerHTML = `
813
+ <i class="fas ${iconClass}"></i>
814
+ <div>
815
+ <h4 style="font-size:14px; margin-bottom:2px;">${title}</h4>
816
+ <p style="font-size:12px; opacity:0.8;">${message}</p>
 
 
 
 
 
 
 
 
 
 
817
  </div>
818
+ `;
819
+
820
+ toastContainer.appendChild(toast);
821
+
822
+ setTimeout(() => {
823
+ toast.style.animation = 'fadeOut 0.5s ease forwards';
824
+ toast.addEventListener('animationend', () => toast.remove());
825
+ }, 3500);
826
+ }
827
+
828
+ // Simulação de Forgot Password
829
+ function forgotPassword() {
830
+ const email = document.getElementById('loginEmail').value;
831
+ if (!email) {
832
+ showToast('Digite seu e-mail no campo de login primeiro.', 'error');
833
+ return;
834
+ }
835
+ showToast(`Link de recuperação enviado para ${email}`, 'success');
836
+ }
837
+
838
+ // Handler Login
839
+ document.getElementById('loginForm').addEventListener('submit', (e) => {
840
+ e.preventDefault();
841
+ const btn = e.target.querySelector('button');
842
+ const originalContent = btn.innerHTML;
843
+
844
+ // Loading state
845
+ btn.innerHTML = '<i class="fas fa-circle-notch fa-spin"></i> Processando...';
846
+ btn.disabled = true;
847
+
848
+ setTimeout(() => {
849
+ btn.innerHTML = originalContent;
850
+ btn.disabled = false;
851
+ showToast('Login realizado com sucesso!', 'success');
852
+ }, 2000);
853
+ });
854
+
855
+ // Handler Registro
856
+ document.getElementById('registerForm').addEventListener('submit', (e) => {
857
+ e.preventDefault();
858
+ const btn = e.target.querySelector('button');
859
+ const originalContent = btn.innerHTML;
860
+
861
+ btn.innerHTML = '<i class="fas fa-circle-notch fa-spin"></i> Criando...';
862
+ btn.disabled = true;
863
+
864
+ setTimeout(() => {
865
+ btn.innerHTML = originalContent;
866
+ btn.disabled = false;
867
+ showToast('Conta criada! Bem-vindo a bordo.', 'success');
868
 
869
+ // Resetar e ir para login
870
+ e.target.reset();
871
+ if (window.innerWidth > 768) {
872
+ switchPanel();
873
+ } else {
874
+ toggleMode('in');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
875
  }
876
+ }, 2000);
877
+ });
878
 
879
+ </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
880
  </body>
881
  </html>