/* 通用卷轴页面样式（扩展 mahjong.css） */
.slot-body { padding: 0 0 40px; }
.slot-top { max-width: 1080px; margin: 0 auto; padding: 16px 16px 0; display: flex; align-items: center; gap: 12px; }
.slot-top a { color: var(--muted, #8c9ab0); font-size: 13px; }
.slot-top .sp { flex: 1; }
.slot-bal { font-size: 13px; color: #8c9ab0; }
.slot-bal b { color: var(--gold, #e8b64c); font-size: 16px; }
#slot-page { max-width: 1080px; margin: 0 auto; padding: 16px; }
.slot-toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 80; }

.slot-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.slot-head h2 { margin: 0; font-size: 22px; }
.slot-head p { margin: 4px 0 0; color: var(--muted, #8c9ab0); font-size: 12.5px; }

.slot-stage {
  position: relative; border-radius: 16px; padding: 20px 14px 16px;
  border: 1px solid #24303f;
  background: radial-gradient(600px 300px at 50% -10%, #1c2a3d 0%, #0d141d 60%);
  overflow: hidden;
}
.slot-stage.mouse { background: radial-gradient(600px 300px at 50% -10%, #2b2418 0%, #12100b 60%); border-color: #3d3420; }
.slot-stage.bounty { background: radial-gradient(600px 300px at 50% -10%, #2d1f2e 0%, #140d14 60%); border-color: #42283f; }
.slot-stage.mahjong2 { background: radial-gradient(600px 300px at 50% -10%, #12321f 0%, #0b1f14 60%); border-color: #1f4a30; }

.slot-reels { display: flex; gap: 10px; justify-content: center; }
.slot-reel { display: flex; flex-direction: column; gap: 8px; }
.slot-cell {
  width: 68px; height: 68px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 26px; font-weight: 800;
  background: linear-gradient(165deg, #fdfbf3, #e6dfcc);
  border: 2px solid #c9bfa4;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.08), 0 3px 10px rgba(0,0,0,.35);
  transition: transform .1s;
}
.slot-cell.wild { background: linear-gradient(165deg, #fff6d8, #ffe28a); border-color: #d8ab3a; }
.slot-cell.scatter { background: linear-gradient(165deg, #ffe3f6, #ffb8e6); border-color: #d86bb0; }
.slot-cell.hit { animation: slotPulse .5s ease; }
@keyframes slotPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); box-shadow: 0 0 18px rgba(232,182,76,.6); } }
.slot-cell.small { width: 56px; height: 56px; font-size: 22px; }

.slot-result { margin-top: 14px; text-align: center; min-height: 24px; font-size: 13.5px; color: #cfe9d8; }
.slot-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.slot-bets { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.slot-chip { padding: 7px 13px; border-radius: 8px; font-size: 13px; background: #1b2431; border: 1px solid #232e3e; color: #9aa7bd; }
.slot-chip.on { background: linear-gradient(135deg, #e8b64c, #c9962f); color: #231a05; font-weight: 700; border-color: transparent; }
#slot-bet-input { width: 110px; margin: 0; }
.slot-btn { margin-left: auto; padding: 12px 38px; border-radius: 12px; background: linear-gradient(135deg, #e8b64c, #c9962f); color: #231a05; font-size: 16px; font-weight: 800; letter-spacing: 2px; box-shadow: 0 8px 22px rgba(232,182,76,.3); }
.slot-btn:disabled { opacity: .6; }
.slot-detail { margin-top: 14px; background: #101821; border: 1px solid #232e3e; border-radius: 12px; padding: 12px 14px; font-size: 12.5px; display: grid; gap: 4px; }
.slot-hit { color: #e8b64c; font-weight: 600; }
.slot-line { color: #9aa7bd; }
.slot-paytable { margin-top: 14px; background: #101821; border: 1px solid #232e3e; border-radius: 12px; padding: 14px; }
.slot-paytable h3 { margin: 0 0 10px; font-size: 13px; color: #8c9ab0; font-weight: 500; }
.slot-paytable table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.slot-paytable th { text-align: left; color: #5f6d82; font-size: 11px; padding: 6px 8px; border-bottom: 1px solid #232e3e; font-weight: 500; }
.slot-paytable td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.03); color: #b6c2d4; }
.slot-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.slot-nav a { padding: 7px 14px; border-radius: 20px; font-size: 13px; background: #1b2431; border: 1px solid #232e3e; color: #9aa7bd; }
.slot-nav a.on { background: linear-gradient(135deg, #e8b64c, #c9962f); color: #231a05; font-weight: 700; border-color: transparent; }

@media (max-width: 720px) {
  .slot-cell { width: 50px; height: 50px; font-size: 20px; }
  .slot-cell.small { width: 44px; height: 44px; font-size: 17px; }
  .slot-reels { gap: 5px; }
  .slot-reel { gap: 5px; }
  .slot-btn { width: 100%; margin-left: 0; }
}

/* emoji / CJK symbol font fallback */
.slot-cell, .mj-cell, .fish-swim, .bb-seg span, .game-icon, .bb-bet .n {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Microsoft YaHei", sans-serif;
}

/* 3D 模式需要固定舞台高度，否则隐藏 2D 网格后容器塌陷 */
.slot-stage.has3d{min-height:440px;padding:0;display:grid;place-items:stretch}
.slot-stage.has3d .slot-result{position:absolute;left:0;right:0;bottom:10px;z-index:4;pointer-events:none}
.slot-stage.has3d canvas{display:block;width:100%;height:100%}
@media(max-width:720px){.slot-stage.has3d{min-height:340px}}

/* ══ 中奖弹幕 ═══════════════════════════════════════════════════════════ */
.slot-win-pop {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 2px;
  text-align: center;
  pointer-events: none;
  z-index: 6;
}
.slot-win-pop .cap {
  font-size: 12px;
  letter-spacing: .38em;
  color: #ffd98a;
  text-shadow: 0 2px 10px #000;
}
.slot-win-pop .num {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.05;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px rgba(255, 200, 90, .95), 0 6px 18px rgba(0, 0, 0, .85);
  animation: winPop .52s cubic-bezier(.2, 1.7, .4, 1);
}
.slot-win-pop .sub {
  font-size: 12px;
  color: #ffd98a;
  text-shadow: 0 2px 8px #000;
}
.slot-win-pop.big .num { font-size: 48px; color: #ffe9b8; }
.slot-win-pop.mega .num {
  font-size: 56px;
  color: #fff2c0;
  text-shadow: 0 0 34px rgba(255, 170, 60, 1), 0 0 70px rgba(255, 120, 40, .8), 0 8px 22px #000;
  animation: winPop .52s cubic-bezier(.2, 1.7, .4, 1), megaPulse 1s ease-in-out .5s infinite;
}
.slot-win-pop.out { animation: winOut .75s ease forwards; }

@keyframes winPop { from { transform: scale(.55); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes megaPulse { 50% { transform: scale(1.06); } }
@keyframes winOut { to { opacity: 0; transform: translateY(-16px); } }

/* ══ PG 风格舞台：暗底 + 金框辉光 + 暗角 ═════════════════════════════════ */
.slot-stage.has3d {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(233, 196, 106, .35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .04) inset,
    0 0 34px rgba(233, 196, 106, .18),
    0 24px 60px rgba(0, 0, 0, .6);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(233, 196, 106, .14), rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, #0b0d14, #05060a);
  overflow: hidden;
}

.slot-stage.has3d::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(110% 90% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%);
  z-index: 2;
}

.slot-stage.has3d canvas { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .slot-win-pop .num { animation: none; }
}