-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
7992 lines (7422 loc) · 441 KB
/
Copy pathindex.html
File metadata and controls
7992 lines (7422 loc) · 441 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="ko">
<head>
<!-- Firebase SDK 및 설정 -->
<script src="https://www.gstatic.com/firebasejs/9.23.0/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.23.0/firebase-database-compat.js"></script>
<script>
const firebaseConfig = {
apiKey: "AIzaSyBGKn7TDPIQL9E0_IQhWs2NYuqe1jy27P0",
authDomain: "glasscombatarena.firebaseapp.com",
databaseURL: "https://glasscombatarena-default-rtdb.asia-southeast1.firebasedatabase.app/",
projectId: "glasscombatarena",
storageBucket: "glasscombatarena.firebasestorage.app",
messagingSenderId: "678597065462",
appId: "1:678597065462:web:36b0420611e79bf041cad7",
measurementId: "G-F2PQDZPDBL"
};
firebase.initializeApp(firebaseConfig);
const db = firebase.database();
</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>글래스 컴뱃 아레나</title>
<meta name="description" content="2D 브라우저 기반 전투 게임 - 중력 물리학, 글래스모피즘 UI, 봇 전투 시스템">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" href="icon.png">
<style>
/* 전역 CSS 재설정 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* body 스타일: 폰트, 배경, 오버플로우 숨김, 전체 화면 */
body {
font-family: 'Poppins', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
overflow: hidden;
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
}
/* 게임 캔버스 스타일: 절대 위치, 커서, 배경, 블러 전환 효과 */
#gameCanvas {
position: absolute;
top: 0;
left: 0;
cursor: crosshair;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 캔버스 배경도 동일하게 설정 */
filter: blur(10px); /* 초기 블러 효과 */
transition: filter 0.5s ease; /* 블러 전환 애니메이션 */
display: block; /* 항상 보이도록 설정 */
}
/* 글래스 카드 스타일: 배경 흐림, 테두리, 그림자 */
.glass-card {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(15px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 16px;
padding: 16px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
color: #fff;
}
/* HUD (Head-Up Display) 스타일: 왼쪽 상단 고정, flexbox로 내부 요소 정렬 */
.hud {
position: fixed;
top: 0;
left: 0;
width: 100vw;
pointer-events: none;
z-index: 10;
display: none;
flex-direction: row;
gap: 18px;
justify-content: center;
align-items: flex-start;
padding: 12px 0 0 0;
}
/* HUD 내부 아이템 스타일: 상호작용 가능 */
.hud-item {
pointer-events: auto;
margin: 0 4px;
min-width: 170px;
max-width: 260px;
}
/* 체력/탄약 바 스타일 */
.health-bar, .ammo-bar {
width: 150px;
height: 8px;
background: rgba(0, 0, 0, 0.3);
border-radius: 4px;
overflow: hidden;
margin: 8px 0;
}
/* 체력 바 채우기 스타일: 그라데이션, 너비 전환 효과 */
.health-fill {
height: 100%;
background: linear-gradient(90deg, #ef4444, #f87171);
transition: width 0.3s ease;
}
/* 탄약 바 채우기 스타일: 그라데이션, 너비 전환 효과 */
.ammo-fill {
height: 100%;
background: linear-gradient(90deg, #3b82f6, #60a5fa);
transition: width 0.3s ease;
}
/* 스탯 텍스트 스타일 */
.stats {
color: white;
font-size: 14px;
font-weight: 500;
}
/* 점수 텍스트 스타일 */
.score {
color: white;
font-size: 20px;
font-weight: bold;
text-align: center;
}
/* 웨이브 텍스트 스타일 */
.wave {
color: white;
font-size: 16px;
font-weight: 600;
text-align: center;
margin-top: 8px;
}
/* 조작법 텍스트 스타일 */
.controls {
color: white;
font-size: 12px;
}
/* 조작 키 표시 스타일 */
.control-key {
background: rgba(255, 255, 255, 0.1);
padding: 4px 8px;
border-radius: 4px;
margin: 2px;
display: inline-block;
}
/* 게임 메시지 컨테이너 스타일 */
.message {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 100;
}
/* 게임 메시지 주 텍스트 스타일 */
.message-text {
color: white;
font-size: 32px;
font-weight: bold;
text-align: center;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
/* 게임 메시지 보조 텍스트 스타일 */
.message-sub {
color: rgba(255, 255, 255, 0.8);
font-size: 18px;
text-align: center;
margin-top: 8px;
}
/* 깜빡임 애니메이션 */
.animate-pulse {
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* 미니맵 스타일 */
.minimap {
width: 120px;
height: 120px;
background: rgba(0, 0, 0, 0.3);
border-radius: 8px;
position: relative;
border: 1px solid rgba(255, 255, 255, 0.2);
}
/* 미니맵 플레이어 도트 스타일 */
.minimap-player {
position: absolute;
width: 4px;
height: 4px;
background: #3b82f6;
border-radius: 50%;
animation: pulse 2s infinite;
}
/* 미니맵 적 도트 스타일 */
.minimap-enemy {
position: absolute;
width: 3px;
height: 3px;
background: #ef4444;
border-radius: 50%;
}
/* 미니맵 아이템 도트 스타일 */
.minimap-item {
position: absolute;
width: 2px;
height: 2px;
background: #fbbf24;
border-radius: 50%;
}
/* 시작 화면 스타일 */
#startScreen {
position: absolute; /* 캔버스 위에 오버레이 */
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 101; /* HUD보다 높게 설정 */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
color: white;
padding: 40px;
}
#startScreen h1 {
font-size: 4em;
margin-bottom: 20px;
text-shadow: 0 0 15px rgba(255,255,255,0.5);
}
#startScreen p {
font-size: 1.2em;
margin-bottom: 30px;
opacity: 0.8;
}
#startButton {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 12px;
padding: 15px 30px;
font-size: 1.5em;
font-weight: 600;
color: white;
cursor: pointer;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
#startButton:hover {
background: rgba(255, 255, 255, 0.3);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
transform: translateY(-2px);
}
#startButton:active {
transform: translateY(0);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
/* 보상 선택 화면 스타일 */
#rewardSelectionScreen {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 200; /* 가장 위에 표시 */
display: none; /* 초기에는 숨김 */
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
color: white;
padding: 30px;
}
#rewardSelectionScreen h2 {
font-size: 2.5em;
margin-bottom: 25px;
text-shadow: 0 0 10px rgba(255,255,255,0.4);
}
.reward-options {
display: flex;
gap: 20px;
flex-wrap: wrap; /* 작은 화면에서 줄바꿈 */
justify-content: center;
}
.reward-button {
background: rgba(255, 255, 255, 0.15);
border: 1px solid rgba(255, 255, 255, 0.25);
border-radius: 12px;
padding: 20px 25px;
font-size: 1.2em;
font-weight: bold;
color: #fff;
cursor: pointer;
transition: all 0.3s ease;
backdrop-filter: blur(8px);
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
min-width: 180px;
}
.reward-button:hover {
background: rgba(255, 255, 255, 0.25);
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
transform: translateY(-3px);
}
.reward-button:active {
transform: translateY(0);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
#shopPopup h2 {
color: #fff;
font-weight: bold;
}
#shopList {
color: #fff;
font-weight: normal;
}
/* --- 2. 상점 UI/로직: 점수로 패시브 업그레이드 구매 --- */
/* 1) 상점에 표시할 아이템 목록 및 가격 설정 (보상 목록과 동일, 가격은 예시) */
/* 2) 상점 UI에 아이템 표시 및 구매 로직 구현 */
/* 3) 상점 버튼 클릭 시 updateShopList 호출 */
document.getElementById('shopButton').onclick = () => {
document.getElementById('shopPopup').style.display = 'block';
this.updateShopList();
};
</style>
</head>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>글래스 컴뱃 아레나</title>
<meta name="description" content="2D 브라우저 기반 전투 게임 - 중력 물리학, 글래스모피즘 UI, 봇 전투 시스템">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
/* 전역 CSS 재설정 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* body 스타일: 폰트, 배경, 오버플로우 숨김, 전체 화면 */
body {
font-family: 'Poppins', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
overflow: hidden;
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
}
/* 게임 캔버스 스타일: 절대 위치, 커서, 배경, 블러 전환 효과 */
#gameCanvas {
position: absolute;
top: 0;
left: 0;
cursor: crosshair;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 캔버스 배경도 동일하게 설정 */
filter: blur(10px); /* 초기 블러 효과 */
transition: filter 0.5s ease; /* 블러 전환 애니메이션 */
display: block; /* 항상 보이도록 설정 */
}
/* 글래스 카드 스타일: 배경 흐림, 테두리, 그림자 */
.glass-card {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(15px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 16px;
padding: 16px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
color: #fff;
}
/* HUD (Head-Up Display) 스타일: 왼쪽 상단 고정, flexbox로 내부 요소 정렬 */
.hud {
position: fixed;
top: 0;
left: 0;
width: 100vw;
pointer-events: none;
z-index: 10;
display: none;
flex-direction: row;
gap: 18px;
justify-content: center;
align-items: flex-start;
padding: 12px 0 0 0;
}
/* HUD 내부 아이템 스타일: 상호작용 가능 */
.hud-item {
pointer-events: auto;
margin: 0 4px;
min-width: 170px;
max-width: 260px;
}
/* 체력/탄약 바 스타일 */
.health-bar, .ammo-bar {
width: 150px;
height: 8px;
background: rgba(0, 0, 0, 0.3);
border-radius: 4px;
overflow: hidden;
margin: 8px 0;
}
/* 체력 바 채우기 스타일: 그라데이션, 너비 전환 효과 */
.health-fill {
height: 100%;
background: linear-gradient(90deg, #ef4444, #f87171);
transition: width 0.3s ease;
}
/* 탄약 바 채우기 스타일: 그라데이션, 너비 전환 효과 */
.ammo-fill {
height: 100%;
background: linear-gradient(90deg, #3b82f6, #60a5fa);
transition: width 0.3s ease;
}
/* 스탯 텍스트 스타일 */
.stats {
color: white;
font-size: 14px;
font-weight: 500;
}
/* 점수 텍스트 스타일 */
.score {
color: white;
font-size: 20px;
font-weight: bold;
text-align: center;
}
/* 웨이브 텍스트 스타일 */
.wave {
color: white;
font-size: 16px;
font-weight: 600;
text-align: center;
margin-top: 8px;
}
/* 조작법 텍스트 스타일 */
.controls {
color: white;
font-size: 12px;
}
/* 조작 키 표시 스타일 */
.control-key {
background: rgba(255, 255, 255, 0.1);
padding: 4px 8px;
border-radius: 4px;
margin: 2px;
display: inline-block;
}
/* 게임 메시지 컨테이너 스타일 */
.message {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 100;
}
/* 게임 메시지 주 텍스트 스타일 */
.message-text {
color: white;
font-size: 32px;
font-weight: bold;
text-align: center;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
/* 게임 메시지 보조 텍스트 스타일 */
.message-sub {
color: rgba(255, 255, 255, 0.8);
font-size: 18px;
text-align: center;
margin-top: 8px;
}
/* 깜빡임 애니메이션 */
.animate-pulse {
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* 미니맵 스타일 */
.minimap {
width: 120px;
height: 120px;
background: rgba(0, 0, 0, 0.3);
border-radius: 8px;
position: relative;
border: 1px solid rgba(255, 255, 255, 0.2);
}
/* 미니맵 플레이어 도트 스타일 */
.minimap-player {
position: absolute;
width: 4px;
height: 4px;
background: #3b82f6;
border-radius: 50%;
animation: pulse 2s infinite;
}
/* 미니맵 적 도트 스타일 */
.minimap-enemy {
position: absolute;
width: 3px;
height: 3px;
background: #ef4444;
border-radius: 50%;
}
/* 미니맵 아이템 도트 스타일 */
.minimap-item {
position: absolute;
width: 2px;
height: 2px;
background: #fbbf24;
border-radius: 50%;
}
/* 시작 화면 스타일 */
#startScreen {
position: absolute; /* 캔버스 위에 오버레이 */
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 101; /* HUD보다 높게 설정 */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
color: white;
padding: 40px;
}
#startScreen h1 {
font-size: 4em;
margin-bottom: 20px;
text-shadow: 0 0 15px rgba(255,255,255,0.5);
}
#startScreen p {
font-size: 1.2em;
margin-bottom: 30px;
opacity: 0.8;
}
#startButton {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 12px;
padding: 15px 30px;
font-size: 1.5em;
font-weight: 600;
color: white;
cursor: pointer;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
#startButton:hover {
background: rgba(255, 255, 255, 0.3);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
transform: translateY(-2px);
}
#startButton:active {
transform: translateY(0);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
/* 보상 선택 화면 스타일 */
#rewardSelectionScreen {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 200; /* 가장 위에 표시 */
display: none; /* 초기에는 숨김 */
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
color: white;
padding: 30px;
}
#rewardSelectionScreen h2 {
font-size: 2.5em;
margin-bottom: 25px;
text-shadow: 0 0 10px rgba(255,255,255,0.4);
}
.reward-options {
display: flex;
gap: 20px;
flex-wrap: wrap; /* 작은 화면에서 줄바꿈 */
justify-content: center;
}
.reward-button {
background: rgba(255, 255, 255, 0.15);
border: 1px solid rgba(255, 255, 255, 0.25);
border-radius: 12px;
padding: 20px 25px;
font-size: 1.2em;
font-weight: bold;
color: #fff;
cursor: pointer;
transition: all 0.3s ease;
backdrop-filter: blur(8px);
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
min-width: 180px;
}
.reward-button:hover {
background: rgba(255, 255, 255, 0.25);
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
transform: translateY(-3px);
}
.reward-button:active {
transform: translateY(0);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
#shopPopup h2 {
color: #fff;
font-weight: bold;
}
#shopList {
color: #fff;
font-weight: normal;
}
/* --- 2. 상점 UI/로직: 점수로 패시브 업그레이드 구매 --- */
/* 1) 상점에 표시할 아이템 목록 및 가격 설정 (보상 목록과 동일, 가격은 예시) */
/* 2) 상점 UI에 아이템 표시 및 구매 로직 구현 */
/* 3) 상점 버튼 클릭 시 updateShopList 호출 */
document.getElementById('shopButton').onclick = () => {
document.getElementById('shopPopup').style.display = 'block';
this.updateShopList();
};
</style>
</head>
<body>
<canvas id="gameCanvas"></canvas>
<!-- HUD 요소들 -->
<div class="hud">
<div class="glass-card hud-item" style="display:flex; flex-direction:row; align-items:center; gap:22px; min-width:unset; max-width:unset;">
<div style="display:flex; align-items:center; gap:10px;">
<div style="display:flex; align-items:center; gap:6px;">
<div style="width:8px; height:8px; background:#ef4444; border-radius:50%; animation:pulse 2s infinite;"></div>
<span>체력</span>
<div class="health-bar" style="width:70px; margin:0 4px;"><div class="health-fill" id="healthFill" style="width:100%;"></div></div>
<span id="healthText">100/100</span>
</div>
<div style="display:flex; align-items:center; gap:6px; margin-left:16px;">
<div style="width:8px; height:8px; background:#3b82f6; border-radius:50%; animation:pulse 2s infinite;"></div>
<span>탄약</span>
<div class="ammo-bar" style="width:70px; margin:0 4px;"><div class="ammo-fill" id="ammoFill" style="width:100%;"></div></div>
<span id="ammoText">60/60</span>
</div>
<div style="display:flex; align-items:center; gap:6px; margin-left:16px;">
<div style="width:8px; height:8px; background:#8b5cf6; border-radius:50%;"></div>
<span>속도</span>
<span id="speedText">5</span>
</div>
<div style="display:flex; align-items:center; gap:6px; margin-left:16px;">
<div style="width:8px; height:8px; background:#dc2626; border-radius:50%;"></div>
<span>공격력</span>
<span id="damageText">20</span>
</div>
<div style="display:flex; align-items:center; gap:6px; margin-left:16px;">
<div style="width:8px; height:8px; background:#7c3aed; border-radius:50%;"></div>
<span>다중 발사</span>
<span id="multishotText">1</span>
</div>
<div style="display:flex; align-items:center; gap:6px; margin-left:16px;">
<span style="color:white; font-weight:600;">활성 효과</span>
<div id="activeEffects" style="font-size:12px; display:flex; gap:8px; flex-wrap:wrap; align-items:center;">
<div id="invincibilityEffect"></div>
<div id="shieldBoostEffect"></div>
<div id="timeSlowEffect"></div>
<div id="magnetEffect"></div>
<div id="healthRegenEffect"></div>
<div id="rapidFireEffect"></div>
<div id="piercingShotEffect"></div>
<div id="explosiveShotEffect"></div>
<div id="orbitingKnivesEffect"></div>
<div id="ricochetShotEffect"></div>
<div id="homingShotEffect"></div>
<div id="splitShotEffect"></div>
<div id="ammoRegenEffect"></div>
<div id="timeStopEffect"></div>
<div id="dashEffect"></div>
<div id="lifeStealEffect"></div>
<div id="critChanceEffect"></div>
<div id="cooldownReductionEffect"></div>
<div id="armorEffect"></div>
</div>
</div>
<!-- 점수/웨이브/적 수 표시 (오른쪽 끝에 가로로) -->
<span id="scoreText" style="margin-left:22px; color:#fff; font-size:1.1em; font-weight:600;"></span>
<span id="waveText" style="margin-left:14px; color:#fff; font-size:1.1em; font-weight:600;"></span>
<span id="enemyCount" style="margin-left:14px; color:#fff; font-size:1.1em; font-weight:600;"></span>
<!-- 1. HUD에 XP와 상점 버튼 추가 -->
<span id="xpText" style="margin-left:18px; color:#ffe066; font-size:1.1em; font-weight:600;"></span>
<button id="shopButton" style="margin-left:12px; font-size:1em; border-radius:6px; border:none; background:#ffe066; color:#222; padding:4px 16px; cursor:pointer;">상점</button>
<button id="testZoneHUDButton" style="margin-left:12px; font-size:1em; border-radius:6px; border:none; background:#ff6b6b; color:#fff; padding:4px 16px; cursor:pointer; display:none;">테스트 존</button>
<button id="enemyDexHUDButton" style="margin-left:12px; font-size:1em; border-radius:6px; border:none; background:#8b5cf6; color:#fff; padding:4px 16px; cursor:pointer;">적 도감</button>
</div>
</div>
</div>
<!-- 플레이어2 HUD (멀티플레이 모드에서만 표시) -->
<div id="player2HUD" class="glass-card hud-item" style="display:none; position:fixed; top:80px; left:24px; z-index:20; flex-direction:row; align-items:center; gap:22px; min-width:unset; max-width:unset;">
<div style="display:flex; align-items:center; gap:10px;">
<div style="display:flex; align-items:center; gap:6px;">
<div style="width:8px; height:8px; background:#ef4444; border-radius:50%; animation:pulse 2s infinite;"></div>
<span style="color:#fff;">P2 체력</span>
<div class="health-bar" style="width:70px; margin:0 4px;"><div class="health-fill" id="healthFill2" style="width:100%;"></div></div>
<span id="healthText2" style="color:#fff;">100/100</span>
</div>
<div style="display:flex; align-items:center; gap:6px; margin-left:16px;">
<div style="width:8px; height:8px; background:#ef4444; border-radius:50%; animation:pulse 2s infinite;"></div>
<span style="color:#fff;">P2 탄약</span>
<div class="ammo-bar" style="width:70px; margin:0 4px;"><div class="ammo-fill" id="ammoFill2" style="width:100%;"></div></div>
<span id="ammoText2" style="color:#fff;">60/60</span>
</div>
</div>
</div>
<!-- 나머지 HUD(웨이브, 조작법, 미니맵 등)는 아래/오른쪽 등 별도 배치 필요시 추가 -->
<!-- 게임 메시지 -->
<div class="message" id="gameMessage" style="display: none;">
<div class="glass-card">
<div class="message-text" id="messageText"></div>
<div class="message-sub" id="messageSubText"></div>
<button id="restartButton" style="display:none; margin-top:18px; font-size:1.2em; padding:10px 30px; border-radius:8px; background:#6366f1; color:white; border:none; cursor:pointer;">재시작</button>
</div>
</div>
<!-- 시작 화면 -->
<div id="startScreen" class="glass-card">
<h1>글래스 컴뱃 아레나</h1>
<p>2D 브라우저 기반 전투 게임 - 중력 물리학, 글래스모피즘 UI, 봇 전투 시스템</p>
<button id="startButton">시작하기</button>
<button id="enemyDexButton">적 도감</button>
</div>
<!-- 보상 선택 화면 -->
<div id="rewardSelectionScreen" class="glass-card">
<h2 id="rewardSelectionTitle">보상 선택</h2>
<div class="reward-options" id="rewardOptions">
<!-- 보상 버튼들이 여기에 동적으로 추가됩니다. -->
</div>
</div>
<!-- 적 도감 화면 -->
<div id="enemyDexScreen" class="glass-card" style="display:none; position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); z-index:300; min-width:600px; min-height:400px; max-width:90vw; max-height:80vh; flex-direction:row; align-items:stretch; padding:0; overflow:hidden; backdrop-filter:blur(20px); background:rgba(255,255,255,0.15); border:1px solid rgba(255,255,255,0.2); box-shadow:0 8px 32px rgba(0,0,0,0.3);">
<!-- 좌측 리스트 -->
<div id="enemyDexList" style="width:200px; background:rgba(255,255,255,0.1); border-right:1px solid rgba(255,255,255,0.2); overflow-y:auto; max-height:80vh; min-height:400px; display:flex; flex-direction:column; backdrop-filter:blur(10px);"></div>
<!-- 우측 상세 -->
<div id="enemyDexDetail" style="flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; min-width:300px; padding:32px 16px 16px 16px; overflow-y:auto; background:rgba(255,255,255,0.05); backdrop-filter:blur(5px);"></div>
<button id="closeEnemyDexButton" style="position:absolute; top:12px; right:16px; background:rgba(255,255,255,0.2); border:1px solid rgba(255,255,255,0.3); border-radius:8px; padding:8px 16px; color:#fff; cursor:pointer; backdrop-filter:blur(10px); transition:all 0.3s ease;">닫기</button>
</div>
<!-- 퀘스트 버튼 및 퀘스트 팝업 -->
<button id="questButton" style="position:absolute; top:24px; left:220px; z-index:20; background:rgba(255,255,255,0.18); color:white; border:none; border-radius:8px; padding:8px 18px; font-size:15px; cursor:pointer;">퀘스트</button>
<div id="questPopup" class="glass-card" style="display:none; position:absolute; top:60px; left:220px; z-index:30; min-width:260px; min-height:180px;">
<h3 style="color:white; margin-bottom:12px;">퀘스트</h3>
<div id="questList" style="color:white; font-size:15px;"></div>
<button id="closeQuestButton" style="margin-top:18px;">닫기</button>
</div>
<!-- 인트로 화면: 솔로/함께 플레이/테스팅 존 선택 -->
<div id="introScreen" class="glass-card" style="position:absolute; top:50%; left:50%; transform:translate(-50%, -50%); z-index:200; display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:340px; min-height:280px;">
<h1 style="font-size:2.5em; margin-bottom:18px;">글래스 컴뱃 아레나</h1>
<div class="reward-options" style="margin-bottom:20px;">
<button id="soloButton" class="reward-button" style="min-width:200px;">솔로 플레이</button>
<button id="multiButton" class="reward-button" style="min-width:200px;">함께 플레이</button>
<button id="testZoneButton" class="reward-button" style="min-width:200px;">테스팅 존</button>
</div>
<div style="margin-bottom:15px; display:flex; align-items:center; gap:8px;">
<input type="checkbox" id="mobileModeCheckbox" style="width:18px; height:18px; cursor:pointer;">
<label for="mobileModeCheckbox" style="color:#fff; font-size:1.1em; cursor:pointer;">📱 모바일 모드</label>
</div>
<div id="multiInfo" style="display:none; color:#fff; margin-top:18px; font-size:1.1em;">함께 플레이(온라인)는 추후 지원 예정입니다.</div>
</div>
<div id="multiJoinPopup" class="glass-card" style="display:none; position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); z-index:300;">
<h2>온라인 방 입장</h2>
<input id="multiNickname" placeholder="닉네임" style="margin-bottom:8px; width:90%;" />
<input id="multiRoomId" placeholder="방 코드(아무거나)" style="margin-bottom:8px; width:90%;" />
<button id="multiJoinBtn">입장</button>
<button id="multiJoinCancel">취소</button>
</div>
<div id="mobileControls" style="display:none; position:fixed; bottom:0; left:0; right:0; z-index:100; pointer-events:none;">
<!-- 왼쪽(이동) 조이스틱 - 파란색 글래스모피즘 -->
<div id="joystickContainer" style="position:absolute; bottom:80px; left:80px; width:120px; height:120px; pointer-events:auto;">
<div id="joystickBase" style="width:100%; height:100%; background:rgba(59,130,246,0.25); border:2px solid rgba(59,130,246,0.3); border-radius:50%; display:flex; align-items:center; justify-content:center; backdrop-filter:blur(10px);">
<div id="joystickThumb" style="width:50px; height:50px; background:rgba(59,130,246,0.7); border-radius:50%; position:absolute; transform:translate(-50%, -50%);"></div>
</div>
</div>
<!-- 오른쪽(조준) 조이스틱 - 빨간색 글래스모피즘 -->
<div id="aimJoystickContainer" style="position:absolute; bottom:80px; right:80px; width:120px; height:120px; pointer-events:auto;">
<div id="aimJoystickBase" style="width:100%; height:100%; background:rgba(239,68,68,0.25); border:2px solid rgba(239,68,68,0.3); border-radius:50%; display:flex; align-items:center; justify-content:center; backdrop-filter:blur(10px);">
<div id="aimJoystickThumb" style="width:50px; height:50px; background:rgba(239,68,68,0.7); border-radius:50%; position:absolute; transform:translate(-50%, -50%);"></div>
</div>
</div>
<!-- 액션 버튼들 - 중앙 하단에 배치 -->
<div id="actionButtons" style="position:absolute; bottom:30px; left:50%; transform:translateX(-50%); display:flex; flex-direction:row; gap:15px; pointer-events:auto;">
<button id="jumpButton" class="mobile-button" style="width:60px; height:60px; background:rgba(34,197,94,0.8); border:2px solid rgba(255,255,255,0.3); border-radius:50%; color:#fff; font-size:20px; cursor:pointer; backdrop-filter:blur(10px);">↑</button>
<button id="fireButton" class="mobile-button" style="width:80px; height:80px; background:rgba(239,68,68,0.8); border:2px solid rgba(255,255,255,0.3); border-radius:50%; color:#fff; font-size:24px; cursor:pointer; backdrop-filter:blur(10px);">●</button>
<button id="reloadButton" class="mobile-button" style="width:60px; height:60px; background:rgba(59,130,246,0.8); border:2px solid rgba(255,255,255,0.3); border-radius:50%; color:#fff; font-size:18px; cursor:pointer; backdrop-filter:blur(10px);">R</button>
</div>
</div>
<!-- 멀티플레이 모드 선택 -->
<div id="multiplayerModeSelect" class="glass-card" style="display:none; position:absolute; top:50%; left:50%; transform:translate(-50%, -50%); z-index:200; min-width:400px;">
<h2 style="text-align:center; margin-bottom:20px; color:#fff;">멀티플레이 모드 선택</h2>
<div style="display:flex; flex-direction:column; gap:15px;">
<button id="leaderSystemButton" class="mode-button" style="background:rgba(99, 102, 241, 0.8); border:none; border-radius:8px; padding:15px; color:#fff; cursor:pointer; text-align:left;">
<h3 style="margin:0 0 8px 0;">리더 시스템</h3>
<p style="margin:0; font-size:14px; opacity:0.9;">플레이어1이 리더가 되어 조준 방향을 결정하고, 플레이어2가 따라갑니다.</p>
</button>
<button id="hybridSystemButton" class="mode-button" style="background:rgba(34, 197, 94, 0.8); border:none; border-radius:8px; padding:15px; color:#fff; cursor:pointer; text-align:left;">
<h3 style="margin:0 0 8px 0;">하이브리드 시스템</h3>
<p style="margin:0; font-size:14px; opacity:0.9;">플레이어1은 마우스 조준, 플레이어2는 자동 조준으로 플레이합니다.</p>
</button>
<button id="backToIntro" class="back-button" style="background:rgba(255,255,255,0.2); border:none; border-radius:6px; padding:10px; color:#fff; cursor:pointer;">← 뒤로가기</button>
</div>
</div>
<!-- 리더 시스템 설정 -->
<div id="leaderSetup" class="glass-card" style="display:none; position:absolute; top:50%; left:50%; transform:translate(-50%, -50%); z-index:200; min-width:400px;">
<h2 style="text-align:center; margin-bottom:20px; color:#fff;">리더 시스템 설정</h2>
<div style="display:flex; flex-direction:column; gap:15px;">
<div>
<label style="color:#fff; display:block; margin-bottom:5px;">리더 이름:</label>
<input id="leaderName" type="text" placeholder="리더" style="width:100%; padding:8px; border-radius:4px; border:none;">
</div>
<div>
<label style="color:#fff; display:block; margin-bottom:5px;">리더 색상:</label>
<input id="leaderColor" type="color" value="#3b82f6" style="width:100%; height:40px; border:none; border-radius:4px;">
</div>
<div>
<label style="color:#fff; display:block; margin-bottom:5px;">따르는자 이름:</label>
<input id="followerName" type="text" placeholder="따르는자" style="width:100%; padding:8px; border-radius:4px; border:none;">
</div>
<div>
<label style="color:#fff; display:block; margin-bottom:5px;">따르는자 색상:</label>
<input id="followerColor" type="color" value="#ef4444" style="width:100%; height:40px; border:none; border-radius:4px;">
</div>
<button id="leaderStartButton" class="start-button" style="background:#6366f1; border:none; border-radius:6px; padding:12px; color:#fff; cursor:pointer; font-weight:bold;">게임 시작</button>
<button id="backToModeSelect" class="back-button" style="background:rgba(255,255,255,0.2); border:none; border-radius:6px; padding:10px; color:#fff; cursor:pointer;">← 뒤로가기</button>
</div>
</div>
<!-- 하이브리드 시스템 설정 -->
<div id="hybridSetup" class="glass-card" style="display:none; position:absolute; top:50%; left:50%; transform:translate(-50%, -50%); z-index:200; min-width:400px;">
<h2 style="text-align:center; margin-bottom:20px; color:#fff;">하이브리드 시스템 설정</h2>
<div style="display:flex; flex-direction:column; gap:15px;">
<div>
<label style="color:#fff; display:block; margin-bottom:5px;">플레이어1 이름:</label>
<input id="player1Name" type="text" placeholder="플레이어1" style="width:100%; padding:8px; border-radius:4px; border:none;">
</div>
<div>
<label style="color:#fff; display:block; margin-bottom:5px;">플레이어1 색상:</label>
<input id="player1Color" type="color" value="#3b82f6" style="width:100%; height:40px; border:none; border-radius:4px;">
</div>
<div>
<label style="color:#fff; display:block; margin-bottom:5px;">플레이어2 이름:</label>
<input id="player2Name" type="text" placeholder="플레이어2" style="width:100%; padding:8px; border-radius:4px; border:none;">
</div>
<div>
<label style="color:#fff; display:block; margin-bottom:5px;">플레이어2 색상:</label>
<input id="player2Color" type="color" value="#ef4444" style="width:100%; height:40px; border:none; border-radius:4px;">
</div>
<div>
<label style="color:#fff; display:block; margin-bottom:5px;">하이브리드 플레이어 선택:</label>
<select id="hybridPlayer" style="width:100%; padding:8px; border-radius:4px; border:none;">
<option value="player1">플레이어1 (마우스 조준)</option>
<option value="player2">플레이어2 (자동 조준)</option>
</select>
</div>
<button id="hybridStartButton" class="start-button" style="background:#22c55e; border:none; border-radius:6px; padding:12px; color:#fff; cursor:pointer; font-weight:bold;">게임 시작</button>
<button id="backToModeSelect" class="back-button" style="background:rgba(255,255,255,0.2); border:none; border-radius:6px; padding:10px; color:#fff; cursor:pointer;">← 뒤로가기</button>
</div>
</div>
</div>
<!-- 랭킹 화면 -->
<div id="rankingScreen" class="glass-card" style="display:none; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); z-index:250; min-width:340px; min-height:320px;">
<h2 style="color:white; margin-bottom:12px;">랭킹</h2>
<div id="rankingList" style="color:white; font-size:15px; min-height:180px;"></div>
<button id="closeRankingButton" style="margin-top:18px;">닫기</button>
</div>
<!-- 보스 체력바 및 이름 표시용 -->
<div id="bossBarContainer" style="display:none; position:fixed; top:38px; left:50%; transform:translateX(-50%); z-index:30; min-width:320px; max-width:60vw;">
<div id="bossName" style="color:#fff; font-size:2em; font-weight:700; text-align:center; text-shadow:0 2px 8px #000; margin-bottom:6px;"></div>
<div style="background:rgba(0,0,0,0.3); border-radius:8px; width:100%; height:22px; box-shadow:0 2px 8px #000;">
<div id="bossBar" style="height:100%; background:linear-gradient(90deg,#ff007f,#ff8c00); border-radius:8px; width:100%; transition:width 0.3s;"></div>
</div>
</div>
<!-- 미니맵 (HUD 아래 오른쪽 등 원하는 위치로 조정 가능) -->
<div class="minimap" id="minimap" style="position:fixed; top:60px; right:32px; z-index:15;">
<div class="minimap-player" id="minimapPlayer"></div>
</div>
<!-- 2. 상점 팝업 UI 추가 (body 하단) -->
<div id="shopPopup" class="glass-card" style="display:none; position:fixed; top:80px; left:50%; transform:translateX(-50%); z-index:200; min-width:340px; min-height:220px;">
<h2 style="color:#222; margin-bottom:12px;">상점 (XP로 업그레이드)</h2>
<div id="shopList" style="color:#222; font-size:15px; min-height:120px;"></div>
<button id="closeShopButton" style="margin-top:18px;">닫기</button>
</div>
<!-- 3. 테스트 존 UI 추가 -->
<div id="testZonePopup" class="glass-card" style="display:none; position:fixed; top:80px; left:50%; transform:translateX(-50%); z-index:200; min-width:800px; min-height:500px;">
<h2 style="color:#222; margin-bottom:12px;">테스트 존</h2>
<div style="display:flex; gap:20px; flex-wrap:wrap;">
<!-- 적 소환 패널 -->
<div style="flex:1; min-width:200px;">
<h3 style="color:#222; margin-bottom:8px;">적 소환</h3>
<div id="enemySpawnList" style="color:#222; font-size:14px; max-height:200px; overflow-y:auto;"></div>
</div>
<!-- 보스 소환 패널 -->
<div style="flex:1; min-width:200px;">
<h3 style="color:#222; margin-bottom:8px;">보스 소환</h3>
<div id="bossSpawnList" style="color:#222; font-size:14px; max-height:200px; overflow-y:auto;"></div>
</div>
<!-- 능력 부여 패널 -->
<div style="flex:1; min-width:200px;">
<h3 style="color:#222; margin-bottom:8px;">능력 부여</h3>
<div id="abilityList" style="color:#222; font-size:14px; max-height:200px; overflow-y:auto;"></div>