Lashtw commited on
Commit
ace23a8
·
1 Parent(s): 1dbab8e

style(lottery): align draw stage to game warm light background and enlarge fonts

Browse files
Files changed (4) hide show
  1. css/lottery.css +189 -107
  2. js/lottery-draw.js +21 -21
  3. js/lottery.js +9 -9
  4. lottery-draw.html +17 -17
css/lottery.css CHANGED
@@ -37,34 +37,80 @@
37
  }
38
 
39
  @keyframes lotteryFloat {
40
- 0%, 100% { transform: translateY(0px); }
41
- 50% { transform: translateY(-7px); }
 
 
 
 
 
 
 
42
  }
43
 
44
  @keyframes lotteryLanternSway {
45
- 0%, 100% { transform: rotate(-4deg); }
46
- 50% { transform: rotate(4deg); }
 
 
 
 
 
 
 
47
  }
48
 
49
  @keyframes lotteryEmblemFloat {
50
- 0%, 100% { transform: translateY(0px) rotate(-1deg); }
51
- 50% { transform: translateY(-4px) rotate(1.5deg); }
 
 
 
 
 
 
 
52
  }
53
 
54
  @keyframes lotteryBallFloat {
55
- 0%, 100% { transform: translateY(0px) scale(1); }
56
- 50% { transform: translateY(-4px) scale(1.03); }
 
 
 
 
 
 
 
57
  }
58
 
59
  @keyframes lotterySlideOut {
60
- 0% { transform: translateX(-36px) scale(0.75); opacity: 0; }
61
- 65% { transform: translateX(4px) scale(1.06); opacity: 1; }
62
- 100% { transform: translateX(0) scale(1); opacity: 1; }
 
 
 
 
 
 
 
 
 
 
 
63
  }
64
 
65
  @keyframes lotteryConfettiFall {
66
- 0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
67
- 100% { transform: translateY(260px) rotate(540deg); opacity: 0; }
 
 
 
 
 
 
 
68
  }
69
 
70
  /* ----------------------------------------------------------------------------
@@ -177,7 +223,7 @@
177
  }
178
 
179
  .lottery-title-main {
180
- font-size: 1.2rem;
181
  font-weight: 900;
182
  color: #fde68a;
183
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
@@ -190,10 +236,10 @@
190
  .lottery-pill-tag {
191
  display: inline-flex;
192
  align-items: center;
193
- gap: 4px;
194
- padding: 4px 10px;
195
  border-radius: 999px;
196
- font-size: 0.78rem;
197
  font-weight: 800;
198
  background: rgba(245, 158, 11, 0.22);
199
  color: #fde68a;
@@ -235,15 +281,15 @@
235
  }
236
 
237
  .lottery-dome-legend {
238
- margin-top: 6px;
239
- padding: 6px 12px;
240
  border-radius: 10px;
241
  background: rgba(127, 29, 29, 0.55);
242
  border: 1px solid rgba(245, 196, 81, 0.34);
243
- font-size: 0.78rem;
244
  color: #fde68a;
245
  text-align: center;
246
- line-height: 1.45;
247
  width: 100%;
248
  }
249
 
@@ -258,23 +304,23 @@
258
  background: linear-gradient(160deg, rgba(110, 20, 20, 0.78), rgba(62, 10, 10, 0.9));
259
  border: 1px solid rgba(245, 196, 81, 0.36);
260
  border-radius: 12px;
261
- padding: 8px 6px;
262
  text-align: center;
263
  box-shadow: inset 0 1px 0 rgba(254, 240, 138, 0.12);
264
  }
265
 
266
  .lottery-stat-label {
267
- font-size: 0.72rem;
268
  color: #f3d6a2;
269
  display: block;
270
  }
271
 
272
  .lottery-stat-val {
273
- font-size: 1.05rem;
274
  font-weight: 900;
275
  color: #fffbeb;
276
  display: block;
277
- margin-top: 2px;
278
  }
279
 
280
  /* 三階集氣進度條 */
@@ -282,18 +328,18 @@
282
  background: linear-gradient(155deg, rgba(84, 15, 15, 0.85), rgba(50, 8, 8, 0.92));
283
  border: 1.5px solid rgba(245, 196, 81, 0.42);
284
  border-radius: 14px;
285
- padding: 10px 12px;
286
  margin-top: 12px;
287
  }
288
 
289
  .lottery-milestone-track {
290
  position: relative;
291
- height: 12px;
292
  border-radius: 999px;
293
  background: rgba(0, 0, 0, 0.45);
294
  border: 1px solid rgba(245, 196, 81, 0.28);
295
  overflow: hidden;
296
- margin: 8px 0 6px;
297
  }
298
 
299
  .lottery-milestone-fill {
@@ -307,18 +353,18 @@
307
  .lottery-milestone-flags {
308
  display: grid;
309
  grid-template-columns: repeat(3, minmax(0, 1fr));
310
- gap: 6px;
311
- font-size: 0.76rem;
312
  }
313
 
314
  .lottery-m-flag {
315
- padding: 6px 8px;
316
  border-radius: 9px;
317
  background: rgba(40, 6, 6, 0.65);
318
  border: 1px solid rgba(245, 196, 81, 0.25);
319
  color: #f3d6a2;
320
  text-align: center;
321
- line-height: 1.35;
322
  }
323
 
324
  .lottery-m-flag.reached {
@@ -332,11 +378,11 @@
332
  /* 互動按鈕:觸控高度 >= 48px */
333
  .lottery-primary-btn {
334
  width: 100%;
335
- min-height: 48px;
336
  border: 1.5px solid #fef08a;
337
  border-radius: 14px;
338
- padding: 12px 16px;
339
- font-size: 1rem;
340
  font-weight: 900;
341
  color: #450a0a;
342
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 55%, #d97706 100%);
@@ -360,14 +406,14 @@
360
  background: linear-gradient(160deg, rgba(102, 18, 18, 0.78), rgba(58, 9, 9, 0.92));
361
  border: 1.5px solid rgba(245, 196, 81, 0.45);
362
  border-radius: 16px;
363
- padding: 14px;
364
  }
365
 
366
  .lottery-q-stem {
367
- font-size: 1.05rem;
368
  font-weight: 700;
369
- line-height: 1.55;
370
- margin: 10px 0 14px;
371
  color: #fffbeb;
372
  }
373
 
@@ -392,7 +438,7 @@
392
  border: 1.5px solid rgba(217, 119, 6, 0.65);
393
  background: #fffbeb;
394
  color: #3b0a0a;
395
- font-size: 0.96rem;
396
  font-weight: 700;
397
  text-align: left;
398
  cursor: pointer;
@@ -422,67 +468,77 @@
422
  }
423
 
424
  /* ----------------------------------------------------------------------------
425
- * 教師大螢幕開獎台頁面(lottery-draw.html):同步朱紅御漆 × 古銅鎏金 × 燈籠暖光
426
  * ---------------------------------------------------------------------------- */
427
- .lottery-draw-body {
428
  min-height: 100vh;
429
  margin: 0;
430
- padding: 16px;
431
  background:
432
- radial-gradient(ellipse at 18% 0%, rgba(245, 158, 11, 0.24), transparent 48%),
433
- radial-gradient(ellipse at 82% 8%, rgba(220, 38, 38, 0.28), transparent 52%),
434
- linear-gradient(160deg, #270505 0%, #450a0a 52%, #1b0303 100%);
435
- color: #fef3c7;
436
  font-family: "Inter", "Noto Sans TC", sans-serif;
 
 
 
 
 
 
 
 
 
 
437
  }
438
 
439
  .draw-topbar {
440
- max-width: 1220px;
441
- margin: 0 auto 14px;
442
- padding: 12px 16px;
443
- border-radius: 16px;
444
- background: linear-gradient(135deg, rgba(96, 17, 17, 0.92), rgba(55, 8, 8, 0.95));
445
- border: 1.5px solid rgba(245, 196, 81, 0.5);
446
- box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
447
  display: flex;
448
  flex-wrap: wrap;
449
  align-items: center;
450
  justify-content: space-between;
451
- gap: 10px;
452
  }
453
 
454
  .draw-topbar-emblem {
455
- width: 48px;
456
- height: 36px;
457
  object-fit: contain;
458
- filter: drop-shadow(0 2px 6px rgba(245, 196, 81, 0.65));
459
  }
460
 
461
  .draw-auth-card {
462
- max-width: 420px;
463
  margin: 60px auto;
464
- padding: 24px;
465
- border-radius: 18px;
466
- background: linear-gradient(160deg, rgba(96, 17, 17, 0.94), rgba(55, 8, 8, 0.96));
467
- border: 1.5px solid rgba(245, 196, 81, 0.55);
468
- box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
469
  }
470
 
471
  .draw-layout {
472
- max-width: 1220px;
473
  margin: 0 auto;
474
  display: grid;
475
  grid-template-columns: 1.12fr 0.88fr;
476
- gap: 16px;
477
  align-items: start;
478
  }
479
 
480
  .draw-panel {
481
- background: linear-gradient(165deg, rgba(84, 15, 15, 0.88), rgba(45, 7, 7, 0.94));
482
- border: 1.5px solid rgba(245, 196, 81, 0.45);
483
- border-radius: 20px;
484
- padding: 16px;
485
- box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), inset 0 0 24px rgba(245, 158, 11, 0.08);
486
  position: relative;
487
  overflow: hidden;
488
  }
@@ -493,7 +549,9 @@
493
  flex-direction: column;
494
  align-items: center;
495
  justify-content: center;
496
- padding: 4px 0;
 
 
497
  }
498
 
499
  .draw-canvas-wrap canvas {
@@ -503,51 +561,54 @@
503
  }
504
 
505
  .draw-chute-reveal {
506
- margin-top: 10px;
507
- min-height: 76px;
508
- border-radius: 14px;
509
- border: 1.5px solid rgba(245, 196, 81, 0.52);
510
- background: linear-gradient(90deg, rgba(120, 53, 15, 0.35), rgba(69, 10, 10, 0.85));
511
- padding: 10px 14px;
512
  display: flex;
513
  align-items: center;
514
  justify-content: center;
515
  gap: 14px;
516
  flex-wrap: wrap;
 
517
  }
518
 
519
  .draw-rolling-ball {
520
- width: 52px;
521
- height: 52px;
522
  border-radius: 999px;
523
  display: inline-flex;
524
  align-items: center;
525
  justify-content: center;
526
  font-weight: 900;
527
- font-size: 1.15rem;
528
  background: radial-gradient(circle at 32% 30%, #fef9c3, #f59e0b 65%, #92400e);
529
  color: #451a03;
530
- border: 2px solid #fef08a;
531
- box-shadow: 0 0 18px rgba(245, 158, 11, 0.85);
532
  animation: lotterySlideOut 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
533
  }
534
 
535
  .draw-btn {
536
- min-height: 44px;
537
- padding: 8px 14px;
538
  border-radius: 12px;
539
- border: 1.5px solid rgba(245, 196, 81, 0.45);
540
- background: linear-gradient(160deg, rgba(127, 29, 29, 0.88), rgba(69, 10, 10, 0.92));
541
- color: #fef3c7;
 
542
  font-weight: 800;
543
  cursor: pointer;
544
- transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
545
  }
546
 
547
  .draw-btn:hover:not(:disabled) {
548
  transform: translateY(-1px);
549
- border-color: #fde68a;
550
- background: linear-gradient(160deg, rgba(153, 27, 27, 0.95), rgba(90, 14, 14, 0.95));
 
551
  }
552
 
553
  .draw-btn:disabled {
@@ -556,37 +617,46 @@
556
  }
557
 
558
  .draw-btn.gold {
559
- background: linear-gradient(135deg, #fef08a, #f59e0b 60%, #d97706);
560
  color: #450a0a;
561
- border-color: #fef08a;
 
562
  }
563
 
564
  .draw-select {
565
- min-height: 44px;
566
- padding: 6px 12px;
567
  border-radius: 12px;
568
- border: 1.5px solid rgba(245, 196, 81, 0.5);
569
- background: rgba(69, 10, 10, 0.94);
570
- color: #fef3c7;
 
571
  font-weight: 700;
572
  cursor: pointer;
573
  }
574
 
575
  .draw-tier-card {
576
- padding: 10px 12px;
577
- border-radius: 12px;
578
- background: linear-gradient(145deg, rgba(110, 20, 20, 0.65), rgba(55, 8, 8, 0.85));
579
- border: 1px solid rgba(245, 196, 81, 0.34);
 
580
  }
581
 
582
  .draw-participant-row {
583
  display: flex;
584
  justify-content: space-between;
585
  align-items: center;
586
- padding: 6px 10px;
587
- border-radius: 9px;
588
- background: rgba(127, 29, 29, 0.35);
589
- border: 1px solid rgba(245, 196, 81, 0.18);
 
 
 
 
 
 
590
  }
591
 
592
  .lottery-confetti {
@@ -603,6 +673,14 @@ html[data-theme="dark"] .lottery-modal-card {
603
  color: #fef3c7;
604
  }
605
 
 
 
 
 
 
 
 
 
606
  @media (max-width: 900px) {
607
  .draw-layout {
608
  grid-template-columns: 1fr;
@@ -613,17 +691,21 @@ html[data-theme="dark"] .lottery-modal-card {
613
  .lottery-stats-grid {
614
  grid-template-columns: repeat(2, minmax(0, 1fr));
615
  }
 
616
  .lottery-milestone-flags {
617
  grid-template-columns: 1fr;
618
  }
 
619
  .lottery-options-grid {
620
  grid-template-columns: 1fr;
621
  }
 
622
  .lottery-hero-emblem {
623
  width: 54px;
624
  height: 42px;
625
  }
 
626
  .lottery-lantern {
627
  display: none;
628
  }
629
- }
 
37
  }
38
 
39
  @keyframes lotteryFloat {
40
+
41
+ 0%,
42
+ 100% {
43
+ transform: translateY(0px);
44
+ }
45
+
46
+ 50% {
47
+ transform: translateY(-7px);
48
+ }
49
  }
50
 
51
  @keyframes lotteryLanternSway {
52
+
53
+ 0%,
54
+ 100% {
55
+ transform: rotate(-4deg);
56
+ }
57
+
58
+ 50% {
59
+ transform: rotate(4deg);
60
+ }
61
  }
62
 
63
  @keyframes lotteryEmblemFloat {
64
+
65
+ 0%,
66
+ 100% {
67
+ transform: translateY(0px) rotate(-1deg);
68
+ }
69
+
70
+ 50% {
71
+ transform: translateY(-4px) rotate(1.5deg);
72
+ }
73
  }
74
 
75
  @keyframes lotteryBallFloat {
76
+
77
+ 0%,
78
+ 100% {
79
+ transform: translateY(0px) scale(1);
80
+ }
81
+
82
+ 50% {
83
+ transform: translateY(-4px) scale(1.03);
84
+ }
85
  }
86
 
87
  @keyframes lotterySlideOut {
88
+ 0% {
89
+ transform: translateX(-36px) scale(0.75);
90
+ opacity: 0;
91
+ }
92
+
93
+ 65% {
94
+ transform: translateX(4px) scale(1.06);
95
+ opacity: 1;
96
+ }
97
+
98
+ 100% {
99
+ transform: translateX(0) scale(1);
100
+ opacity: 1;
101
+ }
102
  }
103
 
104
  @keyframes lotteryConfettiFall {
105
+ 0% {
106
+ transform: translateY(-20px) rotate(0deg);
107
+ opacity: 1;
108
+ }
109
+
110
+ 100% {
111
+ transform: translateY(260px) rotate(540deg);
112
+ opacity: 0;
113
+ }
114
  }
115
 
116
  /* ----------------------------------------------------------------------------
 
223
  }
224
 
225
  .lottery-title-main {
226
+ font-size: 1.32rem;
227
  font-weight: 900;
228
  color: #fde68a;
229
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
 
236
  .lottery-pill-tag {
237
  display: inline-flex;
238
  align-items: center;
239
+ gap: 5px;
240
+ padding: 5px 12px;
241
  border-radius: 999px;
242
+ font-size: 0.88rem;
243
  font-weight: 800;
244
  background: rgba(245, 158, 11, 0.22);
245
  color: #fde68a;
 
281
  }
282
 
283
  .lottery-dome-legend {
284
+ margin-top: 8px;
285
+ padding: 8px 12px;
286
  border-radius: 10px;
287
  background: rgba(127, 29, 29, 0.55);
288
  border: 1px solid rgba(245, 196, 81, 0.34);
289
+ font-size: 0.9rem;
290
  color: #fde68a;
291
  text-align: center;
292
+ line-height: 1.5;
293
  width: 100%;
294
  }
295
 
 
304
  background: linear-gradient(160deg, rgba(110, 20, 20, 0.78), rgba(62, 10, 10, 0.9));
305
  border: 1px solid rgba(245, 196, 81, 0.36);
306
  border-radius: 12px;
307
+ padding: 10px 6px;
308
  text-align: center;
309
  box-shadow: inset 0 1px 0 rgba(254, 240, 138, 0.12);
310
  }
311
 
312
  .lottery-stat-label {
313
+ font-size: 0.84rem;
314
  color: #f3d6a2;
315
  display: block;
316
  }
317
 
318
  .lottery-stat-val {
319
+ font-size: 1.2rem;
320
  font-weight: 900;
321
  color: #fffbeb;
322
  display: block;
323
+ margin-top: 3px;
324
  }
325
 
326
  /* 三階集氣進度條 */
 
328
  background: linear-gradient(155deg, rgba(84, 15, 15, 0.85), rgba(50, 8, 8, 0.92));
329
  border: 1.5px solid rgba(245, 196, 81, 0.42);
330
  border-radius: 14px;
331
+ padding: 12px 14px;
332
  margin-top: 12px;
333
  }
334
 
335
  .lottery-milestone-track {
336
  position: relative;
337
+ height: 14px;
338
  border-radius: 999px;
339
  background: rgba(0, 0, 0, 0.45);
340
  border: 1px solid rgba(245, 196, 81, 0.28);
341
  overflow: hidden;
342
+ margin: 8px 0 8px;
343
  }
344
 
345
  .lottery-milestone-fill {
 
353
  .lottery-milestone-flags {
354
  display: grid;
355
  grid-template-columns: repeat(3, minmax(0, 1fr));
356
+ gap: 8px;
357
+ font-size: 0.88rem;
358
  }
359
 
360
  .lottery-m-flag {
361
+ padding: 8px 10px;
362
  border-radius: 9px;
363
  background: rgba(40, 6, 6, 0.65);
364
  border: 1px solid rgba(245, 196, 81, 0.25);
365
  color: #f3d6a2;
366
  text-align: center;
367
+ line-height: 1.4;
368
  }
369
 
370
  .lottery-m-flag.reached {
 
378
  /* 互動按鈕:觸控高度 >= 48px */
379
  .lottery-primary-btn {
380
  width: 100%;
381
+ min-height: 52px;
382
  border: 1.5px solid #fef08a;
383
  border-radius: 14px;
384
+ padding: 13px 18px;
385
+ font-size: 1.12rem;
386
  font-weight: 900;
387
  color: #450a0a;
388
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 55%, #d97706 100%);
 
406
  background: linear-gradient(160deg, rgba(102, 18, 18, 0.78), rgba(58, 9, 9, 0.92));
407
  border: 1.5px solid rgba(245, 196, 81, 0.45);
408
  border-radius: 16px;
409
+ padding: 16px;
410
  }
411
 
412
  .lottery-q-stem {
413
+ font-size: 1.16rem;
414
  font-weight: 700;
415
+ line-height: 1.6;
416
+ margin: 12px 0 16px;
417
  color: #fffbeb;
418
  }
419
 
 
438
  border: 1.5px solid rgba(217, 119, 6, 0.65);
439
  background: #fffbeb;
440
  color: #3b0a0a;
441
+ font-size: 1.05rem;
442
  font-weight: 700;
443
  text-align: left;
444
  cursor: pointer;
 
468
  }
469
 
470
  /* ----------------------------------------------------------------------------
471
+ * 教師大螢幕開獎台頁面(lottery-draw.html):對齊遊戲亮色暖杏底 (#f9e9da) × 白金卡片 × 高對比放大字體
472
  * ---------------------------------------------------------------------------- */
473
+ body.lottery-draw-body {
474
  min-height: 100vh;
475
  margin: 0;
476
+ padding: 18px 20px;
477
  background:
478
+ radial-gradient(1200px 600px at 10% -10%, rgba(239, 90, 86, 0.10), transparent 60%),
479
+ radial-gradient(900px 500px at 110% 10%, rgba(244, 212, 116, 0.22), transparent 60%),
480
+ var(--bg-0, #f9e9da);
481
+ color: var(--text, #2c201b);
482
  font-family: "Inter", "Noto Sans TC", sans-serif;
483
+ font-size: 17px;
484
+ line-height: 1.6;
485
+ }
486
+
487
+ .lottery-draw-body .lottery-pill-tag {
488
+ background: #fef3c7;
489
+ color: #78350f;
490
+ border: 1.5px solid #d97706;
491
+ font-size: 0.94rem;
492
+ padding: 5px 12px;
493
  }
494
 
495
  .draw-topbar {
496
+ max-width: 1260px;
497
+ margin: 0 auto 16px;
498
+ padding: 14px 18px;
499
+ border-radius: 18px;
500
+ background: linear-gradient(135deg, #ffffff, #fcf4eb);
501
+ border: 2px solid rgba(180, 110, 80, 0.28);
502
+ box-shadow: 0 10px 26px rgba(120, 70, 50, 0.1);
503
  display: flex;
504
  flex-wrap: wrap;
505
  align-items: center;
506
  justify-content: space-between;
507
+ gap: 12px;
508
  }
509
 
510
  .draw-topbar-emblem {
511
+ width: 56px;
512
+ height: 42px;
513
  object-fit: contain;
514
+ filter: drop-shadow(0 3px 8px rgba(180, 83, 9, 0.35));
515
  }
516
 
517
  .draw-auth-card {
518
+ max-width: 440px;
519
  margin: 60px auto;
520
+ padding: 28px;
521
+ border-radius: 20px;
522
+ background: #ffffff;
523
+ border: 2px solid rgba(180, 110, 80, 0.32);
524
+ box-shadow: 0 18px 40px rgba(120, 70, 50, 0.14);
525
  }
526
 
527
  .draw-layout {
528
+ max-width: 1260px;
529
  margin: 0 auto;
530
  display: grid;
531
  grid-template-columns: 1.12fr 0.88fr;
532
+ gap: 18px;
533
  align-items: start;
534
  }
535
 
536
  .draw-panel {
537
+ background: linear-gradient(170deg, #ffffff 0%, #fcf4eb 100%);
538
+ border: 2px solid rgba(180, 110, 80, 0.28);
539
+ border-radius: 22px;
540
+ padding: 20px;
541
+ box-shadow: 0 12px 32px rgba(120, 70, 50, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
542
  position: relative;
543
  overflow: hidden;
544
  }
 
549
  flex-direction: column;
550
  align-items: center;
551
  justify-content: center;
552
+ padding: 6px 0;
553
+ border-radius: 18px;
554
+ background: radial-gradient(circle at 50% 48%, rgba(245, 196, 81, 0.18), rgba(249, 233, 218, 0.45) 75%);
555
  }
556
 
557
  .draw-canvas-wrap canvas {
 
561
  }
562
 
563
  .draw-chute-reveal {
564
+ margin-top: 12px;
565
+ min-height: 86px;
566
+ border-radius: 16px;
567
+ border: 2px solid #d97706;
568
+ background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
569
+ padding: 14px 18px;
570
  display: flex;
571
  align-items: center;
572
  justify-content: center;
573
  gap: 14px;
574
  flex-wrap: wrap;
575
+ box-shadow: inset 0 2px 8px rgba(217, 119, 6, 0.12);
576
  }
577
 
578
  .draw-rolling-ball {
579
+ width: 60px;
580
+ height: 60px;
581
  border-radius: 999px;
582
  display: inline-flex;
583
  align-items: center;
584
  justify-content: center;
585
  font-weight: 900;
586
+ font-size: 1.35rem;
587
  background: radial-gradient(circle at 32% 30%, #fef9c3, #f59e0b 65%, #92400e);
588
  color: #451a03;
589
+ border: 2.5px solid #b45309;
590
+ box-shadow: 0 4px 16px rgba(217, 119, 6, 0.45);
591
  animation: lotterySlideOut 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
592
  }
593
 
594
  .draw-btn {
595
+ min-height: 48px;
596
+ padding: 10px 16px;
597
  border-radius: 12px;
598
+ border: 1.5px solid rgba(180, 110, 80, 0.38);
599
+ background: #fcf4eb;
600
+ color: #2c201b;
601
+ font-size: 1.04rem;
602
  font-weight: 800;
603
  cursor: pointer;
604
+ transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
605
  }
606
 
607
  .draw-btn:hover:not(:disabled) {
608
  transform: translateY(-1px);
609
+ border-color: #b91c1c;
610
+ background: #fffbeb;
611
+ box-shadow: 0 6px 14px rgba(120, 70, 50, 0.14);
612
  }
613
 
614
  .draw-btn:disabled {
 
617
  }
618
 
619
  .draw-btn.gold {
620
+ background: linear-gradient(135deg, #fde68a 0%, #f59e0b 60%, #d97706 100%);
621
  color: #450a0a;
622
+ border-color: #b45309;
623
+ box-shadow: 0 6px 16px rgba(217, 119, 6, 0.25);
624
  }
625
 
626
  .draw-select {
627
+ min-height: 46px;
628
+ padding: 8px 14px;
629
  border-radius: 12px;
630
+ border: 1.5px solid rgba(180, 110, 80, 0.4);
631
+ background: #ffffff;
632
+ color: #2c201b;
633
+ font-size: 1rem;
634
  font-weight: 700;
635
  cursor: pointer;
636
  }
637
 
638
  .draw-tier-card {
639
+ padding: 12px 14px;
640
+ border-radius: 14px;
641
+ background: #ffffff;
642
+ border: 1.5px solid rgba(180, 110, 80, 0.25);
643
+ box-shadow: 0 4px 12px rgba(120, 70, 50, 0.05);
644
  }
645
 
646
  .draw-participant-row {
647
  display: flex;
648
  justify-content: space-between;
649
  align-items: center;
650
+ padding: 9px 12px;
651
+ border-radius: 10px;
652
+ background: #ffffff;
653
+ border: 1px solid rgba(180, 110, 80, 0.2);
654
+ font-size: 1.02rem;
655
+ }
656
+
657
+ .lottery-draw-body .lottery-primary-btn {
658
+ min-height: 54px;
659
+ font-size: 1.18rem;
660
  }
661
 
662
  .lottery-confetti {
 
673
  color: #fef3c7;
674
  }
675
 
676
+ html[data-theme="dark"] body.lottery-draw-body {
677
+ background:
678
+ radial-gradient(ellipse at 18% 0%, rgba(245, 158, 11, 0.24), transparent 48%),
679
+ radial-gradient(ellipse at 82% 8%, rgba(220, 38, 38, 0.28), transparent 52%),
680
+ linear-gradient(160deg, #270505 0%, #450a0a 52%, #1b0303 100%);
681
+ color: #fef3c7;
682
+ }
683
+
684
  @media (max-width: 900px) {
685
  .draw-layout {
686
  grid-template-columns: 1fr;
 
691
  .lottery-stats-grid {
692
  grid-template-columns: repeat(2, minmax(0, 1fr));
693
  }
694
+
695
  .lottery-milestone-flags {
696
  grid-template-columns: 1fr;
697
  }
698
+
699
  .lottery-options-grid {
700
  grid-template-columns: 1fr;
701
  }
702
+
703
  .lottery-hero-emblem {
704
  width: 54px;
705
  height: 42px;
706
  }
707
+
708
  .lottery-lantern {
709
  display: none;
710
  }
711
+ }
js/lottery-draw.js CHANGED
@@ -560,12 +560,12 @@ async function initLotteryDrawPage() {
560
  ];
561
 
562
  $('#drawMilestoneSummary').innerHTML = `
563
- <div style="display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; font-size:0.9rem; margin-bottom:6px;">
564
- <span><b>${esc(cycle.title || cycle.cycleId)}</b>|${cycle.prizeMode === 'pilot' ? '⚡ 縮小快閃獎池' : '🏆 正式完整獎池'}</span>
565
- <span>⚪ ${prog.totalRegular} 銀 + 🌟 ${prog.totalGolden} 金 = <b style="color:#fde68a;">${prog.totalWeight} 總籤權</b>(${entriesList.length} 人投球 / ${partCount} 人達參加獎門檻)</span>
566
  </div>
567
- <div style="display:flex; gap:6px; flex-wrap:wrap;">
568
- ${ms.map((m, i) => `<span class="lottery-pill-tag" style="${prog.reachedLevels.includes(i + 1) ? 'background:rgba(245,196,81,0.34); border-color:#fde68a;' : 'opacity:0.7;'}">${i + 1}階 ${m} 籤:${milestoneLabels[i]} ${prog.reachedLevels.includes(i + 1) ? '✅' : ''}</span>`).join('')}
569
  </div>
570
  `;
571
 
@@ -614,7 +614,7 @@ async function initLotteryDrawPage() {
614
  const tierRows = drawState.prizeTiers.map(t => {
615
  const holders = (drawState.holdersByTier?.[t.tierKey] || []).map(uid => {
616
  const e = cycle.entries?.[uid] || { seat: '?', name: uid };
617
- const extra = extraBonuses[uid] ? ` <span style="color:#38bdf8;">🎲+${extraBonuses[uid]}</span>` : '';
618
  return `<span class="lottery-pill-tag">${esc(e.seat)}號 ${esc(e.name)}${extra}</span>`;
619
  }).join(' ');
620
  const quota = t.quota + (drawState.extraDrawsByTier?.[t.tierKey] || 0);
@@ -622,26 +622,26 @@ async function initLotteryDrawPage() {
622
  const titlesHtml = (t.titles || []).map(tn => formatTitleBadge(tn)).join('');
623
  return `
624
  <div class="draw-tier-card">
625
- <div style="display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:6px; margin-bottom:4px;">
626
- <b>${esc(t.label)}(${(drawState.holdersByTier?.[t.tierKey] || []).length}/${quota} 名)</b>
627
- <span style="color:#fde68a; font-size:0.85rem;">🎖️ ${bpTotal} 兵符 ${t.hours ? `+ ${t.hours}h 糧草` : ''} ${titlesHtml}</span>
628
  </div>
629
- <div>${holders || '<span style="color:#d6b282; font-size:0.82rem;">待抽獎揭曉…</span>'}</div>
630
  </div>
631
  `;
632
  }).join('');
633
  $('#drawPrizeBoard').innerHTML = tierRows;
634
 
635
  $('#drawParticipantsList').innerHTML = entriesList.length === 0
636
- ? '<div style="color:#f3d6a2;">尚無學生投球紀錄</div>'
637
  : entriesList.map(e => {
638
  const pct = prog.totalWeight > 0 ? Math.round((e.weight / prog.totalWeight) * 1000) / 10 : 0;
639
  const won = drawState.uidToTier?.[e.uid];
640
  const wonTag = won ? `<span class="lottery-pill-tag">${esc(won.toUpperCase())}</span>` : '';
641
  return `
642
  <div class="draw-participant-row">
643
- <span><b>${esc(e.seat)}號 ${esc(e.name)}</b> ${wonTag}</span>
644
- <span>⚪${e.regularBalls} 🌟${e.goldenBalls} = <b style="color:#fde68a;">${e.weight} 籤</b> (${pct}%)</span>
645
  </div>
646
  `;
647
  }).join('');
@@ -670,11 +670,11 @@ async function initLotteryDrawPage() {
670
  isAnimating = true;
671
  renderAll();
672
  const chute = $('#lotteryChuteReveal');
673
- chute.innerHTML = `<div style="font-size:1.15rem; font-weight:800; color:#fde68a;">🌀 樂透氣流啟動高速攪拌中…</div>`;
674
 
675
  await machine.playDrawSequence(winner, nearMisses, (nmList) => {
676
  const names = nmList.map(x => `${x.seat}號 ${x.name}`).join(' / ');
677
- chute.innerHTML = `<div style="font-size:1.05rem; color:#93c5fd;">💨 差一點擦過出球口:<b>${esc(names)}</b> …</div>`;
678
  });
679
 
680
  const applied = applyTierDrawWithUpgrade({ state: drawState, tierKey, candidateUid: winner.uid });
@@ -688,13 +688,13 @@ async function initLotteryDrawPage() {
688
  const tierDef = drawState.prizeTiers.find(t => t.tierKey === tierKey);
689
  const ballIcon = winner.goldenBalls > 0 ? '🌟 黃金球祝福' : '⚪ 幸運銀球';
690
  const upgHtml = applied.action === 'upgraded'
691
- ? `<div style="margin-top:6px; color:#fde047; font-weight:900;">👑 逆天升級!原本持有 ${esc(applied.upgradedFromTier)} 升級為 ${esc(tierDef?.label || tierKey)},原名額立刻開放重抽遞補!</div>`
692
  : '';
693
  chute.innerHTML = `
694
- <div class="draw-winner-pop">
695
- <div style="font-size:0.9rem; color:#fde68a;">${esc(tierDef?.label || tierKey)} 中獎彩球滾出!</div>
696
- <div style="font-size:1.9rem; font-weight:900; margin:4px 0;">🎉 ${esc(winner.seat)}號 ${esc(winner.name)}</div>
697
- <div style="font-size:0.88rem; color:#cbd5e1;">${ballIcon}・個人總籤權 ${winner.weight} 籤</div>
698
  ${upgHtml}
699
  </div>
700
  `;
@@ -762,7 +762,7 @@ async function initLotteryDrawPage() {
762
  const next = Math.min(3, (extraBonuses[lastWinnerUid] || 0) + roll);
763
  extraBonuses[lastWinnerUid] = next;
764
  saveTempSession();
765
- $('#lotteryChuteReveal').innerHTML += `<div style="margin-top:6px; color:#38bdf8; font-weight:800;">🎲 奇蹟骰啟動!加碼總額累計 +${next} 兵符(上限 3)</div>`;
766
  renderAll();
767
  });
768
  $('#btnResetLocalDraw')?.addEventListener('click', () => {
 
560
  ];
561
 
562
  $('#drawMilestoneSummary').innerHTML = `
563
+ <div style="display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; font-size:1.05rem; margin-bottom:8px; color:#2c201b;">
564
+ <span><b style="color:#991b1b;">${esc(cycle.title || cycle.cycleId)}</b>|${cycle.prizeMode === 'pilot' ? '⚡ 縮小快閃獎池' : '🏆 正式完整獎池'}</span>
565
+ <span>⚪ ${prog.totalRegular} 銀 + 🌟 ${prog.totalGolden} 金 = <b style="color:#b45309; font-size:1.15rem;">${prog.totalWeight} 總籤權</b>(${entriesList.length} 人投球 / ${partCount} 人達參加獎門檻)</span>
566
  </div>
567
+ <div style="display:flex; gap:8px; flex-wrap:wrap;">
568
+ ${ms.map((m, i) => `<span class="lottery-pill-tag" style="font-size:0.95rem; ${prog.reachedLevels.includes(i + 1) ? 'background:#fef3c7; border-color:#d97706; color:#92400e;' : 'opacity:0.75;'}">${i + 1}階 ${m} 籤:${milestoneLabels[i]} ${prog.reachedLevels.includes(i + 1) ? '✅' : ''}</span>`).join('')}
569
  </div>
570
  `;
571
 
 
614
  const tierRows = drawState.prizeTiers.map(t => {
615
  const holders = (drawState.holdersByTier?.[t.tierKey] || []).map(uid => {
616
  const e = cycle.entries?.[uid] || { seat: '?', name: uid };
617
+ const extra = extraBonuses[uid] ? ` <span style="color:#0284c7; font-weight:900;">🎲+${extraBonuses[uid]}</span>` : '';
618
  return `<span class="lottery-pill-tag">${esc(e.seat)}號 ${esc(e.name)}${extra}</span>`;
619
  }).join(' ');
620
  const quota = t.quota + (drawState.extraDrawsByTier?.[t.tierKey] || 0);
 
622
  const titlesHtml = (t.titles || []).map(tn => formatTitleBadge(tn)).join('');
623
  return `
624
  <div class="draw-tier-card">
625
+ <div style="display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:6px; font-size:1.12rem;">
626
+ <b style="color:#7f1d1d;">${esc(t.label)}(${(drawState.holdersByTier?.[t.tierKey] || []).length}/${quota} 名)</b>
627
+ <span style="color:#92400e; font-size:1.02rem; font-weight:800;">🎖️ ${bpTotal} 兵符 ${t.hours ? `+ ${t.hours}h 糧草` : ''} ${titlesHtml}</span>
628
  </div>
629
+ <div>${holders || '<span style="color:#685247; font-size:0.98rem;">待抽獎揭曉…</span>'}</div>
630
  </div>
631
  `;
632
  }).join('');
633
  $('#drawPrizeBoard').innerHTML = tierRows;
634
 
635
  $('#drawParticipantsList').innerHTML = entriesList.length === 0
636
+ ? '<div style="color:#685247; font-size:1.02rem;">尚無學生投球紀錄</div>'
637
  : entriesList.map(e => {
638
  const pct = prog.totalWeight > 0 ? Math.round((e.weight / prog.totalWeight) * 1000) / 10 : 0;
639
  const won = drawState.uidToTier?.[e.uid];
640
  const wonTag = won ? `<span class="lottery-pill-tag">${esc(won.toUpperCase())}</span>` : '';
641
  return `
642
  <div class="draw-participant-row">
643
+ <span><b style="color:#2c201b;">${esc(e.seat)}號 ${esc(e.name)}</b> ${wonTag}</span>
644
+ <span style="color:#685247;">⚪${e.regularBalls} 🌟${e.goldenBalls} = <b style="color:#b45309; font-size:1.08rem;">${e.weight} 籤</b> (${pct}%)</span>
645
  </div>
646
  `;
647
  }).join('');
 
670
  isAnimating = true;
671
  renderAll();
672
  const chute = $('#lotteryChuteReveal');
673
+ chute.innerHTML = `<div style="font-size:1.3rem; font-weight:900; color:#991b1b;">🌀 樂透氣流啟動高速攪拌中…</div>`;
674
 
675
  await machine.playDrawSequence(winner, nearMisses, (nmList) => {
676
  const names = nmList.map(x => `${x.seat}號 ${x.name}`).join(' / ');
677
+ chute.innerHTML = `<div style="font-size:1.22rem; font-weight:800; color:#b45309;">💨 差一點擦過出球口:<b>${esc(names)}</b> …</div>`;
678
  });
679
 
680
  const applied = applyTierDrawWithUpgrade({ state: drawState, tierKey, candidateUid: winner.uid });
 
688
  const tierDef = drawState.prizeTiers.find(t => t.tierKey === tierKey);
689
  const ballIcon = winner.goldenBalls > 0 ? '🌟 黃金球祝福' : '⚪ 幸運銀球';
690
  const upgHtml = applied.action === 'upgraded'
691
+ ? `<div style="margin-top:8px; color:#b91c1c; font-size:1.12rem; font-weight:900;">👑 逆天升級!原本持有 ${esc(applied.upgradedFromTier)} 升級為 ${esc(tierDef?.label || tierKey)},原名額立刻開放重抽遞補!</div>`
692
  : '';
693
  chute.innerHTML = `
694
+ <div class="draw-winner-pop" style="text-align:center;">
695
+ <div style="font-size:1.08rem; font-weight:800; color:#92400e;">${esc(tierDef?.label || tierKey)} 中獎彩球滾出!</div>
696
+ <div style="font-size:2.15rem; font-weight:900; color:#991b1b; margin:6px 0;">🎉 ${esc(winner.seat)}號 ${esc(winner.name)}</div>
697
+ <div style="font-size:1.05rem; font-weight:700; color:#685247;">${ballIcon}・個人總籤權 ${winner.weight} 籤</div>
698
  ${upgHtml}
699
  </div>
700
  `;
 
762
  const next = Math.min(3, (extraBonuses[lastWinnerUid] || 0) + roll);
763
  extraBonuses[lastWinnerUid] = next;
764
  saveTempSession();
765
+ $('#lotteryChuteReveal').innerHTML += `<div style="margin-top:8px; color:#0284c7; font-size:1.08rem; font-weight:900;">🎲 奇蹟骰啟動!加碼總額累計 +${next} 兵符(上限 3)</div>`;
766
  renderAll();
767
  });
768
  $('#btnResetLocalDraw')?.addEventListener('click', () => {
js/lottery.js CHANGED
@@ -32,7 +32,7 @@ function playToneSequence(steps = []) {
32
  const AudioCtx = window.AudioContext || window.webkitAudioContext;
33
  if (!AudioCtx) return;
34
  if (!_audioCtx) _audioCtx = new AudioCtx();
35
- if (_audioCtx.state === 'suspended') _audioCtx.resume().catch(() => {});
36
  const now = _audioCtx.currentTime;
37
  for (const st of steps) {
38
  const osc = _audioCtx.createOscillator();
@@ -47,7 +47,7 @@ function playToneSequence(steps = []) {
47
  osc.start(now + (st.delay || 0));
48
  osc.stop(now + (st.delay || 0) + (st.dur || 0.16) + 0.02);
49
  }
50
- } catch (e) {}
51
  }
52
 
53
  function playLotterySfx(kind) {
@@ -76,7 +76,7 @@ export function saveActiveLotteryRound(uid, cycleId, today, data) {
76
  try {
77
  if (typeof localStorage === 'undefined') return;
78
  localStorage.setItem(getActiveLotteryRoundKey(uid, cycleId, today), JSON.stringify(data));
79
- } catch (e) {}
80
  }
81
 
82
  export function loadActiveLotteryRound(uid, cycleId, today) {
@@ -98,7 +98,7 @@ export function clearActiveLotteryRound(uid, cycleId, today) {
98
  try {
99
  if (typeof localStorage === 'undefined') return;
100
  localStorage.removeItem(getActiveLotteryRoundKey(uid, cycleId, today));
101
- } catch (e) {}
102
  }
103
 
104
  async function loadLotteryQuestionPools(classInfo = {}, questionMode = 'mixed') {
@@ -167,9 +167,9 @@ const STUDENT_BALL_PALETTE = ['#fffbeb', '#fde68a', '#bae6fd', '#bbf7d0', '#fbcf
167
 
168
  /** 建立學生端圓頂琉璃倉物理粒子並啟動柔和防重疊循環 */
169
  function mountStudentLotteryChamber(canvas, readoutEl, entriesMap = {}, myUid = '', controller = {}) {
170
- if (!canvas) return () => {};
171
  const ctx = typeof canvas.getContext === 'function' ? canvas.getContext('2d') : null;
172
- if (!ctx) return () => {};
173
 
174
  const entries = Object.values(entriesMap || {})
175
  .map(e => ({ ...e, ...calcLotteryBallStats(e) }))
@@ -556,7 +556,7 @@ export async function openLotteryModal(ctx) {
556
  </div>
557
  <span class="lottery-lantern right" aria-hidden="true">🏮</span>
558
  </div>
559
- <div class="mute" style="font-size:0.8rem; margin-bottom:10px;">
560
  開放時段:${esc(formatCycleRangeLabel(cycle.openAt, cycle.endAt))} ・ 答對 1 題 +1 銀球,精熟 2→3 題升級 <b style="color:#fde047;">🌟黃金球(2倍籤)</b>,第 5 題加碼 +1 幸運銀球!
561
  </div>
562
 
@@ -572,11 +572,11 @@ export async function openLotteryModal(ctx) {
572
  <div class="lottery-stat-card"><span class="lottery-stat-label">⚪ 個人銀球</span><span class="lottery-stat-val">${myStats.regularBalls}</span></div>
573
  <div class="lottery-stat-card"><span class="lottery-stat-label">🌟 黃金球(×2)</span><span class="lottery-stat-val" style="color:#fde047;">${myStats.goldenBalls}</span></div>
574
  <div class="lottery-stat-card"><span class="lottery-stat-label">🎟️ 個人總籤權</span><span class="lottery-stat-val" style="color:#7dd3fc;">${myStats.weight}</span></div>
575
- <div class="lottery-stat-card"><span class="lottery-stat-label">📊 中獎佔比</span><span class="lottery-stat-val">${mySharePct}% <span style="font-size:0.72rem;color:#f3d6a2;">(班${prog.totalWeight}籤)</span></span></div>
576
  </div>
577
 
578
  <div class="lottery-milestone-box">
579
- <div style="display:flex; justify-content:space-between; font-size:0.8rem;">
580
  <b>🚩 全班集氣里程碑(目前已累積 ${prog.totalWeight} 籤)</b>
581
  <span>${prog.nextMilestone ? `距下一階還差 ${prog.nextMilestone - prog.totalWeight} 籤` : '🎉 三階全數突破!'}</span>
582
  </div>
 
32
  const AudioCtx = window.AudioContext || window.webkitAudioContext;
33
  if (!AudioCtx) return;
34
  if (!_audioCtx) _audioCtx = new AudioCtx();
35
+ if (_audioCtx.state === 'suspended') _audioCtx.resume().catch(() => { });
36
  const now = _audioCtx.currentTime;
37
  for (const st of steps) {
38
  const osc = _audioCtx.createOscillator();
 
47
  osc.start(now + (st.delay || 0));
48
  osc.stop(now + (st.delay || 0) + (st.dur || 0.16) + 0.02);
49
  }
50
+ } catch (e) { }
51
  }
52
 
53
  function playLotterySfx(kind) {
 
76
  try {
77
  if (typeof localStorage === 'undefined') return;
78
  localStorage.setItem(getActiveLotteryRoundKey(uid, cycleId, today), JSON.stringify(data));
79
+ } catch (e) { }
80
  }
81
 
82
  export function loadActiveLotteryRound(uid, cycleId, today) {
 
98
  try {
99
  if (typeof localStorage === 'undefined') return;
100
  localStorage.removeItem(getActiveLotteryRoundKey(uid, cycleId, today));
101
+ } catch (e) { }
102
  }
103
 
104
  async function loadLotteryQuestionPools(classInfo = {}, questionMode = 'mixed') {
 
167
 
168
  /** 建立學生端圓頂琉璃倉物理粒子並啟動柔和防重疊循環 */
169
  function mountStudentLotteryChamber(canvas, readoutEl, entriesMap = {}, myUid = '', controller = {}) {
170
+ if (!canvas) return () => { };
171
  const ctx = typeof canvas.getContext === 'function' ? canvas.getContext('2d') : null;
172
+ if (!ctx) return () => { };
173
 
174
  const entries = Object.values(entriesMap || {})
175
  .map(e => ({ ...e, ...calcLotteryBallStats(e) }))
 
556
  </div>
557
  <span class="lottery-lantern right" aria-hidden="true">🏮</span>
558
  </div>
559
+ <div class="mute" style="font-size:0.92rem; line-height:1.5; margin-bottom:10px;">
560
  開放時段:${esc(formatCycleRangeLabel(cycle.openAt, cycle.endAt))} ・ 答對 1 題 +1 銀球,精熟 2→3 題升級 <b style="color:#fde047;">🌟黃金球(2倍籤)</b>,第 5 題加碼 +1 幸運銀球!
561
  </div>
562
 
 
572
  <div class="lottery-stat-card"><span class="lottery-stat-label">⚪ 個人銀球</span><span class="lottery-stat-val">${myStats.regularBalls}</span></div>
573
  <div class="lottery-stat-card"><span class="lottery-stat-label">🌟 黃金球(×2)</span><span class="lottery-stat-val" style="color:#fde047;">${myStats.goldenBalls}</span></div>
574
  <div class="lottery-stat-card"><span class="lottery-stat-label">🎟️ 個人總籤權</span><span class="lottery-stat-val" style="color:#7dd3fc;">${myStats.weight}</span></div>
575
+ <div class="lottery-stat-card"><span class="lottery-stat-label">📊 中獎佔比</span><span class="lottery-stat-val">${mySharePct}% <span style="font-size:0.84rem;color:#f3d6a2;">(班${prog.totalWeight}籤)</span></span></div>
576
  </div>
577
 
578
  <div class="lottery-milestone-box">
579
+ <div style="display:flex; justify-content:space-between; font-size:0.92rem;">
580
  <b>🚩 全班集氣里程碑(目前已累積 ${prog.totalWeight} 籤)</b>
581
  <span>${prog.nextMilestone ? `距下一階還差 ${prog.nextMilestone - prog.totalWeight} 籤` : '🎉 三階全數突破!'}</span>
582
  </div>
lottery-draw.html CHANGED
@@ -1,5 +1,5 @@
1
  <!DOCTYPE html>
2
- <html lang="zh-Hant" data-theme="dark">
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
@@ -12,9 +12,9 @@
12
  </head>
13
  <body class="lottery-draw-body">
14
  <header class="draw-topbar">
15
- <div style="display:flex; align-items:center; gap:10px; flex-wrap:wrap;">
16
  <img src="assets/lottery_box.png" alt="聚寶開獎機" class="draw-topbar-emblem">
17
- <strong style="font-size:1.18rem; color:#fde68a;">🎰 錯題樂透・教室大螢幕開獎台</strong>
18
  <select id="selDrawClass" class="draw-select"></select>
19
  <select id="selDrawCycle" class="draw-select"></select>
20
  <span id="lblDrawCycleStatus" class="lottery-pill-tag">同步中…</span>
@@ -29,9 +29,9 @@
29
 
30
  <!-- 未登入教師檢核卡(已登入時自動隱藏) -->
31
  <section id="drawAuthGate" class="hidden draw-auth-card">
32
- <h2 style="margin-top:0; color:#fde68a;">🔐 教師專屬公開開獎台</h2>
33
- <p id="drawAuthHint" style="color:#f3d6a2; font-size:0.9rem;">請使用教師帳號登入後開啟本班樂透抽獎台。</p>
34
- <form id="formDrawLogin" style="display:grid; gap:10px;">
35
  <input id="drawLoginEmail" type="email" placeholder="教師 Email" class="draw-select" style="text-align:left;">
36
  <input id="drawLoginPw" type="password" placeholder="密碼" class="draw-select" style="text-align:left;">
37
  <button id="btnDrawLogin" type="submit" class="draw-btn gold">登入並進入開獎台</button>
@@ -41,29 +41,29 @@
41
  <main id="drawStageMain" class="draw-layout">
42
  <!-- 左半:朱紅琉璃物理攪拌開獎機 + 出球滑槽 + 現場抽獎控制 -->
43
  <section class="draw-panel">
44
- <div id="drawMilestoneSummary" style="margin-bottom:10px;"></div>
45
 
46
  <div class="draw-canvas-wrap">
47
  <canvas id="lotteryMachineCanvas" width="420" height="420"></canvas>
48
  </div>
49
 
50
  <div id="lotteryChuteReveal" class="draw-chute-reveal">
51
- <div style="color:#f3d6a2; font-size:0.95rem;">等待老師先按下「🔒 封箱鎖定」或直接啟動各獎項開獎</div>
52
  </div>
53
 
54
- <div id="drawVacancyBanner" class="hidden" style="margin-top:10px; padding:12px; border-radius:14px; background:rgba(245,158,11,0.24); border:1.5px solid #fde68a; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;">
55
- <span id="lblVacancyMsg" style="font-weight:800; color:#fef08a;">🎉 偵測到中獎人升級,原低階獎位空出!</span>
56
  <button id="btnRedrawVacancy" class="draw-btn gold" type="button">🔄 立刻重抽遞補空缺</button>
57
  </div>
58
 
59
- <div id="drawTierControls" style="margin-top:14px; display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px;">
60
  <button class="draw-btn" data-draw-tier="t3" type="button">🥉 開抽三獎</button>
61
  <button class="draw-btn" data-draw-tier="t2" type="button">🥈 開抽二獎</button>
62
  <button class="draw-btn" data-draw-tier="t1" type="button">🥇 開抽一獎</button>
63
  <button class="draw-btn gold" data-draw-tier="head" type="button">👑 壓軸開抽頭獎</button>
64
  </div>
65
 
66
- <div style="margin-top:10px; display:flex; gap:8px; flex-wrap:wrap;">
67
  <button id="btnExtraTeacherDraw" class="draw-btn" type="button" style="flex:1;">➕ 班導加抽 +1 名</button>
68
  <button id="btnWonderDiceBonus" class="draw-btn" type="button" style="flex:1;">🎲 奇蹟骰加碼 (+1~2 兵符)</button>
69
  <button id="btnResetLocalDraw" class="draw-btn" type="button" title="僅重設尚未結算發信的現場模擬抽籤">🧹 重抽暫存</button>
@@ -71,15 +71,15 @@
71
  </section>
72
 
73
  <!-- 右半:獎池揭示板 + 參與彩球名單 + 一鍵發獎結案 -->
74
- <section class="draw-panel" style="display:flex; flex-direction:column; gap:14px;">
75
  <div>
76
- <h3 style="margin:0 0 8px; color:#fde68a;">🏆 本期開獎即時榮譽榜</h3>
77
- <div id="drawPrizeBoard" style="display:grid; gap:8px;"></div>
78
  </div>
79
 
80
  <div>
81
- <h4 style="margin:0 0 6px; color:#fde68a;">🎟️ 樂透箱投球名單(總籤權與佔比)</h4>
82
- <div id="drawParticipantsList" style="max-height:240px; overflow-y:auto; display:grid; gap:6px; font-size:0.86rem;"></div>
83
  </div>
84
 
85
  <button id="btnSettleLotteryDraw" class="lottery-primary-btn" type="button" style="margin-top:auto;">🎁 一鍵封存開獎戰報並發信領獎</button>
 
1
  <!DOCTYPE html>
2
+ <html lang="zh-Hant">
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
 
12
  </head>
13
  <body class="lottery-draw-body">
14
  <header class="draw-topbar">
15
+ <div style="display:flex; align-items:center; gap:12px; flex-wrap:wrap;">
16
  <img src="assets/lottery_box.png" alt="聚寶開獎機" class="draw-topbar-emblem">
17
+ <strong style="font-size:1.42rem; color:#991b1b; letter-spacing:0.01em;">🎰 錯題樂透・教室大螢幕開獎台</strong>
18
  <select id="selDrawClass" class="draw-select"></select>
19
  <select id="selDrawCycle" class="draw-select"></select>
20
  <span id="lblDrawCycleStatus" class="lottery-pill-tag">同步中…</span>
 
29
 
30
  <!-- 未登入教師檢核卡(已登入時自動隱藏) -->
31
  <section id="drawAuthGate" class="hidden draw-auth-card">
32
+ <h2 style="margin-top:0; color:#991b1b; font-size:1.45rem;">🔐 教師專屬公開開獎台</h2>
33
+ <p id="drawAuthHint" style="color:#685247; font-size:1.05rem;">請使用教師帳號登入後開啟本班樂透抽獎台。</p>
34
+ <form id="formDrawLogin" style="display:grid; gap:12px;">
35
  <input id="drawLoginEmail" type="email" placeholder="教師 Email" class="draw-select" style="text-align:left;">
36
  <input id="drawLoginPw" type="password" placeholder="密碼" class="draw-select" style="text-align:left;">
37
  <button id="btnDrawLogin" type="submit" class="draw-btn gold">登入並進入開獎台</button>
 
41
  <main id="drawStageMain" class="draw-layout">
42
  <!-- 左半:朱紅琉璃物理攪拌開獎機 + 出球滑槽 + 現場抽獎控制 -->
43
  <section class="draw-panel">
44
+ <div id="drawMilestoneSummary" style="margin-bottom:12px;"></div>
45
 
46
  <div class="draw-canvas-wrap">
47
  <canvas id="lotteryMachineCanvas" width="420" height="420"></canvas>
48
  </div>
49
 
50
  <div id="lotteryChuteReveal" class="draw-chute-reveal">
51
+ <div style="color:#685247; font-size:1.1rem; font-weight:700;">等待老師先按下「🔒 封箱鎖定」或直接啟動各獎項開獎</div>
52
  </div>
53
 
54
+ <div id="drawVacancyBanner" class="hidden" style="margin-top:12px; padding:14px; border-radius:14px; background:#fef3c7; border:2px solid #d97706; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;">
55
+ <span id="lblVacancyMsg" style="font-weight:900; font-size:1.08rem; color:#991b1b;">🎉 偵測到中獎人升級,原低階獎位空出!</span>
56
  <button id="btnRedrawVacancy" class="draw-btn gold" type="button">🔄 立刻重抽遞補空缺</button>
57
  </div>
58
 
59
+ <div id="drawTierControls" style="margin-top:14px; display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px;">
60
  <button class="draw-btn" data-draw-tier="t3" type="button">🥉 開抽三獎</button>
61
  <button class="draw-btn" data-draw-tier="t2" type="button">🥈 開抽二獎</button>
62
  <button class="draw-btn" data-draw-tier="t1" type="button">🥇 開抽一獎</button>
63
  <button class="draw-btn gold" data-draw-tier="head" type="button">👑 壓軸開抽頭獎</button>
64
  </div>
65
 
66
+ <div style="margin-top:10px; display:flex; gap:10px; flex-wrap:wrap;">
67
  <button id="btnExtraTeacherDraw" class="draw-btn" type="button" style="flex:1;">➕ 班導加抽 +1 名</button>
68
  <button id="btnWonderDiceBonus" class="draw-btn" type="button" style="flex:1;">🎲 奇蹟骰加碼 (+1~2 兵符)</button>
69
  <button id="btnResetLocalDraw" class="draw-btn" type="button" title="僅重設尚未結算發信的現場模擬抽籤">🧹 重抽暫存</button>
 
71
  </section>
72
 
73
  <!-- 右半:獎池揭示板 + 參與彩球名單 + 一鍵發獎結案 -->
74
+ <section class="draw-panel" style="display:flex; flex-direction:column; gap:16px;">
75
  <div>
76
+ <h3 style="margin:0 0 10px; color:#991b1b; font-size:1.35rem;">🏆 本期開獎即時榮譽榜</h3>
77
+ <div id="drawPrizeBoard" style="display:grid; gap:10px;"></div>
78
  </div>
79
 
80
  <div>
81
+ <h4 style="margin:0 0 8px; color:#78350f; font-size:1.15rem;">🎟️ 樂透箱投球名單(總籤權與佔比)</h4>
82
+ <div id="drawParticipantsList" style="max-height:300px; overflow-y:auto; display:grid; gap:8px; font-size:1.02rem;"></div>
83
  </div>
84
 
85
  <button id="btnSettleLotteryDraw" class="lottery-primary-btn" type="button" style="margin-top:auto;">🎁 一鍵封存開獎戰報並發信領獎</button>