/* ============================================================
   DrinkMaster 酒桌神器 · 全局样式
   暗色霓虹酒吧风格 · 移动端优先
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #0d0a1a;
  --bg-2: #161028;
  --gold: #ffd93d;
  --gold-deep: #f0a500;
  --wine: #ff6b6b;
  --purple: #b983ff;
  --cyan: #38d9c0;
  --blue: #4d96ff;
  --green: #6bcb77;
  --text: #f4f0ff;
  --text-dim: #b3aacb;
  --text-faint: #7a7194;
  --card: rgba(255,255,255,0.06);
  --card-border: rgba(255,255,255,0.12);
  --radius: 18px;
  --radius-lg: 26px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --shadow-gold: 0 8px 30px rgba(255,217,61,0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button { font-family: inherit; border: none; background: none; color: inherit; cursor: pointer; }
input { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ---------- 背景氛围 ---------- */
.bg-atmosphere { position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: radial-gradient(ellipse at 50% -10%, #2a1b4d 0%, var(--bg) 55%); }
.bg-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.bg-glow-1 { width: 60vw; height: 60vw; background: #6b2fb0; top: -15%; left: -10%;
  animation: floatGlow 18s ease-in-out infinite; }
.bg-glow-2 { width: 55vw; height: 55vw; background: #b02f6b; bottom: -20%; right: -15%;
  animation: floatGlow 22s ease-in-out infinite reverse; }
.bg-glow-3 { width: 40vw; height: 40vw; background: #2f6bb0; top: 35%; left: 40%; opacity: 0.3;
  animation: floatGlow 26s ease-in-out infinite; }
@keyframes floatGlow {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(6%, 8%) scale(1.15); }
}
.bg-bubbles { position: absolute; inset: 0; }
.bubble { position: absolute; bottom: -40px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.5), rgba(255,255,255,0.05));
  animation: rise var(--dur) linear infinite; animation-delay: var(--delay); }
@keyframes rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-110vh) translateX(30px); opacity: 0; }
}

/* ---------- 应用布局 ---------- */
.app { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }

.topbar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-top) + 10px) 16px 10px;
  height: calc(var(--safe-top) + 56px);
}
.topbar-title { font-size: 17px; font-weight: 700; letter-spacing: 0.5px;
  text-shadow: 0 0 18px rgba(255,217,61,0.4); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: var(--text); background: var(--card); border: 1px solid var(--card-border);
  transition: transform 0.15s, background 0.2s; }
.icon-btn:active { transform: scale(0.9); }
.back-btn { visibility: hidden; }

.view-container { flex: 1 1 auto; position: relative; overflow: hidden; }
.view { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 16px calc(var(--safe-bottom) + 28px); opacity: 0; pointer-events: none;
  transition: opacity 0.32s ease; }
.view.active { opacity: 1; pointer-events: auto; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 14px; font-size: 15px; font-weight: 700;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s; position: relative; overflow: hidden; }
.btn:active { transform: scale(0.95); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 11px; }
.btn-lg { padding: 16px 26px; font-size: 17px; border-radius: 16px; width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1b00;
  box-shadow: var(--shadow-gold); }
.btn-primary::after { content:''; position:absolute; inset:0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.5) 50%, transparent 60%);
  transform: translateX(-100%); }
.btn-primary:active::after { transform: translateX(100%); transition: transform 0.5s; }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--card-border); }
.btn-danger { background: linear-gradient(135deg, #ff6b6b, #e04545); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

/* ---------- 首页 Hero ---------- */
.hero { text-align: center; padding: 18px 8px 22px; }
.hero-emoji { font-size: 64px; animation: bob 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(255,217,61,0.4)); }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
.hero-title { font-size: 38px; font-weight: 900; margin: 8px 0 6px; letter-spacing: 2px;
  background: linear-gradient(135deg, #fff, var(--gold)); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 16px rgba(255,217,61,0.3)); }
.hero-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; max-width: 340px; margin: 0 auto; }

/* ---------- 玩家芯片栏 ---------- */
.players-strip { margin: 6px 0 18px; }
.strip-label { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.strip-label b { color: var(--gold); }
.strip-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.strip-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card); border: 1px dashed var(--card-border); border-radius: 14px;
  padding: 14px 16px; font-size: 14px; color: var(--text-dim); }
.player-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px 7px 8px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--card-border);
  font-size: 13px; font-weight: 600; }
.player-chip span:first-child { font-size: 16px; }
.chip-add { width: 34px; height: 34px; border-radius: 50%; background: var(--card);
  border: 1px dashed var(--card-border); font-size: 20px; color: var(--gold); line-height: 1; }

/* ---------- 游戏库 ---------- */
.game-category { margin-bottom: 24px; }
.cat-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800;
  margin-bottom: 12px; }
.cat-bar { width: 4px; height: 18px; border-radius: 2px; background: var(--gold);
  box-shadow: 0 0 10px var(--gold); }
.game-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.game-card { position: relative; text-align: left; padding: 16px 14px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  border: 1px solid var(--card-border); overflow: hidden;
  display: flex; flex-direction: column; gap: 4px; min-height: 150px;
  transition: transform 0.18s, border-color 0.2s, box-shadow 0.2s; }
.game-card::before { content:''; position:absolute; top:-30px; right:-30px; width:90px; height:90px;
  border-radius:50%; background: var(--accent); opacity:0.18; filter: blur(20px); }
.game-card:active { transform: scale(0.96); border-color: var(--accent);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.gc-emoji { font-size: 34px; margin-bottom: 4px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4)); }
.gc-name { font-size: 16px; font-weight: 800; }
.gc-desc { font-size: 11.5px; color: var(--text-dim); line-height: 1.4; flex: 1; }
.gc-meta { font-size: 11px; color: var(--text-faint); margin-top: 4px; }
.hot-badge { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; background: rgba(255,107,107,0.2);
  color: var(--wine); border: 1px solid rgba(255,107,107,0.4); }

/* ---------- 战绩入口 ---------- */
.leaderboard-entry { display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px; border-radius: var(--radius); margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(255,217,61,0.12), rgba(255,217,61,0.03));
  border: 1px solid rgba(255,217,61,0.3); transition: transform 0.15s; }
.leaderboard-entry:active { transform: scale(0.98); }
.le-icon { font-size: 32px; }
.le-text { flex: 1; text-align: left; }
.le-text strong { display: block; font-size: 15px; }
.le-text small { font-size: 12px; color: var(--text-dim); }

.home-footer { text-align: center; padding: 10px 0 20px; color: var(--text-faint); font-size: 11px; }
.home-footer .ver { margin-top: 4px; opacity: 0.6; }

/* ---------- 通用面板（玩家/战绩） ---------- */
.panel { padding: 10px 4px; }
.panel-title { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.panel-hint { font-size: 13px; color: var(--text-dim); margin-bottom: 18px; }
.add-player-row { display: flex; gap: 10px; margin-bottom: 18px; }
.add-player-row input { flex: 1; padding: 14px 16px; border-radius: 14px; font-size: 15px;
  background: var(--card); border: 1px solid var(--card-border); color: var(--text); outline: none; }
.add-player-row input:focus { border-color: var(--gold); }
.empty-tip { text-align: center; color: var(--text-faint); padding: 40px 20px; font-size: 14px; }

.player-list { display: flex; flex-direction: column; gap: 10px; }
.player-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 14px; background: var(--card); border: 1px solid var(--card-border);
  border-left: 3px solid var(--pc); }
.pr-avatar { font-size: 26px; }
.pr-name { font-weight: 700; font-size: 15px; flex: 1; }
.pr-stat { font-size: 12px; color: var(--text-dim); }
.pr-del { width: 34px; height: 34px; border-radius: 10px; font-size: 16px;
  background: rgba(255,107,107,0.12); }
.panel-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- 战绩榜 ---------- */
.stat-tabs { display: flex; gap: 8px; margin-bottom: 16px; background: var(--card); padding: 5px;
  border-radius: 14px; border: 1px solid var(--card-border); }
.stat-tab { flex: 1; padding: 9px; border-radius: 10px; font-size: 13px; font-weight: 700;
  color: var(--text-dim); transition: all 0.2s; }
.stat-tab.active { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a1b00; }
.pane-hint { font-size: 12px; color: var(--text-faint); margin-bottom: 12px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px;
  border-radius: 14px; background: var(--card); border: 1px solid var(--card-border); }
.rank-no { width: 32px; text-align: center; font-size: 18px; }
.rank-avatar { font-size: 24px; }
.rank-name { flex: 1; font-weight: 700; font-size: 15px; }
.rank-value { font-size: 17px; font-weight: 800; color: var(--gold); }

/* ============================================================
   模态框 / Toast / 粒子
   ============================================================ */
.modal-root, .toast-root, .confetti-root { position: fixed; inset: 0; z-index: 100;
  pointer-events: none; }
.modal-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(8,5,18,0.7); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.28s; pointer-events: auto; }
.modal-wrap.show { opacity: 1; }
.modal-box { position: relative; width: 100%; max-width: 380px; padding: 26px 22px;
  border-radius: var(--radius-lg); text-align: center;
  background: linear-gradient(165deg, #241a40, #181229);
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  transform: scale(0.85) translateY(20px); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); }
.modal-wrap.show .modal-box { transform: scale(1) translateY(0); }
.modal-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px;
  border-radius: 50%; font-size: 22px; line-height: 1; color: var(--text-dim);
  background: var(--card); }
.dlg-title { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.dlg-msg { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin-bottom: 20px;
  white-space: pre-wrap; }
.dlg-actions { display: flex; gap: 10px; }
.dlg-actions .btn { flex: 1; }

/* 传递手机 */
.modal-pass .pass-emoji { font-size: 60px; margin-bottom: 12px; animation: bob 2.5s ease-in-out infinite; }
.modal-pass .pass-title { font-size: 15px; color: var(--text-dim); }
.modal-pass .pass-name { font-size: 34px; font-weight: 900; margin: 8px 0 12px; color: var(--gold);
  text-shadow: 0 0 24px rgba(255,217,61,0.5); }
.modal-pass .pass-hint { font-size: 13px; color: var(--text-faint); margin-bottom: 20px; }

/* 喝酒弹层 */
.modal-drink .drink-avatar { font-size: 56px; }
.modal-drink .drink-name { font-size: 24px; font-weight: 900; margin: 6px 0; }
.modal-drink .drink-cups { font-size: 40px; margin: 8px 0; letter-spacing: 4px;
  animation: bob 1.2s ease-in-out infinite; }
.modal-drink .drink-reason { font-size: 15px; color: var(--gold); margin-bottom: 18px; }

/* 玩家选择 */
.pick-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 6px; }
.pick-chip { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px;
  background: var(--card); border: 1.5px solid var(--card-border); border-left: 3px solid var(--pc);
  transition: transform 0.15s; }
.pick-chip:active { transform: scale(0.94); }
.pick-avatar { font-size: 24px; }
.pick-chip .pick-name { font-size: 14px; font-weight: 700; }

/* Toast */
.toast { position: absolute; top: 12%; left: 50%; transform: translateX(-50%) translateY(-20px);
  padding: 12px 20px; border-radius: 14px; font-size: 14px; max-width: 86%; text-align: center;
  background: rgba(30,22,55,0.95); border: 1px solid var(--card-border);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4); opacity: 0; transition: all 0.3s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { border-color: rgba(255,107,107,0.6); background: rgba(70,25,35,0.95); }

/* 粒子 */
.confetti { position: absolute; width: var(--size); height: calc(var(--size) * 0.5);
  animation: fall var(--dur) cubic-bezier(0.2,0.6,0.4,1) forwards; }
.confetti-emoji { width: auto; height: auto; font-size: 24px; }
@keyframes fall {
  0% { transform: translate(0,0) rotate(0); opacity: 1; }
  100% { transform: translateX(var(--drift)) translateY(110vh) rotate(var(--rot)); opacity: 0.9; }
}

/* ============================================================
   游戏外壳 / 加载
   ============================================================ */
.game-shell { min-height: 100%; display: flex; flex-direction: column; }
.game-loading { margin: auto; text-align: center; }
.loading-emoji { font-size: 60px; animation: bob 1.4s ease-in-out infinite; }
.loading-name { font-size: 20px; font-weight: 800; margin: 12px 0; }
.loading-dots { display: flex; gap: 6px; justify-content: center; }
.loading-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
  animation: dotPulse 1.2s ease-in-out infinite; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%,100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }
.game-error { margin: auto; text-align: center; color: var(--text-dim); line-height: 2; }

/* 游戏通用块 */
.g-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 10px 0; }
.g-card { width: 100%; background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 18px; text-align: center; }
.g-turn-banner { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  border-radius: 999px; font-weight: 800; font-size: 16px; background: var(--card);
  border: 1px solid var(--card-border); }
.g-turn-banner .av { font-size: 22px; }
.g-big-text { font-size: 26px; font-weight: 900; line-height: 1.5; }
.g-sub { font-size: 14px; color: var(--text-dim); }
.g-actions { width: 100%; display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.g-actions-row { display: flex; gap: 12px; }
.g-actions-row .btn { flex: 1; }

/* ============================================================
   3D 骰子
   ============================================================ */
.dice3d-wrap { position: relative; display: grid; place-items: center;
  perspective: 600px; }
.dice3d { position: relative; transform-style: preserve-3d; }
.dice-face { position: absolute; border-radius: 18%;
  background: linear-gradient(145deg, #ffffff, #e8e4f5);
  box-shadow: inset 0 0 0 1.5px rgba(120,100,180,0.25),
              inset 0 4px 10px rgba(255,255,255,0.9),
              inset 0 -4px 10px rgba(90,70,150,0.18);
  backface-visibility: hidden; }
.dice-face .pip { position: absolute; width: 22%; height: 22%; border-radius: 50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle at 35% 30%, #5a4a80, #2a1f4d);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5), 0 1px 1px rgba(255,255,255,0.6); }
.dice3d-shadow { position: absolute; bottom: 6%; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.5), transparent 70%);
  filter: blur(3px); }

/* 金色骰子变体 */
.dice-gold .dice-face { background: linear-gradient(145deg, #ffe98a, #f0a500); }
.dice-gold .pip { background: radial-gradient(circle at 35% 30%, #8a5a00, #4d2f00); }

/* 骰子容器（多个骰子排列） */
.dice-row { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.dice-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ============================================================
   扑克牌
   ============================================================ */
.playing-card { perspective: 900px; }
.card-inner { position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; }
.card-face { position: absolute; inset: 0; border-radius: 12px;
  backface-visibility: hidden; overflow: hidden; }
.card-back-face { background:
  repeating-linear-gradient(45deg, #6b2fb0 0 8px, #5a2596 8px 16px);
  border: 3px solid #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2); }
.card-back-face::after { content:'♠'; position:absolute; inset:0; display:grid; place-items:center;
  font-size: 30px; color: rgba(255,255,255,0.35); }
.card-front-face { background: linear-gradient(160deg,#fff,#f0eef8);
  transform: rotateY(180deg); color: #2a1f4d; }
.card-front-face.red { color: #d63030; }
.corner { position: absolute; display: flex; flex-direction: column; align-items: center;
  line-height: 1; font-weight: 800; }
.corner-tl { top: 7px; left: 7px; }
.corner-br { bottom: 7px; right: 7px; transform: rotate(180deg); }
.corner-rank { font-size: 16px; }
.corner-suit { font-size: 15px; }
.card-art { position: absolute; inset: 0; display: grid; place-items: center; }
.card-art.big { font-size: 46px; }
.card-art.ace { font-size: 52px; font-weight: 700; }
.card-art-grid { position: absolute; inset: 0; }
.mini-suit { position: absolute; transform: translate(-50%,-50%); font-size: 16px; }
.mini-suit.flip { transform: translate(-50%,-50%) rotate(180deg); }

/* 牌堆 */
.deck-pile { position: relative; }
.pile-layer { position: absolute; inset: 0; border-radius: 12px;
  background: repeating-linear-gradient(45deg,#6b2fb0 0 8px,#5a2596 8px 16px);
  border: 3px solid #fff; }
.pile-top::after { content:'♠'; position:absolute; inset:0; display:grid; place-items:center;
  font-size: 30px; color: rgba(255,255,255,0.35); }
.pile-count { position: absolute; bottom: -28px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--text-dim); white-space: nowrap; }

/* 单张展示牌（放大居中） */
.card-showcase { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.card-showcase .playing-card { width: 150px; height: 210px; }
.card-showcase .corner-rank { font-size: 22px; }
.card-showcase .corner-suit { font-size: 20px; }
.card-showcase .card-art.big { font-size: 64px; }
.card-showcase .card-art.ace { font-size: 72px; }
.card-showcase .mini-suit { font-size: 22px; }

/* ============================================================
   Canvas 转盘
   ============================================================ */
.wheel-wrap { position: relative; display: grid; place-items: center; }
.wheel-wrap canvas { border-radius: 50%;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5)); }
.wheel-pointer { position: absolute; top: -3px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 14px solid transparent;
  border-right: 14px solid transparent; border-top: 26px solid var(--gold);
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.4)); z-index: 3; }
.wheel-hub { position: absolute; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 900; font-size: 15px; color: #2a1b00;
  background: radial-gradient(circle at 35% 30%, #fff2b0, var(--gold));
  box-shadow: 0 3px 10px rgba(0,0,0,0.4), inset 0 -2px 4px rgba(0,0,0,0.2); z-index: 2; }

/* ============================================================
   小姐牌（kings-cup）
   ============================================================ */
.kc-cup { font-size: 58px; animation: bob 2.5s ease-in-out infinite; }
.kc-progress { font-size: 13px; color: var(--text-dim); }
.kc-turn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.kc-turn .av { font-size: 22px; }
.kc-card-zone { min-height: 150px; display: grid; place-items: center; }
.kc-rule-card { width: 100%; max-width: 360px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border); border-top: 3px solid var(--rc);
  text-align: center; }
.kc-rule-head { font-weight: 800; font-size: 16px; color: var(--rc); margin-bottom: 6px; }
.kc-rule-desc { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.kc-action-tip { font-size: 16px; font-weight: 800; color: var(--gold); padding: 10px; }
.kc-input-row input, .wh-add-row input, .ws-input-row input, .cat-input-row input {
  width: 100%; padding: 14px 16px; border-radius: 14px; font-size: 15px; text-align: center;
  background: var(--card); border: 1.5px solid var(--card-border); color: var(--text); outline: none; }
.kc-input-row input:focus, .wh-add-row input:focus, .ws-input-row input:focus, .cat-input-row input:focus {
  border-color: var(--gold); }
.kc-input-row, .wh-add-row, .ws-input-row, .cat-input-row { width: 100%; max-width: 360px; }
.kc-multi-title { font-size: 14px; color: var(--text-dim); margin-bottom: 8px; }
.kc-multi-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; width: 100%; max-width: 360px; }
.kc-multi-chip { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 14px;
  background: var(--card); border: 1.5px solid var(--card-border); font-size: 14px; font-weight: 700;
  transition: all 0.15s; }
.kc-multi-chip:active { transform: scale(0.95); }
.kc-multi-chip.sel { border-color: var(--wine); background: rgba(255,107,107,0.18);
  box-shadow: 0 0 16px rgba(255,107,107,0.35); }

/* ============================================================
   真心话大冒险（truth-dare）
   ============================================================ */
.td-levels { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; margin-top: 14px; }
.td-level-card { padding: 14px 16px; border-radius: var(--radius); text-align: left;
  background: var(--card); border: 1.5px solid var(--card-border);
  border-left: 4px solid var(--gold); transition: all 0.15s; }
.td-level-card:active { transform: scale(0.97); }
.td-level-card[data-lv="1"] { border-left-color: var(--green); }
.td-level-card[data-lv="2"] { border-left-color: var(--gold); }
.td-level-card[data-lv="3"] { border-left-color: var(--wine); }
.td-level-name { font-size: 16px; font-weight: 800; }
.td-level-desc { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.td-wheel-host { display: grid; place-items: center; }
.td-card { width: 100%; max-width: 360px; padding: 22px 18px; border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #2a1f45, #1a1430); border: 1.5px solid var(--tc);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 30px rgba(0,0,0,0.2); text-align: center; }
.td-card-badge { display: inline-block; padding: 5px 16px; border-radius: 999px; font-size: 13px;
  font-weight: 800; color: #1a1330; background: var(--tc); margin-bottom: 14px; }
.td-card-avatar { font-size: 48px; }
.td-card-name { font-size: 17px; font-weight: 800; margin: 6px 0 14px; }
.td-card-text { font-size: 18px; font-weight: 700; line-height: 1.6; }

/* ============================================================
   幸运转盘（wheel）
   ============================================================ */
.wh-items-preview { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  max-width: 360px; margin-top: 14px; }
.wh-tag { padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #1a1330; }
.wh-edit-list { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.wh-edit-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-border); }
.wh-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.wh-edit-label { flex: 1; font-size: 14px; font-weight: 700; text-align: left; }
.wh-del { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,107,107,0.2);
  color: var(--wine); font-size: 13px; }
.wh-add-row { display: flex; gap: 8px; max-width: 360px; width: 100%; }
.wh-add-row input { flex: 1; }
.wh-wheel-host { display: grid; place-items: center; }

/* ============================================================
   数字炸弹（number-bomb）
   ============================================================ */
.nb-round { font-size: 13px; color: var(--text-dim); }
.nb-range { padding: 20px 28px; border-radius: var(--radius-lg); background: var(--card);
  border: 1.5px solid var(--card-border); min-width: 200px; text-align: center; }
.nb-range-num { font-size: 38px; font-weight: 900; color: var(--gold); letter-spacing: 2px; }
.nb-range-hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.nb-meter { width: 100%; max-width: 300px; height: 8px; border-radius: 999px; background: var(--card);
  overflow: hidden; }
.nb-meter-fill { height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--wine)); transition: width 0.4s; }
.nb-input-row { width: 100%; max-width: 300px; }
.nb-input-row input { width: 100%; padding: 16px; border-radius: 14px; font-size: 22px; font-weight: 800;
  text-align: center; background: var(--card); border: 1.5px solid var(--card-border); color: var(--text);
  outline: none; }
.nb-boom { font-size: 70px; animation: nbShake 0.5s ease-in-out; }
@keyframes nbShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-10px) rotate(-8deg)}
  75%{transform:translateX(10px) rotate(8deg)} }

/* ============================================================
   随机点名（random-pick）
   ============================================================ */
.rp-machine { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.rp-screen { width: 180px; height: 180px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #33265a, #1c1535);
  border: 4px solid var(--gold); box-shadow: 0 0 40px rgba(255,217,61,0.3), inset 0 0 30px rgba(0,0,0,0.5);
  text-align: center; transition: all 0.3s; }
.rp-screen .rp-avatar { font-size: 46px; }
.rp-screen .rp-name { font-size: 18px; font-weight: 800; margin-top: 4px; }
.rp-screen.rp-winner { border-color: var(--wine); box-shadow: 0 0 60px rgba(255,107,107,0.6);
  animation: winnerPulse 0.8s ease-in-out; }
@keyframes winnerPulse { 0%{transform:scale(1)} 50%{transform:scale(1.12)} 100%{transform:scale(1)} }
.rp-punish { width: 100%; max-width: 340px; padding: 16px; border-radius: var(--radius);
  background: var(--card); border: 1.5px solid var(--gold); text-align: center; }
.rp-punish-label { font-size: 13px; color: var(--text-dim); }
.rp-punish-text { font-size: 19px; font-weight: 800; color: var(--gold); margin-top: 6px; }

/* ============================================================
   谁是卧底（who-spy）
   ============================================================ */
.ws-word-card { width: 100%; max-width: 340px; padding: 24px 20px; border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #2a1f45, #1a1430); border: 1.5px solid var(--card-border);
  text-align: center; }
.ws-word-card.is-spy { border-color: var(--wine); box-shadow: 0 0 40px rgba(255,107,107,0.25); }
.ws-word-role { font-size: 13px; color: var(--text-dim); }
.ws-word-label { font-size: 18px; font-weight: 800; margin: 6px 0; }
.ws-word-word { font-size: 40px; font-weight: 900; color: var(--gold); margin: 14px 0; }
.ws-word-hint { font-size: 12px; color: var(--text-faint); }
.ws-desc-list { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.ws-desc-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-border); }
.ws-desc-row .av { font-size: 22px; }
.ws-desc-name { font-size: 13px; font-weight: 800; }
.ws-desc-text { flex: 1; font-size: 14px; text-align: right; color: var(--text); }
.ws-vote-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; width: 100%; max-width: 340px; }
.ws-vote-chip { display: flex; align-items: center; gap: 8px; padding: 14px; border-radius: 14px;
  background: var(--card); border: 1.5px solid var(--card-border); font-size: 15px; font-weight: 700;
  transition: all 0.15s; }
.ws-vote-chip:active { transform: scale(0.94); border-color: var(--gold); }
.ws-result-card { width: 100%; max-width: 340px; padding: 20px; border-radius: var(--radius-lg);
  background: var(--card); border: 1.5px solid var(--card-border); text-align: center; }
.ws-result-card.caught { border-color: var(--wine); }
.ws-result-card.wrong { border-color: var(--gold); }
.ws-result-avatar { font-size: 48px; }
.ws-result-name { font-size: 16px; font-weight: 800; margin: 8px 0 6px; }
.ws-result-role { font-size: 15px; }
.ws-words-reveal { font-size: 13px; color: var(--text-dim); margin-top: 10px; }

/* ============================================================
   逢7过（seven-pass）
   ============================================================ */
.sp-number { font-size: 80px; font-weight: 900; color: var(--gold);
  text-shadow: 0 0 40px rgba(255,217,61,0.4); line-height: 1; }
.sp-number.sp-wrong { color: var(--wine); animation: nbShake 0.5s; }
.sp-timer { width: 100%; max-width: 300px; height: 10px; border-radius: 999px; background: var(--card);
  overflow: hidden; }
.sp-timer-fill { height: 100%; border-radius: 999px; background: var(--green); width: 100%; }

/* ============================================================
   逛三园（categories）
   ============================================================ */
.cat-banner { font-size: 17px; font-weight: 800; color: var(--gold); }
.cat-garden-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; max-width: 360px;
  width: 100%; margin-top: 16px; }
.cat-garden-card { padding: 16px 8px; border-radius: var(--radius); background: var(--card);
  border: 1.5px solid var(--card-border); font-size: 13px; font-weight: 800; transition: all 0.15s; }
.cat-garden-card:active { transform: scale(0.94); border-color: var(--gold); }
.cat-garden-emoji { font-size: 30px; margin-bottom: 6px; }
.cat-said-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 360px;
  min-height: 40px; align-items: center; }
.cat-said-tag { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(107,203,119,0.2); border: 1px solid var(--green); }

/* ============================================================
   酒桌大冒险棋盘（board）
   ============================================================ */
.board-wrap { display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.game-board { display: grid; gap: 6px; width: 100%; }
.board-cell { position: relative; aspect-ratio: 1; border-radius: 10px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: linear-gradient(150deg, #281e48, #1a1430); border: 1px solid var(--card-border);
  padding: 4px; }
.bc-icon { font-size: 20px; }
.bc-name { font-size: 9px; color: var(--text-dim); text-align: center; line-height: 1.1; }
.bc-pawns { position: absolute; top: 2px; right: 2px; display: flex; flex-wrap: wrap; max-width: 26px; }
.bc-pawn { font-size: 13px; line-height: 1; }
.board-info { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.board-dice-host { display: grid; place-items: center; min-height: 70px; }

/* ============================================================
   宽屏居中 & 响应式
   ============================================================ */
.hero, .players-strip, .game-library, .leaderboard-entry, .panel {
  max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
.game-shell { max-width: 720px; margin: 0 auto; width: 100%; }

@media (min-width: 600px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .board-wrap { max-width: 520px; margin: 0 auto; }
}
@media (min-width: 920px) {
  .game-grid { grid-template-columns: repeat(4, 1fr); }
}

/* 窄屏微调 */
@media (max-width: 360px) {
  .game-card { padding: 13px 11px; min-height: 138px; }
  .gc-emoji { font-size: 28px; }
  .gc-name { font-size: 15px; }
  .gc-desc { font-size: 11px; }
  .dice-row { gap: 12px; }
}

/* 视图转场（轻微上滑） */
.view.active .hero, .view.active .game-category, .view.active .panel-title {
  animation: viewIn 0.4s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
