/* 瞎掰人 —— 多人派对游戏页（手机优先，沿用开心格设计 token） */

.xb-main { padding: 16px 14px 40px; }
.xb-wrap { max-width: 540px; margin: 0 auto; width: 100%; }

.xb-card {
  background: var(--white);
  border: 3px solid var(--dark);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--dark);
  padding: 20px 18px;
  margin-bottom: 14px;
  overflow: hidden;
}

.xb-h2 { font-size: 1.25rem; font-weight: 900; margin-bottom: 6px; color: var(--dark); }
.xb-sub { font-size: 0.9rem; color: #667; line-height: 1.6; margin-bottom: 14px; }
.xb-hint { font-size: 0.78rem; color: #8a93a0; line-height: 1.6; margin-top: 8px; }
.xb-alert { background: #FFF3F0; color: #c0392b; border: 1px solid #ffd9d0; border-radius: 10px; padding: 10px 12px; font-size: 0.85rem; margin-bottom: 14px; }
.xb-wait { text-align: center; color: #8a93a0; font-weight: 700; padding: 14px; }

.xb-big { width: 100%; margin-top: 14px; padding: 14px; font-size: 1.05rem; border-radius: 14px; }
.btn-ghost { background: #fff; color: var(--dark); border: 2px solid #e2e6ec; }
.btn-ghost:hover { background: var(--light); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: var(--shadow-sm) !important; }

/* ── 入口 ── */
.xb-entry { text-align: center; padding: 32px 20px; }
.xb-logo { font-size: 3.2rem; line-height: 1; margin-bottom: 6px; }
.xb-pixcat { display: block; margin: 0 auto 2px; image-rendering: pixelated; }
/* iconfont 风格内联图标 */
.xb-ic { width: 1.05em; height: 1.05em; vertical-align: -0.16em; flex-shrink: 0; }
.xb-spin { animation: xb-pulse 1.1s ease-in-out infinite; }
@keyframes xb-pulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.12); opacity: 1; } }
.xb-title { font-family: 'AlibabaPuHuiTi', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 2rem; font-weight: 900; letter-spacing: 2px; color: var(--dark); line-height: 1.1; margin-bottom: 8px; }
.xb-entry .xb-sub { text-align: left; }
/* 房间设置卡（与「谁是卧底」一致的平铺样式） */
.xb-create-cfg { background: var(--light); border: 2px solid #e6e9ef; border-radius: 14px; padding: 12px 14px; margin: 8px 0 14px; text-align: left; }
.xb-cfg-title { font-size: 0.8rem; font-weight: 800; color: #6a7380; margin-bottom: 10px; }
.xb-cfg-item { display: flex; flex-direction: column; gap: 5px; font-size: 0.76rem; color: #5a6472; font-weight: 700; min-width: 0; }
.xb-cfg-item input { width: 100%; padding: 9px 10px; border: 2px solid var(--dark); border-radius: 8px; font-size: 0.95rem; background: #fff; font-family: inherit; box-sizing: border-box; }
.xb-cfg-hint { font-size: 0.72rem; color: #97a0ac; margin-top: 9px; line-height: 1.4; }
.xb-asyou { font-size: 0.9rem; color: #5a6472; margin-bottom: 14px; }
.xb-asyou b { color: var(--blue); }
.xb-or { color: #b0b6c0; font-size: 0.8rem; margin: 14px 0 10px; font-weight: 700; }
.xb-join-row { display: flex; gap: 8px; }
.xb-code-input { flex: 1; text-transform: uppercase; letter-spacing: 4px; font-weight: 900; text-align: center; }
.xb-join-row .btn { flex-shrink: 0; }

.xb-field { display: block; text-align: left; margin-bottom: 12px; }
.xb-field > span { display: block; font-size: 0.8rem; font-weight: 700; color: #5a6472; margin-bottom: 6px; }
.xb-field input, .xb-field textarea, .xb-code-input {
  width: 100%; padding: 12px 14px; border: 2px solid #e2e6ec; border-radius: 12px;
  font-family: inherit; font-size: 1rem; color: var(--dark); background: var(--light); transition: border-color .15s; box-sizing: border-box;
}
.xb-field input:focus, .xb-field textarea:focus, .xb-code-input:focus { outline: none; border-color: var(--blue); background: #fff; }
.xb-field textarea { resize: vertical; line-height: 1.6; }
.xb-adv { margin-top: 14px; text-align: left; }
.xb-adv summary { cursor: pointer; font-size: 0.85rem; color: var(--blue); font-weight: 700; }
.xb-adv[open] summary { margin-bottom: 10px; }

/* ── 顶栏 ── */
.xb-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.xb-room { display: flex; align-items: center; gap: 8px; }
.xb-room-label { font-size: 0.72rem; color: #98a0ac; font-weight: 700; }
.xb-room-code { font-size: 1.25rem; font-weight: 900; letter-spacing: 3px; color: var(--dark);
  background: #fff; border: 2px dashed #cfd5de; border-radius: 10px; padding: 3px 12px; cursor: pointer; }
.xb-room-code:hover { border-color: var(--blue); color: var(--blue); }
.xb-top-actions { display: flex; align-items: center; gap: 8px; }
.xb-online { font-size: 0.78rem; color: #6a7380; font-weight: 700; background: #eef1f6; padding: 4px 10px; border-radius: 999px; }
.xb-icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 2px solid #e2e6ec; background: #fff; color: #5a6472;
  font-size: 1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all .15s; }
.xb-icon-btn:hover { background: var(--light); color: var(--dark); }

/* ── 玩家行 ── */
.xb-players, .xb-roles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.xb-player { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--light); border: 2px solid transparent; }
.xb-player.me { border-color: var(--blue); background: #eef5ff; }
.xb-player.dim { opacity: 0.55; }
.xb-ava { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; color: #fff; background: linear-gradient(135deg, var(--blue), var(--purple)); font-size: 0.9rem;
  object-fit: cover; overflow: hidden; }
img.xb-ava { background: #eef0f4; }
.xb-ava.sm { width: 26px; height: 26px; font-size: 0.8rem; }
.xb-pname { font-weight: 700; color: var(--dark); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* icon/文字/标签/分数 各自固定，名字独占弹性区并省略号，避免挤压头像与错位 */
.xb-player .xb-tag, .xb-player .xb-pscore { flex-shrink: 0; }
.xb-pname em { color: var(--blue); font-style: normal; font-size: 0.85em; }
.xb-pscore { font-weight: 900; color: var(--dark); background: #fff; border-radius: 8px; padding: 2px 9px; min-width: 28px; text-align: center; }
/* 等待开始：玩家卡左侧座位号（单独 div，不与名字合并） */
.xb-seat { flex-shrink: 0; width: 22px; height: 22px; border-radius: 8px; background: #e6e9ef; color: #6a7380; font-weight: 800; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; }
.xb-lobby { margin-bottom: 24px; }

.xb-tag { font-size: 0.68rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.xb-tag.host { background: #FFF3D6; color: #b07d00; }
.xb-tag.det { background: #ede7ff; color: #6c4bd8; }
.xb-tag.honest { background: #E2F7EC; color: #1d9e5e; }
.xb-tag.bluffer { background: #FFE9E4; color: #d9582f; }
.xb-tag.off { background: #eceef2; color: #97a0ac; }

/* ── 角色卡 ── */
/* 身份条：卡片顶部整条背景色区域，一眼看清自己是谁 */
.xb-role-badge { display: block; margin: -20px -18px 16px; padding: 13px 14px; border-radius: 16px 16px 0 0; text-align: center; font-size: 1.05rem; font-weight: 900; letter-spacing: 2px; }
.xb-role-badge.honest { background: linear-gradient(135deg, #2EB872, #00C853); color: #fff; }
.xb-role-badge.bluffer { background: linear-gradient(135deg, #FF7A59, #FF5A5A); color: #fff; }
.xb-role-badge.det { background: linear-gradient(135deg, var(--purple), var(--blue)); color: #fff; }
.xb-role-badge.spec { background: #eceef2; color: #6a7380; }
.xb-role-badge.test { background: linear-gradient(135deg, #2C3E50, #4A90FF); color: #fff; letter-spacing: 1px; }
.role-honest { border-color: #bfeccf; }
.role-bluffer { border-color: #ffd2c6; }
.role-det { border-color: #d9cdfb; }
.role-test { border-color: #cfd9e6; }
.xb-testbanner { background: #eef5ff; color: #2c6ed5; border: 1px solid #cfe0ff; border-radius: 12px; padding: 10px 12px; font-size: 0.82rem; font-weight: 700; text-align: center; margin-bottom: 12px; }

.xb-pinyin { text-align: center; font-size: 0.92rem; color: #98a0ac; letter-spacing: 1px; font-weight: 600; margin: 4px 0 -2px; }
.xb-word { font-size: 2.2rem; font-weight: 900; text-align: center; letter-spacing: 2px; color: var(--dark);
  margin: 6px 0 16px; word-break: break-all; }

.xb-card-hints { margin-bottom: 14px; text-align: center; }
.xb-hints-label, .xb-explain-label { display: block; font-size: 0.74rem; font-weight: 700; color: #97a0ac; margin-bottom: 8px; }
.xb-hints { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.xb-hint-chip { font-size: 0.95rem; font-weight: 800; padding: 8px 16px; border-radius: 12px; background: var(--light); color: #4a5260; border: 2px solid #e6e9ef; }
.xb-hint-chip.correct { background: #E2F7EC; color: #1d9e5e; border-color: #9be0bb; box-shadow: 0 0 0 3px rgba(46,184,114,.15); }

.xb-explain { background: var(--light); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.xb-explain p { font-size: 1.02rem; line-height: 1.7; color: var(--dark); font-weight: 600; }
.xb-explain.reveal { background: #F4FBF7; }
/* 测试模式·双人推演：上半看词+提示推演，下半（答案区）遮住，揭晓再看 */
.xb-answer-cut { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px;
  color: #aeb6c2; font-size: 0.72rem; font-weight: 700; letter-spacing: .5px; }
.xb-answer-cut::before, .xb-answer-cut::after { content: ""; flex: 1; border-top: 2px dashed #d6dbe3; }
.xb-answer-dir { text-align: center; margin-bottom: 12px; }
.xb-answer-dir .xb-hint-chip { display: inline-block; }
.xb-bluff-tip { font-size: 0.9rem; color: #d9582f; background: #FFF6F3; border-radius: 12px; padding: 12px 14px; line-height: 1.6; margin-bottom: 12px; }
.xb-det-tip { font-size: 0.9rem; color: #5a6472; line-height: 1.6; margin-bottom: 12px; }
.xb-det-line { font-size: 0.85rem; color: #6a7380; text-align: center; margin-top: 4px; }
.xb-det-line b { color: #6c4bd8; }

/* ── 瞎掰人「假内容」：名篇片段，明确标红=这是假的 ── */
.xb-decoy { background: #FFF3F0; border: 2px dashed #ffb3a3; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.xb-decoy-label { display: block; font-size: 0.78rem; font-weight: 800; color: #e0512f; margin-bottom: 8px; }
.xb-decoy-text { font-size: 1.05rem; line-height: 1.8; color: #6a4a44; font-weight: 600; }
.xb-decoy-src { display: block; text-align: right; font-size: 0.8rem; color: #b08a82; margin-top: 6px; }

/* ── 闭眼想（内容消失，整理说法） ── */
.xb-think { text-align: center; padding: 34px 18px; }
.xb-think-title { font-size: 1.5rem; font-weight: 900; color: var(--dark); letter-spacing: 2px; margin-bottom: 10px; }
.xb-think-tip { font-size: 1rem; color: #5a6472; line-height: 1.6; margin-bottom: 8px; }
.xb-think-sub { font-size: 0.84rem; color: #97a0ac; }

/* ── 倒计时 ── */
.xb-count { position: relative; height: 30px; background: #eef1f6; border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.xb-count-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, var(--blue), var(--purple)); transition: width .25s linear; }
.xb-count.go .xb-count-fill { background: linear-gradient(90deg, #2EB872, #00C853); }
.xb-count-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }

/* ── 大聪明候选 ── */
.xb-cands { display: flex; flex-direction: column; gap: 9px; margin-bottom: 4px; }
.xb-cand { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 13px; background: var(--light); border: 2px solid #e6e9ef; transition: all .15s; }
.xb-cand.picked { border-color: var(--blue); background: #eef5ff; box-shadow: 0 0 0 3px rgba(74,144,255,.12); }
.xb-cand.mark-1 { border-color: #ffc9bb; }
.xb-cand.mark-2 { border-color: #a9e3c4; }
.xb-cand-name { flex: 1; font-weight: 800; color: var(--dark); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xb-mark { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; border: 2px solid #d8dde5; background: #fff; font-weight: 900; font-size: 0.82rem; color: #97a0ac; cursor: pointer; }
.xb-cand.mark-1 .xb-mark { background: #FF5A5A; color: #fff; border-color: #FF5A5A; }
.xb-cand.mark-2 .xb-mark { background: #00C853; color: #fff; border-color: #00C853; }
.xb-pick-btn { flex-shrink: 0; padding: 7px 14px; border-radius: 10px; border: 2px solid var(--blue); background: #fff; color: var(--blue); font-weight: 800; font-size: 0.85rem; cursor: pointer; }
.xb-pick-btn.on { background: var(--blue); color: #fff; }

/* ── 揭晓 ── */
.xb-result { text-align: center; font-weight: 800; font-size: 0.98rem; line-height: 1.6; padding: 14px; border-radius: 14px; margin: 14px 0; }
.xb-result.good { background: #E2F7EC; color: #1d9e5e; }
.xb-result.bad { background: #FFE9E4; color: #d9582f; }
.xb-result b { font-weight: 900; }
/* 题卡反馈：标题独占一行 + 两个独立按钮 */
.xb-fb2-label { font-size: 0.85rem; color: #6a7380; font-weight: 700; text-align: center; margin: 16px 0 8px; }
.xb-fb2 { display: flex; gap: 10px; margin-bottom: 4px; align-items: center; justify-content: center; }
.xb-fbbtn { flex: 1; padding: 12px; border-radius: 13px; border: 2px solid #e2e6ec; background: #fff; color: var(--dark);
  font-family: inherit; font-weight: 800; font-size: 0.92rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all .15s; }
.xb-fbbtn:active { transform: translateY(1px); }
.xb-fbbtn.up:hover, .xb-fbbtn.up:active { border-color: #00C853; color: #1d9e5e; background: #F1FBF5; }
.xb-fbbtn.down:hover, .xb-fbbtn.down:active { border-color: #FF5A5A; color: #d9582f; background: #FFF5F3; }
.xb-fb-done { color: #1d9e5e; font-weight: 800; padding: 10px; }
.xb-host-actions { margin-top: 8px; }
.xb-host-actions .btn-ghost { width: 100%; margin-top: 10px; padding: 14px; font-size: 1rem; }

/* ── 积分榜 ── */
.xb-board-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.xb-board-head h3 { font-size: 1rem; font-weight: 900; color: var(--dark); }
.xb-mini { font-size: 0.75rem; font-weight: 700; color: #97a0ac; background: none; border: none; cursor: pointer; }
.xb-mini:hover { color: var(--red); }
.xb-board-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.xb-board-list li { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 10px; background: var(--light); }
.xb-board-list li.me { background: #eef5ff; }
.xb-rank { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 0.78rem; background: #dfe4ec; color: #6a7380; }
.xb-rank.r1 { background: #FFD93D; color: #8a6d00; }
.xb-rank.r2 { background: #d8dde5; color: #5a6472; }
.xb-rank.r3 { background: #F0C9A0; color: #8a5a2b; }
.xb-bname { flex: 1; font-weight: 700; color: var(--dark); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xb-bscore { font-weight: 900; color: var(--dark); }

/* ── 出题设置弹层 ── */
.xb-modal { position: fixed; inset: 0; background: rgba(20,26,38,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 200; padding: 0; }
.xb-modal-card { background: #fff; width: 100%; max-width: 540px; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.18); }
.xb-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.xb-modal-head h3 { font-size: 1.1rem; font-weight: 900; color: var(--dark); }
.xb-modal-actions { display: flex; gap: 10px; }
.xb-modal-actions .btn { flex: 1; }
.xb-stat { font-size: 0.82rem; color: #6a7380; font-weight: 700; margin-top: 12px; }

/* ── toast ── */
.xb-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px); background: rgba(20,26,38,.92); color: #fff;
  padding: 11px 20px; border-radius: 999px; font-size: 0.88rem; font-weight: 700; z-index: 300; opacity: 0; transition: opacity .25s, transform .25s; max-width: 86vw; text-align: center; }
.xb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 760px) {
  .xb-main { padding: 28px 24px; }
  .xb-modal { align-items: center; }
  .xb-modal-card { border-radius: 20px; }
}
