-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
2879 lines (2727 loc) · 201 KB
/
Copy pathindex.html
File metadata and controls
2879 lines (2727 loc) · 201 KB
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
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html class="dark" lang="en">
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta name="color-scheme" content="dark" />
<title>RanchiMall | AI Music Marketplace</title>
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
<link
href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;700;800&family=JetBrains+Mono:wght@500;700&display=swap"
rel="stylesheet" />
<link
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap"
rel="stylesheet" />
<link
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap"
rel="stylesheet" />
<script id="tailwind-config">
tailwind.config = {
darkMode: "class",
theme: {
extend: {
"colors": {
"surface-container-high": "#2a2a2a",
"surface-container-highest": "#353534",
"primary-fixed-dim": "#00dbe9",
"tertiary-fixed": "#ffd9e0",
"tertiary": "#fff3f4",
"on-surface": "#e5e2e1",
"on-secondary": "#480081",
"primary": "#dbfcff",
"error-container": "#93000a",
"on-secondary-container": "#dcb7ff",
"secondary-container": "#7701d0",
"error": "#ffb4ab",
"on-secondary-fixed-variant": "#6700b5",
"secondary-fixed": "#efdbff",
"secondary": "#dcb8ff",
"tertiary-container": "#ffccd6",
"surface-dim": "#131313",
"surface-container-lowest": "#0e0e0e",
"on-primary-fixed-variant": "#004f54",
"surface": "#131313",
"surface-container": "#201f1f",
"tertiary-fixed-dim": "#ffb1c3",
"on-primary-fixed": "#002022",
"outline": "#849495",
"on-error": "#690005",
"on-primary-container": "#006970",
"inverse-primary": "#006970",
"inverse-on-surface": "#313030",
"on-error-container": "#ffdad6",
"on-primary": "#00363a",
"secondary-fixed-dim": "#dcb8ff",
"outline-variant": "#3b494b",
"on-tertiary-fixed-variant": "#8f0041",
"on-tertiary-fixed": "#3f0019",
"surface-tint": "#00dbe9",
"primary-fixed": "#7df4ff",
"surface-container-low": "#1c1b1b",
"inverse-surface": "#e5e2e1",
"on-tertiary": "#66002c",
"on-surface-variant": "#b9cacb",
"surface-variant": "#353534",
"on-background": "#e5e2e1",
"on-secondary-fixed": "#2c0051",
"surface-bright": "#3a3939",
"primary-container": "#00f0ff",
"background": "#131313",
"on-tertiary-container": "#bb0058"
},
"borderRadius": {
"DEFAULT": "0.125rem",
"lg": "0.25rem",
"xl": "0.5rem",
"full": "0.75rem"
},
"spacing": {
"sm": "16px",
"margin-mobile": "16px",
"margin-desktop": "48px",
"base": "4px",
"gutter": "20px",
"md": "24px",
"xs": "8px",
"lg": "40px",
"xl": "64px"
},
"fontFamily": {
"label-caps": ["JetBrains Mono"],
"code-sm": ["JetBrains Mono"],
"display-lg-mobile": ["Plus Jakarta Sans"],
"body-base": ["Plus Jakarta Sans"],
"display-lg": ["Plus Jakarta Sans"],
"headline-md": ["Plus Jakarta Sans"]
},
"fontSize": {
"label-caps": ["11px", { "lineHeight": "1", "letterSpacing": "0.1em", "fontWeight": "700" }],
"code-sm": ["13px", { "lineHeight": "1.5", "letterSpacing": "0.05em", "fontWeight": "500" }],
"display-lg-mobile": ["32px", { "lineHeight": "1.2", "fontWeight": "800" }],
"body-base": ["16px", { "lineHeight": "1.6", "fontWeight": "400" }],
"display-lg": ["48px", { "lineHeight": "1.1", "letterSpacing": "-0.02em", "fontWeight": "800" }],
"headline-md": ["24px", { "lineHeight": "1.3", "fontWeight": "700" }]
}
},
},
}
</script>
<link href="style.css" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/npm/quill@2.0.2/dist/quill.snow.css" rel="stylesheet" />
<script id="floGlobals">
const floGlobals = {
blockchain: "FLO",
adminID: "FMyRTrz9CG4TFNM6rCQgy3VQ5NF23bY2xD",
application: "MusicMarketplace",
rmIncorporationId: "FKNW5eCCp2SnJMJ6pLLpUCvk5hAage8Jtk",
ribcId: "FDaX363r1ooANA9A2erhehhigNTnidq3o4",
certificateIssuerAddress: "FFCpiaZi31TpbYw5q5VNk8qJMeDiTLgsrE"
}
</script>
<script src="scripts/lib.js" defer></script>
<script src="scripts/floCrypto.js" defer></script>
<script src="scripts/floBlockchainAPI.js" defer></script>
<script src="scripts/compactIDB.js" defer></script>
<script src="scripts/floCloudAPI.js" defer></script>
<script src="scripts/floDapps.js" defer></script>
<script src="scripts/btcOperator.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/xrpl@2.7.0/build/xrpl-latest-min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tweetnacl@1.0.3/nacl.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-sha512@0.8.0/build/sha512.min.js"></script>
<script src="https://unpkg.com/tonweb/dist/tonweb.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tronweb@5.3.2/dist/TronWeb.js"></script>
<script src="https://unpkg.com/@polkadot/util@12.6.2/bundle-polkadot-util.js"></script>
<script src="https://unpkg.com/@polkadot/util-crypto@12.6.2/bundle-polkadot-util-crypto.js"></script>
<script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/void-57/cardano-wallet-test@main/cardano-crypto.iife.js"></script>
<script src="https://unpkg.com/uhtml@3.0.1/es.js"></script>
<script src="https://cdn.jsdelivr.net/npm/quill@2.0.2/dist/quill.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dompurify@3.1.6/dist/purify.min.js"></script>
<script src="scripts/components.js" defer></script>
<script src="scripts/keccak.js"></script>
<script src="scripts/tap_combined.js"></script>
<script src="scripts/blockchainAddresses.js"></script>
<script id="onLoadStartUp">
function routeTo(pageId) {
document.querySelectorAll('.inner-page').forEach(el => el.classList.add('hidden'));
const target = document.getElementById(pageId);
if (target) target.classList.remove('hidden');
// Update Desktop Nav Links
const activeDesktopClasses = ['text-white', 'relative', 'after:absolute', 'after:bottom-[-6px]', 'after:left-0', 'after:w-full', 'after:h-[2px]', 'after:bg-primary-fixed-dim', 'after:rounded-t-full'];
document.querySelectorAll('header nav a').forEach(el => {
if (el.getAttribute('onclick') === `routeTo('${pageId}')`) {
el.classList.add(...activeDesktopClasses);
el.classList.remove('text-outline', 'text-on-surface-variant');
} else {
el.classList.remove(...activeDesktopClasses);
el.classList.add('text-outline');
}
});
// Update Mobile Nav Buttons
document.querySelectorAll('nav.lg\\:hidden button').forEach(el => {
if (el.getAttribute('onclick') === `routeTo('${pageId}')`) {
el.classList.add('text-primary-fixed-dim');
el.classList.remove('text-on-surface-variant');
} else {
el.classList.add('text-on-surface-variant');
el.classList.remove('text-primary-fixed-dim');
}
});
// Refresh page-specific data when navigating to Library / Profile
if (pageId === 'page_library' && typeof renderLibrary === 'function') {
renderLibrary();
}
if (pageId === 'page_creator_profile' && typeof loadLikedSongs === 'function') {
loadLikedSongs();
}
if (pageId === 'page_dashboard' && typeof loadDashboardUploads === 'function') {
loadDashboardUploads();
}
if (pageId === 'page_marketplace' && typeof renderMarketplace === 'function') {
renderMarketplace();
}
if (pageId === 'page_upload' && typeof loadUploadCategories === 'function') {
loadUploadCategories();
}
localStorage.setItem("currentPage", pageId);
}
function onLoadStartUp() {
// Check for a public profile link (?floId=...)
const urlParams = new URLSearchParams(window.location.search);
const publicFloId = urlParams.get('floId');
if (publicFloId) {
// Public Profile View
document.getElementById('sign_in_gateway').classList.add('hidden');
document.getElementById('main_app_content').classList.remove('hidden');
// Hide all pages except the profile page
document.querySelectorAll('.inner-page').forEach(el => el.classList.add('hidden'));
document.getElementById('page_creator_profile').classList.remove('hidden');
// Hide header, player, and mobile nav for a clean standalone view
const header = document.querySelector('header');
if (header) header.classList.add('hidden');
document.getElementById('audio_player_footer').classList.add('hidden');
const mobileNav = document.getElementById('mobile_nav_bar');
if (mobileNav) mobileNav.classList.add('hidden');
// Check if the viewer is already logged in (from a previous session)
const storedUserFloId = localStorage.getItem('userFloId');
if (storedUserFloId) {
floGlobals.myFloID = storedUserFloId;
window.currentUserFloId = storedUserFloId;
window.isLoggedIn = true;
} else {
window.currentUserFloId = null;
window.isLoggedIn = false;
}
// Load the public profile and trigger the liked-songs override
loadPersonProfile(publicFloId);
loadLikedSongs();
return;
}
floDapps.setCustomPrivKeyInput(() => new Promise((resolve, reject) => {
document.getElementById('sign_in_gateway').classList.remove('hidden');
document.getElementById('main_app_content').classList.add('hidden');
const verifyBtn = document.getElementById('verify_key_btn');
const keyInput = document.getElementById('private_key_input');
verifyBtn.onclick = () => {
if (keyInput.value) {
const originalContent = verifyBtn.innerHTML;
verifyBtn.innerHTML = '<span class="material-symbols-outlined animate-spin" style="font-size: 20px;">refresh</span> <span>VERIFYING...</span>';
verifyBtn.classList.add('opacity-75', 'cursor-not-allowed', 'pointer-events-none');
verifyBtn.dataset.originalContent = originalContent;
resolve(keyInput.value);
}
};
}));
floDapps.launchStartUp().then(async result => {
console.log(result)
document.getElementById('sign_in_gateway').classList.add('hidden');
document.getElementById('main_app_content').classList.remove('hidden');
const savedPage = localStorage.getItem("currentPage");
if (savedPage && savedPage !== "page_explore") {
routeTo(savedPage);
}
if (!floCrypto.validateFloID(floDapps.user.id)) {
floGlobals.myBtcID = floDapps.user.id
const type = coinjs.addressDecode(floGlobals.myBtcID).type
if (type === 'standard') {
floGlobals.myFloID = btcOperator.convert.legacy2legacy(floGlobals.myBtcID, 0x23);
} else if (type === 'bech32') {
floGlobals.myFloID = btcOperator.convert.bech2legacy(floGlobals.myBtcID, 0x23);
} else {
alert(`Multisig address can't be used to sign in`);
return;
}
} else {
floGlobals.myFloID = floDapps.user.id
localStorage.setItem('userFloId', floGlobals.myFloID);
floGlobals.myBtcID = btcOperator.convert.legacy2bech(floDapps.user.id)
}
try {
let privKey = floDapps.user.private;
if (privKey instanceof Promise) {
privKey = await privKey;
}
floGlobals.addresses = await deriveAllBlockchainAddresses(privKey);
floGlobals.addresses = Object.assign({
flo: floGlobals.myFloID,
btc: floGlobals.myBtcID
}, floGlobals.addresses);
} catch (err) {
console.error("Error deriving all blockchain addresses:", err);
floGlobals.addresses = { flo: floGlobals.myFloID, btc: floGlobals.myBtcID };
}
const availableAddresses = Object.entries(floGlobals.addresses)
.filter(([key, val]) => val)
.map(([key, val]) => `${key.toUpperCase()}: ${val}`);
if (availableAddresses.length === 0) {
availableAddresses.push(`FLO: ${floGlobals.myFloID}`);
availableAddresses.push(`BTC: ${floGlobals.myBtcID}`);
}
const profileIdEl = document.getElementById('user_profile_id');
profileIdEl.textContent = availableAddresses[0];
let addressIndex = 1;
setInterval(() => {
profileIdEl.textContent = availableAddresses[addressIndex]
addressIndex = (addressIndex + 1) % availableAddresses.length;
}, 10000)
}).catch(error => {
console.error(error);
document.getElementById('sign_in_gateway').classList.remove('hidden');
// Reset Verify Button
const verifyBtn = document.getElementById('verify_key_btn');
if (verifyBtn && verifyBtn.dataset.originalContent) {
verifyBtn.innerHTML = verifyBtn.dataset.originalContent;
verifyBtn.classList.remove('opacity-75', 'cursor-not-allowed', 'pointer-events-none');
}
});
}
function signOut() {
if (confirm('Are you sure you want to sign out?')) {
floDapps.clearCredentials().then(() => {
localStorage.removeItem('userFloId');
location.reload();
}).catch(console.error);
}
}
function openProfilePopup() {
const container = document.getElementById('profile_popup_container');
const list = document.getElementById('profile_address_list');
list.innerHTML = '';
const addresses = floGlobals.addresses || {};
const addressLabels = {
flo: "FLO address",
doge: "DOGE address",
ltc: "LTC (Litecoin) address",
tao: "TAO (Bittensor) address",
near: "NEAR address",
fet: "FET (Fetch.ai) address",
btc: "Bitcoin address",
eth: "Ethereum address",
avax: "AVAX (Avalanche C-Chain) address",
bsc: "BSC (Binance Smart Chain) address",
matic: "MATIC (Polygon) address",
arb: "ARB (Arbitrum) address",
op: "OP (Optimism) address",
hbar: "HBAR (Hedera) address",
xrp: "XRP (Ripple) address",
sui: "SUI address",
ton: "TON address",
tron: "TRON address",
bch: "BCH (Bitcoin Cash) address",
dot: "DOT (Polkadot) address",
algo: "ALGO (Algorand) address",
xlm: "XLM (Stellar) address",
sol: "SOL (Solana) address",
ada: "ADA (Cardano) address"
};
for (const [key, label] of Object.entries(addressLabels)) {
if (addresses[key]) {
list.innerHTML += `
<div class="flex flex-col gap-2 overflow-hidden">
<b class="text-white text-sm font-code-sm">${label}</b>
<sm-copy value="${addresses[key]}" style="--text-color: 255, 255, 255; --button-background-color: rgba(255, 255, 255, 0.1); color: #fff; font-family: monospace; font-size: 0.8rem; border: 1px solid rgba(255,255,255,0.1); padding: 0.5rem; border-radius: 0.3rem; max-width: 100%; word-break: break-all;"></sm-copy>
</div>
`;
}
}
// Add copy animation on click
list.querySelectorAll('sm-copy').forEach(copyElem => {
copyElem.addEventListener('click', () => {
showToast("Copied ", "success");
});
});
container.classList.remove('hidden');
}
</script>
</head>
<body class="font-body-base text-body-base bg-background selection:bg-primary-fixed-dim selection:text-on-primary"
onload="onLoadStartUp()">
<div id="sign_in_gateway" class="fixed inset-0 z-[100] hidden bg-surface overflow-y-auto overflow-x-hidden">
<!-- Background elements (global) -->
<div class="absolute inset-0 z-0 opacity-40 pointer-events-none">
<div class="absolute inset-0 neural-mesh"></div>
<div class="absolute inset-0 bg-gradient-to-tr from-background via-surface to-background/80"></div>
</div>
<div class="w-full min-h-full md:h-full relative z-10 flex flex-col md:flex-row">
<!-- LEFT SIDE (Branding / Hero) - Hidden on mobile, visible on md+ -->
<div class="hidden md:flex flex-1 flex-col items-start p-12 lg:p-24 relative overflow-hidden">
<!-- Large decorative background logo -->
<svg class="absolute -left-32 -bottom-32 w-[600px] h-[600px] text-primary-fixed-dim/5 fill-current blur-2xl pointer-events-none"
viewBox="0 0 27.25 32">
<path
d="M27.14,30.86c-.74-2.48-3-4.36-8.25-6.94a20,20,0,0,1-4.2-2.49,6,6,0,0,1-1.25-1.67,4,4,0,0,1,0-2.26c.37-1.08.79-1.57,3.89-4.55a11.66,11.66,0,0,0,3.34-4.67,6.54,6.54,0,0,0,.05-2.82C20,3.6,18.58,2,16.16.49c-.89-.56-1.29-.64-1.3-.24a3,3,0,0,1-.3.72l-.3.55L13.42.94C13,.62,12.4.26,12.19.15c-.4-.2-.73-.18-.72.05a9.39,9.39,0,0,1-.61,1.33s-.14,0-.27-.13C8.76.09,8-.27,8,.23A11.73,11.73,0,0,1,6.76,2.6C4.81,5.87,2.83,7.49.77,7.49c-.89,0-.88,0-.61,1,.22.85.33.92,1.09.69A5.29,5.29,0,0,0,3,8.33c.23-.17.45-.29.49-.26a2,2,0,0,1,.22.63A1.31,1.31,0,0,0,4,9.34a5.62,5.62,0,0,0,2.27-.87L7,8l.13.55c.19.74.32.82,1,.65a7.06,7.06,0,0,0,3.46-2.47l.6-.71-.06.64c-.17,1.63-1.3,3.42-3.39,5.42L6.73,14c-3.21,3.06-3,5.59.6,8a46.77,46.77,0,0,0,4.6,2.41c.28.13,1,.52,1.59.87,3.31,2,4.95,3.92,4.95,5.93a2.49,2.49,0,0,0,.07.77h0c.09.09,0,.1.9-.14a2.61,2.61,0,0,0,.83-.32,3.69,3.69,0,0,0-.55-1.83A11.14,11.14,0,0,0,17,26.81a35.7,35.7,0,0,0-5.1-2.91C9.37,22.64,8.38,22,7.52,21.17a3.53,3.53,0,0,1-1.18-2.48c0-1.38.71-2.58,2.5-4.23,2.84-2.6,3.92-3.91,4.67-5.65a3.64,3.64,0,0,0,.42-2A3.37,3.37,0,0,0,13.61,5l-.32-.74.29-.48c.17-.27.37-.63.46-.8l.15-.3.44.64a5.92,5.92,0,0,1,1,2.81,5.86,5.86,0,0,1-.42,1.94c0,.12-.12.3-.15.4a9.49,9.49,0,0,1-.67,1.1,28,28,0,0,1-4,4.29C8.62,15.49,8.05,16.44,8,17.78a3.28,3.28,0,0,0,1.11,2.76c.95,1,2.07,1.74,5.25,3.32,3.64,1.82,5.22,2.9,6.41,4.38A4.78,4.78,0,0,1,21.94,31a3.21,3.21,0,0,0,.14.92,1.06,1.06,0,0,0,.43-.05l.83-.22.46-.12-.06-.46c-.21-1.53-1.62-3.25-3.94-4.8a37.57,37.57,0,0,0-5.22-2.82A13.36,13.36,0,0,1,11,21.19a3.36,3.36,0,0,1-.8-4.19c.41-.85.83-1.31,3.77-4.15,2.39-2.31,3.43-4.13,3.43-6a5.85,5.85,0,0,0-2.08-4.29c-.23-.21-.44-.43-.65-.65A2.5,2.5,0,0,1,15.27.69a10.6,10.6,0,0,1,2.91,2.78A4.16,4.16,0,0,1,19,6.16a4.91,4.91,0,0,1-.87,3c-.71,1.22-1.26,1.82-4.27,4.67a9.47,9.47,0,0,0-2.07,2.6,2.76,2.76,0,0,0-.33,1.54,2.76,2.76,0,0,0,.29,1.47c.57,1.21,2.23,2.55,4.65,3.73a32.41,32.41,0,0,1,5.82,3.24c2.16,1.6,3.2,3.16,3.2,4.8a1.94,1.94,0,0,0,.09.76,4.54,4.54,0,0,0,1.66-.4C27.29,31.42,27.29,31.37,27.14,30.86ZM6.1,7h0a3.77,3.77,0,0,1-1.46.45L4,7.51l.68-.83a25.09,25.09,0,0,0,3-4.82A12,12,0,0,1,8.28.76c.11-.12.77.32,1.53,1l.63.58-.57.84A10.34,10.34,0,0,1,6.1,7Zm5.71-1.78A9.77,9.77,0,0,1,9.24,7.18h0a5.25,5.25,0,0,1-1.17.28l-.58,0,.65-.78a21.29,21.29,0,0,0,2.1-3.12c.22-.41.42-.76.44-.79s.5.43.9,1.24L12,5ZM13.41,3a2.84,2.84,0,0,1-.45.64,11,11,0,0,1-.9-.91l-.84-.9.19-.45c.34-.79.39-.8,1-.31A9.4,9.4,0,0,1,13.8,2.33q-.18.34-.39.69Z" />
</svg>
<!-- Top Left Logo Block -->
<div class="relative z-10 flex items-center gap-4 w-full">
<div class="flex items-center gap-3 shrink-0">
<svg class="w-8 h-8 sm:w-10 sm:h-10 text-primary-fixed-dim fill-current drop-shadow-[0_0_8px_rgba(0,219,233,0.5)]"
viewBox="0 0 27.25 32">
<path
d="M27.14,30.86c-.74-2.48-3-4.36-8.25-6.94a20,20,0,0,1-4.2-2.49,6,6,0,0,1-1.25-1.67,4,4,0,0,1,0-2.26c.37-1.08.79-1.57,3.89-4.55a11.66,11.66,0,0,0,3.34-4.67,6.54,6.54,0,0,0,.05-2.82C20,3.6,18.58,2,16.16.49c-.89-.56-1.29-.64-1.3-.24a3,3,0,0,1-.3.72l-.3.55L13.42.94C13,.62,12.4.26,12.19.15c-.4-.2-.73-.18-.72.05a9.39,9.39,0,0,1-.61,1.33s-.14,0-.27-.13C8.76.09,8-.27,8,.23A11.73,11.73,0,0,1,6.76,2.6C4.81,5.87,2.83,7.49.77,7.49c-.89,0-.88,0-.61,1,.22.85.33.92,1.09.69A5.29,5.29,0,0,0,3,8.33c.23-.17.45-.29.49-.26a2,2,0,0,1,.22.63A1.31,1.31,0,0,0,4,9.34a5.62,5.62,0,0,0,2.27-.87L7,8l.13.55c.19.74.32.82,1,.65a7.06,7.06,0,0,0,3.46-2.47l.6-.71-.06.64c-.17,1.63-1.3,3.42-3.39,5.42L6.73,14c-3.21,3.06-3,5.59.6,8a46.77,46.77,0,0,0,4.6,2.41c.28.13,1,.52,1.59.87,3.31,2,4.95,3.92,4.95,5.93a2.49,2.49,0,0,0,.07.77h0c.09.09,0,.1.9-.14a2.61,2.61,0,0,0,.83-.32,3.69,3.69,0,0,0-.55-1.83A11.14,11.14,0,0,0,17,26.81a35.7,35.7,0,0,0-5.1-2.91C9.37,22.64,8.38,22,7.52,21.17a3.53,3.53,0,0,1-1.18-2.48c0-1.38.71-2.58,2.5-4.23,2.84-2.6,3.92-3.91,4.67-5.65a3.64,3.64,0,0,0,.42-2A3.37,3.37,0,0,0,13.61,5l-.32-.74.29-.48c.17-.27.37-.63.46-.8l.15-.3.44.64a5.92,5.92,0,0,1,1,2.81,5.86,5.86,0,0,1-.42,1.94c0,.12-.12.3-.15.4a9.49,9.49,0,0,1-.67,1.1,28,28,0,0,1-4,4.29C8.62,15.49,8.05,16.44,8,17.78a3.28,3.28,0,0,0,1.11,2.76c.95,1,2.07,1.74,5.25,3.32,3.64,1.82,5.22,2.9,6.41,4.38A4.78,4.78,0,0,1,21.94,31a3.21,3.21,0,0,0,.14.92,1.06,1.06,0,0,0,.43-.05l.83-.22.46-.12-.06-.46c-.21-1.53-1.62-3.25-3.94-4.8a37.57,37.57,0,0,0-5.22-2.82A13.36,13.36,0,0,1,11,21.19a3.36,3.36,0,0,1-.8-4.19c.41-.85.83-1.31,3.77-4.15,2.39-2.31,3.43-4.13,3.43-6a5.85,5.85,0,0,0-2.08-4.29c-.23-.21-.44-.43-.65-.65A2.5,2.5,0,0,1,15.27.69a10.6,10.6,0,0,1,2.91,2.78A4.16,4.16,0,0,1,19,6.16a4.91,4.91,0,0,1-.87,3c-.71,1.22-1.26,1.82-4.27,4.67a9.47,9.47,0,0,0-2.07,2.6,2.76,2.76,0,0,0-.33,1.54,2.76,2.76,0,0,0,.29,1.47c.57,1.21,2.23,2.55,4.65,3.73a32.41,32.41,0,0,1,5.82,3.24c2.16,1.6,3.2,3.16,3.2,4.8a1.94,1.94,0,0,0,.09.76,4.54,4.54,0,0,0,1.66-.4C27.29,31.42,27.29,31.37,27.14,30.86ZM6.1,7h0a3.77,3.77,0,0,1-1.46.45L4,7.51l.68-.83a25.09,25.09,0,0,0,3-4.82A12,12,0,0,1,8.28.76c.11-.12.77.32,1.53,1l.63.58-.57.84A10.34,10.34,0,0,1,6.1,7Zm5.71-1.78A9.77,9.77,0,0,1,9.24,7.18h0a5.25,5.25,0,0,1-1.17.28l-.58,0,.65-.78a21.29,21.29,0,0,0,2.1-3.12c.22-.41.42-.76.44-.79s.5.43.9,1.24L12,5ZM13.41,3a2.84,2.84,0,0,1-.45.64,11,11,0,0,1-.9-.91l-.84-.9.19-.45c.34-.79.39-.8,1-.31A9.4,9.4,0,0,1,13.8,2.33q-.18.34-.39.69Z" />
</svg>
<div class="flex flex-col leading-tight">
<span
class="text-[11px] sm:text-xs text-primary-fixed-dim font-semibold tracking-wide">RanchiMall</span>
<span
class="font-display-lg text-xl sm:text-2xl md:text-3xl tracking-tighter text-on-surface truncate mt-0.5">Music
Library</span>
</div>
</div>
<div class="flex items-center pl-4 border-l border-white/20 shrink-0">
<span
class="px-xs py-base bg-primary-fixed-dim/10 rounded border border-primary-fixed-dim/30 font-code-sm text-[10px] text-primary-fixed-dim uppercase whitespace-nowrap tracking-widest">AI
Blockchain Contract</span>
</div>
</div>
<!-- Center Hero Text -->
<div class="relative z-10 max-w-xl my-auto">
<h1
class="font-display-lg text-5xl lg:text-6xl xl:text-7xl tracking-tighter text-white leading-[1.05] mb-8">
The future of<br>music ownership
</h1>
<p class="text-outline text-lg lg:text-xl max-w-md font-body-base font-light leading-relaxed">
Discover, stream, and trade authentic <span class="whitespace-nowrap">AI-generated</span> music
securely powered by the FLO blockchain ecosystem.
</p>
</div>
</div>
<!-- RIGHT SIDE (Login Form) -->
<div
class="w-full min-h-full md:h-full md:w-[480px] lg:w-[560px] flex flex-col justify-center items-center py-12 px-6 md:p-12 relative bg-surface-container/30 backdrop-blur-3xl md:border-l border-white/5 shadow-[-20px_0_40px_rgba(0,0,0,0.3)] shrink-0">
<!-- Mobile Branding (Only visible on small screens since left side is hidden) -->
<div class="md:hidden flex flex-col items-center justify-center text-center mb-10 w-full max-w-[420px]">
<div class="flex items-center gap-3 mb-6 shrink-0">
<svg class="w-10 h-10 text-primary-fixed-dim fill-current drop-shadow-[0_0_8px_rgba(0,219,233,0.5)]"
viewBox="0 0 27.25 32">
<path
d="M27.14,30.86c-.74-2.48-3-4.36-8.25-6.94a20,20,0,0,1-4.2-2.49,6,6,0,0,1-1.25-1.67,4,4,0,0,1,0-2.26c.37-1.08.79-1.57,3.89-4.55a11.66,11.66,0,0,0,3.34-4.67,6.54,6.54,0,0,0,.05-2.82C20,3.6,18.58,2,16.16.49c-.89-.56-1.29-.64-1.3-.24a3,3,0,0,1-.3.72l-.3.55L13.42.94C13,.62,12.4.26,12.19.15c-.4-.2-.73-.18-.72.05a9.39,9.39,0,0,1-.61,1.33s-.14,0-.27-.13C8.76.09,8-.27,8,.23A11.73,11.73,0,0,1,6.76,2.6C4.81,5.87,2.83,7.49.77,7.49c-.89,0-.88,0-.61,1,.22.85.33.92,1.09.69A5.29,5.29,0,0,0,3,8.33c.23-.17.45-.29.49-.26a2,2,0,0,1,.22.63A1.31,1.31,0,0,0,4,9.34a5.62,5.62,0,0,0,2.27-.87L7,8l.13.55c.19.74.32.82,1,.65a7.06,7.06,0,0,0,3.46-2.47l.6-.71-.06.64c-.17,1.63-1.3,3.42-3.39,5.42L6.73,14c-3.21,3.06-3,5.59.6,8a46.77,46.77,0,0,0,4.6,2.41c.28.13,1,.52,1.59.87,3.31,2,4.95,3.92,4.95,5.93a2.49,2.49,0,0,0,.07.77h0c.09.09,0,.1.9-.14a2.61,2.61,0,0,0,.83-.32,3.69,3.69,0,0,0-.55-1.83A11.14,11.14,0,0,0,17,26.81a35.7,35.7,0,0,0-5.1-2.91C9.37,22.64,8.38,22,7.52,21.17a3.53,3.53,0,0,1-1.18-2.48c0-1.38.71-2.58,2.5-4.23,2.84-2.6,3.92-3.91,4.67-5.65a3.64,3.64,0,0,0,.42-2A3.37,3.37,0,0,0,13.61,5l-.32-.74.29-.48c.17-.27.37-.63.46-.8l.15-.3.44.64a5.92,5.92,0,0,1,1,2.81,5.86,5.86,0,0,1-.42,1.94c0,.12-.12.3-.15.4a9.49,9.49,0,0,1-.67,1.1,28,28,0,0,1-4,4.29C8.62,15.49,8.05,16.44,8,17.78a3.28,3.28,0,0,0,1.11,2.76c.95,1,2.07,1.74,5.25,3.32,3.64,1.82,5.22,2.9,6.41,4.38A4.78,4.78,0,0,1,21.94,31a3.21,3.21,0,0,0,.14.92,1.06,1.06,0,0,0,.43-.05l.83-.22.46-.12-.06-.46c-.21-1.53-1.62-3.25-3.94-4.8a37.57,37.57,0,0,0-5.22-2.82A13.36,13.36,0,0,1,11,21.19a3.36,3.36,0,0,1-.8-4.19c.41-.85.83-1.31,3.77-4.15,2.39-2.31,3.43-4.13,3.43-6a5.85,5.85,0,0,0-2.08-4.29c-.23-.21-.44-.43-.65-.65A2.5,2.5,0,0,1,15.27.69a10.6,10.6,0,0,1,2.91,2.78A4.16,4.16,0,0,1,19,6.16a4.91,4.91,0,0,1-.87,3c-.71,1.22-1.26,1.82-4.27,4.67a9.47,9.47,0,0,0-2.07,2.6,2.76,2.76,0,0,0-.33,1.54,2.76,2.76,0,0,0,.29,1.47c.57,1.21,2.23,2.55,4.65,3.73a32.41,32.41,0,0,1,5.82,3.24c2.16,1.6,3.2,3.16,3.2,4.8a1.94,1.94,0,0,0,.09.76,4.54,4.54,0,0,0,1.66-.4C27.29,31.42,27.29,31.37,27.14,30.86ZM6.1,7h0a3.77,3.77,0,0,1-1.46.45L4,7.51l.68-.83a25.09,25.09,0,0,0,3-4.82A12,12,0,0,1,8.28.76c.11-.12.77.32,1.53,1l.63.58-.57.84A10.34,10.34,0,0,1,6.1,7Zm5.71-1.78A9.77,9.77,0,0,1,9.24,7.18h0a5.25,5.25,0,0,1-1.17.28l-.58,0,.65-.78a21.29,21.29,0,0,0,2.1-3.12c.22-.41.42-.76.44-.79s.5.43.9,1.24L12,5ZM13.41,3a2.84,2.84,0,0,1-.45.64,11,11,0,0,1-.9-.91l-.84-.9.19-.45c.34-.79.39-.8,1-.31A9.4,9.4,0,0,1,13.8,2.33q-.18.34-.39.69Z" />
</svg>
<div class="flex flex-col items-start leading-tight text-left">
<span class="text-xs text-primary-fixed-dim font-semibold tracking-wide">RanchiMall</span>
<span class="font-display-lg text-2xl tracking-tighter text-white mt-0.5">Music
Library</span>
</div>
</div>
<h1 class="font-display-lg text-4xl tracking-tighter text-white leading-[1.1] mb-4">
The future of<br>music ownership
</h1>
<p class="text-outline text-sm font-body-base font-light leading-relaxed max-w-[280px] mx-auto">
Discover, stream, and trade authentic <span class="whitespace-nowrap">AI-generated</span> music
securely.
</p>
</div>
<div class="w-full max-w-[420px]">
<div
class="bg-surface-container/80 backdrop-blur-2xl border border-white/10 rounded-2xl overflow-hidden shadow-[0_0_40px_rgba(0,0,0,0.5)]">
<div class="px-8 py-6 border-b border-white/5 flex justify-between items-center">
<h2 class="text-xl font-display-lg text-white">Authentication</h2>
<div
class="flex items-center gap-1.5 px-3 py-1 bg-primary-fixed-dim/10 border border-primary-fixed-dim/20 rounded-full">
<span
class="material-symbols-outlined text-[14px] text-primary-fixed-dim">vpn_key</span>
<span
class="font-code-sm text-[10px] text-primary-fixed-dim tracking-wider uppercase">Secure</span>
</div>
</div>
<div class="p-8">
<div class="flex flex-col space-y-6">
<div class="space-y-2">
<label class="font-label-caps text-xs text-outline tracking-wider block">Connect
using FLO Private Key</label>
<div class="relative">
<input id="private_key_input" type="password"
class="w-full bg-black/50 border border-white/10 rounded-lg pl-4 pr-12 py-3 text-sm text-white font-code-sm focus:outline-none focus:border-primary-fixed-dim focus:ring-1 focus:ring-primary-fixed-dim transition-all placeholder:text-outline/50 placeholder:text-xs"
placeholder="Enter your private key...">
<button type="button"
class="absolute right-4 top-1/2 -translate-y-1/2 text-outline hover:text-primary-fixed-dim transition-colors flex items-center justify-center"
onclick="const input = document.getElementById('private_key_input'); const icon = this.querySelector('span'); if(input.type === 'password') { input.type = 'text'; icon.textContent = 'visibility_off'; } else { input.type = 'password'; icon.textContent = 'visibility'; }">
<span class="material-symbols-outlined text-[20px]">visibility</span>
</button>
</div>
</div>
<button id="verify_key_btn"
class="w-full bg-primary-fixed-dim text-on-primary-fixed font-bold text-sm font-label-caps tracking-widest px-6 py-3 rounded-lg hover:shadow-[0_0_20px_rgba(0,219,233,0.4)] active:scale-[0.98] transition-all flex items-center justify-center gap-2">
<span>LOGIN</span>
</button>
<div class="text-center pt-2">
<a href="javascript:void(0)"
onclick="document.getElementById('keys_generator_container').classList.remove('hidden')"
class="text-sm text-outline hover:text-primary-fixed-dim transition-colors font-body-base border-b border-dashed border-outline hover:border-primary-fixed-dim pb-0.5">New
here? Generate FLO credentials</a>
</div>
</div>
</div>
</div>
<p class="text-center text-outline/50 text-xs mt-8 font-label-caps tracking-widest hidden md:block">
AI BLOCKCHAIN CONTRACT • RANCHIMALL
</p>
</div>
</div>
</div>
</div>
<div id="keys_generator_container"
class="fixed inset-0 z-[200] flex items-center justify-center bg-black/90 hidden backdrop-blur-sm">
<div
class="w-full max-w-md bg-[#161616] p-6 md:p-8 rounded-xl border border-white/5 shadow-2xl overflow-y-auto max-h-screen relative mx-4 md:mx-0">
<button onclick="document.getElementById('keys_generator_container').classList.add('hidden')"
class="absolute top-4 right-4 text-white hover:text-primary-fixed-dim bg-transparent border-none">
<span class="material-symbols-outlined">close</span>
</button>
<keys-generator id="keys_generator"></keys-generator>
</div>
</div>
<!-- USDAI TXID prompt: shown after user sends funds externally. -->
<div id="usdai_key_prompt"
class="fixed inset-0 z-[200] flex items-center justify-center bg-black/90 hidden backdrop-blur-md">
<div
class="w-full max-w-md bg-surface p-6 md:p-8 rounded-xl border border-white/10 shadow-2xl relative mx-4 md:mx-0">
<button onclick="resolveUsdaiKeyPrompt(false)"
class="absolute top-4 right-4 text-white hover:text-primary-fixed-dim bg-transparent border-none">
<span class="material-symbols-outlined">close</span>
</button>
<h3 class="font-label-caps text-xs text-primary-fixed-dim uppercase tracking-widest mb-2">Confirm Payment
</h3>
<p class="font-code-sm text-xs text-outline mb-4">Open your FLO wallet, send the exact USDAI amount to the
address shown below, then paste the Transaction ID.</p>
<div id="usdai_key_prompt_address_wrap"
class="mb-4 rounded-lg bg-black/30 border border-white/5 p-3 space-y-1.5">
<div class="flex items-center justify-between font-code-sm text-[11px]">
<span class="text-outline">Send to address</span>
<button type="button"
onclick="navigator.clipboard.writeText(document.getElementById('usdai_key_prompt_address').textContent.trim()).then(()=>showToast('Address copied','success'))"
class="text-outline hover:text-primary-fixed-dim flex items-center gap-1 bg-transparent border-none cursor-pointer p-0 text-[11px]">
<span class="material-symbols-outlined text-[14px]">content_copy</span>
<span>Copy</span>
</button>
</div>
<div id="usdai_key_prompt_address"
class="text-primary-fixed-dim font-code-sm text-xs break-all select-all font-mono leading-relaxed">—
</div>
</div>
<input id="usdai_key_prompt_input" type="text"
class="w-full bg-black/50 border border-white/10 rounded-xl px-4 py-3 text-sm text-white font-code-sm focus:outline-none focus:border-primary-fixed-dim mb-2"
placeholder="Paste TXID here" />
<div class="flex flex-wrap gap-sm">
<button onclick="resolveUsdaiKeyPrompt(true)"
class="flex-1 px-lg py-3 rounded-lg bg-primary-fixed-dim text-on-primary-fixed font-label-caps text-[10px] tracking-widest uppercase">Verify
& Mint</button>
<button onclick="resolveUsdaiKeyPrompt(false)"
class="px-lg py-3 rounded-lg bg-white/5 border border-white/10 text-on-surface font-label-caps text-[10px] tracking-widest uppercase">Cancel</button>
</div>
</div>
</div>
<!-- Small loading screen while payment is sending -->
<div id="marketplace_buy_loading"
class="fixed inset-0 z-[200] flex items-center justify-center bg-black/80 hidden backdrop-blur-md p-4">
<div class="w-full max-w-sm bg-surface p-8 rounded-xl border border-white/10 shadow-2xl text-center space-y-4">
<span
class="material-symbols-outlined text-primary-fixed-dim text-3xl animate-spin">progress_activity</span>
<p id="marketplace_buy_loading_text" class="font-code-sm text-sm text-outline">Sending on-chain…</p>
</div>
</div>
<!-- Popup that shows if payment worked or failed -->
<div id="marketplace_tx_result_popup"
class="fixed inset-0 z-[200] flex items-center justify-center bg-black/80 hidden backdrop-blur-md p-4"
onclick="if(event.target===this) closeMarketplaceTxResult()">
<div class="w-full max-w-md bg-surface p-6 md:p-8 rounded-xl border border-white/10 shadow-2xl relative">
<button onclick="closeMarketplaceTxResult()"
class="absolute top-4 right-4 text-white hover:text-primary-fixed-dim bg-transparent border-none">
<span class="material-symbols-outlined">close</span>
</button>
<div id="marketplace_tx_result"></div>
<button onclick="closeMarketplaceTxResult()"
class="mt-6 w-full py-3 rounded-lg bg-primary-fixed-dim text-on-primary-fixed font-label-caps text-[10px] tracking-widest uppercase">Done</button>
</div>
</div>
<div id="profile_popup_container"
class="fixed inset-0 z-[200] flex items-center justify-center bg-black/90 hidden backdrop-blur-md">
<div
class="w-full max-w-2xl bg-surface p-6 md:p-xl rounded-xl border border-white/10 shadow-2xl overflow-y-auto max-h-[90vh] relative mx-4 md:mx-0">
<button onclick="document.getElementById('profile_popup_container').classList.add('hidden')"
class="absolute top-4 right-4 text-white hover:text-primary-fixed-dim">
<span class="material-symbols-outlined">close</span>
</button>
<div
class="flex flex-col sm:flex-row items-center sm:items-start text-center sm:text-left gap-4 mb-6 pb-6 border-b border-white/10">
<div
class="w-16 h-16 rounded-full border border-primary-fixed-dim/30 overflow-hidden shrink-0 flex items-center justify-center bg-primary-fixed-dim/10">
<span class="material-symbols-outlined text-primary-fixed-dim text-[40px]">person</span>
</div>
<div class="flex-1">
<h3 class="text-xl font-bold text-white mb-1">My Profile</h3>
<p class="text-on-surface-variant text-sm">Manage your addresses and account</p>
</div>
<button onclick="signOut()"
class="w-full sm:w-auto mt-2 sm:mt-0 px-4 py-2 border border-red-500/50 text-red-500 hover:bg-red-500/10 hover:border-red-500 rounded font-bold transition-all cursor-pointer shrink-0">
Sign Out
</button>
</div>
<div class="space-y-4">
<h4 class="text-lg font-bold text-white">My Addresses</h4>
<div id="profile_address_list" class="flex flex-col gap-4">
<!-- Injected addresses -->
</div>
</div>
</div>
</div>
<div id="main_app_content">
<!-- Main Navigation -->
<header
class="fixed top-0 w-full z-50 bg-surface/70 dark:bg-surface/70 backdrop-blur-xl border-b border-white/5 shadow-[0_0_20px_rgba(0,219,233,0.1)] h-20">
<div class="flex items-center justify-between px-margin-mobile md:px-margin-desktop h-full w-full relative">
<div class="flex items-center gap-2 md:gap-4 lg:gap-6 min-w-0">
<div class="flex items-center gap-3 cursor-pointer shrink-0" onclick="routeTo('page_explore')">
<svg id="main_logo"
class="w-8 h-8 sm:w-10 sm:h-10 text-primary-fixed-dim fill-current drop-shadow-[0_0_8px_rgba(0,219,233,0.5)]"
viewBox="0 0 27.25 32">
<title>RanchiMall</title>
<path
d="M27.14,30.86c-.74-2.48-3-4.36-8.25-6.94a20,20,0,0,1-4.2-2.49,6,6,0,0,1-1.25-1.67,4,4,0,0,1,0-2.26c.37-1.08.79-1.57,3.89-4.55a11.66,11.66,0,0,0,3.34-4.67,6.54,6.54,0,0,0,.05-2.82C20,3.6,18.58,2,16.16.49c-.89-.56-1.29-.64-1.3-.24a3,3,0,0,1-.3.72l-.3.55L13.42.94C13,.62,12.4.26,12.19.15c-.4-.2-.73-.18-.72.05a9.39,9.39,0,0,1-.61,1.33s-.14,0-.27-.13C8.76.09,8-.27,8,.23A11.73,11.73,0,0,1,6.76,2.6C4.81,5.87,2.83,7.49.77,7.49c-.89,0-.88,0-.61,1,.22.85.33.92,1.09.69A5.29,5.29,0,0,0,3,8.33c.23-.17.45-.29.49-.26a2,2,0,0,1,.22.63A1.31,1.31,0,0,0,4,9.34a5.62,5.62,0,0,0,2.27-.87L7,8l.13.55c.19.74.32.82,1,.65a7.06,7.06,0,0,0,3.46-2.47l.6-.71-.06.64c-.17,1.63-1.3,3.42-3.39,5.42L6.73,14c-3.21,3.06-3,5.59.6,8a46.77,46.77,0,0,0,4.6,2.41c.28.13,1,.52,1.59.87,3.31,2,4.95,3.92,4.95,5.93a2.49,2.49,0,0,0,.07.77h0c.09.09,0,.1.9-.14a2.61,2.61,0,0,0,.83-.32,3.69,3.69,0,0,0-.55-1.83A11.14,11.14,0,0,0,17,26.81a35.7,35.7,0,0,0-5.1-2.91C9.37,22.64,8.38,22,7.52,21.17a3.53,3.53,0,0,1-1.18-2.48c0-1.38.71-2.58,2.5-4.23,2.84-2.6,3.92-3.91,4.67-5.65a3.64,3.64,0,0,0,.42-2A3.37,3.37,0,0,0,13.61,5l-.32-.74.29-.48c.17-.27.37-.63.46-.8l.15-.3.44.64a5.92,5.92,0,0,1,1,2.81,5.86,5.86,0,0,1-.42,1.94c0,.12-.12.3-.15.4a9.49,9.49,0,0,1-.67,1.1,28,28,0,0,1-4,4.29C8.62,15.49,8.05,16.44,8,17.78a3.28,3.28,0,0,0,1.11,2.76c.95,1,2.07,1.74,5.25,3.32,3.64,1.82,5.22,2.9,6.41,4.38A4.78,4.78,0,0,1,21.94,31a3.21,3.21,0,0,0,.14.92,1.06,1.06,0,0,0,.43-.05l.83-.22.46-.12-.06-.46c-.21-1.53-1.62-3.25-3.94-4.8a37.57,37.57,0,0,0-5.22-2.82A13.36,13.36,0,0,1,11,21.19a3.36,3.36,0,0,1-.8-4.19c.41-.85.83-1.31,3.77-4.15,2.39-2.31,3.43-4.13,3.43-6a5.85,5.85,0,0,0-2.08-4.29c-.23-.21-.44-.43-.65-.65A2.5,2.5,0,0,1,15.27.69a10.6,10.6,0,0,1,2.91,2.78A4.16,4.16,0,0,1,19,6.16a4.91,4.91,0,0,1-.87,3c-.71,1.22-1.26,1.82-4.27,4.67a9.47,9.47,0,0,0-2.07,2.6,2.76,2.76,0,0,0-.33,1.54,2.76,2.76,0,0,0,.29,1.47c.57,1.21,2.23,2.55,4.65,3.73a32.41,32.41,0,0,1,5.82,3.24c2.16,1.6,3.2,3.16,3.2,4.8a1.94,1.94,0,0,0,.09.76,4.54,4.54,0,0,0,1.66-.4C27.29,31.42,27.29,31.37,27.14,30.86ZM6.1,7h0a3.77,3.77,0,0,1-1.46.45L4,7.51l.68-.83a25.09,25.09,0,0,0,3-4.82A12,12,0,0,1,8.28.76c.11-.12.77.32,1.53,1l.63.58-.57.84A10.34,10.34,0,0,1,6.1,7Zm5.71-1.78A9.77,9.77,0,0,1,9.24,7.18h0a5.25,5.25,0,0,1-1.17.28l-.58,0,.65-.78a21.29,21.29,0,0,0,2.1-3.12c.22-.41.42-.76.44-.79s.5.43.9,1.24L12,5ZM13.41,3a2.84,2.84,0,0,1-.45.64,11,11,0,0,1-.9-.91l-.84-.9.19-.45c.34-.79.39-.8,1-.31A9.4,9.4,0,0,1,13.8,2.33q-.18.34-.39.69Z" />
</svg>
<div class="flex flex-col leading-tight">
<span
class="text-[11px] sm:text-xs text-primary-fixed-dim font-semibold tracking-wide">RanchiMall</span>
<span
class="font-display-lg text-xl sm:text-2xl md:text-3xl tracking-tighter text-on-surface truncate mt-0.5">Music
Library</span>
<span
class="lg:hidden mt-1 text-[7px] sm:text-[8px] text-primary-fixed-dim font-code-sm uppercase tracking-[0.12em] whitespace-nowrap">AI
Blockchain Contract</span>
</div>
</div>
<div class="hidden lg:flex items-center ml-2 pl-4 border-l border-white/20 shrink-0">
<span
class="px-xs py-base bg-primary-fixed-dim/10 rounded border border-primary-fixed-dim/30 font-code-sm text-[10px] text-primary-fixed-dim uppercase whitespace-nowrap tracking-widest">AI
Blockchain Contract</span>
</div>
</div>
<!-- Centered Navigation -->
<nav class="hidden lg:flex flex-1 justify-center items-center gap-10">
<a href="#"
class="text-white hover:text-white font-label-lg relative after:absolute after:bottom-[-6px] after:left-0 after:w-full after:h-[2px] after:bg-primary-fixed-dim after:rounded-t-full transition-colors"
onclick="routeTo('page_explore')">Home</a>
<a href="#" class="text-outline hover:text-white font-label-lg transition-colors"
onclick="routeTo('page_library')">Library</a>
<a href="#" class="text-outline hover:text-white font-label-lg transition-colors"
onclick="routeTo('page_dashboard')">Dashboard</a>
<a href="#" class="text-outline hover:text-white font-label-lg transition-colors"
onclick="routeTo('page_creator_profile')">Profile</a>
<a href="#" class="text-outline hover:text-white font-label-lg transition-colors"
onclick="routeTo('page_marketplace')">Marketplace</a>
<a href="#" class="text-outline font-label-lg transition-colors hover:text-white"
onclick="routeTo('page_upload')">Upload</a>
</nav>
<div class="flex items-center gap-3 sm:gap-md shrink-0">
<button
class="active:scale-95 transition-transform text-on-surface-variant hover:text-primary-fixed-dim hidden sm:block">
<span class="material-symbols-outlined">search</span>
</button>
<button
class="active:scale-95 transition-transform text-on-surface-variant hover:text-primary-fixed-dim">
<span class="material-symbols-outlined">shopping_cart</span>
</button>
<button
class="active:scale-95 transition-transform text-on-surface-variant hover:text-primary-fixed-dim">
<span class="material-symbols-outlined">notifications</span>
</button>
</button>
<div class="hidden sm:flex flex-col text-right mr-xs">
<span class="font-code-sm text-[10px] text-on-surface-variant uppercase">Connected
Address</span>
<span id="user_profile_id"
class="font-code-sm text-xs text-primary-fixed-dim max-w-[150px] truncate">Not
Connected</span>
</div>
<div class="w-8 h-8 sm:w-10 sm:h-10 rounded-full border border-primary-fixed-dim/30 overflow-hidden cursor-pointer hover:border-primary-fixed-dim transition-colors shrink-0 flex items-center justify-center bg-primary-fixed-dim/10"
onclick="openProfilePopup()">
<span
class="material-symbols-outlined text-primary-fixed-dim text-[24px] sm:text-[28px]">person</span>
</div>
</div>
</div>
</header>
<section id="page_explore" class="inner-page relative pt-20 pb-32">
<!-- Hero Section -->
<section
class="relative min-h-[819px] flex items-center px-margin-mobile md:px-margin-desktop overflow-hidden">
<div class="absolute inset-0 z-0 opacity-40">
<div class="absolute inset-0 neural-mesh"></div>
</div>
<div class="relative z-10 max-w-4xl">
<div
class="inline-flex items-center gap-xs px-sm py-base rounded-full bg-primary-fixed-dim/10 border border-primary-fixed-dim/30 mb-md">
<span class="material-symbols-outlined text-primary-fixed-dim text-sm"
style="font-variation-settings: 'FILL' 1;">bolt</span>
<span class="font-label-caps text-label-caps text-primary-fixed-dim">AI BLOCKCHAIN CONTRACT
ACTIVE</span>
</div>
<h1
class="font-display-lg text-display-lg-mobile md:text-display-lg text-on-surface mb-md leading-[1.05]">
The Decentralized <span class="text-primary-fixed-dim">Music Library</span>
</h1>
<p class="font-body-base text-lg text-on-surface-variant max-w-2xl mb-xl">
A decentralized library where lyrics are crafted (Human/AI), music is generated by AI apps, and
value is determined entirely by consumption. Built on the FLO Blockchain.
</p>
<div class="flex flex-col sm:flex-row gap-md">
<button
class="px-xl py-md bg-primary-fixed-dim text-on-primary font-bold rounded-lg cyber-glow-primary active:scale-95 transition-all flex items-center justify-center gap-xs">
Browse Library
<span class="material-symbols-outlined">library_music</span>
</button>
<button
class="px-xl py-md bg-transparent border border-primary-fixed-dim text-primary-fixed-dim font-bold rounded-lg hover:bg-primary-fixed-dim/5 transition-all flex items-center justify-center">
View Open Allocations
</button>
</div>
</div>
</section>
<!-- Trending Tracks -->
<section class="px-margin-mobile md:px-margin-desktop py-xl">
<div class="flex flex-col sm:flex-row sm:items-end justify-between gap-4 sm:gap-0 mb-lg">
<div>
<h2 class="font-headline-md text-headline-md text-on-surface">Trending Library Tracks</h2>
<p class="font-code-sm text-code-sm text-outline">VALUED BY CONSUMPTION</p>
</div>
<button
class="text-primary-fixed-dim font-label-caps text-label-caps flex items-center gap-xs hover:underline whitespace-nowrap self-start sm:self-auto">
VIEW ALL <span class="material-symbols-outlined text-sm">arrow_forward</span>
</button>
</div>
<div id="explore_track_grid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-gutter">
<!-- Skeleton loading placeholders shown until cloud tracks arrive -->
<div class="glass-panel rounded-xl p-md flex flex-col animate-pulse" aria-hidden="true">
<div class="relative aspect-square mb-md overflow-hidden rounded-lg bg-white/5"></div>
<div class="flex justify-between items-start mb-2">
<div class="w-full">
<div class="h-5 w-3/4 rounded bg-white/5 mb-xs"></div>
<div class="flex items-center gap-2 mt-1">
<div class="h-4 w-20 rounded bg-white/5"></div>
<div class="h-4 w-24 rounded bg-white/5"></div>
</div>
</div>
</div>
<div class="mt-auto pt-md border-t border-white/5 flex items-center justify-between">
<div class="flex flex-col gap-1">
<div class="h-3 w-16 rounded bg-white/5"></div>
<div class="h-4 w-12 rounded bg-white/5"></div>
</div>
<div class="flex items-center gap-2">
<div class="h-6 w-16 rounded bg-white/5"></div>
<div class="h-6 w-16 rounded bg-white/5"></div>
</div>
</div>
</div>
<div class="glass-panel rounded-xl p-md flex flex-col animate-pulse" aria-hidden="true">
<div class="relative aspect-square mb-md overflow-hidden rounded-lg bg-white/5"></div>
<div class="flex justify-between items-start mb-2">
<div class="w-full">
<div class="h-5 w-2/3 rounded bg-white/5 mb-xs"></div>
<div class="flex items-center gap-2 mt-1">
<div class="h-4 w-20 rounded bg-white/5"></div>
<div class="h-4 w-24 rounded bg-white/5"></div>
</div>
</div>
</div>
<div class="mt-auto pt-md border-t border-white/5 flex items-center justify-between">
<div class="flex flex-col gap-1">
<div class="h-3 w-16 rounded bg-white/5"></div>
<div class="h-4 w-12 rounded bg-white/5"></div>
</div>
<div class="flex items-center gap-2">
<div class="h-6 w-16 rounded bg-white/5"></div>
<div class="h-6 w-16 rounded bg-white/5"></div>
</div>
</div>
</div>
<div class="glass-panel rounded-xl p-md flex flex-col animate-pulse" aria-hidden="true">
<div class="relative aspect-square mb-md overflow-hidden rounded-lg bg-white/5"></div>
<div class="flex justify-between items-start mb-2">
<div class="w-full">
<div class="h-5 w-4/5 rounded bg-white/5 mb-xs"></div>
<div class="flex items-center gap-2 mt-1">
<div class="h-4 w-20 rounded bg-white/5"></div>
<div class="h-4 w-24 rounded bg-white/5"></div>
</div>
</div>
</div>
<div class="mt-auto pt-md border-t border-white/5 flex items-center justify-between">
<div class="flex flex-col gap-1">
<div class="h-3 w-16 rounded bg-white/5"></div>
<div class="h-4 w-12 rounded bg-white/5"></div>
</div>
<div class="flex items-center gap-2">
<div class="h-6 w-16 rounded bg-white/5"></div>
<div class="h-6 w-16 rounded bg-white/5"></div>
</div>
</div>
</div>
<div class="glass-panel rounded-xl p-md flex flex-col animate-pulse hidden md:flex"
aria-hidden="true">
<div class="relative aspect-square mb-md overflow-hidden rounded-lg bg-white/5"></div>
<div class="flex justify-between items-start mb-2">
<div class="w-full">
<div class="h-5 w-3/5 rounded bg-white/5 mb-xs"></div>
<div class="flex items-center gap-2 mt-1">
<div class="h-4 w-20 rounded bg-white/5"></div>
<div class="h-4 w-24 rounded bg-white/5"></div>
</div>
</div>
</div>
<div class="mt-auto pt-md border-t border-white/5 flex items-center justify-between">
<div class="flex flex-col gap-1">
<div class="h-3 w-16 rounded bg-white/5"></div>
<div class="h-4 w-12 rounded bg-white/5"></div>
</div>
<div class="flex items-center gap-2">
<div class="h-6 w-16 rounded bg-white/5"></div>
<div class="h-6 w-16 rounded bg-white/5"></div>
</div>
</div>
</div>
<div class="glass-panel rounded-xl p-md flex flex-col animate-pulse hidden lg:flex"
aria-hidden="true">
<div class="relative aspect-square mb-md overflow-hidden rounded-lg bg-white/5"></div>
<div class="flex justify-between items-start mb-2">
<div class="w-full">
<div class="h-5 w-2/4 rounded bg-white/5 mb-xs"></div>
<div class="flex items-center gap-2 mt-1">
<div class="h-4 w-20 rounded bg-white/5"></div>
<div class="h-4 w-24 rounded bg-white/5"></div>
</div>
</div>
</div>
<div class="mt-auto pt-md border-t border-white/5 flex items-center justify-between">
<div class="flex flex-col gap-1">
<div class="h-3 w-16 rounded bg-white/5"></div>
<div class="h-4 w-12 rounded bg-white/5"></div>
</div>
<div class="flex items-center gap-2">
<div class="h-6 w-16 rounded bg-white/5"></div>
<div class="h-6 w-16 rounded bg-white/5"></div>
</div>
</div>
</div>
<div class="glass-panel rounded-xl p-md flex flex-col animate-pulse hidden lg:flex"
aria-hidden="true">
<div class="relative aspect-square mb-md overflow-hidden rounded-lg bg-white/5"></div>
<div class="flex justify-between items-start mb-2">
<div class="w-full">
<div class="h-5 w-3/4 rounded bg-white/5 mb-xs"></div>
<div class="flex items-center gap-2 mt-1">
<div class="h-4 w-20 rounded bg-white/5"></div>
<div class="h-4 w-24 rounded bg-white/5"></div>
</div>
</div>
</div>
<div class="mt-auto pt-md border-t border-white/5 flex items-center justify-between">
<div class="flex flex-col gap-1">
<div class="h-3 w-16 rounded bg-white/5"></div>
<div class="h-4 w-12 rounded bg-white/5"></div>
</div>
<div class="flex items-center gap-2">
<div class="h-6 w-16 rounded bg-white/5"></div>
<div class="h-6 w-16 rounded bg-white/5"></div>
</div>
</div>
</div>
</div>
</section>
<!-- Library Collections -->
<section class="px-margin-mobile md:px-margin-desktop py-xl bg-surface-container-lowest/50">
<h2 class="font-headline-md text-headline-md text-on-surface mb-lg">Library Collections</h2>
<div class="grid grid-cols-2 lg:grid-cols-4 gap-gutter">
<div
class="glass-panel h-40 rounded-xl flex flex-col justify-end p-md group cursor-pointer relative overflow-hidden transition-all hover:-translate-y-1">
<div class="absolute top-0 right-0 p-sm opacity-20 group-hover:opacity-100 transition-all">
<span class="material-symbols-outlined text-primary-fixed-dim text-4xl">memory</span>
</div>
<h4 class="font-headline-md text-xl text-on-surface z-10">Cyberpunk</h4>
<p class="font-code-sm text-code-sm text-outline z-10">2,401 TRACKS</p>
</div>
<div
class="glass-panel h-40 rounded-xl flex flex-col justify-end p-md group cursor-pointer relative overflow-hidden transition-all hover:-translate-y-1">
<div class="absolute top-0 right-0 p-sm opacity-20 group-hover:opacity-100 transition-all">
<span class="material-symbols-outlined text-primary-fixed-dim text-4xl">waves</span>
</div>
<h4 class="font-headline-md text-xl text-on-surface z-10">Ambient Neural</h4>
<p class="font-code-sm text-code-sm text-outline z-10">1,892 TRACKS</p>
</div>
<div
class="glass-panel h-40 rounded-xl flex flex-col justify-end p-md group cursor-pointer relative overflow-hidden transition-all hover:-translate-y-1">
<div class="absolute top-0 right-0 p-sm opacity-20 group-hover:opacity-100 transition-all">
<span class="material-symbols-outlined text-primary-fixed-dim text-4xl">electric_bolt</span>
</div>
<h4 class="font-headline-md text-xl text-on-surface z-10">Liquid DnB</h4>
<p class="font-code-sm text-code-sm text-outline z-10">943 TRACKS</p>
</div>
<div
class="glass-panel h-40 rounded-xl flex flex-col justify-end p-md group cursor-pointer relative overflow-hidden transition-all hover:-translate-y-1">
<div class="absolute top-0 right-0 p-sm opacity-20 group-hover:opacity-100 transition-all">
<span class="material-symbols-outlined text-primary-fixed-dim text-4xl">grid_view</span>
</div>
<h4 class="font-headline-md text-xl text-on-surface z-10">Glitch Hop</h4>
<p class="font-code-sm text-code-sm text-outline z-10">1,120 TRACKS</p>
</div>
</div>
</section>
<!-- Work Allocation / Open Projects -->
<section class="px-margin-mobile md:px-margin-desktop py-xl">
<h2 class="font-headline-md text-headline-md text-on-surface mb-lg">Open Allocations</h2>
<div class="flex flex-col gap-sm">
<div
class="glass-panel rounded-xl p-md flex flex-col md:flex-row md:items-center justify-between hover:bg-white/5 transition-all gap-4 md:gap-0">
<div class="flex items-center gap-md">
<div
class="w-12 h-12 md:w-16 md:h-16 rounded-lg overflow-hidden border border-primary-fixed-dim/20 bg-surface-container flex items-center justify-center shrink-0">
<span
class="material-symbols-outlined text-primary-fixed-dim text-2xl md:text-3xl">lyrics</span>
</div>
<div>
<div class="flex items-center gap-xs flex-wrap">
<h4 class="font-headline-md text-base md:text-lg text-on-surface">Write Cyberpunk
Lyrics</h4>
<span
class="px-xs py-0.5 bg-primary-fixed-dim/20 text-primary-fixed-dim font-label-caps text-[9px] rounded uppercase shrink-0">HUMAN
TASK</span>
</div>
<p
class="font-body-base text-sm text-on-surface-variant max-w-md mt-1 md:mt-0 hidden md:block">
Create Hindi/English lyrics for an upcoming cyberpunk-themed album.</p>
</div>
</div>
<div
class="flex items-center justify-end md:justify-start gap-xl w-full md:w-auto mt-2 md:mt-0 pt-3 md:pt-0 border-t border-white/5 md:border-t-0">
<div class="hidden lg:flex flex-col items-end">
<span class="font-code-sm text-code-sm text-on-surface">OPEN</span>
<span class="font-label-caps text-label-caps text-outline uppercase">STATUS</span>
</div>
<button
class="px-md py-xs border border-white/10 hover:border-primary-fixed-dim text-on-surface font-label-caps text-label-caps rounded transition-all">ACCEPT
WORK</button>
</div>
</div>
<div
class="glass-panel rounded-xl p-md flex flex-col md:flex-row md:items-center justify-between hover:bg-white/5 transition-all gap-4 md:gap-0">
<div class="flex items-center gap-md">
<div
class="w-12 h-12 md:w-16 md:h-16 rounded-lg overflow-hidden border border-primary-fixed-dim/20 bg-surface-container flex items-center justify-center shrink-0">
<span
class="material-symbols-outlined text-primary-fixed-dim text-2xl md:text-3xl">smart_toy</span>
</div>
<div>
<div class="flex items-center gap-xs flex-wrap">
<h4 class="font-headline-md text-base md:text-lg text-on-surface">Generate Music
(Suno)</h4>
<span
class="px-xs py-0.5 bg-secondary-container text-on-secondary-container font-label-caps text-[9px] rounded uppercase shrink-0">AI
TASK</span>
</div>
<p
class="font-body-base text-sm text-on-surface-variant max-w-md mt-1 md:mt-0 hidden md:block">
Use Suno AI to generate 5 tracks using the provided "अम्मी की सीख" lyrics.</p>
</div>
</div>
<div
class="flex items-center justify-end md:justify-start gap-xl w-full md:w-auto mt-2 md:mt-0 pt-3 md:pt-0 border-t border-white/5 md:border-t-0">
<div class="hidden lg:flex flex-col items-end">
<span class="font-code-sm text-code-sm text-primary-fixed-dim">ALLOCATED</span>
<span class="font-label-caps text-label-caps text-outline uppercase">STATUS</span>
</div>
<button
class="px-md py-xs border border-white/10 opacity-50 cursor-not-allowed text-on-surface font-label-caps text-label-caps rounded transition-all">VIEW
DETAILS</button>
</div>
</div>
</div>
</section>