Skip to content

Commit 5f73578

Browse files
authored
Merge pull request #545 from Hack23/copilot/improve-game-experience
Refactor: extract components from monolithic App.tsx, fix 60fps re-render bug
2 parents 00d0eb1 + fb07da4 commit 5f73578

15 files changed

Lines changed: 1533 additions & 665 deletions

src/App.css

Lines changed: 18 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -41,55 +41,6 @@
4141
color: #888;
4242
}
4343

44-
.app-container {
45-
max-width: 1280px;
46-
margin: 0 auto;
47-
padding: 2rem;
48-
text-align: center;
49-
display: flex;
50-
flex-direction: column;
51-
align-items: center;
52-
gap: 1rem;
53-
width: 100%;
54-
height: 100vh;
55-
margin: 0;
56-
padding: 0;
57-
box-sizing: border-box;
58-
background-color: #0d1117;
59-
color: white;
60-
overflow: hidden;
61-
}
62-
63-
.app-container h1 {
64-
font-size: 2.5em;
65-
line-height: 1.1;
66-
margin: 0;
67-
color: #646cff;
68-
margin: 10px 0;
69-
font-size: 24px;
70-
}
71-
72-
.app-container canvas {
73-
border: 2px solid #646cff;
74-
border-radius: 8px;
75-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
76-
display: block;
77-
width: 100% !important;
78-
height: calc(100vh - 100px) !important;
79-
max-height: none;
80-
max-width: none;
81-
border: none;
82-
}
83-
84-
.instructions {
85-
color: #888;
86-
font-style: italic;
87-
margin: 0;
88-
margin: 8px 0;
89-
font-size: 14px;
90-
color: #8b949e;
91-
}
92-
9344
/* Ensure fullscreen across different devices */
9445
html,
9546
body,
@@ -99,30 +50,29 @@ body,
9950
margin: 0;
10051
padding: 0;
10152
overflow: hidden;
102-
}
103-
104-
body,
105-
html {
106-
margin: 0;
107-
padding: 0;
108-
width: 100%;
109-
height: 100%;
110-
overflow: hidden;
11153
background-color: #0d1117;
11254
}
11355

11456
.app-container {
11557
width: 100%;
11658
height: 100vh;
59+
margin: 0;
60+
padding: 0;
61+
box-sizing: border-box;
11762
display: flex;
11863
flex-direction: column;
11964
align-items: center;
65+
text-align: center;
66+
gap: 1rem;
67+
background-color: #0d1117;
12068
color: white;
69+
overflow: hidden;
12170
}
12271

12372
.app-container h1 {
12473
margin: 10px 0;
12574
font-size: 24px;
75+
line-height: 1.1;
12676
color: #646cff;
12777
}
12878

@@ -132,18 +82,23 @@ html {
13282
height: calc(100vh - 100px) !important;
13383
max-height: none !important;
13484
max-width: none !important;
85+
border: none;
86+
border-radius: 8px;
87+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
13588
cursor: crosshair;
13689
}
13790

13891
.instructions {
13992
margin: 8px 0;
14093
font-size: 14px;
94+
font-style: italic;
14195
color: #8b949e;
14296
}
14397

14498
/* Animation for pulse effect */
14599
@keyframes pulse {
146-
0%, 100% {
100+
0%,
101+
100% {
147102
transform: scale(1);
148103
opacity: 1;
149104
}
@@ -155,11 +110,13 @@ html {
155110

156111
/* Animation for glow effect */
157112
@keyframes glow {
158-
0%, 100% {
113+
0%,
114+
100% {
159115
text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
160116
}
161117
50% {
162-
text-shadow: 0 0 20px rgba(0, 255, 136, 0.8), 0 0 30px rgba(0, 255, 136, 0.5);
118+
text-shadow: 0 0 20px rgba(0, 255, 136, 0.8),
119+
0 0 30px rgba(0, 255, 136, 0.5);
163120
}
164121
}
165122

0 commit comments

Comments
 (0)