/* 3×3 老虎机 · 娱乐小游戏（纯积分，无任何真实货币）
   视觉语言沿用 doudizhu / uno：暗绿毛毡、白色卡片、金色点缀 */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --felt: #1c6b46;
  --felt-dark: #145034;
  --panel: #ffffff;
  --panel-border: #d9e2dc;
  --ink: #1c2b24;
  --accent: #0f8a5f;
  --accent-dark: #0b6b49;
  --warn: #c0392b;
  --gold: #d4a017;
  --gold-bright: #f3ce62;
  --gold-pale: #fff8df;
  --gold-deep: #8a6400;
  --red: #d63031;
  --gray: #7a8a80;
  --blue: #2563a8;
  --bg-deep: #07180f;
}

html { color-scheme: dark; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% -8%, rgba(212, 160, 23, .18), transparent 36%),
    radial-gradient(circle at 92% 4%, rgba(15, 138, 95, .26), transparent 38%),
    linear-gradient(160deg, #07180f 0%, #10281d 48%, #07180f 100%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, .035) 46px 47px);
  z-index: 0;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }

.app {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px 28px;
}

/* ---------- 通用按钮 / 卡片 ---------- */
.btn {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s, opacity .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn.big { font-size: 19px; padding: 16px 30px; }
.btn.alt { background: var(--blue); }
.btn.alt:hover { background: #1d4f85; }
.btn.warn { background: var(--gold); color: #332500; }
.btn.warn:hover { background: #b58910; }
.btn.gold {
  background: linear-gradient(180deg, #f8dc86 0%, var(--gold) 55%, #ac7c08 100%);
  color: #2f2300;
  border-color: #ffe8a5;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}
.btn.gold:hover { background: linear-gradient(180deg, #ffe7a0 0%, #e3b32a 55%, #b9870b 100%); }
.btn.ghost { background: transparent; color: #cfe3d7; border-color: #3d5c4c; }
.btn.ghost:hover { background: rgba(255, 255, 255, .08); }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

input {
  padding: 10px 12px;
  border: 1px solid #b9ccc1;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  background: #fbfdfc;
  color: var(--ink);
  min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #95a69b; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 138, 95, .12); }

.card-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .28);
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  background: #e4efe9;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.tag.gold { background: #fdf3d5; color: #7b5900; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.panel-head h2 {
  font-size: 16px;
  color: #1e3a2c;
  letter-spacing: .02em;
}
.empty-note {
  color: var(--gray);
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(212, 160, 23, .34);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(212, 160, 23, .12), transparent 35%),
    linear-gradient(135deg, rgba(12, 36, 24, .94), rgba(8, 24, 16, .9));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
  color: #eaf5ee;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-badge {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 29px;
  background: linear-gradient(160deg, #f7d977, #b8860b 72%);
  border: 1px solid #ffe8a8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.brand-copy { min-width: 0; }
.brand-copy h1 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: .04em;
  color: #fff;
  white-space: nowrap;
}
.brand-en {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--gold-bright);
  vertical-align: 3px;
  font-weight: 700;
}
.slogan { margin-top: 4px; font-size: 12px; color: #a9c9b6; line-height: 1.4; }
.slogan b { color: var(--gold-bright); }

.topbar-side {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.conn-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #cfe3d7;
  background: rgba(255, 255, 255, .06);
  border: 1px solid #3d5c4c;
  transition: .15s;
}
.conn-tag:hover { background: rgba(255, 255, 255, .12); }
.conn-tag:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.conn-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gray);
  box-shadow: 0 0 0 3px rgba(122, 138, 128, .16);
}
.conn-tag.online .conn-dot { background: #42d392; box-shadow: 0 0 0 3px rgba(66, 211, 146, .16); }
.conn-tag.connecting .conn-dot { background: var(--gold-bright); animation: dot-blink 1s steps(2, end) infinite; }
.conn-tag.offline .conn-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(214, 48, 49, .16); }

.settle-strip {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: rgba(0, 0, 0, .26);
  border: 1px solid rgba(255, 255, 255, .08);
}
.settle-item {
  min-width: 90px;
  padding: 3px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.settle-item + .settle-item { border-left: 1px solid rgba(255, 255, 255, .1); }
.settle-item span { font-size: 10px; color: #91b19f; letter-spacing: .04em; }
.settle-item strong {
  font-size: 17px;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.account-link { white-space: nowrap; }

/* ---------- 页面网格 ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}
.play-col, .side-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- 机柜 ---------- */
.machine {
  position: relative;
  padding: 12px;
  border: 3px solid var(--gold);
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 0, rgba(243, 206, 98, .18), transparent 34%),
    linear-gradient(155deg, #245740 0%, #123422 48%, #0a1f14 100%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, .48),
    inset 0 0 0 2px rgba(255, 235, 160, .18),
    inset 0 0 40px rgba(0, 0, 0, .38);
  overflow: hidden;
}
.machine::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(255, 223, 124, .28);
  border-radius: 17px;
  pointer-events: none;
}
.machine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255, 255, 255, .35), transparent 16%, transparent 74%, rgba(255, 255, 255, .08));
  opacity: .22;
  pointer-events: none;
}

.machine-head {
  position: relative;
  z-index: 2;
  margin: 2px 4px 10px;
  padding: 9px 16px;
  border-radius: 13px;
  text-align: center;
  color: #2d2100;
  background: linear-gradient(90deg, #7a5306 0%, #d4a017 22%, #ffe9a6 50%, #d4a017 78%, #7a5306 100%);
  border: 1px solid #ffe9a6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 4px 12px rgba(0, 0, 0, .35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .28);
}
.marquee-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.2;
}
.marquee-title span {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(45, 33, 0, .78);
  color: #ffe58f;
  letter-spacing: .06em;
  font-size: 15px;
  vertical-align: 2px;
}
.marquee-sub {
  margin-top: 2px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .34em;
  opacity: .72;
}

.machine-body { position: relative; z-index: 2; }

.reels {
  --cell-h: clamp(62px, 7.4vw, 84px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 11px;
  border-radius: 16px;
  background: linear-gradient(180deg, #050f09 0%, #0d2417 100%);
  box-shadow:
    inset 0 0 0 2px rgba(212, 160, 23, .38),
    inset 0 18px 34px rgba(0, 0, 0, .8),
    inset 0 -8px 26px rgba(0, 0, 0, .55);
}
.reel {
  position: relative;
  height: calc(var(--cell-h) * 3);
  overflow: hidden;
  border-radius: 11px;
  border: 2px solid rgba(212, 160, 23, .58);
  background: #0a1810;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .85), 0 3px 10px rgba(0, 0, 0, .45);
}
.reel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 8px;
  background: linear-gradient(105deg, rgba(255, 255, 255, .23) 0%, transparent 32%, transparent 68%, rgba(255, 255, 255, .07) 100%);
  z-index: 4;
}
.reel-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
  backface-visibility: hidden;
}
.symbol-cell {
  position: relative;
  flex: 0 0 var(--cell-h);
  height: var(--cell-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  overflow: hidden;
  color: #25342c;
  background: linear-gradient(180deg, #fffdf6 0%, #f6ecd8 100%);
  border-bottom: 1px solid #dfceac;
  box-shadow: inset 0 8px 10px rgba(255, 255, 255, .55), inset 0 -10px 12px rgba(120, 91, 31, .08);
}
.symbol-cell:last-child { border-bottom: 0; }
.symbol-emoji {
  display: block;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .16));
}
.symbol-name {
  display: block;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  color: #86713e;
  letter-spacing: .04em;
}

/* 高速滚动：strip 中放两份同序列，位移 50% 后无缝循环 */
@keyframes reel-roll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -50%, 0); }
}
.reel.rolling .reel-strip {
  animation: reel-roll .3s linear infinite;
  filter: blur(.35px);
}
.reel:nth-child(2).rolling .reel-strip { animation-duration: .26s; }
.reel:nth-child(3).rolling .reel-strip { animation-duration: .34s; }
.reel.rolling::after { opacity: .55; }

@keyframes reel-land {
  0% { transform: translate3d(0, -12%, 0); }
  62% { transform: translate3d(0, 1.8%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
.reel.stopped .reel-strip { animation: reel-land .32s cubic-bezier(.2, .8, .3, 1); }
.reel.stopped { border-color: rgba(255, 220, 120, .95); box-shadow: inset 0 0 22px rgba(0, 0, 0, .8), 0 0 16px rgba(212, 160, 23, .35); }

/* 中奖符号：金色底灯（径向光晕 + 呼吸发光 + 图标投影光） */
.symbol-cell.is-win {
  border-color: rgba(255, 226, 122, .95);
  background:
    radial-gradient(circle at 50% 64%, rgba(255, 248, 196, .98) 0%, rgba(255, 219, 102, .92) 42%, rgba(236, 178, 40, .55) 72%, rgba(120, 84, 8, .18) 100%),
    linear-gradient(180deg, #fff8d6 0%, #f4ca55 100%);
  z-index: 3;
  animation: win-cell .45s ease both, win-glow 1.6s ease-in-out .45s infinite;
}
.symbol-cell.is-win::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 58%;
  width: 82%;
  height: 72%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 200, .95) 0%, rgba(255, 220, 100, .5) 52%, rgba(255, 200, 60, 0) 78%);
  pointer-events: none;
  animation: win-lamp 1.6s ease-in-out .45s infinite;
}
.symbol-cell.is-win .symbol-emoji {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 8px rgba(255, 240, 160, .95)) drop-shadow(0 0 18px rgba(255, 196, 40, .6));
}
.symbol-cell.is-win .symbol-name {
  color: #6d5100;
  position: relative;
  z-index: 1;
}
@keyframes win-cell {
  0% { transform: scale(.94); filter: brightness(1); }
  55% { transform: scale(1.03); filter: brightness(1.12); }
  100% { transform: scale(1); filter: brightness(1); }
}
@keyframes win-glow {
  0%, 100% { box-shadow: inset 0 0 14px rgba(255, 226, 122, .7), 0 0 12px rgba(255, 205, 60, .35); }
  50% { box-shadow: inset 0 0 26px rgba(255, 244, 170, .95), 0 0 26px rgba(255, 205, 60, .7); }
}
@keyframes win-lamp {
  0%, 100% { opacity: .75; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}

/* 赢分浮层 */
.win-pop {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 9;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 15px 26px 13px;
  border-radius: 18px;
  border: 2px solid #fff1b1;
  color: #392a00;
  background:
    radial-gradient(circle at 50% 0%, #fff7cc 0%, transparent 55%),
    linear-gradient(160deg, #f8d363 0%, #d4a017 64%, #a97808 100%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .65), 0 0 28px rgba(255, 215, 80, .5);
  pointer-events: none;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .3);
}
.win-pop.is-popping { animation: win-pop .52s cubic-bezier(.18, 1.35, .4, 1) both; }
.win-pop-title { font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.win-pop-amount {
  margin-top: 2px;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 900;
  color: #4a3400;
  font-variant-numeric: tabular-nums;
}
.win-pop-unit { font-size: 10px; font-weight: 800; letter-spacing: .18em; opacity: .65; }
@keyframes win-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.55) rotate(-5deg); }
  65% { opacity: 1; transform: translate(-50%, -50%) scale(1.06) rotate(1deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}

.machine-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 4px 2px;
  padding: 8px 12px;
  border-radius: 10px;
  color: #d9ece1;
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
  line-height: 1.5;
}
.status-line { font-weight: 600; min-width: 0; }
.status-line.win { color: #ffe395; }
.status-line.warn { color: #ffc1b9; }
.status-line.spin { color: #bfe9d2; }
.machine-meta {
  flex: 0 0 auto;
  font-size: 10px;
  letter-spacing: .05em;
  color: #92b3a1;
  font-weight: 700;
}

/* ---------- 下注区 ---------- */
.bet-panel { padding-bottom: 14px; }
.bet-head { margin-bottom: 10px; }
.bet-head h2 { font-size: 17px; }
.bet-help { margin-top: 3px; font-size: 12px; color: var(--gray); line-height: 1.4; }

.bet-levels {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.bet-level {
  min-height: 38px;
  padding: 7px 5px;
  border: 1px solid #cfa77a;
  border-radius: 9px;
  background: #fffaf0;
  color: #6e5100;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: .15s;
}
.bet-level:hover:not(:disabled) { border-color: var(--gold); background: #fff2cc; transform: translateY(-1px); }
.bet-level:disabled { opacity: .4; cursor: not-allowed; }
.bet-level:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bet-level.active {
  color: #fff;
  border-color: #ffe291;
  background: linear-gradient(160deg, #227552, var(--felt-dark));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 3px 10px rgba(20, 80, 52, .3);
}
.bet-empty { grid-column: 1 / -1; padding: 8px; color: var(--gray); font-size: 12px; }

.bet-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 11px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f5f9f6;
  border: 1px solid #e1ebe5;
}
.bet-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bet-stat span { font-size: 10px; color: var(--gray); }
.bet-stat b {
  font-size: 16px;
  color: #1d4030;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bet-stat:nth-child(2) b { color: var(--gold-deep); }

.low-chips {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid #f0d59b;
  border-radius: 10px;
  background: #fff8e5;
  color: #735500;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}
.low-chips .btn { flex: 0 0 auto; }

.spin-row { display: flex; gap: 10px; align-items: stretch; }
.spin-btn {
  flex: 1;
  min-height: 50px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .06em;
  border-radius: 12px;
  border: 2px solid #ffe99f;
  box-shadow: 0 6px 18px rgba(138, 100, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .65);
}
.spin-btn:hover:not(:disabled) { box-shadow: 0 8px 22px rgba(138, 100, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .65); }
.spin-btn:disabled { opacity: .5; filter: saturate(.6); }
.spin-btn.is-spinning { animation: spin-pulse 1s ease-in-out infinite; }
@keyframes spin-pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(138, 100, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .6); }
  50% { box-shadow: 0 6px 24px rgba(255, 212, 74, .55), inset 0 1px 0 rgba(255, 255, 255, .8); }
}
.allin-btn {
  flex: 0 0 96px;
  background: #173c2a;
  border: 1px solid #4d775f;
  color: #d9ece1;
  border-radius: 12px;
  font-size: 15px;
}
.allin-btn:hover:not(:disabled) { background: #20503a; }
.allin-btn:disabled { opacity: .45; }
.bet-note { margin-top: 8px; font-size: 10px; line-height: 1.5; color: #8a9a90; }

/* ---------- 历史与最近结果 ---------- */
.recent-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid #e2ebe5;
  background: #f7faf8;
  color: #53685c;
}
.recent-result.empty { color: var(--gray); }
.recent-result.win { background: linear-gradient(135deg, #fff8df, #fdf0c2); border-color: #eed48c; color: #6d5100; }
.recent-result.lose { background: #f6f8f7; color: #637168; }
.recent-main { font-weight: 800; font-size: 15px; }
.recent-sub { font-size: 11px; color: #8b9a90; }
.recent-result.win .recent-sub { color: #97772e; }

.history-list {
  margin-top: 9px;
  max-height: 215px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c8d8ce transparent;
}
.history-list::-webkit-scrollbar { width: 6px; }
.history-list::-webkit-scrollbar-thumb { background: #c8d8ce; border-radius: 99px; }
.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 2px;
  border-bottom: 1px dashed #e4ece7;
  font-size: 12px;
}
.history-row:last-child { border-bottom: 0; }
.hist-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hist-title { color: #34493d; font-weight: 700; }
.hist-sub { color: #92a196; font-size: 10px; }
.hist-amount {
  flex: 0 0 auto;
  font-weight: 900;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #9aa79f;
}
.hist-amount.win { color: var(--accent-dark); }
.history-list .empty-note { padding: 10px 2px; }

/* ---------- 账号 ---------- */
.field-label { display: block; margin: 0 0 5px; font-size: 12px; color: var(--gray); }
.acct-row { display: flex; gap: 8px; }
.acct-row input { flex: 1; width: 50%; padding: 9px 10px; font-size: 14px; }
.acct-btns { display: flex; gap: 8px; margin-top: 9px; }
.acct-btns .btn { flex: 1; }
.acct-hint { margin-top: 8px; font-size: 11px; line-height: 1.55; color: var(--gray); }
.acct-profile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acct-avatar-link {
  flex: 0 0 auto;
  display: block;
  border-radius: 50%;
  line-height: 0;
}
.acct-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  background: #dfe9e2;
  border: 2px solid var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.acct-avatar-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acct-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acct-info b {
  font-size: 15px;
  color: #21382c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-records, .acct-bank { font-size: 11px; color: var(--gray); line-height: 1.4; }
.acct-bank { color: var(--gold-deep); font-weight: 700; }
.acct-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.acct-actions .btn { padding: 4px 8px; font-size: 11px; white-space: nowrap; }
.account-card .btn.ghost { color: var(--gray); border-color: #b9ccc1; }
.account-card .btn.ghost:hover { background: #eef4ef; color: var(--ink); }

/* ---------- 筹码 ---------- */
.wallet-big {
  position: relative;
  overflow: hidden;
  padding: 12px 14px 11px;
  border-radius: 12px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 10%, rgba(243, 206, 98, .24), transparent 34%),
    linear-gradient(145deg, #1d6c49, #0e3a27);
  border: 1px solid rgba(212, 160, 23, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wallet-big::after {
  content: "🪙";
  position: absolute;
  right: 10px;
  bottom: 4px;
  font-size: 38px;
  opacity: .18;
  transform: rotate(-12deg);
}
.wallet-big span { font-size: 11px; color: #b6d8c5; }
.wallet-big b {
  font-size: 33px;
  line-height: 1.15;
  color: #ffe18a;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .28);
  max-width: calc(100% - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.wallet-big small { font-size: 9px; color: #94bea7; letter-spacing: .12em; }
.wallet-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  font-size: 11px;
  color: var(--gray);
}
.wallet-meta b { color: #365043; font-weight: 800; font-variant-numeric: tabular-nums; }
.wallet-hint { margin: 8px 0; font-size: 11px; line-height: 1.5; color: var(--gray); }
.chips-card .btn { width: 100%; }

/* ---------- 支付表 ---------- */
.line-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  background: #f6faf7;
  border: 1px solid #e2ece6;
  min-height: 45px;
}
.line-mini {
  width: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #e2eae5;
  cursor: default;
}
.line-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 2px;
}
.line-dot { display: block; border-radius: 50%; background: #d7e3db; }
.line-dot.active { background: var(--gold); box-shadow: 0 0 0 1px rgba(212, 160, 23, .25); }
.line-mini-no { font-size: 9px; color: var(--gray); font-weight: 800; line-height: 1; }

.pay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}
.pay-grid > .empty-note { grid-column: 1 / -1; }
.pay-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
  padding: 7px 8px;
  border-radius: 9px;
  border: 1px solid #e6eee9;
  background: linear-gradient(180deg, #fffdf8, #fbf8ee);
}
.pay-emoji { grid-row: 1 / span 2; font-size: 23px; line-height: 1; text-align: center; }
.pay-name {
  font-size: 11px;
  font-weight: 800;
  color: #4b5b51;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pay-mults { display: flex; flex-wrap: wrap; gap: 3px; }
.pay-mult {
  font-size: 9px;
  line-height: 1.5;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 4px;
  color: #7a5900;
  background: #fdf2cd;
  white-space: nowrap;
}
.pay-note { margin-top: 9px; font-size: 10px; line-height: 1.55; color: #94a198; }

/* ---------- 页脚 / Toast / 弹窗 ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 0 4px;
  color: #8fae9d;
  font-size: 11px;
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 120;
  transform: translateX(-50%) translateY(18px);
  max-width: 90vw;
  padding: 10px 20px;
  border-radius: 10px;
  background: #f7fbf8;
  color: #193225;
  border: 1px solid rgba(212, 160, 23, .45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .42);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(2px);
}
.modal-card {
  width: 100%;
  max-width: 360px;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #ead9a7;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.modal-card h3 { margin-bottom: 9px; font-size: 18px; color: #2b432f; }
.modal-card p { font-size: 13px; line-height: 1.7; color: #465a4d; }
.modal-btns { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.modal-card .btn.ghost { color: var(--gray); border-color: #c7d6cc; }
.modal-card .btn.ghost:hover { background: #f1f6f3; color: var(--ink); }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .account-card, .chips-card { min-width: 0; }
  .paytable-card { grid-column: 1 / -1; }
  .pay-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .app { padding: 10px 10px 22px; }
  .topbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 11px 12px; }
  .brand-copy h1 { font-size: 19px; white-space: normal; }
  .brand-en { display: none; }
  .brand-badge { width: 46px; height: 46px; font-size: 25px; border-radius: 12px; }
  .slogan { font-size: 11px; }
  .topbar-side { justify-content: space-between; gap: 7px; }
  .account-link { padding: 5px 9px; font-size: 12px; }
  .settle-strip { order: 3; flex: 1 1 100%; }
  .settle-item { flex: 1; min-width: 0; }
  .layout { margin-top: 11px; gap: 11px; }
  .play-col, .side-col { gap: 11px; }
  .side-col { display: flex; }
  .pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .machine { padding: 9px; border-radius: 20px; }
  .machine-head { margin: 1px 1px 8px; padding: 7px 8px; }
  .marquee-title { font-size: 15px; letter-spacing: .07em; }
  .marquee-title span { font-size: 12px; margin-left: 2px; }
  .marquee-sub { font-size: 7px; letter-spacing: .22em; }
  .reels { --cell-h: clamp(58px, 17.8vw, 74px); gap: 6px; padding: 7px; border-radius: 13px; }
  .reel { border-width: 1px; border-radius: 8px; }
  .symbol-emoji { font-size: clamp(27px, 8.5vw, 36px); }
  .symbol-name { font-size: 9px; }
  .machine-foot { margin: 8px 1px 1px; padding: 7px 9px; font-size: 11px; flex-wrap: wrap; gap: 4px 8px; }
  .machine-meta { font-size: 9px; }
  .card-panel { padding: 13px 14px; }
  .bet-levels { gap: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bet-level { min-height: 35px; font-size: 13px; }
  .bet-summary { gap: 5px; padding: 8px; }
  .bet-stat b { font-size: 14px; }
  .spin-btn { font-size: 19px; min-height: 47px; }
  .allin-btn { flex-basis: 78px; }
  .history-list { max-height: 190px; }
  .acct-row input { padding: 8px 9px; font-size: 13px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 2px; }
}

@media (max-width: 360px) {
  .topbar-side { gap: 6px; }
  .conn-tag { padding: 4px 8px; font-size: 11px; }
  .settle-item { padding: 2px 7px; }
  .settle-item strong { font-size: 15px; }
  .reels { --cell-h: 58px; }
  .bet-head .tag { display: none; }
  .bet-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .low-chips { align-items: flex-start; flex-direction: column; }
  .low-chips .btn { width: 100%; }
  .acct-profile { align-items: flex-start; flex-wrap: wrap; }
  .acct-info { flex-basis: calc(100% - 70px); }
  .acct-actions { flex-direction: row; width: 100%; }
  .acct-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
