Spaces:
Running

File size: 27,676 Bytes
0ddfe6e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Arbitrage Dashboard</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/luxon@3.0.1/build/global/luxon.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-luxon@1.2.0/dist/chartjs-adapter-luxon.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.0.0"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .gradient-bg {
            background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
        }
        .card-shadow {
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
        .calendar-day {
            transition: all 0.2s ease;
        }
        .calendar-day:hover {
            transform: scale(1.05);
            background-color: #3b82f6 !important;
            color: white !important;
        }
        .profit-badge {
            animation: pulse 2s infinite;
        }
        @keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
            }
            70% {
                box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
            }
        }
    </style>
</head>
<body class="bg-gray-50 font-sans">
    <div class="min-h-screen flex flex-col">
        <!-- Header -->
        <header class="gradient-bg text-white">
            <div class="container mx-auto px-4 py-6">
                <div class="flex justify-between items-center">
                    <div class="flex items-center space-x-4">
                        <div class="w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center">
                            <i class="fas fa-chart-line text-xl"></i>
                        </div>
                        <h1 class="text-2xl font-bold">ArbitragePro</h1>
                    </div>
                    <div class="flex items-center space-x-6">
                        <div class="relative">
                            <i class="fas fa-bell text-xl cursor-pointer"></i>
                            <span class="absolute -top-1 -right-1 w-4 h-4 bg-red-500 rounded-full text-xs flex items-center justify-center">3</span>
                        </div>
                        <div class="flex items-center space-x-2">
                            <div class="w-8 h-8 rounded-full bg-blue-300"></div>
                            <span class="font-medium">Admin</span>
                        </div>
                    </div>
                </div>
            </div>
        </header>

        <!-- Main Content -->
        <main class="flex-grow container mx-auto px-4 py-8">
            <!-- Dashboard Header -->
            <div class="mb-8">
                <div class="flex flex-col md:flex-row justify-between items-start md:items-center">
                    <div>
                        <h2 class="text-3xl font-bold text-gray-800">Arbitrage Dashboard</h2>
                        <p class="text-gray-600">Monitor your betting performance and allocations</p>
                    </div>
                    <div class="mt-4 md:mt-0 flex items-center space-x-3">
                        <div class="px-4 py-2 bg-green-100 rounded-full flex items-center">
                            <span class="w-2 h-2 bg-green-500 rounded-full mr-2"></span>
                            <span class="text-green-800 font-medium">Live</span>
                        </div>
                        <div class="relative">
                            <select class="appearance-none bg-white border border-gray-300 rounded-lg px-4 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-blue-500">
                                <option>Last 7 Days</option>
                                <option>Last 30 Days</option>
                                <option>This Month</option>
                                <option selected>Custom Range</option>
                            </select>
                            <i class="fas fa-chevron-down absolute right-3 top-3 text-gray-400 pointer-events-none"></i>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Stats Cards -->
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
                <div class="bg-white rounded-xl p-6 card-shadow">
                    <div class="flex justify-between items-start">
                        <div>
                            <p class="text-gray-500">Total Balance</p>
                            <h3 class="text-2xl font-bold mt-1">$24,589</h3>
                            <p class="text-green-500 text-sm mt-2 flex items-center">
                                <i class="fas fa-arrow-up mr-1"></i> 12.5% from last week
                            </p>
                        </div>
                        <div class="p-3 rounded-lg bg-blue-50 text-blue-600">
                            <i class="fas fa-wallet text-xl"></i>
                        </div>
                    </div>
                </div>

                <div class="bg-white rounded-xl p-6 card-shadow">
                    <div class="flex justify-between items-start">
                        <div>
                            <p class="text-gray-500">ROI Today</p>
                            <h3 class="text-2xl font-bold mt-1">3.8%</h3>
                            <p class="text-green-500 text-sm mt-2 flex items-center">
                                <i class="fas fa-arrow-up mr-1"></i> 0.4% from yesterday
                            </p>
                        </div>
                        <div class="p-3 rounded-lg bg-green-50 text-green-600">
                            <i class="fas fa-chart-pie text-xl"></i>
                        </div>
                    </div>
                </div>

                <div class="bg-white rounded-xl p-6 card-shadow">
                    <div class="flex justify-between items-start">
                        <div>
                            <p class="text-gray-500">Active Bets</p>
                            <h3 class="text-2xl font-bold mt-1">14</h3>
                            <p class="text-blue-500 text-sm mt-2 flex items-center">
                                <i class="fas fa-circle-notch fa-spin mr-1"></i> 3 new opportunities
                            </p>
                        </div>
                        <div class="p-3 rounded-lg bg-purple-50 text-purple-600">
                            <i class="fas fa-running text-xl"></i>
                        </div>
                    </div>
                </div>

                <div class="bg-white rounded-xl p-6 card-shadow">
                    <div class="flex justify-between items-start">
                        <div>
                            <p class="text-gray-500">Today's Profit</p>
                            <h3 class="text-2xl font-bold mt-1">$892</h3>
                            <p class="text-green-500 text-sm mt-2 flex items-center">
                                <span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs font-medium profit-badge">Best day this week</span>
                            </p>
                        </div>
                        <div class="p-3 rounded-lg bg-yellow-50 text-yellow-600">
                            <i class="fas fa-coins text-xl"></i>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Charts Section -->
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
                <!-- ROI Chart -->
                <div class="bg-white rounded-xl p-6 card-shadow lg:col-span-2">
                    <div class="flex justify-between items-center mb-6">
                        <h3 class="text-lg font-semibold text-gray-800">Return on Investment</h3>
                        <div class="flex space-x-2">
                            <button class="px-3 py-1 text-sm bg-blue-50 text-blue-600 rounded-lg">Daily</button>
                            <button class="px-3 py-1 text-sm text-gray-500 rounded-lg hover:bg-gray-100">Weekly</button>
                            <button class="px-3 py-1 text-sm text-gray-500 rounded-lg hover:bg-gray-100">Monthly</button>
                        </div>
                    </div>
                    <div class="h-80">
                        <canvas id="roiChart"></canvas>
                    </div>
                </div>

                <!-- Allocation Pie Chart -->
                <div class="bg-white rounded-xl p-6 card-shadow">
                    <div class="flex justify-between items-center mb-6">
                        <h3 class="text-lg font-semibold text-gray-800">Platform Allocation</h3>
                        <div class="text-blue-500 cursor-pointer">
                            <i class="fas fa-ellipsis-h"></i>
                        </div>
                    </div>
                    <div class="h-64 mb-4">
                        <canvas id="allocationChart"></canvas>
                    </div>
                    <div class="grid grid-cols-2 gap-4">
                        <div class="flex items-center">
                            <div class="w-3 h-3 bg-blue-500 rounded-full mr-2"></div>
                            <span class="text-sm text-gray-600">Bet365</span>
                        </div>
                        <div class="flex items-center">
                            <div class="w-3 h-3 bg-green-500 rounded-full mr-2"></div>
                            <span class="text-sm text-gray-600">Pinnacle</span>
                        </div>
                        <div class="flex items-center">
                            <div class="w-3 h-3 bg-yellow-500 rounded-full mr-2"></div>
                            <span class="text-sm text-gray-600">Betfair</span>
                        </div>
                        <div class="flex items-center">
                            <div class="w-3 h-3 bg-purple-500 rounded-full mr-2"></div>
                            <span class="text-sm text-gray-600">1xBet</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Calendar and Recent Bets -->
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
                <!-- Calendar -->
                <div class="bg-white rounded-xl p-6 card-shadow">
                    <div class="flex justify-between items-center mb-6">
                        <h3 class="text-lg font-semibold text-gray-800">Daily Balance</h3>
                        <div class="flex items-center space-x-2">
                            <button class="p-1 rounded-full hover:bg-gray-100">
                                <i class="fas fa-chevron-left text-gray-500"></i>
                            </button>
                            <span class="font-medium">June 2023</span>
                            <button class="p-1 rounded-full hover:bg-gray-100">
                                <i class="fas fa-chevron-right text-gray-500"></i>
                            </button>
                        </div>
                    </div>
                    <div class="mb-4">
                        <div class="grid grid-cols-7 gap-1 text-center text-sm text-gray-500 font-medium mb-2">
                            <div>Sun</div>
                            <div>Mon</div>
                            <div>Tue</div>
                            <div>Wed</div>
                            <div>Thu</div>
                            <div>Fri</div>
                            <div>Sat</div>
                        </div>
                        <div class="grid grid-cols-7 gap-1" id="calendarDays">
                            <!-- Calendar days will be inserted here by JavaScript -->
                        </div>
                    </div>
                    <div class="pt-4 border-t border-gray-100">
                        <h4 class="text-sm font-medium text-gray-500 mb-2">Today's Summary</h4>
                        <div class="flex justify-between items-center">
                            <div>
                                <p class="text-gray-500 text-sm">Profit/Loss</p>
                                <p class="text-green-500 font-medium">+$892</p>
                            </div>
                            <div>
                                <p class="text-gray-500 text-sm">Bets Placed</p>
                                <p class="font-medium">14</p>
                            </div>
                            <div>
                                <p class="text-gray-500 text-sm">ROI</p>
                                <p class="font-medium">3.8%</p>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Recent Bets -->
                <div class="bg-white rounded-xl p-6 card-shadow lg:col-span-2">
                    <div class="flex justify-between items-center mb-6">
                        <h3 class="text-lg font-semibold text-gray-800">Recent Arbitrage Opportunities</h3>
                        <button class="text-blue-500 text-sm font-medium">View All</button>
                    </div>
                    <div class="overflow-x-auto">
                        <table class="w-full">
                            <thead>
                                <tr class="text-left text-gray-500 text-sm border-b border-gray-100">
                                    <th class="pb-3 font-medium">Event</th>
                                    <th class="pb-3 font-medium">Bookmakers</th>
                                    <th class="pb-3 font-medium">Stake</th>
                                    <th class="pb-3 font-medium">Profit</th>
                                    <th class="pb-3 font-medium">ROI</th>
                                    <th class="pb-3 font-medium">Status</th>
                                </tr>
                            </thead>
                            <tbody class="divide-y divide-gray-100">
                                <tr>
                                    <td class="py-4">
                                        <p class="font-medium">Man Utd vs Arsenal</p>
                                        <p class="text-gray-500 text-sm">Premier League</p>
                                    </td>
                                    <td>
                                        <div class="flex -space-x-2">
                                            <div class="w-8 h-8 rounded-full bg-blue-500 border-2 border-white"></div>
                                            <div class="w-8 h-8 rounded-full bg-green-500 border-2 border-white"></div>
                                        </div>
                                    </td>
                                    <td class="font-medium">$1,200</td>
                                    <td class="text-green-500 font-medium">+$45.60</td>
                                    <td>3.8%</td>
                                    <td>
                                        <span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs font-medium">Won</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="py-4">
                                        <p class="font-medium">Nadal vs Djokovic</p>
                                        <p class="text-gray-500 text-sm">Wimbledon</p>
                                    </td>
                                    <td>
                                        <div class="flex -space-x-2">
                                            <div class="w-8 h-8 rounded-full bg-purple-500 border-2 border-white"></div>
                                            <div class="w-8 h-8 rounded-full bg-yellow-500 border-2 border-white"></div>
                                        </div>
                                    </td>
                                    <td class="font-medium">$850</td>
                                    <td class="text-green-500 font-medium">+$29.75</td>
                                    <td>3.5%</td>
                                    <td>
                                        <span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs font-medium">Won</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="py-4">
                                        <p class="font-medium">Warriors vs Lakers</p>
                                        <p class="text-gray-500 text-sm">NBA</p>
                                    </td>
                                    <td>
                                        <div class="flex -space-x-2">
                                            <div class="w-8 h-8 rounded-full bg-blue-500 border-2 border-white"></div>
                                            <div class="w-8 h-8 rounded-full bg-red-500 border-2 border-white"></div>
                                        </div>
                                    </td>
                                    <td class="font-medium">$1,500</td>
                                    <td class="text-gray-500 font-medium">Pending</td>
                                    <td>4.1%</td>
                                    <td>
                                        <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded-full text-xs font-medium">Live</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="py-4">
                                        <p class="font-medium">Ferrari vs Red Bull</p>
                                        <p class="text-gray-500 text-sm">F1 Spain GP</p>
                                    </td>
                                    <td>
                                        <div class="flex -space-x-2">
                                            <div class="w-8 h-8 rounded-full bg-green-500 border-2 border-white"></div>
                                            <div class="w-8 h-8 rounded-full bg-purple-500 border-2 border-white"></div>
                                        </div>
                                    </td>
                                    <td class="font-medium">$2,000</td>
                                    <td class="text-green-500 font-medium">+$82.00</td>
                                    <td>4.1%</td>
                                    <td>
                                        <span class="px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs font-medium">Won</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </main>

        <!-- Footer -->
        <footer class="bg-white border-t border-gray-200 py-6">
            <div class="container mx-auto px-4">
                <div class="flex flex-col md:flex-row justify-between items-center">
                    <p class="text-gray-500 text-sm mb-4 md:mb-0">© 2023 ArbitragePro. All rights reserved.</p>
                    <div class="flex space-x-6">
                        <a href="#" class="text-gray-500 hover:text-blue-500"><i class="fab fa-twitter"></i></a>
                        <a href="#" class="text-gray-500 hover:text-blue-700"><i class="fab fa-facebook"></i></a>
                        <a href="#" class="text-gray-500 hover:text-pink-500"><i class="fab fa-instagram"></i></a>
                        <a href="#" class="text-gray-500 hover:text-red-500"><i class="fab fa-youtube"></i></a>
                    </div>
                </div>
            </div>
        </footer>
    </div>

    <script>
        // ROI Chart
        const roiCtx = document.getElementById('roiChart').getContext('2d');
        const roiChart = new Chart(roiCtx, {
            type: 'line',
            data: {
                labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
                datasets: [{
                    label: 'ROI %',
                    data: [2.1, 2.8, 3.2, 2.9, 3.5, 3.8, 4.1],
                    borderColor: '#3b82f6',
                    backgroundColor: 'rgba(59, 130, 246, 0.05)',
                    borderWidth: 2,
                    fill: true,
                    tension: 0.4,
                    pointBackgroundColor: '#3b82f6',
                    pointRadius: 4,
                    pointHoverRadius: 6
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        display: false
                    },
                    tooltip: {
                        mode: 'index',
                        intersect: false,
                        backgroundColor: '#1f2937',
                        titleFont: {
                            size: 14,
                            weight: 'bold'
                        },
                        bodyFont: {
                            size: 12
                        },
                        padding: 12,
                        cornerRadius: 8,
                        displayColors: false,
                        callbacks: {
                            label: function(context) {
                                return 'ROI: ' + context.parsed.y + '%';
                            }
                        }
                    }
                },
                scales: {
                    y: {
                        beginAtZero: true,
                        grid: {
                            drawBorder: false,
                            color: 'rgba(0, 0, 0, 0.05)'
                        },
                        ticks: {
                            callback: function(value) {
                                return value + '%';
                            }
                        }
                    },
                    x: {
                        grid: {
                            display: false
                        }
                    }
                }
            }
        });

        // Allocation Pie Chart
        const allocationCtx = document.getElementById('allocationChart').getContext('2d');
        const allocationChart = new Chart(allocationCtx, {
            type: 'doughnut',
            data: {
                labels: ['Bet365', 'Pinnacle', 'Betfair', '1xBet'],
                datasets: [{
                    data: [35, 25, 20, 20],
                    backgroundColor: [
                        '#3b82f6',
                        '#10b981',
                        '#eab308',
                        '#8b5cf6'
                    ],
                    borderWidth: 0,
                    borderRadius: 4
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                cutout: '70%',
                plugins: {
                    legend: {
                        display: false
                    },
                    tooltip: {
                        backgroundColor: '#1f2937',
                        bodyFont: {
                            size: 12
                        },
                        padding: 12,
                        cornerRadius: 8,
                        callbacks: {
                            label: function(context) {
                                const label = context.label || '';
                                const value = context.raw || 0;
                                const total = context.dataset.data.reduce((a, b) => a + b, 0);
                                const percentage = Math.round((value / total) * 100);
                                return `${label}: $${value.toLocaleString()} (${percentage}%)`;
                            }
                        }
                    },
                    datalabels: {
                        display: false
                    }
                }
            }
        });

        // Calendar
        function generateCalendar() {
            const calendarDays = document.getElementById('calendarDays');
            const now = luxon.DateTime.now();
            const firstDay = now.startOf('month');
            const daysInMonth = now.daysInMonth;
            const startingDay = firstDay.weekday % 7; // 0 = Sunday, 1 = Monday, etc.
            
            // Clear previous calendar
            calendarDays.innerHTML = '';
            
            // Add empty cells for days before the first day of the month
            for (let i = 0; i < startingDay; i++) {
                calendarDays.innerHTML += '<div class="h-12"></div>';
            }
            
            // Add days of the month
            for (let i = 1; i <= daysInMonth; i++) {
                const isToday = i === now.day;
                const isPast = i < now.day;
                const isFuture = i > now.day;
                
                // Generate random profit/loss for demo purposes
                let profit = 0;
                if (isPast) {
                    profit = Math.floor(Math.random() * 1000) - 200;
                } else if (isToday) {
                    profit = 892;
                }
                
                const profitClass = profit > 0 ? 'text-green-500' : 'text-red-500';
                const bgClass = isToday ? 'bg-blue-100' : (isPast ? (profit > 0 ? 'bg-green-50' : (profit < 0 ? 'bg-red-50' : 'bg-gray-50')) : 'bg-white');
                
                calendarDays.innerHTML += `
                    <div class="h-12 flex flex-col items-center justify-center rounded-lg cursor-pointer calendar-day ${bgClass} ${isToday ? 'border border-blue-300' : ''}">
                        <span class="text-sm font-medium ${isToday ? 'text-blue-600' : (isFuture ? 'text-gray-400' : 'text-gray-700')}">${i}</span>
                        ${isPast ? `<span class="text-xs ${profitClass}">${profit > 0 ? '+' : ''}${profit !== 0 ? '$' + Math.abs(profit) : ''}</span>` : ''}
                    </div>
                `;
            }
        }
        
        // Initialize calendar
        generateCalendar();
    </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=BitRosc0e/dashboard" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>