/* ===== Design Tokens ===== */
:root {
  --bg-base: #080d1a;
  --bg-panel: #0d1322;
  --bg-panel-light: #131b2e;
  --felt: #0e5239;
  --felt-light: #137050;
  --felt-dark: #0a3d2c;
  --felt-edge: #062818;
  --gold: #d4af37;
  --gold-light: #f0d77b;
  --gold-dim: #8a7020;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --card-face: #f7f3e8;
  --card-back-bg: #162038;
  --suit-red: #c0392b;
  --suit-black: #1a1a2e;
  --text: #e8e6e3;
  --text-muted: #8a8d91;
  --text-dim: #5a5d61;
  --danger: #e74c3c;
  --danger-dark: #c0392b;
  --success: #2ecc71;
  --info: #3498db;
  --warn: #f39c12;
  --border: rgba(212, 175, 55, 0.18);
  --border-strong: rgba(212, 175, 55, 0.4);

  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  --card-w: 56px;
  --card-h: 78px;
  --card-radius: 6px;
  --card-gap: 4px;

  --table-w: 460px;
  --table-h: 644px;

  --panel-w: 280px;

  --shadow-card: 0 2px 8px rgba(0,0,0,0.45);
  --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px var(--gold-glow);
  --shadow-btn: 0 2px 8px rgba(0,0,0,0.3);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  background-image: radial-gradient(ellipse 80% 60% at 50% 30%, #0f1828 0%, var(--bg-base) 70%);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(6px, 1.2vw, 16px);
  overflow-x: hidden;
}

.app {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vw, 14px);
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
}

.header__title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px var(--gold-glow);
}

.header__info {
  display: flex;
  gap: clamp(8px, 1.5vw, 16px);
  font-size: clamp(0.7rem, 1vw, 0.82rem);
  color: var(--text-muted);
  flex-wrap: wrap;
}

.header__info strong {
  color: var(--gold-light);
  font-weight: 600;
}

.phase-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border);
  font-size: clamp(0.62rem, 0.9vw, 0.75rem);
  color: var(--gold-light);
  font-weight: 500;
}

/* ===== Game Layout ===== */
.game-layout {
  display: flex;
  gap: 16px;
  align-items: stretch;
  justify-content: center;
  width: 100%;
}

.side-panel {
  flex: 0 0 var(--panel-w);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  max-height: var(--table-h);
}

/* ===== Poker Table ===== */
.table {
  position: relative;
  background: radial-gradient(ellipse at center, var(--felt-light) 0%, var(--felt) 45%, var(--felt-dark) 85%, var(--felt-edge) 100%);
  border-radius: 20px;
  border: 2px solid var(--gold-dim);
  box-shadow:
    inset 0 0 40px rgba(0,0,0,0.4),
    inset 0 0 80px rgba(0,0,0,0.15),
    0 6px 30px rgba(0,0,0,0.6),
    0 0 0 4px var(--felt-edge),
    0 0 0 6px rgba(212,175,55,0.12);
  width: var(--table-w);
  height: var(--table-h);
  flex: 0 0 var(--table-w);
  min-width: 0;
}

.table::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 15px;
  border: 1px solid rgba(212,175,55,0.12);
  pointer-events: none;
}

/* ===== Seats — absolute positioned around oval ===== */
.seat {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 2;
  transition: all 0.4s ease;
  transform: translate(-50%, -50%);
}

/* 6 seats evenly around vertical rectangle table */
/* 左右两侧座位让内部内容横向排布且靠对应边对齐，避免被桌面边缘挤压换行 */
.seat--pos1, .seat--pos2 { align-items: flex-end; }
.seat--pos4, .seat--pos5 { align-items: flex-start; }

/* pos0: player - bottom center */
.seat--pos0 { left: 50%; top: 92%; }
/* pos1: right-lower */
.seat--pos1 { left: 86%; top: 70%; }
/* pos2: right-upper */
.seat--pos2 { left: 86%; top: 30%; }
/* pos3: top center */
.seat--pos3 { left: 50%; top: 8%; }
/* pos4: left-upper */
.seat--pos4 { left: 14%; top: 30%; }
/* pos5: left-lower */
.seat--pos5 { left: 14%; top: 70%; }

.seat--winner {
  animation: winnerGlow 1.2s ease-in-out infinite alternate;
}

@keyframes winnerGlow {
  from { filter: drop-shadow(0 0 8px var(--gold-glow)); }
  to { filter: drop-shadow(0 0 24px var(--gold)); }
}

.seat__info {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(8, 13, 26, 0.75);
  backdrop-filter: blur(8px);
  padding: 2px 6px;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: border-color 0.3s;
  white-space: nowrap;
}

.seat--active .seat__info {
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}

.seat__avatar {
  font-size: 0.85rem;
}

.seat__name {
  font-weight: 600;
  font-size: 0.62rem;
  color: var(--text);
  max-width: 45px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat__chips {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

.chip-icon {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold), var(--gold-dim));
  border: 1px solid var(--gold-dim);
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.dealer-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #e0e0e0, #c0c0c0);
  border: 2px solid #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: #333;
  font-family: var(--font-display);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  flex-shrink: 0;
  line-height: 1;
}

.role-badge {
  font-size: 0.5rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 8px;
  flex-shrink: 0;
  line-height: 1.4;
}

.role-badge--sb {
  background: #2563eb;
  color: #fff;
  border: 1px solid #1d4ed8;
}

.role-badge--bb {
  background: #dc2626;
  color: #fff;
  border: 1px solid #b91c1c;
}

.seat__avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}


.seat__cards {
  display: flex;
  gap: var(--card-gap);
  min-height: var(--card-h);
  align-items: center;
  flex-wrap: nowrap;
  justify-content: center;
}

/* Seat bottom (player) — hand-desc above cards, info below */

.seat__bet {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

.bet-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(212,175,55,0.15);
  border: 1px solid var(--border-strong);
  padding: 1px 8px;
  border-radius: 12px;
  animation: betAppear 0.3s ease-out;
  white-space: nowrap;
}

@keyframes betAppear {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.action-check {
  display: inline-block;
  color: var(--success, #4caf50);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: betAppear 0.3s ease-out;
}

.seat__status {
  font-size: 0.56rem;
  color: var(--text-muted);
  min-height: 12px;
  text-align: center;
  font-weight: 500;
  white-space: nowrap;
}

.seat__status--highlight { color: var(--success); }
.seat__status--fold { color: var(--danger); }

.seat__allin-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--danger) 0%, #cc3333 100%);
  color: #fff;
  font-size: clamp(0.55rem, 0.75vw, 0.8rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 0 16px rgba(220,40,40,0.5), 0 2px 8px rgba(0,0,0,0.4);
  animation: allinPulse 1.2s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes allinPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(220,40,40,0.5), 0 2px 8px rgba(0,0,0,0.4); }
  50% { box-shadow: 0 0 28px rgba(255,60,60,0.8), 0 2px 12px rgba(0,0,0,0.5); }
}

/* ===== 座位操作按钮（加入 / 离桌 / 观战徽章），内联于信息区、积分右侧 ===== */
.seat__actions {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 0 0 auto;
}

.seat__spectator {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-strong);
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.seat__join,
.seat__leave,
.seat__takeover {
  font-size: 0.62rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}

.seat__join {
  color: #06210f;
  background: linear-gradient(135deg, var(--success) 0%, #27ae60 100%);
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.45);
}

.seat__join:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 0 18px rgba(46, 204, 113, 0.75);
}

/* 接管电脑座位（游戏中）：与「加入」一致的绿色，作为退出后重新加入的入口 */
.seat__takeover {
  color: #06210f;
  background: linear-gradient(135deg, var(--success) 0%, #27ae60 100%);
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.45);
}

.seat__takeover:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 0 18px rgba(240, 163, 10, 0.8);
}

.seat__leave {
  color: #fff;
  background: linear-gradient(135deg, var(--danger) 0%, #c0392b 100%);
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.45);
}

.seat__leave:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 0 18px rgba(231, 76, 60, 0.75);
}

/* ===== 旁观状态条 ===== */
.spectator-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 10px;
  max-width: 1100px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.04) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.spectator-bar__icon {
  font-size: 1rem;
}

.seat__hand-desc {
  font-size: 0.6rem;
  color: var(--gold-light);
  font-weight: 500;
  min-height: 12px;
  white-space: nowrap;
  text-align: center;
}

/* ===== Cards ===== */
.card {
  width: var(--card-w);
  height: var(--card-h);
  border-radius: var(--card-radius);
  background: var(--card-face);
  box-shadow: var(--shadow-card);
  position: relative;
  flex-shrink: 0;
  animation: cardDeal 0.4s ease-out backwards;
  transition: transform 0.2s, box-shadow 0.2s;
  user-select: none;
  cursor: default;
}

@keyframes cardDeal {
  from {
    transform: translateY(-30px) rotateY(90deg) scale(0.7);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotateY(0) scale(1);
    opacity: 1;
  }
}

.card--red { color: var(--suit-red); }
.card--black { color: var(--suit-black); }

.card__corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-weight: 700;
}

.card__corner--tl { top: 2px; left: 3px; }
.card__corner--br { bottom: 2px; right: 3px; transform: rotate(180deg); }

.card__rank {
  font-size: 0.78rem;
  font-family: var(--font-body);
}

.card__suit {
  font-size: 0.65rem;
}

.card__center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.35rem;
}

/* Card back */
.card--back {
  background-color: var(--card-back-bg);
  background-image:
    repeating-linear-gradient(135deg, transparent 0, transparent 5px, rgba(212,175,55,0.1) 5px, rgba(212,175,55,0.1) 6px),
    repeating-linear-gradient(45deg, transparent 0, transparent 5px, rgba(212,175,55,0.1) 5px, rgba(212,175,55,0.1) 6px);
  border: 2px solid rgba(212,175,55,0.35);
}

.card--back::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 4px;
}

.card--back::before {
  content: '\2660';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(0.7rem, 1.5vw, 1.2rem);
  color: rgba(212,175,55,0.18);
}

.card--flip {
  animation: cardFlip 0.5s ease-out;
}

@keyframes cardFlip {
  0% { transform: rotateY(180deg) scale(0.8); }
  50% { transform: rotateY(90deg) scale(0.9); }
  100% { transform: rotateY(0) scale(1); }
}

.card-slot {
  width: var(--card-w);
  height: var(--card-h);
  border-radius: var(--card-radius);
  border: 1px dashed rgba(255,255,255,0.06);
  flex-shrink: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.card-slot--folded {
  opacity: 0;
  transform: translateY(10px);
  border-color: transparent;
}

/* ===== Community Area — centered ===== */
.community {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 3;
  padding: 8px 10px;
}

.community::before {
  content: '';
  position: absolute;
  inset: -6px -12px;
  border-radius: 8px;
  border: 1px dashed rgba(212, 175, 55, 0.18);
  background: rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.12);
  z-index: -1;
}

.community__cards {
  display: flex;
  gap: var(--card-gap);
  min-height: var(--card-h);
  align-items: center;
}

.pot {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(8, 13, 26, 0.7);
  backdrop-filter: blur(8px);
  padding: 3px 12px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.pot__label {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.pot__amount {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

.pot--pulse {
  animation: potPulse 0.4s ease-out;
}

@keyframes potPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); box-shadow: 0 0 20px var(--gold-glow); }
  100% { transform: scale(1); }
}

/* ===== Controls ===== */
.controls {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.controls__row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.raise-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 160px;
  touch-action: none;
}

.raise-area.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.raise-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.raise-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--gold-dim), var(--gold));
  outline: none;
  cursor: pointer;
  touch-action: none;
}

.raise-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold));
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.raise-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #fff;
  cursor: pointer;
}

.raise-value {
  font-size: clamp(0.78rem, 1vw, 0.9rem);
  font-weight: 700;
  color: var(--gold-light);
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.raise-quick {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.btn-mini {
  padding: 3px 10px;
  font-size: clamp(0.65rem, 0.8vw, 0.72rem);
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(212,175,55,0.08);
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
  white-space: nowrap;
}

.btn-mini:hover {
  background: rgba(212,175,55,0.2);
  border-color: var(--border-strong);
}

.btn-mini:active { transform: scale(0.96); }

.btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-btn);
  user-select: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.btn:not(:disabled):active {
  transform: translateY(0) scale(0.97);
}

.btn--fold {
  background: linear-gradient(135deg, #4a3030, #3a2020);
  color: #f0a0a0;
  border: 1px solid rgba(231,76,60,0.3);
}
.btn--fold:not(:disabled):hover {
  background: linear-gradient(135deg, #5a3838, #4a2828);
  border-color: rgba(231,76,60,0.5);
}

.btn--check {
  background: linear-gradient(135deg, #2a3a4a, #1a2a3a);
  color: #a0c8f0;
  border: 1px solid rgba(52,152,219,0.3);
}
.btn--check:not(:disabled):hover {
  background: linear-gradient(135deg, #3a4a5a, #2a3a4a);
  border-color: rgba(52,152,219,0.5);
}

.btn--call {
  background: linear-gradient(135deg, #2a3a4a, #1a2a3a);
  color: #a0c8f0;
  border: 1px solid rgba(52,152,219,0.3);
}
.btn--call:not(:disabled):hover {
  background: linear-gradient(135deg, #3a4a5a, #2a3a4a);
  border-color: rgba(52,152,219,0.5);
}

.btn--raise {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #1a1a2e;
  border: 1px solid var(--gold-light);
}
.btn--raise:not(:disabled):hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 4px 16px var(--gold-glow);
}

.btn--allin {
  background: linear-gradient(135deg, #c0392b, #8e1c0e);
  color: #fff;
  border: 1px solid #e74c3c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: clamp(0.68rem, 0.9vw, 0.82rem);
}
.btn--allin:not(:disabled):hover {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 4px 16px rgba(231,76,60,0.4);
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #1a1a2e;
  border: 1px solid var(--gold-light);
  font-size: 0.88rem;
  padding: 8px 24px;
}
.btn--primary:not(:disabled):hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 4px 20px var(--gold-glow);
}

.controls__center {
  display: flex;
  justify-content: center;
  padding: 6px 0;
}

.controls__message {
  text-align: center;
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  color: var(--gold-light);
  font-weight: 500;
  padding: 4px;
  min-height: 24px;
}

/* ===== Log ===== */
.log {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 10px;
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.log::-webkit-scrollbar { width: 5px; }
.log::-webkit-scrollbar-track { background: transparent; }
.log::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.2); border-radius: 3px; }

.log__title {
  font-size: clamp(0.6rem, 0.8vw, 0.7rem);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-bottom: 2px;
  position: sticky;
  top: 0;
  background: var(--bg-panel);
  z-index: 1;
}

.log__entry {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.4;
  padding: 1px 0;
  border-left: 2px solid transparent;
  padding-left: 8px;
  animation: logSlide 0.2s ease-out;
}

@keyframes logSlide {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.log__entry--action { color: var(--text); border-left-color: var(--info); }
.log__entry--win { color: var(--success); border-left-color: var(--success); font-weight: 500; }
.log__entry--lose { color: var(--danger); border-left-color: var(--danger); }
.log__entry--info { color: var(--gold-light); border-left-color: var(--gold-dim); }
.log__entry--phase { color: var(--gold-light); border-left-color: var(--gold); font-weight: 500; }

/* ===== 筹码结果 Toast（轻量，不遮挡公共牌） ===== */
.result-toast {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 13, 26, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 6px 20px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.result-toast.show { opacity: 1; visibility: visible; }

.result-toast__label {
  color: var(--text-muted);
  font-size: 0.78rem;
}
.result-toast__amount {
  font-weight: 700;
  font-size: 1.08rem;
  transition: color 0.3s;
}
.result-toast__amount--win { color: var(--success); }
.result-toast__amount--lose { color: var(--danger); }

/* ===== 赢家 WIN 标签 ===== */
.seat__win-badge {
  display: none;
  position: absolute;
  top: -10px;
  right: -4px;
  background: linear-gradient(135deg, #f6d365, #fda085);
  color: #1a1a2e;
  font-weight: 800;
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 8px;
  letter-spacing: 0.06em;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(246, 211, 101, 0.35);
}

/* ===== Responsive ===== */
@media (max-width: 750px) {
  .game-layout { gap: 8px; }
  .table { --table-w: 220px; --table-h: 352px; width: 220px; height: 352px; border-radius: 14px; }
  .side-panel { flex: 0 0 210px; min-width: 0; }
  .log { max-height: 160px; }
  .header { flex-wrap: wrap; gap: 6px; font-size: 0.75rem; }
}

@media (max-width: 480px) {
  body { padding: 4px; }

  .game-layout {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .table {
    --table-w: min(calc(100vw - 12px), calc((100dvh - 220px) * 0.625));
    --table-h: calc(var(--table-w) * 1.6);
    width: min(calc(100vw - 12px), calc((100dvh - 220px) * 0.625));
    aspect-ratio: 1 / 1.6;
    border-radius: 10px;
    flex: 0 0 auto;
  }

  .side-panel {
    flex: 0 0 auto;
    flex-direction: row;
    width: min(calc(100vw - 12px), calc((100dvh - 220px) * 0.625));
    gap: 6px;
    max-height: none;
  }

  .controls {
    flex: 0 0 auto;
    width: 42%;
    min-width: 0;
    padding: 6px 6px;
    gap: 4px;
  }

  .controls__row {
    flex-wrap: nowrap;
    flex-direction: column;
  }

  .raise-area {
    min-width: 0;
    width: 100%;
    touch-action: none;
  }

  .raise-slider-row {
    gap: 4px;
    touch-action: none;
  }

  .raise-slider {
    min-width: 0;
    touch-action: none;
  }

  .btn-group {
    justify-content: center;
  }

  .log {
    flex: 1 1 auto;
    max-height: 160px;
  }

  :root { --card-w: 36px; --card-h: 50px; }

  .community__cards { gap: 2px; padding: 2px 4px; }
  .community__cards .card { border-radius: 2px; }
  .community__cards .card__corner--tl { top: 0; left: 1px; font-size: 0.42rem; }
  .community__cards .card__corner--br { bottom: 0; right: 1px; font-size: 0.42rem; }
  .community__cards .card__center { font-size: 0.55rem; }

  .seat__cards { gap: 1px; }
  .seat__info { padding: 1px 4px; gap: 1px; border-radius: 10px; }
  .seat__name { font-size: 0.5rem; }
  .seat__chips { font-size: 0.48rem; }
  .seat__avatar { font-size: 0.6rem; width: 20px; height: 20px; }
  .seat__allin-badge { font-size: 0.45rem; padding: 1px 3px; border-radius: 6px; }
  .role-badge { font-size: 0.45rem; padding: 1px 3px; }

  .card__corner--tl { top: 1px; left: 1px; font-size: 0.42rem; }
  .card__corner--br { bottom: 1px; right: 1px; font-size: 0.42rem; }
  .card__center { font-size: 0.55rem; }

  .controls__row { gap: 3px; }
  .controls__message { font-size: clamp(0.6rem, 2.5vw, 0.78rem); }
  .raise-value { font-size: clamp(0.6rem, 2.5vw, 0.78rem); }
  .btn { padding: clamp(5px, 1.5vw, 8px) clamp(7px, 2vw, 12px); font-size: clamp(0.62rem, 2.6vw, 0.72rem); border-radius: 6px; }
  .btn--primary { padding: clamp(6px, 1.8vw, 10px) clamp(10px, 3vw, 16px); font-size: clamp(0.68rem, 2.8vw, 0.78rem); }
  .btn-mini { padding: clamp(3px, 1vw, 5px) clamp(5px, 1.5vw, 8px); font-size: clamp(0.55rem, 2vw, 0.62rem); }
  .btn-group { gap: 3px; }

  .log { max-height: 160px; }
  .log__entry { font-size: 0.58rem; padding: 1px 4px; }

  .pot { padding: 2px 6px; font-size: 0.7rem; }
  .pot-display { font-size: 0.68rem; }
  .phase-label { font-size: 0.62rem; }
}
