/* ═══════════ 是与非 · 多人抢答 —— 暗色悬疑风格 ═══════════ */

:root {
  --bg: #0a0d13;
  --panel: #12161f;
  --panel-2: #171c28;
  --line: #2a3140;
  --red: #e05252;
  --red-deep: #8f2d2d;
  --gold: #d4af37;
  --text: #d7dce6;
  --muted: #8a93a5;
  --green: #3fae6a;
  --yellow: #d9a13b;
  --bar-h: 84px;   /* 底部玩家栏高度 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景氛围 */
.bg-veil {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(143, 45, 45, 0.22), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(212, 175, 55, 0.06), transparent 60%),
    linear-gradient(180deg, #0a0d13 0%, #0d1119 100%);
}

.hidden { display: none !important; }

/* ═══════════ 顶栏 ═══════════ */

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  max-width: 780px; margin: 0 auto; padding: 22px 20px 6px;
}

.logo {
  font-size: 24px; letter-spacing: 2px;
  color: #e8edf5;
  text-shadow: 0 0 18px rgba(224, 82, 82, 0.45);
}

.logo-sub {
  font-size: 14px; color: var(--muted); letter-spacing: 4px;
  margin-left: 10px; font-weight: normal;
}

.top-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.room-code {
  font-size: 14px; letter-spacing: 2px; color: var(--gold);
  border: 1px dashed rgba(212, 175, 55, 0.4);
  padding: 4px 10px; border-radius: 6px;
  background: rgba(212, 175, 55, 0.06);
}

.round-info {
  font-size: 13px; color: var(--muted); letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

/* ═══════════ 布局 ═══════════ */

.container {
  max-width: 780px; margin: 0 auto; padding: 14px 20px calc(var(--bar-h) + 30px);
}

/* ═══════════ 大厅 ═══════════ */

.lobby {
  text-align: center;
  padding: 70px 20px 40px;
  animation: fade-up 0.6s ease both;
}

.lobby h2 {
  font-size: 28px; margin-bottom: 16px; color: #eef1f7;
  text-shadow: 0 0 24px rgba(224, 82, 82, 0.35);
}

.lobby p { color: var(--muted); line-height: 1.9; margin-bottom: 12px; font-size: 15px; }
.lobby .rules { font-size: 14px; color: #aab2c2; }
.lobby .rules b { color: var(--text); }

#nickname-input {
  display: block; width: min(360px, 100%);
  margin: 22px auto 12px;
  background: #0d1119;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 16px; text-align: center;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#nickname-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.12);
}

.lobby .btn-row { justify-content: center; }
.lobby .btn-start { width: min(360px, 100%); margin-top: 4px; }

.join-row {
  display: flex; gap: 10px; justify-content: center;
  width: min(360px, 100%); margin: 14px auto 0;
}

#room-code-input {
  flex: 1;
  background: #0d1119;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px; text-align: center; letter-spacing: 4px;
  padding: 10px 12px;
  outline: none;
}

#room-code-input:focus { border-color: var(--gold); }

/* ═══════════ 房间等待页 ═══════════ */

.waiting {
  text-align: center;
  padding: 40px 20px;
  animation: fade-up 0.6s ease both;
}

.room-code-big {
  font-size: 15px; color: var(--muted); letter-spacing: 2px;
  margin-bottom: 10px;
}

.room-code-big b {
  display: block; font-size: 54px; letter-spacing: 12px;
  color: var(--gold); margin: 6px 0 4px;
  text-shadow: 0 0 28px rgba(212, 175, 55, 0.35);
  font-family: "Consolas", "Courier New", monospace;
}

.room-code-big .btn-ghost { font-size: 12px; padding: 6px 12px; }

.waiting-tip {
  color: var(--muted); font-size: 13.5px; line-height: 1.9;
  margin-bottom: 20px;
}

.waiting-players {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-bottom: 26px; min-height: 40px;
}

.waiting-player {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  animation: fade-up 0.35s ease both;
}

.waiting-player .avatar { width: 26px; height: 26px; font-size: 13px; }

.waiting-player.host-mark { border-color: rgba(212, 175, 55, 0.5); }
.waiting-player .host-badge { color: var(--gold); font-size: 12px; }

.waiting-hint { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* ═══════════ 微信用户门禁 ═══════════ */

.gate {
  position: fixed; inset: 0; z-index: 120;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.gate-card {
  width: min(420px, 100%);
  background: linear-gradient(160deg, var(--panel) 0%, #10141d 100%);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 10px;
  padding: 36px 28px 30px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  animation: fade-up 0.5s ease both;
}

.gate-icon { font-size: 44px; margin-bottom: 16px; }

.gate .dots { margin-bottom: 16px; }

.gate-card h2 {
  font-size: 22px; letter-spacing: 3px; color: #eef1f7;
  margin-bottom: 14px;
  text-shadow: 0 0 24px rgba(224, 82, 82, 0.35);
}

.gate-desc {
  font-size: 14px; line-height: 1.9;
  color: #aab2c2; margin-bottom: 10px;
}

.gate-tip {
  font-size: 12.5px; line-height: 1.8;
  color: var(--muted);
}

.gate-actions {
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 10px;
}

.gate-actions .btn-start {
  margin-top: 0; padding: 12px 0; width: 100%;
}

.gate-actions .btn-ghost { width: 100%; }

/* ═══════════ 汤面卡片 ═══════════ */

.story-card {
  position: relative;
  background: linear-gradient(160deg, var(--panel) 0%, #10141d 100%);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 10px;
  padding: 26px 28px 22px;
  margin-bottom: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 0 60px rgba(143, 45, 45, 0.05);
  animation: fade-up 0.6s ease both;
}

.story-card.fading { animation: card-swap 0.45s ease both; }

@keyframes card-swap {
  0% { opacity: 1; transform: translateX(0); }
  45% { opacity: 0; transform: translateX(-22px); }
  55% { opacity: 0; transform: translateX(22px); }
  100% { opacity: 1; transform: translateX(0); }
}

.card-decor {
  position: absolute; top: -3px; left: 28px; width: 90px; height: 3px;
  background: linear-gradient(90deg, var(--red), transparent);
}

.story-title {
  font-size: 22px; color: #f2e9c8; letter-spacing: 3px;
  margin-bottom: 14px;
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.25);
}

.story-setup {
  font-size: 16px; line-height: 2.05;
  color: #c9d1de; min-height: 3em;
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
}

.story-setup.typing::after {
  content: "▍"; color: var(--red);
  animation: blink 0.9s steps(1) infinite;
  margin-left: 2px;
}

@keyframes blink { 50% { opacity: 0; } }

/* ═══════════ 阶段面板 ═══════════ */

.stage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 14px;
  text-align: center;
  animation: fade-up 0.5s ease both;
}

.stage-text { font-size: 15px; color: var(--muted); line-height: 1.8; }

.btn-buzz {
  display: inline-block;
  margin-top: 14px;
  font-size: 19px; letter-spacing: 3px;
  padding: 14px 54px;
  background: linear-gradient(135deg, #b03a3a, #8f2d2d);
  color: #ffe9e9;
  border: none; border-radius: 10px; cursor: pointer;
  box-shadow: 0 6px 24px rgba(143, 45, 45, 0.5);
  animation: pulse 1.8s ease-in-out infinite;
  transition: transform 0.12s, filter 0.2s, opacity 0.2s;
  font-family: inherit; font-weight: bold;
}

.btn-buzz:hover:not(:disabled) { filter: brightness(1.15); transform: translateY(-2px); }
.btn-buzz:active:not(:disabled) { transform: translateY(1px) scale(0.98); }
.btn-buzz:disabled { opacity: 0.5; cursor: not-allowed; animation: none; }

.btn-buzz.shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.stage-hint { margin-top: 12px; font-size: 13px; color: var(--muted); min-height: 1.4em; }

/* 倒计时圆环 */
.cd-wrap {
  position: relative;
  width: 120px; height: 120px;
  margin: 6px auto 12px;
}

.cd-ring { width: 120px; height: 120px; transform: rotate(-90deg); }

.cd-bg {
  fill: none; stroke: var(--line); stroke-width: 7;
}

.cd-fg {
  fill: none; stroke: var(--gold); stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 326.7;   /* 2πr, r=52 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.cd-fg.danger { stroke: var(--red); }

.cd-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: bold; color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.cd-text.danger { color: var(--red); text-shadow: 0 0 16px rgba(224, 82, 82, 0.6); }

/* ═══════════ 推理记录 ═══════════ */

.log {
  max-height: 300px; overflow-y: auto;
  padding: 6px 4px 10px; margin-bottom: 10px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}

.log::-webkit-scrollbar { width: 6px; }
.log::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.bubble-row { display: flex; width: 100%; animation: fade-up 0.35s ease both; }
.bubble-row.you  { justify-content: flex-end; }
.bubble-row.host { justify-content: flex-start; }

.bubble {
  max-width: 82%;
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 14.5px; line-height: 1.75;
  word-break: break-word;
}

.bubble-row.you .bubble {
  background: #1d2534;
  border: 1px solid var(--line);
  border-bottom-right-radius: 3px;
  color: #dbe2ee;
}

.bubble-row.host .bubble {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}

.bubble .bubble-who { font-size: 12px; color: var(--muted); margin-right: 6px; }

.bubble.yes   { border-color: rgba(63, 174, 106, 0.6) !important;  color: #9fe3ba !important;  box-shadow: 0 0 12px rgba(63, 174, 106, 0.12); }
.bubble.no    { border-color: rgba(224, 82, 82, 0.6) !important;   color: #f0a9a9 !important;  box-shadow: 0 0 12px rgba(224, 82, 82, 0.12); }
.bubble.maybe { border-color: rgba(217, 161, 59, 0.6) !important;  color: #ecd39a !important;  box-shadow: 0 0 12px rgba(217, 161, 59, 0.12); }
.bubble.err   { border-color: var(--line) !important; color: var(--muted) !important; }

/* 系统动态行（谁抢到了、谁猜中了） */
.sys-line {
  text-align: center; font-size: 12.5px; color: var(--muted);
  padding: 2px 0; letter-spacing: 1px;
  animation: fade-up 0.3s ease both;
}

.sys-line.gold { color: var(--gold); }
.sys-line.green { color: #9fe3ba; }
.sys-line.red { color: #f0a9a9; }

/* ═══════════ 操作区 ═══════════ */

.controls {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px 16px;
  animation: fade-up 0.5s ease both;
}

.controls.locked { opacity: 0.6; }

.input-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}

#question-input {
  flex: 1;
  background: #0d1119;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#question-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.12);
}

#question-input::placeholder { color: #5c6577; }

.counter {
  font-size: 12.5px; color: var(--muted);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  border: none; cursor: pointer;
  font-size: 15px; font-weight: bold;
  padding: 11px 20px;
  border-radius: 8px;
  letter-spacing: 1px;
  transition: transform 0.12s, box-shadow 0.2s, filter 0.2s, opacity 0.2s;
  font-family: inherit;
}

.btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-guess {
  flex: 1;
  background: linear-gradient(135deg, #d4af37, #a8842a);
  color: #1c1705;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.btn-ask {
  flex: 1;
  background: linear-gradient(135deg, #3a6bb0, #2d4f8f);
  color: #e8f0ff;
  box-shadow: 0 4px 16px rgba(58, 107, 176, 0.3);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: normal;
  font-size: 13px;
  padding: 11px 14px;
}

.btn-start {
  font-size: 17px;
  padding: 14px 44px;
  margin-top: 10px;
  background: linear-gradient(135deg, #b03a3a, #8f2d2d);
  color: #ffe9e9;
  box-shadow: 0 6px 24px rgba(143, 45, 45, 0.5);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(143, 45, 45, 0.4); }
  50%      { box-shadow: 0 6px 34px rgba(224, 82, 82, 0.65); }
}

.input-hint {
  margin-top: 10px; font-size: 12.5px; color: var(--muted);
  min-height: 1.4em; text-align: center;
}

/* ═══════════ 本轮结算（汤底） ═══════════ */

.settle {
  background: linear-gradient(165deg, #17190f 0%, #14161d 100%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 12px;
  padding: 28px 30px;
  box-shadow: 0 0 46px rgba(212, 175, 55, 0.12), inset 0 0 70px rgba(212, 175, 55, 0.04);
  animation: fade-up 0.6s ease both;
}

.settle-title {
  font-size: 24px; color: #f2e9c8; letter-spacing: 3px;
  margin-bottom: 12px; text-align: center;
}

.settle-feedback {
  text-align: center; color: var(--muted);
  font-size: 14px; line-height: 1.8;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.25);
}

.settle-story {
  max-height: 340px; overflow-y: auto;
  background: rgba(10, 13, 19, 0.7);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.settle-story h3 {
  color: var(--gold); font-size: 18px; letter-spacing: 2px;
  margin-bottom: 12px;
}

.settle-story p {
  font-size: 15px; line-height: 2.1;
  color: #c9d1de;
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
}

.settle-next {
  text-align: center; font-size: 13px; color: var(--muted);
  letter-spacing: 2px;
}

/* ═══════════ 最终排名 ═══════════ */

.game-end {
  text-align: center;
  animation: fade-up 0.6s ease both;
}

.game-end-title {
  font-size: 26px; color: #f2e9c8; letter-spacing: 4px;
  margin: 20px 0 22px;
  text-shadow: 0 0 22px rgba(212, 175, 55, 0.35);
}

.ranking-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 460px; margin: 0 auto 26px;
}

.ranking-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  animation: fade-up 0.4s ease both;
}

.ranking-item:nth-child(2) { animation-delay: 0.1s; }
.ranking-item:nth-child(3) { animation-delay: 0.2s; }

.ranking-item .rank {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: bold;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted); flex-shrink: 0;
}

.ranking-item.r1 { border-color: rgba(212, 175, 55, 0.6); box-shadow: 0 0 22px rgba(212, 175, 55, 0.15); }
.ranking-item.r1 .rank { background: linear-gradient(135deg, #d4af37, #a8842a); color: #1c1705; border: none; }
.ranking-item.r2 .rank { background: linear-gradient(135deg, #c0c8d4, #98a2b5); color: #10141d; border: none; }
.ranking-item.r3 .rank { background: linear-gradient(135deg, #c07a3a, #9c5c26); color: #1c1005; border: none; }

.ranking-item .avatar { width: 36px; height: 36px; font-size: 17px; flex-shrink: 0; }

.ranking-item .r-name { flex: 1; text-align: left; }
.ranking-item .r-name.me::after { content: "（我）"; color: var(--muted); font-size: 12px; }

.ranking-item .r-score {
  font-size: 20px; font-weight: bold; color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* ═══════════ 底部玩家列表栏（核心新 UI） ═══════════ */

.players-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: var(--bar-h);
  background: rgba(13, 17, 25, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
  z-index: 50;
}

.players-list {
  display: flex; gap: 10px;
  height: 100%;
  padding: 10px 14px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
}

.players-list::-webkit-scrollbar { height: 5px; }

/* ═══════════ 分享房间 ═══════════ */

.btn-share {
  background: transparent;
  border: 1px dashed rgba(212, 175, 55, 0.45);
  color: var(--gold);
  font-weight: normal;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 6px;
}

.share-modal {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(5, 8, 13, 0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.share-modal.hidden { display: none; }

.share-card {
  width: min(440px, 100%);
  background: linear-gradient(160deg, var(--panel) 0%, #10141d 100%);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 10px;
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  animation: fade-up 0.35s ease both;
}

.share-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--gold); }

.share-tip {
  color: var(--muted); font-size: 13px; line-height: 1.8;
  margin-bottom: 16px;
}

.share-link {
  width: 100%; padding: 10px 12px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text);
  font-size: 13px; letter-spacing: 0.5px;
  text-align: center; outline: none;
}

.share-link:focus { border-color: var(--gold); }

.share-actions {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 18px;
}

.share-actions .btn-start { flex: 1; font-size: 15px; padding: 11px 14px; }
.share-actions .btn-ghost { padding: 11px 14px; }
.players-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.player-card {
  position: relative;
  flex: 0 0 104px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 8px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: border-color 0.25s, opacity 0.25s, transform 0.15s;
}

.player-card.me { border-color: rgba(212, 175, 55, 0.55); }

.player-card.off { opacity: 0.45; }

.player-card.answering {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.25);
  animation: card-glow 1s ease infinite alternate;
}

@keyframes card-glow {
  from { box-shadow: 0 0 8px rgba(212, 175, 55, 0.18); }
  to   { box-shadow: 0 0 18px rgba(212, 175, 55, 0.4); }
}

.player-card.flash { animation: card-flash 0.6s ease; }

@keyframes card-flash {
  0%, 100% { filter: none; }
  50% { filter: brightness(1.9); }
}

.player-card .avatar-wrap { position: relative; }

.player-card .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: bold; color: #10141d;
}

.player-card .avatar-ring {
  position: absolute; inset: -4px;
  transform: rotate(-90deg);
  pointer-events: none;
}

.player-card .avatar-ring circle {
  fill: none; stroke-width: 2.5;
}

.player-card .avatar-ring .ring-bg { stroke: rgba(212, 175, 55, 0.25); }
.player-card .avatar-ring .ring-fg {
  stroke: var(--gold);
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.player-card.off .avatar { filter: grayscale(1); }

.player-card .p-name {
  font-size: 12.5px; color: var(--text);
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.player-card .p-name .me-tag { color: var(--gold); }

.player-card .p-status {
  font-size: 11px; color: var(--muted);
  display: flex; align-items: center; gap: 4px;
  font-variant-numeric: tabular-nums;
}

.player-card .p-status .buzz-ico { font-size: 10px; }
.player-card .p-status .buzz-ico.zero { filter: grayscale(1); opacity: 0.45; }

.player-card .off-tag {
  position: absolute; top: 3px; right: 3px;
  font-size: 9px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 0 3px;
  background: var(--bg);
}

.player-card .hit-anim {
  position: absolute; top: -10px; left: 50%;
  transform: translateX(-50%);
  color: var(--green);
  font-weight: bold; font-size: 13px;
  animation: float-up 1.4s ease both;
  pointer-events: none;
}

@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, 6px); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -26px); }
}

/* ═══════════ 加载遮罩 ═══════════ */

.loading {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(10, 13, 19, 0.82);
  backdrop-filter: blur(3px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px;
}

.loading p { color: var(--muted); font-size: 14px; letter-spacing: 2px; }

.dots { display: flex; gap: 10px; }

.dots i {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--red);
  animation: dot-bounce 1.1s ease-in-out infinite;
}

.dots i:nth-child(2) { animation-delay: 0.15s; background: var(--gold); }
.dots i:nth-child(3) { animation-delay: 0.3s;  background: var(--red); }

@keyframes dot-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(-14px); opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════ 响应式 ═══════════ */

@media (max-width: 560px) {
  .topbar { padding: 16px 16px 4px; }
  .logo { font-size: 20px; }
  .container { padding: 10px 14px calc(var(--bar-h) + 30px); }
  .story-card { padding: 20px 18px 16px; }
  .settle { padding: 20px 16px; }
  .btn-guess, .btn-ask { font-size: 14px; padding: 11px 12px; }
  .bubble { max-width: 90%; }
  .lobby { padding: 50px 16px 30px; }
  .lobby h2 { font-size: 23px; }
  .player-card { flex-basis: 92px; }
}
