﻿/* ============================================================
   鐗涚墰鎵戝厠 - 绉诲姩绔牱寮?   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0a0a0a;
  --bg-table: #0d5e2e;
  --gold: #d4a843;
  --gold-light: #f5d78c;
  --gold-dark: #8b6914;
  --red: #c0392b;
  --red-light: #e74c3c;
  --white: #f5f0e8;
  --card-bg: #fffef5;
  --text: #e0d7c6;
  --text-dim: #9a9588;
  --shadow: 0 4px 20px rgba(0,0,0,0.6);
  --radius: 12px;
  --card-radius: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
  --felt-green: #0a5c35;
  --felt-dark: #063822;
}

/* 妗岄潰涓婚 */
body.theme-blue { --bg-table: #0d3d5e; --felt-green: #0a3c5c; --felt-dark: #062238; }
body.theme-red { --bg-table: #5e1a0d; --felt-green: #5c1a1a; --felt-dark: #380606; }
body.theme-gold { --bg-table: #5e4a0d; --felt-green: #5c4a0a; --felt-dark: #382e06; }
body.theme-velvet { --bg-table: #3d0a1c; --felt-green: #2e0a18; --felt-dark: #1a040d; }
body.theme-emerald { --bg-table: #064a2e; --felt-green: #043a24; --felt-dark: #021a10; }
body.theme-midnight { --bg-table: #0d1b3e; --felt-green: #0a1530; --felt-dark: #040a18; }
body.theme-violet { --bg-table: #2e1a5c; --felt-green: #201240; --felt-dark: #100828; }

/* 瑙掕惤鎸夐挳鍦ㄦ繁鑹茶儗鏅笂鏇村彲瑙?*/
.btn-corner { background: rgba(20,20,20,0.85); border-color: rgba(255,255,255,0.2); }

html, body {
  width: 100%; height: 100%; height: 100dvh; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #000;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Loading */
#loading-screen {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: #0a1f14;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.4s ease-out;
}
#loading-screen.hide { opacity: 0; pointer-events: none; animation: none; }
#loading-screen { animation: forceHide 0.3s 1.5s forwards; }
@keyframes forceHide { to { opacity: 0; pointer-events: none; z-index: -1; } }
.loading-card {
  font-size: 64px; animation: cardSpin 1s ease-in-out infinite;
}
@keyframes cardSpin {
  0% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(180deg) scale(1.1); }
  100% { transform: rotateY(360deg) scale(1); }
}
.loading-text {
  color: #d4a843; font-size: 18px; font-weight: 700; margin-top: 16px;
  animation: loadPulse 1.5s ease-in-out infinite;
}
.loading-sub { color: rgba(255,255,255,0.3); font-size: 12px; margin-top: 4px; }
@keyframes loadPulse {
  0%,100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* 鐗屾閲戣壊绮掑瓙 */
.table-particles {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 5; overflow: hidden;
}
.table-particle {
  position: absolute; bottom: -20px;
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(212,168,67,0.5);
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.2; }
  100% { transform: translateY(-100vh) translateX(var(--px)); opacity: 0; }
}


#app {
  width: 100%; min-height: 100%; min-height: 100dvh; max-width: 500px; margin: 0 auto;
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, #1a5c3a 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(212,168,67,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(212,168,67,0.04) 0%, transparent 50%),
    linear-gradient(180deg, #0a1a0f 0%, #0d2818 30%, #0a1f14 60%, #06100a 100%);
  border-left: 2px solid #1a1a1a; border-right: 2px solid #1a1a1a;
}

.screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  transition: opacity 0.3s, transform 0.3s;
}
#app.has-announce .screen { top: 22px; }
.screen.hidden {
  opacity: 0; transform: translateY(20px);
  pointer-events: none;
}

/* --- 鎸夐挳閫氱敤 --- */
.btn {
  border: none; border-radius: 25px;
  padding: 12px 28px;
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
  color: #1a0a00;
  box-shadow: 0 4px 15px rgba(201,168,76,0.4);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}
.btn-large {
  width: 100%; padding: 12px 16px;
  font-size: 16px; letter-spacing: 1px;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}
.btn-auto-sort {
  background: linear-gradient(135deg, #6c5ce7, #4834d4);
  color: white; border: none;
  font-size: 16px; padding: 12px 16px; border-radius: 28px;
  cursor: pointer; font-weight: 600;
  flex-shrink: 0;
}
.btn-auto-sort:active { transform: scale(0.95); opacity: 0.8; }

.btn-lock {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white; border: none;
  font-size: 18px; padding: 12px 28px; border-radius: 30px;
  box-shadow: 0 4px 20px rgba(231,76,60,0.5);
  animation: pulse-lock 2s ease-in-out infinite;
  flex: 1; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.btn-lock:active { transform: scale(0.95); box-shadow: 0 2px 10px rgba(231,76,60,0.3); }
.btn-lock:focus-visible { outline: 2px solid #ffd700; outline-offset: 2px; }
.btn-lock.locked {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  animation: none;
  box-shadow: 0 4px 20px rgba(39,174,96,0.5);
}
.btn-lock.locked:active { transform: scale(0.97); }
.btn-back {
  background: transparent;
  border: 1px solid var(--text-dim);
  color: var(--text-dim);
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 20px;
  cursor: pointer;
}

@keyframes pulse-lock {
  0%, 100% { box-shadow: 0 4px 20px rgba(231,76,60,0.5); }
  50% { box-shadow: 0 4px 35px rgba(231,76,60,0.8); }
}

/* 鐗堟潈 */
/* 鍏ㄥ眬鍏憡婊氬姩鏉?*/
.announce-bar { position: relative; z-index: 999; background: linear-gradient(90deg, rgba(180,0,0,0.9), rgba(200,40,40,0.9), rgba(180,0,0,0.9)); padding: 3px 0; text-align: center; overflow: hidden; white-space: nowrap; flex-shrink: 0; }
.announce-text { display: inline-block; color: #ffd700; font-size: 12px; font-weight: 600; animation: marquee 18s linear infinite; padding: 0 60%; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.ver-tag { font-size: 9px; color: rgba(255,255,255,0.12); user-select: none; -webkit-user-select: none; }
.copyright {
  text-align: center; font-size: 10px; color: rgba(255,255,255,0.4);
  padding: 6px 0; width: 100%;
}
.copyright a { color: rgba(212,168,67,0.8); text-decoration: none; }

/* --- 鐧诲綍鐣岄潰 --- */
#login-screen {
  background: linear-gradient(180deg, #1a0a2e 0%, #0d1b2a 50%, #0a3d2e 100%);
  justify-content: flex-start; align-items: center;
  padding: 0 12px 4px; gap: 2px;
  padding-bottom: env(safe-area-inset-bottom, 8px);
  overflow-y: auto;
  min-height: 100dvh;
}
.login-bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(201,168,76,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(231,76,60,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.login-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
}
.logo-area { text-align: center; }
.logo-icon { margin-bottom: 0; transform: scale(0.8); }
.subtitle { color: var(--text-dim); font-size: 11px; margin-top: 2px; }

/* 浠婃棩杩愬娍鍗＄墖 */
.fortune-card {
  width: 100%; max-width: 360px;
  padding: 6px 12px; border-radius: 10px;
  background: rgba(212,168,67,0.06); border-left: 3px solid rgba(212,168,67,0.5);
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #d4a843;
}
.fortune-icon { font-size: 18px; flex-shrink: 0; }
.fortune-text { flex: 1; }

/* 每日签到 */
.signin-card { width:100%;max-width:360px;padding:8px 10px;border-radius:10px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.06);text-align:center; }
.signin-header { display:flex;justify-content:space-between;align-items:center;margin-bottom:4px; }
.signin-title { font-size:12px;color:#d4a843;font-weight:700; }
.signin-reward { font-size:12px;color:#2ecc71;font-weight:700; }
.signin-days { display:flex;gap:4px;justify-content:center;margin:6px 0; }
.signin-day { width:32px;height:32px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:7px;border:1px solid rgba(255,255,255,0.08);background:rgba(255,255,255,0.02);color:#555;transition:all 0.2s; }
.signin-day .day-icon { font-size:12px;line-height:1; }
.signin-day .day-label { font-size:7px;color:#555; }
.signin-day.done { background:rgba(46,204,113,0.12);border-color:rgba(46,204,113,0.3);color:#2ecc71; }
.signin-day.done .day-label { color:#2ecc71; }
.signin-day.today { border-color:#d4a843;background:rgba(212,168,67,0.1);color:#d4a843;cursor:pointer;animation:signinPulse 2s ease-in-out infinite; }
.signin-day.today .day-label { color:#d4a843; }
.signin-bonus { font-size:9px;color:#888;min-height:14px; }
@keyframes signinPulse { 0%,100%{box-shadow:0 0 0 rgba(212,168,67,0)} 50%{box-shadow:0 0 8px rgba(212,168,67,0.4)} }

.online-bar {
  text-align: center; font-size: 11px; color: rgba(255,255,255,0.3);
  padding: 4px 0; width: 100%;
}
.mode-toggle { display: flex; gap: 6px; justify-content: center; margin: 6px 0 2px; }
.mode-btn {
  padding: 6px 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); color: #888; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.mode-btn.active { background: rgba(212,168,67,0.2); border-color: #d4a843; color: #f5d78c; }

.login-form {
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  flex: 1; min-height: 0;
}

/* 澶村儚閫夋嫨鍣?*/
.avatar-area { position: relative; display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.avatar-current {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; flex-shrink: 0;
  background: rgba(255,255,255,0.08); border: 2px solid rgba(212,168,67,0.4);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  position: relative; transition: border-color 0.2s;
}
.avatar-name-row { display: flex; align-items: center; gap: 4px; width: 100%; }
.avatar-current:hover { border-color: #d4a843; }
.avatar-current img { border-radius: 50%; }
.avatar-arrow {
  position: absolute; bottom: -4px; right: -4px;
  background: #d4a843; color: #0a1f14; width: 20px; height: 20px;
  border-radius: 50%; font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.avatar-dropdown {
  position: absolute; top: 76px; z-index: 50;
  background: rgba(15,40,24,0.98); border: 1px solid rgba(212,168,67,0.4);
  border-radius: 14px; padding: 12px; width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.avatar-dropdown.hidden { display: none; }
.avatar-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.avatar-option {
  text-align: center; cursor: pointer; padding: 6px 2px; border-radius: 10px;
  background: rgba(255,255,255,0.04); transition: background 0.15s;
}
.avatar-option:hover { background: rgba(212,168,67,0.15); }
.avatar-option span { font-size: 28px; display: block; }
.avatar-option small { font-size: 9px; color: #999; }
.avatar-upload-row { text-align: center; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.06); }
.avatar-upload-btn { color: #d4a843; font-size: 12px; cursor: pointer; }
.avatar-upload-btn:hover { color: #f5d78c; }

.avatar-upload {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px dashed var(--gold);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s;
}
.avatar-upload:active { border-color: var(--gold-light); }
.avatar-upload img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; top: 0; left: 0;
}
.avatar-placeholder { font-size: 32px; }
.avatar-tap { font-size: 10px; color: var(--text-dim); margin-top: 2px; }

#player-name {
  width: 100%; padding: 11px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 22px;
  color: var(--white);
  font-size: 15px;
  text-align: center;
  outline: none;
  transition: border-color 0.3s;
  font-family: inherit;
}
#player-name:focus { border-color: var(--gold); }
#player-name::placeholder { color: var(--text-dim); }

.login-buttons {
  width: 100%;
  display: flex; flex-direction: column;
  gap: 4px;
}
.spe-row {
  display: flex; gap: 3px; flex-wrap: wrap;
}
.btn-sub {
  flex: 1; min-width: 52px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 6px 4px; font-size: 11px; font-weight: 600;
  color: #aaa; cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.btn-sub:active { background: rgba(255,255,255,0.1); }
/* 鎺掕姒?*/
.lb-card {
  background: linear-gradient(180deg, #0f2818, #061a12); border: 1px solid rgba(212,168,67,0.3);
  border-radius: 16px; padding: 16px; width: calc(100% - 24px); max-width: 420px;
  max-height: 85vh; display: flex; flex-direction: column;
}
.lb-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.lb-title { color: #d4a843; font-size: 18px; font-weight: 700; }
.lb-close { background: rgba(255,255,255,0.1); border: none; color: #ccc; width: 28px; height: 28px; border-radius: 50%; font-size: 14px; cursor: pointer; }
.lb-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.lb-tab { flex: 1; padding: 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.08); background: transparent; color: #888; font-size: 13px; cursor: pointer; font-family: inherit; }
.lb-tab.active { background: rgba(212,168,67,0.15); border-color: #d4a843; color: #f5d78c; font-weight: 700; }
.lb-list { flex: 1; overflow-y: auto; min-height: 0; }
.lb-loading { text-align: center; color: #888; padding: 20px; }
.lb-row { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; }
.lb-row:hover { background: rgba(255,255,255,0.03); }
.lb-row.lb-is-me { background: rgba(212,168,67,0.08); border-radius: 8px; }
.lb-rank { width: 28px; text-align: center; font-size: 16px; font-weight: 800; flex-shrink: 0; color: #d4a843; }
.lb-avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.lb-info { flex: 1; min-width: 0; }
.lb-name { font-size: 14px; font-weight: 700; color: #e0d7c6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-stats { font-size: 10px; color: #888; margin-top: 1px; }
.lb-score { font-size: 16px; font-weight: 800; color: #f5d78c; flex-shrink: 0; }
.lb-countdown { text-align: center; color: #777; font-size: 10px; padding: 2px 0 6px; flex-shrink: 0; }
.lb-me { text-align: center; padding: 8px 0 0; color: #999; font-size: 12px; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 8px; flex-shrink: 0; }
/* 姣忔棩浠诲姟 */
.task-list { flex: 1; overflow-y: auto; min-height: 0; }
.task-item { display: flex; align-items: center; gap: 8px; padding: 10px 6px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.task-item.task-claimed { opacity: 0.4; }
.task-item.task-done { background: rgba(46,204,113,0.06); border-radius: 8px; }
.task-icon { font-size: 22px; flex-shrink: 0; width: 32px; text-align: center; }
.task-info { flex: 1; min-width: 0; }
.task-name { font-size: 13px; color: #e0d7c6; font-weight: 600; margin-bottom: 2px; }
.task-bar-wrap { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; margin: 3px 0; }
.task-bar { height: 4px; background: linear-gradient(90deg, #d4a843, #f5d78c); border-radius: 2px; transition: width 0.5s; }
.task-prog { font-size: 10px; color: #888; }
.task-claim { flex-shrink: 0; background: linear-gradient(135deg, #f39c12, #e67e22); color: #fff; border: none; padding: 6px 14px; border-radius: 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.task-claim:active { transform: scale(0.9); }
.shop-list { flex:1; overflow-y:auto; min-height:0; }
.shop-item { display:flex; align-items:center; gap:8px; padding:10px 6px; border-bottom:1px solid rgba(255,255,255,0.04); }
.shop-item-preview { width:40px; height:56px; border-radius:6px; flex-shrink:0; border:1px solid rgba(255,255,255,0.1); }
.shop-item-info { flex:1; min-width:0; }
.shop-item-name { font-size:13px; color:#e0d7c6; font-weight:600; }
.shop-item-cond { font-size:10px; color:#888; margin-top:2px; }
.shop-item-btn { flex-shrink:0; padding:6px 12px; border-radius:14px; border:none; font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; }
.shop-item-btn.buy { background:linear-gradient(135deg,#d4a843,#f5d78c); color:#1a0a00; }
.shop-item-btn.owned { background:transparent; color:#2ecc71; border:1px solid rgba(46,204,113,0.3); }
.lb-row.lb-tier-0 .lb-rank { animation: lbGold 2s ease-in-out infinite; }
.lb-row.lb-tier-1 .lb-rank { animation: lbSilver 2.5s ease-in-out infinite; }
.lb-row.lb-tier-2 .lb-rank { animation: lbBronze 3s ease-in-out infinite; }
@keyframes lbGold { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2);text-shadow:0 0 8px rgba(255,215,0,0.6)} }
@keyframes lbSilver { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15);text-shadow:0 0 6px rgba(192,192,192,0.5)} }
@keyframes lbBronze { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1);text-shadow:0 0 4px rgba(205,127,50,0.4)} }
.join-area {
  display: flex; gap: 6px;
}
#room-code-input {
  flex: 1; padding: 8px 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  color: var(--white);
  font-size: 15px;
  text-align: center;
  outline: none;
  font-family: inherit;
  letter-spacing: 6px;
}
#room-code-input:focus { border-color: var(--gold); }
#room-code-input::placeholder { color: var(--text-dim); letter-spacing: 2px; }

/* 宸蹭繚瀛樼敤鎴?*/
.saved-users {
  width: 100%;
  max-width: 360px;
}
.saved-label {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 4px;
}
.saved-list {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.saved-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.2s;
}
.saved-user-chip:active {
  background: rgba(201,168,76,0.2);
  border-color: var(--gold);
}
.saved-user-chip .su-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: rgba(255,255,255,0.1);
}
.saved-user-chip .su-avatar img { width: 100%; height: 100%; object-fit: cover; }
.saved-user-chip .su-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}
.saved-user-chip .su-delete {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(231,76,60,0.3);
  color: #e74c3c;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
}
.saved-user-chip .su-delete:active { background: rgba(231,76,60,0.6); }

/* 閭€璇烽摼鎺?*/
.invite-section {
  padding: 12px 16px;
  text-align: center;
}
.invite-title {
  font-size: 14px;
  color: var(--gold-light);
  margin-bottom: 8px;
}
.invite-link-area {
  display: flex; gap: 8px;
}
#invite-link {
  flex: 1;
  padding: 10px 14px;
  font-size: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  color: var(--text-dim);
  font-family: monospace;
  outline: none;
  text-overflow: ellipsis;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 20px;
  white-space: nowrap;
}
.invite-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
}
.invite-hint strong {
  color: var(--gold-light);
  font-size: 16px;
  letter-spacing: 3px;
}

/* --- 鎴块棿绛夊緟鐣岄潰 --- */
#room-screen { background: var(--bg-primary); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.room-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.room-info { display: flex; align-items: center; gap: 4px; }
.room-code {
  font-size: 22px; font-weight: 800; letter-spacing: 4px;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(201,168,76,0.3);
}
.btn-copy-room {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; color: #ccc; font-size: 14px; padding: 4px 6px; cursor: pointer;
  line-height: 1;
}
.btn-copy-room:active { background: rgba(212,168,67,0.2); }
.room-players-count {
  font-size: 14px; color: var(--text-dim);
}
.room-players-count span { color: var(--gold-light); font-weight: 700; font-size: 20px; }

.dealer-area {
  display: flex; align-items: center; justify-content: center;
  min-height: 180px; flex-shrink: 0;
  padding: 4px 0;
}
.players-grid { flex-shrink: 0; }

.players-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; padding: 16px;
}
.player-mini-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 6px 8px;
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px;
  transition: border-color 0.3s;
  cursor: pointer;
  overflow: hidden;
}
.player-mini-card.is-host { border-color: var(--gold); }
.player-mini-avatar {
  width: 30px; height: 30px; min-width: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  font-size: 20px;
}
.player-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.player-mini-name { font-size: 14px; font-weight: 600; flex: 1; }
.btn-kick {
  background: rgba(231,76,60,0.2); border: 1px solid rgba(231,76,60,0.5);
  color: #e74c3c; font-size: 11px; padding: 2px 8px; border-radius: 10px;
  cursor: pointer;
}
.btn-vote {
  background: rgba(243,156,18,0.15); border: 1px solid rgba(243,156,18,0.4);
  color: #f39c12; font-size: 10px; padding: 2px 6px; border-radius: 10px;
  cursor: pointer; margin-left: 4px;
}
.btn-kick:active { background: rgba(231,76,60,0.5); color: #fff; }

.player-mini-badge {
  font-size: 10px; padding: 3px 8px;
  border-radius: 12px;
  background: rgba(201,168,76,0.2);
  color: var(--gold);
}
.player-mini-score {
  font-size: 13px; font-weight: 700;
  color: var(--gold-light);
  text-align: right;
  min-width: 50px;
}
.badge-count { font-size: 10px; color: var(--gold-light); margin-left: 2px; white-space: nowrap; }
.player-mini-badges { display: flex; gap: 1px; margin-top: 1px; flex-wrap: wrap; max-width: 80px; overflow: hidden; }
.badge-icon { font-size: 12px; cursor: default; }
.player-mini-badges.clickable { cursor: pointer; }
.player-mini-badges.clickable:hover { opacity: 0.8; }
.badge-info-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.badge-info-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(255,255,255,0.04); border-radius: 8px; font-size: 13px; }
.badge-info-row span:first-child { font-size: 20px; }
.badge-info-row strong { min-width: 70px; color: var(--gold-light); }
.badge-info-row span:last-child { color: var(--text-dim); font-size: 12px; }

.theme-picker { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; }
.theme-label { font-size: 11px; color: var(--text-dim); margin-right: 2px; }
.theme-dot { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.2s; }
.theme-dot.active { border-color: var(--white); box-shadow: 0 0 8px rgba(255,255,255,0.4); }
.theme-dot.green { background: #0d5e2e; }
.theme-dot.blue { background: #0d3d5e; }
.theme-dot.red { background: #5e1a0d; }
.theme-dot.gold { background: #5e4a0d; }
.theme-dot.emerald { background: #064a2e; }
.theme-dot.midnight { background: #0d1b3e; }
.theme-dot.velvet { background: #3d0a1c; }
.theme-dot.violet { background: #2e1a5c; }

.quick-chats { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 8px 55px 8px 10px; }
.quick-chats-game { justify-content: flex-end; padding: 6px 50px 6px 10px; gap: 4px; }
.quick-chat-btn { font-size: 11px; padding: 5px 8px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: #aaa; cursor: pointer; white-space: nowrap; transition: all 0.15s; }
.quick-chat-btn:active { background: rgba(212,168,67,0.2); border-color: #d4a843; color: #ffd700; }

.room-footer { padding: 16px 20px; padding-bottom: var(--safe-bottom); }

/* --- 娓告垙鐣岄潰 v3 --- */
#game-screen {
  background:
    radial-gradient(circle at 50% 50%, var(--felt-green) 0%, var(--felt-dark) 100%);
  background-color: var(--felt-dark);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 0 90px rgba(0,0,0,0.5), inset 0 0 3px rgba(255,255,255,0.02);
}

/* 椤堕儴鏍?*/
.game-topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  min-height: 44px;
}
.dealer-mini {
  width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--gold);
  box-shadow: 0 0 16px rgba(212,168,67,0.4);
}
.dealer-mini .dealer-photo {
  width: 100%; height: 100%; object-fit: cover;
}
.dealer-mini .dealer-fallback { font-size: 32px; }
.dealer-mini.shake { animation: dealer-shake 0.3s ease-in-out 3; }
.topbar-info {
  flex: 1; display: flex; flex-direction: column; gap: 1px;
}
.game-round { font-size: 11px; color: var(--gold-light); font-weight: 700; }
.game-dealer { font-size: 10px; color: var(--text-dim); }
.game-room-code { font-size: 10px; color: #d4a843; margin-left: 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.game-room-code:active { color: #f5d78c; }
.room-code-private { color: #ffd700 !important; text-shadow: 0 0 10px rgba(255,215,0,0.4); font-weight: bold; }
.dealer-speech {
  font-size: 11px; color: #ff9e9e;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-timer {
  flex-shrink: 0; text-align: right;
}
.timer-value {
  font-weight: 800; font-size: 20px; color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}
.timer-value.urgent { color: var(--red-light); animation: blink 0.5s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* 鏃ф牱寮忔竻鐞?*/
.game-header, .game-info, .game-timer, .timer-icon,
.other-players, .dealer-stage { display: none; }

/* 鍏朵粬鐜╁ */
.other-players {
  display: flex; justify-content: space-around;
  padding: 8px 8px 4px;
  gap: 6px;
}
.other-player-compact {
  flex: 1; text-align: center;
  padding: 8px 4px;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  max-width: 120px;
}
.other-player-compact .op-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  margin: 0 auto 4px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 18px;
}
.other-player-compact .op-avatar img { width: 100%; height: 100%; object-fit: cover; }
.other-player-compact .op-name {
  font-size: 11px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.other-player-compact .op-status {
  font-size: 10px; margin-top: 2px;
}
.other-player-compact .op-status.locked { color: #2ecc71; font-weight: 700; }
.other-player-compact .op-status.waiting { color: var(--text-dim); }
.other-player-compact .op-score {
  font-size: 12px; font-weight: 700; color: var(--gold-light);
}
.other-player-compact.is-locked {
  border: 2px solid rgba(46,204,113,0.3);
  background: rgba(46,204,113,0.08);
  border-radius: var(--radius);
}
.other-players.all-ready {
  animation: all-ready-glow 0.8s ease-in-out 3;
}
@keyframes all-ready-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

/* 鍙戠墝濂抽儙鑸炲彴 */
.dealer-stage {
  text-align: center; padding: 4px 0;
  position: relative; min-height: 90px;
  display: flex; flex-direction: column; align-items: center;
}
.dealer-speech {
  font-size: 13px; color: #ff9e9e;
  background: rgba(0,0,0,0.5);
  padding: 6px 14px; border-radius: 16px;
  margin-top: 4px;
  animation: float-text 2s ease-in-out infinite;
}
@keyframes float-text {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* --- 鐜╁鐗屽尯 --- */
.my-cards-area {
  flex: 1; display: flex; flex-direction: column;
  padding: 6px 8px; gap: 4px;
  overflow-y: auto;
}
.card-row-label {
  font-size: 11px; color: var(--text-dim);
  text-align: center; letter-spacing: 2px;
}
.card-slots {
  display: flex; gap: 5px; justify-content: center;
  min-height: 62px;
}

/* 鍗℃Ы */
.card-slot {
  width: 18%; max-width: 120px; min-width: 50px;
  aspect-ratio: 0.72;
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: var(--card-radius);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  position: relative;
  background: rgba(0,0,0,0.25);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.03);
}
.card-slot::after {
  content: ''; position: absolute; inset: 4px;
  border: 1px dashed rgba(255,255,255,0.06); border-radius: calc(var(--card-radius) - 2px);
  pointer-events: none;
}
.card-slot.highlight { border-color: var(--gold); box-shadow: 0 0 12px rgba(201,168,76,0.4); }
.card-slot.filled { border-style: solid; border-color: rgba(255,255,255,0.15); }
.card-slot.selected-slot {
  border-color: var(--gold) !important;
  box-shadow: 0 0 20px rgba(201,168,76,0.6), 0 0 40px rgba(201,168,76,0.3) !important;
  animation: pulse-slot 0.8s ease-in-out infinite;
  border-style: solid !important;
}
@keyframes pulse-slot {
  0%, 100% { box-shadow: 0 0 20px rgba(201,168,76,0.6), 0 0 40px rgba(201,168,76,0.3); }
  50% { box-shadow: 0 0 30px rgba(201,168,76,0.9), 0 0 60px rgba(201,168,76,0.5); }
}
.card-slot.winner-slot { border-color: #e74c3c; box-shadow: 0 0 16px rgba(231,76,60,0.6); animation: glow-winner 0.8s ease-in-out infinite; }
.card-slot.bull-card { border-color: #ffd700; box-shadow: 0 0 14px rgba(255,215,0,0.5), inset 0 0 8px rgba(255,215,0,0.1); }
.card-slot.bull-card .poker-card { box-shadow: 0 0 8px rgba(255,215,0,0.3), 0 2px 8px rgba(0,0,0,0.3); }
@keyframes glow-winner {
  0%, 100% { box-shadow: 0 0 16px rgba(231,76,60,0.6); }
  50% { box-shadow: 0 0 30px rgba(231,76,60,0.9); }
}

/* --- 鎵戝厠鐗屾牱寮?--- */
.poker-card {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #e8ddc8 0%, #ddd0b4 40%, #d4c5a5 100%);
  border-radius: var(--card-radius); border: 1px solid rgba(0,0,0,0.1);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.5);
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
  font-weight: 700;
  border: 1px solid #d4c5a0;
}
.poker-card:active { transform: scale(0.95); }
.poker-card.selected {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 10px 30px rgba(201,168,76,0.7), 0 0 20px rgba(201,168,76,0.4);
  border: 2.5px solid var(--gold);
  z-index: 10;
  animation: card-float 0.6s ease-in-out infinite alternate;
}
@keyframes card-float {
  from { transform: translateY(-10px) scale(1.05); }
  to { transform: translateY(-14px) scale(1.06); }
}
.poker-card .card-corner { position: absolute; font-size: 18px; line-height: 1; font-weight: 800; }
.poker-card .card-corner.top-left { top: 3px; left: 5px; text-align: left; }
.poker-card .card-corner.bottom-right { bottom: 3px; right: 5px; transform: rotate(180deg); text-align: left; }
.poker-card .card-center { font-size: 48px; text-align: center; line-height: 1; font-weight: 800; }

.poker-card.suit-red { color: #c0392b; }
.poker-card.suit-black { color: #1a1a2e; }

/* 鑺辩墝 (10/J/Q/K) 鐗规畩鏍囪 */
.poker-card.face-card {
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 6px rgba(201,168,76,0.25), 0 2px 8px rgba(0,0,0,0.3);
}
.face-badge {
  position: absolute; top: 1px; right: 2px;
  font-size: 8px; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, #c9a84c, #f0d78c);
  padding: 1px 3px; border-radius: 3px;
  line-height: 1;
  z-index: 2;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

/* 鎵嬬墝鎻愮ず鍖?*/
.hand-cards {
  padding: 6px 8px; text-align: center;
}
.hand-hint {
  font-size: 12px; color: var(--text-dim);
  background: rgba(0,0,0,0.3);
  padding: 8px 14px; border-radius: 16px;
  display: inline-block;
  animation: float-text 2s ease-in-out infinite;
}
.hand-recommend {
  font-size: 13px; color: var(--gold-light);
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.25);
  padding: 8px 14px; border-radius: 16px;
  display: inline-block; margin-bottom: 4px;
}
.hand-recommend strong { color: var(--red-light); }

/* 鐗岃儗 */
.poker-card.card-back {
  background: linear-gradient(135deg, #1a3a6c, #0d2247);
  cursor: default;
}
.poker-card.card-back::after {
  content: '';
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 4px,
    rgba(255,255,255,0.05) 4px,
    rgba(255,255,255,0.05) 8px
  );
}
.poker-card.card-back .card-back-diamond {
  font-size: 18px; color: rgba(255,255,255,0.4);
  z-index: 1;
}

/* 缁撴灉涓殑鐗?*/
.poker-card.result-card {
  width: 100%; height: auto; aspect-ratio: 0.72;
  pointer-events: none; font-size: 12px;
}

/* --- 閿佸畾鐘舵€佹闈?--- */
.lock-desk {
  padding: 8px 12px;
  background: rgba(0,0,0,0.35);
  margin: 4px 8px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
}
.lock-desk-title {
  font-size: 13px; color: var(--gold-light);
  text-align: center; margin-bottom: 6px;
  letter-spacing: 2px;
}
.lock-desk-players {
  display: flex; gap: 8px; justify-content: center;
  flex-wrap: wrap;
}
.lock-desk-player {
  flex: 1; min-width: 80px; max-width: 120px;
  text-align: center; padding: 8px 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s;
  cursor: pointer;
}
.lock-desk-player.is-self {
  border-color: rgba(201,168,76,0.4);
  background: rgba(201,168,76,0.08);
}
.lock-desk-player.is-locked {
  border-color: #2ecc71;
  box-shadow: 0 0 12px rgba(46,204,113,0.3);
  background: rgba(46,204,113,0.08);
}
.lock-desk-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  margin: 0 auto 2px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 18px;
}
.lock-desk-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lock-desk-name { font-size: 11px; color: var(--text); font-weight: 600; }
.lock-desk-score { font-size: 12px; font-weight: 700; color: var(--gold-light); }
.lock-desk-info { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.lock-desk-status {
  font-size: 10px; margin-top: 2px;
  padding: 2px 8px; border-radius: 10px;
  display: inline-block;
}
.lock-desk-status.waiting { color: var(--text-dim); background: rgba(255,255,255,0.05); }
.lock-desk-status.locked { color: #2ecc71; background: rgba(46,204,113,0.15); }

/* 琛ㄦ儏浜掑姩 */
.emoji-bar {
  display: flex; gap: 6px; justify-content: center;
  padding: 6px 0 2px; flex-wrap: wrap;
}
.emoji-btn {
  font-size: 22px; cursor: pointer; padding: 2px 4px;
  transition: transform 0.15s; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.emoji-btn:active { transform: scale(1.3); }

/* 娴姩琛ㄦ儏 */
.floating-emoji {
  position: absolute; z-index: 60;
  font-size: 28px; pointer-events: none;
  animation: float-up 1.5s ease-out forwards;
}
@keyframes float-up {
  0% { transform: translate(-50%, 0) scale(0.5); opacity: 1; }
  50% { transform: translate(-50%, -30px) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -60px) scale(0.8); opacity: 0; }
}

/* --- 閿佺墝鍖哄煙 --- */
.lock-area {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  padding: 8px 12px;
  padding-bottom: var(--safe-bottom);
}
.lock-area .lock-btns-row {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; max-width: 360px;
}
.lock-status {
  font-size: 12px; color: var(--text-dim);
  min-height: 18px; text-align: center;
}

/* --- 鐪熶汉缇庡コ鑽峰畼 --- */
.dealer-img-wrap {
  width: 92vw; max-width: 460px; height: auto; aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 24px; overflow: hidden;
  border: 4px solid rgba(201,168,76,0.6);
  box-shadow: 0 0 80px rgba(201,168,76,0.35), 0 12px 40px rgba(0,0,0,0.6);
}
.dealer-img-wrap.small { width: 50vw; max-width: 200px; border-radius: 18px; }
.dealer-photo {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 22px;
}
.dealer-img-wrap.small .dealer-photo { border-radius: 18px; }
.dealer-fallback { font-size: 64px; }
.dealer-img-wrap.dealing { animation: dealer-bounce 0.6s ease-in-out infinite; }
@keyframes dealer-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.dealer-img-wrap.shake { animation: dealer-shake 0.3s ease-in-out 3; }
@keyframes dealer-shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

/* 绉婚櫎鏃VG鑽峰畼鏍峰紡 */
.dealer-svg-wrap, .dealer-svg, #dealer-svg, .dealer-girl, .dealer-head, .dealer-hair,
.dealer-face, .dealer-eye, .dealer-mouth, .dealer-body, .dealer-dress, .dealer-arm,
.flying-card, .dealer-card-anim { display: none; }

/* 鍙戠墝鍔ㄧ敾 v2 */
.card-deal-anim {
  position: fixed; z-index: 200; pointer-events: none;
  width: 60px; height: 84px; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; gap: 4px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.7);
}
.card-deal-anim span:first-child { font-size: 20px; }
.card-deal-anim span:last-child { font-size: 26px; }
.card-deal-anim.deal-back {
  background: linear-gradient(135deg, #1e3d7a, #0f1f4a);
  color: rgba(255,255,255,0.5); font-size: 32px;
  border: 2px solid rgba(255,255,255,0.25);
  animation: deal-fly 0.5s ease-in forwards;
}
@keyframes deal-fly {
  0% { transform: translate(0,0) scale(0.3) rotate(-30deg); opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.85) rotate(var(--dr)); opacity: 0; }
}
.card-deal-anim.deal-reveal {
  background: linear-gradient(135deg, #fffef8, #f5edd6);
  border: 2px solid #d4c5a0;
  font-size: 18px;
  border-radius: 8px;
}
.card-deal-anim.red { color: #c0392b; }
.card-deal-anim.black { color: #1a1a2e; }

.dealer-speech {
  font-size: 13px; color: #ff9e9e;
  background: rgba(0,0,0,0.6);
  padding: 6px 14px; border-radius: 16px;
  margin-top: 4px;
  animation: float-text 2s ease-in-out infinite;
}
@keyframes float-text {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 绉婚櫎鏃х殑 dealer CSS 渚濊禆 */
.dealer-girl, .dealer-head, .dealer-hair, .dealer-face, .dealer-eye,
.dealer-mouth, .dealer-body, .dealer-dress, .dealer-arm, .flying-card { display: none; }

/* --- 缁撴灉寮圭獥 (鍦嗘椋庢牸) --- */
.overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
  transition: opacity 0.4s;
  background: radial-gradient(ellipse at 50% 30%, #0a3d2e 0%, #061a12 60%, #020a07 100%);
}
.overlay.hidden { opacity: 0; pointer-events: none; }

.result-content, .draw-content {
  background: linear-gradient(180deg, rgba(10,50,40,0.95), rgba(5,20,15,0.98));
  border: 2px solid var(--gold);
  border-radius: 24px;
  padding: 18px 14px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 60px rgba(201,168,76,0.25), inset 0 1px 0 rgba(255,255,255,0.03);
}
.result-title {
  text-align: center; font-size: 20px;
  color: var(--gold-light); margin-bottom: 12px;
  letter-spacing: 2px;
}

.result-player {
  background: rgba(0,0,0,0.3);
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s;
}
.result-player.winner-top { border-color: #e74c3c; box-shadow: 0 0 16px rgba(231,76,60,0.3); }
.result-player.winner-bottom { border-color: #e74c3c; box-shadow: 0 0 16px rgba(231,76,60,0.3); }
.result-player.winner-both { border-color: var(--gold); box-shadow: 0 0 24px rgba(201,168,76,0.5); }

.result-player-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.result-player-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 20px;
  border: 2px solid rgba(255,255,255,0.15);
}
.result-player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.result-player-name { font-weight: 700; font-size: 15px; flex: 1; color: var(--white); }
.result-player-score {
  font-weight: 800; font-size: 20px;
}
.result-player-score.positive { color: #2ecc71; text-shadow: 0 0 8px rgba(46,204,113,0.5); }
.result-player-score.negative { color: #e74c3c; }

.result-hands {
  display: flex; gap: 8px; margin-top: 4px;
}
.result-hand {
  flex: 1; text-align: center;
  background: rgba(0,0,0,0.2); border-radius: 10px; padding: 6px;
}
.result-hand-label {
  font-size: 11px; color: var(--text-dim); margin-bottom: 4px;
}
.result-hand-cards {
  display: flex; gap: 4px; justify-content: center;
  margin-bottom: 4px;
}
.result-hand-cards .mini-card {
  width: 36px; height: 50px;
  background: var(--card-bg);
  border-radius: 4px;
  font-size: 11px; font-weight: 800;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  line-height: 1.15;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.result-hand-cards .mini-card.red { color: #c0392b; }
.result-hand-cards .mini-card.black { color: #1a1a2e; }
.result-hand-type {
  font-size: 13px; font-weight: 700;
  padding: 4px 10px; border-radius: 12px;
  display: inline-block;
}
.result-hand-type.winner-type {
  background: rgba(231,76,60,0.25); color: var(--red-light);
  box-shadow: 0 0 10px rgba(231,76,60,0.3);
}

.result-buttons {
  display: flex; gap: 10px; margin-top: 14px; flex-direction: column;
}

/* 鍦嗘鎻檽 - 鎵€鏈夌帺瀹朵竴瑙?*/
.reveal-table {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99;
  display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 50% 25%, #0a4a35 0%, #061a12 50%, #020a07 100%);
  overflow-y: auto;
  padding: 8px;
}
.reveal-table.hidden { display: none; }

/* 鎶界墝寮圭獥 */
.draw-content { text-align: center; max-width: 420px; }
.draw-title { color: #ffd700; font-size: 24px; font-weight: 800; margin-bottom: 12px; letter-spacing: 2px; animation: drawTitleIn 0.5s ease-out; }
@keyframes drawTitleIn { 0%{opacity:0;transform:translateY(-20px)} 100%{opacity:1;transform:translateY(0)} }
.draw-cards {
  display: flex; justify-content: center; gap: 10px; margin: 16px 0; flex-wrap: wrap;
}
.draw-card-item {
  text-align: center;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 10px 6px;
  transition: all 0.4s; min-width: 0;
  animation: drawCardIn 0.5s ease-out;
  position: relative;
  flex: 1 1 0; max-width: 90px;
}
@keyframes drawCardIn { 0%{opacity:0;transform:scale(0.8) rotateY(90deg)} 100%{opacity:1;transform:scale(1) rotateY(0)} }
.draw-card-item .draw-player-name { font-size: 13px; color: #aaa; margin-bottom: 6px; font-weight: 600; }
.draw-card-item .draw-card-display {
  width: 52px; height: 72px;
  background: var(--card-bg);
  border-radius: 8px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.draw-card-item.is-dealer { border-color: #ffd700 !important; background: rgba(255,215,0,0.15) !important; box-shadow: 0 0 30px rgba(255,215,0,0.4); animation: dealerGlow 1s ease-in-out infinite; }
.draw-card-item.is-dealer::after { content: '\1F451'; display: block; font-size: 28px; margin-top: 4px; animation: crownDrop 0.5s ease-out; }
@keyframes dealerGlow { 0%,100%{box-shadow:0 0 20px rgba(255,215,0,0.3)} 50%{box-shadow:0 0 40px rgba(255,215,0,0.7)} }
@keyframes crownDrop { 0%{opacity:0;transform:translateY(-20px) scale(2)} 100%{opacity:1;transform:translateY(0) scale(1)} }
.draw-card-display.draw-back { background: linear-gradient(135deg, #1a3a6e 0%, #0d2247 50%, #152d5e 100%); color: transparent; font-size: 28px; }
.draw-card-display.draw-back::after { content: '\25C6'; }
.draw-card-display.draw-flip { animation: flipCardDraw 0.4s ease-out; }
@keyframes flipCardDraw { 0%{transform:rotateY(90deg)} 100%{transform:rotateY(0)} }
.draw-card-item.is-dealer { border-color: #ffd700 !important; background: rgba(255,215,0,0.15) !important; box-shadow: 0 0 30px rgba(255,215,0,0.4); animation: dealerGlow 1s ease-in-out infinite; }
.draw-card-item.is-dealer::after { content: '\1F451'; display: block; font-size: 28px; margin-top: 4px; animation: crownDrop 0.5s ease-out; }
@keyframes dealerGlow { 0%,100%{box-shadow:0 0 20px rgba(255,215,0,0.3)} 50%{box-shadow:0 0 40px rgba(255,215,0,0.7)} }
@keyframes crownDrop { 0%{opacity:0;transform:translateY(-20px) scale(2)} 100%{opacity:1;transform:translateY(0) scale(1)} }
.draw-result { color: #ffd700; font-size: 20px; margin: 14px 0; font-weight: 800; animation: drawTitleIn 0.6s ease-out; }
.draw-card-item .draw-card-display.red { color: #c0392b; }
.draw-card-item .draw-card-display.black { color: #1a1a2e; }
.draw-card-item.is-dealer .draw-card-display {
  box-shadow: 0 0 20px rgba(201,168,76,0.6);
  border: 2px solid var(--gold);
}

/* --- Toast --- */
.toast {
  position: absolute; top: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(231,76,60,0.95); color: white;
  padding: 10px 24px; border-radius: 20px;
  font-size: 14px; z-index: 200;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.hidden { opacity: 0; }

/* 缁撴灉杩蜂綘鐗岃姳鐗屾爣璁?*/
.mini-badge {
  display: block; font-size: 6px; color: #c9a84c; font-weight: 800;
}

/* --- 鍝嶅簲寮?--- */
@media (min-width: 420px) {
  .card-slot { max-width: 130px; }
  .poker-card .card-center { font-size: 56px; }
  .poker-card .card-corner { font-size: 20px; }
  .face-badge { font-size: 12px; }
}
@media (min-width: 500px) {
  .card-slot { max-width: 140px; }
}
@media (min-width: 768px) {
  .reveal-area { padding: 12px 20px 100px 20px; }
  .reveal-title { font-size: 20px; }
  .reveal-footer { max-width: 480px; margin: 0 auto; }
}
@media (max-height: 680px) {
  .card-slot { min-width: 48px; }
  .card-slots { min-height: 52px; }
  .my-cards-area { gap: 1px; padding: 2px; }
  .poker-card .card-center { font-size: 38px; }
  .poker-card .card-corner { font-size: 14px; }
  /* 鐧诲綍椤靛帇缂?*/
  .logo-anim-wrap { width: min(55vw, 200px); }
  .avatar-current { width: 38px; height: 38px; font-size: 20px; }
  #player-name { padding: 7px 12px; font-size: 13px; }
  .btn-large { padding: 10px; font-size: 14px; }
  .btn-sub { padding: 5px 3px; font-size: 10px; }
  .copyright { padding: 3px 0; font-size: 9px; }
}

/* ===== 鎻檽鍖哄煙 (鑷姩缈荤墝+璧㈢墝浜厜) ===== */
.reveal-area {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 50; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 8px 80px 8px;
  background: radial-gradient(ellipse at 50% 30%, #0a4a35 0%, #061a12 60%, #020a07 100%);
}
.reveal-area.hidden { display: none; }
.reveal-title {
  text-align: center; font-size: 16px; color: var(--gold-light);
  padding: 8px 0 4px; letter-spacing: 1px;
  flex-shrink: 0;
}
.reveal-players { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.reveal-players:empty { display: none; }
.reveal-player {
  background: rgba(255,255,255,0.03); border-radius: 14px; padding: 10px;
  border: none; margin-bottom: 8px;
}
.reveal-player.is-winner {
  background: rgba(255,215,0,0.06);
  box-shadow: 0 0 20px rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.12);
  position: relative; overflow: hidden;
}
.reveal-player.is-winner::before {
  content: '';
  position: absolute; top: -50%; left: -100%; width: 60%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.06), transparent);
  animation: winnerShimmer 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes winnerShimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}
.reveal-player-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.reveal-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
  position: relative;
}
/* 澶村儚妗嗭細璧㈠閲戝啝 */
.reveal-player.is-winner .reveal-avatar {
  border: 2px solid #ffd700;
  box-shadow: 0 0 16px rgba(255,215,0,0.5), 0 0 32px rgba(255,215,0,0.2);
}
.reveal-player.is-winner .reveal-avatar::after {
  content: '\1F451'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  font-size: 18px; pointer-events: none;
}
/* 澶村儚妗嗭細鎴夸富閽荤煶 */
.player-mini-card.is-host .player-mini-avatar {
  border: 2px solid #00bcd4;
  box-shadow: 0 0 12px rgba(0,188,212,0.4);
}
.reveal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.reveal-name { font-size: 14px; font-weight: 700; flex: 1; color: #e0d7c6; }
.reveal-score-line {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.reveal-round-score {
  font-size: 18px; font-weight: 800; padding: 2px 12px; border-radius: 12px;
  animation: scorePopIn 0.5s ease-out;
}
@keyframes scorePopIn {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.reveal-round-score.positive { color: #2ecc71; background: rgba(46,204,113,0.12); }
.reveal-round-score.negative { color: #e74c3c; background: rgba(231,76,60,0.12); }
.reveal-cumulative {
  font-size: 10px; color: var(--text-dim); white-space: nowrap;
}
.reveal-detail {
  font-size: 10px; color: #999; text-align: center;
  padding: 4px 0 0; line-height: 1.5;
  word-break: break-all; overflow-wrap: break-word;
}

.reveal-rows { display: flex; gap: 6px; max-width: 100%; }
.reveal-row-full { flex: none; width: 100%; }
.reveal-row {
  flex: 1; min-width: 0; text-align: center; padding: 8px 4px;
  background: rgba(0,0,0,0.2); border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04); transition: all 0.5s;
}
.reveal-row.winner-row {
  border-color: #e74c3c;
  box-shadow: 0 0 16px rgba(231,76,60,0.5), inset 0 0 10px rgba(231,76,60,0.1);
  animation: glow-row 1s ease-in-out infinite alternate;
}
@keyframes glow-row {
  from { box-shadow: 0 0 16px rgba(231,76,60,0.5), inset 0 0 10px rgba(231,76,60,0.1); }
  to { box-shadow: 0 0 30px rgba(231,76,60,0.8), inset 0 0 20px rgba(231,76,60,0.2); }
}
.reveal-row-label { font-size: 12px; color: var(--text-dim); margin-bottom: 4px; font-weight: 700; }
.reveal-row-cards {
  display: flex; gap: 3px; justify-content: center; margin-bottom: 4px;
  max-width: 100%; overflow: hidden;
}
.reveal-row-cards .reveal-mini-card {
  flex: 1 1 0; max-width: 42px; min-width: 24px; height: 52px;
  background: linear-gradient(145deg, #e0d5b8 0%, #d5c8a5 40%, #ccc098 100%);
  border-radius: 5px; border: 1px solid rgba(0,0,0,0.15);
  font-size: 11px; font-weight: 800; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.3);
  position: relative; overflow: hidden;
  color: inherit;
}
/* 鐗岄潰绾圭悊 */
.reveal-row-cards .reveal-mini-card::after {
  content: ''; position: absolute; inset: 3px;
  border: 1px solid rgba(0,0,0,0.04); border-radius: 3px;
  pointer-events: none;
}
/* 鐗岃儗 */
.reveal-row-cards .reveal-mini-card.card-back {
  background: linear-gradient(135deg, #1a3a6e 0%, #0d2247 50%, #152d5e 100%);
  color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 0 0 2px rgba(255,255,255,0.1);
  transition: background 0.2s, color 0.2s;
}
.reveal-row-cards .reveal-mini-card.card-back::after {
  content: '\25C6'; font-size: 20px; position: absolute;
  inset: 0; display: flex; align-items: center; justify-content: center;
  border: none; color: rgba(255,255,255,0.3);
}

/* 5寮犳ā寮忔彮鏅撳崱鐗囨斁澶?*/
.reveal-area.simple-mode .reveal-row-cards { gap: 6px; }
.reveal-area.simple-mode .reveal-row-cards .reveal-mini-card {
  min-width: 36px; max-width: 56px; height: 70px; font-size: 14px;
}
/* 缈荤墝鍔ㄧ敾 */
.reveal-row-cards .reveal-mini-card.flip-in {
  animation: flipCard 0.35s ease-out forwards;
}
@keyframes flipCard {
  0% { transform: rotateY(90deg); background: linear-gradient(135deg, #1a3a6e 0%, #0d2247 50%, #152d5e 100%); }
  50% { background: linear-gradient(135deg, #1a3a6e 50%, #e0d5b8 100%); }
  100% { transform: rotateY(0deg); background: linear-gradient(145deg, #e0d5b8 0%, #d5c8a5 40%, #ccc098 100%); }
}
/* 鍙戠墝鍚庣墝钀藉畾鐨勫井寮硅烦 */
.poker-card.settle-in {
  animation: cardSettle 0.35s ease-out;
}
@keyframes cardSettle {
  0% { transform: translateY(-8px) scale(0.92); opacity: 0.6; }
  60% { transform: translateY(2px) scale(1.03); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
/* 閿佺墝鎴愬姛瀵瑰嬀 */
.lock-success-pop {
  position: fixed; z-index: 300; pointer-events: none;
  animation: popCheck 0.8s ease-out forwards;
}
@keyframes popCheck {
  0% { transform: translate(-50%,-50%) scale(0); opacity: 1; }
  60% { transform: translate(-50%,-50%) scale(1.4); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(1); opacity: 0; }
}
.reveal-hand-type.hand-hidden { visibility: hidden; }
.reveal-row-cards .reveal-mini-card.red { color: #c0392b; }
.reveal-row-cards .reveal-mini-card.black { color: #1a1a2e; }
.reveal-hand-type {
  font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 12px;
  display: inline-block; background: rgba(255,255,255,0.08);
}
.reveal-hand-type.winner-type {
  background: rgba(231,76,60,0.3); color: var(--red-light);
  box-shadow: 0 0 12px rgba(231,76,60,0.35);
}
.reveal-footer { padding: 10px 8px 24px; text-align: center; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; align-items: center; flex-shrink: 0; }
.reveal-footer .btn { flex: 1; max-width: 120px; }
.btn-share {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff; border: none;
  padding: 12px 24px; border-radius: 20px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 0 16px rgba(243,156,18,0.4);
  flex: 2; max-width: 260px;
}
.btn-share:active { transform: scale(0.96); }
.btn-replay {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15);
  color: #c0b8a0; padding: 12px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600; cursor: pointer; flex: 1; max-width: 120px;
}
.btn-replay:active { background: rgba(255,255,255,0.12); color: #fff; }
.share-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 500; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; padding: 20px; }
.share-card { text-align: center; max-width: 400px; width: 100%; }
.share-card img { width: 100%; border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,0.6); }
.final-summary { background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.2); border-radius: 12px; padding: 12px; margin: 8px 0; text-align: center; }
.fs-title { font-size: 16px; color: #ffd700; font-weight: 700; margin-bottom: 8px; }
.fs-mvp { font-size: 15px; color: #fff; margin: 4px 0; }
.fs-stat { font-size: 13px; color: #ccc; margin: 2px 0; }

/* 计分榜 */
.scoreboard {
  margin-top: 8px; padding: 10px;
  background: rgba(0,0,0,0.3); border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
}
.sb-title { font-size: 14px; color: var(--gold-light); text-align: center; margin-bottom: 6px; }
.sb-list { display: flex; flex-direction: column; gap: 4px; }
.sb-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.03);
}
.sb-rank {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.sb-rank.gold { background: linear-gradient(135deg, #f0d78c, #c9a84c); color: #1a0a00; }
.sb-rank.silver { background: linear-gradient(135deg, #ddd, #999); color: #1a0a00; }
.sb-rank.bronze { background: linear-gradient(135deg, #d4a574, #8b5e3c); color: #fff; }
.sb-rank.normal { background: rgba(255,255,255,0.1); color: var(--text-dim); }
.sb-avatar {
  width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
  background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.sb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sb-name { flex: 1; font-size: 13px; font-weight: 600; }
.sb-score { font-size: 14px; font-weight: 800; }
.sb-score.positive { color: #2ecc71; }
.sb-score.negative { color: #e74c3c; }

/* 绮捐嚧鐗岄潰 */
.poker-card {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #e8ddc8 0%, #ddd0b4 40%, #d4c5a5 100%);
  border-radius: var(--card-radius); border: 1px solid rgba(0,0,0,0.1);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  position: relative;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.7);
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
  font-weight: 700;
  border: 1px solid rgba(180,160,120,0.4);
}
.poker-card::before {
  content: ''; position: absolute; inset: 3px;
  border: 1px solid rgba(180,160,120,0.2);
  border-radius: calc(var(--card-radius) - 2px);
  pointer-events: none;
}

/* ===== 鐗岄潰鐨偆绯荤粺 ===== */
/* 閹忛噾濂?- 閲戣壊杈规+鏆栭噾搴?*/
.card-skin-gold {
  background: linear-gradient(160deg, #f5e6c8 0%, #e8d5a3 40%, #d4c080 100%) !important;
  border: 1.5px solid rgba(180,140,40,0.6) !important;
  box-shadow: 0 3px 10px rgba(180,140,40,0.3), inset 0 1px 0 rgba(255,255,220,0.5) !important;
}
.card-skin-gold::before { border-color: rgba(200,160,40,0.4) !important; }

/* 鍗堝钃?- 鍐疯摑绾稿簳 */
.card-skin-midnight {
  background: linear-gradient(160deg, #d8e4f0 0%, #c5d5e8 40%, #b0c5dd 100%) !important;
  border: 1.5px solid rgba(40,60,120,0.4) !important;
  box-shadow: 0 3px 10px rgba(30,50,100,0.25), inset 0 1px 0 rgba(240,245,255,0.6) !important;
}
.card-skin-midnight::before { border-color: rgba(60,80,150,0.25) !important; }

/* 缈＄繝鐜?- 闈掔豢搴?*/
.card-skin-jade {
  background: linear-gradient(160deg, #e8f0e0 0%, #d5e5d0 40%, #c0d8b8 100%) !important;
  border: 1.5px solid rgba(40,120,60,0.4) !important;
  box-shadow: 0 3px 10px rgba(20,80,40,0.2), inset 0 1px 0 rgba(245,255,240,0.5) !important;
}
.card-skin-jade::before { border-color: rgba(60,140,80,0.25) !important; }

/* 璧ら湠绾?- 缁孩搴?*/
.card-skin-crimson {
  background: linear-gradient(160deg, #f0e0d8 0%, #e8d0c5 40%, #ddc0b0 100%) !important;
  border: 1.5px solid rgba(160,60,40,0.4) !important;
  box-shadow: 0 3px 10px rgba(120,30,20,0.2), inset 0 1px 0 rgba(255,245,240,0.5) !important;
}
.card-skin-crimson::before { border-color: rgba(180,80,50,0.25) !important; }

/* 澧ㄥ榛?- 榛戦噾閾?*/
.card-skin-noir {
  background: linear-gradient(160deg, #4a4a4a 0%, #333 40%, #1a1a1a 100%) !important;
  border: 1.5px solid rgba(255,215,0,0.4) !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08) !important;
  color: #eee !important;
}
.card-skin-noir::before { border-color: rgba(120,120,120,0.3) !important; }

/* 鐗岃儗鐨偆瀵瑰簲 */
.card-back-skin-gold {
  background: linear-gradient(135deg, #5c3d0a, #8b6914, #5c3d0a) !important;
}
.card-back-skin-midnight {
  background: linear-gradient(135deg, #1a2a4a, #0d1b3e, #1a2a4a) !important;
}
.card-back-skin-jade {
  background: linear-gradient(135deg, #1a3a2a, #0d2a1a, #1a3a2a) !important;
}
.card-back-skin-crimson {
  background: linear-gradient(135deg, #4a1a1a, #3a0d0d, #4a1a1a) !important;
}
.card-back-skin-noir {
  background: linear-gradient(135deg, #1a1a1a, #0d0d0d, #1a1a1a) !important;
}

/* 鐨偆閫夋嫨鍣?*/
.skin-selector {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding: 10px 0;
}
.skin-option {
  width: 48px; height: 64px; border-radius: 8px; cursor: pointer;
  border: 2px solid rgba(255,255,255,0.12);
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; position: relative;
  text-align: center; line-height: 1.2;
}
.skin-option.active { border-color: #d4a843; box-shadow: 0 0 14px rgba(212,168,67,0.5); }
.skin-option.locked { cursor: pointer; }
.skin-option.locked::after { content: '\1F512'; position: absolute; font-size: 12px; bottom: 2px; right: 2px; }
.skin-option.classic { background: linear-gradient(160deg, #e8ddc8, #d4c5a5); color: #5a4a3a; }
.skin-option.gold { background: linear-gradient(160deg, #f5e6c8, #d4c080); color: #6a4a10; }
.skin-option.midnight { background: linear-gradient(160deg, #d8e4f0, #b0c5dd); color: #2a3a5a; }
.skin-option.jade { background: linear-gradient(160deg, #e8f0e0, #c0d8b8); color: #2a4a2a; }
.skin-option.crimson { background: linear-gradient(160deg, #f0e0d8, #ddc0b0); color: #5a2a1a; }
.skin-option.noir { background: linear-gradient(160deg, #e8e8e8, #c0c0c0); color: #2a2a2a; }

/* ===== 妯睆妯″紡 ===== */
@media (orientation: landscape) and (max-height: 500px) {
  #app { max-width: 100%; }
  .game-topbar { min-height: 32px; padding: 2px 6px; }
  .dealer-mini { width: 28px; height: 28px; }
  .dealer-speech { font-size: 10px; }
  .timer-value { font-size: 16px; }
  .game-round { font-size: 10px; }
  .game-dealer { font-size: 9px; }

  #my-cards-area {
    flex-direction: row; flex-wrap: wrap; gap: 4px; padding: 2px 4px;
  }
  .card-row-label { font-size: 9px; width: 100%; }
  .card-slots { flex: 1; min-width: 0; }
  .card-slot { max-width: 50px; min-width: 36px; }
  .poker-card .card-center { font-size: 20px; }
  .poker-card .card-corner { font-size: 8px; }
  .face-badge { font-size: 6px; }

  .lock-desk { padding: 2px 6px; margin: 2px 4px; }
  .lock-desk-player { padding: 4px 2px; }
  .lock-desk-avatar { width: 22px; height: 22px; }
  .lock-desk-name { font-size: 10px; }
  .lock-desk-status { font-size: 9px; }
  .emoji-btn { font-size: 16px; }

  .hand-cards { padding: 2px 4px; }
  .hand-hint { font-size: 10px; padding: 4px 8px; }
  .hand-recommend { font-size: 11px; padding: 4px 8px; }

  .lock-area { padding: 4px 8px; gap: 6px; }
  .lock-area .lock-btns-row { gap: 6px; }
  .btn-auto-sort { font-size: 14px; padding: 10px 12px; }
  .btn-lock { font-size: 16px; padding: 8px 20px; }
  .lock-status { font-size: 10px; }

  .reveal-player { padding: 6px 4px; }
  .reveal-row-cards .reveal-mini-card { min-width: 20px; max-width: 34px; height: 42px; font-size: 9px; }
  .reveal-row-cards .reveal-mini-card.card-back::after { font-size: 14px; }
  .reveal-hand-type { font-size: 11px; }
  .reveal-name { font-size: 12px; }
  .reveal-round-score { font-size: 14px; }
}

/* === 妯睆鎻檽甯冨眬 === */
@media (orientation: landscape) and (max-width: 767px) {
  .reveal-area { padding: 8px 8px 80px 8px; }
  .reveal-row-cards .reveal-mini-card { height: 44px; font-size: 10px; }
}

.btn-leave-game {
  padding: 8px 20px; border-radius: 20px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-dim); font-size: 13px; cursor: pointer;
}
.btn-leave-game:active { background: rgba(231,76,60,0.2); color: #e74c3c; }

/* === 鍙充笅瑙掓寜閽粍(璇存槑+閫€鍑? === */
.corner-btns {
  position: fixed; right: 4px; bottom: 60px; z-index: 85;
  display: flex; flex-direction: column; gap: 3px;
}
.btn-corner {
  padding: 3px 7px; border-radius: 6px;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.06);
  color: #777; font-size: 10px; cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-align: center; writing-mode: horizontal-tb;
}
.btn-corner:active { background: rgba(212,168,67,0.25); color: #fff; }
#btn-backpack { color: #f5d78c; text-shadow: 0 0 8px rgba(212,168,67,0.5); animation: bpGlow 2s ease-in-out infinite; }
@keyframes bpGlow { 0%,100%{text-shadow:0 0 6px rgba(212,168,67,0.4)} 50%{text-shadow:0 0 14px rgba(212,168,67,0.8),0 0 20px rgba(255,215,0,0.3)} }
[data-badge]::after {
  content: attr(data-badge); position: absolute; top: -4px; right: -4px;
  min-width: 14px; height: 14px; line-height: 14px;
  border-radius: 7px; font-size: 9px; font-weight: 700;
  text-align: center; color: #fff; background: #e74c3c;
  padding: 0 3px; pointer-events: none;
  animation: badgePulse 0.6s ease-in-out infinite;
}
.invite-popup-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 600;
  background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center;
}
.invite-popup-card {
  background: linear-gradient(160deg, #1a0a2e, #0d1b2a); border: 1px solid rgba(212,168,67,0.5);
  border-radius: 20px; padding: 24px; text-align: center; max-width: 300px; width: calc(100% - 40px);
  animation: invPopIn 0.3s ease-out;
}
.invite-popup-icon { font-size: 48px; margin-bottom: 8px; animation: invIcon 0.6s ease-in-out infinite; }
@keyframes invPopIn { 0%{transform:scale(0.8);opacity:0} 100%{transform:scale(1);opacity:1} }
@keyframes invIcon { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-10deg)} 75%{transform:rotate(10deg)} }
@keyframes badgePulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.3); box-shadow: 0 0 6px #e74c3c; }
}
#btn-profile { position: relative; }
.btn-notify { background:none; border:none; font-size:18px; cursor:pointer; padding:4px 8px; position:relative; color:#ccc; }
.notify-dot { position:absolute; top:2px; right:2px; min-width:14px; height:14px; line-height:14px; border-radius:7px; font-size:8px; font-weight:700; text-align:center; color:#fff; background:#e74c3c; }
.notify-dot.hidden { display:none; }
.btn-ai { width: 100%; padding: 14px; margin-bottom: 6px; border-radius: 25px; border: 2px dashed rgba(255,255,255,0.2); background: rgba(100,180,255,0.1); color: #64b4ff; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn-ai:active { background: rgba(100,180,255,0.25); }

.btn-debug-eye { position: fixed; left: 50%; top: 60px; transform: translateX(-50%); z-index: 150; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.15); color: #aaa; font-size: 16px; cursor: pointer; }

/* === 鑱婂ぉ闈㈡澘 === */
.chat-panel {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 42vh; max-height: 340px; z-index: 60;
  background: rgba(6,18,12,0.97); border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-direction: column;
  transform: translateY(0); transition: transform 0.25s ease-out;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.6);
}
.chat-panel.hidden { transform: translateY(100%); }
.chat-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px; color: var(--gold-light); flex-shrink: 0;
}
.chat-panel-close { background: none; border: none; color: #999; font-size: 18px; cursor: pointer; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 8px 12px;
  display: flex; flex-direction: column; gap: 4px; min-height: 0;
}
.chat-msg { max-width: 82%; padding: 6px 10px; border-radius: 14px; font-size: 13px; word-break: break-all; }
.chat-msg.mine { align-self: flex-end; background: rgba(212,168,67,0.2); color: #f5f0e8; }
.chat-msg.other { align-self: flex-start; background: rgba(255,255,255,0.08); color: #ddd; }
.chat-msg .msg-from { font-size: 10px; color: var(--text-dim); margin-bottom: 2px; }
.chat-msg.system { align-self: center; background: transparent; color: #666; font-size: 11px; max-width: 100%; }
.chat-msg.emoji-only { font-size: 36px; background: transparent; padding: 2px 6px; }
.chat-custom-emoji { width: 48px; height: 48px; border-radius: 8px; }
.custom-emoji { width: 28px; height: 28px; }
.custom-emoji img { width: 100%; height: 100%; object-fit: contain; }
.chat-phrases {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px;
  border-top: 1px solid rgba(255,255,255,0.06); flex-shrink: 0;
}
.chat-phrase {
  padding: 4px 10px; border-radius: 14px; font-size: 11px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #ccc; cursor: pointer; white-space: nowrap;
}
.chat-phrase:active { background: rgba(212,168,67,0.25); color: #fff; }
.chat-emoji-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 10px; flex-shrink: 0; }
.chat-emoji-btn { font-size: 22px; cursor: pointer; padding: 2px; }
.chat-emoji-btn:active { transform: scale(1.2); }
.chat-input-row { display: flex; gap: 6px; padding: 6px 10px 10px; flex-shrink: 0; }
.chat-input { flex: 1; padding: 8px 12px; border-radius: 18px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06); color: #f5f0e8; font-size: 14px; outline: none; }
.chat-input:focus { border-color: var(--gold); }

.offline-avatar { position: relative; }
.lock-area { position: relative; }
.offline-dot {
  position: absolute; bottom: -2px; right: -2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #e74c3c; border: 2px solid #1a1a1a;
  animation: pulse-offline 1s infinite;
}
@keyframes pulse-offline {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.round-select {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 4px 0;
}
.round-select span { font-size: 13px; color: var(--text-dim); }
.btn-round {
  padding: 6px 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05); color: var(--text-dim);
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.btn-round.active {
  background: rgba(201,168,76,0.2); border-color: var(--gold);
  color: var(--gold-light); font-weight: 700;
}

.btn-speak { 
  background: none; border: none; font-size: 18px; cursor: pointer;
  padding: 2px 6px; vertical-align: middle;
}
.speech-text { font-size: 12px; }

#custom-room-code {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 25px; color: var(--white);
  font-size: 14px; text-align: center; outline: none;
  font-family: inherit;
}
#custom-room-code:focus { border-color: var(--gold); }
#custom-room-code::placeholder { color: var(--text-dim); font-size: 12px; }

.history-panel {
  margin-top: 8px; padding: 10px;
  background: rgba(0,0,0,0.3); border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
}
.history-title { font-size: 13px; color: var(--gold-light); text-align: center; margin-bottom: 6px; }
.history-round {
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.history-round:last-child { border-bottom: none; }
.history-round-num { font-size: 11px; color: var(--text-dim); margin-bottom: 2px; }
.history-item {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 8px; font-size: 12px;
}
.hi-name { font-weight: 600; min-width: 50px; }
.hi-types { color: var(--text-dim); flex: 1; }
.hi-score { font-weight: 700; }
.hi-score.positive { color: #2ecc71; }
.hi-score.negative { color: #e74c3c; }


/* 鎸戞垬闀挎潯 */
.challenge-bar {
  margin: 4px 8px; padding: 4px;
  background: rgba(0,0,0,0.3); border-radius: 8px;
  max-height: 130px; overflow-y: auto;
}
.challenge-bar.hidden { display: none; }
.ch-bar-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; margin: 2px 0; border-radius: 6px;
  background: rgba(255,255,255,0.05); font-size: 13px; color: #ccc;
}
.ch-bar-item.small { padding: 3px 8px; font-size: 11px; }
.ch-bar-actions { display: flex; gap: 4px; }
.ch-bar-btn {
  padding: 6px 14px; border-radius: 12px; font-size: 13px; border: none; cursor: pointer; color: #fff;
  min-width: 50px; z-index: 200; position: relative;
}
.ch-bar-btn.accept { background: #27ae60; }
.ch-bar-btn.reject { background: #e74c3c; }
.btn-ready {
  display: none; /* 榛樿闅愯棌, JS showReadyBtn() 鎵撳紑 */
  width: 100%; padding: 16px; margin-bottom: 8px;
  border-radius: 30px; border: none;
  font-size: 18px; font-weight: 700; cursor: pointer;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #8b6914, #d4a843, #f5d78c);
  color: #1a0a00;
  box-shadow: 0 4px 15px rgba(201,168,76,0.4);
  transition: all 0.3s;
}
.btn-ready.show { display: block; }
.btn-ready:active { transform: scale(0.97); }
.btn-ready.is-ready {
  background: linear-gradient(135deg, #1a7a3a, #2ecc71, #5ad88a);
  color: #0a1a00;
  box-shadow: 0 4px 15px rgba(46,204,113,0.4);
}
.player-mini-ready { font-size: 16px; margin-left: auto; }
.player-mini-ready.ready { color: #2ecc71; }


/* === 鍝佺墝: 鍗佺墰闃?=== */
.logo-svg { width: 80px; height: 80px; filter: drop-shadow(0 4px 12px rgba(212,168,67,0.4)); }
.logo-img { width: 100px; height: 100px; border-radius: 20px; object-fit: cover; box-shadow: 0 4px 20px rgba(212,168,67,0.5); }
.logo-anim-wrap { display: inline-block; }
.logo-anim-wrap { width: min(75vw, 290px); aspect-ratio: 1/1; margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 20px rgba(212,168,67,0.5); }
.logo-poster-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.3s; }
.slogan {
  font-size: 17px; color: var(--gold-light); font-weight: 600;
  letter-spacing: 4px; margin-top: -4px;
  text-shadow: 0 0 20px rgba(212,168,67,0.3);
}
.floating-chat {
  position: fixed; z-index: 200;
  background: rgba(10,31,20,0.9); color: var(--gold-light);
  padding: 6px 14px; border-radius: 16px;
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  animation: chat-float 2.5s ease-out forwards;
  pointer-events: none;
  border: 1px solid rgba(212,168,67,0.4);
}
@keyframes chat-float {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.8); }
  20% { opacity: 1; transform: translate(-50%, -30px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -80px) scale(0.9); }
}

/* === 闊虫晥寮€鍏?=== */
.btn-sound { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); background: rgba(0,0,0,0.4); color: #ccc; font-size: 16px; cursor: pointer; flex-shrink: 0; }
.btn-sound.muted { color: #666; }

/* === 鍊掕鏃惰繘搴︽潯 === */
.timer-bar-wrap { width: 100%; height: 6px; background: rgba(255,255,255,0.08); position: relative; }
.timer-bar { height: 100%; background: #2ecc71; transition: width 1s linear, background 0.5s; width: 100%; }
.timer-bar.warning { background: #f39c12; }
.timer-bar.danger { background: #e74c3c; }
.timer-text { position: absolute; right: 8px; top: -18px; font-size: 12px; color: var(--text-dim); }

/* === 鐗屽瀷鍙傜収寮圭獥 === */
.hand-ref-content { max-width: 340px; max-height: 80vh; overflow-y: auto; }
.hand-ref-content h3 { color: var(--gold-light); margin-bottom: 12px; text-align: center; }
.hand-ref-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.hand-ref-row { display: flex; justify-content: space-between; padding: 8px 14px; background: rgba(255,255,255,0.04); border-radius: 6px; font-size: 14px; color: var(--text); }
.hand-ref-row.top { border: 1px solid rgba(255,215,0,0.4); color: #ffd700; font-weight: 700; }
.hand-ref-row.bottom { border: 1px solid rgba(255,255,255,0.1); }
.hand-ref-row span:last-child { color: var(--text-dim); }
.hand-ref-rule { text-align: center; font-size: 12px; color: #e74c3c; margin-bottom: 12px; }

/* === 瀵瑰眬璁板綍 === */
.match-history { margin: 8px 14px; background: rgba(255,255,255,0.03); border-radius: 10px; overflow: hidden; max-width: 100%; }
.mh-header { padding: 10px 14px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.mh-header:active { background: rgba(255,255,255,0.05); }
.mh-list { padding: 0 14px 10px; overflow-x: auto; }
.mh-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 12px; gap: 4px; }
.mh-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 12px; }
.mh-item .mh-round { color: var(--gold-light); font-weight: 600; width: 36px; }
.mh-item .mh-result { flex: 1; color: var(--text); }
.mh-item .mh-score { color: var(--text-dim); }

/* === 鍒嗘暟鍔ㄧ敾 === */
.score-pop { position: fixed; z-index: 200; font-size: 28px; font-weight: 900; pointer-events: none; animation: scoreFly 1.5s ease-out forwards; display: flex; align-items: center; gap: 4px; }
.score-pop.up { color: #ffd700; }
.score-pop.down { color: #e74c3c; }

/* 閲戝竵鍥炬爣 */
.coin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; margin: 0 1px; background: url(/coin.svg) center/cover no-repeat; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
@keyframes scoreFly {
  0% { opacity: 1; transform: translateY(0) scale(0.5); }
  30% { opacity: 1; transform: translateY(-30px) scale(1.3); }
  100% { opacity: 0; transform: translateY(-80px) scale(0.8); }
}

/* 杩炶儨澶村儚妗?*/
.reveal-avatar.streak-3 { border: 2px solid #ff8c00; box-shadow: 0 0 14px rgba(255,140,0,0.6), 0 0 28px rgba(255,100,0,0.3); }
.reveal-avatar.streak-5 { border: 2px solid #00bfff; box-shadow: 0 0 18px rgba(0,191,255,0.8), 0 0 36px rgba(0,150,255,0.4); }
.reveal-avatar.streak-10 { border: 2px solid #ffd700; box-shadow: 0 0 22px rgba(255,215,0,0.9), 0 0 44px rgba(255,200,0,0.5), 0 0 66px rgba(255,180,0,0.3); }
.player-mini-avatar.streak-3 { border: 2px solid #ff8c00; animation: streakGlow 1.5s ease-in-out infinite; }
.player-mini-avatar.streak-5 { border: 2px solid #00bfff; animation: streakGlow 1s ease-in-out infinite; }
.player-mini-avatar.streak-10 { border: 2px solid #ffd700; animation: streakGlow 0.7s ease-in-out infinite; box-shadow: 0 0 12px rgba(255,215,0,0.5); }
@keyframes streakGlow { 0%,100%{box-shadow:0 0 4px rgba(255,140,0,0.3)} 50%{box-shadow:0 0 16px rgba(255,140,0,0.7)} }

/* 馃帀 搴嗙绮掑瓙 */
.cele-particle { position: fixed; z-index: 300; pointer-events: none; font-size: 20px; animation: celeFly 1.5s ease-out forwards; }
@keyframes fwBoom {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  50% { opacity: 1; }
  100% { transform: translate(var(--dx,30px),var(--dy,-80px)) scale(0.2); opacity: 0; }
}
@keyframes hornSlide {
  0% { top: -40px; opacity: 0; }
  15% { top: 10px; opacity: 1; }
  80% { top: 10px; opacity: 1; }
  100% { top: -40px; opacity: 0; }
}
@keyframes fwPop {
  0% { transform: scale(0.3); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}
@keyframes fwBurst {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx,30px),var(--dy,-60px)) scale(0); opacity: 0; }
}
.firework-dot { --dx: 0px; --dy: -60px; }
.firework-dot:nth-child(odd) { --dx: 40px; --dy: -50px; }
.firework-dot:nth-child(3n) { --dx: -30px; --dy: -70px; }
@keyframes celeFly {
  0% { opacity: 1; transform: translate(0,0) scale(0.5) rotate(0deg); }
  50% { opacity: 1; transform: translate(var(--cx),var(--cy)) scale(1.2) rotate(180deg); }
  100% { opacity: 0; transform: translate(calc(var(--cx)*2),calc(var(--cy)*2)) scale(0.3) rotate(360deg); }
}

/* 馃弳 璧㈢墝鍏ㄥ睆鍏夋檿 */
.win-glow {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 380;
  background: radial-gradient(ellipse at center, rgba(255,215,0,0.5) 0%, rgba(255,180,0,0.2) 40%, transparent 70%);
  pointer-events: none;
  animation: winGlowIn 0.4s ease-out forwards, winGlowOut 0.8s ease-in 0.4s forwards;
}
@keyframes winGlowIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes winGlowOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes floatCoinUp {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(1.3); }
}
@keyframes violationFlash {
  0%,100% { opacity: 1; }
  50% { opacity: 0.2; }
}
.violation-shake {
  animation: violationShake 0.3s ease-out 3;
  border: 2px solid #e74c3c !important;
  box-shadow: 0 0 20px rgba(231,76,60,0.5) !important;
}
.reveal-player { transition: opacity 0.4s ease; }
.winner-reveal {
  animation: winnerGlow 0.8s ease-out forwards;
}
@keyframes winnerGlow {
  0% { box-shadow: 0 0 0 rgba(212,168,67,0); }
  50% { box-shadow: 0 0 40px rgba(212,168,67,0.5), 0 0 80px rgba(255,215,0,0.2); }
  100% { box-shadow: 0 0 8px rgba(212,168,67,0.2); }
}
@keyframes danmakuFly {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(calc(-100vw - 400px)); opacity: 0; }
}
@keyframes violationShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
/* 鍙戠墝闃舵鐗岃儗 */
.card-back-slot {
  background: linear-gradient(135deg, #1a3a6e 0%, #0d2247 50%, #152d5e 100%) !important;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.08);
}
/* 牌背皮肤 CARD_BACKS — 仅在显示牌背时生效 */
.card-back-slot.card-back-b0, .card-back.card-back-b0, .deal-back.card-back-b0 { background: linear-gradient(135deg, #1a5e2e, #0d3818) !important; }
.card-back-slot.card-back-b1, .card-back.card-back-b1, .deal-back.card-back-b1 { background: linear-gradient(135deg, #2a5a9e, #1a3a6e) !important; }
.card-back-slot.card-back-b2, .card-back.card-back-b2, .deal-back.card-back-b2 { background: linear-gradient(135deg, #5c3d0a, #8b6914) !important; }
.card-back-slot.card-back-b3, .card-back.card-back-b3, .deal-back.card-back-b3 { background: linear-gradient(135deg, #3a3a3a, #1a1a1a) !important; }
.card-back-slot.card-back-b4, .card-back.card-back-b4, .deal-back.card-back-b4 { background: linear-gradient(135deg, #1a3a2a, #0d2a1a) !important; }
.card-back-slot.card-back-b5, .card-back.card-back-b5, .deal-back.card-back-b5 { background: linear-gradient(135deg, #8b6914, #d4a843) !important; }
.card-back-slot .card-center { color: rgba(255,255,255,0.25); font-size: 28px; }

/* 馃憫 绋€鏈夌墝鍨嬬壒鏁?*/
.rare-particle {
  position: fixed; z-index: 400; pointer-events: none;
  font-size: 28px; animation: rareBurst 1.5s ease-out forwards;
}
@keyframes rareBurst {
  0% { opacity: 1; transform: translate(0,0) scale(0.3) rotate(0deg); }
  50% { opacity: 1; transform: translate(var(--rx),var(--ry)) scale(1.5) rotate(180deg); }
  100% { opacity: 0; transform: translate(var(--rx2),var(--ry2)) scale(0.5) rotate(360deg); }
}
.rare-particle { animation-duration: 2.2s; }
.rare-glow {
  position: fixed; z-index: 390; pointer-events: none;
  border-radius: 50%;
  animation: glowPulse 2s ease-out forwards;
}
@keyframes glowPulse {
  0% { opacity: 0.8; transform: scale(0.5); }
  50% { opacity: 0.4; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(2.5); }
}
.rare-banner {
  position: fixed; z-index: 410; left: 50%; top: 25%;
  transform: translate(-50%, -50%);
  font-size: 20px; font-weight: 900; color: #ffd700;
  text-shadow: 0 0 30px rgba(255,215,0,0.8), 0 0 60px rgba(255,180,0,0.5);
  animation: bannerFly 2.5s ease-out forwards; pointer-events: none;
}
@keyframes bannerFly {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -60%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -100%) scale(0.8); }
}

/* === 缃戠粶鏂紑鎻愮ず === */
.net-status {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  background: #c0392b; color: #fff; text-align: center;
  padding: 10px 16px; font-size: 14px; font-weight: 700;
  animation: netPulse 2s ease-in-out infinite;
}
.net-status.hidden { display: none; }
@keyframes netPulse {
  0%, 100% { background: #c0392b; }
  50% { background: #e74c3c; }
}

/* 鎷栨嫿 */
.card-drag-ghost {
  position: fixed; z-index: 500; pointer-events: none;
  width: 50px; height: 70px; opacity: 0.9;
  transform: rotate(-3deg) scale(1.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.card-slot.drag-hover {
  border-color: #ffd700 !important;
  box-shadow: 0 0 24px rgba(255,215,0,0.7), inset 0 0 16px rgba(255,215,0,0.3);
  animation: slotPulse 0.6s ease-in-out infinite;
  transform: scale(1.05);
}
@keyframes slotPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255,215,0,0.5), inset 0 0 8px rgba(255,215,0,0.15); }
  50% { box-shadow: 0 0 32px rgba(255,215,0,0.8), inset 0 0 20px rgba(255,215,0,0.4); }
}

/* === 瀵瑰眬鍥炴斁 === */
#replay-overlay { background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; }
#replay-overlay.hidden { display: none; }
.replay-card {
  background: #0a1f14; border: 1px solid rgba(212,168,67,0.4);
  border-radius: 16px; padding: 12px; text-align: center;
  max-width: 420px; width: calc(100% - 20px);
  max-height: 95vh; overflow-y: auto;
}
.replay-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.replay-title { color: #d4a843; font-size: 16px; font-weight: 700; }
.replay-close { background: rgba(255,255,255,0.1); border: none; color: #ccc; width: 28px; height: 28px; border-radius: 50%; font-size: 14px; cursor: pointer; }
#replay-canvas { width: 100%; max-width: 360px; border-radius: 10px; background: #061a12; display: block; margin: 0 auto; }
.replay-controls { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }

/* === 鎸戞垬闀挎潯 === */
.challenge-bar {
  position: relative; z-index: 100;
  background: rgba(0,0,0,0.5);
  border-top: 1px solid rgba(243,156,18,0.4);
  padding: 4px 8px; max-height: 100px; overflow-y: auto;
  margin: 0 8px;
}
.challenge-bar.hidden { display: none; }
.ch-bar-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px; margin: 2px 0;
  background: rgba(243,156,18,0.08); border-radius: 8px;
  font-size: 12px; color: #ccc;
}
.ch-bar-accept, .ch-bar-reject {
  padding: 6px 14px; border-radius: 12px; border: none; cursor: pointer;
  font-size: 13px; margin-left: 6px; z-index: 200; position: relative;
}
.ch-bar-accept { background: #27ae60; color: #fff; }
.ch-bar-reject { background: #e74c3c; color: #fff; }

/* === 涓嬫敞+鎸戣 === */
/* 鎸戣寮圭獥闈犱笅 */
#challenge-overlay {
  align-items: flex-end; padding-bottom: 80px;
}
.popup-card {
  background: linear-gradient(160deg, #1a2a0f, #0f2818);
  border: 1px solid rgba(212,168,67,0.5); border-radius: 16px;
  padding: 20px; max-width: 320px; width: calc(100% - 30px); text-align: center;
}
.challenge-options { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.challenge-options .btn { padding: 8px 14px; font-size: 14px; }
.challenge-options .btn.active { background: #d4a843; color: #0a1f14; font-weight: 700; }
.btn-challenge-desk {
  background: rgba(243,156,18,0.2); border: 1px solid rgba(243,156,18,0.5);
  color: #f39c12; font-size: 14px; padding: 2px 8px; border-radius: 12px;
  cursor: pointer; margin-top: 4px;
}

/* === 鍏紑澶у巺 === */
#lobby-overlay { background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; }
#lobby-overlay.hidden { display: none; }
.lobby-card {
  background: linear-gradient(160deg, #0f2818, #1a3a2a);
  border: 1px solid rgba(212,168,67,0.4); border-radius: 16px;
  padding: 16px; max-width: 360px; width: calc(100% - 24px);
}
.lobby-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.lobby-title { color: #d4a843; font-size: 18px; font-weight: 700; }
.lobby-close { background: rgba(255,255,255,0.1); border: none; color: #ccc; width: 28px; height: 28px; border-radius: 50%; font-size: 14px; cursor: pointer; }
.lobby-info { color: #888; font-size: 11px; text-align: center; margin: 4px 0 10px; }
.lobby-list { max-height: 300px; overflow-y: auto; }
.lobby-room {
  display: flex; align-items: center; gap: 8px; padding: 10px;
  background: rgba(255,255,255,0.04); border-radius: 10px; margin-bottom: 6px;
  cursor: pointer; transition: background 0.15s;
}
.lobby-room:hover { background: rgba(212,168,67,0.1); }
.lobby-host-rank { font-size: 20px; }
.lobby-host-name { color: #fff; font-size: 14px; flex: 1; }
.lobby-room-code { color: #d4a843; font-size: 12px; }
.lobby-player-count { color: #999; font-size: 12px; white-space: nowrap; }
.lobby-has-friend { border: 1px solid rgba(255,215,0,0.25); background: rgba(255,215,0,0.05); }
.lobby-has-friend:hover { background: rgba(255,215,0,0.12) !important; }
.lobby-footer { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.btn-lobby { width: 100%; margin-top: 4px; background: linear-gradient(135deg, #3498db, #2980b9); color: #fff; border: none; padding: 8px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }

/* === 涓汉涓婚〉 === */
#profile-overlay { background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; }
#profile-overlay.hidden { display: none; }
.profile-card {
  background: linear-gradient(160deg, #0f2818, #1a3a2a);
  border: 1px solid rgba(212,168,67,0.4); border-radius: 20px;
  padding: 24px; max-width: 340px; width: calc(100% - 30px);
  position: relative; text-align: center;
  max-height: 85vh; overflow-y: auto;
}
.profile-close {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.1); border: none; color: #999;
  width: 30px; height: 30px; border-radius: 50%; font-size: 16px; cursor: pointer;
}
.profile-avatar-wrap { margin: 10px 0; }
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto;
  background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
  font-size: 36px; border: 2px solid #d4a843; overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 20px; font-weight: 700; color: #f5d78c; margin: 6px 0; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 6px 0; }
.profile-badge { font-size: 22px; opacity: 0.3; }
.profile-badge.earned { opacity: 1; }
.profile-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px;
  margin: 10px 0; text-align: center;
}
.profile-stat {
  background: rgba(255,255,255,0.05); border-radius: 8px; padding: 6px 4px;
}
.profile-stat .val { font-size: 16px; font-weight: 900; color: #d4a843; }
.profile-stat .lbl { font-size: 9px; color: #999; }
.profile-stat:first-child { grid-column: 1 / -1; }
.profile-stat:first-child .val { font-size: 20px; }
.profile-hands { margin-top: 8px; }

/* 缁撶畻瓒ｅ懗缁熻 */
.final-stat-card {
  background: rgba(255,255,255,0.04); border-radius: 8px;
  padding: 6px 4px; text-align: center;
  display: flex; flex-direction: column; gap: 1px;
}
.fsc-icon { font-size: 18px; }
.fsc-val { font-size: 14px; font-weight: 800; color: #d4a843; }
.fsc-lbl { font-size: 9px; color: #888; }

/* ===== 鍥涘ぇ鐗岄 鈥?鑷繁鍙锛坆ody绾у埆锛?===== */
body.style-mangniu #login-avatar { border-color: #e74c3c !important; box-shadow: 0 0 16px rgba(231,76,60,0.5), 0 0 32px rgba(231,76,60,0.2) !important; animation: mangniuPulse 2s ease-in-out infinite; }
body.style-linghu  #login-avatar { border-color: #9b59b6 !important; box-shadow: 0 0 18px rgba(155,89,182,0.5) !important; }
body.style-qinglong #login-avatar { border-color: #d4a843 !important; box-shadow: 0 0 20px rgba(212,168,67,0.6), 0 0 40px rgba(212,168,67,0.2) !important; animation: qinglongShine 3s ease-in-out infinite; }
body.style-xianhe  #login-avatar { border-color: #ecf0f1 !important; box-shadow: 0 0 14px rgba(236,240,241,0.5) !important; }

/* ===== 鍥涘ぇ鐗岄 鈥?鎵€鏈変汉鍙锛坈lass绾у埆锛?===== */
/* 澶村儚 */
.style-avatar-mangniu, .reveal-player.is-winner .style-avatar-mangniu {
  border: 2px solid #e74c3c !important;
  box-shadow: 0 0 16px rgba(231,76,60,0.5), 0 0 32px rgba(231,76,60,0.2) !important;
  animation: mangniuPulse 2s ease-in-out infinite;
}
.style-avatar-linghu, .reveal-player.is-winner .style-avatar-linghu {
  border: 2px solid #9b59b6 !important;
  box-shadow: 0 0 18px rgba(155,89,182,0.5), 0 0 36px rgba(155,89,182,0.15) !important;
}
.style-avatar-qinglong, .reveal-player.is-winner .style-avatar-qinglong {
  border: 2px solid #d4a843 !important;
  box-shadow: 0 0 20px rgba(212,168,67,0.6), 0 0 40px rgba(212,168,67,0.2) !important;
  animation: qinglongShine 3s ease-in-out infinite;
}
.style-avatar-xianhe, .reveal-player.is-winner .style-avatar-xianhe {
  border: 2px solid #ecf0f1 !important;
  box-shadow: 0 0 14px rgba(236,240,241,0.5), 0 0 28px rgba(236,240,241,0.15) !important;
}
/* 鍚嶅瓧 */
.style-name-mangniu { color: #e74c3c !important; }
.style-name-linghu  { color: #9b59b6 !important; }
.style-name-qinglong { color: #d4a843 !important; }
.style-name-xianhe  { color: #bdc3c7 !important; }

@keyframes mangniuPulse { 0%,100% { box-shadow: 0 0 12px rgba(231,76,60,0.4), 0 0 24px rgba(231,76,60,0.15); } 50% { box-shadow: 0 0 24px rgba(231,76,60,0.7), 0 0 48px rgba(231,76,60,0.3); } }
@keyframes qinglongShine { 0%,100% { box-shadow: 0 0 16px rgba(212,168,67,0.4), 0 0 32px rgba(212,168,67,0.1); } 50% { box-shadow: 0 0 30px rgba(255,215,0,0.8), 0 0 56px rgba(255,215,0,0.3); } }

/* 鎺掔墝鍖哄井寮卞簳鑹?*/
body.style-mangniu .my-cards-area  { background: rgba(231,76,60,0.03) !important; }
body.style-linghu  .my-cards-area  { background: rgba(155,89,182,0.03) !important; }
body.style-qinglong .my-cards-area { background: rgba(212,168,67,0.04) !important; }

/* 通杀/被通杀动画 */
@keyframes sweepIn { from { opacity:0; transform:scale(0.5); } to { opacity:1; transform:scale(1); } }
@keyframes sweepOut { from { opacity:1; } to { opacity:0; } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeOut { from { opacity:1; } to { opacity:0; } }

/* 对局回放弹窗 */
.replay-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
}
.replay-card {
  background: linear-gradient(160deg, #0f2818, #1a3a2a);
  border: 1px solid rgba(212,168,67,0.35); border-radius: 16px;
  padding: 16px; max-width: 320px; width: 90vw; color: #ccc;
}
.replay-header {
  text-align: center; font-size: 18px; font-weight: 800;
  color: #d4a843; margin-bottom: 12px;
}
.replay-player {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px; border-radius: 8px;
  background: rgba(255,255,255,0.03); margin: 4px 0;
  font-size: 12px;
}
.replay-name { font-weight: 600; min-width: 50px; color: #fff; }
.replay-hands { font-size: 10px; color: #888; flex:1; text-align:center; }
.replay-score-up { color: #ffd700; font-weight: 700; }
.replay-score-down { color: #e74c3c; font-weight: 700; }
.replay-nav { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
body.style-xianhe  .my-cards-area  { background: rgba(236,240,241,0.02) !important; }

/* 閿佺墝鎸夐挳棰滆壊 */
body.style-mangniu .btn-lock:not(.locked) { background: linear-gradient(135deg, #e74c3c, #c0392b) !important; }
body.style-linghu  .btn-lock:not(.locked) { background: linear-gradient(135deg, #9b59b6, #7d3c98) !important; }
body.style-qinglong .btn-lock:not(.locked) { background: linear-gradient(135deg, #d4a843, #8b6914) !important; }
body.style-xianhe  .btn-lock:not(.locked) { background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important; }

/* 璁℃椂鍣ㄩ鑹?*/
body.style-mangniu .timer-bar  { background: #e74c3c !important; }
body.style-linghu  .timer-bar  { background: #9b59b6 !important; }
body.style-qinglong .timer-bar { background: linear-gradient(90deg, #8b6914, #d4a843) !important; }
body.style-xianhe  .timer-bar  { background: #bdc3c7 !important; }

/* 鑱婂ぉ鍚嶅瓧 */
body.style-mangniu .chat-msg.mine .msg-from { color: #e74c3c !important; }
body.style-linghu  .chat-msg.mine .msg-from { color: #9b59b6 !important; }
body.style-qinglong .chat-msg.mine .msg-from { color: #d4a843 !important; }
body.style-xianhe  .chat-msg.mine .msg-from { color: #bdc3c7 !important; }
.profile-hands h4 { color: #d4a843; font-size: 13px; margin: 0 0 6px; }
.profile-hand-row {
  display: flex; justify-content: space-between; padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 12px; color: #ccc;
}

/* === 鍙嶉寮圭獥 === */
.feedback-card {
  background: linear-gradient(145deg, #1a3a2a, #0f2818);
  border: 1px solid rgba(212,168,67,0.5); border-radius: 16px;
  padding: 20px; max-width: 340px; width: calc(100% - 40px);
}
.feedback-card h3 { color: #f5d78c; font-size: 18px; margin-bottom: 12px; }
.feedback-card textarea {
  width: 100%; height: 120px; padding: 10px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06);
  color: #fff; font-size: 14px; resize: none; font-family: inherit;
}
.feedback-card .btn-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

/* === 鏂版墜寮曞钂欏眰 === */
#tutorial-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: transparent;
  z-index: 150; pointer-events: none;
}
#tutorial-overlay.hidden { display: none; }

.tutorial-spotlight {
  position: fixed; border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.78), 0 0 40px rgba(212,168,67,0.5);
  transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none; z-index: 151;
}
.tutorial-pulse {
  animation: tutPulse 1.2s ease-in-out infinite;
  z-index: 152 !important; position: relative;
}
@keyframes tutPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,168,67,0.5); }
  50% { box-shadow: 0 0 0 12px rgba(212,168,67,0); }
}

.tutorial-tip {
  position: fixed; z-index: 153;
  background: rgba(10,31,20,0.96); border: 1px solid rgba(212,168,67,0.5);
  border-radius: 16px; padding: 14px 18px;
  text-align: center; max-width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  animation: tipIn 0.3s ease-out;
  pointer-events: auto;
}
@keyframes tipIn {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

.tutorial-step {
  font-size: 11px; color: #d4a843; margin-bottom: 2px; font-weight: 700;
}
.tutorial-text {
  font-size: 14px; color: #f0e6c5; margin: 0 0 10px 0; line-height: 1.5;
}
.tutorial-title { font-size: 18px; color: #ffd700; margin-bottom: 4px; font-weight: 800; }
.tutorial-btns {
  display: flex; gap: 8px; justify-content: center;
}
.tutorial-dots {
  display: flex; gap: 6px; justify-content: center; margin-bottom: 8px;
}
.tutorial-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.15);
  transition: all 0.3s;
}
.tutorial-dot.active { background: #d4a843; width: 24px; border-radius: 4px; }
.tutorial-dot.done { background: #2ecc71; }
.tutorial-arrow {
  position: absolute; width: 14px; height: 14px;
  background: rgba(10,31,20,0.96); border: 1px solid rgba(212,168,67,0.5);
  transform: rotate(45deg);
}

/* === 瑙勫垯鍗＄墖 (琚個璇锋柊鐢ㄦ埛) === */
#rule-card-overlay {
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
}
#rule-card-overlay.hidden { display: none; }

.rule-card {
  background: linear-gradient(145deg, #1a3a2a, #0f2818);
  border: 1px solid rgba(212,168,67,0.5);
  border-radius: 20px; padding: 24px; text-align: center;
  max-width: 320px; width: calc(100% - 40px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.rule-card h3 {
  color: #f5d78c; font-size: 20px; margin: 0 0 16px 0;
}
.rule-steps { text-align: left; margin-bottom: 18px; }
.rule-step {
  color: #ccc; font-size: 15px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
}
.rule-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; min-width: 26px;
  background: rgba(212,168,67,0.2); border: 1px solid rgba(212,168,67,0.4);
  border-radius: 50%; color: #d4a843; font-weight: 700; font-size: 13px;
}

/* 观战审批弹窗 */
.spectate-popup-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
}
.spectate-popup-card {
  background: linear-gradient(160deg, #0f2818, #1a3a2a);
  border: 1px solid rgba(212,168,67,0.5); border-radius: 16px;
  padding: 20px; max-width: 300px; width: 85vw;
  text-align: center; color: #ccc;
  animation: tipIn 0.3s ease-out;
}

/* 选庄页窄屏适配 */
@media (max-width: 380px) {
  .draw-cards { gap: 4px; margin: 10px 0; }
  .draw-card-item { padding: 6px 2px; border-radius: 10px; max-width: 72px; }
  .draw-card-item .draw-card-display { width: 40px; height: 56px; font-size: 14px; }
  .draw-card-item .draw-player-name { font-size: 10px; }
  .draw-card-item.is-dealer::after { font-size: 20px; }
}
