samirerty commited on
Commit
91497b3
·
verified ·
1 Parent(s): 8d732f1

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +846 -14
index.html CHANGED
@@ -1,19 +1,851 @@
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>AnyCoder - چت روم</title>
7
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
8
- <style>
9
- /* iOS Glassmorphism CSS */
10
- </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  </head>
 
12
  <body>
13
- <!-- iOS Status Bar -->
14
- <!-- Main Content (App Grid) -->
15
- <!-- Bottom Dock -->
16
- <!-- Navigation Dots -->
17
- <!-- Built with anycoder link -->
18
- </body>
19
- </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, maximum-scale=1.0, user-scalable=no">
7
+ <title>AnyCoder - چت روم پیشرفته</title>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ :root {
11
+ --ios-bg-dark: #1a1a2e;
12
+ --ios-bg-mid: #16213e;
13
+ --ios-bg-light: #0f3460;
14
+ --ios-accent-pink: #E94584;
15
+ --ios-accent-teal: #4FD3C4;
16
+ --ios-purple: #533483;
17
+ --glass-bg: rgba(255, 255, 255, 0.08);
18
+ --glass-border: rgba(255, 255, 255, 0.15);
19
+ --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
20
+ --text-primary: rgba(255, 255, 255, 0.95);
21
+ --text-secondary: rgba(255, 255, 255, 0.6);
22
+ --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
23
+ --safe-area-top: env(safe-area-inset-top);
24
+ }
25
+
26
+ * {
27
+ margin: 0;
28
+ padding: 0;
29
+ box-sizing: border-box;
30
+ -webkit-tap-highlight-color: transparent;
31
+ }
32
+
33
+ body {
34
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Tahoma', 'Vazirmatn', sans-serif;
35
+ background: linear-gradient(135deg, var(--ios-bg-dark) 0%, var(--ios-bg-mid) 50%, var(--ios-bg-light) 100%);
36
+ min-height: 100vh;
37
+ color: var(--text-primary);
38
+ overflow-x: hidden;
39
+ position: relative;
40
+ }
41
+
42
+ /* Background Shapes */
43
+ body::before {
44
+ content: '';
45
+ position: fixed;
46
+ top: -20%;
47
+ right: -10%;
48
+ width: 600px;
49
+ height: 600px;
50
+ background: radial-gradient(circle, rgba(233, 69, 132, 0.2) 0%, transparent 70%);
51
+ border-radius: 50%;
52
+ pointer-events: none;
53
+ z-index: 0;
54
+ animation: floatBlob 20s infinite alternate;
55
+ }
56
+
57
+ body::after {
58
+ content: '';
59
+ position: fixed;
60
+ bottom: -10%;
61
+ left: -10%;
62
+ width: 500px;
63
+ height: 500px;
64
+ background: radial-gradient(circle, rgba(79, 211, 196, 0.15) 0%, transparent 70%);
65
+ border-radius: 50%;
66
+ pointer-events: none;
67
+ z-index: 0;
68
+ animation: floatBlob 15s infinite alternate-reverse;
69
+ }
70
+
71
+ /* iOS Status Bar */
72
+ .status-bar {
73
+ display: flex;
74
+ justify-content: space-between;
75
+ align-items: center;
76
+ padding: 0.8rem 1.5rem;
77
+ padding-top: calc(0.8rem + var(--safe-area-top));
78
+ font-size: 0.85rem;
79
+ font-weight: 600;
80
+ position: sticky;
81
+ top: 0;
82
+ z-index: 100;
83
+ backdrop-filter: blur(20px);
84
+ -webkit-backdrop-filter: blur(20px);
85
+ background: rgba(26, 26, 46, 0.6);
86
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
87
+ }
88
+
89
+ .status-left {
90
+ display: flex;
91
+ align-items: center;
92
+ gap: 0.8rem;
93
+ }
94
+
95
+ .status-right {
96
+ display: flex;
97
+ align-items: center;
98
+ gap: 0.5rem;
99
+ }
100
+
101
+ .status-link {
102
+ color: var(--ios-accent-teal);
103
+ text-decoration: none;
104
+ font-size: 0.75rem;
105
+ font-weight: bold;
106
+ background: rgba(79, 211, 196, 0.1);
107
+ padding: 4px 10px;
108
+ border-radius: 12px;
109
+ border: 1px solid rgba(79, 211, 196, 0.2);
110
+ transition: var(--transition-smooth);
111
+ }
112
+
113
+ .status-link:hover {
114
+ background: rgba(79, 211, 196, 0.2);
115
+ }
116
+
117
+ .battery-icon {
118
+ display: flex;
119
+ align-items: center;
120
+ gap: 0.3rem;
121
+ }
122
+
123
+ /* Main Container */
124
+ .ios-container {
125
+ max-width: 480px;
126
+ margin: 0 auto;
127
+ padding: 1.5rem;
128
+ position: relative;
129
+ z-index: 1;
130
+ min-height: calc(100vh - 80px);
131
+ display: flex;
132
+ flex-direction: column;
133
+ padding-bottom: 2rem;
134
+ }
135
+
136
+ /* Views System */
137
+ .view-section {
138
+ display: none;
139
+ animation: fadeIn 0.4s ease-out;
140
+ flex-direction: column;
141
+ height: 100%;
142
+ }
143
+
144
+ .view-section.active {
145
+ display: flex;
146
+ }
147
+
148
+ @keyframes fadeIn {
149
+ from { opacity: 0; transform: translateY(10px); }
150
+ to { opacity: 1; transform: translateY(0); }
151
+ }
152
+
153
+ /* Glass Hero */
154
+ .glass-hero {
155
+ backdrop-filter: blur(20px);
156
+ background: var(--glass-bg);
157
+ border: 1px solid var(--glass-border);
158
+ border-radius: 24px;
159
+ padding: 2rem;
160
+ margin-bottom: 2rem;
161
+ box-shadow: var(--glass-shadow);
162
+ text-align: center;
163
+ position: relative;
164
+ overflow: hidden;
165
+ }
166
+
167
+ .hero-icon {
168
+ width: 80px;
169
+ height: 80px;
170
+ background: linear-gradient(135deg, var(--ios-accent-pink), var(--ios-purple));
171
+ border-radius: 22px;
172
+ display: flex;
173
+ align-items: center;
174
+ justify-content: center;
175
+ margin: 0 auto 1.5rem;
176
+ font-size: 2.5rem;
177
+ box-shadow: 0 10px 30px rgba(233, 69, 132, 0.3);
178
+ border: 1px solid rgba(255, 255, 255, 0.2);
179
+ }
180
+
181
+ .glass-hero h1 {
182
+ font-size: 1.8rem;
183
+ margin-bottom: 0.5rem;
184
+ font-weight: 800;
185
+ }
186
+
187
+ .subtitle {
188
+ color: var(--text-secondary);
189
+ font-size: 1rem;
190
+ margin-bottom: 1.5rem;
191
+ }
192
+
193
+ /* App Grid */
194
+ .app-grid {
195
+ display: grid;
196
+ grid-template-columns: repeat(3, 1fr);
197
+ gap: 1.5rem 1rem;
198
+ margin-bottom: 2rem;
199
+ }
200
+
201
+ .app-item {
202
+ display: flex;
203
+ flex-direction: column;
204
+ align-items: center;
205
+ gap: 0.6rem;
206
+ cursor: pointer;
207
+ transition: var(--transition-smooth);
208
+ }
209
+
210
+ .app-item:active {
211
+ transform: scale(0.9);
212
+ }
213
+
214
+ .app-icon {
215
+ width: 65px;
216
+ height: 65px;
217
+ border-radius: 18px;
218
+ display: flex;
219
+ align-items: center;
220
+ justify-content: center;
221
+ font-size: 1.8rem;
222
+ color: white;
223
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
224
+ border: 1px solid rgba(255, 255, 255, 0.1);
225
+ }
226
+
227
+ .app-label {
228
+ font-size: 0.8rem;
229
+ color: var(--text-secondary);
230
+ font-weight: 500;
231
+ }
232
+
233
+ /* Icon Gradients */
234
+ .icon-gradient-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
235
+ .icon-gradient-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
236
+ .icon-gradient-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
237
+ .icon-gradient-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
238
+ .icon-gradient-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
239
+ .icon-gradient-6 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
240
+
241
+ /* iOS Dock */
242
+ .ios-dock {
243
+ backdrop-filter: blur(25px);
244
+ background: rgba(255, 255, 255, 0.1);
245
+ border: 1px solid rgba(255, 255, 255, 0.15);
246
+ border-radius: 35px;
247
+ padding: 1rem 1.5rem;
248
+ display: flex;
249
+ justify-content: space-around;
250
+ margin-top: auto;
251
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
252
+ }
253
+
254
+ .dock-item {
255
+ width: 55px;
256
+ height: 55px;
257
+ border-radius: 14px;
258
+ display: flex;
259
+ align-items: center;
260
+ justify-content: center;
261
+ font-size: 1.5rem;
262
+ color: white;
263
+ cursor: pointer;
264
+ transition: var(--transition-smooth);
265
+ box-shadow: 0 4px 10px rgba(0,0,0,0.2);
266
+ }
267
+
268
+ .dock-item:hover {
269
+ transform: translateY(-5px) scale(1.05);
270
+ }
271
+
272
+ /* --- CHAT INTERFACE --- */
273
+ .chat-header {
274
+ display: flex;
275
+ align-items: center;
276
+ gap: 1rem;
277
+ margin-bottom: 1rem;
278
+ padding: 0.5rem;
279
+ background: var(--glass-bg);
280
+ border-radius: 16px;
281
+ border: 1px solid var(--glass-border);
282
+ }
283
+
284
+ .back-btn {
285
+ background: none;
286
+ border: none;
287
+ color: var(--ios-accent-pink);
288
+ font-size: 1.2rem;
289
+ cursor: pointer;
290
+ padding: 5px;
291
+ }
292
+
293
+ .chat-user-info h3 { font-size: 1rem; margin-bottom: 2px; }
294
+ .chat-user-info span { font-size: 0.75rem; color: var(--ios-accent-teal); }
295
+
296
+ .chat-window {
297
+ flex: 1;
298
+ background: rgba(0,0,0,0.2);
299
+ border-radius: 20px;
300
+ padding: 1rem;
301
+ overflow-y: auto;
302
+ display: flex;
303
+ flex-direction: column;
304
+ gap: 1rem;
305
+ margin-bottom: 1rem;
306
+ min-height: 300px;
307
+ max-height: 50vh;
308
+ scrollbar-width: thin;
309
+ scrollbar-color: rgba(255,255,255,0.2) transparent;
310
+ }
311
+
312
+ .message {
313
+ max-width: 75%;
314
+ padding: 10px 15px;
315
+ border-radius: 18px;
316
+ font-size: 0.95rem;
317
+ line-height: 1.4;
318
+ position: relative;
319
+ animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
320
+ }
321
+
322
+ @keyframes popIn {
323
+ from { transform: scale(0.8); opacity: 0; }
324
+ to { transform: scale(1); opacity: 1; }
325
+ }
326
+
327
+ /* RTL Chat Logic */
328
+ .message.received {
329
+ align-self: flex-start; /* Right side in RTL */
330
+ background: rgba(255, 255, 255, 0.1);
331
+ border-bottom-right-radius: 4px;
332
+ color: var(--text-primary);
333
+ }
334
+
335
+ .message.sent {
336
+ align-self: flex-end; /* Left side in RTL */
337
+ background: linear-gradient(135deg, var(--ios-accent-pink), var(--ios-purple));
338
+ border-bottom-left-radius: 4px;
339
+ color: white;
340
+ box-shadow: 0 4px 15px rgba(233, 69, 132, 0.3);
341
+ }
342
+
343
+ .message-time {
344
+ display: block;
345
+ font-size: 0.65rem;
346
+ margin-top: 5px;
347
+ opacity: 0.7;
348
+ text-align: left;
349
+ }
350
+
351
+ .message.sent .message-time { text-align: right; }
352
+
353
+ .chat-input-area {
354
+ display: flex;
355
+ gap: 0.8rem;
356
+ background: var(--glass-bg);
357
+ padding: 0.5rem;
358
+ border-radius: 30px;
359
+ border: 1px solid var(--glass-border);
360
+ }
361
+
362
+ .chat-input {
363
+ flex: 1;
364
+ background: transparent;
365
+ border: none;
366
+ color: white;
367
+ padding: 0.8rem;
368
+ font-family: inherit;
369
+ outline: none;
370
+ }
371
+
372
+ .send-btn {
373
+ width: 45px;
374
+ height: 45px;
375
+ border-radius: 50%;
376
+ background: var(--ios-accent-pink);
377
+ border: none;
378
+ color: white;
379
+ cursor: pointer;
380
+ display: flex;
381
+ align-items: center;
382
+ justify-content: center;
383
+ transition: var(--transition-smooth);
384
+ }
385
+
386
+ .send-btn:hover { background: var(--ios-purple); transform: scale(1.05); }
387
+
388
+ /* --- FORMS (Login/Register) --- */
389
+ .form-container {
390
+ background: var(--glass-bg);
391
+ padding: 2rem;
392
+ border-radius: 24px;
393
+ border: 1px solid var(--glass-border);
394
+ backdrop-filter: blur(20px);
395
+ }
396
+
397
+ .input-group {
398
+ margin-bottom: 1.2rem;
399
+ }
400
+
401
+ .input-group label {
402
+ display: block;
403
+ margin-bottom: 0.5rem;
404
+ font-size: 0.9rem;
405
+ color: var(--text-secondary);
406
+ }
407
+
408
+ .glass-input {
409
+ width: 100%;
410
+ padding: 1rem;
411
+ background: rgba(0,0,0,0.2);
412
+ border: 1px solid rgba(255,255,255,0.1);
413
+ border-radius: 12px;
414
+ color: white;
415
+ font-family: inherit;
416
+ outline: none;
417
+ transition: var(--transition-smooth);
418
+ }
419
+
420
+ .glass-input:focus {
421
+ border-color: var(--ios-accent-teal);
422
+ background: rgba(0,0,0,0.3);
423
+ }
424
+
425
+ .btn-primary {
426
+ width: 100%;
427
+ padding: 1rem;
428
+ background: linear-gradient(135deg, var(--ios-accent-pink), var(--ios-purple));
429
+ border: none;
430
+ border-radius: 12px;
431
+ color: white;
432
+ font-weight: bold;
433
+ font-size: 1rem;
434
+ cursor: pointer;
435
+ transition: var(--transition-smooth);
436
+ margin-top: 1rem;
437
+ }
438
+
439
+ .btn-primary:hover {
440
+ transform: translateY(-2px);
441
+ box-shadow: 0 5px 20px rgba(233, 69, 132, 0.4);
442
+ }
443
+
444
+ /* --- TOAST NOTIFICATIONS --- */
445
+ .toast-container {
446
+ position: fixed;
447
+ top: 80px;
448
+ left: 50%;
449
+ transform: translateX(-50%);
450
+ z-index: 1000;
451
+ display: flex;
452
+ flex-direction: column;
453
+ gap: 10px;
454
+ pointer-events: none;
455
+ width: 90%;
456
+ max-width: 350px;
457
+ }
458
+
459
+ .toast {
460
+ background: rgba(22, 33, 62, 0.9);
461
+ backdrop-filter: blur(10px);
462
+ color: white;
463
+ padding: 12px 20px;
464
+ border-radius: 16px;
465
+ border: 1px solid rgba(255,255,255,0.1);
466
+ box-shadow: 0 5px 20px rgba(0,0,0,0.4);
467
+ font-size: 0.9rem;
468
+ display: flex;
469
+ align-items: center;
470
+ gap: 10px;
471
+ animation: slideDown 0.3s ease-out forwards;
472
+ }
473
+
474
+ .toast.success i { color: var(--ios-accent-teal); }
475
+ .toast.error i { color: var(--ios-accent-pink); }
476
+
477
+ @keyframes slideDown {
478
+ from { opacity: 0; transform: translateY(-20px); }
479
+ to { opacity: 1; transform: translateY(0); }
480
+ }
481
+
482
+ @keyframes slideUpFade {
483
+ to { opacity: 0; transform: translateY(-20px); }
484
+ }
485
+
486
+ @keyframes floatBlob {
487
+ 0% { transform: translate(0, 0) scale(1); }
488
+ 100% { transform: translate(20px, -20px) scale(1.1); }
489
+ }
490
+
491
+ /* Responsive */
492
+ @media (max-width: 480px) {
493
+ .ios-container { padding: 1rem; }
494
+ .app-icon { width: 55px; height: 55px; font-size: 1.5rem; }
495
+ }
496
+ </style>
497
  </head>
498
+
499
  <body>
500
+ <!-- Toast Container -->
501
+ <div class="toast-container" id="toastContainer"></div>
502
+
503
+ <!-- iOS Status Bar -->
504
+ <div class="status-bar">
505
+ <div class="status-left">
506
+ <span class="time" id="clock">۰۹:۴۱</span>
507
+ </div>
508
+ <div class="status-right">
509
+ <!-- AnyCoder Link in Header -->
510
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="status-link">
511
+ <i class="fas fa-bolt"></i> AnyCoder
512
+ </a>
513
+ <div class="battery-icon">
514
+ <i class="fas fa-battery-three-quarters" style="font-size: 0.9rem;"></i>
515
+ </div>
516
+ </div>
517
+ </div>
518
+
519
+ <div class="ios-container">
520
+
521
+ <!-- VIEW 1: DASHBOARD -->
522
+ <section id="view-dashboard" class="view-section active">
523
+ <div class="glass-hero">
524
+ <div class="hero-icon">
525
+ <i class="fas fa-comments"></i>
526
+ </div>
527
+ <h1>چت روم ساده</h1>
528
+ <p class="subtitle">ارتباط سریع، امن و زیبا</p>
529
+ </div>
530
+
531
+ <!-- Info Widgets -->
532
+ <div style="display: flex; gap: 10px; overflow-x: auto; margin-bottom: 2rem; padding-bottom: 5px;">
533
+ <div style="min-width: 120px; background: var(--glass-bg); padding: 1rem; border-radius: 16px; border: 1px solid var(--glass-border); text-align: center;">
534
+ <div style="color: var(--ios-accent-teal); font-weight: bold; font-size: 1.2rem;">۱۲۵۴</div>
535
+ <div style="font-size: 0.75rem; color: var(--text-secondary);">کاربران آنلاین</div>
536
+ </div>
537
+ <div style="min-width: 120px; background: var(--glass-bg); padding: 1rem; border-radius: 16px; border: 1px solid var(--glass-border); text-align: center;">
538
+ <div style="color: var(--ios-accent-pink); font-weight: bold; font-size: 1.2rem;">۴۸</div>
539
+ <div style="font-size: 0.75rem; color: var(--text-secondary);">اتاق فعال</div>
540
+ </div>
541
+ </div>
542
+
543
+ <!-- App Grid -->
544
+ <div class="app-grid">
545
+ <div class="app-item" onclick="router('register')">
546
+ <div class="app-icon icon-gradient-1"><i class="fas fa-user-plus"></i></div>
547
+ <span class="app-label">ثبت‌نام</span>
548
+ </div>
549
+ <div class="app-item" onclick="router('rooms')">
550
+ <div class="app-icon icon-gradient-2"><i class="fas fa-door-open"></i></div>
551
+ <span class="app-label">اتاق‌ها</span>
552
+ </div>
553
+ <div class="app-item" onclick="router('chat')">
554
+ <div class="app-icon icon-gradient-3"><i class="fas fa-comments"></i></div>
555
+ <span class="app-label">چت زنده</span>
556
+ </div>
557
+ <div class="app-item" onclick="router('login')">
558
+ <div class="app-icon icon-gradient-4"><i class="fas fa-sign-in-alt"></i></div>
559
+ <span class="app-label">ورود</span>
560
+ </div>
561
+ <div class="app-item" onclick="showToast('بخش تحلیل به زودی فعال می‌شود', 'info')">
562
+ <div class="app-icon icon-gradient-6"><i class="fas fa-chart-line"></i></div>
563
+ <span class="app-label">تحلیل</span>
564
+ </div>
565
+ <div class="app-item" onclick="showToast('شما از قبل خارج شده‌اید', 'error')">
566
+ <div class="app-icon icon-gradient-5"><i class="fas fa-sign-out-alt"></i></div>
567
+ <span class="app-label">خروج</span>
568
+ </div>
569
+ </div>
570
+ </section>
571
+
572
+ <!-- VIEW 2: CHAT -->
573
+ <section id="view-chat" class="view-section">
574
+ <div class="chat-header">
575
+ <button class="back-btn" onclick="router('dashboard')"><i class="fas fa-arrow-right"></i></button>
576
+ <div style="width: 40px; height: 40px; background: linear-gradient(135deg, #f093fb, #f5576c); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem;">ف</div>
577
+ <div class="chat-user-info">
578
+ <h3>اتاق عمومی</h3>
579
+ <span><i class="fas fa-circle" style="font-size: 6px; vertical-align: middle;"></i> ۱۲۴ آنلاین</span>
580
+ </div>
581
+ <div style="margin-right: auto; color: var(--text-secondary);"><i class="fas fa-ellipsis-v"></i></div>
582
+ </div>
583
+
584
+ <div class="chat-window" id="chatWindow">
585
+ <div class="message received">
586
+ سلام! به چت روم خوش آمدید.
587
+ <span class="message-time">۰۹:۴۱</span>
588
+ </div>
589
+ <div class="message received">
590
+ چطور می‌توانم کمکتان کنم؟
591
+ <span class="message-time">۰۹:۴۱</span>
592
+ </div>
593
+ </div>
594
+
595
+ <div class="chat-input-area">
596
+ <button style="background:none; border:none; color: var(--text-secondary); padding: 0 10px; cursor: pointer;"><i class="fas fa-plus"></i></button>
597
+ <input type="text" class="chat-input" id="messageInput" placeholder="پیام خود را بنویسید..." autocomplete="off">
598
+ <button class="send-btn" onclick="sendMessage()"><i class="fas fa-paper-plane"></i></button>
599
+ </div>
600
+ </section>
601
+
602
+ <!-- VIEW 3: LOGIN -->
603
+ <section id="view-login" class="view-section">
604
+ <div class="glass-hero" style="padding: 1.5rem;">
605
+ <h2>ورود به حساب</h2>
606
+ <p class="subtitle">خوشحال می‌بینیم که برگشتید</p>
607
+ </div>
608
+ <div class="form-container">
609
+ <form onsubmit="handleLogin(event)">
610
+ <div class="input-group">
611
+ <label>نام کاربری</label>
612
+ <input type="text" class="glass-input" required placeholder="example">
613
+ </div>
614
+ <div class="input-group">
615
+ <label>رمز عبور</label>
616
+ <input type="password" class="glass-input" required placeholder="••••••••">
617
+ </div>
618
+ <button type="submit" class="btn-primary">ورود</button>
619
+ <p style="text-align: center; margin-top: 1rem; font-size: 0.9rem; color: var(--text-secondary);">
620
+ حساب ندارید؟ <a href="#" onclick="router('register')" style="color: var(--ios-accent-teal);">ثبت نام کنید</a>
621
+ </p>
622
+ </form>
623
+ </div>
624
+ </section>
625
+
626
+ <!-- VIEW 4: REGISTER -->
627
+ <section id="view-register" class="view-section">
628
+ <div class="glass-hero" style="padding: 1.5rem;">
629
+ <h2>ایجاد حساب</h2>
630
+ <p class="subtitle">به جمع ما بپیوندید</p>
631
+ </div>
632
+ <div class="form-container">
633
+ <form onsubmit="handleRegister(event)">
634
+ <div class="input-group">
635
+ <label>نام کامل</label>
636
+ <input type="text" class="glass-input" required>
637
+ </div>
638
+ <div class="input-group">
639
+ <label>نام کاربری</label>
640
+ <input type="text" class="glass-input" required>
641
+ </div>
642
+ <div class="input-group">
643
+ <label>رمز عبور</label>
644
+ <input type="password" class="glass-input" required>
645
+ </div>
646
+ <button type="submit" class="btn-primary">ثبت نام</button>
647
+ <p style="text-align: center; margin-top: 1rem; font-size: 0.9rem; color: var(--text-secondary);">
648
+ قبلاً ثبت نام کرده‌اید؟ <a href="#" onclick="router('login')" style="color: var(--ios-accent-teal);">وارد شوید</a>
649
+ </p>
650
+ </form>
651
+ </div>
652
+ </section>
653
+
654
+ <!-- VIEW 5: ROOMS -->
655
+ <section id="view-rooms" class="view-section">
656
+ <div class="chat-header">
657
+ <button class="back-btn" onclick="router('dashboard')"><i class="fas fa-arrow-right"></i></button>
658
+ <h2>اتاق‌های گفتگو</h2>
659
+ </div>
660
+ <div style="display: flex; flex-direction: column; gap: 1rem;">
661
+ <!-- Room Item -->
662
+ <div onclick="router('chat')" style="background: var(--glass-bg); padding: 1rem; border-radius: 16px; border: 1px solid var(--glass-border); display: flex; align-items: center; gap: 1rem; cursor: pointer; transition: var(--transition-smooth);">
663
+ <div style="width: 50px; height: 50px; background: linear-gradient(135deg, #4facfe, #00f2fe); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: white;">
664
+ <i class="fas fa-globe"></i>
665
+ </div>
666
+ <div style="flex: 1;">
667
+ <h4 style="margin-bottom: 4px;">گفتگوی آزاد</h4>
668
+ <span style="font-size: 0.8rem; color: var(--text-secondary);">بحث در مورد تکنولوژی و برنامه‌نویسی</span>
669
+ </div>
670
+ <div style="text-align: left;">
671
+ <div style="font-size: 0.9rem; font-weight: bold; color: var(--ios-accent-teal);">۴۵</div>
672
+ <div style="font-size: 0.7rem; color: var(--text-secondary);">نفر</div>
673
+ </div>
674
+ </div>
675
+
676
+ <!-- Room Item -->
677
+ <div onclick="router('chat')" style="background: var(--glass-bg); padding: 1rem; border-radius: 16px; border: 1px solid var(--glass-border); display: flex; align-items: center; gap: 1rem; cursor: pointer; transition: var(--transition-smooth);">
678
+ <div style="width: 50px; height: 50px; background: linear-gradient(135deg, #f093fb, #f5576c); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: white;">
679
+ <i class="fas fa-gamepad"></i>
680
+ </div>
681
+ <div style="flex: 1;">
682
+ <h4 style="margin-bottom: 4px;">گیمرها</h4>
683
+ <span style="font-size: 0.8rem; color: var(--text-secondary);">اخبار بازی و گیم‌پلی</span>
684
+ </div>
685
+ <div style="text-align: left;">
686
+ <div style="font-size: 0.9rem; font-weight: bold; color: var(--ios-accent-pink);">۱۲۰</div>
687
+ <div style="font-size: 0.7rem; color: var(--text-secondary);">نفر</div>
688
+ </div>
689
+ </div>
690
+
691
+ <!-- Room Item -->
692
+ <div onclick="router('chat')" style="background: var(--glass-bg); padding: 1rem; border-radius: 16px; border: 1px solid var(--glass-border); display: flex; align-items: center; gap: 1rem; cursor: pointer; transition: var(--transition-smooth);">
693
+ <div style="width: 50px; height: 50px; background: linear-gradient(135deg, #43e97b, #38f9d7); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: white;">
694
+ <i class="fas fa-music"></i>
695
+ </div>
696
+ <div style="flex: 1;">
697
+ <h4 style="margin-bottom: 4px;">موسیقی</h4>
698
+ <span style="font-size: 0.8rem; color: var(--text-secondary);">بهترین آهنگ‌های روز</span>
699
+ </div>
700
+ <div style="text-align: left;">
701
+ <div style="font-size: 0.9rem; font-weight: bold; color: var(--ios-accent-teal);">۸۰</div>
702
+ <div style="font-size: 0.7rem; color: var(--text-secondary);">نفر</div>
703
+ </div>
704
+ </div>
705
+ </div>
706
+ </section>
707
+
708
+ <!-- iOS Dock (Visible on Dashboard only) -->
709
+ <div class="ios-dock" id="main-dock">
710
+ <div class="dock-item icon-gradient-1" onclick="router('register')"><i class="fas fa-user-plus"></i></div>
711
+ <div class="dock-item icon-gradient-3" onclick="router('chat')"><i class="fas fa-comment"></i></div>
712
+ <div class="dock-item icon-gradient-2" onclick="router('rooms')"><i class="fas fa-door-open"></i></div>
713
+ <div class="dock-item icon-gradient-4" onclick="router('login')"><i class="fas fa-user"></i></div>
714
+ </div>
715
+
716
+ </div>
717
+
718
+ <script>
719
+ // --- UTILITIES ---
720
+ function toPersianNum(num) {
721
+ const persian = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
722
+ return num.toString().replace(/\d/g, w => persian[w]);
723
+ }
724
+
725
+ function updateClock() {
726
+ const now = new Date();
727
+ const hours = String(now.getHours()).padStart(2, '0');
728
+ const minutes = String(now.getMinutes()).padStart(2, '0');
729
+ document.getElementById('clock').textContent = toPersianNum(`${hours}:${minutes}`);
730
+ }
731
+ setInterval(updateClock, 1000);
732
+ updateClock();
733
+
734
+ // --- NAVIGATION ROUTER ---
735
+ function router(viewId) {
736
+ // Hide all views
737
+ document.querySelectorAll('.view-section').forEach(el => {
738
+ el.classList.remove('active');
739
+ });
740
+
741
+ // Show target view
742
+ const target = document.getElementById(`view-${viewId}`);
743
+ if(target) {
744
+ target.classList.add('active');
745
+ }
746
+
747
+ // Handle Dock Visibility
748
+ const dock = document.getElementById('main-dock');
749
+ if (viewId === 'dashboard') {
750
+ dock.style.display = 'flex';
751
+ } else {
752
+ dock.style.display = 'none';
753
+ }
754
+
755
+ // Scroll to top
756
+ window.scrollTo(0, 0);
757
+ }
758
+
759
+ // --- TOAST NOTIFICATION SYSTEM ---
760
+ function showToast(message, type = 'success') {
761
+ const container = document.getElementById('toastContainer');
762
+ const toast = document.createElement('div');
763
+ toast.className = `toast ${type}`;
764
+
765
+ let icon = type === 'success' ? 'fa-check-circle' : (type === 'error' ? 'fa-exclamation-circle' : 'fa-info-circle');
766
+
767
+ toast.innerHTML = `<i class="fas ${icon}"></i> <span>${message}</span>`;
768
+
769
+ container.appendChild(toast);
770
+
771
+ // Trigger animation
772
+ setTimeout(() => {
773
+ toast.style.animation = 'slideUpFade 0.3s ease-in forwards';
774
+ setTimeout(() => toast.remove(), 300);
775
+ }, 3000);
776
+ }
777
+
778
+ // --- FORM HANDLERS ---
779
+ function handleLogin(e) {
780
+ e.preventDefault();
781
+ // Simulate API call
782
+ const btn = e.target.querySelector('button');
783
+ const originalText = btn.innerText;
784
+ btn.innerText = 'در حال پردازش...';
785
+ btn.disabled = true;
786
+
787
+ setTimeout(() => {
788
+ btn.innerText = originalText;
789
+ btn.disabled = false;
790
+ showToast('با موفقیت وارد شدید', 'success');
791
+ router('chat');
792
+ }, 1500);
793
+ }
794
+
795
+ function handleRegister(e) {
796
+ e.preventDefault();
797
+ const btn = e.target.querySelector('button');
798
+ const originalText = btn.innerText;
799
+ btn.innerText = 'ثبت نام...';
800
+ btn.disabled = true;
801
+
802
+ setTimeout(() => {
803
+ btn.innerText = originalText;
804
+ btn.disabled = false;
805
+ showToast('حساب کاربری ایجاد شد', 'success');
806
+ router('dashboard');
807
+ }, 1500);
808
+ }
809
+
810
+ // --- CHAT LOGIC ---
811
+ const chatWindow = document.getElementById('chatWindow');
812
+ const messageInput = document.getElementById('messageInput');
813
+
814
+ // Auto-reply messages
815
+ const botReplies = [
816
+ "خیلی جالب بود!",
817
+ "می‌توانید بیشتر توضیح دهید؟",
818
+ "من هم همینطور فکر می‌کنم.",
819
+ "این عالی است 🎉",
820
+ "لطفاً صبر کنید، در حال بررسی هستم...",
821
+ "ممنون از اشتراک گذاری!"
822
+ ];
823
+
824
+ function sendMessage() {
825
+ const text = messageInput.value.trim();
826
+ if (!text) return;
827
+
828
+ // Add User Message
829
+ addMessage(text, 'sent');
830
+ messageInput.value = '';
831
+
832
+ // Simulate Bot Reply
833
+ setTimeout(() => {
834
+ const randomReply = botReplies[Math.floor(Math.random() * botReplies.length)];
835
+ addMessage(randomReply, 'received');
836
+ }, 1000 + Math.random() * 1000);
837
+ }
838
+
839
+ function addMessage(text, type) {
840
+ const now = new Date();
841
+ const timeStr = toPersianNum(`${String(now.getHours()).padStart(2,'0')}:${String(now.getMinutes()).padStart(2,'0')}`);
842
+
843
+ const msgDiv = document.createElement('div');
844
+ msgDiv.className = `message ${type}`;
845
+ msgDiv.innerHTML = `
846
+ ${text}
847
+ <span class="message-time">${timeStr}</span>
848
+ `;
849
+
850
+ chatWindow.appendChild(msgDiv);
851
+ chatWindow.scrollTop = chatWindow.scrollHeight;