lestatplays commited on
Commit
cb5fee6
·
verified ·
1 Parent(s): 79935a2

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +1460 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Chatstream
3
- emoji: 🐢
4
- colorFrom: yellow
5
- colorTo: pink
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: chatstream
3
+ emoji: 🐳
4
+ colorFrom: pink
5
+ colorTo: gray
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,1460 @@
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="pt-br">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Stream Dashboard Multiplataforma</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <script>
10
+ tailwind.config = {
11
+ darkMode: 'class',
12
+ theme: {
13
+ extend: {
14
+ colors: {
15
+ dark: {
16
+ 900: '#0a0a0a',
17
+ 800: '#1a1a1a',
18
+ 700: '#2a2a2a',
19
+ 600: '#3a3a3a',
20
+ },
21
+ purple: {
22
+ 'black': '#1a0525',
23
+ 'deep': '#2a0a3a',
24
+ 'dark': '#3a0a4a',
25
+ 'darker': '#4a0a5a',
26
+ },
27
+ red: {
28
+ 'black': '#250505',
29
+ 'deep': '#3a0a0a',
30
+ 'dark': '#4a0a0a',
31
+ 'darker': '#5a0a0a',
32
+ },
33
+ blue: {
34
+ 'black': '#051a25',
35
+ 'deep': '#0a2a3a',
36
+ 'dark': '#0a3a4a',
37
+ 'darker': '#0a4a5a',
38
+ },
39
+ emerald: {
40
+ 'black': '#052515',
41
+ 'deep': '#0a3a2a',
42
+ 'dark': '#0a4a3a',
43
+ 'darker': '#0a5a4a',
44
+ },
45
+ }
46
+ }
47
+ }
48
+ }
49
+ </script>
50
+ <style>
51
+ /* Custom CSS */
52
+ body {
53
+ background-color: #0a0a0a;
54
+ color: #f8f8f8;
55
+ }
56
+
57
+ body.light-mode {
58
+ background-color: #f8f8f8;
59
+ color: #333333;
60
+ }
61
+
62
+ .chat-container {
63
+ scrollbar-width: thin;
64
+ scrollbar-color: #4a5568 #1a1a1a;
65
+ }
66
+
67
+ .chat-container::-webkit-scrollbar {
68
+ width: 6px;
69
+ }
70
+
71
+ .chat-container::-webkit-scrollbar-track {
72
+ background: #1a1a1a;
73
+ }
74
+
75
+ .chat-container::-webkit-scrollbar-thumb {
76
+ background-color: #4a5568;
77
+ border-radius: 3px;
78
+ }
79
+
80
+ .new-message {
81
+ animation: highlight 1.5s ease-out;
82
+ }
83
+
84
+ @keyframes highlight {
85
+ 0% { background-color: rgba(74, 85, 104, 0.5); }
86
+ 100% { background-color: transparent; }
87
+ }
88
+
89
+ .alert-popup {
90
+ animation: slideIn 0.5s forwards, fadeOut 0.5s 4s forwards;
91
+ }
92
+
93
+ @keyframes slideIn {
94
+ from { transform: translateX(100%); }
95
+ to { transform: translateX(0); }
96
+ }
97
+
98
+ @keyframes fadeOut {
99
+ to { opacity: 0; visibility: hidden; }
100
+ }
101
+
102
+ /* Platform icons */
103
+ .platform-icon {
104
+ width: 20px;
105
+ height: 20px;
106
+ display: inline-flex;
107
+ align-items: center;
108
+ justify-content: center;
109
+ border-radius: 4px;
110
+ margin-right: 8px;
111
+ color: white;
112
+ }
113
+
114
+ .platform-icon.twitch {
115
+ background-color: #9147ff;
116
+ }
117
+
118
+ .platform-icon.youtube {
119
+ background-color: #ff0000;
120
+ }
121
+
122
+ .platform-icon.tiktok {
123
+ background-color: #000000;
124
+ }
125
+
126
+ .platform-icon.trovo {
127
+ background-color: #37d87b;
128
+ }
129
+
130
+ .platform-icon.kick {
131
+ background-color: #000000;
132
+ color: #53fc18;
133
+ font-weight: bold;
134
+ font-size: 10px;
135
+ }
136
+
137
+ /* Glass effect */
138
+ .glass {
139
+ background: rgba(26, 26, 26, 0.7);
140
+ backdrop-filter: blur(10px);
141
+ -webkit-backdrop-filter: blur(10px);
142
+ border: 1px solid rgba(255, 255, 255, 0.05);
143
+ }
144
+
145
+ .light-mode .glass {
146
+ background: rgba(255, 255, 255, 0.7);
147
+ border: 1px solid rgba(0, 0, 0, 0.05);
148
+ }
149
+
150
+ /* Gradient borders */
151
+ .gradient-border {
152
+ position: relative;
153
+ border-radius: 0.5rem;
154
+ }
155
+
156
+ .gradient-border::before {
157
+ content: '';
158
+ position: absolute;
159
+ top: -1px;
160
+ left: -1px;
161
+ right: -1px;
162
+ bottom: -1px;
163
+ border-radius: 0.5rem;
164
+ background: linear-gradient(45deg, var(--gradient-from), var(--gradient-to));
165
+ z-index: -1;
166
+ }
167
+
168
+ /* Custom button effects */
169
+ .btn-custom {
170
+ transition: all 0.3s;
171
+ position: relative;
172
+ overflow: hidden;
173
+ }
174
+
175
+ .btn-custom::before {
176
+ content: '';
177
+ position: absolute;
178
+ top: 0;
179
+ left: -100%;
180
+ width: 100%;
181
+ height: 100%;
182
+ background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
183
+ transition: all 0.5s;
184
+ }
185
+
186
+ .btn-custom:hover::before {
187
+ left: 100%;
188
+ }
189
+
190
+ .btn-custom:active {
191
+ transform: translateY(1px);
192
+ }
193
+
194
+ /* Theme colors */
195
+ .theme-purple {
196
+ --gradient-from: #6b21a8;
197
+ --gradient-to: #c026d3;
198
+ --primary: #7e22ce;
199
+ --primary-hover: #9333ea;
200
+ --accent: #a855f7;
201
+ --text-primary: #f8f8f8;
202
+ --text-secondary: #e5e5e5;
203
+ }
204
+
205
+ .theme-red {
206
+ --gradient-from: #991b1b;
207
+ --gradient-to: #dc2626;
208
+ --primary: #b91c1c;
209
+ --primary-hover: #dc2626;
210
+ --accent: #ef4444;
211
+ --text-primary: #f8f8f8;
212
+ --text-secondary: #e5e5e5;
213
+ }
214
+
215
+ .theme-blue {
216
+ --gradient-from: #1e40af;
217
+ --gradient-to: #3b82f6;
218
+ --primary: #1d4ed8;
219
+ --primary-hover: #2563eb;
220
+ --accent: #3b82f6;
221
+ --text-primary: #f8f8f8;
222
+ --text-secondary: #e5e5e5;
223
+ }
224
+
225
+ .theme-emerald {
226
+ --gradient-from: #047857;
227
+ --gradient-to: #10b981;
228
+ --primary: #059669;
229
+ --primary-hover: #10b981;
230
+ --accent: #34d399;
231
+ --text-primary: #f8f8f8;
232
+ --text-secondary: #e5e5e5;
233
+ }
234
+
235
+ /* Light mode text colors */
236
+ .light-mode .theme-purple {
237
+ --text-primary: #333333;
238
+ --text-secondary: #555555;
239
+ }
240
+
241
+ .light-mode .theme-red {
242
+ --text-primary: #333333;
243
+ --text-secondary: #555555;
244
+ }
245
+
246
+ .light-mode .theme-blue {
247
+ --text-primary: #333333;
248
+ --text-secondary: #555555;
249
+ }
250
+
251
+ .light-mode .theme-emerald {
252
+ --text-primary: #333333;
253
+ --text-secondary: #555555;
254
+ }
255
+
256
+ /* Settings panel */
257
+ .settings-panel {
258
+ transform: translateX(100%);
259
+ transition: transform 0.3s ease;
260
+ }
261
+
262
+ .settings-panel.open {
263
+ transform: translateX(0);
264
+ }
265
+
266
+ /* Sound toggle */
267
+ .sound-toggle {
268
+ position: relative;
269
+ width: 40px;
270
+ height: 20px;
271
+ border-radius: 10px;
272
+ background-color: #4a5568;
273
+ transition: background-color 0.3s;
274
+ }
275
+
276
+ .sound-toggle.active {
277
+ background-color: var(--primary);
278
+ }
279
+
280
+ .sound-toggle::before {
281
+ content: '';
282
+ position: absolute;
283
+ top: 2px;
284
+ left: 2px;
285
+ width: 16px;
286
+ height: 16px;
287
+ border-radius: 50%;
288
+ background-color: white;
289
+ transition: transform 0.3s;
290
+ }
291
+
292
+ .sound-toggle.active::before {
293
+ transform: translateX(20px);
294
+ }
295
+ </style>
296
+ </head>
297
+ <body class="theme-purple bg-dark-900 text-[var(--text-primary)] min-h-screen">
298
+ <!-- Audio element for sound effects -->
299
+ <audio id="messageSound" preload="auto">
300
+ <source src="https://assets.mixkit.co/sfx/preview/mixkit-positive-interface-beep-221.mp3" type="audio/mpeg">
301
+ </audio>
302
+
303
+ <!-- Settings Panel -->
304
+ <div class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden" id="settingsOverlay"></div>
305
+ <div class="settings-panel fixed top-0 right-0 w-80 h-full bg-dark-800 z-50 shadow-2xl p-6 overflow-y-auto" id="settingsPanel">
306
+ <div class="flex justify-between items-center mb-6">
307
+ <h2 class="text-xl font-bold">Configurações</h2>
308
+ <button onclick="closeSettings()" class="p-2 rounded-full hover:bg-dark-700 transition">
309
+ <i class="fas fa-times"></i>
310
+ </button>
311
+ </div>
312
+
313
+ <div class="space-y-6">
314
+ <div>
315
+ <h3 class="font-medium mb-3">Alertas</h3>
316
+ <div class="space-y-4">
317
+ <div class="flex items-center justify-between">
318
+ <span>Efeitos sonoros</span>
319
+ <div class="sound-toggle" id="soundToggle" onclick="toggleSound()"></div>
320
+ </div>
321
+ <div>
322
+ <label class="block text-sm mb-2">Volume</label>
323
+ <input type="range" id="volumeControl" min="0" max="1" step="0.1" value="0.5" class="w-full accent-[var(--primary)]">
324
+ </div>
325
+ </div>
326
+ </div>
327
+
328
+ <div>
329
+ <h3 class="font-medium mb-3">Notificações</h3>
330
+ <div class="space-y-2">
331
+ <div class="flex items-center">
332
+ <input type="checkbox" id="notifyNewFollowers" checked class="rounded border-dark-600 text-[var(--primary)] focus:ring-[var(--primary)] mr-2 bg-dark-700">
333
+ <label for="notifyNewFollowers">Novos seguidores</label>
334
+ </div>
335
+ <div class="flex items-center">
336
+ <input type="checkbox" id="notifyNewSubs" checked class="rounded border-dark-600 text-[var(--primary)] focus:ring-[var(--primary)] mr-2 bg-dark-700">
337
+ <label for="notifyNewSubs">Novas inscrições</label>
338
+ </div>
339
+ <div class="flex items-center">
340
+ <input type="checkbox" id="notifyDonations" checked class="rounded border-dark-600 text-[var(--primary)] focus:ring-[var(--primary)] mr-2 bg-dark-700">
341
+ <label for="notifyDonations">Doações</label>
342
+ </div>
343
+ </div>
344
+ </div>
345
+
346
+ <div>
347
+ <h3 class="font-medium mb-3">Aparência</h3>
348
+ <div class="flex items-center">
349
+ <input type="checkbox" id="darkModeToggle" checked class="rounded border-dark-600 text-[var(--primary)] focus:ring-[var(--primary)] mr-2 bg-dark-700">
350
+ <label for="darkModeToggle">Modo escuro</label>
351
+ </div>
352
+ </div>
353
+ </div>
354
+ </div>
355
+
356
+ <!-- Theme Selector -->
357
+ <div class="fixed bottom-4 left-4 z-50">
358
+ <div class="relative group">
359
+ <button class="p-3 rounded-full bg-dark-700 hover:bg-dark-600 shadow-lg">
360
+ <i class="fas fa-palette text-xl"></i>
361
+ </button>
362
+ <div class="absolute bottom-full left-0 mb-2 w-48 bg-dark-800 rounded-lg shadow-xl p-2 hidden group-hover:block">
363
+ <div class="grid grid-cols-2 gap-2">
364
+ <button onclick="changeTheme('purple')" class="p-2 rounded-lg bg-purple-black hover:bg-purple-deep flex items-center justify-center">
365
+ <span class="w-4 h-4 rounded-full bg-purple-500 mr-2"></span>
366
+ <span>Roxo</span>
367
+ </button>
368
+ <button onclick="changeTheme('red')" class="p-2 rounded-lg bg-red-black hover:bg-red-deep flex items-center justify-center">
369
+ <span class="w-4 h-4 rounded-full bg-red-500 mr-2"></span>
370
+ <span>Vermelho</span>
371
+ </button>
372
+ <button onclick="changeTheme('blue')" class="p-2 rounded-lg bg-blue-black hover:bg-blue-deep flex items-center justify-center">
373
+ <span class="w-4 h-4 rounded-full bg-blue-500 mr-2"></span>
374
+ <span>Azul</span>
375
+ </button>
376
+ <button onclick="changeTheme('emerald')" class="p-2 rounded-lg bg-emerald-black hover:bg-emerald-deep flex items-center justify-center">
377
+ <span class="w-4 h-4 rounded-full bg-emerald-500 mr-2"></span>
378
+ <span>Esmeralda</span>
379
+ </button>
380
+ </div>
381
+ </div>
382
+ </div>
383
+ </div>
384
+
385
+ <!-- Auth Modal -->
386
+ <div id="authModal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-40 hidden">
387
+ <div class="glass rounded-xl p-6 w-full max-w-md shadow-2xl gradient-border" style="--gradient-from: var(--primary); --gradient-to: var(--accent);">
388
+ <div class="relative">
389
+ <h2 class="text-2xl font-bold mb-6">Conectar Plataformas</h2>
390
+
391
+ <div class="space-y-3">
392
+ <button onclick="connectPlatform('twitch')" class="w-full flex items-center justify-center bg-[#9147ff] hover:bg-[#7d3ae6] text-white py-3 px-4 rounded-lg transition btn-custom">
393
+ <i class="fab fa-twitch mr-3"></i> Conectar Twitch
394
+ </button>
395
+
396
+ <button onclick="connectPlatform('youtube')" class="w-full flex items-center justify-center bg-[#ff0000] hover:bg-[#e60000] text-white py-3 px-4 rounded-lg transition btn-custom">
397
+ <i class="fab fa-youtube mr-3"></i> Conectar YouTube
398
+ </button>
399
+
400
+ <button onclick="connectPlatform('tiktok')" class="w-full flex items-center justify-center bg-black hover:bg-gray-900 text-white py-3 px-4 rounded-lg transition btn-custom">
401
+ <i class="fab fa-tiktok mr-3"></i> Conectar TikTok
402
+ </button>
403
+
404
+ <button onclick="connectPlatform('trovo')" class="w-full flex items-center justify-center bg-[#37d87b] hover:bg-[#2fc46d] text-white py-3 px-4 rounded-lg transition btn-custom">
405
+ <i class="fas fa-t mr-3"></i> Conectar Trovo
406
+ </button>
407
+
408
+ <button onclick="connectPlatform('kick')" class="w-full flex items-center justify-center bg-black hover:bg-gray-900 text-[#53fc18] py-3 px-4 rounded-lg transition btn-custom">
409
+ <span class="font-bold mr-2">KICK</span> Conectar Kick
410
+ </button>
411
+ </div>
412
+
413
+ <div class="mt-6 pt-4 border-t border-dark-600">
414
+ <button onclick="closeAuthModal()" class="w-full bg-dark-700 hover:bg-dark-600 text-white py-2 px-4 rounded-lg transition btn-custom">
415
+ Fechar
416
+ </button>
417
+ </div>
418
+ </div>
419
+ </div>
420
+ </div>
421
+
422
+ <!-- Edit Quick Message Modal -->
423
+ <div id="editQuickMessageModal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-40 hidden">
424
+ <div class="glass rounded-xl p-6 w-full max-w-md shadow-2xl gradient-border" style="--gradient-from: var(--primary); --gradient-to: var(--accent);">
425
+ <h2 class="text-2xl font-bold mb-6">Editar Mensagem Rápida</h2>
426
+
427
+ <div class="space-y-4">
428
+ <div>
429
+ <label class="block text-sm font-medium mb-2">Texto da Mensagem</label>
430
+ <input type="text" id="quickMessageText" class="w-full bg-dark-700 text-white rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-purple-600 border border-dark-600">
431
+ </div>
432
+
433
+ <div>
434
+ <label class="block text-sm font-medium mb-2">Cor do Botão</label>
435
+ <div class="flex flex-wrap gap-2 mb-2">
436
+ <button onclick="setQuickMessageColor('#3b82f6')" class="w-8 h-8 rounded-full bg-blue-500 border-2 border-transparent hover:border-white"></button>
437
+ <button onclick="setQuickMessageColor('#ef4444')" class="w-8 h-8 rounded-full bg-red-500 border-2 border-transparent hover:border-white"></button>
438
+ <button onclick="setQuickMessageColor('#10b981')" class="w-8 h-8 rounded-full bg-green-500 border-2 border-transparent hover:border-white"></button>
439
+ <button onclick="setQuickMessageColor('#f59e0b')" class="w-8 h-8 rounded-full bg-yellow-500 border-2 border-transparent hover:border-white"></button>
440
+ <button onclick="setQuickMessageColor('#8b5cf6')" class="w-8 h-8 rounded-full bg-purple-500 border-2 border-transparent hover:border-white"></button>
441
+ <button onclick="setQuickMessageColor('#ec4899')" class="w-8 h-8 rounded-full bg-pink-500 border-2 border-transparent hover:border-white"></button>
442
+ <button onclick="setQuickMessageColor('#7e22ce')" class="w-8 h-8 rounded-full bg-[#7e22ce] border-2 border-transparent hover:border-white"></button>
443
+ <button onclick="setQuickMessageColor('#111827')" class="w-8 h-8 rounded-full bg-gray-800 border-2 border-transparent hover:border-white"></button>
444
+ </div>
445
+ <div>
446
+ <input type="color" id="customColorPicker" class="w-full h-10 cursor-pointer bg-dark-700 border border-dark-600 rounded-lg" value="#3b82f6">
447
+ </div>
448
+ </div>
449
+ </div>
450
+
451
+ <div class="mt-6 pt-4 border-t border-dark-600 flex justify-between">
452
+ <button onclick="deleteQuickMessage()" class="bg-red-600 hover:bg-red-700 text-white py-2 px-4 rounded-lg transition btn-custom">
453
+ <i class="fas fa-trash mr-2"></i> Excluir
454
+ </button>
455
+ <div>
456
+ <button onclick="closeEditQuickMessageModal()" class="bg-dark-700 hover:bg-dark-600 text-white py-2 px-4 rounded-lg transition mr-2 btn-custom">
457
+ Cancelar
458
+ </button>
459
+ <button onclick="saveQuickMessage()" class="bg-[var(--primary)] hover:bg-[var(--primary-hover)] text-white py-2 px-4 rounded-lg transition btn-custom">
460
+ Salvar
461
+ </button>
462
+ </div>
463
+ </div>
464
+ </div>
465
+ </div>
466
+
467
+ <!-- Main Dashboard -->
468
+ <div class="container mx-auto px-4 py-6">
469
+ <!-- Header -->
470
+ <header class="flex justify-between items-center mb-8">
471
+ <div class="flex items-center">
472
+ <h1 class="text-3xl font-bold text-[var(--primary)]">Stream Dashboard</h1>
473
+ <span class="ml-3 px-2 py-1 bg-dark-700 rounded-full text-xs">BETA</span>
474
+ </div>
475
+ <div class="flex space-x-3">
476
+ <button onclick="toggleDarkMode()" class="p-3 rounded-full bg-dark-800 hover:bg-dark-700 shadow-lg btn-custom">
477
+ <i class="fas fa-moon"></i>
478
+ </button>
479
+ <button onclick="openAuthModal()" class="bg-[var(--primary)] hover:bg-[var(--primary-hover)] text-white py-2 px-6 rounded-lg transition btn-custom">
480
+ <i class="fas fa-plus mr-2"></i> Conectar Plataforma
481
+ </button>
482
+ </div>
483
+ </header>
484
+
485
+ <!-- Stats Overview -->
486
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-8">
487
+ <div class="glass rounded-xl p-5 flex items-center gradient-border" style="--gradient-from: #3b82f6; --gradient-to: #1d4ed8;">
488
+ <div class="bg-blue-500 p-3 rounded-full mr-4 shadow-lg">
489
+ <i class="fas fa-users text-white"></i>
490
+ </div>
491
+ <div>
492
+ <p class="text-[var(--text-secondary)] text-sm">Total Viewers</p>
493
+ <p class="text-2xl font-bold" id="totalViewers">0</p>
494
+ </div>
495
+ </div>
496
+
497
+ <div class="glass rounded-xl p-5 flex items-center gradient-border" style="--gradient-from: #10b981; --gradient-to: #059669;">
498
+ <div class="bg-green-500 p-3 rounded-full mr-4 shadow-lg">
499
+ <i class="fas fa-comments text-white"></i>
500
+ </div>
501
+ <div>
502
+ <p class="text-[var(--text-secondary)] text-sm">Mensagens</p>
503
+ <p class="text-2xl font-bold" id="totalMessages">0</p>
504
+ </div>
505
+ </div>
506
+
507
+ <div class="glass rounded-xl p-5 flex items-center gradient-border" style="--gradient-from: #ef4444; --gradient-to: #dc2626;">
508
+ <div class="bg-red-500 p-3 rounded-full mr-4 shadow-lg">
509
+ <i class="fas fa-heart text-white"></i>
510
+ </div>
511
+ <div>
512
+ <p class="text-[var(--text-secondary)] text-sm">Novos Seguidores</p>
513
+ <p class="text-2xl font-bold" id="totalFollowers">0</p>
514
+ </div>
515
+ </div>
516
+
517
+ <div class="glass rounded-xl p-5 flex items-center gradient-border" style="--gradient-from: #f59e0b; --gradient-to: #d97706;">
518
+ <div class="bg-yellow-500 p-3 rounded-full mr-4 shadow-lg">
519
+ <i class="fas fa-money-bill-wave text-white"></i>
520
+ </div>
521
+ <div>
522
+ <p class="text-[var(--text-secondary)] text-sm">Doações</p>
523
+ <p class="text-2xl font-bold" id="totalDonations">R$ 0,00</p>
524
+ </div>
525
+ </div>
526
+ </div>
527
+
528
+ <!-- Main Content -->
529
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
530
+ <!-- Chats Column -->
531
+ <div class="lg:col-span-2 space-y-4">
532
+ <!-- Platform Tabs -->
533
+ <div class="glass rounded-t-xl overflow-hidden">
534
+ <div class="flex border-b border-dark-600 overflow-x-auto" id="chatTabs">
535
+ <!-- "All" tab will be added first when platforms are connected -->
536
+ </div>
537
+ </div>
538
+
539
+ <!-- Chat Containers -->
540
+ <div class="glass rounded-b-xl p-5 h-[32rem] overflow-y-auto chat-container" id="chatDisplay">
541
+ <!-- Chat messages will be added here -->
542
+ <div class="text-center text-[var(--text-secondary)] py-10">
543
+ <i class="fas fa-comment-slash text-4xl mb-2"></i>
544
+ <p>Nenhum chat conectado</p>
545
+ </div>
546
+ </div>
547
+
548
+ <!-- Chat Input and Quick Messages -->
549
+ <div class="space-y-4">
550
+ <!-- Chat Input -->
551
+ <div class="glass rounded-xl p-4 hidden" id="chatInputContainer">
552
+ <div class="flex">
553
+ <input type="text" id="chatInput" placeholder="Enviar mensagem..." class="flex-grow bg-dark-700 text-white rounded-l-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-[var(--primary)] border border-dark-600">
554
+ <button onclick="sendMessageToAll()" class="bg-[var(--primary)] hover:bg-[var(--primary-hover)] text-white px-5 py-3 rounded-r-lg transition btn-custom">
555
+ <i class="fas fa-paper-plane"></i>
556
+ </button>
557
+ </div>
558
+ <div class="mt-3 flex flex-wrap gap-3" id="platformCheckboxes">
559
+ <!-- Platform checkboxes will be added here -->
560
+ </div>
561
+ </div>
562
+
563
+ <!-- Quick Messages Section -->
564
+ <div class="glass rounded-xl p-5 gradient-border" style="--gradient-from: var(--primary); --gradient-to: var(--accent);">
565
+ <div class="flex justify-between items-center mb-4">
566
+ <h2 class="text-xl font-bold">Mensagens Rápidas</h2>
567
+ <button onclick="addNewQuickMessage()" class="bg-[var(--primary)] hover:bg-[var(--primary-hover)] text-white py-1 px-4 rounded-lg text-sm transition btn-custom">
568
+ <i class="fas fa-plus mr-1"></i> Nova Mensagem
569
+ </button>
570
+ </div>
571
+
572
+ <div class="flex flex-wrap gap-3" id="quickMessagesContainer">
573
+ <!-- Quick message buttons will be added here -->
574
+ <div class="text-[var(--text-secondary)] text-sm">Nenhuma mensagem rápida configurada</div>
575
+ </div>
576
+ </div>
577
+ </div>
578
+ </div>
579
+
580
+ <!-- Alerts and Stats Column -->
581
+ <div class="space-y-6">
582
+ <!-- Alerts Section -->
583
+ <div class="glass rounded-xl p-5 gradient-border" style="--gradient-from: var(--primary); --gradient-to: var(--accent);">
584
+ <div class="flex justify-between items-center mb-4">
585
+ <h2 class="text-xl font-bold">Alertas</h2>
586
+ <div class="flex space-x-2">
587
+ <button onclick="openSettings()" class="p-2 rounded-full bg-dark-700 hover:bg-dark-600 transition btn-custom">
588
+ <i class="fas fa-cog"></i>
589
+ </button>
590
+ <button id="soundToggleBtn" class="p-2 rounded-full bg-dark-700 hover:bg-dark-600 transition btn-custom">
591
+ <i class="fas fa-volume-up"></i>
592
+ </button>
593
+ </div>
594
+ </div>
595
+
596
+ <div class="space-y-3 h-64 overflow-y-auto" id="alertsContainer">
597
+ <!-- Alerts will be added here -->
598
+ <div class="text-center text-[var(--text-secondary)] py-10">
599
+ <i class="fas fa-bell-slash text-4xl mb-2"></i>
600
+ <p>Nenhum alerta recente</p>
601
+ </div>
602
+ </div>
603
+ </div>
604
+
605
+ <!-- Platform Stats -->
606
+ <div class="glass rounded-xl p-5 gradient-border" style="--gradient-from: var(--primary); --gradient-to: var(--accent);">
607
+ <h2 class="text-xl font-bold mb-4">Estatísticas por Plataforma</h2>
608
+
609
+ <div class="space-y-4" id="platformStats">
610
+ <!-- Stats will be added here -->
611
+ <div class="text-center text-[var(--text-secondary)] py-10">
612
+ <i class="fas fa-chart-line text-4xl mb-2"></i>
613
+ <p>Conecte plataformas para ver estatísticas</p>
614
+ </div>
615
+ </div>
616
+ </div>
617
+ </div>
618
+ </div>
619
+ </div>
620
+
621
+ <!-- Alert Popups Container -->
622
+ <div class="fixed bottom-4 right-4 space-y-3 w-80 z-40" id="alertPopups">
623
+ <!-- Alert popups will appear here -->
624
+ </div>
625
+
626
+ <script>
627
+ // Global variables
628
+ let connectedPlatforms = [];
629
+ let activeTab = null;
630
+ let allMessages = [];
631
+ let quickMessages = [];
632
+ let editingQuickMessageIndex = null;
633
+ let soundEnabled = true;
634
+ let soundVolume = 0.5;
635
+
636
+ // Audio element
637
+ const messageSound = document.getElementById('messageSound');
638
+
639
+ // Change theme
640
+ function changeTheme(theme) {
641
+ document.body.className = `theme-${theme} bg-dark-900 text-[var(--text-primary)] min-h-screen`;
642
+ if (document.body.classList.contains('light-mode')) {
643
+ document.body.classList.add('light-mode');
644
+ }
645
+ }
646
+
647
+ // Load quick messages from localStorage
648
+ function loadQuickMessages() {
649
+ const savedMessages = localStorage.getItem('quickMessages');
650
+ if (savedMessages) {
651
+ quickMessages = JSON.parse(savedMessages);
652
+ renderQuickMessages();
653
+ }
654
+ }
655
+
656
+ // Save quick messages to localStorage
657
+ function saveQuickMessages() {
658
+ localStorage.setItem('quickMessages', JSON.stringify(quickMessages));
659
+ }
660
+
661
+ // Render quick messages buttons
662
+ function renderQuickMessages() {
663
+ const container = document.getElementById('quickMessagesContainer');
664
+
665
+ if (quickMessages.length === 0) {
666
+ container.innerHTML = '<div class="text-[var(--text-secondary)] text-sm">Nenhuma mensagem rápida configurada</div>';
667
+ return;
668
+ }
669
+
670
+ container.innerHTML = '';
671
+
672
+ quickMessages.forEach((message, index) => {
673
+ const button = document.createElement('button');
674
+ button.className = `btn-custom text-white py-2 px-4 rounded-lg flex items-center shadow-md`;
675
+ button.style.backgroundColor = message.color;
676
+ button.innerHTML = `
677
+ <span>${message.text}</span>
678
+ <button onclick="editQuickMessage(${index}, event)" class="ml-2 bg-black bg-opacity-20 p-1 rounded-full hover:bg-opacity-30">
679
+ <i class="fas fa-pencil-alt text-xs"></i>
680
+ </button>
681
+ `;
682
+ button.onclick = () => sendQuickMessage(message.text);
683
+
684
+ container.appendChild(button);
685
+ });
686
+ }
687
+
688
+ // Add new quick message
689
+ function addNewQuickMessage() {
690
+ editingQuickMessageIndex = null;
691
+ document.getElementById('quickMessageText').value = '';
692
+ document.getElementById('customColorPicker').value = '#3b82f6';
693
+ document.getElementById('editQuickMessageModal').classList.remove('hidden');
694
+ }
695
+
696
+ // Edit quick message
697
+ function editQuickMessage(index, event) {
698
+ event.stopPropagation();
699
+ editingQuickMessageIndex = index;
700
+ const message = quickMessages[index];
701
+ document.getElementById('quickMessageText').value = message.text;
702
+ document.getElementById('customColorPicker').value = message.color;
703
+ document.getElementById('editQuickMessageModal').classList.remove('hidden');
704
+ }
705
+
706
+ // Set quick message color
707
+ function setQuickMessageColor(color) {
708
+ document.getElementById('customColorPicker').value = color;
709
+ }
710
+
711
+ // Save quick message
712
+ function saveQuickMessage() {
713
+ const text = document.getElementById('quickMessageText').value.trim();
714
+ const color = document.getElementById('customColorPicker').value;
715
+
716
+ if (!text) {
717
+ showAlertPopup('Digite o texto da mensagem', 'warning');
718
+ return;
719
+ }
720
+
721
+ if (editingQuickMessageIndex !== null) {
722
+ // Update existing message
723
+ quickMessages[editingQuickMessageIndex] = { text, color };
724
+ } else {
725
+ // Add new message
726
+ quickMessages.push({ text, color });
727
+ }
728
+
729
+ saveQuickMessages();
730
+ renderQuickMessages();
731
+ closeEditQuickMessageModal();
732
+ showAlertPopup('Mensagem rápida salva com sucesso!', 'success');
733
+ }
734
+
735
+ // Delete quick message
736
+ function deleteQuickMessage() {
737
+ if (editingQuickMessageIndex !== null) {
738
+ quickMessages.splice(editingQuickMessageIndex, 1);
739
+ saveQuickMessages();
740
+ renderQuickMessages();
741
+ closeEditQuickMessageModal();
742
+ showAlertPopup('Mensagem rápida excluída', 'info');
743
+ }
744
+ }
745
+
746
+ // Close edit quick message modal
747
+ function closeEditQuickMessageModal() {
748
+ document.getElementById('editQuickMessageModal').classList.add('hidden');
749
+ }
750
+
751
+ // Send quick message to chat
752
+ function sendQuickMessage(text) {
753
+ if (!connectedPlatforms.length) {
754
+ showAlertPopup('Conecte pelo menos uma plataforma primeiro', 'warning');
755
+ return;
756
+ }
757
+
758
+ // Get selected platforms
759
+ const selectedPlatforms = connectedPlatforms.filter(platform => {
760
+ const checkbox = document.getElementById(`send-${platform}`);
761
+ return checkbox ? checkbox.checked : false;
762
+ });
763
+
764
+ if (selectedPlatforms.length === 0) {
765
+ showAlertPopup('Selecione pelo menos uma plataforma para enviar a mensagem', 'warning');
766
+ return;
767
+ }
768
+
769
+ // Simulate sending to each platform
770
+ selectedPlatforms.forEach(platform => {
771
+ addChatMessage('Você', text, platform);
772
+ });
773
+
774
+ showAlertPopup(`Mensagem enviada para ${selectedPlatforms.length} plataforma(s)`, 'success');
775
+ }
776
+
777
+ // Dark mode toggle
778
+ function toggleDarkMode() {
779
+ document.body.classList.toggle('light-mode');
780
+
781
+ // Toggle all dark background elements
782
+ document.querySelectorAll('.bg-dark-800, .bg-dark-700, .bg-dark-600').forEach(el => {
783
+ el.classList.toggle('bg-gray-200');
784
+ el.classList.toggle('bg-gray-300');
785
+ el.classList.toggle('bg-gray-400');
786
+ el.classList.toggle('bg-dark-800');
787
+ el.classList.toggle('bg-dark-700');
788
+ el.classList.toggle('bg-dark-600');
789
+ });
790
+
791
+ // Toggle all text colors
792
+ document.querySelectorAll('.text-gray-400').forEach(el => {
793
+ el.classList.toggle('text-gray-600');
794
+ el.classList.toggle('text-gray-400');
795
+ });
796
+
797
+ // Toggle border colors
798
+ document.querySelectorAll('.border-dark-600').forEach(el => {
799
+ el.classList.toggle('border-gray-300');
800
+ el.classList.toggle('border-dark-600');
801
+ });
802
+
803
+ // Toggle glass effect
804
+ document.querySelectorAll('.glass').forEach(el => {
805
+ el.classList.toggle('bg-opacity-70');
806
+ });
807
+
808
+ // Update dark mode toggle button icon
809
+ const darkModeToggle = document.querySelector('[onclick="toggleDarkMode()"]');
810
+ if (darkModeToggle) {
811
+ const icon = darkModeToggle.querySelector('i');
812
+ if (document.body.classList.contains('light-mode')) {
813
+ icon.classList.remove('fa-moon');
814
+ icon.classList.add('fa-sun');
815
+ } else {
816
+ icon.classList.remove('fa-sun');
817
+ icon.classList.add('fa-moon');
818
+ }
819
+ }
820
+ }
821
+
822
+ // Settings functions
823
+ function openSettings() {
824
+ document.getElementById('settingsOverlay').classList.remove('hidden');
825
+ document.getElementById('settingsPanel').classList.add('open');
826
+ }
827
+
828
+ function closeSettings() {
829
+ document.getElementById('settingsOverlay').classList.add('hidden');
830
+ document.getElementById('settingsPanel').classList.remove('open');
831
+ }
832
+
833
+ // Toggle sound
834
+ function toggleSound() {
835
+ soundEnabled = !soundEnabled;
836
+ const soundToggle = document.getElementById('soundToggle');
837
+ const soundToggleBtn = document.getElementById('soundToggleBtn');
838
+
839
+ if (soundEnabled) {
840
+ soundToggle.classList.add('active');
841
+ soundToggleBtn.innerHTML = '<i class="fas fa-volume-up"></i>';
842
+ } else {
843
+ soundToggle.classList.remove('active');
844
+ soundToggleBtn.innerHTML = '<i class="fas fa-volume-mute"></i>';
845
+ }
846
+ }
847
+
848
+ // Set sound volume
849
+ function setVolume(volume) {
850
+ soundVolume = volume;
851
+ messageSound.volume = volume;
852
+ }
853
+
854
+ // Play sound effect
855
+ function playSound() {
856
+ if (soundEnabled) {
857
+ messageSound.currentTime = 0;
858
+ messageSound.play();
859
+ }
860
+ }
861
+
862
+ // Auth modal functions
863
+ function openAuthModal() {
864
+ document.getElementById('authModal').classList.remove('hidden');
865
+ }
866
+
867
+ function closeAuthModal() {
868
+ document.getElementById('authModal').classList.add('hidden');
869
+ }
870
+
871
+ // Platform connection simulation
872
+ function connectPlatform(platform) {
873
+ if (connectedPlatforms.includes(platform)) return;
874
+
875
+ closeAuthModal();
876
+ connectedPlatforms.push(platform);
877
+
878
+ // Show success message
879
+ showAlertPopup(`${platform.charAt(0).toUpperCase() + platform.slice(1)} conectado com sucesso!`, 'success');
880
+
881
+ // Add platform tab
882
+ addPlatformTab(platform);
883
+
884
+ // Update stats
885
+ updatePlatformStats();
886
+
887
+ // Simulate incoming messages after a delay
888
+ setTimeout(() => {
889
+ simulateIncomingMessages(platform);
890
+ }, 2000);
891
+
892
+ // Add checkbox for this platform
893
+ addPlatformCheckbox(platform);
894
+
895
+ // If this is the first platform, activate the "All" tab
896
+ if (connectedPlatforms.length === 1) {
897
+ switchChatTab('all');
898
+ }
899
+ }
900
+
901
+ // Add platform tab
902
+ function addPlatformTab(platform) {
903
+ const tabsContainer = document.getElementById('chatTabs');
904
+
905
+ // Check if tab already exists
906
+ if (document.getElementById(`tab-${platform}`)) {
907
+ return;
908
+ }
909
+
910
+ // Create "All" tab if it doesn't exist and we have platforms
911
+ if (!document.getElementById('tab-all') && connectedPlatforms.length > 0) {
912
+ const allTab = document.createElement('button');
913
+ allTab.id = 'tab-all';
914
+ allTab.className = 'px-4 py-3 text-sm font-medium flex items-center';
915
+ allTab.innerHTML = `
916
+ <i class="fas fa-globe mr-2 text-blue-400"></i>
917
+ Todos
918
+ <span class="ml-2 bg-dark-700 text-gray-200 text-xs px-2 py-1 rounded-full">0</span>
919
+ `;
920
+ allTab.onclick = () => switchChatTab('all');
921
+ tabsContainer.prepend(allTab);
922
+ }
923
+
924
+ // Create platform tab
925
+ const tab = document.createElement('button');
926
+ tab.id = `tab-${platform}`;
927
+ tab.className = 'px-4 py-3 text-sm font-medium flex items-center';
928
+ tab.innerHTML = `
929
+ ${getPlatformIcon(platform)}
930
+ ${platform.charAt(0).toUpperCase() + platform.slice(1)}
931
+ <span class="ml-2 bg-dark-700 text-gray-200 text-xs px-2 py-1 rounded-full">0</span>
932
+ `;
933
+ tab.onclick = () => switchChatTab(platform);
934
+ tabsContainer.appendChild(tab);
935
+ }
936
+
937
+ // Add platform checkbox for message sending
938
+ function addPlatformCheckbox(platform) {
939
+ const container = document.getElementById('platformCheckboxes');
940
+
941
+ const checkboxDiv = document.createElement('div');
942
+ checkboxDiv.className = 'flex items-center';
943
+ checkboxDiv.innerHTML = `
944
+ <input type="checkbox" id="send-${platform}" checked
945
+ class="rounded border-dark-600 text-[var(--primary)] focus:ring-[var(--primary)] mr-2 bg-dark-700">
946
+ <label for="send-${platform}" class="flex items-center text-sm">
947
+ ${getPlatformIcon(platform)}
948
+ ${platform.charAt(0).toUpperCase() + platform.slice(1)}
949
+ </label>
950
+ `;
951
+ container.appendChild(checkboxDiv);
952
+ }
953
+
954
+ // Get platform icon with minimalist style
955
+ function getPlatformIcon(platform) {
956
+ switch(platform) {
957
+ case 'twitch':
958
+ return '<div class="platform-icon twitch"><i class="fab fa-twitch text-xs"></i></div>';
959
+ case 'youtube':
960
+ return '<div class="platform-icon youtube"><i class="fab fa-youtube text-xs"></i></div>';
961
+ case 'tiktok':
962
+ return '<div class="platform-icon tiktok"><i class="fab fa-tiktok text-xs"></i></div>';
963
+ case 'trovo':
964
+ return '<div class="platform-icon trovo"><span class="text-xs font-bold">T</span></div>';
965
+ case 'kick':
966
+ return '<div class="platform-icon kick"><span class="text-xs">KICK</span></div>';
967
+ default:
968
+ return '<div class="platform-icon"><i class="fas fa-globe text-xs"></i></div>';
969
+ }
970
+ }
971
+
972
+ // Switch chat tab
973
+ function switchChatTab(platform) {
974
+ const tabs = document.getElementById('chatTabs').children;
975
+
976
+ // Update active tab styling
977
+ for (let tab of tabs) {
978
+ tab.classList.remove('text-[var(--primary)]', 'border-b-2', 'border-[var(--primary)]');
979
+ }
980
+
981
+ const activeTabElement = document.getElementById(`tab-${platform}`);
982
+ activeTabElement.classList.add('text-[var(--primary)]', 'border-b-2', 'border-[var(--primary)]');
983
+
984
+ activeTab = platform;
985
+
986
+ // Update chat display
987
+ updateChatDisplay();
988
+
989
+ // Show/hide input based on tab
990
+ const chatInput = document.getElementById('chatInputContainer');
991
+ if (platform === 'all') {
992
+ chatInput.classList.remove('hidden');
993
+ } else {
994
+ chatInput.classList.add('hidden');
995
+ }
996
+ }
997
+
998
+ // Update chat display based on active tab
999
+ function updateChatDisplay() {
1000
+ const chatDisplay = document.getElementById('chatDisplay');
1001
+
1002
+ if (activeTab === 'all') {
1003
+ // Show all messages from all platforms
1004
+ if (allMessages.length === 0) {
1005
+ chatDisplay.innerHTML = `
1006
+ <div class="text-center text-[var(--text-secondary)] py-10">
1007
+ <i class="fas fa-comments text-4xl mb-2"></i>
1008
+ <p>Nenhuma mensagem ainda</p>
1009
+ </div>
1010
+ `;
1011
+ return;
1012
+ }
1013
+
1014
+ chatDisplay.innerHTML = '';
1015
+ allMessages.forEach(msg => {
1016
+ addMessageToDisplay(msg.user, msg.text, msg.platform, false);
1017
+ });
1018
+ } else {
1019
+ // Show messages only from the selected platform
1020
+ const platformMessages = allMessages.filter(msg => msg.platform === activeTab);
1021
+
1022
+ if (platformMessages.length === 0) {
1023
+ chatDisplay.innerHTML = `
1024
+ <div class="text-center text-[var(--text-secondary)] py-10">
1025
+ <i class="fas fa-comments text-4xl mb-2"></i>
1026
+ <p>Nenhuma mensagem no chat ${activeTab}</p>
1027
+ </div>
1028
+ `;
1029
+ return;
1030
+ }
1031
+
1032
+ chatDisplay.innerHTML = '';
1033
+ platformMessages.forEach(msg => {
1034
+ addMessageToDisplay(msg.user, msg.text, msg.platform, false);
1035
+ });
1036
+ }
1037
+
1038
+ chatDisplay.scrollTop = chatDisplay.scrollHeight;
1039
+ }
1040
+
1041
+ // Add message to chat display
1042
+ function addMessageToDisplay(user, message, platform, isNew = true) {
1043
+ const chatDisplay = document.getElementById('chatDisplay');
1044
+
1045
+ // If default message is shown, clear it
1046
+ if (chatDisplay.querySelector('.fa-comment-slash') || chatDisplay.querySelector('.fa-comments')) {
1047
+ chatDisplay.innerHTML = '';
1048
+ }
1049
+
1050
+ const messageElement = document.createElement('div');
1051
+ messageElement.className = `mb-4 ${isNew ? 'new-message' : ''}`;
1052
+ messageElement.innerHTML = `
1053
+ <div class="flex">
1054
+ <div class="flex-shrink-0 mr-3">
1055
+ ${getPlatformIcon(platform)}
1056
+ </div>
1057
+ <div>
1058
+ <div class="flex items-baseline">
1059
+ <span class="font-bold ${getPlatformTextColor(platform)} mr-2">${user}</span>
1060
+ <span class="text-xs text-[var(--text-secondary)]">agora mesmo</span>
1061
+ </div>
1062
+ <p class="mt-1">${message}</p>
1063
+ </div>
1064
+ </div>
1065
+ `;
1066
+
1067
+ chatDisplay.appendChild(messageElement);
1068
+
1069
+ if (isNew) {
1070
+ chatDisplay.scrollTop = chatDisplay.scrollHeight;
1071
+ playSound(); // Play sound for new messages
1072
+ }
1073
+ }
1074
+
1075
+ // Get platform text color
1076
+ function getPlatformTextColor(platform) {
1077
+ switch(platform) {
1078
+ case 'twitch': return 'text-[#9147ff]';
1079
+ case 'youtube': return 'text-[#ff0000]';
1080
+ case 'tiktok': return 'text-black dark:text-white';
1081
+ case 'trovo': return 'text-[#37d87b]';
1082
+ case 'kick': return 'text-[#53fc18]';
1083
+ default: return 'text-[var(--primary)]';
1084
+ }
1085
+ }
1086
+
1087
+ // Update platform stats
1088
+ function updatePlatformStats() {
1089
+ const statsContainer = document.getElementById('platformStats');
1090
+
1091
+ // Simulated data - in a real app, this would come from APIs
1092
+ const statsData = [
1093
+ { platform: 'twitch', viewers: 125, followers: 42, messages: 87 },
1094
+ { platform: 'youtube', viewers: 89, followers: 23, messages: 45 },
1095
+ { platform: 'tiktok', viewers: 210, followers: 65, messages: 120 },
1096
+ { platform: 'trovo', viewers: 56, followers: 18, messages: 32 },
1097
+ { platform: 'kick', viewers: 78, followers: 29, messages: 64 }
1098
+ ].filter(stat => connectedPlatforms.includes(stat.platform));
1099
+
1100
+ let html = '';
1101
+
1102
+ statsData.forEach(stat => {
1103
+ html += `
1104
+ <div class="bg-dark-700 rounded-lg p-4">
1105
+ <div class="flex items-center justify-between mb-2">
1106
+ <div class="flex items-center">
1107
+ ${getPlatformIcon(stat.platform)}
1108
+ <span class="font-medium ${getPlatformTextColor(stat.platform)}">${stat.platform.charAt(0).toUpperCase() + stat.platform.slice(1)}</span>
1109
+ </div>
1110
+ <span class="text-sm ${stat.viewers > 0 ? 'text-green-400' : 'text-[var(--text-secondary)]'}">
1111
+ ${stat.viewers > 0 ? 'AO VIVO' : 'OFFLINE'}
1112
+ </span>
1113
+ </div>
1114
+
1115
+ <div class="grid grid-cols-3 gap-2 text-center text-xs mt-3">
1116
+ <div class="bg-dark-800 rounded p-2">
1117
+ <div class="text-[var(--text-secondary)]">Viewers</div>
1118
+ <div class="font-bold">${stat.viewers}</div>
1119
+ </div>
1120
+ <div class="bg-dark-800 rounded p-2">
1121
+ <div class="text-[var(--text-secondary)]">Seguidores</div>
1122
+ <div class="font-bold">${stat.followers}</div>
1123
+ </div>
1124
+ <div class="bg-dark-800 rounded p-2">
1125
+ <div class="text-[var(--text-secondary)]">Mensagens</div>
1126
+ <div class="font-bold">${stat.messages}</div>
1127
+ </div>
1128
+ </div>
1129
+ </div>
1130
+ `;
1131
+ });
1132
+
1133
+ statsContainer.innerHTML = html;
1134
+
1135
+ // Update total stats
1136
+ const totalViewers = statsData.reduce((sum, stat) => sum + stat.viewers, 0);
1137
+ const totalMessages = statsData.reduce((sum, stat) => sum + stat.messages, 0);
1138
+ const totalFollowers = statsData.reduce((sum, stat) sum + stat.followers, 0);
1139
+
1140
+ document.getElementById('totalViewers').textContent = totalViewers;
1141
+ document.getElementById('totalMessages').textContent = totalMessages;
1142
+ document.getElementById('totalFollowers').textContent = totalFollowers;
1143
+ }
1144
+
1145
+ // Show alert popup
1146
+ function showAlertPopup(message, type = 'info') {
1147
+ const popupsContainer = document.getElementById('alertPopups');
1148
+
1149
+ let bgColor = 'bg-dark-800';
1150
+ let icon = 'fas fa-info-circle';
1151
+
1152
+ switch(type) {
1153
+ case 'success':
1154
+ bgColor = 'bg-green-600';
1155
+ icon = 'fas fa-check-circle';
1156
+ break;
1157
+ case 'warning':
1158
+ bgColor = 'bg-yellow-600';
1159
+ icon = 'fas fa-exclamation-triangle';
1160
+ break;
1161
+ case 'error':
1162
+ bgColor = 'bg-red-600';
1163
+ icon = 'fas fa-times-circle';
1164
+ break;
1165
+ case 'donation':
1166
+ bgColor = 'bg-purple-600';
1167
+ icon = 'fas fa-money-bill-wave';
1168
+ break;
1169
+ }
1170
+
1171
+ const popup = document.createElement('div');
1172
+ popup.className = `alert-popup ${bgColor} text-white rounded-lg p-4 shadow-xl flex items-start glass`;
1173
+ popup.innerHTML = `
1174
+ <i class="${icon} text-xl mr-3 mt-1"></i>
1175
+ <div>
1176
+ <p class="font-medium">${message}</p>
1177
+ </div>
1178
+ `;
1179
+
1180
+ popupsContainer.appendChild(popup);
1181
+
1182
+ // Play sound for alerts
1183
+ if (type !== 'info') {
1184
+ playSound();
1185
+ }
1186
+
1187
+ // Remove after animation
1188
+ setTimeout(() => {
1189
+ popup.remove();
1190
+ }, 4500);
1191
+ }
1192
+
1193
+ // Simulate incoming messages
1194
+ function simulateIncomingMessages(platform) {
1195
+ if (!connectedPlatforms.includes(platform)) return;
1196
+
1197
+ const messages = [
1198
+ { user: 'GameFan123', text: 'Ótima stream hoje!', platform },
1199
+ { user: 'StreamLover', text: 'Quando você vai jogar esse novo jogo?', platform },
1200
+ { user: 'ViewerPro', text: 'Alguém mais está tendo problemas com o áudio?', platform },
1201
+ { user: 'ChatMaster', text: 'Oi gente! Cheguei agora na stream', platform },
1202
+ { user: 'Moderador', text: 'Lembrem-se das regras do chat, pessoal!', platform }
1203
+ ];
1204
+
1205
+ const randomMessage = messages[Math.floor(Math.random() * messages.length)];
1206
+ addChatMessage(randomMessage.user, randomMessage.text, platform);
1207
+
1208
+ // Also add to alerts occasionally
1209
+ if (Math.random() > 0.7) {
1210
+ const alertTypes = ['follow', 'subscription', 'donation', 'bits'];
1211
+ const randomAlert = alertTypes[Math.floor(Math.random() * alertTypes.length)];
1212
+
1213
+ let alertMessage = '';
1214
+ let alertType = 'info';
1215
+
1216
+ switch(randomAlert) {
1217
+ case 'follow':
1218
+ alertMessage = `${randomMessage.user} começou a seguir você no ${platform}!`;
1219
+ alertType = 'success';
1220
+ incrementCounter('totalFollowers');
1221
+ break;
1222
+ case 'subscription':
1223
+ alertMessage = `${randomMessage.user} se inscreveu no seu canal do ${platform}!`;
1224
+ alertType = 'success';
1225
+ break;
1226
+ case 'donation':
1227
+ const amount = (Math.random() * 50 + 5).toFixed(2);
1228
+ alertMessage = `${randomMessage.user} doou R$ ${amount} via ${platform}!`;
1229
+ alertType = 'donation';
1230
+ incrementDonationCounter(amount);
1231
+ break;
1232
+ case 'bits':
1233
+ const bits = Math.floor(Math.random() * 500 + 100);
1234
+ alertMessage = `${randomMessage.user} enviou ${bits} bits no ${platform}!`;
1235
+ alertType = 'donation';
1236
+ break;
1237
+ }
1238
+
1239
+ addAlert(alertMessage, randomAlert);
1240
+ showAlertPopup(alertMessage, alertType);
1241
+ }
1242
+
1243
+ // Schedule next message
1244
+ setTimeout(() => {
1245
+ simulateIncomingMessages(platform);
1246
+ }, Math.random() * 5000 + 2000);
1247
+ }
1248
+
1249
+ // Add chat message
1250
+ function addChatMessage(user, message, platform) {
1251
+ // Add to all messages array
1252
+ const msgObj = { user, text: message, platform, timestamp: new Date() };
1253
+ allMessages.push(msgObj);
1254
+
1255
+ // Update message counter
1256
+ incrementCounter('totalMessages');
1257
+
1258
+ // Update platform tab counter
1259
+ updateTabCounter(platform);
1260
+
1261
+ // Update "All" tab counter
1262
+ updateTabCounter('all');
1263
+
1264
+ // Add to display if the tab is active
1265
+ if (activeTab === 'all' || activeTab === platform) {
1266
+ addMessageToDisplay(user, message, platform);
1267
+ }
1268
+ }
1269
+
1270
+ // Update tab counter
1271
+ function updateTabCounter(platform) {
1272
+ const tab = document.getElementById(`tab-${platform}`);
1273
+ if (tab) {
1274
+ const counter = tab.querySelector('span');
1275
+ if (counter) {
1276
+ if (platform === 'all') {
1277
+ counter.textContent = allMessages.length;
1278
+ } else {
1279
+ const platformMessages = allMessages.filter(msg => msg.platform === platform).length;
1280
+ counter.textContent = platformMessages;
1281
+ }
1282
+ }
1283
+ }
1284
+ }
1285
+
1286
+ // Add alert
1287
+ function addAlert(message, type) {
1288
+ const alertsContainer = document.getElementById('alertsContainer');
1289
+
1290
+ // If default message is shown, clear it
1291
+ if (alertsContainer.querySelector('.fa-bell-slash')) {
1292
+ alertsContainer.innerHTML = '';
1293
+ }
1294
+
1295
+ let icon = 'fas fa-bell';
1296
+ let bgColor = 'bg-dark-700';
1297
+
1298
+ switch(type) {
1299
+ case 'follow':
1300
+ icon = 'fas fa-user-plus';
1301
+ bgColor = 'bg-green-700';
1302
+ break;
1303
+ case 'subscription':
1304
+ icon = 'fas fa-star';
1305
+ bgColor = 'bg-purple-700';
1306
+ break;
1307
+ case 'donation':
1308
+ icon = 'fas fa-money-bill-wave';
1309
+ bgColor = 'bg-yellow-600';
1310
+ break;
1311
+ case 'bits':
1312
+ icon = 'fas fa-gem';
1313
+ bgColor = 'bg-blue-600';
1314
+ break;
1315
+ }
1316
+
1317
+ const alertElement = document.createElement('div');
1318
+ alertElement.className = `flex items-start p-3 rounded-lg ${bgColor} animate-pulse glass`;
1319
+ alertElement.innerHTML = `
1320
+ <i class="${icon} text-lg mt-1 mr-3"></i>
1321
+ <div class="flex-1">
1322
+ <p class="text-sm">${message}</p>
1323
+ <p class="text-xs text-[var(--text-secondary)] mt-1">${new Date().toLocaleTimeString()}</p>
1324
+ </div>
1325
+ <button class="text-[var(--text-secondary)] hover:text-white ml-2">
1326
+ <i class="fas fa-times"></i>
1327
+ </button>
1328
+ `;
1329
+
1330
+ alertsContainer.appendChild(alertElement);
1331
+
1332
+ // Auto-remove after some time
1333
+ setTimeout(() => {
1334
+ alertElement.classList.remove('animate-pulse');
1335
+ alertElement.classList.add('opacity-70');
1336
+ }, 3000);
1337
+ }
1338
+
1339
+ // Increment counter
1340
+ function incrementCounter(counterId) {
1341
+ const counter = document.getElementById(counterId);
1342
+ if (counter) {
1343
+ const currentValue = parseInt(counter.textContent.replace(/\D/g, '')) || 0;
1344
+ counter.textContent = counterId === 'totalDonations'
1345
+ ? `R$ ${(currentValue + 1).toFixed(2)}`
1346
+ : currentValue + 1;
1347
+ }
1348
+ }
1349
+
1350
+ // Increment donation counter
1351
+ function incrementDonationCounter(amount) {
1352
+ const counter = document.getElementById('totalDonations');
1353
+ if (counter) {
1354
+ const currentValue = parseFloat(counter.textContent.replace(/[^\d.,]/g, '').replace(',', '.')) || 0;
1355
+ const newAmount = currentValue + parseFloat(amount);
1356
+ counter.textContent = `R$ ${newAmount.toFixed(2).replace('.', ',')}`;
1357
+ }
1358
+ }
1359
+
1360
+ // Send message to all selected platforms
1361
+ function sendMessageToAll() {
1362
+ const input = document.getElementById('chatInput');
1363
+ const message = input.value.trim();
1364
+
1365
+ if (!message) return;
1366
+
1367
+ // Get selected platforms
1368
+ const selectedPlatforms = connectedPlatforms.filter(platform => {
1369
+ const checkbox = document.getElementById(`send-${platform}`);
1370
+ return checkbox ? checkbox.checked : false;
1371
+ });
1372
+
1373
+ if (selectedPlatforms.length === 0) {
1374
+ showAlertPopup('Selecione pelo menos uma plataforma para enviar a mensagem', 'warning');
1375
+ return;
1376
+ }
1377
+
1378
+ // Simulate sending to each platform
1379
+ selectedPlatforms.forEach(platform => {
1380
+ // In a real app, this would call the platform's API to send the message
1381
+ addChatMessage('Você', message, platform);
1382
+ });
1383
+
1384
+ // Clear input
1385
+ input.value = '';
1386
+
1387
+ // Show success message
1388
+ showAlertPopup(`Mensagem enviada para ${selectedPlatforms.length} plataforma(s)`, 'success');
1389
+ }
1390
+
1391
+ // Initialize with some platforms for demo
1392
+ window.onload = function() {
1393
+ // Load quick messages
1394
+ loadQuickMessages();
1395
+
1396
+ // Set up volume control
1397
+ const volumeControl = document.getElementById('volumeControl');
1398
+ if (volumeControl) {
1399
+ volumeControl.addEventListener('input', function() {
1400
+ setVolume(this.value);
1401
+ });
1402
+ }
1403
+
1404
+ // Set up sound toggle button
1405
+ const soundToggleBtn = document.getElementById('soundToggleBtn');
1406
+ if (soundToggleBtn) {
1407
+ soundToggleBtn.addEventListener('click', toggleSound);
1408
+ }
1409
+
1410
+ // Simulate already connected platforms
1411
+ ['twitch', 'youtube', 'kick'].forEach(platform => {
1412
+ connectedPlatforms.push(platform);
1413
+ addPlatformTab(platform);
1414
+ addPlatformCheckbox(platform);
1415
+ });
1416
+
1417
+ // Add "All" tab
1418
+ const tabsContainer = document.getElementById('chatTabs');
1419
+ const allTab = document.createElement('button');
1420
+ allTab.id = 'tab-all';
1421
+ allTab.className = 'px-4 py-3 text-sm font-medium flex items-center';
1422
+ allTab.innerHTML = `
1423
+ <i class="fas fa-globe mr-2 text-blue-400"></i>
1424
+ Todos
1425
+ <span class="ml-2 bg-dark-700 text-gray-200 text-xs px-2 py-1 rounded-full">0</span>
1426
+ `;
1427
+ allTab.onclick = () => switchChatTab('all');
1428
+ tabsContainer.appendChild(allTab);
1429
+
1430
+ // Set "All" tab as active
1431
+ switchChatTab('all');
1432
+
1433
+ // Show chat input
1434
+ document.getElementById('chatInputContainer').classList.remove('hidden');
1435
+
1436
+ // Load stats
1437
+ updatePlatformStats();
1438
+
1439
+ // Simulate some initial alerts
1440
+ setTimeout(() => {
1441
+ addAlert('StreamLover se inscreveu no seu canal!', 'subscription');
1442
+ showAlertPopup('StreamLover se inscreveu no seu canal!', 'success');
1443
+
1444
+ setTimeout(() => {
1445
+ addAlert('GameFan123 doou R$ 15,00!', 'donation');
1446
+ showAlertPopup('GameFan123 doou R$ 15,00!', 'donation');
1447
+ incrementDonationCounter('15.00');
1448
+ }, 1500);
1449
+ }, 1000);
1450
+
1451
+ // Start simulating incoming messages
1452
+ connectedPlatforms.forEach(platform => {
1453
+ setTimeout(() => {
1454
+ simulateIncomingMessages(platform);
1455
+ }, 2000);
1456
+ });
1457
+ };
1458
+ </script>
1459
+ <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=lestatplays/chatstream" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1460
+ </html>
prompts.txt ADDED
File without changes