:root { --bg: #0b0620; --c: #00e5ff; --m: #ff2bd6; --y: #ffd60a; --g: #22c55e; --r: #ff3d6b; --line: rgba(0,229,255,.25); --panel: rgba(14,8,40,.92);
  --mono: "JetBrains Mono", Consolas, "SF Mono", Menlo, monospace; --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: radial-gradient(800px 600px at 50% 0, #2a0f55, #07040f 70%); color: #e6f6ff; font-family: var(--sans); overflow: hidden; user-select: none; }
button { font-family: inherit; cursor: pointer; }
b { color: #fff; }
.hidden { display: none !important; }
.muted { color: #7f8fb0; }
#app { position: relative; height: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); box-shadow: 0 0 60px rgba(0,229,255,.12); }

/* 3D 区 */
#view { position: relative; flex: 1 1 52%; min-height: 260px; overflow: hidden; }
#view3d, #view3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.topbar { position: absolute; top: 0; left: 0; right: 0; height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; background: linear-gradient(rgba(5,2,15,.75), transparent); }
.brand, .logo { font-family: var(--mono); font-weight: 900; letter-spacing: 3px; font-size: 18px; }
.b1 { color: #fff; } .b2 { color: var(--c); text-shadow: 0 0 12px var(--c); margin-left: 4px; }
.tb-r { display: flex; gap: 8px; align-items: center; }
.pts { font-family: var(--mono); font-size: 14px; color: var(--y); padding: 5px 10px; border: 1px solid rgba(255,214,10,.4); background: rgba(0,0,0,.45); border-radius: 20px; }
.pts b { color: var(--y); }
.ibtn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.45); color: var(--c); font-size: 16px; }
.roundbar { position: absolute; top: 50px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; border-radius: 12px; background: rgba(5,2,15,.62); border: 1px solid var(--line); font-size: 13px; backdrop-filter: blur(4px); }
.roundbar b { font-family: var(--mono); color: var(--c); }
.ph { font-weight: 800; color: var(--g); }
.ph.race { color: var(--m); } .ph.result { color: var(--y); }
.cd { font-family: var(--mono); font-size: 18px; font-weight: 900; color: #fff; min-width: 42px; text-align: right; }
.cd.warn { color: var(--r); animation: blink .5s infinite alternate; }
@keyframes blink { to { opacity: .45; } }
.live { position: absolute; top: 92px; left: 10px; right: 10px; display: flex; gap: 4px; justify-content: center; }
.chip { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 900; font-size: 14px; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 0 8px rgba(0,0,0,.6); transition: transform .25s; }
.chip.sm { width: 22px; height: 22px; font-size: 11px; border-width: 1.5px; }
.chip.dark { color: #111; }
.live .chip.focus { transform: scale(1.18); box-shadow: 0 0 12px #fff; }
.big { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) scale(.8); font-size: 34px; font-weight: 900; letter-spacing: 2px; opacity: 0; transition: .25s; text-shadow: 0 0 20px var(--c), 0 2px 6px #000; white-space: nowrap; pointer-events: none; text-align: center; }
.big.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.big.go { color: var(--y); font-family: var(--mono); font-size: 54px; text-shadow: 0 0 24px var(--y); }
.hash { position: absolute; left: 10px; bottom: 30px; font-family: var(--mono); font-size: 10px; color: rgba(200,230,255,.6); max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online { position: absolute; left: 10px; bottom: 10px; font-size: 11px; color: #a9c4dd; }
.online b { color: var(--g); font-family: var(--mono); }

/* 面板 */
#panel { position: relative; flex: 0 0 auto; background: var(--panel); border-top: 1px solid var(--line); padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
.hist { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.hist::-webkit-scrollbar { display: none; }
.hist-item { flex: none; display: flex; align-items: center; gap: 4px; font-size: 10px; color: #8fa6c4; padding: 3px 6px; background: rgba(255,255,255,.04); border-radius: 8px; }
.pos-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 4px 0 6px; }
.pt { padding: 7px 0; font-size: 13px; font-weight: 700; color: #a9bdd8; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; position: relative; }
.pt.on { color: #0b0620; background: var(--c); border-color: var(--c); box-shadow: 0 0 12px rgba(0,229,255,.5); }
.pt i { position: absolute; top: -5px; right: -3px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--m); color: #fff; font-size: 10px; font-style: normal; line-height: 16px; padding: 0 3px; }
.tip { font-size: 12px; color: #9fb4cf; text-align: center; margin-bottom: 6px; }
.tip b { color: var(--y); }
.boats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.bt { position: relative; height: 52px; border-radius: 12px; border: none; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--mono); font-size: 22px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 3px 10px rgba(0,0,0,.35); transition: transform .08s; }
.bt small { font-size: 9px; font-weight: 600; opacity: .85; font-family: var(--sans); }
.bt:active { transform: scale(.92); }
.bt.dark { color: #111; text-shadow: none; }
.bt i { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: #fff; color: #111; font-size: 12px; font-style: normal; line-height: 20px; padding: 0 4px; font-family: var(--mono); box-shadow: 0 0 8px rgba(255,255,255,.6); }
.bt.pop { animation: pop .25s; }
@keyframes pop { 50% { transform: scale(1.12); } }
.mybets { margin-top: 8px; padding: 7px 9px; border-radius: 10px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.06); }
.mb-h { display: flex; justify-content: space-between; font-size: 12px; color: #9fb4cf; }
.mb-h b { font-family: var(--mono); color: var(--y); }
.mb-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; max-height: 52px; overflow-y: auto; font-size: 11px; }
.bet-tag { display: flex; align-items: center; gap: 3px; padding: 2px 6px 2px 3px; border-radius: 10px; background: rgba(255,255,255,.07); }
.bet-tag.win { background: rgba(34,197,94,.3); outline: 1px solid var(--g); }
.bet-tag.lose { opacity: .45; }
.lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8,4,24,.78); backdrop-filter: blur(2px); text-align: center; }
.lock b { display: block; font-size: 20px; color: var(--m); text-shadow: 0 0 12px var(--m); }
.lock small { display: block; margin-top: 4px; color: #b8c8e0; font-size: 13px; }

/* 弹层 */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(4,2,12,.66); backdrop-filter: blur(3px); }
.card { width: 100%; max-width: 420px; max-height: 92vh; overflow-y: auto; background: linear-gradient(160deg, #1a0d3d, #0d0726); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 0 40px rgba(0,229,255,.15); animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(20px); opacity: 0; } }
.logo { font-size: 30px; text-align: center; }
.sub { text-align: center; color: #b8a8e0; letter-spacing: 3px; font-size: 13px; margin: 6px 0 18px; }
.card label { display: block; font-size: 12px; color: #8fb3cf; margin-bottom: 6px; font-family: var(--mono); }
.card input { width: 100%; padding: 13px; font-family: var(--mono); font-size: 14px; color: #fff; background: rgba(0,0,0,.45); border: 1px solid var(--line); border-radius: 10px; outline: none; margin-bottom: 12px; user-select: text; }
.card input:focus { border-color: var(--c); }
.btn { display: block; width: 100%; padding: 13px; font-size: 15px; font-weight: 800; border-radius: 12px; border: 1px solid var(--c); color: var(--c); background: transparent; }
.btn.primary { border: none; color: #0b0620; background: linear-gradient(90deg, #00e5ff, #b36bff); box-shadow: 0 0 18px rgba(0,229,255,.35); }
.btn + .btn { margin-top: 8px; }
.btn.ghost { border-color: rgba(255,255,255,.14); color: #d6e6f5; text-align: left; }
.err { color: var(--r); font-size: 13px; min-height: 18px; margin-top: 8px; }
.hint { list-style: none; margin-top: 12px; font-size: 12px; color: #9fb4cf; line-height: 1.9; }
.hint li::before { content: "▸ "; color: var(--c); }
.m-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 17px; }
.me-box { padding: 12px; border-radius: 12px; background: rgba(0,0,0,.25); margin-bottom: 12px; }
.me-addr { font-family: var(--mono); font-size: 12px; color: var(--c); word-break: break-all; margin-bottom: 10px; }
.me-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.me-grid b { display: block; font-family: var(--mono); color: var(--y); font-size: 17px; }
.me-grid small { font-size: 11px; color: #8fa6c4; }
.reset { margin-top: 10px; font-size: 12px; color: #c9a8e0; text-align: center; }
.reset b { font-family: var(--mono); color: var(--m); }
.tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.tab { flex: 1; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: #9fb4cf; }
.tab.active { background: rgba(0,229,255,.15); color: var(--c); border-color: var(--c); }
.rank-day { font-size: 11px; color: #8fa6c4; margin-bottom: 6px; display: flex; justify-content: space-between; }
.rank-day select { background: #120a2a; color: var(--c); border: 1px solid var(--line); font-size: 11px; }
.rank-list { max-height: 60vh; overflow-y: auto; }
.rr { display: grid; grid-template-columns: 30px 1fr 74px 44px; gap: 6px; align-items: center; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,.05); font-family: var(--mono); font-size: 12.5px; }
.rr .rk { color: var(--c); font-weight: 900; text-align: center; }
.rr:nth-child(1) .rk { color: var(--y); } .rr:nth-child(2) .rk { color: #cfe3f0; } .rr:nth-child(3) .rk { color: #e09a5a; }
.rr .p { color: var(--y); text-align: right; } .rr .w { color: #8fa6c4; text-align: right; }
.rr.me { background: rgba(0,229,255,.1); }
.hr { display: flex; align-items: center; gap: 4px; padding: 7px 2px; border-bottom: 1px solid rgba(255,255,255,.05); }
.hr .hid { width: 64px; font-family: var(--mono); font-size: 11px; color: #8fa6c4; }
.empty { text-align: center; color: #7f8fb0; padding: 30px 0; font-size: 13px; }
.rules p { font-size: 13.5px; line-height: 1.8; color: #c8d8ea; margin-bottom: 8px; }
.rules b { color: var(--y); }
.result-card { text-align: center; }
.res-h { font-size: 15px; color: #b8c8e0; margin-bottom: 10px; }
.res-h b { font-family: var(--mono); color: var(--c); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pod .chip { width: 46px; height: 46px; font-size: 22px; }
.pod.p1 .chip { width: 62px; height: 62px; font-size: 30px; box-shadow: 0 0 24px var(--y); }
.pod .bar { width: 62px; border-radius: 8px 8px 0 0; background: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.02)); display: flex; align-items: flex-start; justify-content: center; font-size: 12px; font-weight: 800; padding-top: 6px; }
.pod.p1 .bar { height: 64px; color: var(--y); } .pod.p2 .bar { height: 46px; } .pod.p3 .bar { height: 34px; }
.res-order { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.res-order span { display: flex; flex-direction: column; align-items: center; font-size: 9px; color: #8fa6c4; gap: 2px; }
.res-me { padding: 12px; border-radius: 12px; background: rgba(0,0,0,.3); margin-bottom: 12px; font-size: 14px; }
.res-me .big-n { font-family: var(--mono); font-size: 30px; font-weight: 900; display: block; margin: 4px 0; }
.res-me .pos { color: var(--g); } .res-me .neg { color: var(--r); }
.toast { position: fixed; top: 100px; left: 50%; transform: translate(-50%, -10px); z-index: 40; padding: 10px 18px; border-radius: 12px; background: rgba(10,5,30,.94); border: 1px solid var(--c); font-size: 14px; opacity: 0; transition: .2s; pointer-events: none; max-width: 86vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--r); color: #ffc0cc; }
.boot { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font-family: var(--mono); color: var(--c); letter-spacing: 3px; font-size: 12px; transition: opacity .4s; }
.boot.out { opacity: 0; pointer-events: none; }
.spin { width: 34px; height: 34px; border: 3px solid var(--c); border-right-color: transparent; border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (max-height: 700px) { .bt { height: 44px; font-size: 19px; } .pt { padding: 5px 0; font-size: 12px; } .mb-list { max-height: 34px; } }
.bet-tag { padding: 3px 8px; gap: 4px; }
.bet-tag .amt { font-family: var(--mono); color: var(--y); font-size: 11px; }
.bet-tag small { color: #9fb4cf; font-size: 10px; }
.bet-tag .won { color: var(--g); font-family: var(--mono); }

/* ===== 开奖：动态飞艇 ===== */
.podium { gap: 6px; min-height: 190px; }
.pod { animation: rise .6s cubic-bezier(.2,1.4,.4,1) both; }
.pod.p2 { animation-delay: .25s; } .pod.p3 { animation-delay: .4s; } .pod.p1 { animation-delay: .05s; }
@keyframes rise { from { transform: translateY(60px) scale(.6); opacity: 0; } }
.bicon { position: relative; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.bicon::before { content: ""; position: absolute; inset: 14% 8% 4%; border-radius: 50%; background: radial-gradient(circle, var(--bc) 0%, transparent 70%); opacity: .55; filter: blur(6px); animation: halo 1.6s ease-in-out infinite; }
.bicon img { position: relative; width: 100%; height: 100%; object-fit: contain; animation: bob 1.4s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
.bicon .bnum { position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 900 14px var(--mono); color: #fff; border: 2px solid #fff; box-shadow: 0 0 10px var(--bc); }
.bicon .bnum.dark { color: #111; }
.bicon.r1 { width: 132px; height: 132px; }
.bicon.r1 img { animation: bob 1.1s ease-in-out infinite, spin3d 4s ease-in-out infinite; }
.bicon.r1::before { opacity: .9; inset: 6%; }
.bicon.r1 .bnum { width: 32px; height: 32px; font-size: 17px; box-shadow: 0 0 18px #ffd60a; }
.bicon.r1::after { content: ""; position: absolute; inset: -10%; background: conic-gradient(from 0deg, transparent, rgba(255,214,10,.45), transparent 30%, transparent 50%, rgba(255,214,10,.35), transparent 80%); border-radius: 50%; animation: rays 3s linear infinite; z-index: -1; }
.bicon.sm { width: 44px; height: 44px; }
.bicon.sm .bnum { width: 18px; height: 18px; font-size: 10px; border-width: 1.5px; }
.bicon.noimg::before { display: none; }
@keyframes bob { 50% { transform: translateY(-7px) rotate(-3deg); } }
@keyframes spin3d { 0%, 100% { transform: translateY(0) scaleX(1); } 50% { transform: translateY(-9px) scaleX(-1); } }
@keyframes halo { 50% { opacity: .9; transform: scale(1.12); } }
@keyframes rays { to { transform: rotate(360deg); } }
.pod .bar { width: 84px; }
.pod.p1 .bar { width: 100px; background: linear-gradient(rgba(255,214,10,.35), rgba(255,214,10,.03)); }
.res-order { gap: 2px; }
.res-order .ro { animation: rise .45s ease-out both; display: flex; flex-direction: column; align-items: center; }
.res-order em { font-style: normal; font-size: 10px; color: #8fa6c4; margin-top: -4px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { top: 110%; transform: translateX(40px) rotate(720deg); } }

/* =====================================================================
   赛博 HUD 风格（覆盖上方旧样式）
   ===================================================================== */
:root { --chamfer: 10px; --glass: rgba(6, 12, 30, 0.72); --neon: #00e5ff; }
.cut { clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer)); }
/* 角标 */
.cn { position: absolute; width: 12px; height: 12px; border-color: var(--neon); border-style: solid; border-width: 0; pointer-events: none; filter: drop-shadow(0 0 4px var(--neon)); }
.cn.tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.cn.tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.cn.bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.cn.br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* ---------- 顶部合并 HUD ---------- */
.hud { position: absolute; top: 50px; left: 10px; right: 10px; padding: 7px 10px 8px; background: linear-gradient(180deg, rgba(4,14,34,.82), rgba(10,6,30,.72)); border: 1px solid rgba(0,229,255,.35); box-shadow: 0 0 18px rgba(0,229,255,.15), inset 0 0 24px rgba(0,229,255,.06); backdrop-filter: blur(5px); }
.hud::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--neon), transparent); animation: sweep 3s linear infinite; }
@keyframes sweep { 0% { opacity: .3; } 50% { opacity: 1; } 100% { opacity: .3; } }
.hud-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hud-id { font-family: var(--mono); font-size: 12px; color: #7fa8c8; letter-spacing: 1px; }
.hud-id small { font-size: 9px; letter-spacing: 2px; color: #4f7898; }
.hud-id b { font-size: 15px; color: var(--neon); text-shadow: 0 0 8px var(--neon); }
.ph { font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: 1px; padding: 2px 10px; border: 1px solid currentColor; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); background: rgba(34,197,94,.12); }
.ph.race { background: rgba(255,43,214,.14); } .ph.result { background: rgba(255,214,10,.14); }
.cd { font-size: 22px; text-shadow: 0 0 10px rgba(255,255,255,.6); }
.hud-row2 { margin-top: 6px; min-height: 26px; display: flex; align-items: center; }
.live { position: static; display: flex; gap: 3px; justify-content: space-between; width: 100%; }
.live .chip { width: 26px; height: 26px; font-size: 12px; border-width: 1.5px; }
.live .chip.focus { transform: scale(1.15); }
.betbar { position: relative; width: 100%; height: 22px; background: rgba(0,0,0,.45); border: 1px solid rgba(0,229,255,.3); overflow: hidden; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.betbar i { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(115deg, rgba(0,229,255,.55) 0 8px, rgba(0,229,255,.35) 8px 16px); box-shadow: 0 0 12px var(--neon); transition: width .2s linear; }
.betbar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #e8fbff; text-shadow: 0 1px 2px #000; }
.betbar.warn i { background: repeating-linear-gradient(115deg, rgba(255,61,107,.7) 0 8px, rgba(255,61,107,.45) 8px 16px); box-shadow: 0 0 12px var(--r); }
.betbar.warn span { color: #fff; animation: blink .4s infinite alternate; }

/* ---------- 底部下注面板 ---------- */
#panel { background:
    linear-gradient(180deg, rgba(8,16,40,.96), rgba(6,4,22,.98)),
    #070418;
  border-top: none; padding-top: 10px; overflow: hidden; }
#panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(0,229,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(0,229,255,.07) 1px, transparent 1px); background-size: 18px 18px; }
#panel::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent 0%, #ff2bd6 20%, #00e5ff 50%, #ff2bd6 80%, transparent 100%); box-shadow: 0 0 14px #00e5ff; }
#panel > * { position: relative; }
#panel .cn.tl, #panel .cn.tr { top: 6px; }
#panel .cn.tl { left: 4px; } #panel .cn.tr { right: 4px; }
.scanline { position: absolute !important; left: 0; right: 0; height: 40px; top: -40px; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(0,229,255,.06), transparent); animation: scan 4s linear infinite; }
@keyframes scan { to { top: 100%; } }
.hist-wrap { display: flex; align-items: center; gap: 6px; margin: 0 4px 4px; }
.hist-wrap .tag { flex: none; font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: #0b0620; background: var(--neon); padding: 2px 5px; clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.hist { padding-bottom: 0; }
.hist-item { font-family: var(--mono); background: rgba(0,229,255,.06); border: 1px solid rgba(0,229,255,.15); border-radius: 0; clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); padding: 2px 8px; }
.sec-h { display: flex; justify-content: space-between; align-items: center; margin: 6px 4px 5px; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: #4fd8f0; }
.sec-h .tip { font-family: var(--sans); font-size: 11px; color: #8fa8c4; margin: 0; letter-spacing: 0; }
.sec-h .tip b { color: var(--y); }

/* 名次切角按钮 */
.pos-tabs { gap: 5px; margin: 0 0 4px; }
.pt { height: 38px; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border-radius: 0; border: none; color: #9fc0dc; background: linear-gradient(180deg, rgba(0,229,255,.1), rgba(0,229,255,.03)); clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); box-shadow: inset 0 0 0 1px rgba(0,229,255,.25); transition: .15s; }
.pt span { font-size: 12.5px; font-weight: 800; line-height: 1.1; }
.pt small { font-family: var(--mono); font-size: 8px; letter-spacing: 1px; opacity: .55; }
.pt:hover { box-shadow: inset 0 0 0 1px rgba(0,229,255,.6); }
.pt.on { color: #04121c; background: linear-gradient(180deg, #5ff3ff, #00b8d9); box-shadow: 0 0 16px rgba(0,229,255,.7); }
.pt.on small { opacity: .8; }
.pt i { top: 2px; right: 4px; border-radius: 0; background: #ff2bd6; box-shadow: 0 0 8px #ff2bd6; clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%); font-family: var(--mono); }

/* 飞艇玻璃卡 */
.boats { gap: 6px; }
.bt { height: 62px; border-radius: 0; padding: 0; overflow: visible; color: #fff; background:
    radial-gradient(120% 90% at 50% 110%, color-mix(in srgb, var(--bc) 45%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.25));
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc) 70%, transparent), inset 0 -3px 0 var(--bc);
  transition: transform .08s, box-shadow .15s; }
.bt::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40%; background: linear-gradient(180deg, rgba(255,255,255,.12), transparent); pointer-events: none; }
.bt:hover { box-shadow: inset 0 0 0 1px var(--bc), inset 0 -3px 0 var(--bc), inset 0 0 20px color-mix(in srgb, var(--bc) 35%, transparent); }
.bt img { position: absolute; inset: 4px 2px 10px; width: calc(100% - 4px); height: calc(100% - 14px); object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.7)); transition: transform .2s; }
.bt:active img { transform: scale(.9); }
.bt .num { position: absolute; left: 4px; top: 3px; min-width: 20px; height: 20px; padding: 0 3px; display: flex; align-items: center; justify-content: center; font: 900 13px var(--mono); color: #fff; background: var(--bc); clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); box-shadow: 0 0 10px var(--bc); text-shadow: none; }
.bt .num.dark { color: #111; }
.bt.noimg .num { position: static; font-size: 22px; min-width: 40px; height: 34px; }
.bt i { top: auto; bottom: 5px; right: 3px; height: 16px; line-height: 16px; min-width: 0; padding: 0 5px; font-size: 10px; border-radius: 0; color: #04121c; background: var(--y); box-shadow: 0 0 10px rgba(255,214,10,.8); clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%); }
.bt.has { box-shadow: inset 0 0 0 2px var(--bc), inset 0 -3px 0 var(--bc), 0 0 0 rgba(0,0,0,0), inset 0 0 22px color-mix(in srgb, var(--bc) 40%, transparent); }
.bt.pop { animation: btpop .3s; }
@keyframes btpop { 40% { transform: scale(1.08); filter: brightness(1.6); } }

/* 终端注单 */
.mybets { margin-top: 8px; border-radius: 0; background: rgba(0,10,20,.65); border: 1px solid rgba(57,255,136,.25); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.mb-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .5px; color: #6fdc9d; }
.mb-h b { color: #b6ffd0; }
.led { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #39ff88; box-shadow: 0 0 6px #39ff88; animation: blink .8s infinite alternate; }
.mb-list { font-family: var(--mono); }
.mb-list .muted { color: #4f8a6a; }
.caret { font-style: normal; animation: blink .5s infinite alternate; }
.bet-tag { border-radius: 0; background: rgba(57,255,136,.08); border: 1px solid rgba(57,255,136,.2); clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); color: #c6f5d8; }

/* 封盘 */
.lock { background: rgba(5,3,16,.82); backdrop-filter: blur(3px); }
.lock::before, .lock::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; background: repeating-linear-gradient(45deg, #ffd60a 0 10px, #111 10px 20px); opacity: .85; animation: hazard 1s linear infinite; }
.lock::before { top: 0; } .lock::after { bottom: 0; }
@keyframes hazard { to { background-position: 28px 0; } }
.lock-in { padding: 14px 26px; border: 1px solid rgba(255,43,214,.6); background: rgba(255,43,214,.08); clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); box-shadow: inset 0 0 24px rgba(255,43,214,.2); }
.lock b { font-family: var(--sans); letter-spacing: 2px; }
.lock small { font-family: var(--mono); }
@media (max-height: 700px) { .bt { height: 52px; } .pt { height: 32px; } .sec-h { margin: 3px 4px 3px; } }
#panel > .lock { position: absolute; inset: 0; z-index: 5; }
#panel > .cn { position: absolute; }
#panel > .scanline { position: absolute; }

/* ===== 画面加高：面板更紧凑 + 比赛时自动收起 ===== */
#view { flex: 1 1 auto; transition: flex-basis .45s ease; }
#panel { padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); transition: max-height .45s ease; max-height: 420px; }
.hist-wrap { margin: 2px 2px 2px; }
.sec-h { margin: 4px 2px 4px; }
.pt { height: 32px; }
.pt span { font-size: 12px; }
.bt { height: 52px; }
.boats { gap: 5px; }
.mybets { margin-top: 6px; padding: 5px 8px; }
.mb-list { max-height: 26px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin-top: 4px; }
.mb-list::-webkit-scrollbar { display: none; }
.bet-tag { flex: none; }
/* 比赛/开奖阶段：收起选择区，只留历史 + 注单 + 状态条 */
#app.racing #panel { max-height: 150px; }
#app.racing #panel .sec-h, #app.racing #panel .pos-tabs, #app.racing #panel .boats { display: none; }
#app.racing #panel > .lock { position: relative; inset: auto; margin-top: 6px; background: transparent; backdrop-filter: none; padding: 12px 0 10px; }
#app.racing #panel > .lock .lock-in { padding: 6px 18px; }
#app.racing #panel > .lock b { font-size: 15px; display: inline; margin-right: 8px; }
#app.racing #panel > .lock small { display: inline; font-size: 12px; }
#app.racing #panel > .lock::before, #app.racing #panel > .lock::after { height: 6px; }

/* ===== 结算界面：科技风 ===== */
#result { background: radial-gradient(circle at 50% 40%, rgba(0,229,255,.12), rgba(3,2,12,.86) 60%); }
.res-card { position: relative; width: 100%; max-width: 400px; max-height: 94vh; overflow-y: auto; padding: 16px 16px 14px; color: #dff6ff;
  background: linear-gradient(170deg, rgba(10,22,50,.96), rgba(8,4,26,.97));
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  box-shadow: inset 0 0 0 1px rgba(0,229,255,.45), inset 0 0 40px rgba(0,229,255,.08);
  animation: resIn .45s cubic-bezier(.2,1.2,.4,1); }
@keyframes resIn { from { transform: scale(.85) translateY(20px); opacity: 0; filter: blur(4px); } }
.res-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); }
.res-card .cn { width: 16px; height: 16px; }
.res-card .cn.tl { top: 6px; left: 6px; } .res-card .cn.tr { top: 6px; right: 6px; } .res-card .cn.bl { bottom: 6px; left: 6px; } .res-card .cn.br { bottom: 6px; right: 6px; }
.res-scan { position: absolute; left: 0; right: 0; height: 60px; top: -60px; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(0,229,255,.12), transparent); animation: scan 2.4s linear infinite; }
.res-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; }
.res-tag { color: #04121c; background: var(--neon); padding: 2px 8px; clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); font-weight: 800; }
.res-id { color: #7fa8c8; } .res-id b { color: var(--neon); font-size: 14px; text-shadow: 0 0 8px var(--neon); }
.res-title { position: relative; text-align: center; font-size: 26px; font-weight: 900; letter-spacing: 8px; margin: 8px 0 4px; color: #fff; text-shadow: 0 0 14px var(--neon); }
.res-title::before, .res-title::after { content: attr(data-t); position: absolute; inset: 0; opacity: .7; }
.res-title::before { color: #ff2bd6; transform: translate(-2px, 0); clip-path: inset(0 0 55% 0); animation: glitch1 2.2s infinite steps(1); }
.res-title::after { color: #00e5ff; transform: translate(2px, 0); clip-path: inset(55% 0 0 0); animation: glitch2 2.6s infinite steps(1); }
@keyframes glitch1 { 0%, 92% { transform: translate(0); opacity: 0; } 93% { transform: translate(-3px, -1px); opacity: .8; } 96% { transform: translate(2px, 1px); opacity: .8; } }
@keyframes glitch2 { 0%, 88% { transform: translate(0); opacity: 0; } 89% { transform: translate(3px, 1px); opacity: .8; } 93% { transform: translate(-2px, 0); opacity: .8; } }
/* 领奖台：六边形能量台 */
.podium { min-height: 176px; margin: 4px 0 8px; gap: 2px; }
.pod .bar { width: 96px !important; height: auto !important; padding: 6px 0 5px; display: flex; flex-direction: column; align-items: center; border-radius: 0;
  background: linear-gradient(180deg, rgba(0,229,255,.22), rgba(0,229,255,.02)); clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
  font-size: 12px; font-weight: 800; color: #cfefff; box-shadow: inset 0 2px 0 var(--neon); }
.pod .bar small { font-family: var(--mono); font-size: 10px; color: #8fd8f0; font-weight: 600; margin-top: 1px; }
.pod.p1 .bar { padding-bottom: 18px; background: linear-gradient(180deg, rgba(255,214,10,.35), rgba(255,214,10,.03)); box-shadow: inset 0 2px 0 #ffd60a; color: #ffe680; }
.pod.p1 .bar small { color: #ffe680; }
.pod.p2 .bar { padding-bottom: 10px; }
/* 4-10 名数据表 */
.res-table { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 6px; margin-bottom: 10px; }
.rt { position: relative; display: grid; grid-template-columns: 22px 38px 24px 1fr; align-items: center; gap: 4px; height: 30px; padding: 0 8px 0 4px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bc) 18%, transparent), rgba(255,255,255,.02));
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); box-shadow: inset 2px 0 0 var(--bc); animation: rowIn .35s ease-out both; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-14px); } }
.rt .rk { font-family: var(--mono); font-size: 11px; color: #6f8fb0; text-align: center; }
.rt img { width: 38px; height: 28px; object-fit: contain; }
.rt .bn { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font: 900 11px var(--mono); background: var(--bc); color: #fff; clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%); }
.rt .bn.dark { color: #111; }
.rt .tm { font-family: var(--mono); font-size: 11px; color: #9fc4dc; text-align: right; }
/* 我的结算：终端 */
.res-me { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 0; text-align: left;
  background: rgba(0,10,20,.7); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); box-shadow: inset 0 0 0 1px rgba(0,229,255,.25); font-size: 13px; }
.res-me.win { box-shadow: inset 0 0 0 1px rgba(57,255,136,.6), inset 0 0 26px rgba(57,255,136,.15); }
.res-me.lose { box-shadow: inset 0 0 0 1px rgba(255,61,107,.45); }
.rm-l small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: #8fb3cf; }
.res-me .big-n { display: block; margin: 0; font-size: 30px; }
.res-me.win .big-n { color: #39ff88; text-shadow: 0 0 14px rgba(57,255,136,.7); }
.res-me.lose .big-n { color: #ff3d6b; }
.rm-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; color: #9fb4cf; }
.rm-r b { font-family: var(--mono); color: #fff; } .rm-r b.pos { color: #39ff88; } .rm-r b.neg { color: #ff3d6b; }
.res-seed { font-family: var(--mono); font-size: 9.5px; color: #4f7898; text-align: center; margin-bottom: 8px; letter-spacing: .5px; }
.res-btn { position: relative; width: 100%; height: 44px; border: none; cursor: pointer; font-size: 15px; font-weight: 900; letter-spacing: 2px; color: #04121c;
  background: linear-gradient(90deg, #00e5ff, #7b3dff 60%, #ff2bd6); clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); box-shadow: 0 0 20px rgba(0,229,255,.4); overflow: hidden; }
.res-btn::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -50%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); transform: skewX(-20deg); animation: shine 2.2s infinite; }
@keyframes shine { to { left: 120%; } }
.res-btn span { position: relative; z-index: 1; }
.bicon.r1 { width: 120px; height: 120px; }
.bicon { width: 88px; height: 88px; }
.ibtn.snd { width: 32px; height: 32px; font-size: 14px; border-radius: 0; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); background: rgba(0,229,255,.12); box-shadow: inset 0 0 0 1px rgba(0,229,255,.45); border: none; }
.ibtn.snd.off { opacity: .45; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); position: relative; }
#tb-music.off::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: #ff3d6b; transform: rotate(-35deg); }
.tb-r { gap: 6px; }
