reqct-gamehub-module 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,361 @@
1
+ /* Game2048.css - Компактный дизайн */
2
+
3
+ .game-2048 {
4
+ width: 100%;
5
+ height: 100%;
6
+ display: flex;
7
+ flex-direction: column;
8
+ background: white;
9
+ color: #333;
10
+ overflow: hidden;
11
+ }
12
+
13
+ .game-header {
14
+ padding: 12px 16px;
15
+ border-bottom: 1px solid #e1e5e9;
16
+ }
17
+
18
+ .game-header h2 {
19
+ margin: 0 0 8px 0;
20
+ font-size: 18px;
21
+ color: #333;
22
+ font-weight: 600;
23
+ }
24
+
25
+ .game-subtitle {
26
+ font-size: 16px;
27
+ color: #666;
28
+ }
29
+
30
+ .score-display {
31
+ background: #f8f9fa;
32
+ border-radius: 8px;
33
+ padding: 10px;
34
+ text-align: center;
35
+ border: 1px solid #e1e5e9;
36
+ margin-bottom: 12px;
37
+ }
38
+
39
+ .score-label {
40
+ font-size: 10px;
41
+ color: #666;
42
+ text-transform: uppercase;
43
+ letter-spacing: 0.5px;
44
+ margin-bottom: 4px;
45
+ }
46
+
47
+ .score-value {
48
+ font-size: 24px;
49
+ font-weight: 700;
50
+ color: #667eea;
51
+ }
52
+
53
+ .game-controls {
54
+ display: flex;
55
+ gap: 8px;
56
+ }
57
+
58
+ .control-btn {
59
+ flex: 1;
60
+ padding: 8px;
61
+ background: linear-gradient(45deg, #667eea, #764ba2);
62
+ color: white;
63
+ border: none;
64
+ border-radius: 6px;
65
+ font-size: 11px;
66
+ font-weight: 600;
67
+ cursor: pointer;
68
+ transition: all 0.2s;
69
+ text-transform: uppercase;
70
+ letter-spacing: 0.5px;
71
+ }
72
+
73
+ .control-btn:hover {
74
+ transform: translateY(-1px);
75
+ box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
76
+ }
77
+
78
+ .instructions {
79
+ padding: 8px 16px;
80
+ font-size: 11px;
81
+ color: #666;
82
+ text-align: center;
83
+ border-bottom: 1px solid #e1e5e9;
84
+ }
85
+
86
+ .instructions p {
87
+ margin: 4px 0;
88
+ }
89
+
90
+ .instructions strong {
91
+ color: #333;
92
+ font-weight: 600;
93
+ }
94
+
95
+ .game-area {
96
+ flex: 1;
97
+ display: flex;
98
+ flex-direction: column;
99
+ align-items: center;
100
+ justify-content: center;
101
+ padding: 16px;
102
+ gap: 16px;
103
+ min-height: 0;
104
+ }
105
+
106
+ .board-container {
107
+ max-width: 100%;
108
+ max-height: 100%;
109
+ }
110
+
111
+ .board {
112
+ background: #bbada0;
113
+ border-radius: 6px;
114
+ padding: 8px;
115
+ display: inline-block;
116
+ }
117
+
118
+ .row {
119
+ display: flex;
120
+ margin-bottom: 8px;
121
+ }
122
+
123
+ .row:last-child {
124
+ margin-bottom: 0;
125
+ }
126
+
127
+ .cell {
128
+ width: 50px;
129
+ height: 50px;
130
+ background: rgba(238, 228, 218, 0.35);
131
+ border-radius: 3px;
132
+ margin-right: 8px;
133
+ position: relative;
134
+ }
135
+
136
+ .cell:last-child {
137
+ margin-right: 0;
138
+ }
139
+
140
+ .tile {
141
+ position: absolute;
142
+ top: 0;
143
+ left: 0;
144
+ width: 100%;
145
+ height: 100%;
146
+ display: flex;
147
+ align-items: center;
148
+ justify-content: center;
149
+ border-radius: 3px;
150
+ font-weight: bold;
151
+ z-index: 1;
152
+ font-size: 18px;
153
+ }
154
+
155
+ .tile-2 { background: #eee4da; color: #776e65; }
156
+ .tile-4 { background: #ede0c8; color: #776e65; }
157
+ .tile-8 { background: #f2b179; color: #f9f6f2; }
158
+ .tile-16 { background: #f59563; color: #f9f6f2; }
159
+ .tile-32 { background: #f67c5f; color: #f9f6f2; }
160
+ .tile-64 { background: #f65e3b; color: #f9f6f2; }
161
+ .tile-128 { background: #edcf72; color: #f9f6f2; font-size: 16px; }
162
+ .tile-256 { background: #edcc61; color: #f9f6f2; font-size: 16px; }
163
+ .tile-512 { background: #edc850; color: #f9f6f2; font-size: 16px; }
164
+ .tile-1024 { background: #edc53f; color: #f9f6f2; font-size: 14px; }
165
+ .tile-2048 { background: #edc22e; color: #f9f6f2; font-size: 14px; animation: glow 2s infinite; }
166
+
167
+ @keyframes glow {
168
+ 0%, 100% { box-shadow: 0 0 10px rgba(237, 194, 46, 0.5); }
169
+ 50% { box-shadow: 0 0 20px rgba(237, 194, 46, 0.8); }
170
+ }
171
+
172
+ .mobile-controls {
173
+ display: none;
174
+ width: 100%;
175
+ max-width: 200px;
176
+ }
177
+
178
+ .control-row {
179
+ display: flex;
180
+ justify-content: center;
181
+ gap: 40px;
182
+ margin: 4px 0;
183
+ }
184
+
185
+ .mobile-control-btn {
186
+ width: 50px;
187
+ height: 50px;
188
+ background: #667eea;
189
+ border: none;
190
+ border-radius: 8px;
191
+ color: white;
192
+ font-size: 20px;
193
+ font-weight: bold;
194
+ cursor: pointer;
195
+ display: flex;
196
+ align-items: center;
197
+ justify-content: center;
198
+ transition: all 0.2s;
199
+ }
200
+
201
+ .mobile-control-btn:active {
202
+ transform: scale(0.95);
203
+ background: #764ba2;
204
+ }
205
+
206
+ .spacer {
207
+ width: 50px;
208
+ }
209
+
210
+ .game-over-overlay,
211
+ .win-overlay {
212
+ position: absolute;
213
+ top: 0;
214
+ left: 0;
215
+ right: 0;
216
+ bottom: 0;
217
+ background: rgba(255, 255, 255, 0.95);
218
+ display: flex;
219
+ align-items: center;
220
+ justify-content: center;
221
+ z-index: 10;
222
+ }
223
+
224
+ .game-over-content,
225
+ .win-content {
226
+ background: white;
227
+ padding: 20px;
228
+ border-radius: 12px;
229
+ text-align: center;
230
+ border: 2px solid #e1e5e9;
231
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
232
+ max-width: 280px;
233
+ width: 90%;
234
+ }
235
+
236
+ .game-over-content h3 {
237
+ color: #ff5e62;
238
+ font-size: 16px;
239
+ margin-bottom: 12px;
240
+ font-weight: 600;
241
+ }
242
+
243
+ .win-content h3 {
244
+ color: #00b09b;
245
+ font-size: 16px;
246
+ margin-bottom: 12px;
247
+ font-weight: 600;
248
+ }
249
+
250
+ .final-score {
251
+ background: #f8f9fa;
252
+ padding: 12px;
253
+ border-radius: 8px;
254
+ margin: 12px 0;
255
+ border: 1px solid #e1e5e9;
256
+ }
257
+
258
+ .final-score p {
259
+ margin: 6px 0;
260
+ font-size: 12px;
261
+ color: #666;
262
+ display: flex;
263
+ justify-content: space-between;
264
+ }
265
+
266
+ .final-score strong {
267
+ color: #667eea;
268
+ font-size: 14px;
269
+ }
270
+
271
+ .play-again-btn,
272
+ .continue-btn,
273
+ .restart-btn {
274
+ padding: 8px 16px;
275
+ border: none;
276
+ border-radius: 6px;
277
+ font-size: 11px;
278
+ font-weight: 600;
279
+ cursor: pointer;
280
+ transition: all 0.2s;
281
+ text-transform: uppercase;
282
+ letter-spacing: 0.5px;
283
+ margin: 4px;
284
+ }
285
+
286
+ .play-again-btn {
287
+ background: linear-gradient(45deg, #667eea, #764ba2);
288
+ color: white;
289
+ }
290
+
291
+ .continue-btn {
292
+ background: linear-gradient(45deg, #00b09b, #96c93d);
293
+ color: white;
294
+ }
295
+
296
+ .restart-btn {
297
+ background: linear-gradient(45deg, #ff9966, #ff5e62);
298
+ color: white;
299
+ }
300
+
301
+ .win-buttons {
302
+ display: flex;
303
+ gap: 8px;
304
+ justify-content: center;
305
+ margin-top: 12px;
306
+ }
307
+
308
+ @media (max-width: 768px) {
309
+ .cell {
310
+ width: 40px;
311
+ height: 40px;
312
+ }
313
+
314
+ .tile {
315
+ font-size: 14px;
316
+ }
317
+
318
+ .tile-128,
319
+ .tile-256,
320
+ .tile-512 {
321
+ font-size: 12px;
322
+ }
323
+
324
+ .tile-1024,
325
+ .tile-2048 {
326
+ font-size: 10px;
327
+ }
328
+
329
+ .mobile-controls {
330
+ display: block;
331
+ }
332
+ }
333
+
334
+ @media (max-width: 480px) {
335
+ .cell {
336
+ width: 35px;
337
+ height: 35px;
338
+ }
339
+
340
+ .board {
341
+ padding: 6px;
342
+ }
343
+
344
+ .row {
345
+ margin-bottom: 6px;
346
+ }
347
+
348
+ .cell {
349
+ margin-right: 6px;
350
+ }
351
+
352
+ .mobile-control-btn {
353
+ width: 40px;
354
+ height: 40px;
355
+ font-size: 16px;
356
+ }
357
+
358
+ .spacer {
359
+ width: 40px;
360
+ }
361
+ }
@@ -0,0 +1,343 @@
1
+ /* MemoryGame.css - Квадратное поле для всех режимов */
2
+
3
+ .memory-game {
4
+ width: 100%;
5
+ height: 100%;
6
+ display: flex;
7
+ flex-direction: column;
8
+ background: white;
9
+ color: #333;
10
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
11
+ overflow: hidden;
12
+ }
13
+
14
+ .memory-game h2 {
15
+ padding: 12px 16px;
16
+ margin: 0;
17
+ font-size: 18px;
18
+ color: #333;
19
+ font-weight: 600;
20
+ border-bottom: 1px solid #e1e5e9;
21
+ flex-shrink: 0;
22
+ }
23
+
24
+ .game-stats {
25
+ display: grid;
26
+ grid-template-columns: repeat(3, 1fr);
27
+ gap: 8px;
28
+ padding: 12px 16px;
29
+ border-bottom: 1px solid #e1e5e9;
30
+ flex-shrink: 0;
31
+ }
32
+
33
+ .stat {
34
+ background: #f8f9fa;
35
+ border-radius: 8px;
36
+ padding: 10px;
37
+ text-align: center;
38
+ border: 1px solid #e1e5e9;
39
+ }
40
+
41
+ .stat span {
42
+ font-size: 10px;
43
+ color: #666;
44
+ text-transform: uppercase;
45
+ letter-spacing: 0.5px;
46
+ display: block;
47
+ margin-bottom: 4px;
48
+ }
49
+
50
+ .stat strong {
51
+ font-size: 18px;
52
+ color: #667eea;
53
+ font-weight: 700;
54
+ }
55
+
56
+ .difficulty-selector {
57
+ padding: 8px 16px;
58
+ border-bottom: 1px solid #e1e5e9;
59
+ display: flex;
60
+ align-items: center;
61
+ justify-content: center;
62
+ gap: 12px;
63
+ flex-shrink: 0;
64
+ }
65
+
66
+ .difficulty-label {
67
+ font-size: 11px;
68
+ color: #666;
69
+ font-weight: 600;
70
+ }
71
+
72
+ .difficulty-btn {
73
+ padding: 6px 12px;
74
+ background: #f8f9fa;
75
+ border: 1px solid #e1e5e9;
76
+ border-radius: 6px;
77
+ font-size: 10px;
78
+ color: #666;
79
+ cursor: pointer;
80
+ transition: all 0.2s;
81
+ text-transform: uppercase;
82
+ letter-spacing: 0.5px;
83
+ }
84
+
85
+ .difficulty-btn.active {
86
+ background: linear-gradient(45deg, #667eea, #764ba2);
87
+ color: white;
88
+ border-color: #667eea;
89
+ }
90
+
91
+ .difficulty-btn:hover:not(.active) {
92
+ background: #e1e5e9;
93
+ }
94
+
95
+ /* ИСПРАВЛЕННОЕ ИГРОВОЕ ПОЛЕ - ВСЕГДА КВАДРАТ */
96
+ .memory-board-container {
97
+ flex: 1;
98
+ display: flex;
99
+ align-items: center;
100
+ justify-content: center;
101
+ padding: 16px;
102
+ min-height: 0;
103
+ position: relative;
104
+ overflow: hidden;
105
+ }
106
+
107
+ .memory-board {
108
+ display: grid;
109
+ gap: 8px;
110
+ padding: 8px;
111
+ align-items: center;
112
+ justify-items: center;
113
+ width: fit-content;
114
+ height: fit-content;
115
+ max-width: 100%;
116
+ max-height: 100%;
117
+ margin: 0 auto;
118
+ }
119
+
120
+ /* КВАДРАТНЫЕ СЕТКИ ДЛЯ ВСЕХ УРОВНЕЙ */
121
+
122
+ /* Легкий: 8 пар = 16 карточек = 4×4 */
123
+ .memory-board.easy {
124
+ grid-template-columns: repeat(4, 1fr);
125
+ grid-template-rows: repeat(4, 1fr);
126
+ }
127
+
128
+ /* Средний: 12 пар = 24 карточки = 6×4 (горизонтально) */
129
+ .memory-board.medium {
130
+ grid-template-columns: repeat(6, 1fr);
131
+ grid-template-rows: repeat(4, 1fr);
132
+ }
133
+
134
+ /* Сложный: 16 пар = 32 карточки = 8×4 (горизонтально) */
135
+ .memory-board.hard {
136
+ grid-template-columns: repeat(8, 1fr);
137
+ grid-template-rows: repeat(4, 1fr);
138
+ }
139
+
140
+ /* АДАПТИВНЫЕ КАРТОЧКИ - ОДИНАКОВЫЙ РАЗМЕР ВСЕГДА */
141
+ .memory-card {
142
+ width: 70px;
143
+ height: 70px;
144
+ perspective: 1000px;
145
+ cursor: pointer;
146
+ position: relative;
147
+ transform-style: preserve-3d;
148
+ transition: transform 0.3s;
149
+ aspect-ratio: 1;
150
+ }
151
+
152
+ .memory-card.flipped {
153
+ transform: rotateY(180deg);
154
+ }
155
+
156
+ .card-front,
157
+ .card-back {
158
+ position: absolute;
159
+ width: 100%;
160
+ height: 100%;
161
+ backface-visibility: hidden;
162
+ border-radius: 8px;
163
+ display: flex;
164
+ align-items: center;
165
+ justify-content: center;
166
+ font-size: 24px;
167
+ transition: transform 0.6s;
168
+ box-sizing: border-box;
169
+ }
170
+
171
+ .card-front {
172
+ background: linear-gradient(45deg, #667eea, #764ba2);
173
+ color: white;
174
+ font-weight: bold;
175
+ transform: rotateY(0deg);
176
+ box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
177
+ }
178
+
179
+ .card-back {
180
+ background: white;
181
+ border: 2px solid #667eea;
182
+ color: #667eea;
183
+ transform: rotateY(180deg);
184
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
185
+ }
186
+
187
+ .card-back.matched {
188
+ background: linear-gradient(45deg, #00b09b, #96c93d);
189
+ color: white;
190
+ border-color: #00b09b;
191
+ }
192
+
193
+ .game-controls {
194
+ padding: 12px 16px;
195
+ border-top: 1px solid #e1e5e9;
196
+ flex-shrink: 0;
197
+ display: flex;
198
+ gap: 8px;
199
+ justify-content: center;
200
+ }
201
+
202
+ .restart-btn {
203
+ padding: 8px 16px;
204
+ background: linear-gradient(45deg, #667eea, #764ba2);
205
+ color: white;
206
+ border: none;
207
+ border-radius: 6px;
208
+ font-size: 11px;
209
+ font-weight: 600;
210
+ cursor: pointer;
211
+ transition: all 0.2s;
212
+ text-transform: uppercase;
213
+ letter-spacing: 0.5px;
214
+ }
215
+
216
+ .restart-btn:hover {
217
+ transform: translateY(-1px);
218
+ box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
219
+ }
220
+
221
+ .game-instructions {
222
+ padding: 8px 16px;
223
+ font-size: 10px;
224
+ color: #666;
225
+ text-align: center;
226
+ border-top: 1px solid #e1e5e9;
227
+ flex-shrink: 0;
228
+ }
229
+
230
+ .game-instructions p {
231
+ margin: 4px 0;
232
+ }
233
+
234
+ /* Анимация для карточек */
235
+ @keyframes match {
236
+ 0%, 100% { transform: scale(1); }
237
+ 50% { transform: scale(1.1); }
238
+ }
239
+
240
+ .memory-card.matched .card-back {
241
+ animation: match 0.5s ease;
242
+ }
243
+
244
+ /* АДАПТИВНОСТЬ ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ */
245
+ @media (max-width: 1024px) {
246
+ .memory-card {
247
+ width: 60px;
248
+ height: 60px;
249
+ }
250
+
251
+ .card-front,
252
+ .card-back {
253
+ font-size: 20px;
254
+ }
255
+
256
+ /* На планшетах уменьшаем колонки */
257
+ .memory-board.medium {
258
+ grid-template-columns: repeat(5, 1fr);
259
+ grid-template-rows: repeat(5, 1fr);
260
+ }
261
+
262
+ .memory-board.hard {
263
+ grid-template-columns: repeat(6, 1fr);
264
+ grid-template-rows: repeat(6, 1fr);
265
+ }
266
+ }
267
+
268
+ @media (max-width: 768px) {
269
+ .memory-board-container {
270
+ padding: 10px;
271
+ }
272
+
273
+ .memory-card {
274
+ width: 50px;
275
+ height: 50px;
276
+ }
277
+
278
+ .card-front,
279
+ .card-back {
280
+ font-size: 18px;
281
+ }
282
+
283
+ .memory-board {
284
+ gap: 6px;
285
+ padding: 6px;
286
+ }
287
+
288
+ /* На телефонах уменьшаем сетку */
289
+ .memory-board.easy {
290
+ grid-template-columns: repeat(4, 1fr);
291
+ grid-template-rows: repeat(4, 1fr);
292
+ }
293
+
294
+ .memory-board.medium {
295
+ grid-template-columns: repeat(4, 1fr);
296
+ grid-template-rows: repeat(6, 1fr);
297
+ }
298
+
299
+ .memory-board.hard {
300
+ grid-template-columns: repeat(4, 1fr);
301
+ grid-template-rows: repeat(8, 1fr);
302
+ }
303
+ }
304
+
305
+ @media (max-width: 480px) {
306
+ .memory-card {
307
+ width: 45px;
308
+ height: 45px;
309
+ min-width: 40px;
310
+ min-height: 40px;
311
+ }
312
+
313
+ .card-front,
314
+ .card-back {
315
+ font-size: 16px;
316
+ }
317
+
318
+ .memory-board {
319
+ gap: 5px;
320
+ padding: 5px;
321
+ }
322
+
323
+ /* На очень маленьких экранах еще меньше */
324
+ .memory-card {
325
+ width: 40px;
326
+ height: 40px;
327
+ }
328
+
329
+ .card-front,
330
+ .card-back {
331
+ font-size: 14px;
332
+ }
333
+
334
+ .difficulty-selector {
335
+ flex-wrap: wrap;
336
+ gap: 8px;
337
+ }
338
+
339
+ .difficulty-btn {
340
+ padding: 4px 8px;
341
+ font-size: 9px;
342
+ }
343
+ }