File size: 30,207 Bytes
02c9bdf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Market Pulse Tracker</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #2563eb;
            --secondary: #1e40af;
            --dark: #1e293b;
            --light: #f8fafc;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --gray: #64748b;
            --gray-light: #e2e8f0;
            --bitcoin: #f7931a;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #f1f5f9;
            color: var(--dark);
            line-height: 1.6;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 0;
            margin-bottom: 30px;
            border-bottom: 1px solid var(--gray-light);
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo i {
            color: var(--primary);
            font-size: 28px;
        }

        .logo h1 {
            font-size: 24px;
            font-weight: 700;
            background: linear-gradient(to right, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .last-updated {
            color: var(--gray);
            font-size: 14px;
        }

        .refresh-btn {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 500;
            transition: all 0.2s;
        }

        .refresh-btn:hover {
            background-color: var(--secondary);
        }

        .dashboard {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .card {
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            padding: 20px;
            transition: transform 0.2s;
        }

        .card:hover {
            transform: translateY(-5px);
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .card-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--dark);
        }

        .card-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
        }

        .spx-icon {
            background-color: var(--primary);
        }

        .yield-icon {
            background-color: var(--success);
        }

        .energy-icon {
            background-color: var(--warning);
        }

        .bitcoin-icon {
            background-color: var(--bitcoin);
        }

        .sentiment-icon {
            background-color: var(--danger);
        }

        .card-value {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 5px;
        }

        .card-change {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 14px;
            font-weight: 500;
        }

        .positive {
            color: var(--success);
        }

        .negative {
            color: var(--danger);
        }

        .neutral {
            color: var(--gray);
        }

        .card-footer {
            margin-top: 15px;
            font-size: 13px;
            color: var(--gray);
        }

        .chart-container {
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            padding: 20px;
            margin-bottom: 30px;
        }

        .chart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .chart-title {
            font-size: 18px;
            font-weight: 600;
        }

        .chart-timeframe {
            display: flex;
            gap: 10px;
        }

        .timeframe-btn {
            padding: 6px 12px;
            border-radius: 6px;
            border: 1px solid var(--gray-light);
            background: none;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s;
        }

        .timeframe-btn.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .chart {
            height: 300px;
            width: 100%;
            position: relative;
        }

        .chart-placeholder {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--gray);
            font-size: 14px;
        }

        .yield-curve-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .yield-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
        }

        .yield-table th, .yield-table td {
            padding: 10px;
            text-align: left;
            border-bottom: 1px solid var(--gray-light);
        }

        .yield-table th {
            font-weight: 600;
            color: var(--gray);
            font-size: 14px;
        }

        .yield-table tr:last-child td {
            border-bottom: none;
        }

        .energy-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }

        .energy-item {
            background-color: var(--gray-light);
            padding: 15px;
            border-radius: 8px;
        }

        .energy-name {
            font-size: 14px;
            color: var(--gray);
            margin-bottom: 5px;
        }

        .energy-price {
            font-weight: 600;
            font-size: 18px;
        }

        .energy-change {
            font-size: 13px;
            margin-top: 3px;
        }

        /* Sentiment Gauge Styles */
        .sentiment-gauge {
            width: 100%;
            height: 120px;
            position: relative;
            margin-top: 20px;
        }

        .gauge-container {
            width: 100%;
            height: 40px;
            background: linear-gradient(to right, 
                var(--danger) 0%, 
                var(--danger) 20%, 
                var(--warning) 20%, 
                var(--warning) 50%, 
                var(--success) 50%, 
                var(--success) 80%, 
                var(--danger) 80%, 
                var(--danger) 100%);
            border-radius: 20px;
            position: relative;
            overflow: hidden;
        }

        .gauge-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
            font-size: 12px;
            color: var(--gray);
        }

        .gauge-needle {
            position: absolute;
            top: -10px;
            width: 4px;
            height: 60px;
            background-color: var(--dark);
            border-radius: 2px;
            transform-origin: bottom center;
            transition: all 1s ease-out;
            z-index: 2;
        }

        .gauge-needle::after {
            content: '';
            position: absolute;
            top: 0;
            left: -8px;
            width: 20px;
            height: 20px;
            background-color: var(--dark);
            border-radius: 50%;
        }

        .sentiment-value {
            text-align: center;
            margin-top: 15px;
            font-size: 18px;
            font-weight: 600;
        }

        .sentiment-description {
            text-align: center;
            margin-top: 5px;
            font-size: 14px;
            color: var(--gray);
        }

        /* Bitcoin specific styles */
        .bitcoin-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }

        .bitcoin-stat {
            background-color: var(--gray-light);
            padding: 15px;
            border-radius: 8px;
            text-align: center;
        }

        .bitcoin-stat-label {
            font-size: 12px;
            color: var(--gray);
            margin-bottom: 5px;
        }

        .bitcoin-stat-value {
            font-weight: 600;
            font-size: 16px;
        }

        footer {
            text-align: center;
            padding: 20px 0;
            color: var(--gray);
            font-size: 14px;
            border-top: 1px solid var(--gray-light);
            margin-top: 30px;
        }

        @media (max-width: 768px) {
            .dashboard {
                grid-template-columns: 1fr;
            }

            .yield-curve-container {
                grid-template-columns: 1fr;
            }

            header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <div class="logo">
                <i class="fas fa-chart-line"></i>
                <h1>Market Pulse</h1>
            </div>
            <div class="last-updated">
                Last updated: <span id="update-time">Loading...</span>
                <button class="refresh-btn" id="refresh-btn">
                    <i class="fas fa-sync-alt"></i> Refresh
                </button>
            </div>
        </header>

        <div class="dashboard">
            <div class="card">
                <div class="card-header">
                    <div class="card-title">S&P 500 (SPX)</div>
                    <div class="card-icon spx-icon">
                        <i class="fas fa-chart-bar"></i>
                    </div>
                </div>
                <div class="card-value" id="spx-value">4,890.23</div>
                <div class="card-change">
                    <span id="spx-change" class="positive">+12.34 (0.25%)</span>
                    <i class="fas fa-arrow-up"></i>
                </div>
                <div class="card-footer">
                    <div>52W High: 4,912.45</div>
                    <div>52W Low: 3,808.86</div>
                </div>
            </div>

            <div class="card">
                <div class="card-header">
                    <div class="card-title">10Y-2Y Yield Curve</div>
                    <div class="card-icon yield-icon">
                        <i class="fas fa-percentage"></i>
                    </div>
                </div>
                <div class="card-value" id="yield-spread">-0.35%</div>
                <div class="card-change">
                    <span id="yield-change" class="negative">-0.02%</span>
                    <i class="fas fa-arrow-down"></i>
                </div>
                <div class="card-footer">
                    <div>10Y Yield: 4.12%</div>
                    <div>2Y Yield: 4.47%</div>
                </div>
            </div>

            <div class="card">
                <div class="card-header">
                    <div class="card-title">Bitcoin (BTC)</div>
                    <div class="card-icon bitcoin-icon">
                        <i class="fab fa-bitcoin"></i>
                    </div>
                </div>
                <div class="card-value" id="btc-price">$42,890.23</div>
                <div class="card-change">
                    <span id="btc-change" class="positive">+1,234.56 (2.96%)</span>
                    <i class="fas fa-arrow-up"></i>
                </div>
                <div class="bitcoin-stats">
                    <div class="bitcoin-stat">
                        <div class="bitcoin-stat-label">24H High</div>
                        <div class="bitcoin-stat-value" id="btc-high">$43,120.45</div>
                    </div>
                    <div class="bitcoin-stat">
                        <div class="bitcoin-stat-label">24H Low</div>
                        <div class="bitcoin-stat-value" id="btc-low">$41,567.89</div>
                    </div>
                    <div class="bitcoin-stat">
                        <div class="bitcoin-stat-label">Volume (24H)</div>
                        <div class="bitcoin-stat-value" id="btc-volume">$28.4B</div>
                    </div>
                </div>
            </div>

            <div class="card">
                <div class="card-header">
                    <div class="card-title">Market Sentiment</div>
                    <div class="card-icon sentiment-icon">
                        <i class="fas fa-brain"></i>
                    </div>
                </div>
                <div class="sentiment-gauge">
                    <div class="gauge-container">
                        <div class="gauge-needle" id="sentiment-needle" style="left: 50%; transform: rotate(0deg);"></div>
                    </div>
                    <div class="gauge-labels">
                        <span>Extreme Fear</span>
                        <span>Fear</span>
                        <span>Neutral</span>
                        <span>Greed</span>
                        <span>Extreme Greed</span>
                    </div>
                    <div class="sentiment-value" id="sentiment-value">54 - Neutral</div>
                    <div class="sentiment-description">Based on volatility, market momentum, and social media</div>
                </div>
            </div>

            <div class="card">
                <div class="card-header">
                    <div class="card-title">Energy Markets</div>
                    <div class="card-icon energy-icon">
                        <i class="fas fa-bolt"></i>
                    </div>
                </div>
                <div class="card-value" id="oil-price">$78.45</div>
                <div class="card-change">
                    <span id="oil-change" class="positive">+1.23 (1.59%)</span>
                    <i class="fas fa-arrow-up"></i>
                </div>
                <div class="card-footer">
                    <div>Natural Gas: $2.68</div>
                    <div>Gasoline: $2.45</div>
                </div>
            </div>
        </div>

        <div class="chart-container">
            <div class="chart-header">
                <div class="chart-title">S&P 500 (SPX) Performance</div>
                <div class="chart-timeframe">
                    <button class="timeframe-btn active">1D</button>
                    <button class="timeframe-btn">1W</button>
                    <button class="timeframe-btn">1M</button>
                    <button class="timeframe-btn">1Y</button>
                </div>
            </div>
            <div class="chart">
                <div class="chart-placeholder">
                    <i class="fas fa-spinner fa-spin"></i> Loading chart data...
                </div>
                <!-- Chart will be rendered here by JavaScript -->
            </div>
        </div>

        <div class="yield-curve-container">
            <div class="chart-container">
                <div class="chart-header">
                    <div class="chart-title">Yield Curve</div>
                </div>
                <div class="chart">
                    <div class="chart-placeholder">
                        <i class="fas fa-spinner fa-spin"></i> Loading yield curve...
                    </div>
                </div>
            </div>

            <div class="chart-container">
                <div class="chart-header">
                    <div class="chart-title">Treasury Yields</div>
                </div>
                <table class="yield-table">
                    <thead>
                        <tr>
                            <th>Maturity</th>
                            <th>Yield</th>
                            <th>Change</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>1 Month</td>
                            <td>5.41%</td>
                            <td class="positive">+0.01</td>
                        </tr>
                        <tr>
                            <td>3 Month</td>
                            <td>5.23%</td>
                            <td class="positive">+0.02</td>
                        </tr>
                        <tr>
                            <td>6 Month</td>
                            <td>5.15%</td>
                            <td class="neutral">0.00</td>
                        </tr>
                        <tr>
                            <td>1 Year</td>
                            <td>4.89%</td>
                            <td class="negative">-0.03</td>
                        </tr>
                        <tr>
                            <td>2 Year</td>
                            <td>4.47%</td>
                            <td class="negative">-0.05</td>
                        </tr>
                        <tr>
                            <td>5 Year</td>
                            <td>4.21%</td>
                            <td class="negative">-0.04</td>
                        </tr>
                        <tr>
                            <td>10 Year</td>
                            <td>4.12%</td>
                            <td class="negative">-0.02</td>
                        </tr>
                        <tr>
                            <td>30 Year</td>
                            <td>4.32%</td>
                            <td class="neutral">0.00</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>

        <div class="chart-container">
            <div class="chart-header">
                <div class="chart-title">Bitcoin (BTC) Performance</div>
                <div class="chart-timeframe">
                    <button class="timeframe-btn active">1D</button>
                    <button class="timeframe-btn">1W</button>
                    <button class="timeframe-btn">1M</button>
                    <button class="timeframe-btn">1Y</button>
                </div>
            </div>
            <div class="chart">
                <div class="chart-placeholder">
                    <i class="fas fa-spinner fa-spin"></i> Loading Bitcoin chart...
                </div>
            </div>
        </div>

        <div class="chart-container">
            <div class="chart-header">
                <div class="chart-title">Energy Markets Overview</div>
            </div>
            <div class="energy-grid">
                <div class="energy-item">
                    <div class="energy-name">WTI Crude Oil</div>
                    <div class="energy-price">$78.45</div>
                    <div class="energy-change positive">+1.23 (1.59%)</div>
                </div>
                <div class="energy-item">
                    <div class="energy-name">Brent Crude</div>
                    <div class="energy-price">$82.67</div>
                    <div class="energy-change positive">+1.15 (1.41%)</div>
                </div>
                <div class="energy-item">
                    <div class="energy-name">Natural Gas</div>
                    <div class="energy-price">$2.68</div>
                    <div class="energy-change negative">-0.05 (1.83%)</div>
                </div>
                <div class="energy-item">
                    <div class="energy-name">Gasoline</div>
                    <div class="energy-price">$2.45</div>
                    <div class="energy-change positive">+0.03 (1.24%)</div>
                </div>
                <div class="energy-item">
                    <div class="energy-name">Heating Oil</div>
                    <div class="energy-price">$2.89</div>
                    <div class="energy-change positive">+0.07 (2.48%)</div>
                </div>
                <div class="energy-item">
                    <div class="energy-name">Uranium</div>
                    <div class="energy-price">$106.50</div>
                    <div class="energy-change positive">+2.50 (2.40%)</div>
                </div>
            </div>
        </div>

        <footer>
            <p>Market data is delayed by 15 minutes. Last updated: <span id="footer-time">Loading...</span></p>
            <p>© 2023 Market Pulse Tracker. All market data provided for informational purposes only.</p>
        </footer>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Update time display
            function updateTime() {
                const now = new Date();
                const timeString = now.toLocaleString('en-US', {
                    month: 'short',
                    day: 'numeric',
                    year: 'numeric',
                    hour: '2-digit',
                    minute: '2-digit',
                    second: '2-digit',
                    hour12: true
                });
                document.getElementById('update-time').textContent = timeString;
                document.getElementById('footer-time').textContent = timeString;
            }

            updateTime();
            setInterval(updateTime, 1000);

            // Simulate fetching market data
            function fetchMarketData() {
                // Simulate API delay
                setTimeout(() => {
                    // Generate random changes for demo purposes
                    const spxChange = (Math.random() * 20 - 10).toFixed(2);
                    const spxPercent = (Math.random() * 1 - 0.5).toFixed(2);
                    const spxValue = (4890.23 + parseFloat(spxChange)).toFixed(2);
                    
                    const yieldChange = (Math.random() * 0.1 - 0.05).toFixed(2);
                    const yieldSpread = (-0.35 + parseFloat(yieldChange)).toFixed(2);
                    
                    const oilChange = (Math.random() * 2 - 1).toFixed(2);
                    const oilPercent = (Math.random() * 3 - 1.5).toFixed(2);
                    const oilPrice = (78.45 + parseFloat(oilChange)).toFixed(2);
                    
                    // Bitcoin data
                    const btcChange = (Math.random() * 1500 - 750).toFixed(2);
                    const btcPercent = (Math.random() * 5 - 2.5).toFixed(2);
                    const btcPrice = (42890.23 + parseFloat(btcChange)).toFixed(2);
                    const btcHigh = (43120.45 + Math.random() * 500).toFixed(2);
                    const btcLow = (41567.89 - Math.random() * 500).toFixed(2);
                    const btcVolume = (28.4 + Math.random() * 5).toFixed(1);
                    
                    // Market sentiment (0-100 scale)
                    const sentiment = Math.floor(Math.random() * 100);
                    let sentimentText = '';
                    let sentimentClass = '';
                    
                    if (sentiment < 20) {
                        sentimentText = 'Extreme Fear';
                        sentimentClass = 'danger';
                    } else if (sentiment < 40) {
                        sentimentText = 'Fear';
                        sentimentClass = 'warning';
                    } else if (sentiment < 60) {
                        sentimentText = 'Neutral';
                        sentimentClass = 'gray';
                    } else if (sentiment < 80) {
                        sentimentText = 'Greed';
                        sentimentClass = 'success';
                    } else {
                        sentimentText = 'Extreme Greed';
                        sentimentClass = 'danger';
                    }
                    
                    // Calculate needle position (0-100% mapped to -45deg to 45deg rotation)
                    const needleRotation = (sentiment * 0.9) - 45;
                    
                    // Update SPX
                    document.getElementById('spx-value').textContent = spxValue;
                    const spxChangeElement = document.getElementById('spx-change');
                    spxChangeElement.textContent = `${spxChange >= 0 ? '+' : ''}${spxChange} (${spxPercent >= 0 ? '+' : ''}${spxPercent}%)`;
                    spxChangeElement.className = parseFloat(spxChange) >= 0 ? 'positive' : 'negative';
                    spxChangeElement.nextElementSibling.className = parseFloat(spxChange) >= 0 ? 'fas fa-arrow-up' : 'fas fa-arrow-down';
                    
                    // Update Yield Curve
                    document.getElementById('yield-spread').textContent = `${yieldSpread}%`;
                    const yieldChangeElement = document.getElementById('yield-change');
                    yieldChangeElement.textContent = `${yieldChange >= 0 ? '+' : ''}${yieldChange}%`;
                    yieldChangeElement.className = parseFloat(yieldChange) >= 0 ? 'positive' : 'negative';
                    yieldChangeElement.nextElementSibling.className = parseFloat(yieldChange) >= 0 ? 'fas fa-arrow-up' : 'fas fa-arrow-down';
                    
                    // Update Oil
                    document.getElementById('oil-price').textContent = `$${oilPrice}`;
                    const oilChangeElement = document.getElementById('oil-change');
                    oilChangeElement.textContent = `${oilChange >= 0 ? '+' : ''}${oilChange} (${oilPercent >= 0 ? '+' : ''}${oilPercent}%)`;
                    oilChangeElement.className = parseFloat(oilChange) >= 0 ? 'positive' : 'negative';
                    oilChangeElement.nextElementSibling.className = parseFloat(oilChange) >= 0 ? 'fas fa-arrow-up' : 'fas fa-arrow-down';
                    
                    // Update Bitcoin
                    document.getElementById('btc-price').textContent = `$${btcPrice}`;
                    const btcChangeElement = document.getElementById('btc-change');
                    btcChangeElement.textContent = `${btcChange >= 0 ? '+' : ''}${btcChange} (${btcPercent >= 0 ? '+' : ''}${btcPercent}%)`;
                    btcChangeElement.className = parseFloat(btcChange) >= 0 ? 'positive' : 'negative';
                    btcChangeElement.nextElementSibling.className = parseFloat(btcChange) >= 0 ? 'fas fa-arrow-up' : 'fas fa-arrow-down';
                    
                    document.getElementById('btc-high').textContent = `$${btcHigh}`;
                    document.getElementById('btc-low').textContent = `$${btcLow}`;
                    document.getElementById('btc-volume').textContent = `$${btcVolume}B`;
                    
                    // Update Market Sentiment
                    document.getElementById('sentiment-value').textContent = `${sentiment} - ${sentimentText}`;
                    document.getElementById('sentiment-value').className = `sentiment-value ${sentimentClass}`;
                    document.getElementById('sentiment-needle').style.transform = `rotate(${needleRotation}deg)`;
                    document.getElementById('sentiment-needle').style.left = `${sentiment}%`;
                    
                    // Update time
                    updateTime();
                }, 800);
            }

            // Initial data load
            fetchMarketData();
            
            // Refresh button
            document.getElementById('refresh-btn').addEventListener('click', fetchMarketData);
            
            // Timeframe buttons
            const timeframeButtons = document.querySelectorAll('.timeframe-btn');
            timeframeButtons.forEach(button => {
                button.addEventListener('click', function() {
                    timeframeButtons.forEach(btn => btn.classList.remove('active'));
                    this.classList.add('active');
                    // In a real app, this would fetch data for the selected timeframe
                });
            });
            
            // Simulate chart loading (in a real app, you would use a charting library)
            setTimeout(() => {
                const chartPlaceholders = document.querySelectorAll('.chart-placeholder');
                chartPlaceholders.forEach(placeholder => {
                    placeholder.innerHTML = '<div style="color: var(--gray); text-align: center; padding: 20px;">Chart visualization would appear here with real data.<br><small>In a production environment, this would connect to a charting library like Chart.js or Highcharts.</small></div>';
                });
            }, 1500);
        });
    </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 <a href="https://enzostvs-deepsite.hf.space" style="color: #fff;" target="_blank" >DeepSite</a> <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;"></p></body>
</html>