samirerty commited on
Commit
dbf7e66
·
verified ·
1 Parent(s): bebbf67

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +438 -404
index.html CHANGED
@@ -1,425 +1,458 @@
1
  <!DOCTYPE html>
2
  <html lang="fa" dir="rtl">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>ورود و ثبت نام | سیستم امن</title>
7
- <!-- ایمپورت فونت وزیرمتن برای ظاهر زیبای فارسی -->
8
- <link href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css" rel="stylesheet" type="text/css" />
9
- <!-- ایمپورت آیکون‌ها -->
10
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
11
-
12
- <style>
13
- :root {
14
- --bg-color: #0f172a;
15
- --card-bg: rgba(30, 41, 59, 0.7);
16
- --primary: #6366f1;
17
- --primary-hover: #4f46e5;
18
- --text-main: #f8fafc;
19
- --text-muted: #94a3b8;
20
- --input-bg: rgba(15, 23, 42, 0.6);
21
- --border-color: rgba(148, 163, 184, 0.2);
22
- --error: #ef4444;
23
- --success: #10b981;
24
- --glass-border: 1px solid rgba(255, 255, 255, 0.1);
25
- }
26
-
27
- * {
28
- box-sizing: border-box;
29
- margin: 0;
30
- padding: 0;
31
- font-family: 'Vazirmatn', sans-serif;
32
- }
33
-
34
- body {
35
- background-color: var(--bg-color);
36
- background-image:
37
- radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%),
38
- radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%),
39
- radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
40
- color: var(--text-main);
41
- min-height: 100vh;
42
- display: flex;
43
- flex-direction: column;
44
- align-items: center;
45
- justify-content: center;
46
- overflow-x: hidden;
47
- }
48
-
49
- /* هدر */
50
- header {
51
- position: absolute;
52
- top: 20px;
53
- width: 100%;
54
- text-align: center;
55
- z-index: 10;
56
- }
57
-
58
- .brand-link {
59
- color: var(--text-muted);
60
- text-decoration: none;
61
- font-size: 0.9rem;
62
- transition: color 0.3s;
63
- display: inline-flex;
64
- align-items: center;
65
- gap: 8px;
66
- padding: 8px 16px;
67
- background: rgba(255,255,255,0.05);
68
- border-radius: 20px;
69
- backdrop-filter: blur(5px);
70
- }
71
-
72
- .brand-link:hover {
73
- color: var(--primary);
74
- background: rgba(255,255,255,0.1);
75
- }
76
-
77
- /* کارت اصلی */
78
- .auth-container {
79
- width: 90%;
80
- max-width: 420px;
81
- background: var(--card-bg);
82
- backdrop-filter: blur(16px);
83
- -webkit-backdrop-filter: blur(16px);
84
- border: var(--glass-border);
85
- border-radius: 24px;
86
- padding: 40px 30px;
87
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
88
- position: relative;
89
- overflow: hidden;
90
- transition: all 0.4s ease;
91
- }
92
-
93
- /* تب‌های تغییر وضعیت */
94
- .tabs {
95
- display: flex;
96
- justify-content: center;
97
- margin-bottom: 30px;
98
- background: var(--input-bg);
99
- padding: 5px;
100
- border-radius: 12px;
101
- position: relative;
102
- }
103
-
104
- .tab-btn {
105
- flex: 1;
106
- padding: 12px;
107
- border: none;
108
- background: transparent;
109
- color: var(--text-muted);
110
- cursor: pointer;
111
- border-radius: 8px;
112
- font-size: 1rem;
113
- font-weight: 500;
114
- transition: all 0.3s ease;
115
- z-index: 2;
116
- }
117
-
118
- .tab-btn.active {
119
- color: #fff;
120
- background: var(--primary);
121
- box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
122
- }
123
-
124
- /* فرم‌ها */
125
- .form-wrapper {
126
- position: relative;
127
- }
128
-
129
- .auth-form {
130
- display: flex;
131
- flex-direction: column;
132
- gap: 20px;
133
- transition: opacity 0.3s ease, transform 0.3s ease;
134
- }
135
-
136
- .hidden {
137
- display: none;
138
- opacity: 0;
139
- transform: translateX(20px);
140
- }
141
-
142
- .visible {
143
- display: flex;
144
- opacity: 1;
145
- transform: translateX(0);
146
- animation: fadeIn 0.4s ease-out;
147
- }
148
-
149
- @keyframes fadeIn {
150
- from { opacity: 0; transform: translateY(10px); }
151
- to { opacity: 1; transform: translateY(0); }
152
- }
153
-
154
- /* گروه ورودی */
155
- .input-group {
156
- position: relative;
157
- }
158
-
159
- .input-group label {
160
- display: block;
161
- margin-bottom: 8px;
162
- color: var(--text-muted);
163
- font-size: 0.9rem;
164
- }
165
-
166
- .input-wrapper {
167
- position: relative;
168
- display: flex;
169
- align-items: center;
170
- }
171
-
172
- .input-wrapper i {
173
- position: absolute;
174
- right: 15px;
175
- color: var(--text-muted);
176
- transition: color 0.3s;
177
- }
178
-
179
- .form-input {
180
- width: 100%;
181
- padding: 14px 45px 14px 15px;
182
- background: var(--input-bg);
183
- border: 1px solid var(--border-color);
184
- border-radius: 12px;
185
- color: #fff;
186
- font-size: 1rem;
187
- outline: none;
188
- transition: all 0.3s;
189
- }
190
-
191
- .form-input:focus {
192
- border-color: var(--primary);
193
- box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
194
- }
195
-
196
- .form-input:focus + i {
197
- color: var(--primary);
198
- }
199
-
200
- /* کپچا */
201
- .captcha-container {
202
- display: flex;
203
- gap: 10px;
204
- align-items: center;
205
- }
206
 
207
- .captcha-canvas {
208
- background: #fff;
209
- border-radius: 8px;
210
- cursor: pointer;
211
- flex-shrink: 0;
212
- }
213
-
214
- .captcha-input {
215
- flex-grow: 1;
216
- }
217
-
218
- /* دکمه اصلی */
219
- .submit-btn {
220
- background: linear-gradient(135deg, var(--primary), #818cf8);
221
- color: white;
222
- border: none;
223
- padding: 14px;
224
- border-radius: 12px;
225
- font-size: 1rem;
226
- font-weight: bold;
227
- cursor: pointer;
228
- transition: transform 0.2s, box-shadow 0.2s;
229
- margin-top: 10px;
230
- display: flex;
231
- justify-content: center;
232
- align-items: center;
233
- gap: 10px;
234
- }
235
-
236
- .submit-btn:hover {
237
- transform: translateY(-2px);
238
- box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.6);
239
- }
240
-
241
- .submit-btn:active {
242
- transform: translateY(0);
243
- }
244
-
245
- .submit-btn.loading {
246
- opacity: 0.8;
247
- pointer-events: none;
248
- }
249
-
250
- .submit-btn.loading i {
251
- animation: spin 1s linear infinite;
252
- }
253
-
254
- @keyframes spin {
255
- 100% { transform: rotate(360deg); }
256
- }
257
-
258
- /* لینک فراموشی رمز */
259
- .forgot-pass {
260
- text-align: left;
261
- margin-top: -10px;
262
- }
263
-
264
- .forgot-pass a {
265
- color: var(--text-muted);
266
- font-size: 0.85rem;
267
- text-decoration: none;
268
- transition: color 0.3s;
269
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
 
271
- .forgot-pass a:hover {
272
- color: var(--primary);
273
- }
274
 
275
- /* سیستم نوتیفیکیشن (Toast) */
276
- .toast-container {
277
- position: fixed;
278
- bottom: 20px;
279
- left: 50%;
280
- transform: translateX(-50%);
281
- display: flex;
282
- flex-direction: column;
283
- gap: 10px;
284
- z-index: 100;
285
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
286
 
287
- .toast {
288
- background: rgba(30, 41, 59, 0.95);
289
- color: #fff;
290
- padding: 12px 24px;
291
- border-radius: 50px;
292
- box-shadow: 0 10px 30px rgba(0,0,0,0.5);
293
- display: flex;
294
- align-items: center;
295
- gap: 10px;
296
- font-size: 0.9rem;
297
- animation: slideUp 0.3s ease-out;
298
- border: 1px solid var(--border-color);
299
- min-width: 280px;
300
- justify-content: center;
301
- }
 
302
 
303
- .toast.success { border-color: var(--success); color: var(--success); }
304
- .toast.error { border-color: var(--error); color: var(--error); }
 
305
 
306
- @keyframes slideUp {
307
- from { transform: translateY(20px); opacity: 0; }
308
- to { transform: translateY(0); opacity: 1; }
309
- }
 
 
 
 
 
 
 
 
 
 
 
310
 
311
- /* رسپانسیو */
312
- @media (max-width: 480px) {
313
- .auth-container {
314
- width: 95%;
315
- padding: 30px 20px;
316
- }
317
-
318
- .submit-btn {
319
- padding: 12px;
320
- }
321
- }
322
- </style>
323
- </head>
324
- <body>
325
 
326
- <!-- هدر و لینک اجباری -->
327
- <header>
328
- <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="brand-link">
329
- <i class="fas fa-code"></i>
330
- Built with anycoder
331
- </a>
332
- </header>
333
-
334
- <main class="auth-container">
335
- <!-- تب‌های بالا -->
336
- <div class="tabs">
337
- <button class="tab-btn active" onclick="switchTab('login')">ورود</button>
338
- <button class="tab-btn" onclick="switchTab('register')">ثبت‌نام</button>
339
  </div>
 
340
 
341
- <!-- فرم ورود -->
342
- <div id="login-form" class="auth-form visible">
343
- <div class="input-group">
344
- <label>شماره موبایل</label>
345
- <div class="input-wrapper">
346
- <input type="tel" id="login-phone" class="form-input" placeholder="مثلا: 09123456789" maxlength="11">
347
- <i class="fas fa-mobile-alt"></i>
348
- </div>
349
- </div>
350
-
351
- <div class="input-group">
352
- <label>رمز عبور</label>
353
- <div class="input-wrapper">
354
- <input type="password" id="login-pass" class="form-input" placeholder="رمز عبور خود را وارد کنید">
355
- <i class="fas fa-lock"></i>
356
- </div>
357
- </div>
358
-
359
- <div class="input-group">
360
- <label>کد امنیتی</label>
361
- <div class="captcha-container">
362
- <canvas id="login-canvas" width="100" height="44" class="captcha-canvas" title="برای تغییر کلیک کنید"></canvas>
363
- <input type="text" id="login-captcha-input" class="form-input captcha-input" placeholder="کد تصویر" maxlength="4">
364
- </div>
365
- </div>
366
-
367
- <div class="forgot-pass">
368
- <a href="#">رمز عبور را فراموش کرده‌اید؟</a>
369
- </div>
370
-
371
- <button class="submit-btn" onclick="handleLogin()">
372
- <span>ورود به حساب</span>
373
- <i class="fas fa-arrow-left"></i>
374
- </button>
375
  </div>
 
376
 
377
- <!-- فرم ثبت نام -->
378
- <div id="register-form" class="auth-form hidden">
379
- <div class="input-group">
380
- <label>شماره موبایل</label>
381
- <div class="input-wrapper">
382
- <input type="tel" id="reg-phone" class="form-input" placeholder="مثلا: 09123456789" maxlength="11">
383
- <i class="fas fa-mobile-alt"></i>
384
- </div>
385
- </div>
386
-
387
- <div class="input-group">
388
- <label>رمز عبور</label>
389
- <div class="input-wrapper">
390
- <input type="password" id="reg-pass" class="form-input" placeholder="حداقل ۸ کاراکتر">
391
- <i class="fas fa-lock"></i>
392
- </div>
393
- </div>
394
-
395
- <div class="input-group">
396
- <label>تکرار رمز عبور</label>
397
- <div class="input-wrapper">
398
- <input type="password" id="reg-pass-conf" class="form-input" placeholder="تکرار رمز عبور">
399
- <i class="fas fa-check-double"></i>
400
- </div>
401
- </div>
402
-
403
- <div class="input-group">
404
- <label>کد امنیتی</label>
405
- <div class="captcha-container">
406
- <canvas id="reg-canvas" width="100" height="44" class="captcha-captcha" title="برای تغییر کلیک کنید"></canvas>
407
- <input type="text" id="reg-captcha-input" class="form-input captcha-input" placeholder="کد تصویر" maxlength="4">
408
- </div>
409
- </div>
410
-
411
- <button class="submit-btn" onclick="handleRegister()">
412
  <span>ثبت‌نام کنید</span>
413
  <i class="fas fa-user-plus"></i>
414
  </button>
415
- </div>
416
- </main>
417
 
418
- <!-- کانتینر پیام‌ها -->
419
- <div class="toast-container" id="toast-container"></div>
420
 
421
- <script>
422
- // متغیرهای سراسری برای کد کپچا
423
  let loginCaptchaCode = '';
424
  let regCaptchaCode = '';
425
 
@@ -617,6 +650,7 @@
617
  });
618
  });
619
 
620
- </script>
621
  </body>
 
622
  </html>
 
1
  <!DOCTYPE html>
2
  <html lang="fa" dir="rtl">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>ورود و ثبت نام | سیستم امن</title>
8
+ <!-- ایمپورت فونت وزیرمتن برای ظاهر زیبای فارسی -->
9
+ <link href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css" rel="stylesheet"
10
+ type="text/css" />
11
+ <!-- ایمپورت آیکون‌ها -->
12
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
13
+
14
+ <style>
15
+ :root {
16
+ /* تغییرات: پس‌زمینه روشن‌تر (Slate 800 به جای Slate 900) */
17
+ --bg-color: #1e293b;
18
+ /* تغییرات: کارت شیشه‌ای با حالت روشن‌تر */
19
+ --card-bg: rgba(255, 255, 255, 0.03);
20
+ --primary: #6366f1;
21
+ --primary-hover: #4f46e5;
22
+ --text-main: #f1f5f9;
23
+ --text-muted: #cbd5e1;
24
+ /* تغییرات: ورودی‌ها با پس‌زمینه روشن‌تر */
25
+ --input-bg: rgba(0, 0, 0, 0.2);
26
+ --border-color: rgba(255, 255, 255, 0.1);
27
+ --error: #ef4444;
28
+ --success: #10b981;
29
+ --glass-border: 1px solid rgba(255, 255, 255, 0.15);
30
+ }
31
+
32
+ * {
33
+ box-sizing: border-box;
34
+ margin: 0;
35
+ padding: 0;
36
+ font-family: 'Vazirmatn', sans-serif;
37
+ }
38
+
39
+ body {
40
+ background-color: var(--bg-color);
41
+ /* تغییرات: گرادینت‌ها با نورانیته بیشتر برای ایجاد حالت کمتر تاریک */
42
+ background-image:
43
+ radial-gradient(at 0% 0%, hsla(253, 16%, 15%, 1) 0, transparent 50%),
44
+ radial-gradient(at 50% 0%, hsla(225, 39%, 40%, 1) 0, transparent 50%),
45
+ radial-gradient(at 100% 0%, hsla(339, 49%, 40%, 1) 0, transparent 50%);
46
+ color: var(--text-main);
47
+ min-height: 100vh;
48
+ display: flex;
49
+ flex-direction: column;
50
+ align-items: center;
51
+ justify-content: center;
52
+ overflow-x: hidden;
53
+ }
54
+
55
+ /* هدر */
56
+ header {
57
+ position: absolute;
58
+ top: 20px;
59
+ width: 100%;
60
+ text-align: center;
61
+ z-index: 10;
62
+ }
63
+
64
+ .brand-link {
65
+ color: var(--text-muted);
66
+ text-decoration: none;
67
+ font-size: 0.9rem;
68
+ transition: color 0.3s;
69
+ display: inline-flex;
70
+ align-items: center;
71
+ gap: 8px;
72
+ padding: 8px 16px;
73
+ background: rgba(255, 255, 255, 0.08);
74
+ border-radius: 20px;
75
+ backdrop-filter: blur(5px);
76
+ border: 1px solid rgba(255,255,255,0.05);
77
+ }
78
+
79
+ .brand-link:hover {
80
+ color: var(--primary);
81
+ background: rgba(255, 255, 255, 0.15);
82
+ }
83
+
84
+ /* کارت اصلی */
85
+ .auth-container {
86
+ width: 90%;
87
+ max-width: 420px;
88
+ background: var(--card-bg);
89
+ backdrop-filter: blur(20px);
90
+ -webkit-backdrop-filter: blur(20px);
91
+ border: var(--glass-border);
92
+ border-radius: 24px;
93
+ padding: 40px 30px;
94
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* سایه کمتر */
95
+ position: relative;
96
+ overflow: hidden;
97
+ transition: all 0.4s ease;
98
+ }
99
+
100
+ /* تب‌های تغییر وضعیت */
101
+ .tabs {
102
+ display: flex;
103
+ justify-content: center;
104
+ margin-bottom: 30px;
105
+ background: var(--input-bg);
106
+ padding: 5px;
107
+ border-radius: 12px;
108
+ position: relative;
109
+ }
110
+
111
+ .tab-btn {
112
+ flex: 1;
113
+ padding: 12px;
114
+ border: none;
115
+ background: transparent;
116
+ color: var(--text-muted);
117
+ cursor: pointer;
118
+ border-radius: 8px;
119
+ font-size: 1rem;
120
+ font-weight: 500;
121
+ transition: all 0.3s ease;
122
+ z-index: 2;
123
+ }
124
+
125
+ .tab-btn.active {
126
+ color: #fff;
127
+ background: var(--primary);
128
+ box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
129
+ }
130
+
131
+ /* فرم‌ها */
132
+ .form-wrapper {
133
+ position: relative;
134
+ }
135
+
136
+ .auth-form {
137
+ display: flex;
138
+ flex-direction: column;
139
+ gap: 20px;
140
+ transition: opacity 0.3s ease, transform 0.3s ease;
141
+ }
142
+
143
+ .hidden {
144
+ display: none;
145
+ opacity: 0;
146
+ transform: translateX(20px);
147
+ }
148
+
149
+ .visible {
150
+ display: flex;
151
+ opacity: 1;
152
+ transform: translateX(0);
153
+ animation: fadeIn 0.4s ease-out;
154
+ }
155
+
156
+ @keyframes fadeIn {
157
+ from {
158
+ opacity: 0;
159
+ transform: translateY(10px);
160
+ }
161
+
162
+ to {
163
+ opacity: 1;
164
+ transform: translateY(0);
165
+ }
166
+ }
167
+
168
+ /* گروه ورودی */
169
+ .input-group {
170
+ position: relative;
171
+ }
172
+
173
+ .input-group label {
174
+ display: block;
175
+ margin-bottom: 8px;
176
+ color: var(--text-muted);
177
+ font-size: 0.9rem;
178
+ }
179
+
180
+ .input-wrapper {
181
+ position: relative;
182
+ display: flex;
183
+ align-items: center;
184
+ }
185
+
186
+ .input-wrapper i {
187
+ position: absolute;
188
+ right: 15px;
189
+ color: var(--text-muted);
190
+ transition: color 0.3s;
191
+ }
192
+
193
+ .form-input {
194
+ width: 100%;
195
+ padding: 14px 45px 14px 15px;
196
+ background: var(--input-bg);
197
+ border: 1px solid var(--border-color);
198
+ border-radius: 12px;
199
+ color: #fff;
200
+ font-size: 1rem;
201
+ outline: none;
202
+ transition: all 0.3s;
203
+ }
204
+
205
+ .form-input:focus {
206
+ border-color: var(--primary);
207
+ box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
208
+ background: rgba(0, 0, 0, 0.3);
209
+ }
210
+
211
+ .form-input:focus+i {
212
+ color: var(--primary);
213
+ }
214
+
215
+ /* کپچا */
216
+ .captcha-container {
217
+ display: flex;
218
+ gap: 10px;
219
+ align-items: center;
220
+ }
221
+
222
+ .captcha-canvas {
223
+ background: #fff;
224
+ border-radius: 8px;
225
+ cursor: pointer;
226
+ flex-shrink: 0;
227
+ }
228
+
229
+ .captcha-input {
230
+ flex-grow: 1;
231
+ }
232
+
233
+ /* دکمه اصلی */
234
+ .submit-btn {
235
+ background: linear-gradient(135deg, var(--primary), #818cf8);
236
+ color: white;
237
+ border: none;
238
+ padding: 14px;
239
+ border-radius: 12px;
240
+ font-size: 1rem;
241
+ font-weight: bold;
242
+ cursor: pointer;
243
+ transition: transform 0.2s, box-shadow 0.2s;
244
+ margin-top: 10px;
245
+ display: flex;
246
+ justify-content: center;
247
+ align-items: center;
248
+ gap: 10px;
249
+ }
250
+
251
+ .submit-btn:hover {
252
+ transform: translateY(-2px);
253
+ box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.6);
254
+ }
255
+
256
+ .submit-btn:active {
257
+ transform: translateY(0);
258
+ }
259
+
260
+ .submit-btn.loading {
261
+ opacity: 0.8;
262
+ pointer-events: none;
263
+ }
264
+
265
+ .submit-btn.loading i {
266
+ animation: spin 1s linear infinite;
267
+ }
268
+
269
+ @keyframes spin {
270
+ 100% {
271
+ transform: rotate(360deg);
272
+ }
273
+ }
274
+
275
+ /* لینک فراموشی رمز */
276
+ .forgot-pass {
277
+ text-align: left;
278
+ margin-top: -10px;
279
+ }
280
+
281
+ .forgot-pass a {
282
+ color: var(--text-muted);
283
+ font-size: 0.85rem;
284
+ text-decoration: none;
285
+ transition: color 0.3s;
286
+ }
287
+
288
+ .forgot-pass a:hover {
289
+ color: var(--primary);
290
+ }
291
+
292
+ /* سیستم نوتیفیکیشن (Toast) */
293
+ .toast-container {
294
+ position: fixed;
295
+ bottom: 20px;
296
+ left: 50%;
297
+ transform: translateX(-50%);
298
+ display: flex;
299
+ flex-direction: column;
300
+ gap: 10px;
301
+ z-index: 100;
302
+ }
303
+
304
+ .toast {
305
+ background: rgba(30, 41, 59, 0.95);
306
+ color: #fff;
307
+ padding: 12px 24px;
308
+ border-radius: 50px;
309
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
310
+ display: flex;
311
+ align-items: center;
312
+ gap: 10px;
313
+ font-size: 0.9rem;
314
+ animation: slideUp 0.3s ease-out;
315
+ border: 1px solid var(--border-color);
316
+ min-width: 280px;
317
+ justify-content: center;
318
+ }
319
+
320
+ .toast.success {
321
+ border-color: var(--success);
322
+ color: var(--success);
323
+ }
324
+
325
+ .toast.error {
326
+ border-color: var(--error);
327
+ color: var(--error);
328
+ }
329
+
330
+ @keyframes slideUp {
331
+ from {
332
+ transform: translateY(20px);
333
+ opacity: 0;
334
+ }
335
+
336
+ to {
337
+ transform: translateY(0);
338
+ opacity: 1;
339
+ }
340
+ }
341
+
342
+ /* رسپانسیو */
343
+ @media (max-width: 480px) {
344
+ .auth-container {
345
+ width: 95%;
346
+ padding: 30px 20px;
347
+ }
348
+
349
+ .submit-btn {
350
+ padding: 12px;
351
+ }
352
+ }
353
+ </style>
354
+ </head>
355
 
356
+ <body>
 
 
357
 
358
+ <!-- هدر و لینک اجباری -->
359
+ <header>
360
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="brand-link">
361
+ <i class="fas fa-code"></i>
362
+ Built with anycoder
363
+ </a>
364
+ </header>
365
+
366
+ <main class="auth-container">
367
+ <!-- تب‌های بالا -->
368
+ <div class="tabs">
369
+ <button class="tab-btn active" onclick="switchTab('login')">ورود</button>
370
+ <button class="tab-btn" onclick="switchTab('register')">ثبت‌نام</button>
371
+ </div>
372
+
373
+ <!-- فرم ورود -->
374
+ <div id="login-form" class="auth-form visible">
375
+ <div class="input-group">
376
+ <label>شماره موبایل</label>
377
+ <div class="input-wrapper">
378
+ <input type="tel" id="login-phone" class="form-input" placeholder="مثلا: 09123456789" maxlength="11">
379
+ <i class="fas fa-mobile-alt"></i>
380
+ </div>
381
+ </div>
382
 
383
+ <div class="input-group">
384
+ <label>رمز عبور</label>
385
+ <div class="input-wrapper">
386
+ <input type="password" id="login-pass" class="form-input" placeholder="رمز عبور خود را وارد کنید">
387
+ <i class="fas fa-lock"></i>
388
+ </div>
389
+ </div>
390
+
391
+ <div class="input-group">
392
+ <label>کد امنیتی</label>
393
+ <div class="captcha-container">
394
+ <canvas id="login-canvas" width="100" height="44" class="captcha-canvas"
395
+ title="برای تغییر کلیک کنید"></canvas>
396
+ <input type="text" id="login-captcha-input" class="form-input captcha-input" placeholder="کد تصویر" maxlength="4">
397
+ </div>
398
+ </div>
399
 
400
+ <div class="forgot-pass">
401
+ <a href="#">رمز عبور را فراموش کرده‌اید؟</a>
402
+ </div>
403
 
404
+ <button class="submit-btn" onclick="handleLogin()">
405
+ <span>ورود به حساب</span>
406
+ <i class="fas fa-arrow-left"></i>
407
+ </button>
408
+ </div>
409
+
410
+ <!-- فرم ثبت نام -->
411
+ <div id="register-form" class="auth-form hidden">
412
+ <div class="input-group">
413
+ <label>شماره موبایل</label>
414
+ <div class="input-wrapper">
415
+ <input type="tel" id="reg-phone" class="form-input" placeholder="مثلا: 09123456789" maxlength="11">
416
+ <i class="fas fa-mobile-alt"></i>
417
+ </div>
418
+ </div>
419
 
420
+ <div class="input-group">
421
+ <label>رمز عبور</label>
422
+ <div class="input-wrapper">
423
+ <input type="password" id="reg-pass" class="form-input" placeholder="حداقل ۸ کاراکتر">
424
+ <i class="fas fa-lock"></i>
425
+ </div>
426
+ </div>
 
 
 
 
 
 
 
427
 
428
+ <div class="input-group">
429
+ <label>تکرار رمز عبور</label>
430
+ <div class="input-wrapper">
431
+ <input type="password" id="reg-pass-conf" class="form-input" placeholder="تکرار رمز عبور">
432
+ <i class="fas fa-check-double"></i>
 
 
 
 
 
 
 
 
433
  </div>
434
+ </div>
435
 
436
+ <div class="input-group">
437
+ <label>کد امنیتی</label>
438
+ <div class="captcha-container">
439
+ <canvas id="reg-canvas" width="100" height="44" class="captcha-captcha" title="برای تغییر کلیک کنید"></canvas>
440
+ <input type="text" id="reg-captcha-input" class="form-input captcha-input" placeholder="کد تصویر" maxlength="4">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
441
  </div>
442
+ </div>
443
 
444
+ <button class="submit-btn" onclick="handleRegister()">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
445
  <span>ثبت‌نام کنید</span>
446
  <i class="fas fa-user-plus"></i>
447
  </button>
448
+ </div>
449
+ </main>
450
 
451
+ <!-- کانتینر پیام‌ها -->
452
+ <div class="toast-container" id="toast-container"></div>
453
 
454
+ <script>
455
+ // متغیرهای سراسری برای کد کپچا
456
  let loginCaptchaCode = '';
457
  let regCaptchaCode = '';
458
 
 
650
  });
651
  });
652
 
653
+ </script>
654
  </body>
655
+
656
  </html>