File size: 7,601 Bytes
671ec71
 
 
 
 
559af80
0b49cb3
671ec71
 
 
 
 
a432b46
 
671ec71
 
 
 
 
 
 
 
 
 
 
 
a432b46
671ec71
a432b46
671ec71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0b49cb3
 
671ec71
 
0b49cb3
671ec71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a432b46
 
671ec71
a432b46
671ec71
0b49cb3
671ec71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a432b46
671ec71
0b49cb3
 
671ec71
 
 
 
 
 
 
0b49cb3
671ec71
 
3e4b4c2
671ec71
 
 
a432b46
 
671ec71
 
 
a432b46
 
671ec71
 
 
 
 
 
 
 
0b49cb3
 
671ec71
 
 
 
 
 
 
 
0b49cb3
 
671ec71
 
0b49cb3
 
671ec71
 
0b49cb3
 
671ec71
 
0b49cb3
671ec71
 
 
0b49cb3
671ec71
 
3e4b4c2
 
671ec71
 
a432b46
 
671ec71
 
3e4b4c2
671ec71
3e4b4c2
0b49cb3
671ec71
 
 
a432b46
 
671ec71
 
3e4b4c2
 
671ec71
 
a432b46
 
671ec71
 
0b49cb3
671ec71
 
 
 
0b49cb3
3e4b4c2
671ec71
 
3e4b4c2
 
671ec71
 
 
 
a432b46
 
671ec71
 
 
 
 
 
 
 
 
0b49cb3
 
671ec71
 
0b49cb3
 
671ec71
 
 
0b49cb3
671ec71
 
a432b46
 
671ec71
 
365e0b4
671ec71
 
 
 
0b49cb3
671ec71
 
 
0b49cb3
671ec71
 
0b49cb3
671ec71
 
 
 
3e4b4c2
671ec71
 
 
 
3e4b4c2
671ec71
 
 
 
 
 
0b49cb3
671ec71
 
 
 
 
0b49cb3
671ec71
 
0b49cb3
671ec71
 
 
0b49cb3
671ec71
 
0b49cb3
671ec71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0b49cb3
 
 
 
 
 
 
671ec71
 
 
0b49cb3
671ec71
 
0b49cb3
671ec71
 
 
 
 
 
0b49cb3
671ec71
 
a432b46
671ec71
 
 
 
a432b46
671ec71
 
 
 
 
 
 
 
 
a432b46
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
/* General App Styles */
body {
  font-family: 'Arial', sans-serif;
  background-color: #f0f8ff; /* Light alice blue */
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
}

.app-container {
  background-color: #fff;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 100%;
  max-width: 900px; /* Max width adjusted for new layout */
}

.game-header {
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.game-header h1 {
  font-size: 2.5rem; 
  color: #007bff; 
  margin: 0;
}

.display-mode-selector button {
  font-size: 1.3rem; 
  padding: 10px 18px;
  margin: 0 8px;
  border: 2px solid #007bff;
  background-color: #fff;
  color: #007bff;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.display-mode-selector button:hover {
  background-color: #0056b3;
  color: #fff;
}

.display-mode-selector button.active {
  background-color: #007bff;
  color: #fff;
}

.score-display {
  font-size: 1.6rem; 
  font-weight: bold;
  color: #28a745; 
}

/* Game Area Styles */
.game-area {
  padding: 20px;
}

/* New Question Container for 5-column layout */
.question-container-new {
  display: flex;
  justify-content: space-around; /* Distribute columns */
  align-items: flex-start; /* Align tops of columns */
  background-color: #fffacd; /* Light yellow background like image */
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 30px;
  border: 1px solid #ddd; /* Soft border */
}

.operand-column, .result-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center content like the question mark */
  gap: 15px; 
  flex: 1; 
  padding: 10px;
  min-height: 150px; /* Ensure it has some height to center the ? vertically */
}

.number-box {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 20px 30px;
  min-width: 80px; /* Minimum width for the number box */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: inline-flex; /* To make it wrap content tightly */
  justify-content: center;
  align-items: center;
}

.number-text {
  font-size: 3.5rem; /* Large numbers */
  font-weight: bold;
  color: #333;
}

.objects-display {
  display: flex;
  flex-direction: column; /* Stack objects vertically as in image */
  justify-content: center;
  align-items: center;
  gap: 8px; 
  min-height: 60px; /* Base height even if empty */
  width: 100%; 
}

.item-object {
  font-size: 2.5rem !important; /* Adjusted emoji size */
  padding: 2px;
}

.operator-cell {
  display: flex;
  flex-direction: column; /* To center operator and have line above/below */
  align-items: center;
  justify-content: center; /* Center the operator symbol vertically */
  position: relative; /* For pseudo-elements for lines */
  align-self: stretch; /* Make cell take full height of question-container-new */
  padding: 0 20px; /* Horizontal padding around operator */
}

.operator-cell::before, .operator-cell::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px; /* Width of the vertical line */
  background-color: #bdbdbd; /* Color of the vertical line */
  height: calc(50% - 25px); /* Adjust based on operator symbol size and desired gap */
}

.operator-cell::before {
  top: 0;
}

.operator-cell::after {
  bottom: 0;
}

.operator-symbol {
  font-size: 2rem; 
  font-weight: bold;
  color: #555;
  background-color: #fff;
  border: 2px solid #bdbdbd;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1; /* To appear above the pseudo-element lines */
}

.answer-placeholder-new {
  font-size: 4rem; /* Large question mark */
  font-weight: bold;
  color: #dc3545; /* Red color or similar to operand numbers */
  display: flex;
  justify-content: center;
  align-items: center;
  /* If it needs a box like numbers, we can add similar styling to .number-box here */
  /* For now, just a large character */
}

/* Options Styles - Assuming these are still relevant */
.options-container {
  display: flex;
  justify-content: center;
  gap: 20px; 
  margin-bottom: 30px;
}

.option-button {
  font-size: 2.5rem; 
  font-weight: bold;
  padding: 20px 35px;
  border: 3px solid #28a745; 
  background-color: #fff;
  color: #28a745;
  border-radius: 15px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
  min-width: 90px; 
}

.option-button:hover {
  background-color: #218838; 
  color: #fff;
  transform: translateY(-3px); 
}

/* Feedback Message Styles */
.feedback-message {
  font-size: 1.8rem; 
  font-weight: bold;
  margin-top: 25px;
  padding: 15px;
  border-radius: 10px;
  color: #fff;
  /* Assuming JS still sets background color for correct/incorrect, or do it here */
}

.feedback-message:empty {
    display: none;
}

/* Loading State */
.loading {
  font-size: 2rem;
  text-align: center;
  padding: 50px;
  color: #007bff;
}

/* Remove old styles that are no longer used */
/* .question-container, .operand-stack, .operator, .answer-placeholder (and their media queries if specific) */

/* Responsive adjustments for the new layout */
@media (max-width: 768px) {
  .game-header h1 {
    font-size: 2rem;
  }
  .display-mode-selector button {
    font-size: 1.1rem;
    padding: 8px 12px;
  }
  .score-display {
    font-size: 1.3rem;
  }
  .question-container-new {
    flex-direction: column; /* Stack columns vertically on smaller screens */
    align-items: center; /* Center columns when stacked */
    padding: 15px;
  }
  .operand-column, .result-column {
    width: 100%; /* Make columns take full width when stacked */
    max-width: 300px; /* Limit width of operand columns */
    gap: 10px;
  }
  .operator-cell {
    flex-direction: row; /* Operators side by side with lines */
    align-self: auto; /* Reset self-stretch */
    padding: 10px 0;
    width: 80%;
    max-width: 250px;
  }
  .operator-cell::before, .operator-cell::after {
    width: calc(50% - 25px); /* Horizontal lines */
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
  }
  .operator-cell::before {
    left: 0;
  }
  .operator-cell::after {
    right: 0;
    left: auto; /* Override previous left: 50% */
  }
  .number-text {
    font-size: 2.8rem;
  }
  .item-object {
    font-size: 2rem !important;
  }
  .operator-symbol {
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
  }
  .options-container {
    flex-direction: column; 
    gap: 10px;
  }
  .option-button {
    font-size: 2rem;
    padding: 15px 25px;
  }
  .feedback-message {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .game-header {
    flex-direction: column;
    gap: 10px;
  }
  .game-header h1 {
    font-size: 1.6rem;
  }
   .display-mode-selector button {
    font-size: 1rem;
    padding: 6px 10px;
  }
  .number-text {
    font-size: 2.2rem; 
  }
  .item-object {
    font-size: 1.8rem !important;
  }
  .operator-symbol {
    font-size: 1.3rem;
    width: 30px;
    height: 30px;
  }
  .option-button {
    font-size: 1.6rem;
    padding: 12px 20px;
  }
}

/* Clean up old, unused styles - This should be done carefully after verifying */
.question-container, .operand-stack, .operator, .answer-placeholder, .result-objects-display {
    display: none !important; /* Hide them if they are still in the DOM somehow */
}