/* PC28实验室：深色盘口风格，只保留大小/单双 */
.sim-wrap { max-width: 560px; margin: 0 auto; padding: 18px 14px 40px; color: var(--txt-1, #e2e8f0); }
.sim-head h1 { margin: 0 0 4px; font-size: 20px; }
.sim-head p { margin: 0 0 16px; color: var(--txt-3, #7c8798); font-size: 11px; }
.sim-board { display: grid; gap: 8px; margin-bottom: 14px; }
.sim-issue, .sim-next { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 10px; background: rgba(99,102,241,.10); border: 1px solid rgba(99,102,241,.25); font-size: 12px; }
.sim-issue b, .sim-next b { font-size: 15px; }
.sim-issue em, .sim-next em { color: var(--txt-3, #7c8798); font-style: normal; font-size: 10px; }
.sim-next strong { color: #fbbf24; font-variant-numeric: tabular-nums; }
.sim-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sim-opt { padding: 14px 0; border-radius: 10px; border: 1px solid rgba(148,163,184,.2); background: rgba(148,163,184,.08); color: #e2e8f0; font-size: 18px; font-weight: 600; cursor: pointer; transition: .15s; }
.sim-opt em { display: block; margin-top: 3px; font-size: 10px; font-style: normal; font-weight: 400; color: #94a3b8; }
.sim-opt:hover:not(:disabled) { background: rgba(251,113,133,.18); border-color: rgba(251,113,133,.5); }
.sim-opt:disabled { opacity: .4; cursor: not-allowed; }
.sim-amounts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.sim-amt { flex: 1; min-width: 56px; padding: 9px 0; border-radius: 8px; border: 1px solid rgba(148,163,184,.2); background: transparent; color: #cbd5e1; cursor: pointer; font-size: 13px; }
.sim-amt.is-on { background: rgba(99,102,241,.3); border-color: rgba(99,102,241,.6); color: #fff; }
#sim-custom { flex: 1.4; min-width: 110px; padding: 9px 10px; border-radius: 8px; border: 1px solid rgba(148,163,184,.2); background: rgba(15,23,42,.6); color: #e2e8f0; font-size: 13px; }
.sim-hint { margin: 8px 0 0; color: var(--txt-3, #7c8798); font-size: 10px; }
.sim-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.sim-btn { padding: 13px 0; border-radius: 10px; border: none; background: #4f46e5; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.sim-btn.is-danger { background: rgba(251,113,133,.85); }
.sim-btn:disabled { opacity: .35; cursor: not-allowed; }
.sim-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.sim-stat > div { padding: 10px 12px; border-radius: 9px; background: rgba(148,163,184,.07); display: flex; flex-direction: column; gap: 3px; }
.sim-stat span { color: var(--txt-3, #7c8798); font-size: 9px; }
.sim-stat b { font-size: 15px; font-variant-numeric: tabular-nums; }
.is-up { color: #5eead4; } .is-down { color: #fb7185; }
.sim-list h2 { font-size: 13px; margin: 0 0 8px; color: #cbd5e1; }
.sim-item { display: grid; grid-template-columns: 1.2fr .8fr .7fr 1.3fr; gap: 6px; padding: 8px 4px; border-bottom: 1px solid rgba(148,163,184,.08); font-size: 11px; color: #cbd5e1; }
.sim-empty { color: var(--txt-3, #7c8798); font-size: 11px; }

/* 上期开奖结果 */
.sim-last { padding: 12px 14px; border-radius: 12px; margin-bottom: 10px; background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(168,85,247,.10)); border: 1px solid rgba(139,92,246,.35); }
.sim-last-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #cbd5e1; }
.sim-last-tag { padding: 2px 8px; border-radius: 99px; font-size: 10px; }
.sim-last-tag.is-big { background: rgba(251,113,133,.2); color: #fda4af; }
.sim-last-tag.is-small { background: rgba(45,212,191,.18); color: #5eead4; }
.sim-balls { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.sim-balls i { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; font-style: normal; color: #0b1017; }
.sim-balls .b1 { background: #34d399; } .sim-balls .b2 { background: #fb7185; } .sim-balls .b3 { background: #60a5fa; }
.sim-balls .bsum { background: #fbbf24; }
.sim-balls em { color: #94a3b8; font-style: normal; }

/* 当前期 + 阶段 */
.sim-now { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; background: rgba(148,163,184,.06); border: 1px solid rgba(148,163,184,.18); }
.sim-now.sealed { border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.08); }
.sim-now.drawing { border-color: rgba(96,165,250,.45); background: rgba(96,165,250,.08); }
.sim-now-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.sim-now-top strong { font-size: 20px; font-variant-numeric: tabular-nums; color: #f0fdfa; }
.sim-progress { margin-top: 9px; height: 5px; border-radius: 99px; background: rgba(148,163,184,.15); overflow: hidden; }
.sim-progress i { display: block; height: 100%; background: linear-gradient(90deg, #4f46e5, #a855f7); transition: width .5s linear; }
.sim-now.sealed .sim-progress i { background: #fbbf24; }
.sim-now.drawing .sim-progress i { background: #60a5fa; }
.sim-phase-hint { margin: 7px 0 0; font-size: 10px; color: var(--txt-3, #7c8798); }

/* 顶部记录开关 */
.sim-topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 10px; border-radius: 10px; background: rgba(148,163,184,.06); border: 1px solid rgba(148,163,184,.15); }
.sim-topbar-state { flex: 1; font-size: 11px; color: var(--txt-3, #7c8798); }
.sim-topbar-state.is-on { color: #5eead4; }
.sim-btn-sm { padding: 8px 14px; font-size: 12px; border-radius: 8px; }

/* 下注条 */
.sim-betbar { display: grid; grid-template-columns: .8fr 1.6fr; gap: 10px; margin: 16px 0; }
.sim-btn-ghost { background: rgba(148,163,184,.12); color: #cbd5e1; }
.sim-btn-main { display: flex; flex-direction: column; align-items: center; gap: 2px; background: linear-gradient(135deg,#4f46e5,#7c3aed); }
.sim-btn-main em { font-size: 10px; font-style: normal; opacity: .85; font-weight: 400; }
.sim-opt.is-on { background: rgba(251,113,133,.28); border-color: rgba(251,113,133,.75); color: #fff; }

/* 页签：投注区 / 游戏记录 */
.sim-tabs { display: flex; gap: 4px; margin: 14px 0 12px; border-bottom: 1px solid rgba(148,163,184,.15); }
.sim-tabs button { flex: 1; padding: 11px 0; background: none; border: none; border-bottom: 2px solid transparent; color: var(--txt-3, #7c8798); font-size: 13px; cursor: pointer; }
.sim-tabs button.is-on { color: #f0fdfa; border-bottom-color: #a855f7; font-weight: 600; }
.sim-sec-title { margin: 14px 0 8px; font-size: 12px; color: #cbd5e1; font-weight: 600; }
.sim-sec-title:first-child { margin-top: 4px; }
.sim-record .sim-stat { margin-bottom: 6px; }

/* 轻提示（下注成功/失败） */
.sim-toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 12px);
  max-width: 84vw; padding: 11px 18px; border-radius: 10px;
  font-size: 13px; line-height: 1.4; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
  z-index: 9999; box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.sim-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.sim-toast.is-ok { background: rgba(16,185,129,.95); color: #06281f; font-weight: 600; }
.sim-toast.is-error { background: rgba(244,63,94,.95); color: #fff; font-weight: 600; }

/* 阶段文字与按钮状态 */
.sim-phase { color: #f0fdfa; }
.sim-now.sealed .sim-phase { color: #fbbf24; }
.sim-now.drawing .sim-phase { color: #60a5fa; }
.sim-btn-main.is-blocked { background: rgba(148,163,184,.18); color: #94a3b8; }
.sim-btn-main.is-blocked em { opacity: .8; }
.sim-place-label { font-size: 15px; font-weight: 700; }

/* 应用内确认弹窗 */
.sim-mask { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; background: rgba(3,7,18,.66); backdrop-filter: blur(3px); animation: simFade .16s ease; }
@keyframes simFade { from { opacity: 0 } to { opacity: 1 } }
.sim-dialog { width: min(86vw, 360px); padding: 20px 20px 16px; border-radius: 16px; background: #141b26; border: 1px solid rgba(148,163,184,.18); box-shadow: 0 24px 60px rgba(0,0,0,.6); animation: simPop .18s ease; }
@keyframes simPop { from { transform: translateY(10px) scale(.97); opacity: 0 } to { transform: none; opacity: 1 } }
.sim-dialog h3 { margin: 0 0 8px; font-size: 15px; color: #f0fdfa; }
.sim-dialog p { margin: 0 0 18px; font-size: 12px; line-height: 1.6; color: #94a3b8; }
.sim-dialog-actions { display: flex; gap: 10px; }
.sim-dlg-btn { flex: 1; padding: 11px 0; border-radius: 10px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; }
.sim-dlg-btn.ghost { background: rgba(148,163,184,.14); color: #cbd5e1; }
.sim-dlg-btn.danger { background: linear-gradient(135deg,#f43f5e,#e11d48); color: #fff; }

/* 底部 tab 导航 */
.sim-nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; z-index: 50; background: rgba(11,16,23,.96); border-top: 1px solid rgba(148,163,184,.14); backdrop-filter: blur(10px); padding-bottom: env(safe-area-inset-bottom); }
.sim-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; background: none; border: none; color: #64748b; font-size: 10px; cursor: pointer; }
.sim-nav button .sim-icon { width: 20px; height: 20px; opacity: .62; transition: opacity .15s ease, transform .15s ease; }
.sim-nav button.is-on { color: #c4b5fd; }
.sim-nav button.is-on .sim-icon { opacity: 1; transform: translateY(-1px); }
.sim-wrap { padding-bottom: 78px; }

/* 对局记录列表 */
.sim-sess { display: block; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 8px; border-radius: 11px; background: rgba(148,163,184,.06); border: 1px solid rgba(148,163,184,.12); color: inherit; cursor: pointer; }
.sim-sess-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: #cbd5e1; }
.sim-sess-top b { font-size: 15px; font-variant-numeric: tabular-nums; }
.sim-sess-sub { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: var(--txt-3, #7c8798); }
.sim-sess-live { margin-left: 6px; padding: 1px 6px; border-radius: 99px; background: rgba(45,212,191,.2); color: #5eead4; font-size: 9px; font-style: normal; }
.sim-detail-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; font-size: 11px; color: var(--txt-3, #7c8798); }
.sim-back { padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(148,163,184,.2); background: transparent; color: #cbd5e1; font-size: 12px; cursor: pointer; }

/* 「开始记录」按钮的引导动画：用户点下注被拦下时，把它指出来 */
@keyframes simHint {
  0%,100% { box-shadow: 0 0 0 0 rgba(196,181,253,.55); }
  50%     { box-shadow: 0 0 0 7px rgba(196,181,253,0); }
}
.sim-btn.is-hint { animation: simHint .75s ease 2; }
.sim-btn-main.is-blocked { cursor: pointer; }

/* ── 紧凑布局：小屏一屏能装下 ── */
.sim-wrap { padding: 12px 12px 76px; }
.sim-head { margin-bottom: 10px; }
.sim-head h1 { font-size: 16px; margin: 0; }
.sim-wrap--records .sim-head { margin-bottom: 8px; }

/* 顶部一条：状态 + 开始/结束，替代原来的整块 topbar */
.sim-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.sim-bar-state { flex: 1; font-size: 11px; color: var(--txt-3, #7c8798); }
.sim-bar-state.is-on { color: #5eead4; }
.sim-btn-xs { padding: 6px 11px; font-size: 11px; border-radius: 7px; }

/* 开奖 + 当前期合并成一张卡 */
.sim-board2 { padding: 10px 12px; border-radius: 12px; margin-bottom: 10px; background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(168,85,247,.08)); border: 1px solid rgba(139,92,246,.3); }
.sim-board2.sealed { border-color: rgba(251,191,36,.4); }
.sim-board2.drawing { border-color: rgba(96,165,250,.4); }
.sim-b2-top { display: flex; align-items: center; gap: 8px; }
.sim-b2-code { font-size: 11px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.sim-b2-balls { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.sim-b2-balls i { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; font-style: normal; color: #0b1017; }
.sim-b2-balls .b1 { background: #34d399; } .sim-b2-balls .b2 { background: #fb7185; } .sim-b2-balls .b3 { background: #60a5fa; }
.sim-b2-balls .bsum { background: #fbbf24; }
.sim-b2-balls em { color: #64748b; font-style: normal; font-size: 11px; }
.sim-b2-tag { font-size: 10px; padding: 2px 7px; border-radius: 99px; }
.sim-b2-tag.is-big { background: rgba(251,113,133,.2); color: #fda4af; }
.sim-b2-tag.is-small { background: rgba(45,212,191,.18); color: #5eead4; }
.sim-b2-now { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-size: 12px; color: #cbd5e1; }
.sim-b2-now strong { font-size: 17px; color: #f0fdfa; font-variant-numeric: tabular-nums; }
.sim-board2 .sim-progress { margin-top: 6px; height: 4px; }
.sim-board2 .sim-phase-hint { margin: 5px 0 0; font-size: 9px; }

/* 四方向、押注金额、下注条整体收紧 */
.sim-row { gap: 6px; }
.sim-opt { padding: 10px 0; font-size: 16px; border-radius: 9px; }
.sim-opt em { font-size: 9px; margin-top: 1px; }
.sim-amounts { gap: 6px; margin-top: 8px; }
.sim-amt { padding: 7px 0; font-size: 12px; }
#sim-custom { padding: 7px 9px; font-size: 12px; }
.sim-betbar { margin: 10px 0 8px; gap: 8px; }
.sim-btn-main { padding: 10px 0; }
.sim-place-label { font-size: 14px; }

/* 本局小结算：一行，替代原来的三块卡片 */
.sim-tally { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 9px; background: rgba(148,163,184,.06); font-size: 11px; color: var(--txt-3, #7c8798); }
.sim-tally b { font-size: 13px; }

@media (max-height: 740px) {
  .sim-b2-balls i { width: 22px; height: 22px; font-size: 12px; }
  .sim-opt { padding: 8px 0; font-size: 15px; }
  .sim-head h1 { display: none; }
  .sim-wrap { padding-top: 8px; }
}

/* 统计条：总投入 / 总盈亏 / 总投注 */
.sim-tally { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 10px; border-radius: 9px; background: rgba(148,163,184,.06); font-size: 10px; color: var(--txt-3, #7c8798); }
.sim-tally span { display: flex; flex-direction: column; gap: 2px; }
.sim-tally b { font-size: 14px; color: #e2e8f0; font-variant-numeric: tabular-nums; }
.sim-tally b.is-up { color: #5eead4; } .sim-tally b.is-down { color: #fb7185; }

/* 本局注单：限高滚动，不把页面顶长 */
.sim-bets { margin-top: 10px; }
.sim-bets-head { display: flex; justify-content: space-between; font-size: 10px; color: var(--txt-3, #7c8798); margin-bottom: 4px; }
.sim-bets-list { max-height: 132px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* 主页内的两个页签：投注区 / 投注记录 */
.sim-subtabs { display: flex; gap: 4px; margin: 2px 0 10px; border-bottom: 1px solid rgba(148,163,184,.12); }
.sim-subtabs button { flex: 1; padding: 9px 0; background: none; border: none; border-bottom: 2px solid transparent; color: #64748b; font-size: 12px; cursor: pointer; }
.sim-subtabs button.is-on { color: #f0fdfa; border-bottom-color: #a855f7; font-weight: 600; }
.sim-subtabs + .sim-tally { margin-top: 0; }
