samirerty commited on
Commit
5abd225
·
verified ·
1 Parent(s): 91497b3

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +771 -833
index.html CHANGED
@@ -1,851 +1,789 @@
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;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>چت روم شیشه‌ای | iOS Glassmorphism</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
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
+ --glass-bg: rgba(255, 255, 255, 0.15);
15
+ --glass-border: rgba(255, 255, 255, 0.25);
16
+ --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
17
+ --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
18
+ --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
19
+ --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
20
+ --text-primary: #1a1a2e;
21
+ --text-secondary: #4a4a6a;
22
+ --white: #ffffff;
23
+ --blur-amount: blur(20px);
24
+ }
25
+
26
+ * {
27
+ margin: 0;
28
+ padding: 0;
29
+ box-sizing: border-box;
30
+ }
31
+
32
+ body {
33
+ font-family: 'Vazirmatn', sans-serif;
34
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
35
+ background-size: 400% 400%;
36
+ animation: gradientShift 15s ease infinite;
37
+ min-height: 100vh;
38
+ overflow-x: hidden;
39
+ position: relative;
40
+ }
41
+
42
+ @keyframes gradientShift {
43
+ 0% { background-position: 0% 50%; }
44
+ 50% { background-position: 100% 50%; }
45
+ 100% { background-position: 0% 50%; }
46
+ }
47
+
48
+ /* Floating Background Elements */
49
+ .bg-shapes {
50
+ position: fixed;
51
+ width: 100%;
52
+ height: 100%;
53
+ overflow: hidden;
54
+ z-index: 0;
55
+ pointer-events: none;
56
+ }
57
+
58
+ .shape {
59
+ position: absolute;
60
+ filter: blur(80px);
61
+ opacity: 0.6;
62
+ animation: float 20s infinite ease-in-out;
63
+ }
64
+
65
+ .shape-1 {
66
+ width: 400px;
67
+ height: 400px;
68
+ background: rgba(255, 255, 255, 0.4);
69
+ border-radius: 50%;
70
+ top: -10%;
71
+ right: -10%;
72
+ animation-delay: 0s;
73
+ }
74
+
75
+ .shape-2 {
76
+ width: 300px;
77
+ height: 300px;
78
+ background: rgba(255, 255, 255, 0.3);
79
+ border-radius: 50%;
80
+ bottom: 10%;
81
+ left: -5%;
82
+ animation-delay: -5s;
83
+ }
84
+
85
+ .shape-3 {
86
+ width: 250px;
87
+ height: 250px;
88
+ background: rgba(255, 255, 255, 0.35);
89
+ border-radius: 50%;
90
+ top: 40%;
91
+ left: 30%;
92
+ animation-delay: -10s;
93
+ }
94
+
95
+ @keyframes float {
96
+ 0%, 100% { transform: translate(0, 0) scale(1); }
97
+ 33% { transform: translate(30px, -30px) scale(1.1); }
98
+ 66% { transform: translate(-20px, 20px) scale(0.9); }
99
+ }
100
+
101
+ /* Header */
102
+ .header {
103
+ position: fixed;
104
+ top: 0;
105
+ width: 100%;
106
+ padding: 1rem 2rem;
107
+ z-index: 1000;
108
+ background: rgba(255, 255, 255, 0.1);
109
+ backdrop-filter: var(--blur-amount);
110
+ -webkit-backdrop-filter: var(--blur-amount);
111
+ border-bottom: 1px solid var(--glass-border);
112
+ display: flex;
113
+ justify-content: space-between;
114
+ align-items: center;
115
+ }
116
+
117
+ .brand {
118
+ display: flex;
119
+ align-items: center;
120
+ gap: 0.5rem;
121
+ color: var(--white);
122
+ font-weight: 700;
123
+ font-size: 1.2rem;
124
+ text-shadow: 0 2px 4px rgba(0,0,0,0.1);
125
+ }
126
+
127
+ .brand i {
128
+ font-size: 1.5rem;
129
+ }
130
+
131
+ .built-with {
132
+ background: rgba(255, 255, 255, 0.2);
133
+ padding: 0.5rem 1rem;
134
+ border-radius: 50px;
135
+ color: var(--white);
136
+ text-decoration: none;
137
+ font-size: 0.85rem;
138
+ font-weight: 500;
139
+ transition: all 0.3s ease;
140
+ border: 1px solid rgba(255, 255, 255, 0.3);
141
+ backdrop-filter: blur(10px);
142
+ }
143
+
144
+ .built-with:hover {
145
+ background: rgba(255, 255, 255, 0.3);
146
+ transform: translateY(-2px);
147
+ box-shadow: 0 5px 15px rgba(0,0,0,0.1);
148
+ }
149
+
150
+ /* Main Container */
151
+ .container {
152
+ position: relative;
153
+ z-index: 1;
154
+ max-width: 1200px;
155
+ margin: 0 auto;
156
+ padding: 8rem 2rem 4rem;
157
+ display: flex;
158
+ flex-direction: column;
159
+ align-items: center;
160
+ gap: 3rem;
161
+ }
162
+
163
+ /* Hero Section Glass Card */
164
+ .hero-glass {
165
+ background: var(--glass-bg);
166
+ backdrop-filter: var(--blur-amount);
167
+ -webkit-backdrop-filter: var(--blur-amount);
168
+ border: 1px solid var(--glass-border);
169
+ border-radius: 30px;
170
+ padding: 3rem;
171
+ width: 100%;
172
+ max-width: 800px;
173
+ box-shadow: var(--glass-shadow);
174
+ text-align: center;
175
+ position: relative;
176
+ overflow: hidden;
177
+ transform: translateY(0);
178
+ transition: transform 0.3s ease;
179
+ }
180
+
181
+ .hero-glass::before {
182
+ content: '';
183
+ position: absolute;
184
+ top: -50%;
185
+ left: -50%;
186
+ width: 200%;
187
+ height: 200%;
188
+ background: linear-gradient(
189
+ 45deg,
190
+ transparent 30%,
191
+ rgba(255, 255, 255, 0.3) 50%,
192
+ transparent 70%
193
+ );
194
+ transform: rotate(45deg);
195
+ transition: all 0.6s;
196
+ opacity: 0;
197
+ }
198
+
199
+ .hero-glass:hover::before {
200
+ animation: shimmer 0.6s ease-in-out;
201
+ }
202
+
203
+ @keyframes shimmer {
204
+ 0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 0; }
205
+ 50% { opacity: 1; }
206
+ 100% { transform: translateX(100%) translateY(100%) rotate(45deg); opacity: 0; }
207
+ }
208
+
209
+ .hero-glass:hover {
210
+ transform: translateY(-5px);
211
+ }
212
+
213
+ .hero-icon {
214
+ width: 100px;
215
+ height: 100px;
216
+ background: var(--white);
217
+ border-radius: 50%;
218
+ display: flex;
219
+ align-items: center;
220
+ justify-content: center;
221
+ margin: 0 auto 1.5rem;
222
+ font-size: 3rem;
223
+ box-shadow: 0 10px 30px rgba(0,0,0,0.1);
224
+ position: relative;
225
+ overflow: hidden;
226
+ }
227
+
228
+ .hero-icon::after {
229
+ content: '';
230
+ position: absolute;
231
+ inset: 0;
232
+ background: var(--primary-gradient);
233
+ opacity: 0.1;
234
+ }
235
+
236
+ h1 {
237
+ font-size: 2.5rem;
238
+ font-weight: 800;
239
+ color: var(--text-primary);
240
+ margin-bottom: 0.5rem;
241
+ text-shadow: 0 2px 4px rgba(0,0,0,0.05);
242
+ }
243
+
244
+ .subtitle {
245
+ font-size: 1.25rem;
246
+ color: var(--text-secondary);
247
+ font-weight: 500;
248
+ opacity: 0.9;
249
+ }
250
+
251
+ /* Features Grid */
252
+ .features {
253
+ display: grid;
254
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
255
+ gap: 2rem;
256
+ width: 100%;
257
+ max-width: 1000px;
258
+ }
259
+
260
+ .feature-card {
261
+ background: var(--glass-bg);
262
+ backdrop-filter: var(--blur-amount);
263
+ -webkit-backdrop-filter: var(--blur-amount);
264
+ border: 1px solid var(--glass-border);
265
+ border-radius: 24px;
266
+ padding: 2rem;
267
+ text-align: center;
268
+ transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
269
+ position: relative;
270
+ overflow: hidden;
271
+ }
272
+
273
+ .feature-card::before {
274
+ content: '';
275
+ position: absolute;
276
+ top: 0;
277
+ left: 0;
278
+ right: 0;
279
+ height: 4px;
280
+ background: var(--accent-gradient);
281
+ transform: scaleX(0);
282
+ transition: transform 0.3s ease;
283
+ }
284
+
285
+ .feature-card:hover {
286
+ transform: translateY(-10px) scale(1.02);
287
+ box-shadow: 0 20px 40px rgba(0,0,0,0.1);
288
+ background: rgba(255, 255, 255, 0.25);
289
+ }
290
+
291
+ .feature-card:hover::before {
292
+ transform: scaleX(1);
293
+ }
294
+
295
+ .feature-icon {
296
+ width: 70px;
297
+ height: 70px;
298
+ background: rgba(255, 255, 255, 0.5);
299
+ border-radius: 20px;
300
+ display: flex;
301
+ align-items: center;
302
+ justify-content: center;
303
+ margin: 0 auto 1.5rem;
304
+ font-size: 2rem;
305
+ color: var(--text-primary);
306
+ transition: all 0.3s ease;
307
+ box-shadow: 0 4px 15px rgba(0,0,0,0.05);
308
+ }
309
+
310
+ .feature-card:hover .feature-icon {
311
+ transform: scale(1.1) rotate(5deg);
312
+ background: var(--white);
313
+ }
314
+
315
+ .feature-card h3 {
316
+ font-size: 1.3rem;
317
+ color: var(--text-primary);
318
+ margin-bottom: 0.5rem;
319
+ font-weight: 700;
320
+ }
321
+
322
+ .feature-card p {
323
+ color: var(--text-secondary);
324
+ font-size: 0.95rem;
325
+ line-height: 1.6;
326
+ }
327
+
328
+ /* CTA Section */
329
+ .cta-glass {
330
+ background: rgba(255, 255, 255, 0.2);
331
+ backdrop-filter: var(--blur-amount);
332
+ -webkit-backdrop-filter: var(--blur-amount);
333
+ border: 1px solid var(--glass-border);
334
+ border-radius: 50px;
335
+ padding: 1rem;
336
+ display: flex;
337
+ gap: 1rem;
338
+ flex-wrap: wrap;
339
+ justify-content: center;
340
+ box-shadow: var(--glass-shadow);
341
+ margin-top: 1rem;
342
+ }
343
+
344
+ .btn {
345
+ padding: 1rem 2.5rem;
346
+ border-radius: 50px;
347
+ text-decoration: none;
348
+ font-weight: 600;
349
+ font-size: 1.1rem;
350
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
351
+ border: none;
352
+ cursor: pointer;
353
+ position: relative;
354
+ overflow: hidden;
355
+ display: inline-flex;
356
+ align-items: center;
357
+ gap: 0.5rem;
358
+ }
359
+
360
+ .btn-primary {
361
+ background: var(--white);
362
+ color: #667eea;
363
+ box-shadow: 0 4px 15px rgba(0,0,0,0.1);
364
+ }
365
+
366
+ .btn-primary:hover {
367
+ transform: translateY(-2px);
368
+ box-shadow: 0 8px 25px rgba(0,0,0,0.15);
369
+ background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
370
+ }
371
+
372
+ .btn-secondary {
373
+ background: transparent;
374
+ color: var(--white);
375
+ border: 2px solid rgba(255, 255, 255, 0.5);
376
+ }
377
+
378
+ .btn-secondary:hover {
379
+ background: rgba(255, 255, 255, 0.2);
380
+ border-color: var(--white);
381
+ transform: translateY(-2px);
382
+ }
383
+
384
+ .btn::after {
385
+ content: '';
386
+ position: absolute;
387
+ top: 50%;
388
+ left: 50%;
389
+ width: 0;
390
+ height: 0;
391
+ border-radius: 50%;
392
+ background: rgba(255, 255, 255, 0.5);
393
+ transform: translate(-50%, -50%);
394
+ transition: width 0.6s, height 0.6s;
395
+ }
396
+
397
+ .btn:active::after {
398
+ width: 300px;
399
+ height: 300px;
400
+ }
401
+
402
+ /* Particles */
403
+ .particles {
404
+ position: fixed;
405
+ top: 0;
406
+ left: 0;
407
+ width: 100%;
408
+ height: 100%;
409
+ pointer-events: none;
410
+ z-index: 0;
411
+ }
412
+
413
+ .particle {
414
+ position: absolute;
415
+ width: 6px;
416
+ height: 6px;
417
+ background: rgba(255, 255, 255, 0.5);
418
+ border-radius: 50%;
419
+ animation: particleFloat 15s infinite;
420
+ }
421
+
422
+ @keyframes particleFloat {
423
+ 0%, 100% {
424
+ transform: translateY(100vh) rotate(0deg);
425
+ opacity: 0;
426
+ }
427
+ 10% {
428
+ opacity: 1;
429
+ }
430
+ 90% {
431
+ opacity: 1;
432
+ }
433
+ 100% {
434
+ transform: translateY(-100vh) rotate(720deg);
435
+ opacity: 0;
436
+ }
437
+ }
438
+
439
+ /* Responsive */
440
+ @media (max-width: 768px) {
441
+ h1 {
442
+ font-size: 1.8rem;
443
+ }
444
+
445
+ .hero-glass {
446
+ padding: 2rem 1.5rem;
447
+ }
448
+
449
+ .features {
450
+ grid-template-columns: 1fr;
451
+ }
452
+
453
+ .cta-glass {
454
+ flex-direction: column;
455
+ width: 100%;
456
+ }
457
+
458
+ .btn {
459
+ width: 100%;
460
+ justify-content: center;
461
+ }
462
+
463
+ .header {
464
+ padding: 1rem;
465
+ }
466
+ }
467
+
468
+ /* Loading Animation */
469
+ .loader {
470
+ position: fixed;
471
+ top: 0;
472
+ left: 0;
473
+ width: 100%;
474
+ height: 100%;
475
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
476
+ z-index: 9999;
477
+ display: flex;
478
+ justify-content: center;
479
+ align-items: center;
480
+ transition: opacity 0.5s ease;
481
+ }
482
+
483
+ .loader.hidden {
484
+ opacity: 0;
485
+ pointer-events: none;
486
+ }
487
+
488
+ .loader-spinner {
489
+ width: 50px;
490
+ height: 50px;
491
+ border: 4px solid rgba(255, 255, 255, 0.3);
492
+ border-top-color: var(--white);
493
+ border-radius: 50%;
494
+ animation: spin 1s linear infinite;
495
+ }
496
+
497
+ @keyframes spin {
498
+ to { transform: rotate(360deg); }
499
+ }
500
+
501
+ /* Interactive Elements */
502
+ .status-indicator {
503
+ display: inline-flex;
504
+ align-items: center;
505
+ gap: 0.5rem;
506
+ background: rgba(255, 255, 255, 0.2);
507
+ padding: 0.5rem 1rem;
508
+ border-radius: 50px;
509
+ font-size: 0.9rem;
510
+ color: var(--white);
511
+ margin-top: 1rem;
512
+ backdrop-filter: blur(10px);
513
+ }
514
+
515
+ .status-dot {
516
+ width: 8px;
517
+ height: 8px;
518
+ background: #4ade80;
519
+ border-radius: 50%;
520
+ animation: pulse 2s infinite;
521
+ }
522
+
523
+ @keyframes pulse {
524
+ 0%, 100% { opacity: 1; }
525
+ 50% { opacity: 0.5; }
526
+ }
527
+ </style>
528
  </head>
 
529
  <body>
530
+ <!-- Loader -->
531
+ <div class="loader" id="loader">
532
+ <div class="loader-spinner"></div>
 
 
 
 
533
  </div>
 
 
 
 
 
 
 
 
 
 
534
 
535
+ <!-- Background Shapes -->
536
+ <div class="bg-shapes">
537
+ <div class="shape shape-1"></div>
538
+ <div class="shape shape-2"></div>
539
+ <div class="shape shape-3"></div>
540
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
541
 
542
+ <!-- Particles Container -->
543
+ <div class="particles" id="particles"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
544
 
545
+ <!-- Header -->
546
+ <header class="header">
547
+ <div class="brand">
548
+ <i class="fas fa-comments"></i>
549
+ <span>چت روم شیشه‌ای</span>
 
 
 
550
  </div>
551
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
552
+ <i class="fas fa-code"></i>
553
+ Built with anycoder
554
+ </a>
555
+ </header>
556
+
557
+ <!-- Main Content -->
558
+ <div class="container">
559
+ <!-- Hero Section -->
560
+ <div class="hero-glass" data-tilt>
561
+ <div class="hero-icon">
562
+ <i class="fas fa-comment-dots" style="background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;"></i>
563
+ </div>
564
+ <h1>💬 چت روم ساده</h1>
565
+ <p class="subtitle">محلی برای گفتگو با دوستان در فضایی مدرن و شیشه‌ای</p>
566
+
567
+ <div class="status-indicator">
568
+ <span class="status-dot"></span>
569
+ <span>۱۲۳ کاربر آنلاین</span>
570
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
571
  </div>
572
 
573
+ <!-- Features Grid -->
574
+ <div class="features">
575
+ <div class="feature-card">
576
+ <div class="feature-icon">
577
+ <i class="fas fa-mobile-alt" style="color: #667eea;"></i>
578
+ </div>
579
+ <h3>ثبت‌نام آسان</h3>
580
+ <p>با شماره موبایل ثبت‌نام کنید و در کمتر از ۳۰ ثانیه وارد شوید</p>
581
+ </div>
582
+
583
+ <div class="feature-card">
584
+ <div class="feature-icon">
585
+ <i class="fas fa-users" style="color: #f5576c;"></i>
586
+ </div>
587
+ <h3>ساخت اتاق</h3>
588
+ <p>تا ۳ اتاق مختلف بسازید و دوستان خود را دعوت کنید</p>
589
+ </div>
590
+
591
+ <div class="feature-card">
592
+ <div class="feature-icon">
593
+ <i class="fas fa-bolt" style="color: #4facfe;"></i>
594
+ </div>
595
+ <h3>چت زنده</h3>
596
+ <p>گفتگوی آنلاین و سریع با سرعت انتقال پیام کمتر از ۱۰۰ میلی‌ثانیه</p>
597
+ </div>
598
  </div>
599
 
600
+ <!-- CTA Section -->
601
+ <div class="cta-glass">
602
+ <a href="#" class="btn btn-primary" onclick="handleAction('register')">
603
+ <i class="fas fa-rocket"></i>
604
+ شروع کنید
605
+ </a>
606
+ <a href="#" class="btn btn-secondary" onclick="handleAction('login')">
607
+ <i class="fas fa-sign-in-alt"></i>
608
+ ورود
609
+ </a>
 
 
 
610
  </div>
 
 
 
 
 
 
 
 
 
611
  </div>
612
 
613
+ <script>
614
+ // Remove loader when page loads
615
+ window.addEventListener('load', () => {
616
+ setTimeout(() => {
617
+ document.getElementById('loader').classList.add('hidden');
618
+ }, 500);
619
+ });
620
+
621
+ // Create floating particles
622
+ function createParticles() {
623
+ const container = document.getElementById('particles');
624
+ const particleCount = 20;
625
+
626
+ for (let i = 0; i < particleCount; i++) {
627
+ const particle = document.createElement('div');
628
+ particle.className = 'particle';
629
+ particle.style.left = Math.random() * 100 + '%';
630
+ particle.style.animationDelay = Math.random() * 15 + 's';
631
+ particle.style.animationDuration = (Math.random() * 10 + 10) + 's';
632
+ container.appendChild(particle);
633
+ }
634
+ }
635
+
636
+ createParticles();
637
+
638
+ // 3D Tilt Effect for Hero Card
639
+ const heroCard = document.querySelector('.hero-glass');
640
+
641
+ heroCard.addEventListener('mousemove', (e) => {
642
+ const rect = heroCard.getBoundingClientRect();
643
+ const x = e.clientX - rect.left;
644
+ const y = e.clientY - rect.top;
645
+
646
+ const centerX = rect.width / 2;
647
+ const centerY = rect.height / 2;
648
+
649
+ const rotateX = (y - centerY) / 20;
650
+ const rotateY = (centerX - x) / 20;
651
+
652
+ heroCard.style.transform = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) translateY(-5px)`;
653
+ });
654
+
655
+ heroCard.addEventListener('mouseleave', () => {
656
+ heroCard.style.transform = 'perspective(1000px) rotateX(0) rotateY(0) translateY(0)';
657
+ });
658
+
659
+ // Button Click Handlers
660
+ function handleAction(action) {
661
+ const btn = event.currentTarget;
662
+
663
+ // Create ripple effect
664
+ const ripple = document.createElement('span');
665
+ ripple.style.position = 'absolute';
666
+ ripple.style.width = '20px';
667
+ ripple.style.height = '20px';
668
+ ripple.style.background = 'rgba(255,255,255,0.5)';
669
+ ripple.style.borderRadius = '50%';
670
+ ripple.style.transform = 'translate(-50%, -50%)';
671
+ ripple.style.pointerEvents = 'none';
672
+ ripple.style.animation = 'ripple 0.6s ease-out';
673
+
674
+ const rect = btn.getBoundingClientRect();
675
+ ripple.style.left = (event.clientX - rect.left) + 'px';
676
+ ripple.style.top = (event.clientY - rect.top) + 'px';
677
+
678
+ btn.style.position = 'relative';
679
+ btn.style.overflow = 'hidden';
680
+ btn.appendChild(ripple);
681
+
682
+ setTimeout(() => ripple.remove(), 600);
683
+
684
+ // Simulate action
685
+ setTimeout(() => {
686
+ if (action === 'register') {
687
+ showNotification('در حال انتقال به صفحه ثبت‌نام...', 'info');
688
+ } else {
689
+ showNotification('در حال انتقال به صفحه ورود...', 'info');
690
+ }
691
+ }, 300);
692
+ }
693
+
694
+ // Custom Notification System
695
+ function showNotification(message, type = 'info') {
696
+ const notification = document.createElement('div');
697
+ notification.style.cssText = `
698
+ position: fixed;
699
+ top: 100px;
700
+ left: 50%;
701
+ transform: translateX(-50%) translateY(-20px);
702
+ background: rgba(255, 255, 255, 0.9);
703
+ backdrop-filter: blur(20px);
704
+ padding: 1rem 2rem;
705
+ border-radius: 16px;
706
+ box-shadow: 0 10px 40px rgba(0,0,0,0.1);
707
+ z-index: 9999;
708
+ font-family: 'Vazirmatn', sans-serif;
709
+ font-weight: 600;
710
+ color: #667eea;
711
+ border: 1px solid rgba(255,255,255,0.5);
712
+ opacity: 0;
713
+ transition: all 0.3s ease;
714
+ direction: rtl;
715
+ `;
716
+ notification.textContent = message;
717
+ document.body.appendChild(notification);
718
+
719
+ // Animate in
720
+ requestAnimationFrame(() => {
721
+ notification.style.opacity = '1';
722
+ notification.style.transform = 'translateX(-50%) translateY(0)';
723
+ });
724
+
725
+ // Remove after delay
726
+ setTimeout(() => {
727
+ notification.style.opacity = '0';
728
+ notification.style.transform = 'translateX(-50%) translateY(-20px)';
729
+ setTimeout(() => notification.remove(), 300);
730
+ }, 3000);
731
+ }
732
+
733
+ // Add ripple animation to styles dynamically
734
+ const style = document.createElement('style');
735
+ style.textContent = `
736
+ @keyframes ripple {
737
+ to {
738
+ width: 200px;
739
+ height: 200px;
740
+ opacity: 0;
741
+ }
742
+ }
743
+ `;
744
+ document.head.appendChild(style);
745
+
746
+ // Parallax effect on scroll
747
+ window.addEventListener('scroll', () => {
748
+ const scrolled = window.pageYOffset;
749
+ const parallax = document.querySelector('.shape-1');
750
+ const parallax2 = document.querySelector('.shape-2');
751
+
752
+ parallax.style.transform = `translateY(${scrolled * 0.5}px)`;
753
+ parallax2.style.transform = `translateY(${scrolled * 0.3}px)`;
754
+ });
755
+
756
+ // Intersection Observer for fade-in animations
757
+ const observerOptions = {
758
+ threshold: 0.1,
759
+ rootMargin: '0px 0px -50px 0px'
760
+ };
761
+
762
+ const observer = new IntersectionObserver((entries) => {
763
+ entries.forEach(entry => {
764
+ if (entry.isIntersecting) {
765
+ entry.target.style.opacity = '1';
766
+ entry.target.style.transform = 'translateY(0)';
767
+ }
768
+ });
769
+ }, observerOptions);
770
+
771
+ // Observe feature cards
772
+ document.querySelectorAll('.feature-card').forEach((card, index) => {
773
+ card.style.opacity = '0';
774
+ card.style.transform = 'translateY(30px)';
775
+ card.style.transition = `all 0.6s ease ${index * 0.1}s`;
776
+ observer.observe(card);
777
+ });
778
+
779
+ // Dynamic online user count
780
+ setInterval(() => {
781
+ const statusSpan = document.querySelector('.status-indicator span:last-child');
782
+ const currentUsers = parseInt(statusSpan.textContent);
783
+ const change = Math.floor(Math.random() * 5) - 2; // -2 to +2
784
+ const newUsers = Math.max(100, currentUsers + change);
785
+ statusSpan.textContent = `${newUsers} کاربر آنلاین`;
786
+ }, 5000);
787
+ </script>
788
+ </body>
789
+ </html>