/* 伊娃的寶藏(eva.js):全畫面遮罩 + 中間的盤面視窗 + 轉動 / 掉落 / 消除特效 */
.eva-btn canvas { pointer-events: none; }
.eva-panel { position: fixed; inset: 0; z-index: 8000; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .62); padding: 10px; }
.eva-panel.hidden { display: none; }
.eva-box { width: min(420px, 100%); max-height: 100%; overflow-y: auto; background: #1b160f; border: 1px solid #8a6a32; border-radius: 12px;
  box-shadow: 0 0 24px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 215, 130, .12); padding: 10px 12px 12px; color: #f0e2c0; }
.eva-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.eva-head b { font-size: 18px; letter-spacing: .12em; color: #ffd98a; text-shadow: 0 0 8px rgba(255, 200, 90, .5); }
.eva-x { background: none; border: 0; color: #e8d6ad; font-size: 18px; min-height: 0; padding: 2px 6px; }
.eva-bar { display: flex; justify-content: space-between; font-size: 13px; color: #f3dca6; margin-bottom: 6px; }
.eva-free { color: #7fe0ff; }

/* 盤面:超出上緣的格子(正在掉下來)要裁掉 */
.eva-grid { position: relative; overflow: hidden; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 6px; border-radius: 8px;
  background: radial-gradient(ellipse at center, #2e2414 0%, #120e08 100%); border: 1px solid #5c4521; cursor: pointer; }
.eva-cell { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 6px; background: rgba(255, 230, 170, .05); }
.eva-cell .eva-ic { width: 84%; height: 84%; }
.eva-cell.scatter { background: rgba(120, 200, 255, .14); }
.eva-cell.mult { background: rgba(200, 120, 255, .14); }
.eva-cell.mult .eva-ic { filter: drop-shadow(0 0 4px rgba(220, 160, 255, .9)); }
.eva-x-tag { position: absolute; right: 1px; bottom: 0; font-size: 11px; color: #fff3b0; text-shadow: 0 0 3px #000, 0 1px 2px #000; }

/* 轉動 / 停格由 eva.js 的同一條 rAF 軌跡控制;裁切與合成只在轉動期間開啟。 */
.eva-face { position: absolute; inset: 0; width: 100%; height: 100%; display: grid; place-items: center; }
.eva-cell.reeling { overflow: hidden; }
.eva-reel { position: absolute; left: 0; top: 0; width: 100%; height: 600%; pointer-events: none; }
.eva-reel.hidden { display: none; }
.eva-cell.reeling .eva-reel, .eva-cell.reeling .eva-face { will-change: transform; }

/* 中獎:發亮 → 放大消失 */
.eva-cell.hit { background: rgba(255, 215, 90, .38); box-shadow: 0 0 12px rgba(255, 210, 80, .95); animation: eva-pulse .26s ease-in-out infinite alternate; }
@keyframes eva-pulse { from { transform: scale(1); } to { transform: scale(1.12); } }
.eva-cell.pop { animation: eva-pop .22s ease-out forwards; }
@keyframes eva-pop { to { transform: scale(1.5); opacity: 0; } }

/* 中間跳大字:倍數 / 免費遊戲 / 大獎 */
.eva-banner { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2;
  font-size: 34px; font-weight: 800; letter-spacing: .06em; color: #fff3b0; text-shadow: 0 0 14px rgba(255, 200, 80, .95), 0 2px 4px #000; opacity: 0; }
.eva-banner.hidden { display: none; }
.eva-banner.show { animation: eva-banner 1s ease-out forwards; }
.eva-banner.mult { color: #f3d0ff; text-shadow: 0 0 16px rgba(200, 120, 255, .95), 0 2px 4px #000; }
.eva-banner.free { color: #b8f1ff; text-shadow: 0 0 16px rgba(90, 200, 255, .95), 0 2px 4px #000; background: rgba(0, 20, 40, .35); }
.eva-banner.big { font-size: 40px; background: radial-gradient(ellipse at center, rgba(255, 200, 80, .35) 0%, rgba(0, 0, 0, 0) 70%); }
@keyframes eva-banner { 0% { transform: scale(.35); opacity: 0; } 18% { transform: scale(1.18); opacity: 1; } 32% { transform: scale(1); } 82% { opacity: 1; } 100% { opacity: 0; } }

.eva-msg { min-height: 22px; margin: 8px 0 6px; text-align: center; font-size: 15px; color: #ffe08a; }
.eva-msg.big { font-size: 18px; color: #fff3b0; text-shadow: 0 0 10px rgba(255, 210, 80, .9); }
.eva-bets { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.eva-bet { flex: 1; min-height: 0; padding: 6px 0; font-size: 13px; border-radius: 6px; background: #2a2114; border: 1px solid #5c4521; color: #e8d6ad; }
.eva-bet.on { background: #6b4f1d; border-color: #e0b85a; color: #fff3c0; }
.eva-actions { display: flex; gap: 8px; }
.eva-spin { flex: 3; padding: 10px 0; font-size: 16px; letter-spacing: .1em; }
.eva-spin:disabled, .eva-auto:disabled { opacity: .5; }
.eva-auto { flex: 1.3; padding: 10px 0; font-size: 14px; border-radius: 8px; background: #2a2114; border: 1px solid #8a6a32; color: #f3dca6; min-height: 0; }
.eva-auto.on { background: #6b2a1d; border-color: #ff9a6a; color: #fff0e0; box-shadow: 0 0 10px rgba(255, 140, 90, .6); }
.eva-foot { margin-top: 6px; text-align: center; font-size: 12px; color: #c9b58a; }
.eva-rule { margin-top: 8px; font-size: 12px; color: #c9b58a; }
.eva-rule summary { cursor: pointer; color: #e8d6ad; }
.eva-rule p { margin: 4px 0; }

/* 戰鬥舞台(盤面上方):畫在 canvas 上,高度由 eva.js 依寬度設(128 / 104) */
.eva-stage { display: block; width: 100%; height: 128px; margin-bottom: 6px; border-radius: 8px; border: 1px solid #5c4521; background: #17120b; }
.eva-stage.hidden { display: none; }
.eva-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 5; }
.eva-cell.zap .eva-face { animation: eva-zap .46s ease-out; box-shadow: 0 0 14px rgba(160, 200, 255, .95); background: rgba(190, 220, 255, .32); }
@keyframes eva-zap { 0% { transform: translate(0, 0) scale(1.15); } 20% { transform: translate(-3px, 1px); } 40% { transform: translate(3px, -1px); } 60% { transform: translate(-2px, 0); } 100% { transform: none; } }
.eva-stage-opt { display: block; margin: 6px auto 0; min-height: 0; padding: 3px 10px; font-size: 11px; border-radius: 6px; background: none; border: 1px solid #5c4521; color: #c9b58a; }

/* 手機減少光暈濾鏡;保留圖案、配色、中獎提示與格子大小。 */
@media (pointer: coarse) {
  .eva-box { box-shadow: inset 0 0 0 1px rgba(255, 215, 130, .12); }
  .eva-cell.mult .eva-ic { filter: none; }
  .eva-cell.hit, .eva-cell.zap .eva-face { box-shadow: none; }
  .eva-banner, .eva-banner.mult, .eva-banner.free { text-shadow: 0 2px 4px #000; }
}
/* 電腦直式沿用手機的光暈樣式；橫式保持原樣。 */
@media (pointer: fine) {
  :where(html:not(.land)) .eva-box { box-shadow: inset 0 0 0 1px rgba(255, 215, 130, .12); }
  :where(html:not(.land)) .eva-cell.mult .eva-ic { filter: none; }
  :where(html:not(.land)) .eva-cell.hit, :where(html:not(.land)) .eva-cell.zap .eva-face { box-shadow: none; }
  :where(html:not(.land)) .eva-banner, :where(html:not(.land)) .eva-banner.mult, :where(html:not(.land)) .eva-banner.free { text-shadow: 0 2px 4px #000; }
}
@media (prefers-reduced-motion: reduce) {
  .eva-cell.hit, .eva-cell.pop, .eva-cell.zap .eva-face { animation: none; }
  .eva-cell.pop { opacity: 0; }
  .eva-cell.mult .eva-ic { filter: none; }
  .eva-banner.show { animation: none; transform: none; opacity: 1; }
  .eva-stage, .eva-fx { visibility: hidden; }
}
