/* ===========================================================
   app.css — Holdem Lab 视觉层
   深色牌桌 / 金色强调 / 毛玻璃面板
   =========================================================== */

:root {
  --bg-0: #0a0e0d;
  --bg-1: #111816;
  --bg-2: #17211e;
  --felt-1: #1d5c46;
  --felt-2: #12402f;
  --felt-3: #0c2b20;
  --rail-1: #3a2a18;
  --rail-2: #1a1209;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --txt-1: #eef4f1;
  --txt-2: #a8b8b2;
  --txt-3: #6d807a;
  --gold: #d8b168;
  --gold-2: #f0d49a;
  --green: #3fbf87;
  --red: #e2564f;
  --blue: #5b9dd9;
  --purple: #a274d6;
  --radius: 14px;
  --shadow-1: 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-2: 0 12px 40px rgba(0, 0, 0, .45);
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg-0);
  color: var(--txt-1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

#app {
  height: 100vh;
  display: grid;
  grid-template-rows: 56px 1fr auto;
  background:
    radial-gradient(1200px 700px at 50% 0%, #16221f 0%, var(--bg-0) 62%);
  position: relative;
}

/* ============ 顶栏 ============ */
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(23, 33, 30, .9), rgba(13, 18, 17, .7));
  backdrop-filter: blur(12px);
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(145deg, var(--gold-2), #b98f45);
  display: grid; place-items: center;
  font-size: 15px; color: #24190a; font-weight: 800;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset, 0 3px 10px rgba(216, 177, 104, .25);
}
.brand-name { font-size: 14px; font-weight: 650; letter-spacing: .3px; }
.brand-name span { color: var(--txt-3); font-weight: 400; margin-left: 6px; font-size: 12px; }

.stat-group { display: flex; align-items: center; gap: 20px; margin-left: 8px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-k { font-size: 10px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .8px; }
.stat-v { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.stat-v.pos { color: var(--green); }
.stat-v.neg { color: var(--red); }

.progress-wrap { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.progress-label { font-size: 11px; color: var(--txt-3); white-space: nowrap; }
.progress-bar {
  width: 120px; height: 5px; border-radius: 3px;
  background: rgba(255, 255, 255, .08); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #b98f45, var(--gold-2));
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
}

.icon-btn {
  height: 32px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .04);
  font-size: 12px; color: var(--txt-2);
  display: inline-flex; align-items: center; gap: 6px;
  transition: .16s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .09); color: var(--txt-1); border-color: rgba(255, 255, 255, .28); }
.icon-btn.gold { border-color: rgba(216, 177, 104, .45); color: var(--gold-2); background: rgba(216, 177, 104, .1); }
.icon-btn.gold:hover { background: rgba(216, 177, 104, .2); }

/* ============ 主区 ============ */
.main { position: relative; display: flex; min-height: 0; }

.table-zone {
  flex: 1; position: relative; min-width: 0;
  display: grid; place-items: center;
  padding: 22px 16px;
}

/* 牌桌 */
.felt {
  position: relative;
  width: min(1000px, 96%);
  aspect-ratio: 1.72 / 1;
  flex: 0 0 auto;
  border-radius: 46% / 50%;
  background:
    radial-gradient(ellipse at 50% 42%, #26765a 0%, var(--felt-1) 32%, var(--felt-2) 65%, var(--felt-3) 100%);
  box-shadow:
    0 0 0 8px var(--rail-1),
    0 0 0 9px rgba(216, 177, 104, .35),
    0 0 0 18px var(--rail-2),
    0 0 0 19px rgba(0, 0, 0, .5),
    0 30px 80px rgba(0, 0, 0, .6),
    inset 0 0 100px rgba(0, 0, 0, .45);
}
.felt::before {
  content: ''; position: absolute; inset: 26px;
  border-radius: 46% / 50%;
  border: 1px solid rgba(255, 255, 255, .07);
  pointer-events: none;
}
.felt::after {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 4px);
  pointer-events: none;
}
.felt-watermark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 11px; letter-spacing: 8px; color: rgba(255, 255, 255, .07);
  font-weight: 700; pointer-events: none; white-space: nowrap;
}

/* 中央 */
.center {
  position: absolute; left: 50%; top: calc(50% + var(--center-shift, 0px)); transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 100%;
}
.pot-display {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 14px;
}
.pot-label { font-size: 9.5px; letter-spacing: 1.6px; color: rgba(255, 255, 255, .45); text-transform: uppercase; }
.pot-value {
  font-family: var(--mono); font-size: 21px; font-weight: 600;
  color: var(--gold-2); font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px rgba(216, 177, 104, .35);
  transition: transform .2s;
}
.pot-value.bump { animation: potBump .34s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes potBump { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }

.board { display: flex; gap: 7px; min-height: 70px; align-items: center; }
.board-slot {
  width: 50px; height: 70px; border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, .12);
  display: grid; place-items: center;
  color: rgba(255, 255, 255, .12); font-size: 16px;
}
.street-tag {
  font-size: 10px; letter-spacing: 2px; color: rgba(255, 255, 255, .38);
  text-transform: uppercase; height: 12px;
}

/* 牌 */
.card {
  position: relative;
  width: 50px; height: 70px;
  border-radius: 6px;
  background: linear-gradient(160deg, #fdfefd 0%, #eef1ef 55%, #e2e7e4 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 0 0 1px rgba(0, 0, 0, .25), inset 0 1px 0 #fff;
  color: #171d1b;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 4px 5px;
  flex: 0 0 auto;
  user-select: none;
  animation: cardIn .32s cubic-bezier(.2, .9, .3, 1.2) backwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(-14px) scale(.92) rotateX(-40deg); }
  to { opacity: 1; transform: none; }
}
.card.red { color: #c8362f; }
.card .r { font-size: 16px; font-weight: 750; line-height: 1; letter-spacing: -.5px; }
.card .s { font-size: 13px; line-height: 1; align-self: flex-start; }
.card .big {
  position: absolute; right: 4px; bottom: 2px;
  font-size: 22px; opacity: .92; line-height: 1;
}
.card.back {
  background:
    repeating-linear-gradient(45deg, #7c2c2c 0 4px, #6a2323 4px 8px),
    linear-gradient(160deg, #8c3434, #5e1e1e);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .12);
}
.card.back::after {
  content: ''; position: absolute; inset: 6px;
  border-radius: 3px; border: 1px solid rgba(255, 255, 255, .18);
}
.card.hero { width: 64px; height: 90px; border-radius: 8px; padding: 6px 7px; }
.card.hero .r { font-size: 21px; }
.card.hero .big { font-size: 30px; right: 6px; bottom: 3px; }
.card.mini { width: 34px; height: 48px; padding: 3px 4px; }
.card.mini .r { font-size: 12px; }
.card.mini .big { display: none; }
.card.dim { filter: brightness(.62) saturate(.7); }
.card.win { box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(216, 177, 104, .7), 0 2px 6px rgba(0, 0, 0, .4); }
.card.deal-in { animation: cardIn .32s cubic-bezier(.2, .9, .3, 1.2) backwards; }

/* 座位 */
.seat {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--seat-scale, 1));
  transform-origin: 50% 50%;
  width: 128px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  z-index: 5;
  transition: opacity .3s;
}
.seat.folded { opacity: .38; }
.avatar-wrap { position: relative; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 17px; font-weight: 700;
  background: linear-gradient(150deg, #2e4038, #1a2620);
  border: 1.5px solid rgba(255, 255, 255, .14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
  color: var(--txt-2);
  transition: .25s;
}
.seat.acting .avatar {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(216, 177, 104, .18), 0 0 22px rgba(216, 177, 104, .45);
  animation: pulseAct 1.6s ease-in-out infinite;
}
@keyframes pulseAct {
  0%, 100% { box-shadow: 0 0 0 3px rgba(216, 177, 104, .18), 0 0 18px rgba(216, 177, 104, .35); }
  50% { box-shadow: 0 0 0 5px rgba(216, 177, 104, .1), 0 0 26px rgba(216, 177, 104, .55); }
}
.seat.hero .avatar { border-color: rgba(255, 255, 255, .3); }
.seat-name {
  font-size: 11.5px; font-weight: 600; color: var(--txt-1);
  white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis;
}
.seat-prof { font-size: 9.5px; color: var(--txt-3); letter-spacing: .3px; }
.seat-stack {
  font-family: var(--mono); font-size: 11.5px; color: var(--gold-2);
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, .4); padding: 1px 8px; border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .07);
}
.seat-cards { display: flex; gap: 3px; height: 48px; align-items: center; }
.seat-bubble {
  position: absolute; top: -6px; left: 50%; transform: translate(-50%, -100%);
  background: rgba(12, 18, 16, .94); border: 1px solid var(--line-strong);
  padding: 3px 9px; border-radius: 7px; font-size: 11px; white-space: nowrap;
  color: var(--txt-1); box-shadow: var(--shadow-1); backdrop-filter: blur(6px);
  z-index: 8;
}
.seat-bubble.fold { color: var(--txt-3); }
.seat-bubble.bet { color: var(--gold-2); border-color: rgba(216, 177, 104, .4); }
.seat-bubble.allin { color: var(--red); border-color: rgba(226, 86, 79, .5); }
.badge {
  position: absolute; bottom: -4px; right: -6px;
  font-size: 8.5px; font-weight: 700; padding: 1px 5px; border-radius: 5px;
  background: #2b3a33; color: var(--txt-2); border: 1px solid var(--line-strong);
  letter-spacing: .4px;
}
.badge.btn { background: linear-gradient(150deg, #f0d49a, #c9a25a); color: #24190a; border-color: transparent; }
.badge.sb, .badge.bb { background: #24312b; }
.badge.allin { background: rgba(226, 86, 79, .18); color: #ff8a84; border-color: rgba(226, 86, 79, .4); }

/* 下注筹码 */
.bet-chips {
  position: absolute; display: flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 11px; color: var(--gold-2);
  background: rgba(0, 0, 0, .38); padding: 2px 7px 2px 3px; border-radius: 20px;
  border: 1px solid rgba(216, 177, 104, .25);
  white-space: nowrap;
  animation: chipIn .28s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes chipIn { from { opacity: 0; transform: translateY(8px) scale(.85); } to { opacity: 1; transform: none; } }
.chip-icon {
  width: 13px; height: 13px; border-radius: 50%;
  background: conic-gradient(#d8b168 0 25%, #f0d49a 0 50%, #d8b168 0 75%, #f0d49a 0);
  border: 1px solid rgba(0, 0, 0, .4);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

/* ============ 底部控制台 ============ */
.console {
  position: relative;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 23, 21, .92), rgba(9, 13, 12, .98));
  backdrop-filter: blur(14px);
  padding: 12px 20px 14px;
  z-index: 30;
}
.console-inner {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: center;
}
.hero-hand { display: flex; flex-direction: column; gap: 6px; }
.hero-hand-label { font-size: 10px; letter-spacing: 1.4px; color: var(--txt-3); text-transform: uppercase; }
.hero-cards { display: flex; gap: 7px; }
.hero-meta { font-size: 11px; color: var(--txt-2); font-family: var(--mono); }
.hero-meta b { color: var(--gold-2); font-weight: 600; }

.actions { display: flex; flex-direction: column; gap: 10px; }
.action-row { display: flex; gap: 8px; align-items: stretch; }
.act-btn {
  flex: 1; height: 46px; border-radius: 11px;
  font-size: 14px; font-weight: 620; letter-spacing: .3px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .05);
  color: var(--txt-1);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  transition: .15s;
  position: relative; overflow: hidden;
}
.act-btn small { font-size: 10px; font-weight: 400; color: var(--txt-3); font-family: var(--mono); }
.act-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); transform: translateY(-1px); }
.act-btn:active:not(:disabled) { transform: translateY(0) scale(.99); }
.act-btn:disabled { opacity: .3; cursor: not-allowed; }
.act-btn.fold { border-color: rgba(226, 86, 79, .3); }
.act-btn.fold:hover:not(:disabled) { background: rgba(226, 86, 79, .16); border-color: rgba(226, 86, 79, .55); }
.act-btn.call { border-color: rgba(91, 157, 217, .3); }
.act-btn.call:hover:not(:disabled) { background: rgba(91, 157, 217, .16); border-color: rgba(91, 157, 217, .55); }
.act-btn.raise {
  background: linear-gradient(180deg, rgba(240, 212, 154, .95), rgba(201, 162, 90, .95));
  color: #241704; border-color: transparent;
  box-shadow: 0 3px 14px rgba(216, 177, 104, .25);
}
.act-btn.raise small { color: rgba(36, 23, 4, .6); }
.act-btn.raise:hover:not(:disabled) { box-shadow: 0 5px 20px rgba(216, 177, 104, .42); }
.hint-key {
  position: absolute; top: 4px; right: 6px; font-size: 9px;
  opacity: .38; font-family: var(--mono);
}

.sizing { display: flex; align-items: center; gap: 8px; }
.sizing-label { font-size: 10px; color: var(--txt-3); letter-spacing: .8px; white-space: nowrap; }
.slider-wrap { flex: 1; position: relative; display: flex; align-items: center; }
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px; outline: none;
  background: linear-gradient(90deg, var(--gold) var(--fill, 30%), rgba(255, 255, 255, .12) var(--fill, 30%));
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: linear-gradient(160deg, #fff, #d8d8d8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .3);
  cursor: grab;
}
input[type=range]::-moz-range-thumb {
  width: 15px; height: 15px; border: none; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
.sizing-val {
  font-family: var(--mono); font-size: 12px; min-width: 58px; text-align: right;
  color: var(--gold-2); font-variant-numeric: tabular-nums;
}
.chips-row { display: flex; gap: 5px; }
.chip-btn {
  padding: 3px 9px; border-radius: 6px; font-size: 10.5px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  color: var(--txt-2); font-family: var(--mono); transition: .14s;
}
.chip-btn:hover { border-color: var(--gold); color: var(--gold-2); background: rgba(216, 177, 104, .1); }

/* ============ 侧栏 ============ */
.side {
  width: 320px; flex: 0 0 320px;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 25, 23, .95), rgba(11, 15, 14, .98));
  display: flex; flex-direction: column;
  min-height: 0; z-index: 20;
  transition: margin-right .3s cubic-bezier(.2, .8, .2, 1);
}
.side.collapsed { margin-right: -320px; }
.side-tabs { display: flex; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.side-tab {
  flex: 1; padding: 11px 4px; font-size: 11.5px; color: var(--txt-3);
  border-bottom: 2px solid transparent; transition: .15s; letter-spacing: .3px;
}
.side-tab:hover { color: var(--txt-2); background: rgba(255, 255, 255, .02); }
.side-tab.active { color: var(--gold-2); border-bottom-color: var(--gold); background: rgba(216, 177, 104, .06); }
.side-body { flex: 1; overflow-y: auto; padding: 14px; }
.side-body::-webkit-scrollbar { width: 6px; }
.side-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 3px; }

.panel-title {
  font-size: 10px; letter-spacing: 1.4px; color: var(--txt-3);
  text-transform: uppercase; margin: 0 0 10px;
}

/* 教练卡 */
.coach-card {
  border: 1px solid rgba(216, 177, 104, .25);
  background: linear-gradient(160deg, rgba(216, 177, 104, .09), rgba(216, 177, 104, .02));
  border-radius: var(--radius); padding: 13px; margin-bottom: 14px;
}
.coach-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.coach-title { font-size: 11.5px; color: var(--gold-2); font-weight: 620; letter-spacing: .4px; }
.coach-tag { font-size: 9px; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .35); color: var(--txt-3); }
.coach-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 12px; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.coach-row:last-child { border: none; }
.coach-k { color: var(--txt-2); }
.coach-v { font-family: var(--mono); color: var(--txt-1); font-variant-numeric: tabular-nums; }
.coach-v.good { color: var(--green); }
.coach-v.bad { color: var(--red); }
.coach-v.warn { color: #e8b45c; }
.coach-verdict { margin-top: 9px; font-size: 11.5px; line-height: 1.6; color: var(--txt-2); }
.coach-verdict b { color: var(--txt-1); }

/* 对手卡 */
.opp-card {
  border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 11px; margin-bottom: 8px;
  background: rgba(255, 255, 255, .02);
  transition: .15s;
}
.opp-card.acting { border-color: rgba(216, 177, 104, .45); background: rgba(216, 177, 104, .05); }
.opp-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.opp-name { font-size: 12.5px; font-weight: 600; }
.opp-prof { font-size: 10px; color: var(--txt-3); }
.opp-desc { font-size: 10.5px; color: var(--txt-2); line-height: 1.5; margin-bottom: 6px; }
.opp-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.opp-stat { font-size: 9.5px; color: var(--txt-3); font-family: var(--mono); }
.opp-stat b { color: var(--txt-1); font-weight: 600; }
.exploit {
  margin-top: 7px; padding-top: 7px; border-top: 1px dashed rgba(255, 255, 255, .07);
  font-size: 10.5px; color: #9fd8bd; line-height: 1.5;
}

/* 日志 */
.log-line {
  display: flex; gap: 8px; font-size: 11px; padding: 4px 0;
  color: var(--txt-2); border-bottom: 1px solid rgba(255, 255, 255, .04);
  font-family: var(--mono); line-height: 1.5;
}
.log-street { color: var(--gold); flex: 0 0 34px; font-size: 10px; }
.log-body { flex: 1; }
.log-body .w { color: var(--txt-1); }
.log-body .fold { color: var(--txt-3); }
.log-body .raise { color: var(--gold-2); }
.log-body .win { color: var(--green); }

/* ============ 复盘 ============ */
.review-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 8, 7, .82);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.review-overlay.show { display: flex; animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.review-panel {
  width: min(940px, 100%); max-height: 90vh;
  background: linear-gradient(170deg, #16201d, #0d1311);
  border: 1px solid var(--line-strong);
  border-radius: 18px; box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; overflow: hidden;
  animation: panelIn .32s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.review-head {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex: 0 0 auto;
}
.review-title { font-size: 17px; font-weight: 650; }
.review-sub { font-size: 11.5px; color: var(--txt-3); margin-top: 3px; }
.review-body { overflow-y: auto; padding: 20px 22px; }
.review-body::-webkit-scrollbar { width: 7px; }
.review-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .13); border-radius: 4px; }

.score-hero { display: grid; grid-template-columns: 168px 1fr; gap: 22px; margin-bottom: 22px; }
.score-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.score-ring { position: relative; width: 148px; height: 148px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring-txt {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.score-num { font-size: 38px; font-weight: 700; font-family: var(--mono); line-height: 1; }
.score-of { font-size: 10px; color: var(--txt-3); letter-spacing: 1px; margin-top: 3px; }
.score-grade { font-size: 12px; color: var(--gold-2); font-weight: 600; letter-spacing: 1px; }

.dims { display: flex; flex-direction: column; gap: 9px; }
.dim-row { display: grid; grid-template-columns: 84px 1fr 42px; gap: 10px; align-items: center; }
.dim-name { font-size: 11.5px; color: var(--txt-2); }
.dim-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.dim-fill { height: 100%; border-radius: 3px; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.dim-val { font-size: 11px; font-family: var(--mono); color: var(--txt-1); text-align: right; }

.rev-section-title {
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--txt-3); margin: 20px 0 10px; display: flex; align-items: center; gap: 9px;
}
.rev-section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.leak-list { display: flex; flex-direction: column; gap: 8px; }
.leak-item {
  display: flex; gap: 11px; padding: 11px 13px; border-radius: 10px;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line);
  border-left: 3px solid var(--red);
}
.leak-item.med { border-left-color: #e8b45c; }
.leak-item.low { border-left-color: var(--blue); }
.leak-idx { font-family: var(--mono); font-size: 10px; color: var(--txt-3); flex: 0 0 34px; padding-top: 2px; }
.leak-main { flex: 1; }
.leak-title { font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.leak-desc { font-size: 11.5px; color: var(--txt-2); line-height: 1.6; }
.leak-loss { font-family: var(--mono); font-size: 12px; color: var(--red); flex: 0 0 auto; text-align: right; }
.leak-loss span { display: block; font-size: 9px; color: var(--txt-3); }

table.rev-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
table.rev-table th {
  text-align: left; padding: 7px 9px; color: var(--txt-3); font-weight: 500;
  font-size: 10px; letter-spacing: .6px; text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong);
}
table.rev-table td { padding: 8px 9px; border-bottom: 1px solid var(--line); }
table.rev-table tr:hover td { background: rgba(255, 255, 255, .02); }
.tag-ok { color: var(--green); }
.tag-bad { color: var(--red); }
.tag-warn { color: #e8b45c; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.review-foot {
  padding: 14px 22px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex: 0 0 auto; background: rgba(0, 0, 0, .2);
}
.foot-note { font-size: 11px; color: var(--txt-3); line-height: 1.5; }

/* ============ 开始界面 ============ */
.setup {
  position: fixed; inset: 0; z-index: 200;
  background:
    radial-gradient(900px 600px at 50% 20%, #1a2b25 0%, #080b0a 70%);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  overflow-y: auto;
}
.setup.hidden { display: none; }
.setup-card {
  width: min(760px, 100%);
  background: linear-gradient(165deg, rgba(24, 34, 30, .96), rgba(12, 17, 15, .98));
  border: 1px solid var(--line-strong); border-radius: 20px;
  padding: 28px 30px 24px; box-shadow: var(--shadow-2);
}
.setup-hed { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.setup-h1 { font-size: 23px; font-weight: 700; letter-spacing: -.3px; margin: 0 0 6px; }
.setup-h1 em { font-style: normal; color: var(--gold-2); }
.setup-p { font-size: 12.5px; color: var(--txt-2); line-height: 1.7; margin: 0; max-width: 460px; }
.setup-badge {
  font-size: 9.5px; letter-spacing: 1.2px; color: var(--gold); text-transform: uppercase;
  border: 1px solid rgba(216, 177, 104, .35); padding: 4px 10px; border-radius: 20px;
  white-space: nowrap;
}
.field-group { margin-bottom: 18px; }
.field-label {
  font-size: 10.5px; letter-spacing: 1.2px; color: var(--txt-3);
  text-transform: uppercase; margin-bottom: 9px; display: flex; align-items: center; gap: 8px;
}
.field-label small { text-transform: none; letter-spacing: 0; color: var(--txt-3); font-size: 10.5px; }
.opt-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.opt-row.three { grid-template-columns: repeat(3, 1fr); }
.opt {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 10px;
  background: rgba(255, 255, 255, .025); text-align: left; transition: .15s;
}
.opt:hover { border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .05); }
.opt.sel {
  border-color: var(--gold); background: rgba(216, 177, 104, .1);
  box-shadow: 0 0 0 1px rgba(216, 177, 104, .3);
}
.opt-t { font-size: 12.5px; font-weight: 620; margin-bottom: 3px; }
.opt-d { font-size: 10px; color: var(--txt-3); line-height: 1.45; }
.opt.sel .opt-d { color: rgba(240, 212, 154, .75); }

.opp-select { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opp-opt {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  background: rgba(255, 255, 255, .025); text-align: left; transition: .15s; position: relative;
}
.opp-opt:hover { border-color: rgba(255, 255, 255, .22); }
.opp-opt.sel { border-color: rgba(216, 177, 104, .65); background: rgba(216, 177, 104, .09); }
.opp-opt-name { font-size: 12px; font-weight: 620; display: flex; align-items: center; gap: 6px; }
.opp-opt-d { font-size: 9.5px; color: var(--txt-3); margin-top: 3px; line-height: 1.4; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

.setup-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; gap: 14px; }
.start-btn {
  height: 46px; padding: 0 30px; border-radius: 11px;
  background: linear-gradient(180deg, #f3dba8, #c9a25a);
  color: #241704; font-size: 14px; font-weight: 700; letter-spacing: .5px;
  box-shadow: 0 4px 18px rgba(216, 177, 104, .3); transition: .16s;
}
.start-btn:hover { transform: translateY(-1px); box-shadow: 0 7px 26px rgba(216, 177, 104, .45); }
.setup-note { font-size: 10.5px; color: var(--txt-3); line-height: 1.6; }

/* toast */
.toast-wrap { position: fixed; bottom: 120px; left: 50%; transform: translateX(-50%); z-index: 150; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 9px 16px; border-radius: 10px; font-size: 12px;
  background: rgba(12, 18, 16, .96); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2); animation: toastIn .3s;
  max-width: 460px; line-height: 1.5;
}
.toast.good { border-color: rgba(63, 191, 135, .45); color: #b6f0d4; }
.toast.bad { border-color: rgba(226, 86, 79, .45); color: #ffb3af; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.hidden { display: none !important; }

/* 响应式 */
@media (max-width: 1180px) {
  .side { width: 280px; flex-basis: 280px; }
  .side.collapsed { margin-right: -280px; }
  .console-inner { grid-template-columns: 160px 1fr; }
}
@media (max-width: 900px) {
  .side { position: fixed; right: 0; top: 56px; bottom: 0; width: 300px; flex-basis: 300px; box-shadow: -20px 0 50px rgba(0, 0, 0, .5); }
  .side.collapsed { margin-right: -300px; }
  .console-inner { grid-template-columns: 1fr; gap: 10px; }
  .hero-hand { flex-direction: row; align-items: center; gap: 12px; }
  .felt { aspect-ratio: 1.35 / 1; }
  .seat { width: 100px; }
  .score-hero { grid-template-columns: 1fr; }
}


/* ===========================================================
   线下节奏改造：动作播报 / 单手结算 / 可读性增强
   =========================================================== */

/* ---- 动作播报：桌面中央的大字，停留够看清 ---- */
.action-banner {
  position: absolute;
  left: 50%;
  top: calc(50% + var(--center-shift, 0px) + 84px);
  transform: translate(-50%, -50%) scale(.92);
  padding: 9px 26px;
  border-radius: 30px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 12;
  transition: opacity .18s ease, transform .18s cubic-bezier(.2, 1.4, .4, 1);
  background: rgba(8, 12, 11, .9);
  border: 1.5px solid rgba(255, 255, 255, .18);
  box-shadow: 0 6px 26px rgba(0, 0, 0, .6);
  color: var(--txt-1);
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.action-banner.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.action-banner.fold  { color: #9fb0aa; border-color: rgba(160,175,170,.4); }
.action-banner.check { color: #dfe9e4; }
.action-banner.call  { color: #8fc4ee; border-color: rgba(91,157,217,.55); }
.action-banner.bet   { color: #ffd98a; border-color: rgba(216,177,104,.7); background: rgba(46,34,12,.92); }
.action-banner.raise { color: #ffd98a; border-color: rgba(216,177,104,.9); background: rgba(56,40,12,.94); font-size: 21px; }
.action-banner.allin {
  color: #fff;
  background: linear-gradient(135deg, #8b1f1a, #d9433c);
  border-color: #ff9a94;
  font-size: 22px;
  animation: allinPulse .9s ease-in-out infinite;
}
@keyframes allinPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226,86,79,.55), 0 6px 26px rgba(0,0,0,.6); }
  50% { box-shadow: 0 0 0 12px rgba(226,86,79,0), 0 6px 26px rgba(0,0,0,.6); }
}

/* ---- 单手结算面板 ---- */
.hand-result {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translate(-50%, 20px);
  width: min(400px, 78%);
  background: linear-gradient(170deg, rgba(22,32,28,.98), rgba(11,16,14,.99));
  border: 1.5px solid rgba(216,177,104,.4);
  border-radius: 15px;
  padding: 14px 16px 12px;
  box-shadow: 0 18px 60px rgba(0,0,0,.75);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity .22s ease, transform .22s cubic-bezier(.2,1.2,.4,1);
}
.hand-result.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

.hr-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; color: var(--txt-3); letter-spacing: .6px;
  margin-bottom: 4px;
}
.hr-street { color: var(--gold); font-weight: 600; }
.hr-net {
  font-family: var(--mono);
  font-size: 30px; font-weight: 700; line-height: 1.1;
  text-align: center; margin: 2px 0 10px;
  font-variant-numeric: tabular-nums;
}
.hr-net.win  { color: #4ee0a4; text-shadow: 0 0 22px rgba(78,224,164,.4); }
.hr-net.lose { color: #ff6b63; text-shadow: 0 0 22px rgba(255,107,99,.32); }
.hr-net.even { color: var(--txt-2); }

.hr-list {
  max-height: 148px; overflow-y: auto;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 7px; margin-bottom: 10px;
}
.hr-list::-webkit-scrollbar { width: 4px; }
.hr-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }
.hr-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--txt-2);
  padding: 4px 2px;
  border-bottom: 1px dashed rgba(255,255,255,.05);
}
.hr-row:last-child { border: none; }
.hr-row.is-win { color: #7ff0c0; font-weight: 600; }
.hr-cards { font-family: var(--mono); color: var(--txt-3); font-size: 11px; }
.hr-tag { font-size: 10px; color: var(--txt-3); }

.hr-btn {
  width: 100%; height: 42px; border-radius: 10px;
  background: linear-gradient(180deg, #f3dba8, #c9a25a);
  color: #241704; font-size: 14.5px; font-weight: 700;
  letter-spacing: .5px; transition: .16s;
  box-shadow: 0 4px 16px rgba(216,177,104,.28);
}
.hr-btn:hover { transform: translateY(-1px); box-shadow: 0 7px 22px rgba(216,177,104,.42); }
.hr-btn.review {
  background: linear-gradient(180deg, #8fc4ee, #4a8cc4);
  box-shadow: 0 4px 16px rgba(91,157,217,.3);
}
.hr-hint { text-align: center; font-size: 10px; color: var(--txt-3); margin-top: 6px; }
.hr-hint b { color: var(--txt-2); }

/* ---- 思考中的座位：更明显的"他在想" ---- */
.seat.acting .avatar::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--gold);
  animation: spinThink 1.1s linear infinite;
}
@keyframes spinThink { to { transform: rotate(360deg); } }
.seat.thinking .avatar {
  border-color: rgba(216,177,104,.55);
}
.think-dots {
  display: inline-flex; gap: 3px; margin-left: 5px;
  vertical-align: middle;
}
.think-dots i {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold-2); opacity: .35;
  animation: tdot 1.2s infinite;
}
.think-dots i:nth-child(2) { animation-delay: .18s; }
.think-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes tdot { 0%,60%,100% { opacity:.3; transform: translateY(0); } 30% { opacity:1; transform: translateY(-3px); } }

/* ---- 可读性：牌更大、字更粗 ---- */
.seat .card.mini { width: 40px; height: 56px; }
.seat .card.mini .r { font-size: 15px; }
.seat-name { font-size: 13px; }
.seat-stack { font-size: 13px; padding: 2px 10px; }
.seat-prof { font-size: 10.5px; color: var(--txt-3); letter-spacing: .5px; }  /* 只显示位置，不显示画像 */
.bet-chips { font-size: 12.5px; padding: 3px 9px 3px 4px; }
.card.hero { width: 78px; height: 108px; }
.card.hero .r { font-size: 26px; }
.card.hero .big { font-size: 36px; }
.board .card { width: 60px; height: 84px; }
.board .card .r { font-size: 20px; }
.board .card .big { font-size: 27px; }
.pot-value { font-size: 26px; }
.pot-label { font-size: 10px; }
.street-tag { font-size: 12px; letter-spacing: 3px; color: rgba(255,255,255,.6); }
