samirerty commited on
Commit
c1fee8b
·
verified ·
1 Parent(s): b16b508

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +202 -318
index.html CHANGED
@@ -4,138 +4,99 @@
4
  <head>
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
7
- <title>ورود و ثبت نام | سیستم امن</title>
8
-
9
- <!-- ایمپورت فونت وزیرمتن -->
10
- <link href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css" rel="stylesheet"
11
- type="text/css" />
12
-
13
- <!-- ایمپورت کتابخانه آیکون‌ها -->
14
- <script src="https://unpkg.com/@phosphor-icons/web"></script>
15
 
16
  <style>
17
- /* تنظیمات متغیرهای رنگی و کلی */
18
  :root {
19
- --bg-color: #0f172a;
20
- --card-bg: rgba(30, 41, 59, 0.7);
21
- --input-bg: rgba(15, 23, 42, 0.6);
22
  --primary-color: #6366f1;
23
  --primary-hover: #4f46e5;
24
- --text-color: #f8fafc;
25
  --text-muted: #94a3b8;
26
- --border-color: #334155;
27
  --error-color: #ef4444;
28
  --success-color: #22c55e;
29
- --font-family: 'Vazirmatn', sans-serif;
30
- --transition: all 0.3s ease;
31
- --radius: 16px;
32
  }
33
 
34
  * {
35
  box-sizing: border-box;
36
  margin: 0;
37
  padding: 0;
38
- outline: none;
39
- -webkit-tap-highlight-color: transparent; /* حذف هایلایت آبی در موبایل */
40
  }
41
 
42
  body {
43
- font-family: var(--font-family);
44
  background-color: var(--bg-color);
45
- /* پس‌زمینه گرادینت متحرک */
46
- background-image:
47
- radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
48
- radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
49
- radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
50
- background-size: 150% 150%;
51
- animation: gradientBG 15s ease infinite;
52
  color: var(--text-color);
53
  min-height: 100vh;
54
  display: flex;
55
  justify-content: center;
56
  align-items: center;
57
- /* پدینگ امن برای موبایل */
58
- padding: clamp(15px, 4vw, 40px);
59
- overflow-x: hidden;
60
- }
61
-
62
- @keyframes gradientBG {
63
- 0% { background-position: 0% 50%; }
64
- 50% { background-position: 100% 50%; }
65
- 100% { background-position: 0% 50%; }
66
  }
67
 
68
  /* لینک هدر */
69
  .header-link {
70
  position: fixed;
71
- top: 20px;
72
- left: 20px;
73
  color: var(--text-muted);
74
  text-decoration: none;
75
- font-size: 0.85rem;
76
- transition: var(--transition);
 
 
77
  z-index: 100;
78
- background: rgba(15, 23, 42, 0.5);
79
- padding: 5px 10px;
80
- border-radius: 20px;
81
- backdrop-filter: blur(4px);
82
  }
83
 
84
  .header-link:hover {
85
  color: var(--primary-color);
86
- background: rgba(15, 23, 42, 0.8);
87
  }
88
 
89
- /* کانتینر اصلی کارت */
90
  .container {
91
  width: 100%;
92
- max-width: 440px;
93
  background: var(--card-bg);
94
- backdrop-filter: blur(16px);
95
- -webkit-backdrop-filter: blur(16px);
96
- border: 1px solid rgba(255, 255, 255, 0.1);
97
- border-radius: 24px;
98
- /* پدینگ سیال برای رسپانسیو بودن */
99
- padding: clamp(25px, 6vw, 40px);
100
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
101
- position: relative;
102
- overflow: hidden;
103
- margin: auto;
104
  }
105
 
106
  /* هدر فرم */
107
  .form-header {
108
  text-align: center;
109
- margin-bottom: clamp(20px, 5vw, 30px);
110
  }
111
 
112
  .form-header h2 {
113
- /* اندازه فونت سیال: بین 1.5rem در موبایل تا 2rem در دسکتاپ */
114
- font-size: clamp(1.5rem, 4vw, 2rem);
115
- font-weight: 700;
116
- margin-bottom: 8px;
117
- background: linear-gradient(to right, #818cf8, #c084fc);
118
- -webkit-background-clip: text;
119
- -webkit-text-fill-color: transparent;
120
  }
121
 
122
  .form-header p {
123
  color: var(--text-muted);
124
- font-size: clamp(0.85rem, 2vw, 0.95rem);
125
  }
126
 
127
  /* ورودی‌ها */
128
  .input-group {
129
- margin-bottom: clamp(15px, 4vw, 20px);
130
- position: relative;
131
  }
132
 
133
  .input-group label {
134
  display: block;
135
- margin-bottom: 8px;
136
  color: var(--text-muted);
137
- font-size: 0.9rem;
138
- transition: var(--transition);
139
  }
140
 
141
  .input-wrapper {
@@ -144,63 +105,65 @@
144
  align-items: center;
145
  }
146
 
147
- .input-wrapper i.icon-left {
 
 
 
 
 
 
 
148
  position: absolute;
149
- right: 14px;
150
  color: var(--text-muted);
151
- font-size: 1.2rem;
152
  pointer-events: none;
153
  }
154
 
155
  .input-wrapper input {
156
  width: 100%;
157
- /* ارتفاع مناسب برای لمس در موبایل */
158
- padding: 14px 45px 14px 15px;
159
  background: var(--input-bg);
160
  border: 1px solid var(--border-color);
161
  border-radius: var(--radius);
162
  color: var(--text-color);
163
- font-family: var(--font-family);
164
- font-size: 1rem;
165
- transition: var(--transition);
166
  }
167
 
168
  .input-wrapper input:focus {
169
  border-color: var(--primary-color);
170
- box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
171
  }
172
 
173
  .toggle-password {
174
  position: absolute;
175
- left: 14px;
176
  cursor: pointer;
177
  color: var(--text-muted);
178
- transition: var(--transition);
179
- padding: 5px; /* افزایش ناحیه کلیک */
 
 
 
180
  }
181
 
182
  .toggle-password:hover {
183
  color: var(--text-color);
184
  }
185
 
186
- /* بخش کپچا - کاملاً رسپانسیو */
187
  .captcha-container {
188
  display: flex;
189
  align-items: center;
190
- gap: 10px;
191
- margin-bottom: 25px;
192
- background: rgba(255, 255, 255, 0.03);
193
- padding: 10px;
194
- border-radius: var(--radius);
195
- flex-wrap: wrap; /* اجازه به خط رفتن در صفحات کوچک */
196
- justify-content: center;
197
  }
198
 
199
- canvas#captchaCanvas, canvas#captchaCanvasReg {
200
- background-color: #fff;
201
- border-radius: 8px;
202
  cursor: pointer;
203
- flex-shrink: 0; /* جلوگیری از کوچک شدن بیش از حد */
204
  }
205
 
206
  .refresh-btn {
@@ -208,65 +171,54 @@
208
  border: none;
209
  color: var(--primary-color);
210
  cursor: pointer;
211
- font-size: 1.2rem;
212
- transition: var(--transition);
213
  padding: 5px;
214
  display: flex;
215
  align-items: center;
216
- justify-content: center;
217
- }
218
-
219
- .refresh-btn:hover {
220
- transform: rotate(180deg);
221
  }
222
 
223
  .captcha-container input {
224
- /* ورودی کپچا باید منعطف باشد */
225
  flex-grow: 1;
226
- min-width: 100px; /* حداقل عرض */
227
  padding: 10px;
228
- border-radius: 8px;
229
  border: 1px solid var(--border-color);
230
  background: var(--input-bg);
231
  color: white;
232
  text-align: center;
 
233
  }
234
 
235
  /* دکمه ارسال */
236
  .submit-btn {
237
  width: 100%;
238
- padding: 14px;
239
  background: var(--primary-color);
240
  color: white;
241
  border: none;
242
  border-radius: var(--radius);
243
- font-family: var(--font-family);
244
  font-size: 1rem;
245
- font-weight: 600;
246
  cursor: pointer;
247
- transition: var(--transition);
248
  display: flex;
249
  justify-content: center;
250
  align-items: center;
251
  gap: 8px;
252
- /* بهبود عملکرد کلیک در موبایل */
253
- touch-action: manipulation;
254
  }
255
 
256
  .submit-btn:hover {
257
  background: var(--primary-hover);
258
- transform: translateY(-2px);
259
- box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
260
  }
261
 
262
- .submit-btn:active {
263
- transform: translateY(0);
 
264
  }
265
 
266
- /* لینک تغییر حالت */
267
  .switch-mode {
268
  text-align: center;
269
- margin-top: 20px;
270
  font-size: 0.9rem;
271
  color: var(--text-muted);
272
  }
@@ -276,61 +228,42 @@
276
  border: none;
277
  color: var(--primary-color);
278
  cursor: pointer;
279
- font-family: var(--font-family);
280
- font-weight: 600;
281
  padding: 0 5px;
282
- transition: var(--transition);
283
- }
284
-
285
- .switch-mode button:hover {
286
- text-decoration: underline;
287
  }
288
 
289
  /* کلاس‌های کمکی */
290
  .hidden {
291
- display: none;
292
- }
293
-
294
- .fade-in {
295
- animation: fadeIn 0.4s ease-in-out;
296
  }
297
 
298
- @keyframes fadeIn {
299
- from { opacity: 0; transform: translateY(10px); }
300
- to { opacity: 1; transform: translateY(0); }
301
- }
302
-
303
- /* اعلان‌ها (Toast) - رسپانسیو */
304
  .toast-container {
305
  position: fixed;
306
  bottom: 20px;
 
307
  right: 20px;
308
- left: 20px; /* جلوگیری از خروج از کادر در موبایل */
309
  z-index: 1000;
310
  display: flex;
311
  flex-direction: column;
 
312
  gap: 10px;
313
- align-items: flex-end; /* راست‌چین */
314
- pointer-events: none; /* کلیک روی فضای خالی مسدود نشود */
315
  }
316
 
317
  .toast {
318
  background: var(--card-bg);
319
  border-right: 4px solid var(--primary-color);
320
- padding: 15px 20px;
321
- border-radius: 8px;
322
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
323
  color: var(--text-color);
324
  font-size: 0.9rem;
325
  display: flex;
326
  align-items: center;
327
  gap: 10px;
328
- width: 100%;
329
- max-width: 350px; /* محدودیت عرض */
330
  animation: slideIn 0.3s ease;
331
- backdrop-filter: blur(10px);
332
- pointer-events: auto;
333
- margin-bottom: 10px;
334
  }
335
 
336
  .toast.success { border-color: var(--success-color); }
@@ -341,65 +274,70 @@
341
  to { transform: translateX(0); opacity: 1; }
342
  }
343
 
344
- /* تنظیمات خاص برای موبایل‌های خیلی کوچک */
345
  @media (max-width: 360px) {
346
- .form-header h2 { font-size: 1.4rem; }
347
- .captcha-container { justify-content: space-between; }
348
- .captcha-container input { width: 100%; min-width: unset; }
349
- .toast { font-size: 0.8rem; padding: 12px; }
350
  }
351
  </style>
352
  </head>
353
 
354
  <body>
355
 
356
- <!-- لینک هدر الزامی -->
357
  <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="header-link">
358
  Built with anycoder
359
  </a>
360
 
361
  <div class="container">
362
  <!-- فرم ورود -->
363
- <div id="login-form" class="fade-in">
364
  <div class="form-header">
365
  <h2>خوش آمدید</h2>
366
- <p>لطفاً برای ادامه وارد حساب کاربری خود شوید</p>
367
  </div>
368
 
369
  <form onsubmit="handleLogin(event)">
370
  <div class="input-group">
371
- <label for="login-username">نام کاربری</label>
372
  <div class="input-wrapper">
373
- <i class="ph ph-user icon-left"></i>
374
- <input type="text" id="login-username" placeholder="نام کاربری خود را وارد کنید" autocomplete="off">
 
375
  </div>
376
  </div>
377
 
378
  <div class="input-group">
379
- <label for="login-password">رمز عبور</label>
380
  <div class="input-wrapper">
381
- <i class="ph ph-lock-key icon-left"></i>
382
- <input type="password" id="login-password" placeholder="رمز عبور خود را وارد کنید">
383
- <i class="ph ph-eye-slash toggle-password" onclick="togglePassword('login-password', this)"></i>
 
 
 
 
384
  </div>
385
  </div>
386
 
387
  <div class="captcha-container">
388
- <canvas id="captchaCanvas" width="120" height="44" title="برای تغ��یر کد کلیک کنید"></canvas>
389
  <button type="button" class="refresh-btn" onclick="drawCaptcha()">
390
- <i class="ph ph-arrows-clockwise"></i>
 
391
  </button>
392
- <input type="text" id="login-captcha" placeholder="کد تصویر">
393
  </div>
394
 
395
  <button type="submit" class="submit-btn">
396
- <span>ورود به حساب</span>
397
- <i class="ph ph-sign-in"></i>
 
398
  </button>
399
 
400
  <div class="switch-mode">
401
- حساب کاربری ندارید؟
402
- <button type="button" onclick="switchForm('register')">ثبت نام کنید</button>
403
  </div>
404
  </form>
405
  </div>
@@ -407,247 +345,193 @@
407
  <!-- فرم ثبت نام -->
408
  <div id="register-form" class="hidden">
409
  <div class="form-header">
410
- <h2>ایجاد حساب</h2>
411
- <p>اطلاعات خود را برای ثبت نام وارد کنید</p>
412
  </div>
413
 
414
  <form onsubmit="handleRegister(event)">
415
  <div class="input-group">
416
- <label for="reg-username">نام کاربری</label>
417
  <div class="input-wrapper">
418
- <i class="ph ph-user icon-left"></i>
419
- <input type="text" id="reg-username" placeholder="انتخاب نام کاربری" autocomplete="off">
420
  </div>
421
  </div>
422
 
423
  <div class="input-group">
424
- <label for="reg-password">رمز عبور</label>
425
  <div class="input-wrapper">
426
- <i class="ph ph-lock-key icon-left"></i>
427
- <input type="password" id="reg-password" placeholder="رمز عبور قوی انتخاب کنید">
428
- <i class="ph ph-eye-slash toggle-password" onclick="togglePassword('reg-password', this)"></i>
 
 
429
  </div>
430
  </div>
431
 
432
  <div class="input-group">
433
- <label for="reg-confirm-password">تکرار رمز عبور</label>
434
  <div class="input-wrapper">
435
- <i class="ph ph-check-circle icon-left"></i>
436
  <input type="password" id="reg-confirm-password" placeholder="تکرار رمز عبور">
437
  </div>
438
  </div>
439
 
440
  <div class="captcha-container">
441
- <canvas id="captchaCanvasReg" width="120" height="44" title="برای تغییر کد کلیک کنید"></canvas>
442
  <button type="button" class="refresh-btn" onclick="drawCaptcha(true)">
443
- <i class="ph ph-arrows-clockwise"></i>
444
  </button>
445
- <input type="text" id="reg-captcha" placeholder="کد تصویر">
446
  </div>
447
 
448
  <button type="submit" class="submit-btn">
449
  <span>ثبت نام</span>
450
- <i class="ph ph-user-plus"></i>
451
  </button>
452
 
453
  <div class="switch-mode">
454
- قبلاً ثبت نام کرده‌اید؟
455
- <button type="button" onclick="switchForm('login')">وارد شوید</button>
456
  </div>
457
  </form>
458
  </div>
459
  </div>
460
 
461
- <!-- کانتینر پیام‌ها -->
462
  <div class="toast-container" id="toastContainer"></div>
463
 
464
  <script>
465
- // متغیرهای سراسری
466
  let currentCaptcha = '';
467
  let currentCaptchaReg = '';
468
 
469
  window.onload = function() {
470
  drawCaptcha();
471
  drawCaptcha(true);
472
-
473
  document.getElementById('captchaCanvas').addEventListener('click', () => drawCaptcha());
474
  document.getElementById('captchaCanvasReg').addEventListener('click', () => drawCaptcha(true));
475
  };
476
 
477
- function switchForm(formType) {
478
- const loginForm = document.getElementById('login-form');
479
- const registerForm = document.getElementById('register-form');
480
-
481
- document.querySelectorAll('input').forEach(input => input.value = '');
482
-
483
- if (formType === 'register') {
484
- loginForm.classList.add('hidden');
485
- registerForm.classList.remove('hidden');
486
- registerForm.classList.add('fade-in');
487
- drawCaptcha(true);
488
  } else {
489
- registerForm.classList.add('hidden');
490
- loginForm.classList.remove('hidden');
491
- loginForm.classList.add('fade-in');
492
- drawCaptcha();
493
  }
494
  }
495
 
496
- function togglePassword(inputId, icon) {
497
- const input = document.getElementById(inputId);
 
 
498
  if (input.type === 'password') {
499
  input.type = 'text';
500
- icon.classList.remove('ph-eye-slash');
501
- icon.classList.add('ph-eye');
502
  } else {
503
  input.type = 'password';
504
- icon.classList.remove('ph-eye');
505
- icon.classList.add('ph-eye-slash');
506
  }
507
  }
508
 
509
- function drawCaptcha(isRegister = false) {
510
- const canvasId = isRegister ? 'captchaCanvasReg' : 'captchaCanvas';
511
- const canvas = document.getElementById(canvasId);
512
- const ctx = canvas.getContext('2d');
513
- const width = canvas.width;
514
- const height = canvas.height;
515
-
516
- ctx.clearRect(0, 0, width, height);
517
- ctx.fillStyle = '#e2e8f0';
518
- ctx.fillRect(0, 0, width, height);
519
 
520
- const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
521
- let captchaText = '';
522
- for (let i = 0; i < 5; i++) {
523
- captchaText += chars.charAt(Math.floor(Math.random() * chars.length));
524
- }
525
-
526
- if (isRegister) currentCaptchaReg = captchaText;
527
- else currentCaptcha = captchaText;
528
-
529
- // نویز
530
- for (let i = 0; i < 7; i++) {
531
- ctx.strokeStyle = `rgba(${Math.random()*255},${Math.random()*255},${Math.random()*255},0.5)`;
532
- ctx.lineWidth = Math.random() * 2;
533
- ctx.beginPath();
534
- ctx.moveTo(Math.random() * width, Math.random() * height);
535
- ctx.lineTo(Math.random() * width, Math.random() * height);
536
- ctx.stroke();
537
- }
538
 
539
- // متن
540
- ctx.font = 'bold 24px Vazirmatn';
541
  ctx.textBaseline = 'middle';
542
-
543
- for (let i = 0; i < captchaText.length; i++) {
544
  ctx.save();
545
- const x = 20 + i * 20;
546
- const y = height / 2 + (Math.random() - 0.5) * 10;
547
- const angle = (Math.random() - 0.5) * 0.4;
548
-
549
- ctx.translate(x, y);
550
- ctx.rotate(angle);
551
- ctx.fillStyle = `rgb(${Math.random()*100},${Math.random()*100},${Math.random()*150})`;
552
- ctx.fillText(captchaText[i], 0, 0);
553
  ctx.restore();
554
  }
 
 
 
 
 
 
 
 
555
  }
556
 
557
  function handleLogin(e) {
558
  e.preventDefault();
559
- const username = document.getElementById('login-username').value.trim();
560
- const password = document.getElementById('login-password').value;
561
- const captchaInput = document.getElementById('login-captcha').value.trim();
562
 
563
- if (!username || !password) {
564
- showToast('لطفاً تمام فیلدها را پر کنید.', 'error');
565
- return;
566
- }
567
-
568
- if (captchaInput !== currentCaptcha) {
569
- showToast('کد امنیتی اشتباه است.', 'error');
570
- drawCaptcha();
571
- document.getElementById('login-captcha').value = '';
572
- return;
573
- }
574
 
575
  const btn = e.target.querySelector('.submit-btn');
576
- const originalText = btn.innerHTML;
577
- btn.innerHTML = '<i class="ph ph-spinner ph-spin"></i> در حال پردازش...';
578
  btn.disabled = true;
579
-
 
580
  setTimeout(() => {
581
- btn.innerHTML = originalText;
582
  btn.disabled = false;
583
- showToast('ورود با موفقیت انجام شد!', 'success');
584
- }, 1500);
 
585
  }
586
 
587
  function handleRegister(e) {
588
  e.preventDefault();
589
- const username = document.getElementById('reg-username').value.trim();
590
- const password = document.getElementById('reg-password').value;
591
- const confirmPassword = document.getElementById('reg-confirm-password').value;
592
- const captchaInput = document.getElementById('reg-captcha').value.trim();
593
-
594
- if (!username || !password || !confirmPassword) {
595
- showToast('لطفاً تمام فیلدها را پر کنید.', 'error');
596
- return;
597
- }
598
 
599
- if (password.length < 6) {
600
- showToast('رمز عبور باید حداقل ۶ کاراکتر باشد.', 'error');
601
- return;
602
- }
603
-
604
- if (password !== confirmPassword) {
605
- showToast('رمز عبور و تکرار آن مطابقت ندارند.', 'error');
606
- return;
607
- }
608
-
609
- if (captchaInput !== currentCaptchaReg) {
610
- showToast('کد امنیتی اشتباه اس��.', 'error');
611
- drawCaptcha(true);
612
- document.getElementById('reg-captcha').value = '';
613
- return;
614
- }
615
 
616
  const btn = e.target.querySelector('.submit-btn');
617
- const originalText = btn.innerHTML;
618
- btn.innerHTML = '<i class="ph ph-spinner ph-spin"></i> در حال ثبت...';
619
  btn.disabled = true;
620
-
 
621
  setTimeout(() => {
622
- btn.innerHTML = originalText;
623
  btn.disabled = false;
624
- showToast('حساب کاربری با موفقیت ایجاد شد!', 'success');
 
625
  switchForm('login');
626
- }, 1500);
627
  }
628
 
629
- function showToast(message, type = 'success') {
630
- const container = document.getElementById('toastContainer');
631
- const toast = document.createElement('div');
632
- toast.className = `toast ${type}`;
 
 
 
633
 
634
- const iconClass = type === 'success' ? 'ph-check-circle' : 'ph-warning-circle';
635
-
636
- toast.innerHTML = `
637
- <i class="ph ${iconClass}" style="font-size: 1.2rem;"></i>
638
- <span>${message}</span>
639
- `;
640
-
641
- container.appendChild(toast);
642
-
643
  setTimeout(() => {
644
- toast.style.animation = 'slideIn 0.3s ease reverse forwards';
645
- setTimeout(() => {
646
- toast.remove();
647
- }, 300);
648
  }, 3000);
649
  }
650
  </script>
651
  </body>
652
-
653
  </html>
 
4
  <head>
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
7
+ <title>ورود و ثبت نام | نسخه سبک</title>
 
 
 
 
 
 
 
8
 
9
  <style>
10
+ /* تنظیمات پایه و متغیرها */
11
  :root {
12
+ --bg-color: #1e293b;
13
+ --card-bg: #334155;
14
+ --input-bg: #0f172a;
15
  --primary-color: #6366f1;
16
  --primary-hover: #4f46e5;
17
+ --text-color: #f1f5f9;
18
  --text-muted: #94a3b8;
19
+ --border-color: #475569;
20
  --error-color: #ef4444;
21
  --success-color: #22c55e;
22
+ --font-main: 'Tahoma', 'Segoe UI', sans-serif; /* فونت سیستم برای سرعت بالا */
23
+ --radius: 12px;
 
24
  }
25
 
26
  * {
27
  box-sizing: border-box;
28
  margin: 0;
29
  padding: 0;
30
+ -webkit-tap-highlight-color: transparent;
 
31
  }
32
 
33
  body {
34
+ font-family: var(--font-main);
35
  background-color: var(--bg-color);
 
 
 
 
 
 
 
36
  color: var(--text-color);
37
  min-height: 100vh;
38
  display: flex;
39
  justify-content: center;
40
  align-items: center;
41
+ padding: 20px;
 
 
 
 
 
 
 
 
42
  }
43
 
44
  /* لینک هدر */
45
  .header-link {
46
  position: fixed;
47
+ top: 15px;
48
+ left: 15px;
49
  color: var(--text-muted);
50
  text-decoration: none;
51
+ font-size: 0.8rem;
52
+ background: rgba(0, 0, 0, 0.2);
53
+ padding: 4px 8px;
54
+ border-radius: 4px;
55
  z-index: 100;
 
 
 
 
56
  }
57
 
58
  .header-link:hover {
59
  color: var(--primary-color);
 
60
  }
61
 
62
+ /* کانتینر اصلی */
63
  .container {
64
  width: 100%;
65
+ max-width: 400px;
66
  background: var(--card-bg);
67
+ border: 1px solid var(--border-color);
68
+ border-radius: var(--radius);
69
+ padding: 30px 20px;
70
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
 
 
 
 
 
 
71
  }
72
 
73
  /* هدر فرم */
74
  .form-header {
75
  text-align: center;
76
+ margin-bottom: 25px;
77
  }
78
 
79
  .form-header h2 {
80
+ font-size: 1.5rem;
81
+ color: var(--text-color);
82
+ margin-bottom: 5px;
 
 
 
 
83
  }
84
 
85
  .form-header p {
86
  color: var(--text-muted);
87
+ font-size: 0.9rem;
88
  }
89
 
90
  /* ورودی‌ها */
91
  .input-group {
92
+ margin-bottom: 15px;
 
93
  }
94
 
95
  .input-group label {
96
  display: block;
97
+ margin-bottom: 6px;
98
  color: var(--text-muted);
99
+ font-size: 0.85rem;
 
100
  }
101
 
102
  .input-wrapper {
 
105
  align-items: center;
106
  }
107
 
108
+ /* آیکون‌های SVG داخلی */
109
+ .icon {
110
+ width: 20px;
111
+ height: 20px;
112
+ fill: currentColor;
113
+ }
114
+
115
+ .icon-left {
116
  position: absolute;
117
+ right: 12px;
118
  color: var(--text-muted);
 
119
  pointer-events: none;
120
  }
121
 
122
  .input-wrapper input {
123
  width: 100%;
124
+ padding: 12px 40px 12px 12px;
 
125
  background: var(--input-bg);
126
  border: 1px solid var(--border-color);
127
  border-radius: var(--radius);
128
  color: var(--text-color);
129
+ font-family: var(--font-main);
130
+ font-size: 0.95rem;
 
131
  }
132
 
133
  .input-wrapper input:focus {
134
  border-color: var(--primary-color);
135
+ outline: none;
136
  }
137
 
138
  .toggle-password {
139
  position: absolute;
140
+ left: 12px;
141
  cursor: pointer;
142
  color: var(--text-muted);
143
+ background: none;
144
+ border: none;
145
+ padding: 0;
146
+ display: flex;
147
+ align-items: center;
148
  }
149
 
150
  .toggle-password:hover {
151
  color: var(--text-color);
152
  }
153
 
154
+ /* کپچا */
155
  .captcha-container {
156
  display: flex;
157
  align-items: center;
158
+ gap: 8px;
159
+ margin-bottom: 20px;
160
+ flex-wrap: wrap;
 
 
 
 
161
  }
162
 
163
+ canvas {
164
+ background: #fff;
165
+ border-radius: 6px;
166
  cursor: pointer;
 
167
  }
168
 
169
  .refresh-btn {
 
171
  border: none;
172
  color: var(--primary-color);
173
  cursor: pointer;
 
 
174
  padding: 5px;
175
  display: flex;
176
  align-items: center;
 
 
 
 
 
177
  }
178
 
179
  .captcha-container input {
 
180
  flex-grow: 1;
 
181
  padding: 10px;
182
+ border-radius: 6px;
183
  border: 1px solid var(--border-color);
184
  background: var(--input-bg);
185
  color: white;
186
  text-align: center;
187
+ min-width: 80px;
188
  }
189
 
190
  /* دکمه ارسال */
191
  .submit-btn {
192
  width: 100%;
193
+ padding: 12px;
194
  background: var(--primary-color);
195
  color: white;
196
  border: none;
197
  border-radius: var(--radius);
198
+ font-family: var(--font-main);
199
  font-size: 1rem;
200
+ font-weight: bold;
201
  cursor: pointer;
202
+ transition: background 0.2s;
203
  display: flex;
204
  justify-content: center;
205
  align-items: center;
206
  gap: 8px;
 
 
207
  }
208
 
209
  .submit-btn:hover {
210
  background: var(--primary-hover);
 
 
211
  }
212
 
213
+ .submit-btn:disabled {
214
+ opacity: 0.7;
215
+ cursor: not-allowed;
216
  }
217
 
218
+ /* تغییر حالت */
219
  .switch-mode {
220
  text-align: center;
221
+ margin-top: 15px;
222
  font-size: 0.9rem;
223
  color: var(--text-muted);
224
  }
 
228
  border: none;
229
  color: var(--primary-color);
230
  cursor: pointer;
231
+ font-family: var(--font-main);
232
+ font-weight: bold;
233
  padding: 0 5px;
 
 
 
 
 
234
  }
235
 
236
  /* کلاس‌های کمکی */
237
  .hidden {
238
+ display: none !important;
 
 
 
 
239
  }
240
 
241
+ /* Toast (پیام‌ها) */
 
 
 
 
 
242
  .toast-container {
243
  position: fixed;
244
  bottom: 20px;
245
+ left: 20px;
246
  right: 20px;
 
247
  z-index: 1000;
248
  display: flex;
249
  flex-direction: column;
250
+ align-items: flex-end;
251
  gap: 10px;
 
 
252
  }
253
 
254
  .toast {
255
  background: var(--card-bg);
256
  border-right: 4px solid var(--primary-color);
257
+ padding: 12px 15px;
258
+ border-radius: 4px;
259
+ box-shadow: 0 4px 6px rgba(0,0,0,0.3);
260
  color: var(--text-color);
261
  font-size: 0.9rem;
262
  display: flex;
263
  align-items: center;
264
  gap: 10px;
265
+ max-width: 300px;
 
266
  animation: slideIn 0.3s ease;
 
 
 
267
  }
268
 
269
  .toast.success { border-color: var(--success-color); }
 
274
  to { transform: translateX(0); opacity: 1; }
275
  }
276
 
 
277
  @media (max-width: 360px) {
278
+ .captcha-container input {
279
+ width: 100%;
280
+ flex-basis: 100%;
281
+ }
282
  }
283
  </style>
284
  </head>
285
 
286
  <body>
287
 
 
288
  <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="header-link">
289
  Built with anycoder
290
  </a>
291
 
292
  <div class="container">
293
  <!-- فرم ورود -->
294
+ <div id="login-form">
295
  <div class="form-header">
296
  <h2>خوش آمدید</h2>
297
+ <p>وارد حساب کاربری شوید</p>
298
  </div>
299
 
300
  <form onsubmit="handleLogin(event)">
301
  <div class="input-group">
302
+ <label>نام کاربری</label>
303
  <div class="input-wrapper">
304
+ <!-- SVG Icon: User -->
305
+ <svg class="icon icon-left" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
306
+ <input type="text" id="login-username" placeholder="نام کاربری" autocomplete="off">
307
  </div>
308
  </div>
309
 
310
  <div class="input-group">
311
+ <label>رمز عبور</label>
312
  <div class="input-wrapper">
313
+ <!-- SVG Icon: Lock -->
314
+ <svg class="icon icon-left" viewBox="0 0 24 24"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>
315
+ <input type="password" id="login-password" placeholder="رمز عبور">
316
+ <button type="button" class="toggle-password" onclick="togglePassword('login-password', this)">
317
+ <!-- SVG Icon: Eye Slash -->
318
+ <svg class="icon" viewBox="0 0 24 24"><path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>
319
+ </button>
320
  </div>
321
  </div>
322
 
323
  <div class="captcha-container">
324
+ <canvas id="captchaCanvas" width="100" height="40" title="تغییر کد"></canvas>
325
  <button type="button" class="refresh-btn" onclick="drawCaptcha()">
326
+ <!-- SVG Icon: Refresh -->
327
+ <svg class="icon" viewBox="0 0 24 24"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>
328
  </button>
329
+ <input type="text" id="login-captcha" placeholder="کد">
330
  </div>
331
 
332
  <button type="submit" class="submit-btn">
333
+ <span>ورود</span>
334
+ <!-- SVG Icon: Sign In -->
335
+ <svg class="icon" viewBox="0 0 24 24"><path d="M11 7L9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5-5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8v14z"/></svg>
336
  </button>
337
 
338
  <div class="switch-mode">
339
+ حساب ندارید؟
340
+ <button type="button" onclick="switchForm('register')">ثبت نام</button>
341
  </div>
342
  </form>
343
  </div>
 
345
  <!-- فرم ثبت نام -->
346
  <div id="register-form" class="hidden">
347
  <div class="form-header">
348
+ <h2>ثبت نام</h2>
349
+ <p>ایجاد حساب جدید</p>
350
  </div>
351
 
352
  <form onsubmit="handleRegister(event)">
353
  <div class="input-group">
354
+ <label>نام کاربری</label>
355
  <div class="input-wrapper">
356
+ <svg class="icon icon-left" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
357
+ <input type="text" id="reg-username" placeholder="نام کاربری" autocomplete="off">
358
  </div>
359
  </div>
360
 
361
  <div class="input-group">
362
+ <label>رمز عبور</label>
363
  <div class="input-wrapper">
364
+ <svg class="icon icon-left" viewBox="0 0 24 24"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>
365
+ <input type="password" id="reg-password" placeholder="رمز عبور">
366
+ <button type="button" class="toggle-password" onclick="togglePassword('reg-password', this)">
367
+ <svg class="icon" viewBox="0 0 24 24"><path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>
368
+ </button>
369
  </div>
370
  </div>
371
 
372
  <div class="input-group">
373
+ <label>تکرار رمز</label>
374
  <div class="input-wrapper">
375
+ <svg class="icon icon-left" viewBox="0 0 24 24"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"/></svg>
376
  <input type="password" id="reg-confirm-password" placeholder="تکرار رمز عبور">
377
  </div>
378
  </div>
379
 
380
  <div class="captcha-container">
381
+ <canvas id="captchaCanvasReg" width="100" height="40" title="تغییر کد"></canvas>
382
  <button type="button" class="refresh-btn" onclick="drawCaptcha(true)">
383
+ <svg class="icon" viewBox="0 0 24 24"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>
384
  </button>
385
+ <input type="text" id="reg-captcha" placeholder="کد">
386
  </div>
387
 
388
  <button type="submit" class="submit-btn">
389
  <span>ثبت نام</span>
390
+ <svg class="icon" viewBox="0 0 24 24"><path d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
391
  </button>
392
 
393
  <div class="switch-mode">
394
+ حساب دارید؟
395
+ <button type="button" onclick="switchForm('login')">ورود</button>
396
  </div>
397
  </form>
398
  </div>
399
  </div>
400
 
 
401
  <div class="toast-container" id="toastContainer"></div>
402
 
403
  <script>
 
404
  let currentCaptcha = '';
405
  let currentCaptchaReg = '';
406
 
407
  window.onload = function() {
408
  drawCaptcha();
409
  drawCaptcha(true);
 
410
  document.getElementById('captchaCanvas').addEventListener('click', () => drawCaptcha());
411
  document.getElementById('captchaCanvasReg').addEventListener('click', () => drawCaptcha(true));
412
  };
413
 
414
+ function switchForm(type) {
415
+ const login = document.getElementById('login-form');
416
+ const reg = document.getElementById('register-form');
417
+ document.querySelectorAll('input').forEach(i => i.value = '');
418
+
419
+ if (type === 'register') {
420
+ login.classList.add('hidden');
421
+ reg.classList.remove('hidden');
 
 
 
422
  } else {
423
+ reg.classList.add('hidden');
424
+ login.classList.remove('hidden');
 
 
425
  }
426
  }
427
 
428
+ function togglePassword(id, btn) {
429
+ const input = document.getElementById(id);
430
+ const isEyeSlash = btn.innerHTML.includes('M12 7c2.76'); // Check path content roughly
431
+
432
  if (input.type === 'password') {
433
  input.type = 'text';
434
+ // Change to Eye Open icon (simple path)
435
+ btn.innerHTML = '<svg class="icon" viewBox="0 0 24 24"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>';
436
  } else {
437
  input.type = 'password';
438
+ // Change back to Eye Slash
439
+ btn.innerHTML = '<svg class="icon" viewBox="0 0 24 24"><path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>';
440
  }
441
  }
442
 
443
+ function drawCaptcha(isReg = false) {
444
+ const cvs = document.getElementById(isReg ? 'captchaCanvasReg' : 'captchaCanvas');
445
+ const ctx = cvs.getContext('2d');
446
+ ctx.clearRect(0, 0, cvs.width, cvs.height);
447
+ ctx.fillStyle = '#cbd5e1';
448
+ ctx.fillRect(0, 0, cvs.width, cvs.height);
 
 
 
 
449
 
450
+ const chars = '0123456789ABCDEFGHJKLMNPQRSTUVWXYZ';
451
+ let txt = '';
452
+ for(let i=0; i<5; i++) txt += chars[Math.floor(Math.random()*chars.length)];
453
+
454
+ if(isReg) currentCaptchaReg = txt; else currentCaptcha = txt;
 
 
 
 
 
 
 
 
 
 
 
 
 
455
 
456
+ ctx.font = 'bold 24px monospace';
 
457
  ctx.textBaseline = 'middle';
458
+ for(let i=0; i<5; i++) {
 
459
  ctx.save();
460
+ ctx.translate(15 + i*16, 20);
461
+ ctx.rotate((Math.random()-0.5)*0.4);
462
+ ctx.fillStyle = '#1e293b';
463
+ ctx.fillText(txt[i], 0, 0);
 
 
 
 
464
  ctx.restore();
465
  }
466
+ // Noise
467
+ for(let i=0; i<5; i++) {
468
+ ctx.strokeStyle = '#94a3b8';
469
+ ctx.beginPath();
470
+ ctx.moveTo(Math.random()*100, Math.random()*40);
471
+ ctx.lineTo(Math.random()*100, Math.random()*40);
472
+ ctx.stroke();
473
+ }
474
  }
475
 
476
  function handleLogin(e) {
477
  e.preventDefault();
478
+ const u = document.getElementById('login-username').value;
479
+ const p = document.getElementById('login-password').value;
480
+ const c = document.getElementById('login-captcha').value;
481
 
482
+ if(!u || !p) return showToast('فیلدها الزامی است', 'error');
483
+ if(c !== currentCaptcha) return showToast('کد اشتباه است', 'error');
 
 
 
 
 
 
 
 
 
484
 
485
  const btn = e.target.querySelector('.submit-btn');
 
 
486
  btn.disabled = true;
487
+ btn.innerHTML = 'در حال پردازش...';
488
+
489
  setTimeout(() => {
 
490
  btn.disabled = false;
491
+ btn.innerHTML = '<span>ورود</span><svg class="icon" viewBox="0 0 24 24"><path d="M11 7L9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5-5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8v14z"/></svg>';
492
+ showToast('خوش آمدید!', 'success');
493
+ }, 1000);
494
  }
495
 
496
  function handleRegister(e) {
497
  e.preventDefault();
498
+ const u = document.getElementById('reg-username').value;
499
+ const p = document.getElementById('reg-password').value;
500
+ const cp = document.getElementById('reg-confirm-password').value;
501
+ const c = document.getElementById('reg-captcha').value;
 
 
 
 
 
502
 
503
+ if(!u || !p || !cp) return showToast('فیلدها الزامی است', 'error');
504
+ if(p.length < 6) return showToast('رمز کوتاه است', 'error');
505
+ if(p !== cp) return showToast('تکرار مغایرت دارد', 'error');
506
+ if(c !== currentCaptchaReg) return showToast('کد اشتباه است', 'error');
 
 
 
 
 
 
 
 
 
 
 
 
507
 
508
  const btn = e.target.querySelector('.submit-btn');
 
 
509
  btn.disabled = true;
510
+ btn.innerHTML = 'در حال ثبت...';
511
+
512
  setTimeout(() => {
 
513
  btn.disabled = false;
514
+ btn.innerHTML = '<span>ثبت نام</span><svg class="icon" viewBox="0 0 24 24"><path d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>';
515
+ showToast('ثبت نام موفق!', 'success');
516
  switchForm('login');
517
+ }, 1000);
518
  }
519
 
520
+ function showToast(msg, type) {
521
+ const con = document.getElementById('toastContainer');
522
+ const t = document.createElement('div');
523
+ t.className = `toast ${type}`;
524
+ const icon = type === 'success'
525
+ ? '<svg class="icon" style="fill:#22c55e" viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>'
526
+ : '<svg class="icon" style="fill:#ef4444" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>';
527
 
528
+ t.innerHTML = `${icon}<span>${msg}</span>`;
529
+ con.appendChild(t);
 
 
 
 
 
 
 
530
  setTimeout(() => {
531
+ t.style.opacity = '0';
532
+ setTimeout(() => t.remove(), 300);
 
 
533
  }, 3000);
534
  }
535
  </script>
536
  </body>
 
537
  </html>