-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
3250 lines (2861 loc) · 106 KB
/
index.html
File metadata and controls
3250 lines (2861 loc) · 106 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 lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Booth Web Preview</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Teko:wght@600&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.9.2/dist/confetti.browser.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
</head>
<body>
<!-- Skip navigation for accessibility -->
<a href="#main-content" class="skip-link">Skip to main content</a>
<!-- Offline indicator -->
<div id="offline-indicator" class="offline-indicator" role="status" aria-live="polite" style="display: none;">
<span aria-hidden="true">⚠️</span> You are offline. Some features may not work.
</div>
<!-- Toast container with aria-live for screen readers -->
<div id="toast-container" class="toast-container" role="region" aria-label="Notifications" aria-live="polite"></div>
<!-- Mobile warning - improved with better text sizing -->
<div id="mobile-error" style="display: none; font-size: clamp(1.5rem, 5vw, 3rem); padding: 2rem;">
<p>This site is optimized for desktop browsers. For the best experience, please use a computer.</p>
</div>
<div class="mainContainer" id="main-content">
<div class="unityContainer">
<canvas id="unity-canvas">
</canvas>
<!-- progress number -->
<div class="progressNumber" id="progressNumber" style="display: block;">Downloading...</div>
</div>
<div class="rightContainer">
<div class="boxContainer">
<div class="uploadSectionTitle">Upload images piece by piece</div>
<div id="topBannerButton" class="uploadContainer" role="button" tabindex="0" aria-label="Upload top banner image, required size 2048x512 pixels" aria-describedby="tooltip-topbanner">
<div class="uploadContainer-main">
<div>Top Banner</div>
<div>2048x512 <span class="tooltip" tabindex="0" role="button" aria-label="Help for Top Banner">?<span class="tooltiptext" id="tooltip-topbanner" role="tooltip">This is the banner displayed at the top of the booth. Ensure your image is exactly 2048x512 pixels for best quality.</span></span></div>
</div>
</div>
<div id="neonGradientButton" class="uploadContainer uploadContainer--gradient" role="button" tabindex="0" aria-label="Upload lantern gradient image, required size 213x150 pixels" aria-describedby="tooltip-lantern">
<div class="uploadContainer-main">
<div>Lantern Gradient</div>
<div>213x150 <span class="tooltip" tabindex="0" role="button" aria-label="Help for Lantern Gradient">?<span class="tooltiptext" id="tooltip-lantern" role="tooltip">This gradient is used for the lantern lighting effect. Upload a 213x150 image; note that lighting is not previewed here.</span></span></div>
<div class="smallText">*Lighting not previewed</div>
</div>
<!-- Gradient Generator -->
<div class="gradient-generator" onclick="event.stopPropagation()" role="group" aria-label="Gradient Generator">
<div class="gradient-controls">
<input type="color" id="gradColor1" value="#00ff7f" title="Start Color" aria-label="Gradient start color">
<span class="arrow" aria-hidden="true">→</span>
<input type="color" id="gradColor2" value="#ff66cc" title="End Color" aria-label="Gradient end color">
</div>
<button id="applyGradientBtn" class="small-button" aria-label="Apply generated gradient">Apply</button>
</div>
</div>
<!-- <div class="posterUploadGrid"> -->
<div id="leftPosterButton" class="uploadContainer" role="button" tabindex="0" aria-label="Upload left poster image, required size 764x1357 pixels" aria-describedby="tooltip-left">
<div class="uploadContainer-main">
<div>Left Poster</div>
<div>764x1357 <span class="tooltip" tabindex="0" role="button" aria-label="Help for Left Poster">?<span class="tooltiptext" id="tooltip-left" role="tooltip">This poster appears on the left side of the booth. Use a 764x1357 image for optimal display.</span></span></div>
</div>
</div>
<div id="deskPosterButton" class="uploadContainer" role="button" tabindex="0" aria-label="Upload small middle poster image, required size 462x761 pixels" aria-describedby="tooltip-middle">
<div class="uploadContainer-main">
<div>Small Middle Poster</div>
<div>462x761 <span class="tooltip" tabindex="0" role="button" aria-label="Help for Small Middle Poster">?<span class="tooltiptext" id="tooltip-middle" role="tooltip">This is the poster in the middle, hung on the middle pillar. Upload a 462x761 image.</span></span></div>
</div>
</div>
<div id="rightPosterButton" class="uploadContainer" role="button" tabindex="0" aria-label="Upload right poster image, required size 764x1357 pixels" aria-describedby="tooltip-right">
<div class="uploadContainer-main">
<div>Right Poster</div>
<div>764x1357 <span class="tooltip" tabindex="0" role="button" aria-label="Help for Right Poster">?<span class="tooltiptext" id="tooltip-right" role="tooltip">This poster appears on the right side of the booth. Use a 764x1357 image for optimal display.</span></span></div>
</div>
</div>
<!-- </div> -->
<div id="lcdDisplayPoster" class="uploadContainer" role="button" tabindex="0" aria-label="Upload booth background wall image, required size 739x461 pixels" aria-describedby="tooltip-bg">
<div class="uploadContainer-main">
<div>Booth Background Wall</div>
<div>739x461 <span class="tooltip" tabindex="0" role="button" aria-label="Help for Booth Background Wall">?<span class="tooltiptext" id="tooltip-bg" role="tooltip">This is the background wall image for the booth. Upload a 739x461 image.</span></span></div>
</div>
</div>
<button id="downloadTemplatesButton" onclick="downloadTemplates()" aria-label="Download template images as ZIP file" style="margin-top: var(--space-2);">Download Template Images</button>
<div class="smallText">Login and submit below</div>
</div>
<div class="boxContainer">
<details class="collapsible legacy-section">
<summary>
<div class="legacy-title">Use a single image atlas instead?</div>
<div class="summary-sub">Preview or download sheet</div>
</summary>
<div class="collapsible-content">
<div id="premadeUploadButton" class="uploadContainer uploadContainer--compact" role="button" tabindex="0" aria-label="Upload 2048x2048 atlas image" style="margin: var(--space-2) 0;">
<div class="uploadContainer-main">
<div>Atlas Upload</div>
<div>2048x2048 <span class="tooltip" tabindex="0" role="button" aria-label="Help for Atlas Upload">?<span class="tooltiptext">Upload your complete booth template as a 2048x2048 PNG image for preview and submission.</span></span></div>
</div>
</div>
<a id="downloadButton" onclick="downloadPoster()">Download the full template</a>
</div>
</details>
<script>
function downloadPoster() {
window.open("./Prefab Poster Sheet.png", "_blank");
}
</script>
<script>
// Template specifications
const templates = [
{ name: "Top_Banner", width: 2048, height: 512 },
{ name: "Lantern_Gradient", width: 213, height: 150 },
{ name: "Left_Poster", width: 764, height: 1357 },
{ name: "Small_Table_Poster", width: 462, height: 761 },
{ name: "Right_Poster", width: 764, height: 1357 },
{ name: "Booth_Background_Wall", width: 739, height: 461 }
];
async function downloadTemplates() {
const zip = new JSZip();
// Harden: Limit concurrent canvas operations to prevent memory issues
const MAX_CONCURRENT = 3;
const results = [];
// Create each template image
for (let i = 0; i < templates.length; i++) {
const template = templates[i];
const canvas = document.createElement('canvas');
canvas.width = template.width;
canvas.height = template.height;
const ctx = canvas.getContext('2d');
// Background: special-case for Lantern_Gradient vs others
if (template.name === 'Lantern_Gradient') {
// Green → Pink left-to-right gradient, no text
const grad = ctx.createLinearGradient(0, 0, template.width, 0);
grad.addColorStop(0, '#00ff7f'); // spring green
grad.addColorStop(1, '#ff66cc'); // pink
ctx.fillStyle = grad;
ctx.fillRect(0, 0, template.width, template.height);
} else {
// Neutral light gradient background
const grad = ctx.createLinearGradient(0, 0, template.width, template.height);
grad.addColorStop(0, '#f0f0f0');
grad.addColorStop(1, '#e0e0e0');
ctx.fillStyle = grad;
ctx.fillRect(0, 0, template.width, template.height);
// Label with name and resolution, auto-fit to width
const friendly = template.name.replace(/_/g, ' ');
const label = `${friendly} — ${template.width}x${template.height}`;
// Base font size relative to canvas, with clamps
let fontSize = Math.max(14, Math.min(96, Math.floor(Math.min(template.width, template.height) * 0.07)));
const maxWidth = Math.floor(template.width * 0.9);
ctx.textAlign = 'center';
// Shrink-to-fit loop (a few iterations max)
for (let i = 0; i < 6; i++) {
ctx.font = `600 ${fontSize}px Teko, Arial, sans-serif`;
const w = ctx.measureText(label).width;
if (w <= maxWidth || fontSize <= 14) break;
const scale = maxWidth / w;
fontSize = Math.max(14, Math.floor(fontSize * scale));
}
// Recompute metrics with final font size
ctx.font = `600 ${fontSize}px Teko, Arial, sans-serif`;
const metrics = ctx.measureText(label);
const padding = Math.round(fontSize * 0.5);
const rectWidth = Math.ceil(metrics.width + padding * 2);
const rectHeight = Math.ceil(fontSize + padding * 0.4);
const rectX = Math.round((template.width - rectWidth) / 2);
const rectY = Math.round(template.height * 0.06);
// Semi-opaque bar for readability
ctx.fillStyle = 'rgba(0,0,0,0.45)';
ctx.fillRect(rectX, rectY, rectWidth, rectHeight);
// Draw text
ctx.fillStyle = '#ffffff';
const textBaselineY = rectY + Math.round(rectHeight * 0.78);
ctx.fillText(label, template.width / 2, textBaselineY);
}
// Harden: Use Promise-based blob creation for better control
const blobPromise = new Promise((resolve) => {
canvas.toBlob((blob) => {
zip.file(`${template.name}_${template.width}x${template.height}.png`, blob);
resolve();
}, 'image/png');
});
results.push(blobPromise);
// Harden: Yield to main thread every few operations
if (i % MAX_CONCURRENT === MAX_CONCURRENT - 1) {
await new Promise(resolve => setTimeout(resolve, 0));
}
}
// Wait for all blobs to be created
await Promise.all(results);
// Harden: Show loading feedback
const downloadBtn = document.getElementById('downloadTemplatesButton');
const originalText = downloadBtn ? downloadBtn.textContent : 'Download';
if (downloadBtn) {
downloadBtn.textContent = 'Creating ZIP...';
downloadBtn.disabled = true;
}
try {
// Generate and download zip
const content = await zip.generateAsync({ type: 'blob' });
const url = URL.createObjectURL(content);
const a = document.createElement('a');
a.href = url;
a.download = 'PJKT_Booth_Templates.zip';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
// Harden: Show success feedback
window.showToast('Templates downloaded!', '📦');
} catch (error) {
console.error('Failed to generate ZIP:', error);
sendErrorNotification(true, 'Failed to download templates. Please try again.', false);
} finally {
// Harden: Restore button state
if (downloadBtn) {
downloadBtn.textContent = originalText;
downloadBtn.disabled = false;
}
}
}
</script>
</div>
<div class="boxContainerLogin">
<div class="errorSection" id="errorNotification" style="display: none;" role="alert" aria-live="assertive">Error</div>
<div class="loginButtons" role="form" aria-label="Login Form">
<div id="userName" role="status" aria-live="polite"></div>
<!-- Email field with visible label -->
<div class="formGroup">
<label for="email" class="input-label">Email Address</label>
<input type="text" id="email" placeholder="your@email.com" aria-label="Email address" autocomplete="email" required maxlength="254" autocapitalize="off" spellcheck="false">
</div>
<!-- Password field with visible label -->
<div class="formGroup">
<label for="password" class="input-label">Password</label>
<input type="password" id="password" placeholder="Enter your password" aria-label="Password" autocomplete="current-password" required minlength="6" maxlength="128">
</div>
<button id="loginButton" aria-label="Login to your account">Login</button>
<div class="button-row">
<button id="registerButton" aria-label="Create a new account">Register!</button>
<button id="forgotPasswordButton" aria-label="Reset your password">Forgot Password?</button>
</div>
</div>
<div class="forgotPasswordSection" style="display: none;" role="form" aria-label="Password Reset Form">
<div class="formGroup">
<label for="forgotPasswordEmail" class="input-label">Email Address</label>
<input type="text" id="forgotPasswordEmail" placeholder="your@email.com" aria-label="Email address for password reset" autocomplete="email" required maxlength="254" autocapitalize="off" spellcheck="false">
</div>
<button id="forgotPasswordButtonFinal" aria-label="Send password reset email">Send Reset Email</button>
<button id="BackToLogin" aria-label="Return to login form">Back to Login</button>
</div>
<div style="display: none;" class="codeCheck" role="form" aria-label="Invite Code Verification">
<div class="titleText">Nuh uh, what's the magic code?</div>
<div class="formGroup">
<label for="inviteCode" class="input-label">Invite Code</label>
<input type="text" id="inviteCode" placeholder="Enter invite code" aria-label="Invite code" autocomplete="off" maxlength="100" autocapitalize="characters" spellcheck="false">
</div>
<button id="codeCheckButton" aria-label="Verify invite code">Check Code</button>
<button id="BackToLoginCodeCheck" aria-label="Return to login form">Back to Login</button>
</div>
<div style="display: none;" class="registerForm">
<div class="titleText">Hell YE? Register here!</div>
<div class="formGroup">
<label for="registerEmail" class="input-label">Email Address</label>
<input type="text" id="registerEmail" placeholder="your@email.com" aria-label="Email address" autocomplete="email" required maxlength="254" autocapitalize="off" spellcheck="false">
</div>
<div class="formGroup">
<label for="registerUsername" class="input-label">Username <span class="label-hint">(3-30 characters, letters, numbers, underscores)</span></label>
<input type="text" id="registerUsername" placeholder="Choose a username" aria-label="Username (3-30 characters, letters and numbers only)" autocomplete="username" required minlength="3" maxlength="30" pattern="[a-zA-Z0-9_-]+" autocapitalize="off" spellcheck="false">
</div>
<div class="formGroup">
<label for="registerPassword" class="input-label">Password <span class="label-hint">(minimum 6 characters)</span></label>
<input type="password" id="registerPassword" placeholder="Create a password" aria-label="Password (minimum 6 characters)" autocomplete="new-password" required minlength="6" maxlength="128">
</div>
<div class="formGroup">
<label for="registerPasswordConfirm" class="input-label">Confirm Password</label>
<input type="password" id="registerPasswordConfirm" placeholder="Re-enter your password" aria-label="Confirm password" autocomplete="new-password" required>
</div>
<button id="registerSubmitButtonFinal" aria-label="Create account">Register</button>
<button id="BackToLoginRegister" aria-label="Return to login form">Back to Login</button>
</div>
<div style="display: none;" class="uploadButtons" role="region" aria-label="Booth Submission">
<div class="userHeader">
<div class="userNameMOTD" id="userNameMOTD" role="status" aria-live="polite"></div>
<button id="logoutButton" class="iconButton" title="Logout" aria-label="Logout from your account">Logout</button>
</div>
<div class="formDivider"></div>
<div class="subHeader">Booth Submission</div>
<form id="boothForm" class="compactForm">
<div class="formGroup">
<label for="communitiesDropDown">Community</label>
<select id="communitiesDropDown" aria-label="Select community" required>
<option value="" disabled selected>Select a community</option>
</select>
<a href="#" id="loggedInInviteCode" class="tinyLink" aria-label="Join community with invite code">Have an invite code?</a>
</div>
<div style="display: none;" class="inviteCodeContainer" role="form" aria-label="Join Community with Invite Code">
<div class="formGroup">
<label for="inviteCodeLoggedIn" class="input-label">Invite Code</label>
<input type="text" id="inviteCodeLoggedIn" placeholder="Enter invite code" aria-label="Invite code" autocomplete="off" maxlength="100" autocapitalize="characters" spellcheck="false">
</div>
<button id="inviteCodeSubmitButton" aria-label="Submit invite code">Submit</button>
</div>
<div class="formGroup">
<label for="eventDropDown">Event</label>
<select id="eventDropDown" aria-label="Select event" required>
<option value="" disabled selected>Select an event</option>
</select>
<div class="deadline-display" id="eventDeadline" role="status" aria-live="polite">
<span class="deadline-label">Deadline:</span>
<span class="deadline-date">—</span>
</div>
</div>
<select id="selectedBooth" style="display: none;" aria-hidden="true">
<option value="2025">2025</option>
</select>
</form>
<button style="display: none;" id="uploadButton" class="primaryUploadButton" aria-label="Upload booth submission">Upload Booth</button>
</div>
</div>
</div>
</div>
</body>
<style>
:root {
/* Color System */
--bg-main: #0f0f13;
--bg-secondary: #1a1a24;
--bg-elevated: #22222e;
--text-color: #e0e0e0;
--text-muted: rgba(224, 224, 224, 0.6);
--text-subtle: rgba(224, 224, 224, 0.4);
--accent-purple: #d946ef;
--accent-blue: #06b6d4;
--accent-yellow: #facc15;
--accent-green: #22c55e;
--button-bg: #2e2e3a;
--glow-color: rgba(217, 70, 239, 0.4);
--font-title: 'Teko', sans-serif;
--font-body: 'Space Grotesk', sans-serif;
--error-bg: rgba(255, 0, 0, 0.1);
--error-border: #ff4444;
--success-bg: rgba(0, 255, 0, 0.1);
--success-border: #00ff00;
/* Spacing System — 4px base unit */
--space-1: 0.2rem; /* 3.2px */
--space-2: 0.4rem; /* 6.4px */
--space-3: 0.6rem; /* 9.6px */
--space-4: 0.8rem; /* 12.8px */
--space-5: 1rem; /* 16px */
--space-6: 1.25rem; /* 20px */
--space-8: 1.75rem; /* 28px */
--space-10: 2rem; /* 32px */
--space-12: 2.5rem; /* 40px */
--space-16: 3rem; /* 48px */
/* Layout */
--sidebar-width: clamp(300px, 30vw, 400px);
--container-radius: 10px;
--input-radius: 6px;
}
/* Text overflow handling utilities */
.truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.line-clamp-3 {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* Prevent flex/grid overflow */
.min-w-0 {
min-width: 0;
}
/* RTL Support - Logical properties */
.logical-padding {
padding-inline: 1rem;
padding-block: 0.5rem;
}
.logical-margin {
margin-inline: 0.3em;
margin-block: 0.15em;
}
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
/* High contrast mode support */
@media (prefers-contrast: high) {
:root {
--text-color: #ffffff;
--bg-main: #000000;
--bg-secondary: #1a1a1a;
--accent-purple: #ff00ff;
--accent-blue: #00ffff;
--accent-yellow: #ffff00;
}
button, input, select, .uploadContainer {
border-width: 2px !important;
}
}
/* Focus visible for keyboard navigation */
:focus-visible {
outline: 2px solid var(--accent-blue);
outline-offset: 2px;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
outline: 2px solid var(--accent-blue);
outline-offset: 2px;
box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.3);
}
html, body {
margin: 0;
height: 100vh;
background-color: var(--bg-main);
font-family: var(--font-body);
font-size: 15px;
line-height: 1.5;
letter-spacing: -0.01em;
animation: fadeInUp 1.2s ease-out;
overflow: hidden;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
input {
/* padding: 14px 16px; */
font-family: var(--font-body);
text-align: center;
color: var(--text-color);
text-decoration: none;
align-self: center;
object-fit: contain;
}
a {
color: var(--accent-purple);
text-decoration: none;
transition: color 0.3s ease;
}
a:hover {
color: var(--accent-blue);
text-shadow: 0 0 8px var(--accent-blue);
}
input[type="text"], input[type="password"] {
background-color: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: var(--input-radius);
border-bottom: 2px solid var(--accent-purple);
color: var(--text-color);
font-size: 1rem;
font-weight: 400;
margin: var(--space-1) 0;
padding: var(--space-3);
width: 85%;
transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
/* Harden: Text overflow and RTL support */
text-overflow: ellipsis;
unicode-bidi: plaintext;
letter-spacing: 0;
}
/* Harden: Input validation states */
input[type="text"].invalid,
input[type="password"].invalid {
border-bottom-color: var(--error-border);
background-color: var(--error-bg);
}
input[type="text"].valid,
input[type="password"].valid {
border-bottom-color: var(--success-border);
background-color: var(--success-bg);
}
/* Harden: Disabled state */
input[type="text"]:disabled,
input[type="password"]:disabled {
opacity: 0.5;
cursor: not-allowed;
}
input[type="text"]:focus, input[type="password"]:focus {
border-bottom: 2px solid var(--accent-blue);
background-color: rgba(255, 255, 255, 0.1);
box-shadow: 0 0 15px rgba(4, 197, 252, 0.3);
outline: none;
}
button {
background-color: var(--button-bg);
border: 1px solid rgba(255, 255, 255, 0.1);
color: var(--text-color);
font-family: var(--font-title);
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
font-size: 1.125rem;
margin: var(--space-1) 0;
padding: var(--space-2) var(--space-4);
width: 85%;
border-radius: var(--input-radius);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
transition: background-color 0.2s ease,
color 0.2s ease,
transform 0.2s ease,
box-shadow 0.2s ease;
position: relative;
overflow: hidden;
cursor: pointer;
/* Prevent text overflow */
white-space: nowrap;
text-overflow: ellipsis;
/* Minimum touch target */
min-height: 44px;
}
/* Harden: Disabled button state */
button:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none !important;
box-shadow: none !important;
}
button:disabled::before {
display: none;
}
/* Harden: Loading state */
button.loading {
position: relative;
color: transparent;
}
button.loading::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 1em;
height: 1em;
margin: -0.5em 0 0 -0.5em;
border: 2px solid transparent;
border-top-color: currentColor;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.5s;
}
button:hover::before {
left: 100%;
}
/* Animated hover and click */
button:hover {
background-color: var(--accent-yellow);
color: #000; /* Black text on yellow for contrast */
transform: translateY(-2px) scale(1.02);
box-shadow: 0 0 20px var(--accent-yellow), 0 0 40px rgba(250, 204, 21, 0.4);
border-color: var(--accent-yellow);
}
.spooky-theme-active button:hover {
background-color: #008d00; /* Darker green for hover */
color: #ffffff; /* White text for contrast */
box-shadow: 0 0 20px #00ff00;
}
button:active {
background-color: var(--accent-blue);
color: #000;
transform: translateY(0);
box-shadow: 0 0 10px var(--accent-blue);
}
select {
background-color: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: var(--input-radius);
border-bottom: 2px solid var(--accent-purple);
color: var(--text-color);
font-family: var(--font-body);
font-size: 0.9375rem;
font-weight: 500;
margin: 0;
padding: var(--space-3) var(--space-4);
width: 100%;
text-align-last: left;
transition: all 0.2s ease;
cursor: pointer;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d946ef' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right var(--space-4) center;
padding-right: var(--space-8);
}
select option {
background-color: var(--bg-secondary);
color: var(--text-color);
}
select:focus {
outline: none;
border-bottom-color: var(--accent-blue);
box-shadow: 0 0 15px rgba(4, 197, 252, 0.3);
}
.titleText {
font-family: var(--font-title);
font-weight: 600;
letter-spacing: 0.02em;
font-size: 1.75rem;
color: var(--text-color);
margin: var(--space-2) 0;
line-height: 1.2;
}
.subText {
font-size: 1em;
color: var(--text-muted);
}
.errorSection {
color: var(--text-color);
font-size: 1em;
margin: var(--space-1) 0;
padding: var(--space-1);
width: 80%;
border-radius: var(--input-radius);
border-color: #ff0000;
border-style: solid;
background-color: var(--bg-secondary);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.userNameMOTD {
font-family: var(--font-body);
font-weight: 600;
font-size: clamp(1rem, 2.5vw, 1.25rem);
color: var(--accent-purple);
margin: 0;
letter-spacing: -0.01em;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.uploadContainer {
background-color: rgba(255, 255, 255, 0.03);
border-radius: var(--input-radius);
border: 1px solid var(--accent-yellow);
color: var(--text-color);
font-size: 0.85em;
margin: var(--space-2) var(--space-4);
padding: var(--space-2) var(--space-3);
width: calc(100% - 2 * var(--space-4));
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
transition: all 0.2s ease;
position: relative;
z-index: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
min-height: 3.5em;
}
.uploadContainer::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: inherit;
box-shadow: 0 0 15px var(--glow-color), 0 0 30px var(--glow-color);
opacity: 0;
transition: opacity 0.4s ease;
z-index: -1;
pointer-events: none;
}
.uploadContainer:hover::after {
opacity: 1;
animation: glow 2s infinite;
}
.uploadContainer div:first-child {
font-family: var(--font-body);
font-size: 0.95rem;
font-weight: 600;
letter-spacing: 0.02em;
margin-bottom: 0;
white-space: nowrap;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.uploadContainer div:nth-child(2) {
font-size: 0.8em;
color: var(--text-muted);
white-space: nowrap;
display: flex;
align-items: center;
gap: var(--space-1);
}
/* Unity injected file input and status text */
.uploadContainer input[type="file"] {
font-size: 0.75em;
max-width: 120px;
padding: var(--space-1) 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.uploadContainer .smallText {
font-size: 0.7em;
color: var(--text-subtle);
margin-top: 0;
white-space: nowrap;
}
/* Standard upload container layout */
.uploadContainer > .uploadContainer-main {
display: flex;
flex-direction: row;
align-items: center;
gap: var(--space-3);
flex: 1;
}
.uploadContainer > .uploadContainer-main div:first-child {
min-width: 120px;
}
/* Compact variant for collapsible section */
.uploadContainer--compact {
padding: var(--space-2) var(--space-3);
min-height: 2.5em;
}
.uploadContainer--compact .uploadContainer-main div:first-child {
min-width: 100px;
}
.uploadButtons {
font-size: 1.3em;
width: 100%;
display: flex;
flex-direction: column;
align-items: stretch;
}
.smallText {
font-size: 0.8125rem;
color: var(--text-subtle);
font-weight: 400;
line-height: 1.4;
}
.uploadButtons .subText {
font-size: 0.75em;
color: var(--text-muted);
}
#downloadTemplatesButton {
background-color: var(--button-bg);
border: 1px solid rgba(255, 255, 255, 0.1);
color: var(--text-color);
font-size: 1.1em;
margin: var(--space-2) 0;
padding: var(--space-2) var(--space-4);
width: 85%;
border-radius: var(--input-radius);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
cursor: pointer;
font-family: var(--font-title);
font-weight: 600;
letter-spacing: 0.05em;
text-transform: uppercase;
}
#downloadTemplatesButton:hover {
background-color: var(--accent-yellow);
color: #000;
box-shadow: 0 2px 12px rgba(250, 204, 21, 0.3);
transition: all 0.2s ease;
}
.mainContainer {
color: var(--text-color);
text-align: center;
height: 100vh;
background-color: var(--bg-main);
display: grid;
grid-template-columns: 1fr var(--sidebar-width);
}
.unityContainer {
position: relative;
display: block;
width: 100%;
height: 100vh;
margin: 0;
padding: var(--space-4);
overflow: hidden;
box-sizing: border-box;
background-color: var(--bg-main);
}
#unity-canvas {
width: 100% !important;
height: 100% !important;
display: block;
margin: 0;
padding: 0;
border-radius: var(--container-radius);
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.progressNumber {
position: absolute;
top: var(--space-4);
right: var(--space-4);
background: rgba(0,0,0,0.5);
padding: var(--space-2) var(--space-3);
border-radius: var(--input-radius);
pointer-events: none;
}
.rightContainer {
background-color: var(--bg-main);
height: 100vh;
overflow-y: auto;
padding: var(--space-3);
padding-bottom: var(--space-12);
position: relative;
display: flex;
flex-direction: column;
gap: var(--space-4);
}
.rightContainer::after {
content: '';
display: block;
height: var(--space-10);
width: 100%;
}
#mobile-error {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
color: white;
text-align: center;
padding-top: 50vh;
z-index: 9999;
}
.boxContainer {
/* Align all items in the middle top */
row-gap: var(--space-2);
text-align: center;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
font-size: 1rem;
font-weight: 400;
background-color: var(--bg-elevated);
border-radius: var(--container-radius);
border: 1px solid rgba(255, 255, 255, 0.05);
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
animation: fadeInUp 0.8s ease-out;
padding: var(--space-3);
}
/* Normalize inner spacing in cards */
.boxContainer > :last-child { margin-bottom: 0; }
.boxContainerLogin {
/* Align all items in the middle top */
row-gap: var(--space-2);
text-align: center;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
font-size: 0.9375rem;
font-weight: 400;
background-color: var(--bg-elevated);
border-radius: var(--container-radius);
border: 1px solid rgba(255, 255, 255, 0.05);
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
animation: fadeInUp 0.8s ease-out 0.2s both;
}
.posterUploadGrid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 0.3em;
}
.subText {
font-size: 1.3em;
color: rgba(224, 224, 224, 0.6);
}
/* Tooltip styles - hardened for accessibility */
.tooltip {
position: relative;
display: inline-block;
cursor: help;
margin-left: var(--space-2);
color: var(--accent-blue);