/* 俄罗斯轮盘（欧式轮盘赌）：casino 复古风格
   布局：押注屏/转盘屏 双屏结构
   - 手机竖屏：押注屏整屏一屏看全（竖版押注桌 6列×16行），开奖自动跳入转盘屏
   - 手机横屏：标准赌场排版——左侧 3D 转盘常驻 + 右侧押注区（LED/横版押注桌 14列×5行/筹码+操作键）
   - 电脑端(≥900px)：与手机横屏同款排版（左 3D 转盘常驻 + 右押注区三行网格）
   - 横屏/电脑通用：顶栏"全屏"键切浏览器全屏（隐藏地址栏）；"投注/开奖/同屏"键三态独显切换——
     押注独显=押注区撑满整屏（押注格放大好按），轮盘独显=左侧大轮盘 + 右侧开奖记录栏 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #04180b radial-gradient(circle at 50% 0%, #0d3a1d, #031207 70%);
  color: #ffe9b0;
  user-select: none;
  overflow: hidden;
}
.view { min-height: 100%; }

/* ---------- 登录 / 注册 ---------- */
#loginView { display: flex; align-items: center; justify-content: center; padding: 24px 16px; min-height: 100vh; min-height: 100dvh; overflow-y: auto; }
.login-box {
  width: 100%; max-width: 360px;
  background: linear-gradient(160deg, #12452a, #072415);
  border: 2px solid #d4a017; border-radius: 16px;
  padding: 28px 22px; text-align: center;
  box-shadow: 0 0 30px rgba(212, 160, 23, .25);
}
.logo { font-size: 30px; color: #ffd75e; text-shadow: 0 2px 8px #000; }
.logo-sub { font-size: 12px; color: #c9a25e; margin: 6px 0 18px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button {
  flex: 1; padding: 9px 0; border: 1px solid #8a6a1f; border-radius: 8px;
  background: #072415; color: #c9a25e; font-size: 15px;
}
.tabs button.on { background: #d4a017; color: #072415; font-weight: 700; }
.login-box input, .modal-box input {
  width: 100%; padding: 11px 12px; margin-bottom: 10px;
  border: 1px solid #8a6a1f; border-radius: 8px;
  background: #031207; color: #ffe9b0; font-size: 15px; outline: none;
}
.btn-big {
  width: 100%; padding: 12px 0; border: none; border-radius: 10px;
  background: linear-gradient(180deg, #ff5f4d, #c21807); color: #fff;
  font-size: 17px; font-weight: 700; letter-spacing: 4px;
  box-shadow: 0 3px 0 #7a0e02;
}
.btn-big:active { transform: translateY(2px); box-shadow: none; }
.msg { min-height: 20px; font-size: 13px; color: #ffb3a7; margin-top: 8px; }
.tip { font-size: 11px; color: #8a6a1f; margin-top: 10px; }

/* ---------- 顶栏 ---------- */
#gameView {
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  overflow: hidden;
}
.topbar {
  flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: #072415; border-bottom: 1px solid #8a6a1f;
}
.me-avatar { font-size: 22px; }
.me-name { font-size: 14px; font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-btns { display: flex; gap: 6px; }
.btn-mini {
  padding: 6px 10px; border: 1px solid #8a6a1f; border-radius: 6px;
  background: #0d3a1d; color: #ffe9b0; font-size: 12px;
}
.btn-mini:active { background: #d4a017; color: #072415; }

/* ---------- 双屏容器 ---------- */
#screens { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---------- 押注屏：整屏一屏看全，零滚动 ---------- */
#betScreen { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* LED 记分条（押注屏顶部）：两行排版——
   第一行 积分/奖池/倒计时居右；第二行 押注/中奖/期号阶段提示语居右，
   每个数字位最少预留 5 位等宽字符宽度，杜绝窄屏遮挡裁切 */
#ledBar {
  flex: none;
  display: flex; flex-direction: column; gap: 2px;
  margin: 6px 8px 0; padding: 5px 8px;
  background: #050505; border: 1px solid #442; border-radius: 10px;
  box-shadow: inset 0 0 12px #000;
}
.led-row { display: flex; align-items: baseline; gap: 6px 14px; width: 100%; }
.led-cell { flex: none; display: flex; align-items: baseline; gap: 3px; min-width: 0; }
/* 倒计时格：居右（margin-left:auto 顶到行尾）；标签 3 字 + "MM:SS" 5 个等宽字符完整显示 */
.led-cell-count { margin-left: auto; }
.led-cell label { font-size: 10px; color: #888; flex: none; }
.led-cell span {
  font-family: "Courier New", monospace; font-weight: 700;
  font-size: clamp(13px, 4vw, 18px); color: #ff3b30;
  text-shadow: 0 0 8px rgba(255, 59, 48, .8);
  white-space: nowrap; min-width: 5ch;   /* 至少留 5 位数字的位置，超出自然撑宽不裁切 */
}
#ledWin { color: #3dff6e; text-shadow: 0 0 8px rgba(61, 255, 110, .8); }
/* 奖池格：金色 LED（0 号特奖奖池，基础 1000、每期全场押注抽 3% 注入） */
#ledJackpot { color: #ffd75e; text-shadow: 0 0 8px rgba(255, 215, 94, .8); }
/* 倒计时格：按阶段配色（押注中绿 / 封盘红闪 / 休市灰） */
#ledCount.phase-betting { color: #3dff6e; text-shadow: 0 0 8px rgba(61, 255, 110, .8); }
#ledCount.phase-sealed { color: #ff3b30; text-shadow: 0 0 8px rgba(255, 59, 48, .9); animation: ledBlink 1s steps(2) infinite; }
#ledCount.phase-closed { color: #888; text-shadow: none; }
@keyframes ledBlink { 50% { opacity: .3; } }
.led-msg {
  min-height: 15px; font-size: 11px; color: #ffd75e; text-align: center;
  text-shadow: 0 0 6px rgba(255, 215, 94, .6);
}
/* LED 条内的期号提示语：在第二行内"中奖"格之后居右（不再独占整行） */
#ledBar .led-msg { flex: 1; min-width: 0; text-align: right; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 筹码 */
#chips { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px 2px; }
.chips-label { font-size: 12px; color: #c9a25e; }
.chip {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  border: 3px dashed rgba(255, 255, 255, .75);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
  box-shadow: 0 2px 4px #000;
}
.chip.c1 { background: #666; } .chip.c5 { background: #c21807; }
.chip.c10 { background: #0b5ed7; } .chip.c50 { background: #0f8a3d; }
.chip.c100 { background: #7b2fbe; }
.chip.on { outline: 3px solid #ffd75e; transform: scale(1.1); }

/* ---------- 押注桌（绿呢面）：竖版/横版两套网格，按屏幕方向切换 ---------- */
#betTable { flex: 1; min-height: 0; padding: 4px 8px; }
.bt-grid {
  display: grid; gap: 2px; height: 100%;
  background: #0b4d24;             /* 绿呢面 */
  border: 2px solid #d4a017; border-radius: 10px;
  padding: 4px;
}
/* 竖版（手机竖屏）：6 列 × 16 行
   第1行=0（通跨6列）；第2~13行=1~36（每行3个数字，每格跨2列）；
   第14行=3个打注；第15行=3个列注；第16行=6个外围注 */
.bt-grid-v { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(16, 1fr); }
/* 横版（手机横屏/电脑）：经典 14 列 × 5 行 */
.bt-grid-h { grid-template-columns: repeat(14, 1fr); grid-template-rows: repeat(5, 1fr); }
.bt-grid-h { display: none; }       /* 默认竖屏：只显示竖版 */
.bet-cell {
  position: relative; min-height: 0; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 233, 176, .45); border-radius: 4px;
  color: #fff; font-weight: 800; font-size: clamp(10px, 3.2vw, 15px);
  touch-action: none;              /* 长按连押：禁止浏览器长按弹菜单/滚动手势 */
  -webkit-user-select: none; user-select: none;
  text-shadow: 0 1px 2px #000; overflow: hidden;
}
.bet-cell:active { filter: brightness(1.6); }
.bet-cell .bc-text { pointer-events: none; white-space: nowrap; }
.bc-red { background: #a41212; }
.bc-black { background: #161616; }
.bc-green { background: #0f8a3d; }
.bc-out { background: #0b4d24; font-size: clamp(9px, 2.6vw, 12px); font-weight: 700; }
.bc-out.bc-red { background: #a41212; }
.bc-out.bc-black { background: #161616; }
/* 已押金额角标（data-bet 标识押注类型，双网格共存不冲突）——自己押的：号码下方居中·金色 */
.bet-badge {
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); z-index: 2;
  min-width: 18px; padding: 0 4px;
  background: #ffd75e; color: #7a0e02; border-radius: 9px;
  font-size: 10px; font-weight: 800; text-align: center;
  display: none; pointer-events: none;
}
.bet-badge.show { display: block; }
/* 他人(含机器人)押注角标：号码上方居中·蓝色（与自己的下方金色角标上下区分，不再左右重叠） */
.ob-badge {
  position: absolute; top: -2px; left: 50%; transform: translateX(-50%); z-index: 2;
  min-width: 18px; padding: 0 4px;
  background: #0b5ed7; color: #fff; border-radius: 9px;
  font-size: 10px; font-weight: 800; text-align: center;
  display: none; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35);
}
.ob-badge.show { display: block; }
/* 投注数三态筛选（顶栏"全部数/我的数/他的数"）：bv-mine 只看自己下方角标；bv-others 只看他人上方角标 */
#betTable.bv-mine .ob-badge { display: none !important; }
#betTable.bv-others .bet-badge { display: none !important; }

/* 操作键 */
#actions {
  flex: none; display: flex; gap: 8px;
  padding: 6px 10px calc(10px + env(safe-area-inset-bottom));
}
.btn-act {
  flex: 1; padding: 12px 0; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 800; letter-spacing: 3px; color: #fff;
}
.btn-act:active { transform: translateY(2px); }
.btn-red { background: linear-gradient(180deg, #ff5f4d, #c21807); box-shadow: 0 3px 0 #7a0e02; flex: 2; }
.btn-gold { background: linear-gradient(180deg, #ffd75e, #d4a017); box-shadow: 0 3px 0 #8a6a1f; color: #4a2c00; }
.btn-green { background: linear-gradient(180deg, #3dff6e, #0f8a3d); box-shadow: 0 3px 0 #075c26; color: #043015; }
.btn-gray { background: linear-gradient(180deg, #888, #555); box-shadow: 0 3px 0 #333; }
.btn-blue { background: linear-gradient(180deg, #4da3ff, #0b5ed7); box-shadow: 0 3px 0 #07408f; }
.btn-act:disabled { opacity: .45; }

/* ---------- 转盘屏：3D 真实轮盘（Three.js WebGL 实时渲染） ----------
   盘面为 js 程序化建模的 3D 轮盘：木质轮缘木碗 → 象牙色滚珠通道（外高内低，球在此飞转）→
   斜坡锥面 → 37 个数字袋（按真实轮序，金属隔板分隔）→ 内锥木面 → 金色中央转塔。
   开奖号码与提示语放在盘外上方 LED 横条，盘面以内无任何 DOM 动态文字；
   滚珠从盘外抛进最外圈通道飞转减速、螺旋掉进里圈、弹跳落袋。 */
#wheelScreen {
  display: none;                     /* 默认隐藏；js 按 手机/电脑 布局控制显隐 */
  flex: 1; min-height: 0;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 8px;
}
#wheelCol {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-width: 0; min-height: 0; max-width: 100%;
}
/* 盘外 LED 横条：开奖号码 + 提示语（从圆心移出盘面） */
#wheelLed {
  flex: none; display: flex; align-items: center; gap: 12px;
  max-width: 100%; padding: 4px 14px;
  background: #050505; border: 1px solid #442; border-radius: 10px;
  box-shadow: inset 0 0 12px #000;
}
.led-result {
  font-family: "Courier New", monospace; font-weight: 900;
  font-size: clamp(22px, 6.5vw, 36px); line-height: 1;
  color: #ffd75e; text-shadow: 0 0 10px rgba(255, 215, 94, .8);
  min-width: 1.2em; text-align: center;
}
.led-result.red { color: #ff5147; text-shadow: 0 0 10px rgba(255, 81, 71, .9); }
.led-result.black { color: #e8e8e8; text-shadow: 0 0 10px rgba(255, 255, 255, .7); }
.led-result.green { color: #3dff6e; text-shadow: 0 0 10px rgba(61, 255, 110, .9); }
#wheelMsg { flex: 1; min-width: 0; font-size: 11px; text-align: left; }
/* 木质轮缘（盘面外圈木框） */
#wheelWrap {
  flex: none;
  width: min(92vw, calc(100dvh - 216px));
  aspect-ratio: 1;
  padding: 8px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle, #7a5322 0%, #5d3d14 55%, #3d2808 100%);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(212, 160, 23, .35),
    inset 0 2px 6px rgba(255, 230, 160, .25), inset 0 -4px 10px #000;
}
/* 3D 盘面挂载容器：圆形裁切 WebGL 画布（3D 场景建模/贴图/灯光全部由 js 程序化生成） */
#wheel {
  position: relative; width: 100%; height: 100%;
  border-radius: 50%; overflow: hidden;
  border: 2px solid #d4a017;
  background: radial-gradient(circle, #12351c 0%, #07210f 70%, #04140a 100%);
  box-shadow: inset 0 0 30px #000;
}
#wheel canvas {
  display: block; width: 100% !important; height: 100% !important;
  touch-action: none;              /* 单指拖转/双指捏合缩放 3D 视角，不触发页面滚动缩放手势 */
  cursor: grab;
}
#wheel canvas:active { cursor: grabbing; }
#btnBackBet { flex: none; width: min(92vw, 320px); }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, .72);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modal-box {
  position: relative;                /* 供右上角 × 关闭按钮绝对定位 */
  width: 100%; max-width: 360px; max-height: 86vh; overflow-y: auto;
  background: linear-gradient(160deg, #12452a, #072415);
  border: 2px solid #d4a017; border-radius: 16px;
  padding: 20px 18px; text-align: center;
}
.modal-box h3 { color: #ffd75e; margin-bottom: 12px; }
.modal-box .btn-act { margin-top: 12px; width: 100%; flex: none; }
/* 弹窗右上角 × 关闭小按钮（比倍/记录/设置等所有弹窗通用，横屏时底部按钮看不到也能随时关闭） */
.modal-x {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid #8a6a1f; background: #0d3a1d; color: #ffe9b0;
  font-size: 14px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer;
}
.modal-x:active { background: #d4a017; color: #072415; }

/* 比倍（紧凑自适应：小屏零横向滚动，一屏看全所有按钮） */
#doubleModal { padding: 10px; }
#doubleModal .modal-box {
  max-width: 340px; padding: 14px 12px; max-height: 96vh; max-height: 96dvh;
}
#doubleModal .modal-box h3 { margin-bottom: 6px; font-size: 16px; }
.dbl-amount { font-size: 15px; } .dbl-amount b { color: #3dff6e; font-size: 20px; }
.dbl-times { font-size: 12px; color: #c9a25e; margin: 4px 0 6px; }
.dbl-card {
  width: clamp(64px, 22vw, 90px); height: clamp(84px, 29vw, 116px); margin: 4px auto;
  background: #fff; color: #c21807; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(36px, 12vw, 52px); font-weight: 900;
  box-shadow: 0 4px 10px #000;
}
.dbl-card.small-n { color: #0b5ed7; }
.dbl-card.seven { color: #111; background: #ffd75e; }
.dbl-btns { display: flex; gap: 8px; margin-top: 8px; width: 100%; }
.dbl-btns .btn-act {
  margin-top: 0; flex: 1 1 0; min-width: 0;   /* 等宽且允许压缩，绝不溢出 */
  padding: 12px 0; font-size: 15px; letter-spacing: 1px; white-space: nowrap;
}
.dbl-tip { font-size: 11px; color: #c9a25e; margin-top: 6px; }

/* 记录 */
/* 全局开奖记录彩球条（全员同步的最近期号，新在左；弹窗与电脑端右侧栏共用） */
.gh-strip {
  display: flex; flex-wrap: wrap; gap: 5px; justify-content: center;
  margin-bottom: 12px; min-height: 26px;
}
.gh-ball {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
  border: 1px solid rgba(255, 255, 255, .35); box-shadow: 0 2px 4px #000;
}
.gh-ball.red { background: radial-gradient(circle at 35% 30%, #ff5f4d, #a41212); }
.gh-ball.black { background: radial-gradient(circle at 35% 30%, #4a4a4a, #101010); }
.gh-ball.green { background: radial-gradient(circle at 35% 30%, #3dff6e, #0a6e31); }
#sideRounds { margin-bottom: 16px; }
.stat-line { font-size: 12px; color: #c9a25e; margin-bottom: 10px; line-height: 1.7; }
.history-list { max-height: 46vh; overflow-y: auto; text-align: left; font-size: 12px; }
.history-item {
  display: flex; gap: 6px; align-items: center;
  padding: 6px 4px; border-bottom: 1px dashed #552;
}
.history-item .h-t { color: #888; width: 86px; flex: none; }
.history-item .h-b { flex: 1; }
.history-item .h-w { font-weight: 700; }
.h-w.win { color: #3dff6e; } .h-w.lose { color: #888; }
.history-empty { text-align: center; color: #888; padding: 20px 0; }

/* 设置 */
.fld-label { display: block; text-align: left; font-size: 12px; color: #c9a25e; margin: 10px 0 4px; }
.fld-row { display: flex; gap: 8px; }
.fld-row input { flex: 1; margin-bottom: 0; }
.fld-row .btn-mini { flex: none; padding: 0 16px; }
.avatar-row { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-row span {
  font-size: 24px; padding: 4px; border: 2px solid transparent; border-radius: 8px; cursor: pointer;
}
.avatar-row span.on { border-color: #ffd75e; background: #0d3a1d; }

/* ---------- 右侧记录栏（默认隐藏；仅"轮盘独显"时由 js 显示：左大轮盘 + 右开奖记录） ---------- */
#sidePanel {
  display: none; min-height: 0; overflow-y: auto;
  background: linear-gradient(160deg, #12452a, #072415);
  border: 2px solid #d4a017; border-radius: 16px;
  padding: 16px 14px;
}
#sidePanel h3 { color: #ffd75e; font-size: 16px; margin-bottom: 10px; }
#sidePanel .history-list { max-height: none; overflow-y: visible; font-size: 13px; }
#sidePanel .stat-line { font-size: 13px; }

/* ========== 手机横屏：标准赌场横屏排版（与竖屏完全不同）==========
   左侧 3D 转盘常驻（开奖原地开转，不再整屏跳转盘屏）＋ 右侧押注区三行网格：
   顶行 LED 记分条（积分/押注/中奖/倒计时 + 提示语）→ 中行经典横版押注桌（14列×5行，
   0 在左端通跨、右端 2:1 列注、打注行、外围注行）→ 底行左筹码档、右操作键 */
@media (orientation: landscape) and (max-width: 899px) {
  #screens {
    flex-direction: row; align-items: stretch; gap: 6px;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
  }
  /* 左栏：3D 转盘（横屏与押注桌同屏常驻，高度撑满、宽度随盘方自动） */
  #wheelScreen { flex: 0 0 auto; padding: 0; gap: 0; }
  #wheelCol { height: 100%; gap: 4px; }
  #wheelLed { padding: 3px 10px; gap: 8px; }
  .led-result { font-size: clamp(16px, 5vh, 24px); }
  #wheelMsg { font-size: 10px; }
  #wheelWrap {
    width: auto; max-width: 46vw;             /* 方形盘，宽随高走且不超屏宽 46% */
    flex: 1; min-height: 0; aspect-ratio: 1;
    padding: 6px;
  }
  #btnBackBet { display: none !important; }   /* 横屏双区同屏，无需"返回押注" */
  /* 右栏：押注区（LED / 押注桌 / 筹码+操作键 三行） */
  #betScreen {
    flex: 1; min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr auto;
    gap: 3px 6px;
  }
  #ledBar { grid-column: 1 / -1; grid-row: 1; margin: 0; padding: 3px 8px; gap: 1px 8px; }
  #ledBar .led-msg { min-height: 12px; font-size: 10px; }
  #betTable { grid-column: 1 / -1; grid-row: 2; padding: 0; min-height: 0; }
  .bt-grid-v { display: none; }
  .bt-grid-h { display: grid; }
  .bt-grid-h .bet-cell { font-size: clamp(9px, 3.4vh, 14px); }
  .bt-grid-h .bc-out { font-size: clamp(8px, 2.8vh, 12px); }
  /* 底行：左筹码档横排、右操作键横排（标准赌场底栏样式） */
  #chips { grid-column: 1; grid-row: 3; padding: 2px 0 0; gap: 5px; align-self: center; }
  .chips-label { font-size: 11px; }
  .chip { width: 30px; height: 30px; font-size: 11px; border-width: 2px; }
  #actions { grid-column: 2; grid-row: 3; padding: 2px 0 0; gap: 6px; align-self: center; }
  #actions .btn-act { flex: none; padding: 8px 14px; font-size: 13px; letter-spacing: 1px; }
  /* 独显切换（顶栏"投注/开奖/同屏"键，显隐由 js 控制，这里只管排版尺寸）：
     押注独显 = 押注区撑满整屏（押注格随整屏放大，数字更好点）；
     轮盘独显 = 左侧大轮盘 + 右侧开奖记录栏（押注按键整屏不显示） */
  #screens.solo-bet #betScreen { flex: 1 1 auto; }
  #screens.solo-wheel #wheelScreen { flex: 1; min-width: 0; }
  #screens.solo-wheel #wheelCol { width: 100%; }
  #screens.solo-wheel #wheelWrap {
    flex: none; width: min(calc(100dvh - 104px), 100%); max-width: none;
  }
  #screens.solo-wheel #sidePanel { flex: 0 0 148px; padding: 8px; border-radius: 10px; }
  #screens.solo-wheel #sidePanel h3 { font-size: 12px; margin-bottom: 6px; }
  #screens.solo-wheel #sidePanel .gh-strip { gap: 4px; margin-bottom: 8px; }
  #screens.solo-wheel #sidePanel .gh-ball { width: 22px; height: 22px; font-size: 10px; }
  #screens.solo-wheel #sidePanel .stat-line { font-size: 10px; margin-bottom: 6px; line-height: 1.5; }
  #screens.solo-wheel #sidePanel .history-list { font-size: 10px; }
  #screens.solo-wheel .history-item .h-t { width: 62px; }
  /* 横屏比倍弹窗紧凑化：横屏高度有限，压低标题/金额/卡牌/按钮/提示，
     保证"小/大"与"收分/返回机台"两排按钮一屏看全、不被挤出屏幕 */
  #doubleModal { padding: 6px; }
  #doubleModal .modal-box { padding: 8px 12px; max-height: 98vh; max-height: 98dvh; }
  #doubleModal .modal-box h3 { font-size: 13px; margin-bottom: 2px; }
  #doubleModal .dbl-amount { font-size: 13px; }
  #doubleModal .dbl-amount b { font-size: 16px; }
  #doubleModal .dbl-times { font-size: 11px; margin: 2px 0 3px; }
  #doubleModal .dbl-card {
    width: clamp(44px, 15vh, 64px); height: clamp(56px, 22vh, 80px);
    font-size: clamp(24px, 10vh, 36px); margin: 2px auto; border-radius: 8px;
  }
  #doubleModal .msg { min-height: 15px; font-size: 11px; margin-top: 3px; }
  #doubleModal .dbl-btns { margin-top: 5px; gap: 6px; }
  #doubleModal .dbl-btns .btn-act { padding: 7px 0; font-size: 13px; }
  #doubleModal .dbl-tip { font-size: 10px; margin-top: 3px; }
}

/* ========== 电脑端（≥900px）：与手机横屏同款排版——左侧 3D 转盘常驻 +
   右侧押注区三行网格（顶 LED / 中横版押注桌 / 底栏左筹码右操作键）；
   同样支持独显切换：押注独显=押注区撑满整屏，轮盘独显=左侧大轮盘 + 右侧开奖记录栏 ========== */
@media (min-width: 900px) {
  #screens {
    flex-direction: row; align-items: stretch; gap: 12px;
    width: 100%; max-width: 1440px; margin: 0 auto; padding: 10px 14px;
  }
  /* 左栏：3D 转盘常驻（高撑满、宽随盘方自动，与手机横屏同一套排法） */
  #wheelScreen {
    display: flex;                     /* 电脑端转盘常驻，不隐藏 */
    flex: 0 0 auto; padding: 0; gap: 0;
  }
  #wheelCol { height: 100%; gap: 6px; }
  #wheelWrap {
    width: auto; max-width: 44vw;      /* 方形盘，宽随高走且不超屏宽 44% */
    flex: 1; min-height: 0; aspect-ratio: 1;
    padding: 8px;
  }
  #btnBackBet { display: none !important; }   /* 电脑端同屏，无需返回 */
  /* 右栏：押注区三行网格（LED / 押注桌 / 筹码+操作键，与手机横屏完全一致） */
  #betScreen {
    flex: 1; min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr auto;
    gap: 6px 10px;
  }
  #ledBar { grid-column: 1 / -1; grid-row: 1; margin: 0; }
  #betTable { grid-column: 1 / -1; grid-row: 2; padding: 0; min-height: 0; }
  .bt-grid-v { display: none; }
  .bt-grid-h { display: grid; }
  .bt-grid-h .bet-cell { font-size: 14px; }
  .bt-grid-h .bc-out { font-size: 12px; }
  /* 底行：左筹码档横排、右操作键横排（标准赌场底栏样式） */
  #chips { grid-column: 1; grid-row: 3; padding: 4px 0 0; align-self: center; }
  #actions { grid-column: 2; grid-row: 3; padding: 4px 0 0; gap: 10px; align-self: center; }
  #actions .btn-act { flex: none; padding: 12px 24px; }
  /* 独显切换（显隐由 js 控制，这里只管排版尺寸）：
     押注独显 = 押注区撑满整屏；轮盘独显 = 左侧大轮盘 + 右侧开奖记录栏 */
  #screens.solo-bet #betScreen { flex: 1 1 auto; }
  #screens.solo-wheel #wheelScreen { flex: 1; min-width: 0; }
  #screens.solo-wheel #wheelCol { width: 100%; }
  #screens.solo-wheel #wheelWrap {
    flex: none; width: min(calc(100dvh - 150px), 100%); max-width: none;
  }
  #screens.solo-wheel #sidePanel { flex: 0 0 290px; }
}
