* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #07101f;
  --bg2: #0b1830;
  --card: rgba(18, 34, 60, .72);
  --line: rgba(120, 180, 255, .14);
  --txt: #dbe9ff;
  --dim: #7e95b8;
  --cyan: #36e2ff;
  --gold: #ffd34d;
  --green: #3df08c;
  --red: #ff5d7a;
}
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: radial-gradient(1200px 700px at 70% -10%, #14305c 0%, var(--bg) 55%) fixed;
  color: var(--txt);
  overflow: hidden;
}
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 10, 22, .8); backdrop-filter: blur(8px);
}
.auth-card, .board-card {
  width: 360px; padding: 32px 30px; text-align: center;
  background: linear-gradient(165deg, #122a4e, #0a1730);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}
.auth-logo { line-height: 0; margin-bottom: 6px; animation: bob 2.4s ease-in-out infinite; transform-origin: center; }
.duck-lg { width: 78px; height: 75px; display: inline-block; filter: drop-shadow(0 4px 10px rgba(255,201,60,.25)); }
.duck-sm { width: 26px; height: 25px; vertical-align: -7px; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(6deg); } }
.auth-card h1 { font-size: 26px; margin: 6px 0 4px; }
.auth-card h1 span { color: var(--cyan); font-size: 18px; font-weight: 500; }
.auth-sub { color: var(--dim); font-size: 12px; margin-bottom: 18px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab {
  flex: 1; padding: 8px 0; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--dim); font-size: 14px; cursor: pointer;
}
.tab.active { background: rgba(54, 226, 255, .12); color: var(--cyan); border-color: rgba(54, 226, 255, .4); }
.auth-card input {
  width: 100%; margin-bottom: 10px; padding: 11px 14px; font-size: 14px;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(8, 16, 32, .8); color: var(--txt); outline: none;
}
.auth-card input:focus { border-color: var(--cyan); }
.auth-error { min-height: 18px; color: var(--red); font-size: 12px; margin-bottom: 6px; }
.btn-primary {
  width: 100%; padding: 12px 0; font-size: 15px; font-weight: 700; cursor: pointer;
  border: none; border-radius: 12px; color: #04263a;
  background: linear-gradient(90deg, var(--cyan), #4dffc3);
  transition: transform .1s;
}
.btn-primary:active { transform: scale(.97); }
.auth-hint { margin-top: 14px; color: var(--dim); font-size: 12px; }
.auth-hint b { color: var(--gold); }
.auth-disclaimer { margin-top: 10px; color: rgba(126,149,184,.7); font-size: 10px; line-height: 1.5; }

/* ---------- 布局 ---------- */
.game { display: flex; flex-direction: column; height: 100vh; }
header {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 18px; border-bottom: 1px solid var(--line);
  background: rgba(8, 16, 32, .65); backdrop-filter: blur(6px);
  position: relative; z-index: 200; /* 抬高层级，确保任何浮层都盖不住右上角按钮 */
}
.brand { font-size: 18px; }
.brand-en { color: var(--dim); font-size: 12px; margin-left: 6px; }
.price-box { display: flex; align-items: baseline; gap: 10px; }
.price-box .sym { color: var(--dim); font-size: 12px; }
.price { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--cyan); }
.badge { font-size: 10px; padding: 3px 8px; border-radius: 99px; font-weight: 700; }
.badge.live { background: rgba(61, 240, 140, .15); color: var(--green); }
.badge.sim { background: rgba(255, 211, 77, .15); color: var(--gold); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; font-size: 16px; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(20, 40, 70, .6); color: var(--txt);
}
.icon-btn:hover { border-color: var(--cyan); }
.user-chip {
  padding: 6px 12px; border-radius: 10px; font-size: 13px;
  background: rgba(20, 40, 70, .6); border: 1px solid var(--line);
}
.user-chip span { color: var(--dim); font-size: 11px; }

main { flex: 1; display: flex; min-height: 0; }
.canvas-wrap {
  flex: 1; position: relative;
  background:
    radial-gradient(900px 480px at 28% 18%, rgba(36, 90, 160, .14), transparent 70%),
    radial-gradient(700px 420px at 78% 85%, rgba(28, 60, 120, .10), transparent 70%);
}
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }

.toast { /* 挂 body 顶层:z-index 高于一切浮层(转轮弹窗 60 开着时,其他注单的结算提示也要可见) */
  position: fixed; top: 62px; left: 50%; transform: translateX(-50%);
  padding: 10px 22px; border-radius: 12px; font-size: 14px; font-weight: 700;
  background: rgba(10, 20, 40, .92); border: 1px solid var(--line);
  pointer-events: none; z-index: 70;
}

/* ---------- 侧栏 ---------- */
.panel {
  width: 280px; padding: 14px; display: flex; flex-direction: column; gap: 12px;
  border-left: 1px solid var(--line); background: rgba(8, 16, 32, .55);
  overflow-y: auto;
}
.balance-card, .bet-card, .hist-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px;
}
.label { font-size: 12px; color: var(--dim); margin-bottom: 8px; }
.label .sub { font-size: 11px; }
.balance { font-size: 30px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.balance.flash-up { animation: flashUp .6s; }
.balance.flash-down { animation: flashDown .6s; }
@keyframes flashUp { 30% { color: var(--green); transform: scale(1.08); } }
@keyframes flashDown { 30% { color: var(--red); } }

.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chips button {
  padding: 9px 0; font-size: 14px; font-weight: 700; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(8, 16, 32, .7); color: var(--txt);
}
.chips button.active {
  background: linear-gradient(135deg, rgba(54, 226, 255, .25), rgba(77, 255, 195, .2));
  border-color: var(--cyan); color: var(--cyan);
}
.tip { margin-top: 10px; font-size: 11px; color: var(--dim); line-height: 1.5; }

.hist-card { flex: 1; min-height: 120px; display: flex; flex-direction: column; }
.history { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.history .empty { color: var(--dim); font-size: 12px; text-align: center; padding: 20px 0; }
.hist-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px; border-radius: 9px; font-size: 12px;
  background: rgba(8, 16, 32, .6); border-left: 3px solid var(--dim);
}
.hist-item.win { border-left-color: var(--green); }
.hist-item.lose { border-left-color: var(--red); }
.hist-item .m { color: var(--dim); }
.hist-item .amt.win { color: var(--green); font-weight: 700; }
.hist-item .amt.lose { color: var(--red); font-weight: 700; }

.house-card {
  font-size: 11px; color: var(--dim); text-align: center;
  padding: 10px; border-radius: 12px; border: 1px dashed var(--line);
}
.house-card b { color: var(--gold); }

/* ---------- 排行榜 ---------- */
.board-card { width: 420px; }
.board-card h2 { margin-bottom: 16px; }
#boardTable { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 13px; }
#boardTable th { color: var(--dim); font-weight: 500; font-size: 11px; padding: 6px; }
#boardTable td { padding: 7px 6px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
#boardTable tr td:nth-child(4) { color: var(--gold); font-weight: 700; }

/* ---------- 积分流水 ---------- */
.ledger-card { width: 460px; max-width: 92vw; }
.ledger-scroll { max-height: 52vh; overflow-y: auto; margin-bottom: 16px; }
#ledgerTable { width: 100%; border-collapse: collapse; font-size: 12px; }
#ledgerTable th { color: var(--dim); font-weight: 500; font-size: 11px; padding: 6px 8px; text-align: left; position: sticky; top: 0; background: #0d1f3c; }
#ledgerTable td { padding: 6px 8px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
#ledgerTable td:last-child { color: var(--gold); font-weight: 700; }
#ledgerTable .empty { color: var(--dim); text-align: center; padding: 20px 0; }
.led-delta.pos { color: var(--green); font-weight: 700; }
.led-delta.neg { color: var(--red); font-weight: 700; }
.led-delta.zero { color: var(--dim); }

@media (max-width: 820px) {
  header { gap: 8px; padding: 8px 12px; }
  .brand-en { display: none; }       /* 窄屏给 4 个图标按钮腾地方 */
  .price { font-size: 18px; }
  .header-right { gap: 6px; }
  .icon-btn { width: 32px; height: 32px; font-size: 15px; }
  main { flex-direction: column; }
  .panel { width: 100%; flex-direction: row; flex-wrap: wrap; border-left: none; border-top: 1px solid var(--line); }
  .balance-card, .bet-card { flex: 1; min-width: 160px; }
  .hist-card { width: 100%; max-height: 160px; }
  .house-card { width: 100%; }
}

/* ================= 幸运三连（连胜奖励小游戏,海洋玩具机弹窗） =================
   全部 sp- 前缀,与现有规则零交集;待机/中奖共用同一结构,仅靠 #spinMachine.win 切换 */
.spin-btn { position: relative; animation: spPulse 1.8s ease-in-out infinite; border-color: rgba(255, 211, 77, .55) !important; }
.spin-btn::after { content: ""; position: absolute; right: -2px; top: -2px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--red, #ff5d7a); box-shadow: 0 0 6px rgba(255, 93, 122, .8); }
@keyframes spPulse { 0%, 100% { box-shadow: 0 0 4px rgba(255, 211, 77, .25); } 50% { box-shadow: 0 0 16px rgba(255, 211, 77, .75); } }

#spinOverlay { z-index: 60; }
.sp-machine { position: relative; width: 350px; max-width: 94vw; margin: 0; }
.sp-floaty { animation: spFloaty 5.2s ease-in-out infinite; }
@keyframes spFloaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.sp-mascot { position: relative; z-index: 5; display: flex; justify-content: center; margin-bottom: -26px; }
.sp-mascot svg { width: 104px; height: 100px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.45)); animation: spBob 3.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes spBob { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-6px); } }
#spinMachine.win .sp-mascot svg { filter: drop-shadow(0 10px 16px rgba(0,0,0,.45)) drop-shadow(0 0 18px rgba(255,211,77,.65)); }

.sp-shell { position: relative; z-index: 3; border-radius: 52px 52px 30px 30px;
  background: linear-gradient(180deg, #131f36, #0e1830); border: 1px solid rgba(120,180,255,.25);
  padding: 0 20px 16px; box-shadow: 0 24px 50px rgba(0,0,0,.55), inset 0 1px 0 rgba(219,233,255,.08); }
#spinMachine.win .sp-shell { border-color: rgba(255,211,77,.55); animation: spGoldShell 1.9s ease-in-out infinite; }
@keyframes spGoldShell {
  0%, 100% { box-shadow: 0 24px 50px rgba(0,0,0,.55), 0 0 26px rgba(255,211,77,.30), 0 0 64px rgba(255,211,77,.16); }
  50% { box-shadow: 0 24px 50px rgba(0,0,0,.55), 0 0 44px rgba(255,211,77,.55), 0 0 110px rgba(255,211,77,.30); } }
.sp-cap { height: 38px; margin: 0 -20px 12px; border-radius: 52px 52px 0 0;
  background: linear-gradient(180deg, #37d6f3, #1593b8 78%, #0f7da0); border-bottom: 2px solid rgba(4,18,30,.55); position: relative; overflow: hidden; }
.sp-cap::before { content: ""; position: absolute; left: 14%; top: 6px; width: 34%; height: 8px; border-radius: 8px; background: rgba(255,255,255,.34); }
#spinMachine.win .sp-cap { background: linear-gradient(180deg, #ffe184, #f2a93b 80%, #d98f1f); }

.sp-sign { position: relative; text-align: center; border-radius: 16px; background: linear-gradient(180deg, #0d182c, #101d34);
  border: 1px solid rgba(120,180,255,.25); padding: 11px 10px 9px; box-shadow: inset 0 0 18px rgba(0,0,0,.45), 0 0 14px rgba(54,226,255,.10); }
.sp-sign h2 { font-size: 22px; font-weight: 800; letter-spacing: 8px; text-indent: 8px; margin: 0;
  background: linear-gradient(180deg, #fff3c4, #ffd34d 55%, #f0a32a);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 9px rgba(255,211,77,.45)); }
.sp-sign p { margin: 3px 0 0; font-size: 10px; letter-spacing: 5px; text-indent: 5px; color: var(--cyan, #36e2ff); opacity: .85; }
.sp-bulbs { display: flex; justify-content: center; gap: 12px; margin-bottom: 7px; }
.sp-bulbs i { width: 6px; height: 6px; border-radius: 50%; background: #36e2ff; box-shadow: 0 0 8px #36e2ff; animation: spBlink 1.6s ease-in-out infinite; }
.sp-bulbs i:nth-child(2n) { background: #ffd34d; box-shadow: 0 0 8px #ffd34d; animation-delay: .8s; }
.sp-bulbs i:nth-child(3n) { animation-delay: .4s; }
.sp-bulbs i:nth-child(5n) { animation-delay: 1.2s; }
@keyframes spBlink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
#spinMachine.win .sp-bulbs i { background: #ffd34d; box-shadow: 0 0 10px #ffd34d; animation-duration: .7s; }

.sp-goggle { position: relative; margin: 16px 0 0; height: 104px; }
.sp-strap { position: absolute; left: -20px; right: -20px; top: 50%; height: 26px; transform: translateY(-50%); border-radius: 13px;
  background: linear-gradient(180deg, #23bce0, #0d7ea0); box-shadow: inset 0 -4px 0 rgba(0,0,0,.28), inset 0 2px 0 rgba(255,255,255,.22); }
.sp-lenses { position: relative; display: flex; justify-content: center; align-items: center; height: 100%; }
.sp-bridge { width: 18px; height: 10px; border-radius: 5px; background: linear-gradient(180deg, #ffe793, #f2b32e); box-shadow: 0 2px 3px rgba(0,0,0,.35); z-index: 2; }
.sp-lens { position: relative; z-index: 2; width: 92px; height: 92px; border-radius: 50%; border: 6px solid #ffd34d;
  background: radial-gradient(circle at 34% 28%, #21345a, #0b1526 72%);
  box-shadow: inset 0 0 16px rgba(0,0,0,.65), 0 0 14px rgba(54,226,255,.22), 0 4px 8px rgba(0,0,0,.4); overflow: hidden; }
.sp-lens::after { content: ""; position: absolute; top: 9px; left: 13px; width: 27px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.20); transform: rotate(-26deg); pointer-events: none; z-index: 3; }
.sp-strip { position: absolute; left: 0; top: 0; width: 100%; will-change: transform; }
.sp-strip .sp-cell { width: 80px; height: 80px; display: grid; place-items: center; }
.sp-strip .sp-cell svg { width: 56px; height: 56px; }
#spinMachine.win .sp-lens { border-color: #ffe793; animation: spLensGold 1.5s ease-in-out infinite; }
#spinMachine.win .sp-lens:nth-of-type(2) { animation-delay: .18s; }
#spinMachine.win .sp-lens:nth-of-type(3) { animation-delay: .36s; }
@keyframes spLensGold {
  0%, 100% { box-shadow: inset 0 0 16px rgba(0,0,0,.6), 0 0 12px rgba(255,211,77,.45); }
  50% { box-shadow: inset 0 0 16px rgba(0,0,0,.6), 0 0 30px rgba(255,211,77,.9), 0 0 56px rgba(255,211,77,.4); } }

.sp-rays { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; z-index: 0; border-radius: 50%;
  transform: translate(-50%,-50%); display: none;
  background: radial-gradient(closest-side, rgba(255,211,77,.30), rgba(255,211,77,.10) 52%, transparent 72%),
    repeating-conic-gradient(rgba(255,211,77,.16) 0 9deg, transparent 9deg 26deg);
  -webkit-mask: radial-gradient(closest-side, #000 0 70%, transparent 72%);
  mask: radial-gradient(closest-side, #000 0 70%, transparent 72%);
  animation: spRays 13s linear infinite; }
#spinMachine.win .sp-rays { display: block; }
@keyframes spRays { to { transform: translate(-50%,-50%) rotate(360deg); } }

.sp-banner { position: absolute; left: 4px; right: 4px; bottom: -30px; z-index: 6; text-align: center; padding: 10px 8px 9px; border-radius: 14px;
  background: linear-gradient(180deg, #ffe9a3, #ffc83e 60%, #f2a32a); border: 1px solid rgba(255,243,196,.9);
  /* 不用 rotate/scale 动画:小字号文本在变换下亚像素渲染会持续发糊;只做辉光脉冲,文字始终像素对齐 */
  animation: spBannerGlow 1.4s ease-in-out infinite; }
@keyframes spBannerGlow {
  0%, 100% { box-shadow: 0 0 18px rgba(255,211,77,.45), 0 8px 18px rgba(0,0,0,.4); }
  50% { box-shadow: 0 0 44px rgba(255,211,77,.85), 0 8px 18px rgba(0,0,0,.4); } }
.sp-banner b { display: block; font: 800 28px/1.05 ui-monospace, SFMono-Regular, Menlo, monospace; color: #5a3a00; text-shadow: 0 1px 0 rgba(255,255,255,.55); }
.sp-banner span { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; letter-spacing: 1.5px; color: #6b4a00; }
.sp-banner.consolation { background: linear-gradient(180deg, #d8f4ff, #9adcf0 60%, #5fb6d4); border-color: rgba(216,244,255,.9); }
.sp-banner.consolation b { color: #093a4e; }
.sp-banner.consolation span { color: #0e4459; }

.sp-panel { margin-top: 26px; padding: 13px 14px 11px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(10,19,34,.85), rgba(10,19,34,.5)); border: 1px solid rgba(120,180,255,.18);
  text-align: center; position: relative; }
.sp-screw { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #22324f; box-shadow: inset 0 1px 1px rgba(0,0,0,.7), 0 1px 0 rgba(219,233,255,.12); }
.sp-screw.tl { left: 10px; top: 10px; } .sp-screw.tr { right: 10px; top: 10px; }
.sp-coinslot { position: absolute; right: 18px; top: 50%; transform: translateY(-64%); width: 6px; height: 26px; border-radius: 4px;
  background: #060d1a; box-shadow: inset 0 0 5px #000, 0 0 0 2px #22324f; }
.sp-btn { display: inline-block; min-width: 180px; padding: 12px 26px; border-radius: 999px; border: none; cursor: pointer;
  font-size: 18px; font-weight: 800; letter-spacing: 11px; text-indent: 11px; color: #04293a; font-family: inherit;
  background: linear-gradient(180deg, #8df0ff, #36e2ff 48%, #15b6dd);
  box-shadow: 0 5px 0 #0d7ea0, 0 0 22px rgba(54,226,255,.5); animation: spBreath 2s ease-in-out infinite; user-select: none; }
.sp-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #0d7ea0, 0 0 22px rgba(54,226,255,.5); }
.sp-btn:disabled { filter: grayscale(.45) brightness(.8); cursor: default; animation: none; }
@keyframes spBreath { 0%, 100% { box-shadow: 0 5px 0 #0d7ea0, 0 0 16px rgba(54,226,255,.4); } 50% { box-shadow: 0 5px 0 #0d7ea0, 0 0 38px rgba(54,226,255,.85); } }
.sp-later { margin-top: 9px; font-size: 12px; color: #7e95b8; letter-spacing: 2px; cursor: pointer; }
.sp-later u { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(126,149,184,.5); }

.sp-paytable { margin-top: 11px; display: flex; justify-content: center; gap: 8px; padding: 7px 9px; border-radius: 11px;
  background: rgba(10,19,34,.6); border: 1px solid rgba(120,180,255,.15); }
.sp-pt { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #93a9c8; letter-spacing: .5px; white-space: nowrap; }
.sp-pt svg { width: 17px; height: 17px; }
.sp-pt em { font-style: normal; font: 600 12px ui-monospace, Menlo, monospace; }
.sp-pt b { font: 700 13.5px ui-monospace, Menlo, monospace; color: #ffd34d; }
.sp-pt + .sp-pt { border-left: 1px solid rgba(120,180,255,.14); padding-left: 8px; }
.sp-baseline { margin-top: 8px; text-align: center; font-size: 12px; color: #93a9c8; letter-spacing: .5px; line-height: 1.5; }
.sp-baseline b { color: #ffd34d; font-family: ui-monospace, Menlo, monospace; }

.sp-base { position: relative; z-index: 2; margin: -14px -12px 0; height: 66px; }
.sp-water { position: absolute; inset: 13px 0 0; border-radius: 24px;
  background: linear-gradient(180deg, rgba(54,226,255,.30), rgba(16,52,84,.92) 55%, #0c2238);
  border: 1px solid rgba(54,226,255,.35); box-shadow: 0 14px 30px rgba(0,0,0,.5), inset 0 2px 0 rgba(126,236,255,.3); overflow: hidden; }
.sp-water::after { content: ""; position: absolute; left: 8%; top: 8px; width: 42%; height: 6px; border-radius: 6px;
  background: rgba(126,236,255,.4); filter: blur(1px); animation: spShimmer 3.6s ease-in-out infinite; }
@keyframes spShimmer { 0%, 100% { opacity: .35; transform: translateX(0); } 50% { opacity: .8; transform: translateX(26px); } }
.sp-w { position: absolute; z-index: 3; width: 52px; height: 52px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.4)); }
.sp-w.w1 { left: -8px; top: -11px; }
.sp-w.w2 { right: -6px; top: -5px; width: 43px; height: 43px; transform: scaleX(-1); }
.sp-w.w3 { left: 50%; top: 2px; width: 36px; height: 36px; transform: translateX(-50%); }

.sp-bubs span { position: absolute; bottom: 44px; border-radius: 50%; z-index: 1;
  border: 1.5px solid rgba(126,236,255,.65);
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.35), rgba(54,226,255,.06)); animation: spRise 4.6s ease-in infinite; }
@keyframes spRise { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: .9; } 70% { opacity: .7; } 100% { transform: translateY(-150px) translateX(8px); opacity: 0; } }
.sp-bubs span:nth-child(1) { left: -18px; width: 12px; height: 12px; animation-delay: 0s; }
.sp-bubs span:nth-child(2) { left: -8px; width: 7px; height: 7px; animation-delay: 1.4s; }
.sp-bubs span:nth-child(3) { left: -24px; width: 6px; height: 6px; animation-delay: 2.6s; }
.sp-bubs span:nth-child(4) { right: -16px; width: 11px; height: 11px; animation-delay: .9s; }
.sp-bubs span:nth-child(5) { right: -7px; width: 6px; height: 6px; animation-delay: 2.1s; }
.sp-bubs span:nth-child(6) { right: -24px; width: 8px; height: 8px; animation-delay: 3.3s; }
#spinMachine.win .sp-bubs span { border-color: rgba(255,211,77,.7); background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.4), rgba(255,211,77,.08)); }

.sp-confetti { display: none; }
#spinMachine.win .sp-confetti { display: block; }
.sp-confetti i { position: absolute; border-radius: 50%; z-index: 7; animation: spSpark 1.3s ease-in-out infinite; }
.sp-confetti i:nth-child(3n) { border-radius: 2px; transform: rotate(35deg); }
.sp-confetti i:nth-child(1) { left: 6px; top: 108px; width: 8px; height: 8px; background: #ffd34d; animation-delay: 0s; }
.sp-confetti i:nth-child(2) { right: 10px; top: 95px; width: 6px; height: 6px; background: #36e2ff; animation-delay: .3s; }
.sp-confetti i:nth-child(3) { left: 28px; top: 188px; width: 7px; height: 7px; background: #ff5d7a; animation-delay: .55s; }
.sp-confetti i:nth-child(4) { right: 24px; top: 208px; width: 8px; height: 8px; background: #3df08c; animation-delay: .15s; }
.sp-confetti i:nth-child(5) { left: -12px; top: 274px; width: 6px; height: 6px; background: #ffd34d; animation-delay: .7s; }
.sp-confetti i:nth-child(6) { right: -14px; top: 288px; width: 7px; height: 7px; background: #36e2ff; animation-delay: .95s; }
.sp-confetti i:nth-child(7) { left: 58px; top: 68px; width: 5px; height: 5px; background: #3df08c; animation-delay: .45s; }
.sp-confetti i:nth-child(8) { right: 60px; top: 58px; width: 6px; height: 6px; background: #ff5d7a; animation-delay: .8s; }
.sp-confetti i:nth-child(9) { left: -18px; top: 157px; width: 7px; height: 7px; background: #36e2ff; animation-delay: 1.05s; }
.sp-confetti i:nth-child(10) { right: -20px; top: 170px; width: 8px; height: 8px; background: #ffd34d; animation-delay: .25s; }
.sp-confetti i:nth-child(11) { left: 110px; top: 42px; width: 5px; height: 5px; background: #ffd34d; animation-delay: .6s; }
.sp-confetti i:nth-child(12) { right: 112px; top: 36px; width: 5px; height: 5px; background: #3df08c; animation-delay: 1.1s; }
@keyframes spSpark { 0%, 100% { opacity: .15; transform: scale(.5); } 50% { opacity: 1; transform: scale(1.15); } }

/* 矮视口(手机横屏/小窗):弹窗可滚动,绝不裁切赔率表/按钮(仅作用于本弹窗,不动共享 .overlay)。
   不用 transform 缩放:transform 不改布局占位,会留下"幽灵滚动空间",纯滚动最干净 */
#spinOverlay { overflow-y: auto; padding: 16px 0; }
#spinOverlay .sp-machine { margin: auto; }
.sp-btn.gold { color: #5a3a00; background: linear-gradient(180deg, #fff0b3, #ffd34d 48%, #f0a32a);
  box-shadow: 0 5px 0 #b97a14, 0 0 22px rgba(255,211,77,.55); animation: spBreathGold 1.6s ease-in-out infinite; }
@keyframes spBreathGold { 0%, 100% { box-shadow: 0 5px 0 #b97a14, 0 0 16px rgba(255,211,77,.45); } 50% { box-shadow: 0 5px 0 #b97a14, 0 0 42px rgba(255,211,77,.9); } }

/* —— 幸运三连·第二轮体验修订 —— */
/* 连胜进度徽章(余额卡内):让奖励"攒起来"可见,差一步时金色脉冲 */
.streak-badge { margin-top: 6px; display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 1px; color: #ffd34d;
  background: rgba(255, 211, 77, .10); border: 1px solid rgba(255, 211, 77, .35); }
.streak-badge.hot { animation: spPulse 1.4s ease-in-out infinite; }
/* 揭晓横幅落位:镜窗与操作区之间的独立条带,不再遮三连图案(中奖/安慰奖同享) */
.sp-banner { bottom: -58px; }
#spinMachine.revealed .sp-panel { margin-top: 66px; }
/* 安慰奖横幅:蓝底配金色辉光观感矛盾 → 柔和静态阴影 */
.sp-banner.consolation { animation: none; box-shadow: 0 8px 18px rgba(0,0,0,.4), 0 0 14px rgba(126,236,255,.25); }
/* 手机竖屏 header 放不下 6 个按钮:藏交易对副标与用户 chip、收紧间距,允许换行兜底 */
@media (max-width: 560px) {
  header { flex-wrap: wrap; row-gap: 4px; }
  .price-box .sym { display: none; }
  .user-chip { display: none; }
  .header-right { gap: 4px; }
}
/* 尊重系统"减弱动态效果"(juice.md 既定规矩):关掉装饰性无限动画,保留红点/金边等静态提示 */
@media (prefers-reduced-motion: reduce) {
  .spin-btn, .sp-floaty, .sp-mascot svg, .sp-banner, .sp-rays, .sp-confetti i, .sp-bubs span,
  .sp-btn, .sp-bulbs i, .sp-water::after, .streak-badge.hot, #spinMachine.win .sp-shell,
  #spinMachine.win .sp-lens { animation: none !important; }
}

/* —— 幸运三连·三连胜通知对话框(屏幕中央,替代角落 toast) —— */
#awardOverlay { z-index: 58; } /* 在常规浮层之上、转轮弹窗(60)之下 */
.award-card { position: relative; width: 340px; max-width: 92vw; padding: 30px 26px 22px; text-align: center;
  background: linear-gradient(165deg, #1a2c50, #0d1b36);
  border: 1px solid rgba(255, 211, 77, .55); border-radius: 22px;
  box-shadow: 0 0 40px rgba(255, 211, 77, .35), 0 0 110px rgba(255, 211, 77, .15), 0 24px 60px rgba(0,0,0,.6);
  animation: awardPop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes awardPop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.award-duck svg { width: 92px; height: 88px; filter: drop-shadow(0 0 18px rgba(255, 211, 77, .6));
  animation: spBob 3.4s ease-in-out infinite; transform-origin: 50% 90%; }
.award-card h2 { margin: 8px 0 0; font-size: 28px; font-weight: 800; letter-spacing: 4px;
  background: linear-gradient(180deg, #fff3c4, #ffd34d 55%, #f0a32a);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 211, 77, .45)); }
.award-sub { margin: 10px 0 0; font-size: 16px; color: #dbe9ff; letter-spacing: 1px; }
.award-sub b { color: #ffd34d; }
.award-hint { margin: 8px 0 0; font-size: 13px; color: #93a9c8; }
.award-hint b { color: #ffd34d; font-family: ui-monospace, Menlo, monospace; }
.award-go { margin-top: 18px; width: 100%; font-size: 18px; font-weight: 800; letter-spacing: 6px; text-indent: 6px;
  padding: 14px 0; border-radius: 999px; color: #4a3000;
  background: linear-gradient(180deg, #fff0b3, #ffd34d 48%, #f0a32a) !important;
  box-shadow: 0 5px 0 #b97a14, 0 0 26px rgba(255, 211, 77, .5);
  animation: spBreathGold 1.6s ease-in-out infinite; }
.award-go:active { transform: translateY(3px); box-shadow: 0 2px 0 #b97a14, 0 0 26px rgba(255, 211, 77, .5); }
.award-later { margin-top: 12px; font-size: 12.5px; color: #7e95b8; letter-spacing: 1px; cursor: pointer; }
.award-later u { text-decoration-color: rgba(126, 149, 184, .5); text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .award-card, .award-duck svg, .award-go { animation: none !important; } }

/* —— 连线 COMBO 揭奖动效(非模态,pointer-events:none 不挡下注) —— */
.combo-fx { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center;
  pointer-events: none; background: radial-gradient(ellipse at center, rgba(255,211,77,.10), transparent 60%); }
.combo-box { position: relative; text-align: center; animation: comboPunch .5s cubic-bezier(.15,1.6,.35,1); }
@keyframes comboPunch { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.combo-fx.out .combo-box { animation: comboOut .45s ease forwards; }
@keyframes comboOut { to { transform: scale(.85) translateY(-26px); opacity: 0; } }
.combo-rays { position: absolute; left: 50%; top: 50%; width: 560px; height: 560px; border-radius: 50%;
  transform: translate(-50%,-50%); z-index: -1;
  background: radial-gradient(closest-side, rgba(255,211,77,.35), rgba(255,211,77,.08) 55%, transparent 72%),
    repeating-conic-gradient(rgba(255,211,77,.20) 0 8deg, transparent 8deg 24deg);
  -webkit-mask: radial-gradient(closest-side, #000 0 70%, transparent 72%);
  mask: radial-gradient(closest-side, #000 0 70%, transparent 72%);
  animation: spRays 10s linear infinite; }
.combo-title { font-size: 44px; font-weight: 900; letter-spacing: 6px;
  background: linear-gradient(180deg, #fff7d6, #ffd34d 50%, #ef9d20);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(255,211,77,.65)) drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.combo-kind { margin-top: 8px; font-size: 16px; font-weight: 700; letter-spacing: 4px; color: #36e2ff;
  text-shadow: 0 0 12px rgba(54,226,255,.6); }
.combo-amount { margin-top: 14px; font: 800 58px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #ffd34d;
  text-shadow: 0 0 24px rgba(255,211,77,.75), 0 4px 12px rgba(0,0,0,.55); }
.combo-amount span { font-variant-numeric: tabular-nums; }
.combo-decay { margin-top: 10px; min-height: 1.2em; font-size: 13px; font-weight: 600; letter-spacing: 1px;
  color: rgba(255,247,214,.78); text-shadow: 0 2px 8px rgba(0,0,0,.5); } /* 递减明示行,空时只占位不显内容 */
.combo-coins b { position: absolute; left: 50%; top: 55%; font-size: 26px; opacity: 0;
  animation: coinFly 1.5s ease-out forwards; }
@keyframes coinFly {
  0% { transform: translate(-50%,-50%) scale(.4); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -160px))) scale(1) rotate(var(--rot, 360deg)); opacity: 0; } }
.combo-coins b:nth-child(1)  { --dx: -190px; --dy: -120px; --rot: 320deg; animation-delay: .10s; }
.combo-coins b:nth-child(2)  { --dx: 180px;  --dy: -150px; --rot: -300deg; animation-delay: .16s; }
.combo-coins b:nth-child(3)  { --dx: -120px; --dy: -210px; --rot: 280deg; animation-delay: .22s; }
.combo-coins b:nth-child(4)  { --dx: 140px;  --dy: -90px;  --rot: -340deg; animation-delay: .28s; }
.combo-coins b:nth-child(5)  { --dx: -240px; --dy: -30px;  --rot: 260deg; animation-delay: .34s; }
.combo-coins b:nth-child(6)  { --dx: 230px;  --dy: -40px;  --rot: -280deg; animation-delay: .40s; }
.combo-coins b:nth-child(7)  { --dx: -70px;  --dy: -250px; --rot: 300deg; animation-delay: .46s; }
.combo-coins b:nth-child(8)  { --dx: 90px;   --dy: -230px; --rot: -320deg; animation-delay: .52s; }
.combo-coins b:nth-child(9)  { --dx: -160px; --dy: -180px; --rot: 340deg; animation-delay: .58s; }
.combo-coins b:nth-child(10) { --dx: 200px;  --dy: -200px; --rot: -260deg; animation-delay: .64s; }
@media (max-width: 560px) { .combo-title { font-size: 32px; } .combo-amount { font-size: 42px; } .combo-rays { width: 380px; height: 380px; } }
@media (prefers-reduced-motion: reduce) { .combo-box, .combo-rays, .combo-coins b { animation: none !important; } .combo-coins { display: none; } }
