/* ===== 蜂花扑克主题样式 ===== */
:root {
  --bee-red: #c8102e;
  --bee-red-dark: #8f0a20;
  --bee-blue: #003d7a;
  --bee-blue-light: #1a6bc7;
  --bee-gold: #f5c542;
  --bee-gold-dark: #c79a1e;
  --bee-cream: #fff8e7;
  --felt: #0d5c3f;
  --felt-dark: #063a27;
  --felt-light: #157a55;
  --text: #fff8e7;
  --text-dim: #c9bfa4;
  --shadow: 0 8px 24px rgba(0,0,0,.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at top, #2a0606 0%, #0d0202 60%, #000 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
}
#app { display: flex; flex-direction: column; min-height: 100vh; }

/* 顶部栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(180deg, var(--bee-red) 0%, var(--bee-red-dark) 100%);
  border-bottom: 3px solid var(--bee-gold);
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo-bee {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--bee-gold);
  display: grid; place-items: center; font-size: 24px;
  box-shadow: 0 0 12px rgba(245,197,66,.6), inset 0 -3px 6px rgba(0,0,0,.15);
  animation: bee-bob 2.4s ease-in-out infinite;
}
@keyframes bee-bob { 0%,100%{transform:translateY(0) rotate(-5deg);} 50%{transform:translateY(-4px) rotate(5deg);} }
.brand-text h1 { font-size: 20px; letter-spacing: 2px; color: #fff; }
.brand-text span { font-size: 9px; letter-spacing: 3px; color: var(--bee-gold); }
.ghost-btn {
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3);
  padding: 7px 14px; border-radius: 20px; cursor: pointer; font-size: 13px;
}
.ghost-btn:hover { background: rgba(255,255,255,.22); }

main#screen { flex: 1; position: relative; }

/* ===== 大厅 ===== */
.lobby { padding: 24px 16px 40px; max-width: 980px; margin: 0 auto; }
.lobby-hero {
  text-align: center; padding: 28px 20px;
  background: linear-gradient(135deg, rgba(200,16,46,.18), rgba(0,61,122,.18));
  border: 1px solid rgba(245,197,66,.35); border-radius: 18px;
  margin-bottom: 24px; position: relative; overflow: hidden;
}
.lobby-hero::before {
  content: "🐝"; position: absolute; font-size: 160px; opacity: .08;
  right: -20px; top: -30px; transform: rotate(15deg);
}
.lobby-hero h2 { font-size: 28px; margin-bottom: 8px; letter-spacing: 3px; }
.lobby-hero p { color: var(--text-dim); font-size: 14px; line-height: 1.7; }
.lobby-hero .tag {
  display: inline-block; margin-top: 12px; padding: 5px 14px;
  background: var(--bee-gold); color: #3a1a00; border-radius: 20px;
  font-size: 12px; font-weight: bold; letter-spacing: 1px;
}
.mode-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 18px; }
.mode-card {
  background: linear-gradient(160deg, #1a0608, #0a0203);
  border: 1px solid rgba(245,197,66,.25); border-radius: 16px;
  padding: 24px; cursor: pointer; transition: .2s; position: relative; overflow: hidden;
}
.mode-card:hover { transform: translateY(-4px); border-color: var(--bee-gold); box-shadow: var(--shadow); }
.mode-card .icon { font-size: 48px; margin-bottom: 12px; }
.mode-card h3 { font-size: 20px; margin-bottom: 8px; color: var(--bee-gold); }
.mode-card p { color: var(--text-dim); font-size: 13px; line-height: 1.7; min-height: 60px; }
.mode-card .enter {
  margin-top: 14px; display: inline-block; padding: 8px 18px;
  background: var(--bee-red); color: #fff; border-radius: 20px; font-size: 13px;
}
.mode-card.online { border-color: rgba(26,107,199,.5); }
.mode-card.online h3 { color: #6fb3ff; }
.mode-card.online .enter { background: var(--bee-blue-light); }

/* 规则区 */
.rules { margin-top: 28px; padding: 20px; background: rgba(255,255,255,.04); border-radius: 14px; border: 1px solid rgba(255,255,255,.08); }
.rules h3 { color: var(--bee-gold); margin-bottom: 12px; font-size: 16px; }
.rules ul { list-style: none; }
.rules li { padding: 6px 0; font-size: 13px; color: var(--text-dim); display: flex; gap: 8px; }
.rules li::before { content: "🍯"; }

/* ===== 牌桌通用 ===== */
.table-wrap { padding: 10px; }
.table-info {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; background: rgba(0,0,0,.35); border-radius: 10px; margin-bottom: 10px; font-size: 13px;
}
.table-info .level-tag { background: var(--bee-gold); color: #3a1a00; padding: 3px 10px; border-radius: 12px; font-weight: bold; }
.table-info .prize-pool { color: var(--bee-gold); font-weight: bold; }

.poker-table {
  position: relative;
  background: radial-gradient(ellipse at center, var(--felt-light) 0%, var(--felt) 55%, var(--felt-dark) 100%);
  border: 8px solid #5a3a1a;
  border-radius: 50% / 45%;
  box-shadow: inset 0 0 60px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.6);
  aspect-ratio: 16 / 9;
  min-height: 340px;
  max-height: 62vh;
  margin: 0 auto;
  width: 100%;
  max-width: 1000px;
}
.table-inner { position: absolute; inset: 0; }

/* 中央公共牌/底池 */
.table-center {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%);
  text-align: center; width: 80%;
}
.pot-display { font-size: 13px; color: var(--bee-gold); margin-bottom: 8px; letter-spacing: 1px; }
.pot-amount { font-size: 22px; font-weight: bold; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.community-cards { display: flex; justify-content: center; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.dealer-status { font-size: 11px; color: var(--text-dim); margin-top: 8px; min-height: 16px; }

/* 扑克牌 */
.card {
  width: 42px; height: 60px; border-radius: 6px;
  background: #fff; color: #000;
  display: inline-flex; flex-direction: column; justify-content: space-between;
  padding: 3px 5px; font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
  position: relative; font-size: 14px;
}
.card.red { color: var(--bee-red); }
.card.back {
  background: repeating-linear-gradient(45deg, var(--bee-red), var(--bee-red) 6px, var(--bee-red-dark) 6px, var(--bee-red-dark) 12px);
  border: 2px solid var(--bee-gold);
}
.card.back::after {
  content: "🐝"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 20px; background: rgba(245,197,66,.15);
}
.card .card-corner { line-height: 1; }
.card .card-corner.bottom { align-self: flex-end; transform: rotate(180deg); }
.card .card-suit { font-size: 18px; text-align: center; }
.card.winner { box-shadow: 0 0 16px 4px var(--bee-gold); transform: translateY(-4px); }
.card.folded { opacity: .25; filter: grayscale(1); }

.community-cards .card { width: 38px; height: 54px; }

/* 玩家座位 */
.seat {
  position: absolute; width: 108px; transform: translate(-50%,-50%);
  text-align: center;
}
.seat .avatar {
  width: 50px; height: 50px; border-radius: 50%; margin: 0 auto 4px;
  background: linear-gradient(135deg, var(--bee-blue), var(--bee-blue-light));
  border: 3px solid rgba(255,255,255,.25);
  display: grid; place-items: center; font-size: 24px;
  position: relative;
}
.seat.folded .avatar { filter: grayscale(.8) brightness(.6); }
.seat.eliminated { opacity: .35; }
.seat.active .avatar { border-color: var(--bee-gold); box-shadow: 0 0 14px rgba(245,197,66,.7); }
.seat.winner .avatar { border-color: var(--bee-gold); animation: pulse-gold 1s ease-in-out infinite; }
@keyframes pulse-gold { 0%,100%{box-shadow:0 0 10px rgba(245,197,66,.5);} 50%{box-shadow:0 0 22px rgba(245,197,66,1);} }
.seat .dealer-btn {
  position: absolute; top: -4px; right: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: #000; font-size: 11px; font-weight: bold;
  display: grid; place-items: center; border: 2px solid var(--bee-gold);
}
.seat .name { font-size: 12px; color: #fff; text-shadow: 0 1px 3px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .chips { font-size: 12px; color: var(--bee-gold); font-weight: bold; }
.seat .bet-badge {
  margin-top: 3px; display: inline-block; padding: 2px 8px;
  background: rgba(0,0,0,.6); border: 1px solid var(--bee-gold);
  border-radius: 10px; font-size: 11px; color: var(--bee-gold);
}
.seat .action-tag {
  position: absolute; top: -2px; right: -6px;
  background: var(--bee-red); color: #fff; font-size: 10px; font-weight: bold;
  padding: 3px 8px; border-radius: 10px; white-space: nowrap;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0,0,0,.55);
  line-height: 1.2;
}
.seat .action-tag.fold-tag { background: #555; }
.seat .action-tag.call-tag { background: var(--bee-blue-light); }
.seat .action-tag.raise-tag { background: var(--bee-red); }
.seat .action-tag.check-tag { background: #777; }
.seat .action-tag.allin-tag { background: #000; color: var(--bee-gold); border: 1px solid var(--bee-gold); }

/* 当前玩家手牌区 */
.player-hand {
  display: flex; justify-content: center; gap: 8px; margin: 14px 0 6px;
}
.player-hand .card { width: 56px; height: 80px; font-size: 16px; }
.player-hand .card .card-suit { font-size: 26px; }
.player-hand-label { text-align: center; font-size: 12px; color: var(--text-dim); min-height: 16px; }

/* 操作栏 */
.action-bar {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center;
  padding: 12px; background: rgba(0,0,0,.45); border-radius: 14px; margin: 10px auto; max-width: 720px;
}
.action-bar button {
  padding: 10px 18px; border: none; border-radius: 10px; font-size: 14px; font-weight: bold;
  cursor: pointer; color: #fff; min-width: 72px; transition: .15s;
}
.action-bar button:disabled { opacity: .4; cursor: not-allowed; }
.btn-fold { background: #555; }
.btn-check { background: #6a7280; }
.btn-call { background: var(--bee-blue-light); }
.btn-raise { background: var(--bee-red); }
.btn-allin { background: linear-gradient(135deg, #ff8a00, #c8102e); }
.raise-control { display: flex; align-items: center; gap: 6px; }
.raise-control input[type=range] { width: 120px; accent-color: var(--bee-gold); }
.raise-amount {
  background: rgba(255,255,255,.1); border: 1px solid var(--bee-gold); color: var(--bee-gold);
  padding: 6px 10px; border-radius: 8px; width: 90px; text-align: center; font-weight: bold;
}
.raise-presets { display: flex; gap: 4px; }
.raise-presets button { padding: 6px 8px; font-size: 11px; min-width: auto; background: rgba(245,197,66,.2); border: 1px solid var(--bee-gold); color: var(--bee-gold); }

/* 日志 */
.game-log {
  max-width: 720px; margin: 0 auto; padding: 10px 14px;
  background: rgba(0,0,0,.3); border-radius: 10px; max-height: 120px; overflow-y: auto;
  font-size: 12px; color: var(--text-dim); line-height: 1.7;
}
.game-log .log-win { color: var(--bee-gold); }

/* ===== 弹窗 ===== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal.hidden { display: none; }
.modal-card {
  background: linear-gradient(160deg, #1a0608, #0a0203);
  border: 2px solid var(--bee-gold); border-radius: 18px;
  padding: 28px; max-width: 440px; width: 100%; text-align: center;
  box-shadow: 0 0 40px rgba(245,197,66,.3);
}
.modal-card h2 { color: var(--bee-gold); margin-bottom: 14px; font-size: 24px; }
.modal-card .modal-emoji { font-size: 64px; margin-bottom: 10px; }
.modal-card p { color: var(--text-dim); font-size: 14px; line-height: 1.7; margin-bottom: 12px; }
.modal-card .rank-list { text-align: left; margin: 14px 0; }
.modal-card .rank-list div { padding: 6px 10px; border-bottom: 1px dashed rgba(255,255,255,.1); font-size: 13px; display: flex; justify-content: space-between; }
.modal-card .rank-list div:first-child { color: var(--bee-gold); font-weight: bold; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.modal-actions button {
  padding: 10px 22px; border: none; border-radius: 22px; font-size: 14px; font-weight: bold;
  cursor: pointer; color: #fff;
}
.btn-primary { background: var(--bee-red); }
.btn-secondary { background: var(--bee-blue-light); }
.btn-gold { background: linear-gradient(135deg, var(--bee-gold), var(--bee-gold-dark)); color: #3a1a00; }

.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.85); color: var(--bee-gold); border: 1px solid var(--bee-gold);
  padding: 10px 20px; border-radius: 20px; z-index: 200; font-size: 13px;
}
.toast.hidden { display: none; }

/* ===== 房间面板（联网） ===== */
.room-panel { max-width: 560px; margin: 0 auto; padding: 24px 16px; }
.room-panel h2 { color: var(--bee-gold); text-align: center; margin-bottom: 18px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.form-row input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(245,197,66,.3); background: rgba(255,255,255,.06);
  color: #fff; font-size: 15px; outline: none;
}
.form-row input:focus { border-color: var(--bee-gold); }
.btn-block { width: 100%; padding: 13px; border: none; border-radius: 10px; background: var(--bee-red); color: #fff; font-size: 15px; font-weight: bold; cursor: pointer; }
.btn-block:disabled { opacity: .5; cursor: not-allowed; }
.btn-block.blue { background: var(--bee-blue-light); }
.room-code-display {
  text-align: center; padding: 18px; background: rgba(245,197,66,.1);
  border: 2px dashed var(--bee-gold); border-radius: 12px; margin: 14px 0;
}
.room-code-display .code { font-size: 36px; letter-spacing: 8px; color: var(--bee-gold); font-weight: bold; font-family: monospace; }
.player-list { list-style: none; margin: 14px 0; }
.player-list li { padding: 10px 14px; background: rgba(255,255,255,.05); border-radius: 8px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.player-list li.me { border: 1px solid var(--bee-gold); }
.player-list .ready-dot { width: 10px; height: 10px; border-radius: 50%; background: #888; }
.player-list .ready-dot.ready { background: #2ecc71; }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs button { flex: 1; padding: 10px; border: none; background: rgba(255,255,255,.06); color: var(--text-dim); border-radius: 8px; cursor: pointer; font-size: 14px; }
.tabs button.active { background: var(--bee-red); color: #fff; }

.leaderboard { max-width: 600px; margin: 20px auto; padding: 0 16px; }
.leaderboard h3 { color: var(--bee-gold); margin-bottom: 12px; }
.lb-row { display: flex; justify-content: space-between; padding: 10px 14px; background: rgba(255,255,255,.04); border-radius: 8px; margin-bottom: 6px; }
.lb-row.top1 { background: rgba(245,197,66,.15); border: 1px solid var(--bee-gold); }
.lb-rank { font-weight: bold; width: 30px; }
.lb-name { flex: 1; }
.lb-score { color: var(--bee-gold); font-weight: bold; }

/* 移动端适配 */
@media (max-width: 640px) {
  .poker-table { min-height: 300px; border-width: 5px; }
  .seat { width: 78px; }
  .seat .avatar { width: 38px; height: 38px; font-size: 18px; }
  .seat .name, .seat .chips { font-size: 10px; }
  .card { width: 32px; height: 46px; font-size: 11px; padding: 2px 3px; }
  .card .card-suit { font-size: 14px; }
  .community-cards .card { width: 30px; height: 42px; }
  .player-hand .card { width: 44px; height: 64px; font-size: 13px; }
  .player-hand .card .card-suit { font-size: 20px; }
  .pot-amount { font-size: 16px; }
  .action-bar button { padding: 8px 12px; font-size: 12px; min-width: 58px; }
  .raise-control input[type=range] { width: 80px; }
  .brand-text h1 { font-size: 16px; }
  .brand-text span { display: none; }
  .lobby-hero h2 { font-size: 22px; }
}

/* 飘落花瓣装饰 */
.petals {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.petal {
  position: absolute; top: -40px; font-size: 20px;
  animation: petal-fall linear infinite; opacity: .4;
}
@keyframes petal-fall {
  0% { transform: translateY(-40px) rotate(0deg); opacity: 0; }
  10% { opacity: .5; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}
.lobby, .table-wrap, .room-panel { position: relative; z-index: 1; }

/* 夺冠动画 */
@keyframes crown-bounce {
  0% { transform: scale(0) rotate(-180deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.modal-card .modal-emoji { animation: crown-bounce 0.8s ease-out; }

/* 金币飘落 */
@keyframes coin-drop {
  0% { transform: translateY(-100px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(400px); opacity: 0; }
}
.confetti {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 99;
}
.confetti span {
  position: absolute; font-size: 24px;
  animation: coin-drop 2.5s ease-in forwards;
}

/* 按钮按下效果 */
.mode-card:active, .action-bar button:active, .ghost-btn:active { transform: scale(0.96); }
.action-bar button { transition: transform .1s, opacity .15s; }

/* 自己座位高亮 */
.seat.self .avatar {
  border-color: var(--bee-gold);
  box-shadow: 0 0 16px rgba(245,197,66,.5);
}

/* 加载/等待提示 */
.waiting-text { text-align: center; padding: 40px; color: var(--text-dim); }
.waiting-text .spinner { font-size: 48px; animation: spin 2s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 上桌过渡页 ===== */
.seat-screen {
  max-width: 900px; margin: 0 auto; padding: 20px 16px 40px;
}
.seat-table-visual {
  position: relative; width: 100%; max-width: 520px; aspect-ratio: 1.3;
  margin: 0 auto 24px;
}
.seat-ring { position: absolute; inset: 0; }
.seat-avatar {
  position: absolute; width: 72px; text-align: center;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
.seat-avatar .seat-circle {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 4px;
  background: linear-gradient(135deg, var(--bee-blue), var(--bee-blue-light));
  border: 3px solid rgba(255,255,255,.3); display: grid; place-items: center;
  font-size: 26px; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.seat-avatar.me .seat-circle {
  background: linear-gradient(135deg, var(--bee-red), var(--bee-gold));
  border-color: var(--bee-gold);
  box-shadow: 0 0 18px rgba(245,197,66,.6);
  animation: pulse-gold 1.5s ease-in-out infinite;
}
.seat-avatar .seat-name { font-size: 11px; color: var(--text-dim); }
.seat-avatar.me .seat-name { color: var(--bee-gold); font-weight: bold; }
/* 9 人椭圆分布 */
.seat-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  text-align: center;
}
.bee-dealer {
  font-size: 56px; animation: bee-bob 2s ease-in-out infinite;
}
.seat-title { font-size: 20px; font-weight: bold; color: var(--bee-gold); letter-spacing: 3px; }
.seat-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.seat-panel {
  background: linear-gradient(160deg, rgba(200,16,46,.1), rgba(0,61,122,.1));
  border: 1px solid rgba(245,197,66,.3);
  border-radius: 16px; padding: 24px; text-align: center;
}
.seat-panel h2 { color: var(--bee-gold); margin-bottom: 8px; }
.seat-panel p { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }
.seat-info {
  display: flex; justify-content: center; gap: 24px; margin-bottom: 20px; flex-wrap: wrap;
}
.seat-info div { display: flex; flex-direction: column; gap: 4px; }
.seat-info span { font-size: 11px; color: var(--text-dim); }
.seat-info b { color: var(--bee-gold); font-size: 15px; }
.take-seat-btn {
  width: 100%; max-width: 280px; padding: 14px; border: none; border-radius: 26px;
  background: linear-gradient(135deg, var(--bee-red), var(--bee-gold-dark));
  color: #fff; font-size: 17px; font-weight: bold; cursor: pointer;
  box-shadow: 0 6px 20px rgba(200,16,46,.4);
  transition: transform .15s;
}
.take-seat-btn:hover { transform: translateY(-2px); }
.take-seat-btn:disabled { opacity: .7; cursor: not-allowed; }
.back-lobby-btn {
  display: block; margin: 12px auto 0; background: none; border: none;
  color: var(--text-dim); cursor: pointer; font-size: 13px; text-decoration: underline;
}

/* 座位前的两张手牌 */
.seat-cards {
  display: flex; justify-content: center; gap: 2px; margin: 3px 0 2px;
  min-height: 30px;
}
.seat-cards .card {
  width: 22px; height: 31px; font-size: 9px; padding: 1px 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.5);
  transition: none;
  transform: none;
  will-change: auto;
}
.seat-cards .card .card-suit { font-size: 10px; }
.seat-cards.face-up .card { box-shadow: 0 0 8px rgba(245,197,66,.6); }
.seat-cards.folded-hand .card { opacity: .35; transform: rotate(-90deg); }
.seat.self .seat-cards .card { outline: 1px solid var(--bee-gold); outline-offset: -1px; }

/* 只有当前行动玩家的牌才轻微跳动，提示「该你了」 */
.seat.active .seat-cards .card {
  animation: card-your-turn 1.1s ease-in-out infinite;
}
.seat.active .seat-cards .card:nth-child(2) { animation-delay: .15s; }
@keyframes card-your-turn {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 自己底部的手牌放大显示（静态） */
.player-hand .card { }
.player-hand .card:hover { transform: none; }

/* 摊牌秀牌面板 */
.showcase {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.85);
  border: 2px solid var(--bee-gold);
  border-radius: 14px;
  padding: 12px 18px;
  text-align: center; z-index: 5;
  animation: showcase-pop .4s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 0 30px rgba(245,197,66,.4);
}
@keyframes showcase-pop {
  0% { transform: translate(-50%,-50%) scale(.3); opacity: 0; }
  100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}
.showcase .showcase-name {
  color: var(--bee-gold); font-weight: bold; font-size: 13px; margin-bottom: 4px;
}
.showcase .showcase-cards { display: flex; gap: 4px; justify-content: center; }
.showcase .showcase-cards .card { width: 34px; height: 48px; font-size: 11px; }
.showcase .showcase-cards .card .card-suit { font-size: 14px; }
.showcase .showcase-hand {
  margin-top: 6px; font-size: 14px; color: #fff; font-weight: bold;
  text-shadow: 0 0 8px rgba(245,197,66,.8);
}
.showcase .showcase-amount {
  margin-top: 2px; font-size: 11px; color: var(--bee-gold);
}

/* 手牌静态显示，不做动画（避免重绘跳动） */
.seat-cards .card { }
.seat-cards .card:nth-child(2) { }

.seat-cards.face-up.winner-hand .card {
  box-shadow: 0 0 12px 3px var(--bee-gold), 0 2px 6px rgba(0,0,0,.5);
  transform: translateY(-3px);
}
/* 自己底部手牌区在摊牌时可以隐藏，避免重复 */
.player-hand-label.hand-result { color: var(--bee-gold); font-weight: bold; font-size: 14px; }

/* 移动端座位牌调整 */
@media (max-width: 640px) {
  .seat-cards .card { width: 16px; height: 23px; font-size: 7px; padding: 1px; }
  .seat-cards .card .card-suit { font-size: 7px; }
  .showcase { padding: 8px 12px; }
  .showcase .showcase-cards .card { width: 26px; height: 37px; font-size: 9px; }
  .showcase .showcase-cards .card .card-suit { font-size: 11px; }
  .showcase .showcase-name { font-size: 11px; }
  .showcase .showcase-hand { font-size: 12px; }
  .seat .action-tag { font-size: 9px; padding: 2px 6px; top: -2px; right: -4px; }
  .seat-screen { padding: 10px; }
  .seat-avatar .seat-circle { width: 44px; height: 44px; font-size: 20px; }
  .seat-avatar .seat-name { font-size: 10px; }
}

/* ===== 飞筹与动作动画 ===== */
.chip-layer { position: absolute; inset: 0; pointer-events: none; z-index: 8; overflow: visible; }
.flying-chip {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 22px; z-index: 9;
  transition: left .6s cubic-bezier(.45,.05,.35,1), top .6s cubic-bezier(.45,.05,.35,1), transform .6s ease, opacity .6s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}
.flying-chip.flying { transform: translate(-50%, -50%) scale(0.7); opacity: .9; }
.flying-chip-amount {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.7); color: var(--bee-gold);
  font-size: 10px; padding: 1px 6px; border-radius: 8px; white-space: nowrap;
  font-family: sans-serif;
}

/* 动作标签：默认静态，只有刚做动作的座位才播放弹出动画 */
.seat .action-tag {
  transform: scale(1);
  transform-origin: center;
}
.seat.action-pop .action-tag {
  animation: tag-pop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes tag-pop {
  0% { transform: scale(.3); opacity: 0; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* 下注徽章：默认静态，只有刚做动作的座位才弹出 */
.seat .bet-badge { transform: scale(1); }
.seat.action-pop .bet-badge {
  animation: bet-pop .3s ease;
}
@keyframes bet-pop {
  0% { transform: scale(.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 头像：默认静态，只有刚做动作的座位才轻微反馈 */
.seat.action-pop .avatar {
  animation: avatar-nudge .35s ease;
}
@keyframes avatar-nudge {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.seat.bet-flash .avatar {
  box-shadow: 0 0 18px rgba(245,197,66,.8);
}

/* 底池金额跳动 */
.pot-bump {
  animation: pot-bump .3s ease;
}
@keyframes pot-bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); text-shadow: 0 0 14px var(--bee-gold); }
  100% { transform: scale(1); }
}

/* ===== 思考气泡 ===== */
.thought-bubble {
  position: absolute;
  left: 50%;
  top: -52px;
  transform: translateX(-50%);
  background: #fff;
  color: #222;
  font-size: 11px;
  line-height: 1.3;
  padding: 6px 10px;
  border-radius: 12px;
  white-space: nowrap;
  max-width: 180px;
  box-shadow: 0 3px 10px rgba(0,0,0,.4);
  z-index: 30;
  animation: bubble-pop .25s ease;
}
.thought-bubble::after {
  content: "";
  position: absolute; left: 50%; bottom: -6px;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
}
.thought-bubble .typing {
  display: inline-block;
  animation: typing-dots 1s infinite;
  color: var(--bee-red);
  font-weight: bold;
}
@keyframes typing-dots {
  0%,100% { opacity: .3; }
  50% { opacity: 1; }
}
@keyframes bubble-pop {
  0% { transform: translateX(-50%) scale(.6); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* ===== 玩家倒计时圆环 ===== */
.countdown-ring {
  position: absolute;
  left: 50%;
  top: -58px;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  z-index: 25;
  animation: ring-in .25s ease;
}
.countdown-ring svg { display: block; }
.countdown-ring .cd-num {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 16px; font-weight: bold; color: var(--bee-gold);
}
.countdown-ring.urgent .cd-num {
  color: #ff5555;
  animation: cd-pulse .5s ease-in-out infinite;
}
@keyframes cd-pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
@keyframes ring-in {
  0% { transform: translateX(-50%) scale(.5); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* ===== 偷鸡成功提示 ===== */
.bluff-notice {
  animation: bluff-pop .5s cubic-bezier(.34,1.56,.64,1);
  text-align: center;
}
.bluff-emoji { font-size: 42px; animation: shake .5s ease; }
.bluff-text {
  font-size: 18px; font-weight: bold;
  background: linear-gradient(90deg, #ff8a00, #ffd700, #ff8a00);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 4px 0;
}
.bluff-sub { font-size: 11px; color: var(--text-dim); }
@keyframes bluff-pop {
  0% { transform: scale(.3) rotate(-10deg); opacity: 0; }
  60% { transform: scale(1.1) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes shake {
  0%,100% { transform: rotate(0); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

@media (max-width: 640px) {
  .thought-bubble { font-size: 10px; padding: 4px 8px; max-width: 120px; top: -44px; }
  .countdown-ring { width: 36px; height: 36px; top: -50px; }
  .countdown-ring svg { width: 36px; height: 36px; }
  .countdown-ring .cd-num { font-size: 13px; }
  .bluff-text { font-size: 15px; }
}

/* 买延时按钮 */
.buy-time-btn {
  position: absolute;
  left: 50%;
  top: 105%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--bee-red), var(--bee-gold-dark));
  color: #fff;
  border: 1px solid var(--bee-gold);
  border-radius: 10px;
  font-size: 9px;
  line-height: 1.2;
  padding: 3px 6px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
  margin-top: 4px;
  font-weight: bold;
}
.buy-time-btn:hover { filter: brightness(1.15); }
.buy-time-btn.disabled {
  background: #555; border-color: #666; color: #aaa; cursor: not-allowed;
  box-shadow: none;
}
.buy-time-btn.disabled:hover { filter: none; }

@media (max-width: 640px) {
  .countdown-ring { width: 40px; height: 40px; }
  .countdown-ring svg { width: 40px; height: 40px; }
  .countdown-ring .cd-num { font-size: 14px; }
  .buy-time-btn { font-size: 8px; padding: 2px 5px; }
}

/* ===== 玩家 HUD（近两手统计） ===== */
.hud-row {
  display: inline-flex; align-items: center; gap: 3px;
  margin: 1px 0; font-size: 9px;
}
.hud-tag {
  padding: 1px 5px; border-radius: 6px;
  background: #555; color: #fff; font-weight: bold;
}
.hud-tag.loose { background: #c8102e; }
.hud-tag.aggro { background: #e67e00; }
.hud-tag.station { background: #2980b9; }
.hud-tag.tight { background: #27ae60; }
.hud-tag.nit { background: #7f8c8d; }
.hud-stats { color: var(--bee-gold); font-family: monospace; }

/* 胜率显示 */
.win-rate {
  display: inline-block; margin-left: 8px;
  padding: 2px 8px; border-radius: 10px;
  font-size: 12px; font-weight: bold;
}
.win-rate.good { background: rgba(39,174,96,.25); color: #2ecc71; border: 1px solid #27ae60; }
.win-rate.mid { background: rgba(245,197,66,.2); color: var(--bee-gold); border: 1px solid var(--bee-gold); }
.win-rate.bad { background: rgba(200,16,46,.2); color: #ff6b6b; border: 1px solid var(--bee-red); }

@media (max-width: 640px) {
  .hud-row { font-size: 8px; }
  .hud-tag { padding: 0 3px; }
  .win-rate { font-size: 10px; padding: 1px 6px; }
}
