-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
1315 lines (1164 loc) · 39.1 KB
/
style.css
File metadata and controls
1315 lines (1164 loc) · 39.1 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
:root {
/* --- Dark Mode --- */
/* Latar belakang lebih gelap dan keunguan */
--bg-color-dark: #100C1F;
--bg-color-light: #19152C;
/* Warna primer yang khas */
--primary-color: #7B47F5;
--primary-color-rgb: 123, 71, 245;
--primary-hover-color: #8F64F8;
/* Warna sekunder baru yang selaras */
--secondary-color: #2A2440;
--secondary-color-rgb: 42, 36, 64;
--secondary-hover-color: #383158;
/* Kaca yang disesuaikan dengan latar belakang baru */
--card-bg-color: rgba(42, 36, 64, 0.5); /* Semi-transparent glass */
--card-border-color: rgba(123, 71, 245, 0.2); /* Border 'glow' ungu */
--text-color: #e2e8f0;
--subtle-text-color: #a0aec0;
--input-bg-color: rgba(42, 36, 64, 0.7);
--success-color: #28a745;
--success-color-rgb: 40, 167, 69;
--error-color: #dc3545;
--error-color-rgb: 220, 53, 69;
}
html.light {
/* --- Light Mode Colors (Bright & Clean) --- */
/* Mode terang tidak diubah, fokus pada permintaan dark mode */
--bg-color-dark: #eef2f9;
--bg-color-light: #ffffff;
--primary-color: #6366f1;
--primary-color-rgb: 99, 102, 241;
--primary-hover-color: #7b7df3;
--secondary-color: #f3f4f6;
--secondary-color-rgb: 243, 244, 246;
--secondary-hover-color: #e5e7eb;
--card-bg-color: rgba(255, 255, 255, 0.6);
--card-border-color: rgba(99, 102, 241, 0.2);
--text-color: #1f2937;
--subtle-text-color: #6b7280;
--input-bg-color: rgba(243, 244, 246, 0.8);
--success-color: #16a34a;
--success-color-rgb: 22, 163, 74;
--error-color: #ef4444;
--error-color-rgb: 239, 68, 69;
}
:root {
/* Skema Warna Khusus Halaman History */
--history-classic: var(--primary-color); /* Ungu Utama (#7B47F5) */
--history-continent: #14b8a6; /* Teal/Cyan (Muted/bukan neon) */
--history-capital: #f59e0b; /* Oranye Kekuningan (Warna Accuracy) */
--history-year: #f97316; /* Oranye */
--history-timeattack: #3b82f6; /* Biru (Warna Time Average) */
--history-survival: var(--success-color); /* Hijau Success (#28a745) */
--history-combo: var(--error-color); /* Merah Failed/Wrong (Sesuaikan dengan --error-color Anda) */
--history-bookmarks: #EC41B1; /* Pink/Magenta Aksen */
/* Indikator Umum */
--history-correct: var(--success-color);
--history-wrong: var(--error-color);
--history-accuracy: #f59e0b;
--history-time-avg: #3b82f6;
}
/* ==========================================
UTILITY CLASSES UNTUK CARD / TEXT HISTORY
========================================== */
/* Kelas Warna Teks */
.text-hist-classic { color: var(--history-classic); }
.text-hist-continent { color: var(--history-continent); }
.text-hist-capital { color: var(--history-capital); }
.text-hist-year { color: var(--history-year); }
.text-hist-timeattack { color: var(--history-timeattack); }
.text-hist-survival { color: var(--history-survival); }
.text-hist-combo { color: var(--history-combo); }
.text-hist-bookmarks { color: var(--history-bookmarks); }
.text-hist-correct { color: var(--history-correct); }
.text-hist-wrong { color: var(--history-wrong); }
/* Kelas Background Badge / Border Card Masing-masing Mode (Efek Glassmorphism Tipis) */
.badge-hist-classic { background: rgba(123, 71, 245, 0.15); border: 1px solid var(--history-classic); }
.badge-hist-continent { background: rgba(20, 184, 166, 0.15); border: 1px solid var(--history-continent); }
.badge-hist-capital { background: rgba(245, 158, 11, 0.15); border: 1px solid var(--history-capital); }
.badge-hist-year { background: rgba(249, 115, 22, 0.15); border: 1px solid var(--history-year); }
.badge-hist-timeattack { background: rgba(59, 130, 246, 0.15); border: 1px solid var(--history-timeattack); }
.badge-hist-survival { background: rgba(40, 167, 69, 0.15); border: 1px solid var(--history-survival); }
.badge-hist-combo { background: rgba(220, 53, 69, 0.15); border: 1px solid var(--history-combo); }
.badge-hist-bookmarks { background: rgba(236, 65, 177, 0.15); border: 1px solid var(--history-bookmarks); }
/* 1. Pastikan html dan body mengambil tinggi penuh tanpa overflow */
html, body {
height: 100%;
margin: 0;
padding: 0;
}
/* 1. Tambahkan lapisan gradient di elemen HTML agar benar-benar statis */
html::before {
content: "";
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 120vh;
z-index: -2; /* Di bawah globe (yang z-indexnya -1) */
pointer-events: none;
/* Pindahkan gradient Anda ke sini */
background-image:
radial-gradient(at 15% 15%, hsla(258, 88%, 60%, 0.15) 0px, transparent 50%),
radial-gradient(at 80% 20%, hsla(320, 78%, 55%, 0.1) 0px, transparent 50%),
radial-gradient(at 50% 80%, hsla(258, 88%, 60%, 0.1) 0px, transparent 50%),
radial-gradient(at 90% 90%, hsla(320, 78%, 55%, 0.15) 0px, transparent 50%),
linear-gradient(135deg, var(--bg-color-dark), var(--bg-color-light));
background-size: cover;
/* Tambahkan ini agar transisi antar screen tidak 'lompat' */
will-change: transform;
transform: translateZ(0);
}
body {
font-family: 'Poppins', sans-serif;
color: var(--text-color);
transition: color 0.3s ease;
min-height: 100dvh;
padding-bottom: 80px; /* Sesuaikan dengan tinggi nav + jarak aman */
background-color: var(--bg-color-dark); /* Warna dasar fallback */
margin: 0;
position: relative;
/* Mencegah scroll memantul yang sering memicu area hantu */
overscroll-behavior-y: none;
min-height: 100.1dvh; /* Paksa sedikit lebih tinggi dari layar */
}
/* --- Core Component Styling --- */
.card {
background-color: var(--card-bg-color);
backdrop-filter: blur(12px) saturate(150%);
-webkit-backdrop-filter: blur(12px) saturate(150%);
border: 1px solid var(--card-border-color);
/* Menambah 'glow' yang konsisten */
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2), 0 0 15px rgba(var(--primary-color-rgb), 0.1);
transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.btn {
transition: all 0.2s ease-in-out;
border: none;
font-weight: 600;
border-radius: 0.5rem; /* 8px */
}
.btn:hover {
transform: translateY(-3px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.btn:active {
transform: translateY(-1px);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
/* --- Tombol Utama dengan Gradient --- */
.btn-primary {
/* Menggunakan gradient (Violet ke Magenta/Pink) */
background-image: linear-gradient(90deg, var(--primary-color) 0%, #EC41B1 100%);
color: white;
background-size: 200% 100%;
transition: all 0.4s ease-in-out;
}
.btn-primary:hover {
/* Efek hover yang lebih 'glowing' dengan animasi geser gradient */
background-position: 100% 0;
box-shadow: 0 0 25px rgba(var(--primary-color-rgb), 0.6), 0 0 20px rgba(236, 65, 177, 0.4);
transform: translateY(-3px);
}
.btn-secondary {
background-color: var(--secondary-color);
color: var(--text-color);
}
.btn-secondary:hover {
background-color: var(--secondary-hover-color);
box-shadow: 0 0 15px rgba(var(--secondary-color-rgb), 0.3);
}
#library-search-input,
.settings-input {
background-color: var(--input-bg-color);
border: 1px solid var(--card-border-color);
color: var(--text-color);
}
#library-search-input::placeholder {
color: var(--subtle-text-color);
}
/* 1. Aturan umum .screen */
.screen {
display: none;
width: 100% !important;
/* Hapus max-width: 600px dari sini agar tidak memukul rata semua halaman */
margin-left: auto;
margin-right: auto;
animation: slideDown 0.5s ease-out forwards;
}
/* 2. Berikan batas 600px HANYA untuk layar selain Library */
/* Ini agar menu utama & quiz tetap rapi di tengah */
.screen:not(#library-display-screen) {
max-width: 600px !important;
}
/* 3. Khusus untuk Library, berikan lebar maksimal yang besar */
#library-display-screen {
max-width: 95% !important; /* Sekarang Library bisa melebar ke samping */
/* --- TAMBAHKAN 2 BARIS INI --- */
margin-top: 0 !important; /* Memastikan tidak ada jarak berlebih di atas */
margin-bottom: auto !important; /* Mendorong ruang kosong ke bawah agar layar naik ke atas */
}
.screen.active {
display: flex;
flex-direction: column;
align-items: stretch;
text-align: center;
}
/* 4. Khusus elemen teks/judul agar tetap di tengah secara visual */
.screen.active h1,
.screen.active h2,
.screen.active p,
.screen.active .flex-center-custom {
align-self: center;
}
/* 5. Penyesuaian Grid Library agar pas di lebar 600px */
#library-grid {
display: grid !important; /* Tetap pastikan dia grid */
width: 100% !important;
padding: 10px 0;
}
@media (max-width: 480px) {
#library-grid {
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
}
/* Memaksa semua kontainer layar library agar memenuhi lebar */
#library-display-screen,
#library-grid,
.screen {
width: 100% !important;
max-width: 95vw !important; /* Menggunakan viewport width */
margin-left: auto !important;
margin-right: auto !important;
}
/* Mengatur agar item di dalam grid punya lebar yang pas */
#library-grid > div {
width: 100% !important;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
/* --- Specific Element Tweaks --- */
#home-screen h1 {
/* Gradient judul disesuaikan dengan palet baru (Violet ke Pink) */
background: linear-gradient(90deg, var(--primary-hover-color), #EC41B1);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: 700;
display: inline-block; /* Fix for gradient clipping */
padding-bottom: 0.2em; /* Fix for gradient clipping */
}
#totalscore-container {
background-color: var(--card-bg-color);
padding: 0.5rem 1rem;
border-radius: 9999px;
border: 1px solid var(--card-border-color);
color: var(--text-color) !important;
}
/* Efek Hover untuk Total Score Container agar sama dengan Profile/Settings */
#totalscore-container:hover {
background-color: var(--secondary-hover-color) !important; /* Warna abu-abu ungu khas tombol lain */
border-color: rgba(var(--primary-color-rgb), 0.4); /* Beri sedikit kilau ungu pada border saat dihover */
transition: all 0.3s ease;
}
/* Pastikan tidak ada pergerakan posisi (translate) saat di klik */
#totalscore-container:active {
background-color: var(--secondary-color); /* Sedikit lebih gelap saat ditekan */
transform: none !important;
}
.text-subtle { color: var(--subtle-text-color); }
/* Fun Fact Button (sudah bagus, hanya ganti warna) */
.fun-fact-btn {
background: linear-gradient(270deg, var(--primary-color), #EC41B1, var(--primary-hover-color));
background-size: 400% 400%;
animation: gradientShift 15s ease infinite;
color: #fff;
}
.fun-fact-btn:hover {
transform: translateY(-2px);
box-shadow: 0 0 18px rgba(var(--primary-color-rgb), 0.6);
}
@keyframes gradientShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
/* Container utama tetap 2 kolom */
#options-container {
display: grid;
grid-template-columns: repeat(2, 1fr); /* Tetap 2 menyamping */
gap: 12px;
width: 100%;
margin-top: 20px;
}
/* Tombol Opsi yang bisa nambah tinggi kalau teks panjang */
#options-container button {
width: 100%;
min-height: 70px; /* Tinggi minimal supaya rapi */
height: auto !important; /* KUNCI: Biar tinggi ngikutin teks */
padding: 10px 8px;
/* Agar teks turun ke bawah kalau panjang */
white-space: normal !important;
word-wrap: break-word;
overflow-wrap: break-word;
/* Layout teks di dalam tombol */
display: flex;
align-items: center;
justify-content: center;
text-align: center;
line-height: 1.2;
font-size: 0.9rem; /* Sedikit dikecilkan agar aman di mobile */
}
/* Khusus untuk teks yang benar-benar panjang (seperti Sri Jayawardenepura Kotte) */
@media (max-width: 480px) {
#options-container button {
font-size: 0.8rem; /* Lebih kecil sedikit di HP kecil */
padding: 8px 4px;
}
}
/* Quiz Answer Buttons */
.option-btn:hover:not(:disabled) {
border-color: var(--primary-color);
color: var(--primary-color);
box-shadow: 0 0 12px rgba(var(--primary-color-rgb), 0.4);
}
.option-btn.correct {
background-color: var(--success-color) !important;
border-color: var(--success-color) !important;
color: #fff !important;
transform: scale(1.05);
box-shadow: 0 0 15px rgba(var(--success-color-rgb), 0.6);
}
.option-btn.incorrect {
background-color: var(--error-color) !important;
border-color: var(--error-color) !important;
color: #fff !important;
animation: shake 0.5s;
box-shadow: 0 0 15px rgba(var(--error-color-rgb), 0.6);
}
@keyframes shake {
0%, 100% { transform: translateX(0); }
10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
20%, 40%, 60%, 80% { transform: translateX(5px); }
}
/* Flag Image Styling */
.flag-img {
border-radius: 8px;
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease-in-out;
}
#quiz-screen .flag-img {
max-height: clamp(8rem, 15vh, 12rem);
width: auto;
margin: 0 auto 1rem auto;
}
.flag-wrapper {
display: flex;
justify-content: center;
align-items: center;
aspect-ratio: 4 / 3;
width: 100%;
overflow: hidden;
border-radius: 4px;
}
#quiz-screen .flag-img.correct-flag {
box-shadow: 0 0 25px 5px rgba(var(--success-color-rgb), 0.7);
transform: scale(1.05);
}
#quiz-screen .flag-img.incorrect-flag {
box-shadow: 0 0 25px 5px rgba(var(--error-color-rgb), 0.7);
}
#library-display-screen img.flag-img,
#library-categories-screen img.flag-img,
#continent-library-screen img.flag-img,
#subdivision-library-screen img.flag-img,
#territory-library-screen img.flag-img,
#historical-library-screen img.flag-img {
width: auto !important;
height: auto !important;
max-height: 6rem;
max-width: 100%;
object-fit: contain !important;
display: block;
margin: 0 auto;
}
/* Modal Styling */
.modal {
display: none;
position: fixed;
z-index: 1050;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
justify-content: center;
align-items: center;
animation: fadeIn 0.3s ease;
/* --- TAMBAHAN UNTUK GAP BOTTOM NAV --- */
/* Memberi jarak bawah 90px (nav 70px + gap 20px), dan jarak aman di sisi lain */
padding: 20px 20px 90px 20px;
box-sizing: border-box;
}
/* --- TAMBAHKAN CLASS BARU INI DI BAWAHNYA --- */
/* Mengunci scroll pada body saat modal terbuka */
body.modal-open {
overflow: hidden !important;
}
.modal.active { display: flex; }
.modal .card { animation: zoomIn 0.3s ease-out; }
/* Tambahkan ini di bawah class modal untuk Custom Scrollbar */
.modal-scrollable-content {
scrollbar-width: thin;
scrollbar-color: var(--primary-color) transparent;
}
.modal-scrollable-content::-webkit-scrollbar {
width: 4px;
}
.modal-scrollable-content::-webkit-scrollbar-thumb {
background-color: var(--primary-color);
border-radius: 10px;
}
@keyframes zoomIn {
from { transform: scale(0.9); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}
.icon-text .fa-fw { margin-right: 0.75rem; }
/* ============================================================
SETTINGS, PROFILE, & DISCLAIMER PANEL
============================================================ */
/* Properti Bersama (Sistem Kerja Panel) */
#settings-panel,
#profile-panel,
#level-info-panel,
#disclaimer-panel {
display: none;
position: fixed;
z-index: 1000;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 10px 30px rgba(0,0,0,0.6);
scrollbar-width: thin;
scrollbar-color: var(--primary-color) transparent;
/* Tambahkan max-width agar tidak jebol di HP */
max-width: 90vw;
}
/* Ukuran Spesifik: Profile & Settings (Side Panels) */
#settings-panel,
#profile-panel,
#level-info-panel {
width: 320px;
}
/* Pengaturan Posisi */
#settings-panel {
top: 100px;
right: 20px;
}
#profile-panel,
#level-info-panel {
top: 100px;
left: 20px;
}
#disclaimer-panel {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* Aktivasi & Animasi */
#settings-panel.active,
#profile-panel.active,
#level-info-panel.active {
display: block;
animation: slideDown 0.3s ease-out;
}
/* Penyesuaian Konten di Dalam Panel Level Info */
#level-info-panel h4 {
color: var(--text-color);
font-weight: bold;
margin-bottom: 0.5rem;
}
#level-info-panel ul li {
border-bottom: 1px solid var(--card-border-color);
padding-bottom: 0.5rem;
color: var(--subtle-text-color);
}
/* style.css */
#level-progress-bar {
box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.5);
border-radius: inherit;
}
#disclaimer-panel.active {
display: block;
animation: fadeInCenter 0.3s ease-out;
}
/* Update di style.css */
#disclaimer-panel {
/* Lebar tetap */
width: 480px;
/* PERBAIKAN: Gunakan variabel agar otomatis berubah saat Light Mode */
background-color: var(--card-bg-color) !important;
/* Efek blur tetap ada */
backdrop-filter: blur(25px) saturate(160%);
-webkit-backdrop-filter: blur(25px) saturate(160%);
/* PERBAIKAN: Border mengikuti tema */
border: 1px solid var(--card-border-color);
/* Bayangan mengikuti tema (lebih tipis di light mode agar elegan) */
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
/* Pastikan warna teks di dalam judul disclaimer juga mengikuti tema */
#disclaimer-title {
color: var(--text-color);
}
/* Pastikan teks isi disclaimer menggunakan variabel warna teks yang tepat */
#disclaimer-content {
color: var(--subtle-text-color);
}
/* Tambahan: Beri sedikit jarak pada tombol close di dalam panel agar tidak mepet */
#disclaimer-panel .mt-4 {
margin-top: 1.5rem;
}
/* ============================================================
ANIMASI
============================================================ */
@keyframes slideDown {
from { transform: translateY(-20px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeInCenter {
from {
opacity: 0;
transform: translate(-50%, -55%);
}
to {
opacity: 1;
transform: translate(-50%, -50%);
}
}
/* Utility tambahan agar konten utama (Quiz/Library) tetap di tengah */
/* Update agar konten mulai dari atas, tapi tetap tengah secara horizontal */
main {
width: 100%;
max-width: 100% !important; /* Memastikan tidak ada batasan lebar */
display: flex;
flex-direction: column;
align-items: center;
flex-grow: 1;
flex: 1 0 auto; /* Ini akan memaksa footer tetap di bawah meski konten sedikit */
padding: 0 20px; /* Memberi sedikit jarak di pinggir agar tidak menempel sekali */
}
main > section:last-child {
margin-bottom: 0;
}
/* Ganti slideDownCenter kamu dengan ini */
@keyframes slideDownCenter {
from { transform: translateY(-10px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
/* Jika ada fadeInScale, pastikan tidak ada translate -50% kecuali untuk MODAL */
@keyframes fadeInScale {
from { transform: scale(0.95); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}
/* Loader */
.loader {
width: 48px;
height: 48px;
border: 5px solid var(--text-color);
/* Loader disesuaikan dengan warna primer baru */
border-bottom-color: var(--primary-color);
border-radius: 50%;
display: inline-block;
box-sizing: border-box;
animation: rotation 1s linear infinite;
}
@keyframes rotation {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.col-span-full {
grid-column: 1 / -1;
width: 100%;
}
/* Pastikan h3 di dalam grid punya line-height yang bagus */
#library-grid h3 {
line-height: 1.5;
letter-spacing: 0.5px; /* Memberi sedikit ruang antar huruf agar tidak rapat */
}
/* Membuat ikon pensil menyala saat input difokuskan */
.relative:focus-within .fa-pencil {
color: var(--primary-color);
transition: color 0.3s ease;
}
body::before {
content: "";
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
/* Ukuran responsif: di mobile tidak memenuhi layar, di desktop tidak raksasa */
width: 85vw;
max-width: 550px;
height: 85vw;
max-height: 550px;
/* Memanggil file gambar asli kamu */
background-image: url('globe-bg.png');
background-size: contain;
background-position: center;
background-repeat: no-repeat;
/* Atur kejelasan di sini */
opacity: 0.18; /* Sudah cukup terlihat tapi tidak menabrak teks */
filter: blur(0px); /* Tanpa blur agar detail bendera tajam */
/* Layering agar berada di belakang konten */
z-index: -1;
pointer-events: none;
}
/* --- TEMA FUN FACT: THEME-AWARE GLASSMORPHISM --- */
.glass-fun-fact {
background: var(--card-bg-color) !important;
backdrop-filter: blur(12px) saturate(160%) !important;
-webkit-backdrop-filter: blur(12px) saturate(160%) !important;
border: 1px solid var(--card-border-color) !important;
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1) !important;
}
/* Garis cahaya tipis di atas kartu agar tetap terlihat premium */
.glass-fun-fact::before {
content: "";
position: absolute;
top: 0; left: 0; right: 0;
height: 3px;
background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
opacity: 0.5;
z-index: 5;
}
/* --- EFEK IKON EMAS BERSINAR (SMART & SOFT) --- */
/* 1. Versi Light Theme (Default) */
.glow-icon-effect {
/* Kita gunakan warna "Soft Gold" agar menyatu dengan tema terang */
color: #ffffff !important;
/* Hilangkan glow neon, ganti dengan bayangan lembut agar ikon terlihat bersih */
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
animation: gold-pulse 2s infinite ease-in-out;
transition: all 0.3s ease;
}
/* 2. Versi Dark Theme (Tetap Glowing seperti gambar) */
.dark .glow-icon-effect {
color: #ffffff !important; /* Kuning emas murni */
/* Glow neon berlapis untuk latar belakang gelap */
filter:
drop-shadow(0 0 5px #FFD700)
drop-shadow(0 0 15px #FFA500)
drop-shadow(0 0 25px rgba(255, 215, 0, 0.4));
}
@keyframes gold-pulse {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.08);
}
}
/* --- PERBAIKAN LOADER AGAR TIDAK ANEH --- */
/* Kita hapus semua border-top/right/left yang saya kasih sebelumnya */
/* Biarkan class .loader menggunakan style utama yang sudah Anda buat */
.glass-fun-fact .loader {
/* Pastikan warna teks dan primer tetap terbaca di mode glass */
border-color: var(--text-color);
border-bottom-color: var(--primary-color);
/* Memastikan tidak ada sisa style dari percobaan sebelumnya yang merusak animasi */
border-top-color: var(--text-color) !important;
border-right-color: var(--text-color) !important;
border-left-color: var(--text-color) !important;
}
.flag-img {
content-visibility: auto; /* Membantu browser hanya merender yang terlihat di layar */
contain-intrinsic-size: 100px 60px; /* Memberi estimasi ukuran gambar sebelum dimuat */
}
.flag-img.opacity-0 {
opacity: 0;
}
/* --- STATUS BADGES SYSTEM --- */
.status-badge {
position: absolute;
top: 0;
right: 0;
font-size: 0.6rem;
font-weight: 700;
text-transform: uppercase;
padding: 4px 8px;
border-bottom-left-radius: 8px; /* Lengkungan hanya di pojok kiri bawah badge */
z-index: 10;
letter-spacing: 0.5px;
box-shadow: -2px 2px 5px rgba(0,0,0,0.2);
backdrop-filter: blur(4px);
}
/* Merah (Untuk status: "Unofficial" atau "Fan-made") */
.badge-unofficial {
background: linear-gradient(135deg, #dc3545, #a71d2a);
color: white;
}
/* Oranye/Emas (Untuk status: "Reconstruction") */
.badge-warning {
background: linear-gradient(135deg, #fd7e14, #d35400);
color: white;
}
/* Biru (Untuk status: "Proposed") */
.badge-info {
background: linear-gradient(135deg, #0dcaf0, #0aa2c0);
color: #fff; /* Teks hitam agar kontras dengan biru muda */
}
/* Label untuk Negara dengan Pengakuan Terbatas (Taiwan, Kosovo, dll) */
.badge-limited {
background: linear-gradient(135deg, var(--primary-color), var(--primary-hover-color));
color: white;
}
/* Warna khusus untuk Historical (Coklat Emas Tua / Sepia) */
.badge-historical {
background: linear-gradient(135deg, #8b5a2b, #5d3a1a);
color: #ffffff;
border-bottom-left-radius: 8px;
}
/* --- FLOATING XP ANIMATION --- */
.xp-floating-text {
position: fixed;
font-size: 1.5rem;
font-weight: 800;
color: var(--success-color);
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
pointer-events: none; /* Supaya tidak menghalangi klik */
z-index: 1000;
animation: floatUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.dark .xp-floating-text {
filter: drop-shadow(0 0 8px var(--success-color));
}
@keyframes floatUp {
0% { transform: translate(-50%, 0) scale(0.5); opacity: 0; }
20% { transform: translate(-50%, -20px) scale(1.2); opacity: 1; }
100% { transform: translate(-50%, -60px) scale(1); opacity: 0; }
}
/* Menyamakan warna LEVEL UP dengan gradien tombol AWESOME! */
#level-up-text {
background-image: linear-gradient(90deg, var(--primary-color) 0%, #EC41B1 100%);
background-clip: text;
-webkit-background-clip: text;
}
/* ============================================================
SCROLL TO TOP BUTTON
============================================================ */
#scroll-to-top-btn {
position: fixed;
bottom: 20px;
right: 20px;
width: 3.5rem;
height: 3.5rem;
border-radius: 50%; /* Membuatnya bulat */
display: flex;
align-items: center;
justify-content: center;
font-size: 1.25rem;
z-index: 999; /* Memastikan selalu berada di atas elemen lain */
/* State awal: Tersembunyi di bawah */
opacity: 0;
visibility: hidden;
transform: translateY(20px) scale(0.9);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.4);
}
/* State saat muncul */
#scroll-to-top-btn.show {
opacity: 1;
visibility: visible;
transform: translateY(0) scale(1);
}
/* Efek Hover */
#scroll-to-top-btn:hover {
/* Hapus 'background' agar efek gradasi .btn-primary tidak tertimpa */
transform: translateY(-5px) scale(1.05);
}
/* Hilangkan ruang tersebut jika nav sedang disembunyikan */
body.nav-hidden {
padding-bottom: 0;
}
body.nav-hidden #app-container {
padding-bottom: 0; /* Footer akan langsung mentok ke bawah */
}
/* KETIKA NAVIGASI MUNCUL (Bukan di Home/Quiz) */
/* Kita gunakan selector body:not(.nav-hidden) */
body:not(.nav-hidden) #scroll-to-top-btn {
bottom: 90px; /* Naik ke atas navigasi (70px tinggi nav + 20px jarak) */
}
/* Responsif untuk Mobile agar tidak terlalu mepet pinggir */
@media (max-width: 640px) {
body:not(.nav-hidden) #scroll-to-top-btn {
bottom: 85px;
right: 15px;
}
}
/* Sedikit penyesuaian di layar HP agar tidak menabrak pinggiran */
@media (max-width: 480px) {
#scroll-to-top-btn {
bottom: 1.5rem;
right: 1.5rem;
width: 3rem;
height: 3rem;
}
}
/* --- Bottom Navigation Styling --- */
.bottom-nav {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 70px;
background: var(--secondary-color); /* Warna Dark dengan transparansi */
background-color: rgba(var(--secondary-color-rgb), 0.85);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
display: flex;
justify-content: space-around;
align-items: center;
border-top: 1px solid var(--card-border-color);
z-index: 1000;
padding-bottom: env(safe-area-inset-bottom); /* Dukungan iPhone berponi */
transition: all 0.3s ease; /* Transisi smooth saat ganti tema */
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
color: var(--subtle-text-color);
background: none;
border: none;
font-size: 0.7rem;
gap: 4px;
transition: all 0.3s ease;
flex: 1;
cursor: pointer;
}
.nav-item i {
font-size: 1.2rem;
}
/* State Aktif (Ikon Terang) */
.nav-item.active {
color: var(--primary-color);
transform: translateY(-2px);
font-weight: bold;
}
.nav-item.active i {
filter: drop-shadow(0 0 8px rgba(var(--primary-color-rgb), 0.6));
}
/* SOLUSI FOOTER: Berikan padding agar konten/footer tidak tertutup nav bar */
#app-container {
display: flex;
flex-direction: column;
min-height: 100vh;
/* Gunakan 100dvh untuk mobile agar akurat dengan bar browser */
min-height: 100dvh;
position: relative;
/* Ruang untuk navigasi bawah (70px tinggi nav + 10px jarak) */
padding-bottom: 80px;
transition: padding-bottom 0.3s ease;
box-sizing: border-box;
}
footer {
flex-shrink: 0; /* Mencegah footer terkompresi */
width: 100%;
padding: 20px 0;
text-align: center;
/* Footer akan duduk tepat di atas padding-bottom #app-container */
}
/* Container utama FOTD */
#fotd-container {
height: auto;
max-height: 130px;
min-height: 110px;
transition: all 0.3s ease;
border: 1px solid var(--card-border-color);