samirerty commited on
Commit
c1efc64
·
verified ·
1 Parent(s): 6975aca

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +844 -19
index.html CHANGED
@@ -1,19 +1,844 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
6
+ <title>پیام رسان مینیمال | MinimalChat</title>
7
+
8
+ <link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700&display=swap" rel="stylesheet">
9
+
10
+ <style>
11
+ :root {
12
+ --primary: #3b82f6;
13
+ --primary-dark: #2563eb;
14
+ --bg-dark: #0f172a;
15
+ --bg-card: rgba(30, 41, 59, 0.8);
16
+ --glass: rgba(255, 255, 255, 0.08);
17
+ --glass-border: rgba(255, 255, 255, 0.1);
18
+ --text-primary: #f8fafc;
19
+ --text-secondary: rgba(248, 250, 252, 0.6);
20
+ --text-muted: rgba(248, 250, 252, 0.4);
21
+ --success: #22c55e;
22
+ --error: #ef4444;
23
+ --warning: #f59e0b;
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, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
35
+ background-attachment: fixed;
36
+ color: var(--text-primary);
37
+ height: 100vh;
38
+ height: 100dvh;
39
+ overflow: hidden;
40
+ -webkit-tap-highlight-color: transparent;
41
+ }
42
+
43
+ /* Utility Classes */
44
+ .glass-panel {
45
+ background: var(--glass);
46
+ backdrop-filter: blur(12px);
47
+ -webkit-backdrop-filter: blur(12px);
48
+ border: 1px solid var(--glass-border);
49
+ }
50
+
51
+ .hidden { display: none !important; }
52
+ .flex { display: flex; }
53
+ .flex-col { flex-direction: column; }
54
+ .flex-1 { flex: 1; }
55
+ .items-center { align-items: center; }
56
+ .justify-center { justify-content: center; }
57
+ .justify-between { justify-content: space-between; }
58
+ .gap-2 { gap: 0.5rem; }
59
+ .gap-3 { gap: 0.75rem; }
60
+ .gap-4 { gap: 1rem; }
61
+
62
+ .w-full { width: 100%; }
63
+ .h-full { height: 100%; }
64
+ .min-w-0 { min-width: 0; }
65
+
66
+ .p-2 { padding: 0.5rem; }
67
+ .p-3 { padding: 0.75rem; }
68
+ .p-4 { padding: 1rem; }
69
+ .p-6 { padding: 1.5rem; }
70
+ .px-4 { padding-left: 1rem; padding-right: 1rem; }
71
+ .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
72
+ .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
73
+
74
+ .m-0 { margin: 0; }
75
+ .mb-1 { margin-bottom: 0.25rem; }
76
+ .mb-2 { margin-bottom: 0.5rem; }
77
+ .mb-3 { margin-bottom: 0.75rem; }
78
+ .mb-4 { margin-bottom: 1rem; }
79
+ .mb-6 { margin-bottom: 1.5rem; }
80
+ .mb-8 { margin-bottom: 2rem; }
81
+ .mt-1 { margin-top: 0.25rem; }
82
+ .mt-2 { margin-top: 0.5rem; }
83
+ .mt-4 { margin-top: 1rem; }
84
+ .mt-6 { margin-top: 1.5rem; }
85
+ .mt-8 { margin-top: 2rem; }
86
+ .mt-10 { margin-top: 2.5rem; }
87
+ .mr-1 { margin-right: 0.25rem; }
88
+ .mr-2 { margin-right: 0.5rem; }
89
+ .ml-1 { margin-left: 0.25rem; }
90
+ .ml-2 { margin-left: 0.5rem; }
91
+ .mx-auto { margin-left: auto; margin-right: auto; }
92
+
93
+ .text-center { text-align: center; }
94
+ .text-xs { font-size: 0.75rem; }
95
+ .text-sm { font-size: 0.875rem; }
96
+ .text-base { font-size: 1rem; }
97
+ .text-lg { font-size: 1.125rem; }
98
+ .text-xl { font-size: 1.25rem; }
99
+ .text-2xl { font-size: 1.5rem; }
100
+ .text-3xl { font-size: 1.875rem; }
101
+
102
+ .font-light { font-weight: 300; }
103
+ .font-medium { font-weight: 500; }
104
+ .font-bold { font-weight: 700; }
105
+
106
+ .truncate {
107
+ overflow: hidden;
108
+ text-overflow: ellipsis;
109
+ white-space: nowrap;
110
+ }
111
+
112
+ .rounded-full { border-radius: 9999px; }
113
+ .rounded-lg { border-radius: 0.5rem; }
114
+ .rounded-xl { border-radius: 0.75rem; }
115
+ .rounded-2xl { border-radius: 1rem; }
116
+
117
+ .border-b { border-bottom: 1px solid; }
118
+ .border-t { border-top: 1px solid; }
119
+ .border { border: 1px solid; }
120
+ .border-dashed { border-style: dashed; }
121
+
122
+ .border-white\/10 { border-color: rgba(255,255,255,0.1); }
123
+ .border-white\/20 { border-color: rgba(255,255,255,0.2); }
124
+
125
+ .bg-white { background-color: #fff; }
126
+ .bg-white\/5 { background-color: rgba(255,255,255,0.05); }
127
+ .bg-white\/10 { background-color: rgba(255,255,255,0.1); }
128
+ .bg-blue-600 { background-color: var(--primary); }
129
+ .bg-green-500\/20 { background-color: rgba(34,197,94,0.2); }
130
+ .bg-red-500\/20 { background-color: rgba(239,68,68,0.2); }
131
+ .bg-slate-900 { background-color: #0f172a; }
132
+ .bg-slate-900\/20 { background-color: rgba(15,23,42,0.2); }
133
+ .bg-slate-900\/90 { background-color: rgba(15,23,42,0.9); }
134
+ .bg-slate-900\/95 { background-color: rgba(15,23,42,0.95); }
135
+
136
+ .text-white { color: #fff; }
137
+ .text-white\/30 { color: rgba(255,255,255,0.3); }
138
+ .text-white\/40 { color: rgba(255,255,255,0.4); }
139
+ .text-white\/50 { color: rgba(255,255,255,0.5); }
140
+ .text-white\/60 { color: rgba(255,255,255,0.6); }
141
+ .text-white\/70 { color: rgba(255,255,255,0.7); }
142
+ .text-white\/80 { color: rgba(255,255,255,0.8); }
143
+ .text-slate-900 { color: #0f172a; }
144
+ .text-blue-300 { color: #93c5fd; }
145
+ .text-indigo-300 { color: #a5b4fc; }
146
+ .text-green-200 { color: #bbf7d0; }
147
+ .text-green-500 { color: #22c55e; }
148
+ .text-red-200 { color: #fecaca; }
149
+ .text-red-400 { color: #f87171; }
150
+
151
+ .shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
152
+
153
+ .cursor-pointer { cursor: pointer; }
154
+ .pointer-events-none { pointer-events: none; }
155
+ .pointer-events-auto { pointer-events: auto; }
156
+
157
+ .overflow-hidden { overflow: hidden; }
158
+ .overflow-y-auto { overflow-y: auto; }
159
+ .overflow-x-hidden { overflow-x: hidden; }
160
+
161
+ .relative { position: relative; }
162
+ .absolute { position: absolute; }
163
+ .fixed { position: fixed; }
164
+ .inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
165
+ .top-0 { top: 0; }
166
+ .top-4 { top: 1rem; }
167
+ .right-0 { right: 0; }
168
+ .bottom-0 { bottom: 0; }
169
+ .left-0 { left: 0; }
170
+ .left-1\/2 { left: 50%; }
171
+ .z-20 { z-index: 20; }
172
+ .z-30 { z-index: 30; }
173
+ .z-35 { z-index: 35; }
174
+ .z-40 { z-index: 40; }
175
+ .z-50 { z-index: 50; }
176
+
177
+ .transform { transform: translateX(-50%); }
178
+
179
+ /* Custom Styles */
180
+ .input-minimal {
181
+ background: transparent;
182
+ border: none;
183
+ border-bottom: 1px solid rgba(255,255,255,0.2);
184
+ transition: all 0.3s;
185
+ width: 100%;
186
+ color: #fff;
187
+ padding: 0.75rem 0;
188
+ }
189
+
190
+ .input-minimal:focus {
191
+ border-color: rgba(255,255,255,0.6);
192
+ outline: none;
193
+ }
194
+
195
+ .input-minimal::placeholder {
196
+ color: rgba(255,255,255,0.3);
197
+ }
198
+
199
+ .message-bubble-me {
200
+ background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
201
+ border-radius: 16px 16px 4px 16px;
202
+ }
203
+
204
+ .message-bubble-other {
205
+ background: rgba(255,255,255,0.12);
206
+ border-radius: 16px 16px 16px 4px;
207
+ }
208
+
209
+ .fade-in {
210
+ animation: fadeIn 0.3s ease-out;
211
+ }
212
+
213
+ @keyframes fadeIn {
214
+ from { opacity: 0; transform: translateY(10px); }
215
+ to { opacity: 1; transform: translateY(0); }
216
+ }
217
+
218
+ .message-enter {
219
+ animation: messagePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
220
+ }
221
+
222
+ @keyframes messagePop {
223
+ 0% { opacity: 0; transform: scale(0.8) translateY(20px); }
224
+ 100% { opacity: 1; transform: scale(1) translateY(0); }
225
+ }
226
+
227
+ .slide-in {
228
+ animation: slideIn 0.3s ease-out;
229
+ }
230
+
231
+ @keyframes slideIn {
232
+ from { transform: translateX(100%); }
233
+ to { transform: translateX(0); }
234
+ }
235
+
236
+ /* Scrollbar */
237
+ ::-webkit-scrollbar {
238
+ width: 4px;
239
+ height: 4px;
240
+ }
241
+
242
+ ::-webkit-scrollbar-track {
243
+ background: transparent;
244
+ }
245
+
246
+ ::-webkit-scrollbar-thumb {
247
+ background: rgba(255,255,255,0.2);
248
+ border-radius: 4px;
249
+ }
250
+
251
+ ::-webkit-scrollbar-thumb:hover {
252
+ background: rgba(255,255,255,0.3);
253
+ }
254
+
255
+ /* Touch targets */
256
+ .touch-target {
257
+ min-height: 44px;
258
+ min-width: 44px;
259
+ }
260
+
261
+ /* Mobile optimizations */
262
+ @media (max-width: 768px) {
263
+ .mobile-sidebar {
264
+ position: fixed;
265
+ top: 0;
266
+ right: 0;
267
+ height: 100vh;
268
+ height: 100dvh;
269
+ width: 85%;
270
+ max-width: 300px;
271
+ z-index: 40;
272
+ transform: translateX(100%);
273
+ transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
274
+ }
275
+
276
+ .mobile-sidebar.open {
277
+ transform: translateX(0);
278
+ }
279
+
280
+ .sidebar-overlay {
281
+ position: fixed;
282
+ inset: 0;
283
+ background: rgba(0,0,0,0.5);
284
+ backdrop-filter: blur(4px);
285
+ z-index: 35;
286
+ opacity: 0;
287
+ pointer-events: none;
288
+ transition: opacity 0.3s;
289
+ }
290
+
291
+ .sidebar-overlay.active {
292
+ opacity: 1;
293
+ pointer-events: auto;
294
+ }
295
+
296
+ .chat-container {
297
+ position: fixed;
298
+ inset: 0;
299
+ z-index: 30;
300
+ }
301
+
302
+ .safe-bottom {
303
+ padding-bottom: env(safe-area-inset-bottom, 20px);
304
+ }
305
+
306
+ input, textarea, select {
307
+ font-size: 16px;
308
+ }
309
+ }
310
+
311
+ /* Sticker Picker */
312
+ .sticker-picker {
313
+ position: absolute;
314
+ bottom: 100%;
315
+ left: 0;
316
+ right: 0;
317
+ background: rgba(15, 23, 42, 0.95);
318
+ backdrop-filter: blur(12px);
319
+ border-top: 1px solid rgba(255,255,255,0.1);
320
+ border-radius: 16px 16px 0 0;
321
+ max-height: 280px;
322
+ overflow-y: auto;
323
+ transform: translateY(100%);
324
+ transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
325
+ }
326
+
327
+ .sticker-picker.open {
328
+ transform: translateY(0);
329
+ }
330
+
331
+ .sticker-item {
332
+ width: 64px;
333
+ height: 64px;
334
+ display: flex;
335
+ align-items: center;
336
+ justify-content: center;
337
+ cursor: pointer;
338
+ border-radius: 8px;
339
+ transition: all 0.2s;
340
+ font-size: 32px;
341
+ }
342
+
343
+ .sticker-item:hover {
344
+ background: rgba(255,255,255,0.1);
345
+ transform: scale(1.1);
346
+ }
347
+
348
+ /* Avatar colors */
349
+ .avatar-red { background: #ef444420; color: #fca5a5; }
350
+ .avatar-blue { background: #3b82f620; color: #93c5fd; }
351
+ .avatar-green { background: #22c55e20; color: #86efac; }
352
+ .avatar-yellow { background: #eab30820; color: #fde047; }
353
+ .avatar-purple { background: #a855f720; color: #d8b4fe; }
354
+ .avatar-pink { background: #ec489920; color: #f9a8d4; }
355
+ .avatar-orange { background: #f9731620; color: #fdba74; }
356
+ .avatar-cyan { background: #06b6d420; color: #67e8f9; }
357
+
358
+ /* Room avatar */
359
+ .room-avatar {
360
+ width: 80px;
361
+ height: 80px;
362
+ border-radius: 50%;
363
+ display: flex;
364
+ align-items: center;
365
+ justify-content: center;
366
+ font-size: 2rem;
367
+ font-weight: bold;
368
+ border: 3px solid rgba(255,255,255,0.2);
369
+ }
370
+
371
+ /* Button hover effects */
372
+ .btn-hover:hover {
373
+ background: rgba(255,255,255,0.1);
374
+ }
375
+
376
+ .btn-active:active {
377
+ transform: scale(0.95);
378
+ }
379
+
380
+ /* Loading shimmer */
381
+ .shimmer {
382
+ background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
383
+ background-size: 200% 100%;
384
+ animation: shimmer 1.5s infinite;
385
+ }
386
+
387
+ @keyframes shimmer {
388
+ 0% { background-position: 200% 0; }
389
+ 100% { background-position: -200% 0; }
390
+ }
391
+
392
+ /* Menu dropdown */
393
+ .menu-dropdown {
394
+ position: absolute;
395
+ top: 100%;
396
+ left: 0;
397
+ background: rgba(15, 23, 42, 0.95);
398
+ backdrop-filter: blur(12px);
399
+ border: 1px solid rgba(255,255,255,0.1);
400
+ border-radius: 12px;
401
+ min-width: 160px;
402
+ padding: 0.5rem;
403
+ opacity: 0;
404
+ visibility: hidden;
405
+ transform: translateY(-10px);
406
+ transition: all 0.2s;
407
+ z-index: 100;
408
+ }
409
+
410
+ .menu-dropdown.open {
411
+ opacity: 1;
412
+ visibility: visible;
413
+ transform: translateY(0);
414
+ }
415
+
416
+ .menu-item {
417
+ padding: 0.75rem 1rem;
418
+ border-radius: 8px;
419
+ cursor: pointer;
420
+ display: flex;
421
+ align-items: center;
422
+ gap: 0.75rem;
423
+ transition: all 0.2s;
424
+ }
425
+
426
+ .menu-item:hover {
427
+ background: rgba(255,255,255,0.1);
428
+ }
429
+
430
+ .menu-item.danger {
431
+ color: #f87171;
432
+ }
433
+
434
+ .menu-item.danger:hover {
435
+ background: rgba(239,68,68,0.2);
436
+ }
437
+
438
+ /* Color picker */
439
+ .color-option {
440
+ width: 40px;
441
+ height: 40px;
442
+ border-radius: 50%;
443
+ cursor: pointer;
444
+ border: 3px solid transparent;
445
+ transition: all 0.2s;
446
+ }
447
+
448
+ .color-option:hover {
449
+ transform: scale(1.1);
450
+ }
451
+
452
+ .color-option.selected {
453
+ border-color: #fff;
454
+ box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
455
+ }
456
+
457
+ /* Built with badge */
458
+ .built-with {
459
+ position: fixed;
460
+ top: 12px;
461
+ left: 12px;
462
+ z-index: 1000;
463
+ background: rgba(255,255,255,0.1);
464
+ backdrop-filter: blur(8px);
465
+ padding: 6px 12px;
466
+ border-radius: 20px;
467
+ font-size: 11px;
468
+ color: rgba(255,255,255,0.7);
469
+ text-decoration: none;
470
+ border: 1px solid rgba(255,255,255,0.1);
471
+ transition: all 0.2s;
472
+ }
473
+
474
+ .built-with:hover {
475
+ background: rgba(255,255,255,0.15);
476
+ color: #fff;
477
+ }
478
+
479
+ /* Sticker display in chat */
480
+ .sticker-message {
481
+ font-size: 48px;
482
+ line-height: 1;
483
+ padding: 8px;
484
+ }
485
+
486
+ /* Profile avatar options */
487
+ .avatar-option {
488
+ width: 56px;
489
+ height: 56px;
490
+ border-radius: 50%;
491
+ display: flex;
492
+ align-items: center;
493
+ justify-content: center;
494
+ font-size: 24px;
495
+ cursor: pointer;
496
+ border: 3px solid transparent;
497
+ transition: all 0.2s;
498
+ }
499
+
500
+ .avatar-option:hover {
501
+ transform: scale(1.05);
502
+ }
503
+
504
+ .avatar-option.selected {
505
+ border-color: #3b82f6;
506
+ }
507
+ </style>
508
+ </head>
509
+ <body>
510
+
511
+ <!-- Built with badge -->
512
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">Built with anycoder</a>
513
+
514
+ <!-- Toast Container -->
515
+ <div id="toast-container" class="fixed top-4 left-1/2 z-50 flex flex-col gap-2 w-full max-w-sm px-4 pointer-events-none" style="transform: translateX(-50%);">
516
+ </div>
517
+
518
+ <!-- Auth View -->
519
+ <div id="auth-view" class="h-full w-full flex items-center justify-center p-4 overflow-y-auto">
520
+ <div class="glass-panel p-6 rounded-2xl w-full max-w-md fade-in my-auto">
521
+ <div class="text-center mb-8">
522
+ <div class="w-16 h-16 bg-white/10 rounded-full mx-auto flex items-center justify-center mb-4">
523
+ <svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
524
+ <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
525
+ </svg>
526
+ </div>
527
+ <h1 class="text-2xl font-bold">پیام رسان مینیمال</h1>
528
+ <p class="text-white/50 text-sm mt-1">پیام رسان مینیمال با JavaScript</p>
529
+ </div>
530
+
531
+ <!-- Tabs -->
532
+ <div class="flex gap-4 mb-6 border-b border-white/10 pb-1">
533
+ <button onclick="switchAuthTab('login')" id="tab-login" class="flex-1 pb-2 text-sm font-medium border-b-2 border-white text-white transition-colors touch-target flex items-center justify-center">ورود</button>
534
+ <button onclick="switchAuthTab('register')" id="tab-register" class="flex-1 pb-2 text-sm font-medium border-b-2 border-transparent text-white/50 hover:text-white transition-colors touch-target flex items-center justify-center">ثبت نام</button>
535
+ </div>
536
+
537
+ <!-- Login Form -->
538
+ <form id="login-form" class="space-y-5" onsubmit="handleLogin(event)">
539
+ <div>
540
+ <label class="block text-xs text-white/60 mb-2">شماره موبایل</label>
541
+ <input type="tel" id="login-phone" placeholder="09XXXXXXXXX" inputmode="tel" class="input-minimal touch-target" required>
542
+ </div>
543
+ <div>
544
+ <label class="block text-xs text-white/60 mb-2">رمز عبور</label>
545
+ <input type="password" id="login-password" placeholder="••••••••" class="input-minimal touch-target" required>
546
+ </div>
547
+ <button type="submit" class="w-full bg-white text-slate-900 font-bold py-3 rounded-lg hover:bg-white/90 transition-colors mt-4 touch-target btn-active">
548
+ ورود
549
+ </button>
550
+ </form>
551
+
552
+ <!-- Register Form -->
553
+ <form id="register-form" class="space-y-5 hidden" onsubmit="handleRegister(event)">
554
+ <div>
555
+ <label class="block text-xs text-white/60 mb-2">نام کامل</label>
556
+ <input type="text" id="reg-name" placeholder="نام شما" class="input-minimal touch-target" required>
557
+ </div>
558
+ <div>
559
+ <label class="block text-xs text-white/60 mb-2">شماره موبایل</label>
560
+ <input type="tel" id="reg-phone" placeholder="09XXXXXXXXX" inputmode="tel" class="input-minimal touch-target" required>
561
+ </div>
562
+ <div>
563
+ <label class="block text-xs text-white/60 mb-2">رمز عبور</label>
564
+ <input type="password" id="reg-password" placeholder="حداقل ۴ کاراکتر" class="input-minimal touch-target" required>
565
+ </div>
566
+ <button type="submit" class="w-full bg-white text-slate-900 font-bold py-3 rounded-lg hover:bg-white/90 transition-colors mt-4 touch-target btn-active">
567
+ ثبت نام
568
+ </button>
569
+ </form>
570
+
571
+ <div class="mt-6 text-center">
572
+ <p class="text-xs text-white/40">
573
+ ساخته شده با JavaScript و LocalStorage
574
+ </p>
575
+ </div>
576
+ </div>
577
+ </div>
578
+
579
+ <!-- Dashboard View -->
580
+ <div id="dashboard-view" class="hidden h-full w-full flex flex-col md:flex-row relative">
581
+
582
+ <!-- Mobile Sidebar Overlay -->
583
+ <div id="sidebar-overlay" class="sidebar-overlay md:hidden" onclick="toggleSidebar()"></div>
584
+
585
+ <!-- Sidebar -->
586
+ <aside id="sidebar" class="mobile-sidebar md:relative md:transform-none md:w-72 md:h-full glass-panel border-l border-white/10 flex flex-col bg-slate-900/95 md:bg-transparent">
587
+ <!-- Profile -->
588
+ <div class="p-4 md:p-6 border-b border-white/10 flex items-center justify-between">
589
+ <div class="flex items-center gap-3 flex-1">
590
+ <div id="user-avatar" class="w-10 h-10 md:w-12 md:h-12 rounded-full flex items-center justify-center text-lg font-bold avatar-blue">
591
+ <span id="user-avatar-initial">U</span>
592
+ </div>
593
+ <div class="flex-1 min-w-0">
594
+ <h2 id="user-name-display" class="font-bold text-sm truncate">کاربر</h2>
595
+ <p id="user-phone-display" class="text-xs text-white/50 font-mono">09XXXXXXXXX</p>
596
+ </div>
597
+ </div>
598
+ <div class="relative">
599
+ <button onclick="toggleUserMenu(event)" class="text-white/40 hover:text-white transition-colors p-2 touch-target mr-2">
600
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
601
+ <circle cx="12" cy="12" r="1"></circle>
602
+ <circle cx="12" cy="5" r="1"></circle>
603
+ <circle cx="12" cy="19" r="1"></circle>
604
+ </svg>
605
+ </button>
606
+ <!-- User Menu -->
607
+ <div id="user-menu" class="menu-dropdown">
608
+ <div class="menu-item" onclick="openEditProfileModal()">
609
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
610
+ <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
611
+ <circle cx="12" cy="7" r="4"></circle>
612
+ </svg>
613
+ ویرایش پروفایل
614
+ </div>
615
+ <div class="menu-item danger" onclick="logout()">
616
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
617
+ <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
618
+ <polyline points="16,17 21,12 16,7"></polyline>
619
+ <line x1="21" y1="12" x2="9" y2="12"></line>
620
+ </svg>
621
+ خروج
622
+ </div>
623
+ </div>
624
+ </div>
625
+ </div>
626
+
627
+ <!-- Create Room -->
628
+ <div class="p-4 border-b border-white/10">
629
+ <div class="flex justify-between items-center mb-3">
630
+ <span class="text-xs font-medium text-white/60">اتاق‌های من</span>
631
+ <span id="room-count-badge" class="text-xs bg-white/10 px-2 py-0.5 rounded-full">۰/۳</span>
632
+ </div>
633
+ <button onclick="openCreateRoomModal()" id="btn-create-room" class="w-full py-3 border border-dashed border-white/20 rounded-lg text-sm text-white/70 hover:border-white/40 hover:text-white transition-colors touch-target">
634
+ <span class="ml-1">+</span> اتاق جدید
635
+ </button>
636
+ <p id="room-limit-msg" class="text-xs text-red-400 mt-2 hidden">حداکثر ۳ اتاق مجاز است</p>
637
+ </div>
638
+
639
+ <!-- Room List -->
640
+ <div class="flex-1 overflow-y-auto p-2 space-y-1" id="room-list-container">
641
+ <div class="text-center mt-8 text-white/30 text-sm">
642
+ <p>اتاقی وجود ندارد</p>
643
+ </div>
644
+ </div>
645
+
646
+ <!-- Mobile Safe Area -->
647
+ <div class="h-safe-bottom md:hidden"></div>
648
+ </aside>
649
+
650
+ <!-- Main Content -->
651
+ <main class="flex-1 flex flex-col h-full relative bg-slate-900/20 w-full">
652
+
653
+ <!-- Mobile Header -->
654
+ <header class="h-14 glass-panel border-b border-white/10 flex items-center justify-between px-4 md:hidden">
655
+ <button onclick="toggleSidebar()" class="touch-target flex items-center justify-center w-10 h-10 -mr-2 text-white/80">
656
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
657
+ <line x1="3" y1="12" x2="21" y2="12"></line>
658
+ <line x1="3" y1="6" x2="21" y2="6"></line>
659
+ <line x1="3" y1="18" x2="21" y2="18"></line>
660
+ </svg>
661
+ </button>
662
+ <span class="text-sm font-medium text-white/60">پیام رسان مینیمال</span>
663
+ <div class="w-10"></div>
664
+ </header>
665
+
666
+ <!-- Desktop Header -->
667
+ <header class="hidden md:flex h-14 glass-panel border-b border-white/10 items-center justify-between px-6">
668
+ <span class="text-sm font-medium text-white/60">داشبورد</span>
669
+ <div class="flex items-center gap-2 text-xs text-white/40">
670
+ <span class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></span>
671
+ آنلاین
672
+ </div>
673
+ </header>
674
+
675
+ <!-- Welcome Screen -->
676
+ <div id="welcome-screen" class="flex-1 flex flex-col items-center justify-center p-8 text-center">
677
+ <div class="w-20 h-20 bg-white/5 rounded-full flex items-center justify-center mb-4">
678
+ <svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" class="text-white/40">
679
+ <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
680
+ </svg>
681
+ </div>
682
+ <h2 class="text-xl font-bold mb-2">به پیام رسان خوش آمدید</h2>
683
+ <p class="text-white/50 text-sm max-w-md">اتاق جدید بسازید یا یکی را انتخاب کنید</p>
684
+ <button onclick="openCreateRoomModal()" class="mt-6 md:hidden bg-white/10 px-6 py-3 rounded-full text-sm font-medium touch-target">
685
+ <span class="ml-2">+</span>ساخت اتاق جدید
686
+ </button>
687
+ </div>
688
+
689
+ <!-- Chat Interface -->
690
+ <div id="chat-interface" class="hidden absolute inset-0 bg-slate-900 flex flex-col fade-in z-20">
691
+ <!-- Chat Header -->
692
+ <div class="h-14 glass-panel border-b border-white/10 flex items-center justify-between px-4" style="padding-top: env(safe-area-inset-top, 0);">
693
+ <div class="flex items-center gap-3 flex-1 min-w-0">
694
+ <button onclick="closeChat()" class="md:hidden text-white/60 hover:text-white touch-target w-10 h-10 flex items-center justify-center -mr-2">
695
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
696
+ <line x1="19" y1="12" x2="5" y2="12"></line>
697
+ <polyline points="12,19 5,12 12,5"></polyline>
698
+ </svg>
699
+ </button>
700
+ <div id="chat-room-avatar" class="w-10 h-10 rounded-full flex items-center justify-center shrink-0 avatar-purple">
701
+ <span id="chat-room-initial">#</span>
702
+ </div>
703
+ <div class="min-w-0 flex-1">
704
+ <h3 id="chat-room-name" class="font-bold text-sm truncate">اتاق</h3>
705
+ <span id="chat-user-count" class="text-xs text-white/50">۲ عضو</span>
706
+ </div>
707
+ </div>
708
+ <div class="flex items-center gap-1">
709
+ <button onclick="copyRoomLink()" class="text-white/40 hover:text-white text-sm touch-target w-10 h-10 flex items-center justify-center" title="کپی لینک">
710
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
711
+ <circle cx="18" cy="5" r="3"></circle>
712
+ <circle cx="6" cy="12" r="3"></circle>
713
+ <circle cx="18" cy="19" r="3"></circle>
714
+ <line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line>
715
+ <line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>
716
+ </svg>
717
+ </button>
718
+ <div class="relative">
719
+ <button onclick="toggleRoomMenu(event)" class="text-white/40 hover:text-white text-sm touch-target w-10 h-10 flex items-center justify-center">
720
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
721
+ <circle cx="12" cy="12" r="1"></circle>
722
+ <circle cx="12" cy="5" r="1"></circle>
723
+ <circle cx="12" cy="19" r="1"></circle>
724
+ </svg>
725
+ </button>
726
+ <!-- Room Menu -->
727
+ <div id="room-menu" class="menu-dropdown">
728
+ <div class="menu-item" onclick="openEditRoomModal()">
729
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
730
+ <path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path>
731
+ <path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>
732
+ </svg>
733
+ ویرایش گروه
734
+ </div>
735
+ <div class="menu-item danger" onclick="deleteCurrentRoom()">
736
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
737
+ <polyline points="3,6 5,6 21,6"></polyline>
738
+ <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
739
+ </svg>
740
+ حذف گروه
741
+ </div>
742
+ </div>
743
+ </div>
744
+ </div>
745
+ </div>
746
+
747
+ <!-- Messages -->
748
+ <div id="messages-container" class="flex-1 overflow-y-auto p-4 space-y-3 pb-32 md:pb-4">
749
+ <!-- Messages injected here -->
750
+ </div>
751
+
752
+ <!-- Sticker Picker -->
753
+ <div id="sticker-picker" class="sticker-picker">
754
+ <div class="p-3 border-b border-white/10 flex justify-between items-center">
755
+ <span class="text-sm font-medium">استیکرها</span>
756
+ <button onclick="toggleStickerPicker()" class="text-white/50 hover:text-white">
757
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
758
+ <line x1="18" y1="6" x2="6" y2="18"></line>
759
+ <line x1="6" y1="6" x2="18" y2="18"></line>
760
+ </svg>
761
+ </button>
762
+ </div>
763
+ <div class="p-3 grid grid-cols-5 gap-2" id="sticker-grid">
764
+ <!-- Stickers injected here -->
765
+ </div>
766
+ </div>
767
+
768
+ <!-- Input -->
769
+ <div class="absolute bottom-0 left-0 right-0 p-3 md:p-4 glass-panel border-t border-white/10 safe-bottom bg-slate-900/90" style="backdrop-filter: blur(20px);">
770
+ <form onsubmit="sendMessage(event)" class="flex gap-2 max-w-4xl mx-auto items-end">
771
+ <button type="button" onclick="toggleStickerPicker()" class="text-white/40 hover:text-white w-11 h-11 rounded-full flex items-center justify-center transition-colors touch-target shrink-0" title="استیکر">
772
+ <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
773
+ <circle cx="12" cy="12" r="10"></circle>
774
+ <path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
775
+ <line x1="9" y1="9" x2="9.01" y2="9"></line>
776
+ <line x1="15" y1="9" x2="15.01" y2="9"></line>
777
+ </svg>
778
+ </button>
779
+ <input type="text" id="message-input" placeholder="پیام خود را بنویسید..." class="flex-1 bg-white/10 border border-white/10 rounded-full px-4 py-3 text-sm text-white placeholder-white/30 focus:outline-none focus:border-white/30 focus:bg-white/15 transition-all touch-target" autocomplete="off">
780
+ <button type="submit" class="bg-blue-600 hover:bg-blue-500 text-white w-11 h-11 rounded-full flex items-center justify-center transition-colors touch-target btn-active shadow-lg shrink-0">
781
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
782
+ <line x1="22" y1="2" x2="11" y2="13"></line>
783
+ <polygon points="22,2 15,22 11,13 2,9 22,2"></polygon>
784
+ </svg>
785
+ </button>
786
+ </form>
787
+ </div>
788
+ </div>
789
+ </main>
790
+ </div>
791
+
792
+ <!-- Create Room Modal -->
793
+ <div id="create-room-modal" class="fixed inset-0 z-50 hidden flex items-end md:items-center justify-center p-0 md:p-4 bg-black/60 backdrop-blur-sm transition-opacity">
794
+ <div class="glass-panel w-full md:max-w-sm rounded-t-2xl md:rounded-2xl p-6 fade-in bg-slate-900 border-t md:border border-white/10">
795
+ <div class="flex justify-between items-center mb-4">
796
+ <h3 class="font-bold text-lg">اتاق جدید</h3>
797
+ <button onclick="closeCreateRoomModal()" class="text-white/40 hover:text-white touch-target w-10 h-10 flex items-center justify-center">
798
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
799
+ <line x1="18" y1="6" x2="6" y2="18"></line>
800
+ <line x1="6" y1="6" x2="18" y2="18"></line>
801
+ </svg>
802
+ </button>
803
+ </div>
804
+ <form onsubmit="handleCreateRoom(event)" class="space-y-4">
805
+ <div>
806
+ <label class="block text-xs text-white/60 mb-2">نام اتاق</label>
807
+ <input type="text" id="new-room-name" placeholder="مثلاً: گروه دوستان" class="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-white placeholder-white/30 focus:outline-none focus:border-white/30 touch-target" required>
808
+ </div>
809
+ <div class="flex gap-3 pt-2">
810
+ <button type="button" onclick="closeCreateRoomModal()" class="flex-1 py-3 rounded-xl border border-white/10 text-sm hover:bg-white/5 transition-colors touch-target">
811
+ انصراف
812
+ </button>
813
+ <button type="submit" class="flex-1 py-3 rounded-xl bg-white text-slate-900 text-sm font-bold hover:bg-white/90 transition-colors touch-target btn-active">
814
+ ساختن
815
+ </button>
816
+ </div>
817
+ </form>
818
+ </div>
819
+ </div>
820
+
821
+ <!-- Edit Room Modal -->
822
+ <div id="edit-room-modal" class="fixed inset-0 z-50 hidden flex items-end md:items-center justify-center p-0 md:p-4 bg-black/60 backdrop-blur-sm">
823
+ <div class="glass-panel w-full md:max-w-sm rounded-t-2xl md:rounded-2xl p-6 fade-in bg-slate-900 border-t md:border border-white/10">
824
+ <div class="flex justify-between items-center mb-4">
825
+ <h3 class="font-bold text-lg">ویرایش گروه</h3>
826
+ <button onclick="closeEditRoomModal()" class="text-white/40 hover:text-white touch-target w-10 h-10 flex items-center justify-center">
827
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
828
+ <line x1="18" y1="6" x2="6" y2="18"></line>
829
+ <line x1="6" y1="6" x2="18" y2="18"></line>
830
+ </svg>
831
+ </button>
832
+ </div>
833
+ <form onsubmit="handleEditRoom(event)" class="space-y-4">
834
+ <div class="flex justify-center mb-4">
835
+ <div id="edit-room-avatar-preview" class="room-avatar avatar-purple">
836
+ <span id="edit-room-initial-preview">G</span>
837
+ </div>
838
+ </div>
839
+ <div>
840
+ <label class="block text-xs text-white/60 mb-2">نام گروه</label>
841
+ <input type="text" id="edit-room-name" class="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-white placeholder-white/30 focus:outline-none focus:border-white/30 touch-target" required>
842
+ </div>
843
+ <div>
844
+ <label class="block text-xs text-white/60 mb-2">رنگ آ