1
- : root {
2
- --primary : # 6e57e0 ;
3
- --secondary : # 64ffda ;
4
- --dark : # 1a1b26 ;
5
- --light : # a9b1d6 ;
6
- --background : # 24283b ;
7
- --container : # 1f2335 ;
8
- }
1
+ /* styles.css */
9
2
3
+ /* General Body Styling */
10
4
body {
11
- font-family : 'Inter' , 'Segoe UI' , system-ui, sans-serif;
12
- background : linear-gradient (135deg , var (--dark ), var (--background ));
13
- color : var (--light );
14
- margin : 0 ;
15
- padding : 0 ;
16
- min-height : 100vh ;
5
+ font-family : 'Arial' , sans-serif;
6
+ background : linear-gradient (135deg , # f5f7fa, # c3cfe2 );
17
7
display : flex;
18
- flex-direction : column ;
8
+ justify-content : center ;
19
9
align-items : center;
10
+ height : 100vh ;
11
+ margin : 0 ;
12
+ overflow : hidden;
20
13
}
21
14
22
- # main-container {
23
- background : linear-gradient ( 145 deg , var ( -- container) , rgba ( 31 , 35 , 53 , 0.8 ));
24
- padding : 3 rem ;
25
- border-radius : 20 px ;
26
- box-shadow : 0 10 px 40px rgba ( 0 , 0 , 0 , 0.3 ) ;
27
- margin : 2 rem auto ;
28
- width : 90 % ;
29
- max-width : 1000 px ;
30
- backdrop-filter : blur ( 10 px ) ;
15
+ /* Game Container */
16
+ . game- container {
17
+ text-align : center ;
18
+ background-color : # ffffff ;
19
+ padding : 40px 60 px ;
20
+ border-radius : 15 px ;
21
+ box-shadow : 0 10 px 30 px rgba ( 0 , 0 , 0 , 0.15 ) ;
22
+ position : relative ;
23
+ animation : fadeIn 1 s ease-in-out ;
31
24
}
32
25
33
- # header {
34
- text-align : center;
35
- margin-bottom : 2rem ;
36
- padding : 1.5rem ;
37
- border-bottom : 2px solid var (--primary );
38
- animation : fadeIn 0.8s ease;
26
+ /* Title Styling */
27
+ h1 {
28
+ font-size : 2.5em ;
29
+ color : # 333 ;
30
+ margin-bottom : 10px ;
31
+ text-transform : uppercase;
32
+ letter-spacing : 2px ;
39
33
}
40
34
41
- # header h1 {
42
- color : var (--secondary );
35
+ /* Subtitle Styling */
36
+ p {
37
+ font-size : 1.2em ;
38
+ color : # 666 ;
39
+ margin-bottom : 20px ;
40
+ }
41
+
42
+ /* Word Display Styling */
43
+ # word-display {
43
44
font-size : 2.5em ;
44
- text-shadow : 2px 2px 4px rgba (0 , 0 , 0 , 0.3 );
45
- margin : 0 ;
45
+ font-weight : bold;
46
+ color : # 4CAF50 ;
47
+ margin : 20px 0 ;
48
+ text-transform : lowercase;
46
49
letter-spacing : 1px ;
50
+ transition : color 0.3s ease-in-out;
47
51
}
48
52
49
- . game-container {
50
- background : linear-gradient ( 135 deg , rgba ( 110 , 87 , 224 , 0.1 ) , rgba ( 100 , 255 , 218 , 0.1 ));
51
- padding : 2 rem ;
52
- border-radius : 16 px ;
53
- box-shadow : 0 8 px 32 px rgba ( 0 , 0 , 0 , 0.1 ) ;
54
- margin-top : 1.5 rem ;
55
- display : flex ;
56
- flex-direction : column ;
57
- align-items : center ;
58
- gap : 1.5 rem ;
53
+ /* User Input Styling */
54
+ # user-input {
55
+ font-size : 1.5 em ;
56
+ padding : 15 px ;
57
+ width : 80 % ;
58
+ margin-bottom : 20 px ;
59
+ border : 2 px solid # ccc ;
60
+ border-radius : 10 px ;
61
+ outline : none ;
62
+ transition : border-color 0.3 s ease-in-out ;
59
63
}
60
64
61
- .typing-area {
62
- background : rgba (31 , 35 , 53 , 0.8 );
63
- color : var (--light );
64
- border : 2px solid var (--primary );
65
- padding : 1rem 1.5rem ;
66
- border-radius : 12px ;
67
- font-size : 1.1rem ;
68
- width : 80% ;
69
- text-align : center;
70
- margin : 1rem 0 ;
71
- transition : all 0.3s cubic-bezier (0.4 , 0 , 0.2 , 1 );
65
+ # user-input : focus {
66
+ border-color : # 4CAF50 ;
67
+ box-shadow : 0 0 8px rgba (76 , 175 , 80 , 0.5 );
72
68
}
73
69
74
- . typing-area : focus {
75
- outline : none;
76
- border-color : var ( --secondary ) ;
77
- box-shadow : 0 0 20 px rgba ( 100 , 255 , 218 , 0.2 ) ;
78
- transform : translateY ( -2 px ) ;
70
+ /* Score Board Styling */
71
+ # score-board {
72
+ display : flex ;
73
+ justify-content : space-around ;
74
+ margin-bottom : 20 px ;
79
75
}
80
76
81
- button {
82
- background : linear-gradient (135deg , var (--primary ), # 8b74ff );
83
- color : white;
84
- border : none;
85
- padding : 0.8rem 1.5rem ;
86
- border-radius : 8px ;
87
- font-weight : 600 ;
88
- cursor : pointer;
89
- transition : all 0.3s cubic-bezier (0.4 , 0 , 0.2 , 1 );
90
- letter-spacing : 0.5px ;
91
- text-transform : uppercase;
92
- font-size : 0.9rem ;
77
+ # score-board p {
78
+ font-size : 1.2em ;
79
+ color : # 333 ;
93
80
}
94
81
95
- button : hover {
96
- transform : translateY (-3px );
97
- box-shadow : 0 10px 20px rgba (110 , 87 , 224 , 0.3 );
98
- background : linear-gradient (135deg , # 8b74ff, var (--primary ));
82
+ # score-board span {
83
+ font-weight : bold;
84
+ color : # 4CAF50 ;
99
85
}
100
86
101
- .generated-text {
102
- padding : 1.5rem ;
103
- margin : 1rem 0 ;
104
- background : rgba (31 , 35 , 53 , 0.9 );
105
- border-left : 4px solid var (--primary );
106
- border-radius : 0 12px 12px 0 ;
107
- transition : all 0.3s cubic-bezier (0.4 , 0 , 0.2 , 1 );
108
- text-align : center;
109
- width : 80% ;
110
- font-size : 1.2rem ;
111
- line-height : 1.6 ;
87
+ /* Start Button Styling */
88
+ # start-button {
89
+ padding : 15px 30px ;
90
+ font-size : 1.2em ;
91
+ background-color : # 4CAF50 ;
92
+ color : white;
93
+ border : none;
94
+ border-radius : 10px ;
95
+ cursor : pointer;
96
+ transition : background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
112
97
}
113
98
114
- .generated-text : hover {
115
- background : rgba (110 , 87 , 224 , 0.1 );
116
- transform : translateX (5px );
117
- border-left-color : var (--secondary );
99
+ # start-button : hover {
100
+ background-color : # 45a049 ;
101
+ transform : scale (1.05 );
118
102
}
119
103
104
+ /* Animation for Game Container */
120
105
@keyframes fadeIn {
121
106
from {
122
107
opacity : 0 ;
@@ -128,111 +113,18 @@ button:hover {
128
113
}
129
114
}
130
115
131
- /* Responsive adjustments */
132
- @media (max-width : 768px ) {
133
- # main-container {
134
- padding : 1.5rem ;
135
- width : 95% ;
136
- }
137
-
138
- .typing-area , .generated-text {
139
- width : 90% ;
140
- }
141
- }
142
-
143
- .footer {
144
- background : linear-gradient (145deg , var (--container ), rgba (31 , 35 , 53 , 0.8 ));
145
- padding : 2rem ;
146
- border-radius : 20px ;
147
- box-shadow : 0 10px 40px rgba (0 , 0 , 0 , 0.3 );
148
- margin : 2rem auto;
149
- width : 90% ;
150
- max-width : 1000px ;
151
- backdrop-filter : blur (10px );
152
- text-align : center;
153
- }
154
-
155
- .typing-area {
156
- background : linear-gradient (145deg , rgba (31 , 35 , 53 , 0.8 ), rgba (31 , 35 , 53 , 0.6 ));
157
- color : var (--light );
158
- border : 2px solid var (--primary );
159
- padding : 1.5rem 2rem ;
160
- border-radius : 12px ;
161
- font-size : 1.2rem ;
162
- width : 80% ;
163
- text-align : center;
164
- margin : 1.5rem 0 ;
165
- transition : all 0.3s cubic-bezier (0.4 , 0 , 0.2 , 1 );
166
- backdrop-filter : blur (5px );
167
- }
168
-
169
- .typing-area ::placeholder {
170
- color : rgba (169 , 177 , 214 , 0.8 );
171
- font-style : italic;
172
- }
173
-
174
- .typing-area : focus {
175
- outline : none;
176
- border-color : var (--secondary );
177
- box-shadow : 0 0 25px rgba (100 , 255 , 218 , 0.2 );
178
- transform : translateY (-2px );
116
+ /* Animation for Correct Word */
117
+ .correct-word {
118
+ color : # 4CAF50 !important ;
119
+ animation : bounce 0.5s ease-in-out;
179
120
}
180
121
181
- @media (max-width : 768px ) {
182
- .footer {
183
- padding : 1.5rem ;
184
- width : 95% ;
185
- border-radius : 15px ;
186
- }
187
-
188
- .typing-area {
189
- width : 90% ;
190
- padding : 1rem 1.5rem ;
191
- font-size : 1.1rem ;
122
+ /* Bounce Animation */
123
+ @keyframes bounce {
124
+ 0% , 100% {
125
+ transform : translateY (0 );
192
126
}
193
- }
194
-
195
- .typing-area ::placeholder {
196
- color : rgba (169 , 177 , 214 , 0.7 );
197
- font-style : italic;
198
- font-size : 1.2rem ;
199
- transition : all 0.3s ease;
200
- letter-spacing : 0.5px ;
201
- }
202
-
203
- # timer , # score {
204
- background : linear-gradient (145deg , rgba (31 , 35 , 53 , 0.8 ), rgba (31 , 35 , 53 , 0.6 ));
205
- padding : 1rem 1.5rem ;
206
- border-radius : 10px ;
207
- font-size : 1.1rem ;
208
- color : var (--secondary );
209
- border : 1px solid var (--primary );
210
- margin : 0.5rem ;
211
- min-width : 150px ;
212
- text-align : center;
213
- backdrop-filter : blur (5px );
214
- box-shadow : 0 4px 15px rgba (0 , 0 , 0 , 0.2 );
215
- }
216
-
217
- # timer ::before {
218
- content : "Tiempo: " ;
219
- color : var (--light );
220
- font-size : 0.9rem ;
221
- opacity : 0.8 ;
222
- }
223
-
224
- # score ::before {
225
- content : "Puntuación: " ;
226
- color : var (--light );
227
- font-size : 0.9rem ;
228
- opacity : 0.8 ;
229
- }
230
-
231
- @media (max-width : 768px ) {
232
- # timer , # score {
233
- padding : 0.8rem 1rem ;
234
- font-size : 1rem ;
235
- min-width : 120px ;
127
+ 50% {
128
+ transform : translateY (-10px );
236
129
}
237
130
}
238
-
0 commit comments