File size: 31,584 Bytes
a64519b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>InterestRooms - Connect Through Shared Passions</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
        
        body {
            font-family: 'Poppins', sans-serif;
            -webkit-tap-highlight-color: transparent;
        }
        
        .gradient-bg {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .room-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        
        .chat-bubble-left {
            border-radius: 1rem 1rem 1rem 0;
        }
        
        .chat-bubble-right {
            border-radius: 1rem 1rem 0 1rem;
        }
        
        .tab-active {
            position: relative;
        }
        
        .tab-active:after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 60%;
            height: 3px;
            background-color: #667eea;
            border-radius: 3px;
        }
        
        /* Custom scrollbar */
        .custom-scrollbar::-webkit-scrollbar {
            width: 6px;
        }
        
        .custom-scrollbar::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }
        
        .custom-scrollbar::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 10px;
        }
        
        .dark .custom-scrollbar::-webkit-scrollbar-track {
            background: #2d3748;
        }
        
        .dark .custom-scrollbar::-webkit-scrollbar-thumb {
            background: #4a5568;
        }
    </style>
</head>
<body class="bg-gray-50 dark:bg-gray-900 transition-colors duration-200">
    <!-- Theme Toggle -->
    <div class="fixed top-4 right-4 z-50">
        <button id="themeToggle" class="p-2 rounded-full bg-white dark:bg-gray-800 shadow-lg">
            <i class="fas fa-moon text-gray-800 dark:text-yellow-300"></i>
        </button>
    </div>

    <!-- Main App Container -->
    <div class="max-w-md mx-auto bg-white dark:bg-gray-800 min-h-screen relative overflow-hidden">
        <!-- Header -->
        <header class="gradient-bg text-white p-4 shadow-md">
            <div class="flex justify-between items-center">
                <div class="flex items-center space-x-2">
                    <i class="fas fa-users text-2xl"></i>
                    <h1 class="text-xl font-bold">Комнаты по интересам</h1>
                </div>
                <div class="flex items-center space-x-3">
                    <button class="p-2 rounded-full bg-white bg-opacity-20">
                        <i class="fas fa-search"></i>
                    </button>
                    <button class="p-2 rounded-full bg-white bg-opacity-20">
                        <i class="fas fa-bell"></i>
                        <span class="absolute top-3 right-3 h-2 w-2 bg-red-500 rounded-full"></span>
                    </button>
                </div>
            </div>
        </header>

        <!-- Main Content -->
        <main class="pb-20">
            <!-- Tabs Navigation -->
            <div class="flex justify-around border-b border-gray-200 dark:border-gray-700 px-4">
                <button id="homeTab" class="tab-active py-4 font-medium text-indigo-600 dark:text-indigo-400">
                    <i class="fas fa-home mr-2"></i>Главная
                </button>
                <button id="eventsTab" class="py-4 font-medium text-gray-500 dark:text-gray-400">
                    <i class="fas fa-calendar mr-2"></i>События
                </button>
                <button id="friendsTab" class="py-4 font-medium text-gray-500 dark:text-gray-400">
                    <i class="fas fa-user-friends mr-2"></i>Друзья
                </button>
                <button id="profileTab" class="py-4 font-medium text-gray-500 dark:text-gray-400">
                    <i class="fas fa-user mr-2"></i>Профиль
                </button>
            </div>

            <!-- Featured Rooms Section -->
            <section class="p-4">
                <div class="flex justify-between items-center mb-4">
                    <h2 class="text-lg font-semibold text-gray-800 dark:text-white">Рекомендуемые комнаты</h2>
                    <button class="text-sm text-indigo-600 dark:text-indigo-400">Все</button>
                </div>
                
                <div class="flex space-x-4 overflow-x-auto pb-4 custom-scrollbar">
                    <!-- Featured Room Card -->
                    <div class="flex-shrink-0 w-64 bg-gradient-to-r from-purple-500 to-pink-500 rounded-xl p-4 text-white shadow-lg">
                        <div class="flex justify-between items-start">
                            <div>
                                <h3 class="font-bold">Spanish Learners</h3>
                                <p class="text-sm opacity-80">Practice Spanish with native speakers</p>
                            </div>
                            <div class="flex items-center">
                                <i class="fas fa-users mr-1"></i>
                                <span class="text-sm">1.2k</span>
                            </div>
                        </div>
                        <div class="mt-4 flex space-x-2">
                            <span class="text-xs bg-white bg-opacity-20 px-2 py-1 rounded-full">Language</span>
                            <span class="text-xs bg-white bg-opacity-20 px-2 py-1 rounded-full">Beginner</span>
                        </div>
                        <button class="mt-4 w-full bg-white text-purple-600 py-2 rounded-lg font-medium text-sm">
                            Войти в комнату
                        </button>
                    </div>
                    
                    <!-- Featured Room Card -->
                    <div class="flex-shrink-0 w-64 bg-gradient-to-r from-blue-500 to-teal-400 rounded-xl p-4 text-white shadow-lg">
                        <div class="flex justify-between items-start">
                            <div>
                                <h3 class="font-bold">React Developers</h3>
                                <p class="text-sm opacity-80">Discuss React.js and related tech</p>
                            </div>
                            <div class="flex items-center">
                                <i class="fas fa-users mr-1"></i>
                                <span class="text-sm">856</span>
                            </div>
                        </div>
                        <div class="mt-4 flex space-x-2">
                            <span class="text-xs bg-white bg-opacity-20 px-2 py-1 rounded-full">Programming</span>
                            <span class="text-xs bg-white bg-opacity-20 px-2 py-1 rounded-full">Intermediate</span>
                        </div>
                        <button class="mt-4 w-full bg-white text-blue-600 py-2 rounded-lg font-medium text-sm">
                            Войти в комнату
                        </button>
                    </div>
                </div>
            </section>

            <!-- Recommended For You Section -->
            <section class="p-4">
                <div class="flex justify-between items-center mb-4">
                    <h2 class="text-lg font-semibold text-gray-800 dark:text-white">Рекомендуем вам</h2>
                    <button class="text-sm text-indigo-600 dark:text-indigo-400">Фильтр</button>
                </div>
                
                <div class="grid grid-cols-1 gap-4">
                    <!-- Room Card -->
                    <div class="room-card bg-white dark:bg-gray-700 rounded-xl p-4 shadow-md transition-transform duration-200">
                        <div class="flex justify-between">
                            <div>
                                <h3 class="font-bold text-gray-800 dark:text-white">JavaScript Beginners</h3>
                                <p class="text-sm text-gray-600 dark:text-gray-300">Learn JS fundamentals together</p>
                            </div>
                            <div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
                                <i class="fas fa-users mr-1"></i>
                                <span>324</span>
                            </div>
                        </div>
                        <div class="mt-3 flex flex-wrap gap-2">
                            <span class="text-xs bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 px-2 py-1 rounded-full">Programming</span>
                            <span class="text-xs bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200 px-2 py-1 rounded-full">Beginner</span>
                            <span class="text-xs bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200 px-2 py-1 rounded-full">Active</span>
                        </div>
                        <div class="mt-4 flex justify-between items-center">
                            <div class="flex -space-x-2">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/44.jpg" alt="User">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/32.jpg" alt="User">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/68.jpg" alt="User">
                            </div>
                            <button class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg text-sm font-medium">
                                Войти
                            </button>
                        </div>
                    </div>
                    
                    <!-- Room Card -->
                    <div class="room-card bg-white dark:bg-gray-700 rounded-xl p-4 shadow-md transition-transform duration-200">
                        <div class="flex justify-between">
                            <div>
                                <h3 class="font-bold text-gray-800 dark:text-white">Football Fans</h3>
                                <p class="text-sm text-gray-600 dark:text-gray-300">Discuss matches and tournaments</p>
                            </div>
                            <div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
                                <i class="fas fa-users mr-1"></i>
                                <span>782</span>
                            </div>
                        </div>
                        <div class="mt-3 flex flex-wrap gap-2">
                            <span class="text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded-full">Sports</span>
                            <span class="text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded-full">Global</span>
                        </div>
                        <div class="mt-4 flex justify-between items-center">
                            <div class="flex -space-x-2">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/75.jpg" alt="User">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/22.jpg" alt="User">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/33.jpg" alt="User">
                            </div>
                            <button class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg text-sm font-medium">
                                Join
                            </button>
                        </div>
                    </div>
                    
                    <!-- Room Card -->
                    <div class="room-card bg-white dark:bg-gray-700 rounded-xl p-4 shadow-md transition-transform duration-200">
                        <div class="flex justify-between">
                            <div>
                                <h3 class="font-bold text-gray-800 dark:text-white">Photography Enthusiasts</h3>
                                <p class="text-sm text-gray-600 dark:text-gray-300">Share tips and photo critiques</p>
                            </div>
                            <div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
                                <i class="fas fa-users mr-1"></i>
                                <span>456</span>
                            </div>
                        </div>
                        <div class="mt-3 flex flex-wrap gap-2">
                            <span class="text-xs bg-pink-100 dark:bg-pink-900 text-pink-800 dark:text-pink-200 px-2 py-1 rounded-full">Art</span>
                            <span class="text-xs bg-teal-100 dark:bg-teal-900 text-teal-800 dark:text-teal-200 px-2 py-1 rounded-full">Creative</span>
                        </div>
                        <div class="mt-4 flex justify-between items-center">
                            <div class="flex -space-x-2">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/65.jpg" alt="User">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/41.jpg" alt="User">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/12.jpg" alt="User">
                            </div>
                            <button class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg text-sm font-medium">
                                Join
                            </button>
                        </div>
                    </div>
                </div>
            </section>

            <!-- Events Section (Hidden by default) -->
            <section id="eventsSection" class="hidden p-4">
                <div class="flex justify-between items-center mb-4">
                    <h2 class="text-lg font-semibold text-gray-800 dark:text-white">Предстоящие события</h2>
                    <button class="text-sm text-indigo-600 dark:text-indigo-400">Все события</button>
                </div>
                
                <div class="space-y-4">
                    <!-- Event Card -->
                    <div class="bg-white dark:bg-gray-700 rounded-xl p-4 shadow-md">
                        <div class="flex justify-between items-start mb-2">
                            <div>
                                <h3 class="font-bold text-gray-800 dark:text-white">Встреча испаноговорящих</h3>
                                <p class="text-sm text-gray-600 dark:text-gray-300">Spanish Learners Room</p>
                            </div>
                            <span class="text-xs bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 px-2 py-1 rounded-full">Языки</span>
                        </div>
                        <div class="flex items-center space-x-2 text-sm text-gray-600 dark:text-gray-300 mb-3">
                            <i class="fas fa-calendar-day"></i>
                            <span>Сегодня, 19:00</span>
                        </div>
                        <div class="flex justify-between items-center">
                            <div class="flex -space-x-2">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/44.jpg" alt="User">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/32.jpg" alt="User">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/68.jpg" alt="User">
                                <div class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700 bg-gray-100 dark:bg-gray-600 flex items-center justify-center text-xs">+5</div>
                            </div>
                            <button class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg text-sm font-medium">
                                Присоединиться
                            </button>
                        </div>
                    </div>
                    
                    <!-- Event Card -->
                    <div class="bg-white dark:bg-gray-700 rounded-xl p-4 shadow-md">
                        <div class="flex justify-between items-start mb-2">
                            <div>
                                <h3 class="font-bold text-gray-800 dark:text-white">Футбольный матч обсуждение</h3>
                                <p class="text-sm text-gray-600 dark:text-gray-300">Football Fans Room</p>
                            </div>
                            <span class="text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded-full">Спорт</span>
                        </div>
                        <div class="flex items-center space-x-2 text-sm text-gray-600 dark:text-gray-300 mb-3">
                            <i class="fas fa-calendar-day"></i>
                            <span>Завтра, 20:30</span>
                        </div>
                        <div class="flex justify-between items-center">
                            <div class="flex -space-x-2">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/75.jpg" alt="User">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/men/22.jpg" alt="User">
                                <img class="w-8 h-8 rounded-full border-2 border-white dark:border-gray-700" src="https://randomuser.me/api/portraits/women/33.jpg" alt="User">
                            </div>
                            <button class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg text-sm font-medium">
                                Присоединиться
                            </button>
                        </div>
                    </div>
                </div>
            </section>

            <!-- Your Active Rooms Section -->
            <section class="p-4">
                <div class="flex justify-between items-center mb-4">
                    <h2 class="text-lg font-semibold text-gray-800 dark:text-white">Ваши активные комнаты</h2>
                    <button class="text-sm text-indigo-600 dark:text-indigo-400">Создать комнату</button>
                </div>
                
                <div class="bg-indigo-50 dark:bg-gray-700 rounded-xl p-4">
                    <div class="flex items-center space-x-3 mb-4">
                        <div class="bg-indigo-100 dark:bg-indigo-900 p-3 rounded-xl">
                            <i class="fas fa-code text-indigo-600 dark:text-indigo-400"></i>
                        </div>
                        <div>
                            <h3 class="font-medium text-gray-800 dark:text-white">Flutter Developers</h3>
                            <p class="text-sm text-gray-600 dark:text-gray-300">12 new messages</p>
                        </div>
                    </div>
                    
                    <div class="flex items-center space-x-3">
                        <div class="bg-green-100 dark:bg-green-900 p-3 rounded-xl">
                            <i class="fas fa-language text-green-600 dark:text-green-400"></i>
                        </div>
                        <div>
                            <h3 class="font-medium text-gray-800 dark:text-white">French Conversation</h3>
                            <p class="text-sm text-gray-600 dark:text-gray-300">Event starting soon</p>
                        </div>
                    </div>
                </div>
            </section>
        </main>

        <!-- Bottom Navigation -->
        <nav class="fixed bottom-0 left-0 right-0 bg-white dark:bg-gray-800 shadow-lg border-t border-gray-200 dark:border-gray-700">
            <div class="flex justify-around items-center p-3 max-w-md mx-auto">
                <button class="p-3 text-indigo-600 dark:text-indigo-400">
                    <i class="fas fa-home text-xl"></i>
                </button>
                <button class="p-3 text-gray-500 dark:text-gray-400">
                    <i class="fas fa-search text-xl"></i>
                </button>
                <button class="gradient-bg text-white p-4 rounded-full shadow-lg -mt-6">
                    <i class="fas fa-plus text-xl"></i>
                </button>
                <button class="p-3 text-gray-500 dark:text-gray-400">
                    <i class="fas fa-calendar text-xl"></i>
                </button>
                <button class="p-3 text-gray-500 dark:text-gray-400">
                    <i class="fas fa-user text-xl"></i>
                </button>
            </div>
        </nav>

        <!-- Room Chat Modal (Hidden by default) -->
        <div id="chatModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center p-4">
            <div class="bg-white dark:bg-gray-800 rounded-xl w-full max-w-md max-h-[80vh] flex flex-col">
                <!-- Chat Header -->
                <div class="gradient-bg text-white p-4 rounded-t-xl flex justify-between items-center">
                    <div class="flex items-center space-x-3">
                        <button id="closeChat" class="p-1">
                            <i class="fas fa-arrow-left"></i>
                        </button>
                        <div>
                            <h3 class="font-bold">Spanish Learners</h3>
                            <p class="text-xs opacity-80">12 active members</p>
                        </div>
                    </div>
                    <button class="p-2 rounded-full bg-white bg-opacity-20">
                        <i class="fas fa-ellipsis-v"></i>
                    </button>
                </div>
                
                <!-- Chat Messages -->
                <div class="flex-1 overflow-y-auto p-4 custom-scrollbar">
                    <div class="space-y-3">
                        <!-- Message from others -->
                        <div class="flex space-x-2">
                            <img class="w-8 h-8 rounded-full" src="https://randomuser.me/api/portraits/women/44.jpg" alt="User">
                            <div>
                                <div class="bg-gray-100 dark:bg-gray-700 p-3 chat-bubble-left max-w-xs">
                                    <p class="text-sm text-gray-800 dark:text-gray-200">Hola! ¿Cómo estás?</p>
                                </div>
                                <p class="text-xs text-gray-500 dark:text-gray-400 mt-1">Maria, 2:30 PM</p>
                            </div>
                        </div>
                        
                        <!-- Your message -->
                        <div class="flex justify-end">
                            <div class="max-w-xs">
                                <div class="bg-indigo-500 text-white p-3 chat-bubble-right">
                                    <p class="text-sm">Estoy bien, gracias! ¿Y tú?</p>
                                </div>
                                <p class="text-xs text-gray-500 dark:text-gray-400 mt-1 text-right">You, 2:32 PM</p>
                            </div>
                        </div>
                        
                        <!-- System message -->
                        <div class="text-center">
                            <p class="text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-700 inline-block px-2 py-1 rounded-full">Juan вошел в комнату</p>
                        </div>
                    </div>
                </div>
                
                <!-- Message Input -->
                <div class="p-3 border-t border-gray-200 dark:border-gray-700">
                    <div class="flex items-center space-x-2">
                        <button class="p-2 text-gray-500 dark:text-gray-400">
                            <i class="fas fa-plus"></i>
                        </button>
                        <input type="text" placeholder="Type your message..." class="flex-1 bg-gray-100 dark:bg-gray-700 rounded-full px-4 py-2 text-sm focus:outline-none">
                        <button class="p-2 text-indigo-600 dark:text-indigo-400">
                            <i class="fas fa-microphone"></i>
                        </button>
                        <button class="p-2 bg-indigo-600 text-white rounded-full">
                            <i class="fas fa-paper-plane"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Theme toggle functionality
        const themeToggle = document.getElementById('themeToggle');
        const html = document.documentElement;
        
        // Check for saved theme preference or use preferred color scheme
        if (localStorage.getItem('theme') === 'dark' || 
            (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
            html.classList.add('dark');
            themeToggle.innerHTML = '<i class="fas fa-sun text-yellow-300"></i>';
        } else {
            html.classList.remove('dark');
            themeToggle.innerHTML = '<i class="fas fa-moon text-gray-800"></i>';
        }
        
        // Toggle theme on button click
        themeToggle.addEventListener('click', () => {
            html.classList.toggle('dark');
            
            if (html.classList.contains('dark')) {
                localStorage.setItem('theme', 'dark');
                themeToggle.innerHTML = '<i class="fas fa-sun text-yellow-300"></i>';
            } else {
                localStorage.setItem('theme', 'light');
                themeToggle.innerHTML = '<i class="fas fa-moon text-gray-800"></i>';
            }
        });
        
        // Tab switching functionality
        const tabs = {
            home: document.getElementById('homeTab'),
            events: document.getElementById('eventsTab'),
            friends: document.getElementById('friendsTab'),
            profile: document.getElementById('profileTab')
        };

        // Content sections
        const sections = {
            home: document.querySelector('main > section:not(#eventsSection)'),
            events: document.getElementById('eventsSection'),
            friends: null, // You can add these later
            profile: null  // You can add these later
        };

        function switchTab(activeTab) {
            // Update tab styles
            Object.values(tabs).forEach(tab => {
                if (tab) {
                    tab.classList.remove('tab-active', 'text-indigo-600', 'dark:text-indigo-400');
                    tab.classList.add('text-gray-500', 'dark:text-gray-400');
                }
            });
            
            activeTab.classList.add('tab-active', 'text-indigo-600', 'dark:text-indigo-400');
            activeTab.classList.remove('text-gray-500', 'dark:text-gray-400');

            // Hide all sections first
            document.querySelectorAll('main > section').forEach(section => {
                section.classList.add('hidden');
            });

            // Show the active section
            const sectionId = activeTab.id.replace('Tab', '') + 'Section';
            const activeSection = document.getElementById(sectionId);
            if (activeSection) {
                activeSection.classList.remove('hidden');
            } else {
                // Default to showing the first section if no matching section found
                sections.home.classList.remove('hidden');
            }
        }

        // Add event listeners
        tabs.home.addEventListener('click', () => switchTab(tabs.home));
        tabs.events.addEventListener('click', () => switchTab(tabs.events));
        if (tabs.friends) tabs.friends.addEventListener('click', () => switchTab(tabs.friends));
        if (tabs.profile) tabs.profile.addEventListener('click', () => switchTab(tabs.profile));

        // Initialize - show home section by default
        switchTab(tabs.home);
        
        // Room card click to open chat
        const roomCards = document.querySelectorAll('.room-card');
        const chatModal = document.getElementById('chatModal');
        const closeChat = document.getElementById('closeChat');
        
        roomCards.forEach(card => {
            card.addEventListener('click', () => {
                chatModal.classList.remove('hidden');
            });
        });
        
        closeChat.addEventListener('click', () => {
            chatModal.classList.add('hidden');
        });
        
        // Simulate joining a room
        const joinButtons = document.querySelectorAll('button:contains("Join")');
        joinButtons.forEach(button => {
            button.addEventListener('click', (e) => {
                e.stopPropagation();
                button.textContent = 'Вы вошли';
                button.classList.remove('bg-indigo-600', 'hover:bg-indigo-700');
                button.classList.add('bg-green-500', 'hover:bg-green-600');
            });
        });
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Argo925/test" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>