/* fx.css — 机柜灯带 / 转轮滚动 / 中奖动画 / 金币 */
/* ============================================================ */
/* 机柜外壳 */
/* ============================================================ */
.screen{
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(255,181,46,.10), transparent 70%),
    linear-gradient(180deg,#0a1020,#151d2e 55%,#0c1220);
  border:1px solid #2b3550;
}
.machine-cabinet{
  position:relative;
  padding:3px;
  border-radius:20px;
  background:linear-gradient(160deg,#3a2a0a,#6b4a10 18%,#ffb52e 42%,#8a5f12 62%,#2a1d06);
  box-shadow:
    0 0 0 1px rgba(255,215,120,.35),
    0 0 22px rgba(255,181,46,.28),
    0 14px 44px rgba(0,0,0,.62),
    inset 0 1px 0 rgba(255,255,255,.16);
}
.machine-cabinet::before{
  content:'';
  position:absolute;inset:-2px;
  border-radius:22px;
  background:conic-gradient(from 0deg,#ffb52e,#ff6b00,#ffd970,#ff8a00,#ffb52e);
  opacity:.42;
  filter:blur(9px);
  z-index:-1;
  animation:lampSpin 7s linear infinite;
}
@keyframes lampSpin{to{transform:rotate(360deg)}}

/* 顶部灯条 */
.lampbar{
  display:flex;gap:4px;justify-content:center;
  padding:7px 0 5px;
}
.lampbar i{
  width:6px;height:6px;border-radius:50%;
  background:#ffb52e;
  box-shadow:0 0 6px rgba(255,181,46,.9);
  animation:lampBlink 1.5s ease-in-out infinite;
}
.lampbar i:nth-child(odd){animation-delay:.24s;background:#ff6b00;box-shadow:0 0 6px rgba(255,107,0,.85)}
.lampbar i:nth-child(3n){animation-delay:.52s}
@keyframes lampBlink{0%,100%{opacity:.32;transform:scale(.82)}50%{opacity:1;transform:scale(1.14)}}

/* ============================================================ */
/* 转轮：带子滚动 */
/* ============================================================ */
.reel{position:relative;overflow:hidden;border-radius:12px}
.reel .strip{display:flex;flex-direction:column;gap:6px;will-change:transform;transition:transform .1s}

/* 滚动状态 */
.reel.rolling .strip{animation:stripRoll .16s linear infinite}
@keyframes stripRoll{
  0%{transform:translateY(0)}
  100%{transform:translateY(-33.333%)}
}
.reel.rolling .cell{
  filter:blur(1.4px) brightness(.82);
  transition:none;
}
/* 上下渐隐遮罩 */
.reel::before,.reel::after{
  content:'';position:absolute;left:0;right:0;height:26%;
  pointer-events:none;z-index:3;opacity:0;transition:opacity .16s;
}
.reel::before{top:0;background:linear-gradient(180deg,#0c1220,rgba(12,18,32,0))}
.reel::after{bottom:0;background:linear-gradient(0deg,#0c1220,rgba(12,18,32,0))}
.reel.rolling::before,.reel.rolling::after{opacity:1}

/* 落定回弹 */
.reel.settle .cell{animation:cellSettle .2s cubic-bezier(.2,1.7,.4,1)}
@keyframes cellSettle{
  0%{transform:translateY(-9px) scale(1.05)}
  60%{transform:translateY(2.5px) scale(.975)}
  100%{transform:translateY(0) scale(1)}
}

/* 格子内 SVG */
.cell{padding:5px}
.cell svg{width:100%;height:100%;display:block;filter:drop-shadow(0 2px 4px rgba(0,0,0,.55))}
.cell.s0 svg{filter:drop-shadow(0 0 9px rgba(255,205,51,.72))}
.cell.s1 svg{filter:drop-shadow(0 0 9px rgba(139,92,246,.72))}

/* 中奖脉冲 */
.cell.won{
  animation:winPulse .72s ease-in-out infinite alternate;
  border-color:#ffb52e !important;
  z-index:2;
}
@keyframes winPulse{
  from{box-shadow:0 0 0 1px rgba(255,181,46,.6),0 0 10px rgba(255,181,46,.42);transform:scale(1)}
  to{box-shadow:0 0 0 2px rgba(255,215,120,.95),0 0 26px rgba(255,181,46,.9);transform:scale(1.055)}
}

/* 中奖线 SVG 层 */
#lineSvg,.lines-svg{
  position:absolute;inset:0;pointer-events:none;z-index:5;
}

/* 金币 */
.coin{
  position:absolute;width:22px;height:22px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:900;color:#6b4a00;
  background:radial-gradient(circle at 34% 30%,#fff3b0,#ffb52e 55%,#c47d00);
  box-shadow:0 0 10px rgba(255,181,46,.8);
  pointer-events:none;z-index:120;
}

/* ============================================================ */
/* 大奖层：阶梯 + 光焰 */
/* ============================================================ */
.winlayer.on{display:flex}
.winlayer{
  background:radial-gradient(circle at 50% 50%,rgba(60,40,0,.9),rgba(0,0,0,.94));
}
.winbox{
  animation:bigPop .5s cubic-bezier(.18,1.7,.35,1);
  position:relative;
}
.winbox::before{
  content:'';position:absolute;inset:-60px;
  background:conic-gradient(from 0deg,transparent,rgba(255,181,46,.28),transparent 40%);
  animation:lampSpin 2.4s linear infinite;
  z-index:-1;border-radius:50%;
}
@keyframes bigPop{
  0%{transform:scale(.42) rotate(-7deg);opacity:0}
  70%{transform:scale(1.09) rotate(1.5deg);opacity:1}
  100%{transform:scale(1) rotate(0)}
}
.win-mult{
  animation:multGlow 1.1s ease-in-out infinite alternate;
}
@keyframes multGlow{
  from{text-shadow:0 0 14px rgba(255,181,46,.65)}
  to{text-shadow:0 0 34px rgba(255,215,120,1),0 0 60px rgba(255,181,46,.7)}
}

/* 结果条 */
.result.win{
  animation:resFlash .55s ease-out;
  background:linear-gradient(90deg,rgba(34,211,125,.16),rgba(34,211,125,.06));
  border-color:rgba(34,211,125,.5);
}
.result.big{
  animation:resFlash .55s ease-out, resGlow 1s ease-in-out infinite alternate;
}
@keyframes resFlash{
  0%{transform:scale(.94);opacity:.4}
  60%{transform:scale(1.03)}
  100%{transform:scale(1);opacity:1}
}
@keyframes resGlow{
  from{box-shadow:0 0 0 rgba(255,181,46,0)}
  to{box-shadow:0 0 20px rgba(255,181,46,.5)}
}

/* 静音按钮 */
.mute-btn{
  width:34px;height:34px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.06);border:1px solid var(--line);
  color:var(--dim);font-size:15px;cursor:pointer;
  transition:.16s;flex-shrink:0;
}
.mute-btn:active{transform:scale(.9)}
.mute-btn.off{color:#ff4d5e;border-color:rgba(255,77,94,.4)}

/* 转轮数量徽章 */
.reel-badge{
  position:absolute;top:6px;left:6px;z-index:8;
  font-size:9px;padding:2px 6px;border-radius:6px;
  background:rgba(0,0,0,.55);color:var(--gold);
  letter-spacing:.5px;font-weight:700;
}