File size: 13,451 Bytes
5dd5427
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
805c9da
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5f1c69
5dd5427
f5f1c69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5dd5427
 
f5f1c69
 
 
5dd5427
 
 
f5f1c69
 
 
 
 
 
5dd5427
 
 
 
 
 
 
 
 
f7ab310
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d339d89
f7ab310
d339d89
 
f7ab310
 
 
d339d89
f7ab310
d339d89
f7ab310
 
 
 
 
 
d339d89
 
 
f7ab310
 
 
d339d89
f7ab310
4e2df23
 
 
 
 
805c9da
4e2df23
805c9da
 
 
4e2df23
 
 
 
 
 
 
 
5dd5427
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5f1c69
5dd5427
 
f5f1c69
 
5dd5427
 
 
 
 
 
 
 
f5f1c69
5dd5427
f5f1c69
 
5dd5427
 
 
f5f1c69
5dd5427
f5f1c69
 
5dd5427
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5f1c69
5dd5427
 
b451c6e
5dd5427
 
 
805c9da
 
f5f1c69
5dd5427
 
 
 
 
 
 
b451c6e
5dd5427
 
 
 
 
b451c6e
5dd5427
 
 
 
b451c6e
5dd5427
 
 
 
 
0aa8e05
 
 
5dd5427
 
 
f5f1c69
805c9da
 
 
5dd5427
 
 
f5f1c69
5dd5427
805c9da
5dd5427
 
 
805c9da
 
5dd5427
 
 
 
 
 
 
 
805c9da
 
5dd5427
 
 
 
 
805c9da
 
5dd5427
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5f1c69
 
 
5dd5427
 
 
 
 
 
 
 
 
 
805c9da
5dd5427
 
 
 
 
 
 
 
805c9da
5dd5427
 
 
 
 
 
 
805c9da
5dd5427
 
 
 
 
 
 
 
805c9da
5dd5427
805c9da
 
 
 
 
5dd5427
 
 
805c9da
5dd5427
 
 
 
805c9da
5dd5427
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b451c6e
 
 
 
 
 
 
 
 
 
 
 
805c9da
 
b451c6e
 
805c9da
b451c6e
805c9da
b451c6e
 
 
 
 
805c9da
 
b451c6e
 
b48eb70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5dd5427
 
 
 
 
 
 
 
 
 
 
 
 
 
b48eb70
 
 
 
 
 
 
 
5dd5427
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Chat functionality styles */
.typing-dots span {
  animation: typing 1.5s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.5s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 1s;
}

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

.chat-button {
  transition: all 0.2s ease;
  border-radius: 4px;
  padding: 2px 4px;
}

.chat-button:hover {
  background-color: rgba(59, 130, 246, 0.1);
  transform: scale(1.1);
}

/* Chat modal styling to match game font */
#chat-modal {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

#chat-modal .bg-white {
  background-color: var(--aged-paper-light);
  border: 2px solid rgba(0, 0, 0, 0.1);
}

#chat-modal h3 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color: var(--typewriter-ink);
  font-weight: 600;
}

#chat-messages {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color: var(--typewriter-ink);
  line-height: 1.6;
}

#chat-messages .text-gray-500 {
  color: #666 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.suggestion-btn, .question-btn {
  transition: all 0.2s ease;
  padding: 14px 18px;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  line-height: 1.4;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.suggestion-btn:hover, .question-btn:hover:not(:disabled) {
  background: #e9ecef;
  border-color: #6c757d;
  transform: translateY(-1px);
}

.suggestion-btn:disabled, .question-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8f9fa;
}

/* Answer revelation styles */
.revealed-answer {
  background-color: #fef3c7 !important;
  font-weight: bold !important;
  color: #92400e !important;
  border: 2px solid #f59e0b !important;
}

/* Correct and incorrect answer styles */

/* Welcome overlay styles */
.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.welcome-modal {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-height: 80vh;
  overflow-y: auto;
}

.welcome-title {
  margin: 0 0 16px 0;
  color: #1f2937;
  font-size: 22px;
  font-weight: 600;
}

.welcome-content {
  text-align: left;
  color: #4b5563;
  line-height: 1.4;
  margin-bottom: 20px;
  font-size: 14px;
}

.welcome-content p {
  margin: 0 0 12px 0;
}

.welcome-overlay .typewriter-button {
  background: #1f2937;
  color: white;
  border: 2px solid #374151;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
  min-width: 100px;
  min-height: 36px;
  transition: all 0.2s ease;
}

.welcome-overlay .typewriter-button:hover {
  background: #374151;
  border-color: #4b5563;
  transform: translateY(-1px);
}
.cloze-input.correct {
  background-color: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #15803d !important;
  font-weight: bold !important;
}

.cloze-input.incorrect {
  background-color: #fef2f2 !important;
  border-color: #dc2626 !important;
  color: #dc2626 !important;
  font-weight: bold !important;
}

.cloze-input:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

/* Custom typewriter color scheme */
:root {
  --aged-paper: #faf7f0;
  --aged-paper-dark: #f5f1e8;
  --aged-paper-light: #fefcf7;
  --typewriter-ink: #2c2c2c;
  --typewriter-ribbon: #8b5cf6;
  --paper-shadow: rgba(0, 0, 0, 0.08);
}

@layer base {
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--aged-paper);
    color: var(--typewriter-ink);
    line-height: 1.6;
    font-size: 16px;
    background-image: 
      radial-gradient(circle at 25% 25%, rgba(139, 92, 246, 0.02) 0%, transparent 50%),
      radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.02) 0%, transparent 50%);
  }
}

@layer components {
  .typewriter-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--typewriter-ink);
    font-weight: 600;
    line-height: 1.7;
  }

  .typewriter-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
  }

  .paper-sheet {
    background-color: var(--aged-paper-light);
    border: 1px solid rgba(139, 92, 246, 0.1);
    box-shadow: 
      0 2px 8px var(--paper-shadow),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
  }

  .paper-sheet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 23px,
      rgba(139, 92, 246, 0.03) 23px,
      rgba(139, 92, 246, 0.03) 24px
    );
    pointer-events: none;
    z-index: 1;
  }

  .paper-content {
    position: relative;
    z-index: 2;
  }

  .cloze-input {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: transparent;
    border: none;
    border-bottom: 2px dotted black;
    color: var(--typewriter-ink);
    text-align: center;
    outline: none;
    padding: 3px 4px;
    margin: 0 1px;
    min-width: 4ch;
    width: auto;
    font-size: inherit;
    line-height: inherit;
    transition: all 0.2s ease;
  }
  
  .cloze-input:focus {
    border-bottom: 2px dotted black;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
    background-color: rgba(0, 0, 0, 0.05);
  }
  
  .cloze-input.correct {
    border-bottom: 2px dotted #10b981;
    background-color: rgba(16, 185, 129, 0.1);
  }
  
  .cloze-input.incorrect {
    border-bottom: 2px dotted #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
  }

  .cloze-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
    font-style: normal;
    font-family: monospace;
    letter-spacing: 0.1em;
  }

  .typewriter-button {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    min-width: 100px;
    min-height: 36px;
    padding: 8px 14px;
    background-color: var(--aged-paper-dark);
    color: var(--typewriter-ink);
    border: 2px solid black;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 
      0 3px 0 rgba(0, 0, 0, 0.3),
      0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
  }

  .typewriter-button:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
    box-shadow: 
      0 4px 0 rgba(0, 0, 0, 0.3),
      0 6px 12px rgba(0, 0, 0, 0.15);
  }

  .typewriter-button:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 
      0 1px 0 rgba(0, 0, 0, 0.3),
      0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .typewriter-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: translateY(2px);
    box-shadow: 
      0 2px 0 rgba(0, 0, 0, 0.2),
      0 3px 6px rgba(0, 0, 0, 0.05);
  }

  .typewriter-button:focus {
    outline: none;
    box-shadow: 
      0 4px 0 rgba(0, 0, 0, 0.3),
      0 6px 12px rgba(0, 0, 0, 0.1),
      0 0 0 3px rgba(0, 0, 0, 0.2);
  }

  .prose {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--typewriter-ink);
    overflow-wrap: break-word;
  }
  
  .prose p {
    margin-bottom: 1.5rem;
    text-align: justify;
  }

  .biblio-info {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
  }

  .context-box {
    background-color: rgba(245, 158, 11, 0.08);
    border-left: 4px solid #f59e0b;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .hints-box {
    background-color: rgba(245, 158, 11, 0.08);
    border-left: 4px solid #f59e0b;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .round-badge {
    background-color: rgba(245, 158, 11, 0.1);
    color: #666;
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
  }

  /* Ensure specific game info elements use accessible font */
  #book-info, #round-info, #contextualization {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  }

  .loading-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #666;
  }

  .result-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
  }

  /* Responsive adjustments */
  @media (max-width: 640px) {
    .prose {
      font-size: 1rem;
    }
    
    .typewriter-text {
      font-size: 1.75rem;
    }
    
    .typewriter-subtitle {
      font-size: 0.85rem;
    }
    
    .typewriter-button {
      min-width: 100px;
      min-height: 38px;
      font-size: 0.9rem;
    }
  }

  @media (max-width: 480px) {
    .prose {
      font-size: 0.95rem;
    }
    
    .typewriter-text {
      font-size: 1.5rem;
    }
    
    .cloze-input {
      min-width: 2.5ch;
    }
  }

  /* Compact question buttons for chat interface */
  #chat-modal .question-btn {
    padding: 6px 8px;
    min-height: auto;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 400;
    transition: all 0.15s ease;
  }

  /* Mobile dropdown styling */
  #question-dropdown {
    background: var(--aged-paper-dark);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--typewriter-ink);
    transition: all 0.2s ease;
  }

  #question-dropdown:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
  }

  /* Sticky Control Panel */
  .sticky-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--aged-paper-light);
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    z-index: 1000;
    backdrop-filter: blur(8px);
  }

  .sticky-controls .controls-inner {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    gap: 1px;
    justify-content: center;
    align-items: center;
  }

  .sticky-controls .typewriter-button {
    flex: 1;
    max-width: 200px;
    min-height: 44px;
    margin: 0;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    position: relative;
  }

  .sticky-controls .typewriter-button:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
  }

  .sticky-controls .typewriter-button:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
  }

  .sticky-controls .typewriter-button:not(:last-child) {
    border-right: 1px solid rgba(0, 0, 0, 0.2);
  }

  .controls-divider {
    height: 24px;
    width: 2px;
    background: rgba(0, 0, 0, 0.3);
    margin: 0 -1px;
    z-index: 1;
  }

  /* Add bottom padding to main content to prevent overlap */
  #game-container {
    padding-bottom: 100px;
  }

  /* Mobile optimizations for sticky controls */
  @media (max-width: 640px) {
    .sticky-controls {
      padding: 10px 12px;
    }
    
    .sticky-controls .typewriter-button {
      min-height: 48px;
      font-size: 16px;
      padding: 12px 8px;
    }
    
    #game-container {
      padding-bottom: 90px;
    }
  }

  /* Ensure controls stay above mobile keyboards */
  @media (max-width: 640px) and (max-height: 500px) {
    .sticky-controls {
      position: fixed;
      bottom: 0;
    }
  }

  /* Print styles */
  @media print {
    body {
      background: white;
      color: black;
    }
    
    .paper-sheet::before {
      display: none;
    }
    
    .typewriter-button {
      display: none;
    }
    
    .sticky-controls {
      display: none;
    }
    
    #game-container {
      padding-bottom: 0;
    }
  }
}

/* Custom utility classes */
@layer utilities {
  .ink-ribbon-lines {
    background: repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 23px,
      rgba(139, 92, 246, 0.03) 23px,
      rgba(139, 92, 246, 0.03) 24px
    );
  }
}