/* ══════════════════════════════════════════
   变量 & 重置
══════════════════════════════════════════ */
:root {
  --bg:            #0d1117;
  --bg-surface:    #161b22;
  --bg-card:       #21262d;
  --bg-input:      #1c2128;
  --border:        #30363d;
  --felt:          #1a5c2b;
  --felt-light:    #236b35;
  --felt-dark:     #0f3a1a;
  --wood:          #5c3010;
  --wood-light:    #7a4520;
  --gold:          #c9a84c;
  --gold-light:    #e8c86d;
  --text:          #e6edf3;
  --text-muted:    #8b949e;
  --text-dim:      #484f58;
  --red:           #e05252;
  --green:         #3fb950;
  --blue:          #58a6ff;
  --fold-bg:       #4a1515;
  --fold-hover:    #6b1f1f;
  --call-bg:       #1a4a2e;
  --call-hover:    #1f6138;
  --raise-bg:      #3a2800;
  --raise-hover:   #523c00;
  --radius:        10px;
  --card-w:        58px;
  --card-h:        82px;
  --card-w-sm:     40px;
  --card-h-sm:     56px;
}

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

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input  { font-family: inherit; outline: none; }


/* ══════════════════════════════════════════
   视图切换
══════════════════════════════════════════ */
.view {
  display: none;
  position: fixed;
  inset: 0;
}
.view.active { display: flex; flex-direction: column; }


/* ══════════════════════════════════════════
   通用按钮
══════════════════════════════════════════ */
.btn-primary {
  width: 100%;
  padding: 11px;
  background: var(--gold);
  color: #1a1000;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  transition: background .2s;
}
.btn-primary:hover { background: var(--gold-light); }

.btn-ghost {
  padding: 6px 14px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color .15s, border-color .15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }


/* ══════════════════════════════════════════
   认证视图
══════════════════════════════════════════ */
.auth-bg {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(29,92,43,.35) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(201,168,76,.1) 0%, transparent 55%),
    var(--bg);
}

.auth-container { display: flex; flex-direction: column; align-items: center; gap: 28px; }

.auth-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  user-select: none;
}
.auth-logo h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(201,168,76,.4);
}
.auth-logo .suit { font-size: 28px; color: var(--text-muted); }
.auth-logo .suit.red { color: var(--red); }

.auth-card {
  width: 360px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  background: var(--bg);
  border-radius: 8px;
  padding: 4px;
}
.tab-btn {
  flex: 1;
  padding: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  transition: background .2s, color .2s;
}
.tab-btn.active { background: var(--bg-card); color: var(--text); }

.auth-form { display: none; flex-direction: column; gap: 16px; }
.auth-form.active { display: flex; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; color: var(--text-muted); }
.form-group input {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  transition: border-color .2s;
}
.form-group input:focus { border-color: var(--gold); }

.form-error {
  min-height: 18px;
  font-size: 13px;
  color: var(--red);
  text-align: center;
}


/* ══════════════════════════════════════════
   游戏头部
══════════════════════════════════════════ */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}
.header-logo { font-size: 18px; font-weight: 800; color: var(--gold); letter-spacing: 1px; }
.header-center { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.header-username { font-weight: 700; color: var(--text); }
.header-chips-label { color: var(--text-muted); }
.header-chips-value { font-weight: 700; color: var(--gold); font-size: 16px; }
.header-right { display: flex; gap: 8px; }


/* ══════════════════════════════════════════
   游戏主区 & 牌桌场景
══════════════════════════════════════════ */
.game-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at center, #0f1f12 0%, var(--bg) 70%);
  overflow: hidden;
  position: relative; /* added so absolute sidebars can position relative to game-main */
}

.table-scene {
  position: relative;
  width: 860px;
  height: 530px;
}

/* 椭圆牌桌 */
.poker-table {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 520px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%,
    #27743a 0%, var(--felt) 50%, var(--felt-dark) 100%);
  border: 14px solid var(--wood);
  box-shadow:
    0 0 0 3px var(--wood-light),
    0 0 0 5px #3a1a05,
    0 25px 60px rgba(0,0,0,.75),
    inset 0 0 50px rgba(0,0,0,.35),
    inset 0 2px 10px rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.community-area { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.community-cards { display: flex; gap: 8px; }

.pot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,.35);
  border-radius: 20px;
  padding: 4px 14px;
}
.pot-label { font-size: 13px; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: 1px; }
.pot-amount { font-size: 20px; font-weight: 700; color: var(--gold); }

.game-status-text {
  font-size: 14px;
  color: rgba(255,255,255,.45);
  letter-spacing: .5px;
}


/* ══════════════════════════════════════════
   玩家席位（对手）
══════════════════════════════════════════ */
.player-seat {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  user-select: none;
  z-index: 20; /* 调高层级，保证盖在桌子 border 上面，绝不被挡住 */
}

/* 五个对手座位的位置 */
#seat-1 { left:  3%; top: 66%; }
#seat-2 { left: -2%; top: 30%; }
#seat-3 { left: 14%; top:  0%; }
#seat-4 { left: 58%; top:  0%; }
#seat-5 { left: 84%; top: 30%; }

.seat-cards { display: flex; gap: 3px; }

.seat-body {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  min-width: 110px;
}

.seat-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s;
}
.seat-avatar.lg { width: 42px; height: 42px; }
.avatar-initials { font-size: 15px; font-weight: 700; color: var(--gold); }

/* 位置标签 (D / SB / BB / UTG) */
.pos-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
  letter-spacing: 0.3px;
}
.pos-badge.d   { background: rgba(201,168,76,0.25); color: var(--gold-light); border: 1px solid rgba(201,168,76,0.4); }
.pos-badge.sb  { background: rgba(88,166,255,0.2);  color: var(--blue);       border: 1px solid rgba(88,166,255,0.35); }
.pos-badge.bb  { background: rgba(168,85,247,0.2);  color: #c084fc;           border: 1px solid rgba(168,85,247,0.35); }
.pos-badge.utg { background: rgba(139,148,158,0.2); color: var(--text-muted); border: 1px solid rgba(139,148,158,0.3); }

.seat-meta { display: flex; flex-direction: column; gap: 2px; }
.seat-name { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; }
.seat-chips-val { font-size: 13px; color: var(--text-muted); }

.seat-bet-badge {
  background: rgba(201,168,76,.15);
  border: 1px solid rgba(201,168,76,.35);
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 14px;
  color: var(--gold);
}

.seat-action-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  min-height: 16px;
  text-align: center;
}

/* 轮到该玩家 */
.player-seat.active-turn .seat-avatar {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(201,168,76,.6);
}
.player-seat.active-turn .seat-body { border-color: var(--gold); }

/* 已弃牌 */
.player-seat.folded .seat-body { opacity: .45; }
.player-seat.folded .seat-cards { opacity: .2; }

/* 全押 */
.player-seat.all-in .seat-chips-val { color: var(--red); }
.player-seat.all-in .seat-body { border-color: var(--red); }


/* ══════════════════════════════════════════
   英雄区（本人）
══════════════════════════════════════════ */
.hero-zone {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.hero-hole-cards { display: flex; gap: 10px; align-items: flex-end; }

.hero-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
}

/* 英雄激活 */
#seat-0.active-turn .hero-info { border-color: var(--gold); box-shadow: 0 0 16px rgba(201,168,76,.3); }
#seat-0.active-turn .seat-avatar { border-color: var(--gold); box-shadow: 0 0 10px rgba(201,168,76,.5); }


/* ══════════════════════════════════════════
   操作面板
══════════════════════════════════════════ */
.action-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 280px;
}

.timer-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 2px;
  transition: width 1s linear;
}
/* 最后10秒变红 */
.timer-bar.urgent { background: var(--red); }

.action-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.btn-action {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.btn-action:active { transform: scale(.96); }

.btn-fold  { background: var(--fold-bg);  color: #ff8080; }
.btn-fold:hover  { background: var(--fold-hover); }

.btn-check { background: var(--call-bg);  color: #7dde9c; }
.btn-check:hover { background: var(--call-hover); }

.btn-call  { background: var(--call-bg);  color: #7dde9c; }
.btn-call:hover  { background: var(--call-hover); }

.btn-raise { background: var(--raise-bg); color: var(--gold); }
.btn-raise:hover { background: var(--raise-hover); }

.raise-wrap { display: flex; flex-direction: column; gap: 5px; }

.raise-slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.raise-slider-row input[type=range] {
  flex: 1;
  accent-color: var(--gold);
  height: 4px;
  cursor: pointer;
}


/* ══════════════════════════════════════════
   牌（通用）
══════════════════════════════════════════ */
.card {
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 6px;
  background: #fff;
  border: 1px solid #d0d0d0;
  box-shadow: 0 3px 8px rgba(0,0,0,.5);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-weight: 800;
  transition: transform .15s;
}
.card.sm { width: var(--card-w-sm); height: var(--card-h-sm); border-radius: 4px; }

/* 牌背面 */
.card-back {
  background:
    repeating-linear-gradient(
      45deg,
      #1c3a8a 0px,
      #1c3a8a 3px,
      #1a2f70 3px,
      #1a2f70 8px
    );
  border-color: #1a2f70;
}

/* 占位牌（灰色虚线框） */
.card-placeholder {
  background: rgba(255,255,255,.04);
  border: 2px dashed rgba(255,255,255,.12);
  box-shadow: none;
}

/* 牌面内容 */
.card-rank-tl {
  position: absolute;
  top: 4px;
  left: 5px;
  font-size: 14px;
  line-height: 1;
}
.card-rank-br {
  position: absolute;
  bottom: 4px;
  right: 5px;
  font-size: 14px;
  line-height: 1;
  transform: rotate(180deg);
}
.card-suit-center {
  font-size: 24px;
  line-height: 1;
}
.card.sm .card-rank-tl,
.card.sm .card-rank-br { font-size: 11px; }
.card.sm .card-suit-center { font-size: 18px; }

.card-rank-tl,
.card-rank-br,
.card-suit-center { color: #111; }

.card.red .card-rank-tl,
.card.red .card-rank-br,
.card.red .card-suit-center { color: var(--red); }

/* 翻牌入场动画 */
@keyframes dealCard {
  from { opacity: 0; transform: translateY(-20px) scale(.9); }
  to   { opacity: 1; transform: translateY(0)   scale(1);   }
}
.card.deal { animation: dealCard .25s ease-out forwards; }


/* ══════════════════════════════════════════
   大厅蒙层
══════════════════════════════════════════ */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(4px);
}

.lobby-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
}

/* 蒙层右上角的关闭按钮 */
.lobby-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 10px 4px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.lobby-close:hover { background: rgba(255,255,255,.08); color: #fff; }

/* 蒙层底部"先看看牌桌"按钮 */
.lobby-dismiss { margin-top: 6px; }

/* 左下角的等待角标 */
.waiting-indicator {
  position: absolute;
  bottom: 18px;
  left: 18px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 13px;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: var(--text-primary, #eee);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .15s, transform .15s;
}
.waiting-indicator:hover {
  background: rgba(0,0,0,.85);
  transform: translateY(-1px);
}
.waiting-indicator[hidden] { display: none; }
.waiting-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold, #fbbf24);
  animation: waiting-pulse 1.6s ease-out infinite;
}
@keyframes waiting-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(251,191,36,.55); }
  70%  { box-shadow: 0 0 0 10px rgba(251,191,36,0); }
  100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); }
}
.waiting-count {
  background: rgba(255,255,255,.10);
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
}
.lobby-suits { font-size: 22px; letter-spacing: 10px; color: var(--text-muted); }
.lobby-card h2 { font-size: 24px; color: var(--gold); }
.lobby-count { color: var(--text-muted); font-size: 14px; }
.lobby-hint { font-size: 12px; color: var(--text-dim); }

.lobby-player-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  text-align: left;
}
.lobby-player-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 13px;
}
.lobby-player-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}


/* ══════════════════════════════════════════
   手牌历史视图
══════════════════════════════════════════ */
#view-history { background: var(--bg); }

.history-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.history-header h2 { flex: 1; font-size: 18px; color: var(--text); }
.history-total { font-size: 13px; color: var(--text-muted); }

.history-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.history-summary {
  display: flex;
  gap: 16px;
}
.summary-stat {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); }
.stat-value.positive { color: var(--green); }
.stat-value.negative { color: var(--red); }

.history-list { display: flex; flex-direction: column; gap: 8px; }

.history-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 48px 0;
  font-size: 14px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  transition: border-color .15s;
}
.history-item.win  { border-left-color: var(--green); }
.history-item.loss { border-left-color: var(--red); }
.history-item.push { border-left-color: var(--text-muted); }

.history-item-left  { display: flex; flex-direction: column; gap: 4px; }
.history-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.history-date   { font-size: 12px; color: var(--text-muted); }
.history-action { font-size: 14px; color: var(--text); }
.history-cards {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}
.history-cards-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.history-cards-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.history-profit { font-size: 18px; font-weight: 700; }
.history-profit.win  { color: var(--green); }
.history-profit.loss { color: var(--red); }
.history-chips-after { font-size: 12px; color: var(--text-muted); }


/* ══════════════════════════════════════════
   滚动条美化
══════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ══════════════════════════════════════════
   视觉优化：牌力提示、飘字与筹码飞入
   ══════════════════════════════════════════ */

/* 牌力实时提示角标 - 磨砂玻璃感 + 霓虹发光样式 */
.hand-type-badge {
  position: absolute;
  left: 50%;
  bottom: 100px; /* 位于手牌上方 */
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 6px 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 8px rgba(63, 185, 80, 0.2);
  z-index: 25;
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: badgeFadeIn 0.35s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes badgeFadeIn {
  from { opacity: 0; transform: translate(-50%, 10px) scale(0.9); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.hand-type-badge .badge-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: dotPulse 1.8s ease-out infinite;
}

@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0); }
}

.hand-type-badge .badge-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.hand-type-badge .badge-text strong {
  color: #7dde9c;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(125, 222, 156, 0.3);
}

/* 局终结算大字飘逸浮现样式 */
.floating-profit {
  position: absolute;
  font-size: 30px;
  font-weight: 900;
  text-align: center;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
  animation: floatUpAndFade 1.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.floating-profit.win {
  color: #00e676; /* 霓虹绿 */
  text-shadow: 0 0 10px rgba(0, 230, 118, 0.6), 0 0 20px rgba(0, 230, 118, 0.3);
}

.floating-profit.loss {
  color: #ff1744; /* 炫目红 */
  text-shadow: 0 0 10px rgba(255, 23, 68, 0.6), 0 0 20px rgba(255, 23, 68, 0.3);
}

.floating-profit.push {
  color: #b0bec5; /* 低调灰 */
  text-shadow: 0 0 8px rgba(176, 190, 197, 0.5);
}

@keyframes floatUpAndFade {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.6);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -30px) scale(1.1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -90px) scale(0.85);
  }
}

/* 金色流光筹码粒子样式 */
.chip-particle {
  position: absolute;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff9c4 0%, #ffb300 60%, #ff6f00 100%);
  border: 1.8px solid #fff9c4;
  box-shadow: 0 0 10px rgba(255, 179, 0, 0.95), 0 3px 6px rgba(0, 0, 0, 0.6);
  z-index: 100;
  pointer-events: none;
  transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease;
}

/* ══════════════════════════════════════════
   全屏正中央结算大弹窗 - 贴顶磨砂横扁平极简通知条样式
   ══════════════════════════════════════════ */
.settlement-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 480px;
  height: auto;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.settlement-overlay.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.settlement-box {
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.99) 100%);
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 24px 28px;
  width: 100%;
  height: auto;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.8),
    0 0 35px var(--gold-glow),
    inset 0 0 25px rgba(201, 168, 76, 0.1);
  display: flex;
  flex-direction: column; /* Vertical Stacking */
  align-items: center;
  justify-content: center;
  gap: 15px;
  overflow: visible;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* 后置发光霓虹 */
.settlement-glow {
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, var(--gold), var(--green), var(--red));
  border-radius: 20px;
  z-index: -1;
  opacity: 0.22;
  filter: blur(10px);
}

.settlement-box.win .settlement-glow {
  background: linear-gradient(135deg, #00e676, #b9f6ca);
  opacity: 0.45;
  filter: blur(12px);
}

.settlement-box.loss .settlement-glow {
  background: linear-gradient(135deg, #ff1744, #ff8a80);
  opacity: 0.45;
  filter: blur(12px);
}

.settlement-box.push .settlement-glow {
  background: linear-gradient(135deg, var(--gold), #ffe082);
  opacity: 0.35;
  filter: blur(12px);
}

.settlement-icon {
  font-size: 54px; /* Massive Icon! */
  line-height: 1;
  flex-shrink: 0;
  animation: bounceSettle 0.8s cubic-bezier(0.25, 1, 0.5, 1) infinite alternate;
  filter: drop-shadow(0 0 10px rgba(255, 179, 0, 0.4));
}

@keyframes bounceSettle {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

.settlement-box h2 {
  font-size: 28px; /* Massive Title! */
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.settlement-box.win h2 {
  color: #00e676;
  text-shadow: 0 0 8px rgba(0, 230, 118, 0.35);
}

.settlement-box.loss h2 {
  color: #ff1744;
  text-shadow: 0 0 8px rgba(255, 23, 68, 0.35);
}

.settlement-box.push h2 {
  color: var(--gold);
  text-shadow: 0 0 8px rgba(201, 168, 76, 0.35);
}

.settlement-player-profit {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 5px;
}

/* Premium Winner Hand Showcase */
.settlement-detail {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.25) 0%, rgba(243, 215, 115, 0.15) 100%);
  padding: 12px 24px;
  border-radius: 16px;
  border: 1.5px solid rgba(201, 168, 76, 0.5);
  box-shadow: 
    0 0 20px rgba(201, 168, 76, 0.3),
    inset 0 0 10px rgba(201, 168, 76, 0.15);
  text-shadow: 0 0 10px rgba(243, 215, 115, 0.8);
  white-space: normal;
  max-width: 90%;
  flex-shrink: 0;
  text-align: center;
  animation: pulseGold 2s infinite ease-in-out;
  margin: 10px 0;
}

@keyframes pulseGold {
  0% {
    box-shadow: 0 0 15px rgba(201, 168, 76, 0.25), inset 0 0 10px rgba(201, 168, 76, 0.1);
    border-color: rgba(201, 168, 76, 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(201, 168, 76, 0.6), inset 0 0 15px rgba(201, 168, 76, 0.25);
    border-color: rgba(243, 215, 115, 0.9);
  }
  100% {
    box-shadow: 0 0 15px rgba(201, 168, 76, 0.25), inset 0 0 10px rgba(201, 168, 76, 0.1);
    border-color: rgba(201, 168, 76, 0.4);
  }
}

.settlement-sub-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  margin-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  padding-right: 2px;
}

.settlement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 14px;
}

.settlement-row-name {
  color: var(--text-light);
  font-weight: 700;
}

.settlement-row-profit {
  font-weight: 800;
}

.settlement-row-profit.win { color: #00e676; }
.settlement-row-profit.loss { color: #ff1744; }
.settlement-row-profit.push { color: var(--text-muted); }

/* 倒计时进度条 */
.settlement-countdown-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 5px;
}

.settlement-countdown-progress {
  height: 100%;
  width: 100%;
  background: var(--gold);
  border-radius: 0;
}

/* 亮牌 / 盖牌按钮区域 */
.show-muck-area {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}
.btn-show-hand {
  padding: 7px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--gold);
  background: rgba(201,168,76,0.15);
  color: var(--gold-light);
  transition: all 0.2s;
  box-shadow: 0 0 10px rgba(201,168,76,0.15);
}
.btn-show-hand:hover {
  background: rgba(201,168,76,0.3);
  box-shadow: 0 0 15px rgba(201,168,76,0.3);
}
.btn-show-hand.shown {
  border-color: var(--green);
  background: rgba(63,185,80,0.15);
  color: var(--green);
  cursor: default;
}
.btn-muck-hand {
  padding: 7px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  transition: all 0.2s;
}
.btn-muck-hand:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

/* 头像物理受击弹性反馈 */
@keyframes avatarBump {
  0% { transform: scale(1); }
  25% { transform: scale(1.15) translateY(-4px); }
  55% { transform: scale(0.94) translateY(1.5px); }
  80% { transform: scale(1.03) translateY(-0.5px); }
  100% { transform: scale(1) translateY(0); }
}

.seat-avatar.bump {
  animation: avatarBump 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.25) forwards;
}

/* ══════════════════════════════════════════
   离线状态高级样式 (置灰、划消与霓虹红角标)
   ══════════════════════════════════════════ */
.player-seat.offline .seat-avatar {
  filter: grayscale(1) opacity(0.6);
  border-color: #484f58 !important;
  box-shadow: none !important;
}

.player-seat.offline .seat-name {
  color: var(--text-muted) !important;
  text-decoration: line-through;
}

.player-seat.offline .seat-avatar::after {
  content: "离线";
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: var(--red);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 3.5px;
  border-radius: 4px;
  border: 1px solid var(--bg-surface);
  box-shadow: 0 0 6px rgba(224, 82, 82, 0.7);
  z-index: 10;
  white-space: nowrap;
  line-height: 1.1;
}

/* 保证 Hero 区域离线状态同样支持 */
.hero-zone.offline .seat-avatar {
  filter: grayscale(1) opacity(0.6);
  border-color: #484f58 !important;
  box-shadow: none !important;
}

.hero-zone.offline .seat-name {
  color: var(--text-muted) !important;
  text-decoration: line-through;
}

.hero-zone.offline .seat-avatar::after {
  content: "离线";
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--red);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 3.5px;
  border-radius: 4px;
  border: 1px solid var(--bg-surface);
  box-shadow: 0 0 6px rgba(224, 82, 82, 0.7);
  z-index: 10;
  white-space: nowrap;
  line-height: 1.1;
}

/* ══════════════════════════════════════════
   德州扑克底栏：规则与跑马灯提示
   ══════════════════════════════════════════ */
.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 0 30px;
  z-index: 99;
  flex-shrink: 0;
  gap: 30px;
}

.rules-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 25px;
  flex-shrink: 0;
}

.rules-title {
  color: var(--gold);
  font-weight: 800;
  margin-right: 6px;
  white-space: nowrap;
}

.rule-item {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.rule-item-arrow {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 800;
}

.ticker-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ticker-icon {
  font-size: 14px;
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold-glow);
  flex-shrink: 0;
}

.ticker-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 20px;
}

.ticker-scroll {
  display: flex;
  gap: 100px; /* 每条提示之间的距离 */
  position: absolute;
  white-space: nowrap;
  animation: tickerScroll 45s linear infinite;
}

.ticker-scroll:hover {
  animation-play-state: paused; /* 鼠标悬停时暂停滚动 */
}

.ticker-scroll span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  display: inline-block;
}

@keyframes tickerScroll {
  0% {
    transform: translate3d(100%, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

/* ══════════════════════════════════════════
   回合指示器 turn-indicator
   ══════════════════════════════════════════ */
.turn-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4.5px 12px;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.3s ease;
  z-index: 12;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  margin-top: 2px;
}

.turn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.turn-indicator.opponent-turn {
  background: rgba(22, 28, 45, 0.7);
  border: 1.2px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.turn-indicator.opponent-turn .turn-dot {
  background: var(--text-muted);
  opacity: 0.5;
}

.turn-indicator.my-turn {
  background: rgba(201, 168, 76, 0.15);
  border: 1.5px solid var(--gold);
  color: #fff;
  box-shadow: 0 0 15px var(--gold-glow);
  animation: turnPulseGold 1.8s infinite ease-in-out;
}

.turn-indicator.my-turn .turn-dot {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: turnDotBlink 1s infinite alternate;
}

.turn-indicator.my-turn strong {
  color: var(--gold);
  text-shadow: 0 0 6px var(--gold-glow);
}

@keyframes turnPulseGold {
  0% { box-shadow: 0 0 6px var(--gold-glow); border-color: rgba(201, 168, 76, 0.6); }
  50% { box-shadow: 0 0 16px rgba(201, 168, 76, 0.7); border-color: rgba(255, 224, 130, 0.95); }
  100% { box-shadow: 0 0 6px var(--gold-glow); border-color: rgba(201, 168, 76, 0.6); }
}

@keyframes turnDotBlink {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

/* ══════════════════════════════════════════
   行动飘字与动画 action-float-text
   ══════════════════════════════════════════ */
.action-float-text {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(11, 15, 25, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  z-index: 99;
  pointer-events: none;
  animation: actionFloatUp 1.1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  white-space: nowrap;
}

.action-float-text.fold {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.05);
}

.action-float-text.call {
  color: var(--green);
  border-color: var(--green-glow);
  box-shadow: 0 0 12px var(--green-glow);
  text-shadow: 0 0 4px var(--green-glow);
}

.action-float-text.raise {
  color: var(--gold);
  border-color: var(--gold-glow);
  box-shadow: 0 0 15px var(--gold-glow);
  text-shadow: 0 0 4px var(--gold-glow);
}

@keyframes actionFloatUp {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 15px, 0) scale(0.7);
  }
  15% {
    opacity: 1;
    transform: translate3d(-50%, -25px, 0) scale(1.15);
  }
  80% {
    opacity: 1;
    transform: translate3d(-50%, -35px, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -55px, 0) scale(0.85);
  }
}

/* ══════════════════════════════════════════
   全局充值模态大弹窗 global-alert-overlay
   ══════════════════════════════════════════ */
.global-alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.global-alert-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.global-alert-box {
  background: radial-gradient(circle at 50% 10%, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1.5px solid var(--gold);
  box-shadow:
    0 0 35px var(--gold-glow),
    inset 0 0 25px rgba(201, 168, 76, 0.1);
  border-radius: var(--radius-lg);
  padding: 35px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.global-alert-overlay.active .global-alert-box {
  transform: scale(1);
}

.global-alert-close {
  position: absolute;
  top: 15px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

.global-alert-close:hover {
  color: var(--red);
}

.global-alert-glow {
  position: absolute;
  top: 0;
  left: 25%;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 10px var(--gold);
}

.global-alert-icon {
  font-size: 44px;
  animation: alertIconJump 1.2s infinite ease-in-out alternate;
  text-shadow: 0 0 15px var(--gold-glow);
}

@keyframes alertIconJump {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-8px) scale(1.05); }
}

.global-alert-box h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold-glow);
}

.global-alert-content {
  font-size: 13.5px;
  color: #f8fafc;
  line-height: 1.6;
  text-align: center;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,0.04);
}

/* 🏆 德州牌型图例大厅样式 & 展开面板 */
.rules-container {
  position: relative;
}

.btn-toggle-rules {
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 12px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-toggle-rules:hover {
  background: rgba(201, 168, 76, 0.25);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.35);
}

.btn-toggle-rules.active {
  background: var(--gold);
  color: #5c3010;
  border-color: var(--gold);
}

.rules-card-showcase {
  position: absolute;
  bottom: 100%; /* 悬浮在规则条上方 */
  left: 0;
  width: 580px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(201, 168, 76, 0.5);
  border-radius: 12px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(201, 168, 76, 0.25);
  padding: 15px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  z-index: 9999;
  margin-bottom: 8px;
}

.showcase-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 6px 12px;
}

.showcase-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-light);
}

.showcase-cards {
  display: flex;
  gap: 3px;
}

/* 🃏 超微型扑克牌 (Micro Cards for rules showcase) */
.card.xs {
  width: 25px;
  height: 38px;
  border-radius: 3px;
  font-size: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 1px solid #d0d0d0;
  background: #fff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
}

.card.xs .card-rank-tl {
  position: absolute;
  top: 1px;
  left: 2px;
  font-size: 8px;
  line-height: 1;
}

.card.xs .card-rank-br {
  position: absolute;
  bottom: 1px;
  right: 2px;
  font-size: 8px;
  line-height: 1;
  transform: rotate(180deg);
}

.card.xs .card-suit-center {
  font-size: 12px;
  line-height: 1;
}

.card.xs,
.card.xs .card-rank-tl,
.card.xs .card-rank-br,
.card.xs .card-suit-center {
  color: #111;
}

.card.xs.red,
.card.xs.red .card-rank-tl,
.card.xs.red .card-rank-br,
.card.xs.red .card-suit-center {
  color: var(--red);
}

/* 👑 赢家手牌明牌展示区域 */
.settlement-winner-cards {
  width: 100%;
  margin: 10px 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5);
  animation: dealCard 0.3s ease-out forwards;
}

.settlement-winner-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.winner-hand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.winner-hand-label {
  font-size: 15px;
  color: var(--gold-light);
  font-weight: 700;
  text-shadow: 0 0 6px rgba(201, 168, 76, 0.4);
}

.winner-card-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

/* 5+2 结算动画 */
.settle-card-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.settle-card-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.settle-card-row .card.sm {
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.card.card-highlight {
  border-color: var(--gold) !important;
  box-shadow: 0 0 12px rgba(201,168,76,0.6), 0 0 4px rgba(201,168,76,0.8) !important;
  transform: translateY(-4px);
}
.card.card-dimmed {
  opacity: 0.25;
  filter: grayscale(0.7);
  transform: scale(0.92);
}
@keyframes flyInFromBottom {
  from { opacity: 0; transform: translateY(40px) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.card.hole-fly-in {
  animation: flyInFromBottom 0.45s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.settle-best-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold-light);
  text-shadow: 0 0 8px rgba(201,168,76,0.4);
  margin-top: 4px;
  animation: badgeFadeIn 0.35s ease-out forwards;
}
.settle-divider-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* 🏆 实时筹码榜 & 本局行动日志浮窗 */
.game-sidebar {
  position: absolute;
  width: 230px;
  height: 220px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(201, 168, 76, 0.05);
  z-index: 100;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.game-sidebar:hover {
  border-color: rgba(201, 168, 76, 0.35);
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(201, 168, 76, 0.15);
}

/* 浮动在左上角与右上角 */
.left-sidebar {
  left: 20px;
  top: 20px;
}

.right-sidebar {
  right: 20px;
  top: 20px;
  width: 250px; /* 行动日志稍微宽一点 */
}

/* 侧边栏头部 */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-icon {
  font-size: 13px;
}

.sidebar-header h3 {
  font-size: 12px;
  font-weight: 800;
  margin: 0;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

/* 侧边栏内容区 */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  min-height: 0;
}

/* 自定义侧边栏滚动条 */
.sidebar-content::-webkit-scrollbar {
  width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 168, 76, 0.4);
}

/* 🏆 排行榜样式 */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.leader-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 11px;
  transition: background 0.15s;
}

.leader-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.leader-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.leader-rank-badge {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  color: var(--text-muted);
}

.leader-name {
  color: var(--text-light);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-chips {
  font-weight: 800;
  color: var(--gold-light);
}

/* 前三名高亮框 */
.leader-row.rank-1 {
  border-color: rgba(255, 215, 0, 0.35);
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 215, 0, 0.02) 100%);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.1);
}
.leader-row.rank-1 .leader-name {
  color: #ffe082;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.25);
}
.leader-row.rank-1 .leader-chips {
  color: #ffd54f;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.3);
}

.leader-row.rank-2 {
  border-color: rgba(224, 224, 224, 0.25);
  background: linear-gradient(90deg, rgba(224, 224, 224, 0.06) 0%, rgba(224, 224, 224, 0.01) 100%);
}

.leader-row.rank-3 {
  border-color: rgba(205, 127, 50, 0.25);
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.06) 0%, rgba(205, 127, 50, 0.01) 100%);
}

.leaderboard-empty, .log-empty {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
  font-style: italic;
}

/* ⚡ 行动日志样式 */
.action-log-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.log-row {
  display: flex;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.01);
  font-size: 10.5px;
  border-left: 2px solid transparent;
  line-height: 1.4;
  animation: fadeInLog 0.25s ease-out forwards;
}

@keyframes fadeInLog {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.log-time {
  color: var(--text-muted);
  font-family: monospace;
  font-size: 9.5px;
  flex-shrink: 0;
  margin-top: 1px;
}

.log-text {
  color: var(--text-light);
  word-break: break-all;
}

/* 不同动作发光竖边条 */
.log-row.fold {
  border-left-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.005);
}
.log-row.fold .log-text {
  color: var(--text-muted);
}

.log-row.check {
  border-left-color: #64b5f6;
  background: rgba(100, 181, 246, 0.03);
}

.log-row.call {
  border-left-color: #81c784;
  background: rgba(129, 199, 132, 0.03);
}

.log-row.raise {
  border-left-color: var(--gold);
  background: rgba(201, 168, 76, 0.04);
}
.log-row.raise .log-text {
  color: #ffe082;
}

.log-row.allin {
  border-left-color: var(--red);
  background: rgba(239, 83, 80, 0.06);
  box-shadow: 0 0 8px rgba(239, 83, 80, 0.1);
}
.log-row.allin .log-text {
  color: #ff8a80;
  font-weight: 700;
  text-shadow: 0 0 4px rgba(239, 83, 80, 0.2);
}

.log-row.system {
  border-left-color: rgba(201, 168, 76, 0.4);
  background: rgba(201, 168, 76, 0.03);
}
.log-row.system .log-text {
  color: var(--gold-light);
  font-weight: 500;
}

/* 响应式适配：在屏幕太小时隐藏浮窗，防止遮挡核心牌桌 */
@media (max-width: 1380px) {
  .game-sidebar {
    display: none !important;
  }
}



