/* =============================================================
 * style.css —— 唬牌俱乐部
 * 配色：深色木桌 + 黄铜金 + 台呢绿，和编辑器深色主题一致
 * ============================================================= */

:root {
  --bg:        #0b0907;
  --bg-2:      #14100b;
  --wood:      #241a11;
  --brass:     #d9a441;
  --brass-dim: #8a6a2c;
  --felt:      #1a3a27;
  --felt-2:    #0e2117;
  --ink:       #f3ead9;
  --ink-2:     #b8a88f;
  --ink-3:     #7d6e59;
  --line:      rgba(217, 164, 65, .20);
  --red:       #e5484d;
  --yellow:    #e6b325;
  --blue:      #4c8dff;
  --wild:      #c9a2ff;
  --good:      #57c98a;
  --bad:       #ef6a6a;
  --warn:      #e5b93c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: radial-gradient(ellipse at 50% 0%, #1a1410 0%, var(--bg) 62%);
  color: var(--ink);
  font: 14px/1.55 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
em { font-style: normal; }

.screen { height: 100%; }

/* ============================================================
   通用按钮
   ============================================================ */
.btn {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #2b2117, #1a130c);
  color: var(--ink);
  border-radius: 9px;
  padding: 9px 15px;
  font-size: 13.5px;
  letter-spacing: .04em;
  transition: transform .12s, box-shadow .18s, border-color .18s, background .18s;
}
.btn:hover:not(:disabled) { border-color: rgba(217,164,65,.55); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .34; cursor: not-allowed; }

.btn.primary {
  background: linear-gradient(180deg, #e0ad4b, #b3842a);
  color: #1b1206; border-color: #f0c46a;
  font-weight: 700; box-shadow: 0 3px 0 #6d4d17, 0 8px 22px rgba(217,164,65,.28);
}
.btn.primary:hover:not(:disabled) { box-shadow: 0 3px 0 #6d4d17, 0 10px 28px rgba(217,164,65,.42); }
.btn.big { width: 100%; padding: 14px; font-size: 16px; border-radius: 12px; letter-spacing: .3em; }
.btn.ghost { background: rgba(255,255,255,.03); }
.btn.small { padding: 6px 11px; font-size: 12.5px; }
.btn.danger { background: linear-gradient(180deg,#7c2a2a,#4d1717); border-color: #a94141; color: #ffdcdc; }

/* ============================================================
   ① 大厅
   ============================================================ */
.lobby { display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; }
.lobby-card {
  width: 100%; max-width: 400px;
  background: linear-gradient(180deg, rgba(38,29,20,.92), rgba(20,15,10,.96));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 26px 20px;
  box-shadow: 0 26px 70px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.05);
}
.brand { text-align: center; margin-bottom: 24px; }
.brand-logo { width: 62px; height: 62px; color: var(--brass); filter: drop-shadow(0 3px 10px rgba(217,164,65,.35)); }
.brand h1 { margin: 6px 0 0; font-size: 25px; letter-spacing: .22em; text-indent: .22em; font-weight: 800; }
.brand-sub { margin: 2px 0 0; font-size: 10.5px; letter-spacing: .48em; text-indent: .48em; color: var(--brass-dim); }
.brand-tag { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }

.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 12px; color: var(--ink-3); letter-spacing: .12em; margin-bottom: 7px; }
.field input[type=text] {
  width: 100%; padding: 10px 12px; border-radius: 9px;
  background: rgba(0,0,0,.42); border: 1px solid var(--line);
  color: var(--ink); font-size: 14px; outline: none;
}
.field input[type=text]:focus { border-color: rgba(217,164,65,.6); }

.seg { display: flex; gap: 7px; }
.seg button {
  flex: 1; padding: 9px 4px; border-radius: 9px; font-size: 12.5px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--ink-2);
  transition: all .15s;
}
.seg button:hover { border-color: rgba(217,164,65,.45); color: var(--ink); }
.seg button.on {
  background: linear-gradient(180deg, rgba(217,164,65,.26), rgba(217,164,65,.10));
  border-color: rgba(217,164,65,.72); color: #ffe6b3; font-weight: 700;
}
.lobby-foot { margin: 16px 0 0; font-size: 11.5px; line-height: 1.85; color: var(--ink-3); text-align: center; }
.lobby-note { margin: 8px 0 0; font-size: 10px; color: #564a3c; text-align: center; letter-spacing: .04em; }

/* ============================================================
   ② 牌桌骨架
   ============================================================ */
.board { display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 10px 12px 12px; }

.hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hud-left { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.hud-right { display: flex; gap: 7px; }
.hud-box {
  display: flex; align-items: center; gap: 8px;
  background: rgba(20,15,10,.78); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 12px;
}
.hud-label { font-size: 10.5px; color: var(--ink-3); letter-spacing: .12em; white-space: nowrap; }
.swatch { font-size: 19px; line-height: 1; color: var(--brass); transition: color .3s; }
.swatch-name { font-size: 14px; font-weight: 700; }
.round-num { font-size: 16px; font-weight: 700; color: var(--brass); }

/* 左轮弹巢 */
.gun-box { padding: 4px 11px; }
.cylinder { position: relative; width: 38px; height: 38px; }
.cylinder::before {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  border: 1px solid rgba(217,164,65,.28); background: radial-gradient(circle at 40% 35%, #3a2d1e, #14100b);
}
.pip {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: #4a3a26; border: 1px solid rgba(0,0,0,.6);
  transform: translate(-50%, -50%);
}
.pip.fired { background: #241c12; opacity: .45; }
.pip.cur { background: var(--brass); box-shadow: 0 0 8px var(--brass); animation: pipPulse 1.1s ease-in-out infinite; }
@keyframes pipPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.gun-live { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.gun-live b { color: var(--bad); font-size: 14px; }

/* 桌子 + 日志 */
.table-wrap { display: grid; grid-template-columns: 1fr 262px; gap: 12px; min-height: 0; }
.table {
  position: relative; border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(217,164,65,.16);
  display: flex; flex-direction: column; gap: 8px; padding: 12px;
  background: #0f0b07;
  box-shadow: inset 0 0 60px rgba(0,0,0,.8);
}
.table-felt {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 72% 62% at 50% 44%, #20492f 0%, var(--felt) 48%, var(--felt-2) 100%);
}
.table-felt::after {
  content: ''; position: absolute; inset: 0;
  box-shadow: inset 0 0 110px rgba(0,0,0,.72);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 5px);
}

/* 对手座位 */
.seats { position: relative; z-index: 2; display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }
.seat {
  min-width: 124px; padding: 8px 11px 9px; border-radius: 12px;
  background: rgba(16,12,8,.86); border: 1px solid var(--line);
  transition: border-color .25s, box-shadow .25s, opacity .3s;
}
.seat.active { border-color: var(--brass); box-shadow: 0 0 0 1px rgba(217,164,65,.45), 0 0 22px rgba(217,164,65,.20); }
.seat.dead { opacity: .34; filter: grayscale(.75); }
.seat-top { display: flex; align-items: center; gap: 6px; }
.seat-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 92px; }
.seat-tag { font-size: 9.5px; padding: 1px 5px; border-radius: 4px; background: rgba(217,164,65,.18); color: var(--brass); white-space: nowrap; }
.seat-tag.dead { background: rgba(239,106,106,.18); color: var(--bad); }
.seat-tag.turn { background: rgba(87,201,138,.2); color: var(--good); }
.seat-tag.doubt { background: rgba(229,185,60,.22); color: var(--warn); }
.seat-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.hp { display: flex; gap: 3px; }
.hp i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 6px rgba(229,72,77,.6); }
.hp i.off { background: #3a2b22; box-shadow: none; }
.mini-cards { display: flex; }
.mini-cards span {
  width: 9px; height: 13px; margin-left: -3px; border-radius: 2px;
  background: linear-gradient(160deg,#3a2c1c,#1c1409); border: 1px solid rgba(217,164,65,.28);
}
.seat-last { margin-top: 5px; font-size: 10.5px; color: var(--brass-dim); min-height: 14px; }

/* 桌面牌堆 */
.pile-area { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 120px; }
.pile { position: relative; height: 86px; display: flex; align-items: center; justify-content: center; }
.pile .card.back { position: absolute; }
.pile-info { font-size: 12px; color: var(--ink-2); text-align: center; min-height: 18px; }

.turn-banner {
  position: absolute; z-index: 3; left: 50%; bottom: 10px; transform: translateX(-50%);
  font-size: 12px; letter-spacing: .1em; color: #ffe6b3;
  background: rgba(10,8,5,.82); border: 1px solid rgba(217,164,65,.32);
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}

/* 出牌方向徽章（配合「掉转」道具）：顺时针金色 / 逆时针青色，一眼看出往哪走 */
.dir-chip {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; letter-spacing: .06em; font-weight: 700;
  border: 1px solid currentColor; vertical-align: 1px;
}
.dir-chip.cw  { color: #ffcf7a; background: rgba(255,207,122,.10); }
.dir-chip.ccw { color: #7ad7ff; background: rgba(122,215,255,.10); }

/* 日志 */
.log-panel {
  display: flex; flex-direction: column; min-height: 0;
  background: rgba(16,12,8,.72); border: 1px solid var(--line); border-radius: 14px; padding: 10px 4px 10px 12px;
}
.log-panel h3 { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .18em; color: var(--ink-3); font-weight: 600; }
.log-panel ul { list-style: none; margin: 0; padding: 0 10px 0 0; overflow-y: auto; flex: 1; font-size: 12px; line-height: 1.65; }
.log-panel li { padding: 3px 0 3px 9px; border-left: 2px solid transparent; color: var(--ink-2); }
.log-panel li.good { color: var(--good); border-left-color: rgba(87,201,138,.5); }
.log-panel li.bad { color: var(--bad); border-left-color: rgba(239,106,106,.5); }
.log-panel li.warn { color: var(--warn); border-left-color: rgba(229,185,60,.5); }
.log-panel li.round { color: var(--brass); border-left-color: rgba(217,164,65,.55); margin-top: 5px; }
.log-panel ul::-webkit-scrollbar { width: 5px; }
.log-panel ul::-webkit-scrollbar-thumb { background: rgba(217,164,65,.22); border-radius: 3px; }

/* ============================================================
   ③ 我的区域
   ============================================================ */
.myarea { display: flex; flex-direction: column; gap: 9px; }
.my-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.me-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.me-bar .name { font-weight: 800; font-size: 15px; }
.me-bar .hp { transform: scale(1.15); }
.actions { display: flex; gap: 8px; }
.actions .btn { padding: 10px 18px; font-size: 14px; }

.my-cards { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cards-block { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.block-label { font-size: 10.5px; color: var(--ink-3); letter-spacing: .12em; }
.block-label em { color: #5d4f3e; font-size: 10px; }
.hand, .items { display: flex; gap: 7px; flex-wrap: wrap; min-height: 84px; align-items: flex-end; }

/* ============================================================
   卡牌
   ============================================================ */
.card {
  width: 57px; height: 81px; flex: 0 0 auto; border-radius: 9px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden; user-select: none;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 3px 0 rgba(0,0,0,.55), 0 6px 16px rgba(0,0,0,.4);
  transition: transform .15s ease, box-shadow .2s;
}
.card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 28% 18%, rgba(255,255,255,.20), transparent 58%);
}
.card .c-glyph { font-size: 21px; line-height: 1; font-weight: 800; }
.card .c-name { font-size: 9.5px; letter-spacing: .1em; margin-top: 5px; opacity: .82; }

.card.c-red    { background: linear-gradient(160deg, #8f2329, #491013); color: #ffd9db; border-color: rgba(229,72,77,.42); }
.card.c-yellow { background: linear-gradient(160deg, #8a6712, #4a3708); color: #ffeeb8; border-color: rgba(230,179,37,.42); }
.card.c-blue   { background: linear-gradient(160deg, #22407f, #101f42); color: #d6e4ff; border-color: rgba(76,141,255,.42); }
.card.c-wild   { background: linear-gradient(135deg, #6b2f8f, #23408f 35%, #1f7a5a 62%, #8a5f16); color: #fff3ff; border-color: rgba(201,162,255,.6); }

.card.back {
  background: linear-gradient(160deg, #2c2118, #140f09);
  color: rgba(217,164,65,.55); border-color: rgba(217,164,65,.26);
}
.card.back .c-glyph { font-size: 25px; }
.card.back .c-name { font-size: 7.5px; letter-spacing: .22em; color: rgba(217,164,65,.42); }

.card.pick { cursor: pointer; }
.card.pick:hover { transform: translateY(-9px); }
.card.sel {
  transform: translateY(-15px);
  box-shadow: 0 0 0 2px var(--brass), 0 0 20px rgba(217,164,65,.5);
}
.card.mini { width: 44px; height: 62px; }
.card.mini .c-glyph { font-size: 16px; }
.card.mini .c-name { font-size: 8px; margin-top: 3px; }

/* 道具牌 */
.prop {
  width: 62px; height: 81px; flex: 0 0 auto; border-radius: 9px;
  background: linear-gradient(160deg, #2a2f3a, #14171e);
  border: 1px solid rgba(160,190,230,.26); color: #dbe6f6;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 3px 0 rgba(0,0,0,.5), 0 6px 16px rgba(0,0,0,.36);
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.prop .p-glyph {
  width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  background: rgba(160,190,230,.14); font-size: 13px; font-weight: 800; color: #cfe0f7;
}
.prop .p-name { font-size: 11px; letter-spacing: .08em; }
.prop.pick { cursor: pointer; }
.prop.pick:hover { transform: translateY(-7px); border-color: rgba(160,190,230,.75); box-shadow: 0 0 0 1px rgba(160,190,230,.5), 0 0 18px rgba(140,180,240,.28); }
.prop.dis { opacity: .38; }

/* 道具被「点选」（还没使用，等按确认按钮）—— 黄铜色高亮，和外层蓝灰区分开 */
.prop.sel-item {
  transform: translateY(-9px);
  border-color: var(--brass);
  box-shadow: 0 0 0 2px var(--brass), 0 0 22px rgba(217,164,65,.5);
}
.prop.sel-item .p-glyph { background: rgba(217,164,65,.22); color: #ffe6b3; }
.prop.sel-item::after {
  content: '已选'; position: absolute; left: 50%; top: -9px; transform: translateX(-50%);
  font-size: 9px; letter-spacing: .08em; color: #1b1206; background: var(--brass);
  padding: 1px 6px; border-radius: 4px; white-space: nowrap;
}
.prop { position: relative; }

/* 「使用道具」按钮：选中道具后变成醒目的金色，和其它按钮明显区分 */
.btn.use {
  background: linear-gradient(180deg, #d8a94a, #a97c26);
  border-color: #e8c273; color: #1b1206; font-weight: 700;
}
.item-tip {
  align-self: center; font-size: 11.5px; color: var(--ink-2);
  background: rgba(217,164,65,.09); border-left: 2px solid rgba(217,164,65,.5);
  padding: 3px 9px; border-radius: 0 5px 5px 0; max-width: 320px; line-height: 1.5;
}

/* ============================================================
   动效
   ============================================================ */
.fx-flash { animation: fxFlash .45s ease; }
@keyframes fxFlash { 0% { filter: brightness(2.4); } 100% { filter: brightness(1); } }
.fx-shake { animation: fxShake .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes fxShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
.fx-pop { animation: fxPop .32s cubic-bezier(.2,1.5,.4,1); }
@keyframes fxPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============================================================
   弹窗 / 提示
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(4,3,2,.76); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  position: relative; width: 100%; max-width: 430px; max-height: 86vh; overflow: auto;
  background: linear-gradient(180deg, #241b12, #150f09);
  border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.75);
  animation: fxPop .26s cubic-bezier(.2,1.4,.4,1);
}
.modal-x {
  position: absolute; top: 10px; right: 12px; width: 28px; height: 28px;
  border: none; background: transparent; color: var(--ink-3); font-size: 22px; line-height: 1;
}
.modal-x:hover { color: var(--ink); }
.modal-title { margin: 0 0 12px; font-size: 17px; letter-spacing: .1em; }
.modal-body { font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.modal-body h4 { margin: 15px 0 5px; font-size: 13px; color: var(--brass); letter-spacing: .08em; }
.modal-body ul { margin: 4px 0; padding-left: 19px; }
.modal-body li { margin: 3px 0; }
.modal-body b { color: var(--ink); }
.modal-body .kv { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.modal-foot { display: flex; gap: 9px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.reveal-row { display: flex; gap: 6px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.reveal-verdict { text-align: center; font-size: 14px; font-weight: 700; margin: 8px 0 2px; }
.reveal-verdict.true { color: var(--good); }
.reveal-verdict.false { color: var(--bad); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: rgba(12,9,6,.94); border: 1px solid rgba(217,164,65,.4); color: #ffe6b3;
  padding: 9px 18px; border-radius: 999px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s; z-index: 80; white-space: nowrap;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   窄屏
   ============================================================ */
@media (max-width: 900px) {
  .table-wrap { grid-template-columns: 1fr; }
  .log-panel { display: none; }
  .board { padding: 8px; }
  .card { width: 50px; height: 71px; }
  .card .c-glyph { font-size: 18px; }
  .prop { width: 55px; height: 71px; }
  .hand, .items { min-height: 74px; }
  .hud-box { padding: 5px 9px; }
  .turn-banner { font-size: 11px; }
  .seat { min-width: 108px; }
}

/* ============================================================
   ④ 开枪仪式 —— 「刺激感」与「狠」的全部来源
   画面：一把左轮从画面下方举起，枪口朝左上对着自己
         → 上膛（击锤后拉 + 弹巢转过一格）→ 死寂（手抖 + 心跳）
         → 定格（绝对静止、失声、视野收紧）→ 扣扳机
         → 后坐 / 冲击波 / 血溅 / 红闪 / 镜头推近
   ============================================================ */
.gun-stage {
  position: fixed; inset: 0; z-index: 85;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.gun-stage.hidden { display: none !important; }

/* 暗角：悬念期收拢，视野被压窄；定格期收到最紧 —— 压迫感就是这么来的 */
.gs-veil {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 46% 54%, rgba(0,0,0,.50) 0%, rgba(0,0,0,.94) 66%);
  backdrop-filter: blur(4px);
  transition: background .5s ease;
}
.gun-stage.suspense .gs-veil {
  background: radial-gradient(circle at 46% 54%, rgba(0,0,0,.20) 0%, rgba(0,0,0,.97) 38%);
}
.gun-stage.freeze .gs-veil {
  background: radial-gradient(circle at 42% 52%, rgba(0,0,0,.34) 0%, rgba(0,0,0,.99) 26%);
  transition: background .3s ease;
}

/* 揭晓闪光 */
.gs-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.gs-flash.blank { background: #eef6ff; animation: gsFlashBlank .32s ease-out; }
.gs-flash.live  { background: #fff2e0; animation: gsFlashLive .62s ease-out; }
@keyframes gsFlashBlank { 0% { opacity: .42; } 100% { opacity: 0; } }
@keyframes gsFlashLive {
  0% { opacity: 1; } 6% { opacity: .55; } 14% { opacity: .95; }
  40% { opacity: .30; } 100% { opacity: 0; }
}

/* ---------- 中央内容 ---------- */
.gs-core { position: relative; text-align: center; }
.gun-stage.raise .gs-core { animation: gsCoreIn .34s cubic-bezier(.2,1.3,.4,1); }
@keyframes gsCoreIn { 0% { transform: scale(.86); opacity: 0; } 100% { transform: none; opacity: 1; } }
.gun-stage.out .gs-core { transform: scale(.93); opacity: 0; transition: transform .28s ease, opacity .28s ease; }

.gs-label { font-size: 13px; letter-spacing: .18em; color: var(--ink-2); margin-bottom: 4px; }
.gs-label b { color: var(--brass); font-size: 18px; letter-spacing: .04em; }

/* ---------- 转盘（俯视左轮弹巢） ----------
 * 这是整场演出的主角。**为什么是转盘而不是画一把枪**，见 js/show.js 顶部的说明。
 * 分层：外层 .gs-gunwrap 管「升起 / 落下」
 *       中层 .gs-gun    管「心跳脉动 / 震屏」
 *       里层 .gs-cyl    单独管「旋转」
 * —— 三层各管一件事，动画才不会互相覆盖（同一元素上并行多个 transform 动画会打架）。 */
.gs-gunwrap { width: 300px; margin: 0 auto; }
.gun-stage.raise .gs-gunwrap { animation: gsRaise .44s cubic-bezier(.18,1.1,.35,1); }
@keyframes gsRaise {
  0%   { transform: translateY(150px) scale(.88); opacity: 0; }
  55%  { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.gun-stage.out .gs-gunwrap { transform: translateY(80px) scale(.94); opacity: 0; transition: transform .3s ease, opacity .3s ease; }

.gs-gun {
  position: relative; width: 240px; height: 240px; margin: 0 auto;
  filter: drop-shadow(0 18px 44px rgba(0,0,0,.8));
}

/* 固定的外圈 + 内圈 + 顶部指针 —— 它们**不**跟着弹巢转 */
.gs-frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gs-ring-outer { fill: none; stroke: #2b3038; stroke-width: 13; }
.gs-ring-inner { fill: none; stroke: #171b21; stroke-width: 2; }
.gs-pointer { fill: var(--brass); filter: drop-shadow(0 0 6px rgba(217,164,65,.8)); }

/* ---------- 会旋转的弹巢 ---------- */
.gs-cyl {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #454c56 0%, #23282f 42%, #0d1013 100%);
  box-shadow: inset 0 0 24px rgba(0,0,0,.9), 0 12px 40px rgba(0,0,0,.7);
  will-change: transform;
}
/* 弹巢中心的轴 */
.gs-cyl::after {
  content: ''; position: absolute; inset: 62px; border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, #3a414a, #14181d);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.85);
}

/* 弹槽：孔位 = 绕中心转 --a 度后，再往外推 56px。
   ⚠ 孔的宽度(34) + 推距(56) 不能乱调，两者要一起改 —— 34/2+56=73，
     必须小于弹巢半径(约 80)，否则孔会骑到内圈上去。 */
.gs-hole {
  position: absolute; left: 50%; top: 50%;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: radial-gradient(circle at 42% 36%, #2b3138, #07090b);
  box-shadow: inset 0 4px 8px rgba(0,0,0,.95), 0 1px 0 rgba(255,255,255,.08);
  transform: rotate(var(--a)) translateY(-56px);
  transition: background .18s, box-shadow .18s, opacity .18s;
}
/* 指针正下方这一格 */
.gs-hole.cur {
  box-shadow: inset 0 4px 8px rgba(0,0,0,.95), 0 0 0 3px var(--brass), 0 0 22px rgba(217,164,65,.75);
}
/* 已经打过的格 */
.gs-hole.fired { opacity: .32; }
/* 揭晓：真弹 */
.gs-hole.live {
  background: radial-gradient(circle at 42% 36%, #ff9a76, #9c1111 62%, #4a0505);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.85), 0 0 26px #ff4a2c, 0 0 60px rgba(255,74,44,.55);
}
/* 揭晓：空弹 */
.gs-hole.blank {
  background: radial-gradient(circle at 42% 36%, #59616b, #1a1e23);
  box-shadow: inset 0 4px 8px rgba(0,0,0,.95), 0 0 14px rgba(150,200,255,.28);
}

/* ---------- 枪口火光：真弹时从转盘正中心炸开 ---------- */
.gs-muzzle {
  position: absolute; left: 50%; top: 50%; width: 200px; height: 200px;
  margin: -100px 0 0 -100px; border-radius: 50%; opacity: 0; z-index: 6;
  background: radial-gradient(circle, #fff 0%, #ffdc93 22%, rgba(255,124,42,.72) 44%, transparent 70%);
  pointer-events: none;
}
.gun-stage.recoil .gs-muzzle { animation: gsMuzzle .5s ease-out; }
@keyframes gsMuzzle { 0% { opacity: 1; transform: scale(.45); } 100% { opacity: 0; transform: scale(1.6); } }

/* ---------- 死寂悬念：转盘像心脏一样一下一下地胀 ----------
 * 节奏由 JS 按「剩余真弹密度」调快慢（见 show.js 的 --beat）——
 * 真弹越多，脉动越快、金圈越亮，压迫感就越强。
 * 这比「手在抖」更有效：手抖是"紧张的人在动"，转盘脉动是"这东西在等你"。 */
.gun-stage.suspense .gs-gun { animation: gsBeat var(--beat, 1.15s) ease-in-out infinite; }
@keyframes gsBeat {
  0%, 100% { transform: scale(1); }
  11%      { transform: scale(1.05); }
  22%      { transform: scale(1); }
  34%      { transform: scale(1.032); }
  45%      { transform: scale(1); }
}
.gun-stage.suspense .gs-cyl {
  box-shadow: inset 0 0 24px rgba(0,0,0,.9), 0 12px 40px rgba(0,0,0,.7), 0 0 70px rgba(217,164,65,.14);
}
/* 「当前格」的金圈跟着一起脉动 —— 注意力就被锁死在指针底下那一格上了 */
.gun-stage.suspense .gs-hole.cur {
  animation: gsCurPulse var(--beat, 1.15s) ease-in-out infinite;
}
@keyframes gsCurPulse {
  0%, 100% { box-shadow: inset 0 4px 8px rgba(0,0,0,.95), 0 0 0 3px var(--brass), 0 0 22px rgba(217,164,65,.75); }
  50%      { box-shadow: inset 0 4px 8px rgba(0,0,0,.95), 0 0 0 4px var(--brass), 0 0 44px rgba(217,164,65,1); }
}

/* ---------- 真弹揭晓：转盘被后坐顶得一缩一张 ---------- */
.gun-stage.recoil .gs-gun { animation: gsKick .48s cubic-bezier(.2,.9,.3,1); }
@keyframes gsKick {
  0%   { transform: scale(1); }
  9%   { transform: scale(1.13) translateY(-6px); }   /* ★ 撞一下 */
  30%  { transform: scale(1.04) translateY(2px); }
  60%  { transform: scale(1.01); }
  100% { transform: scale(1); }
}

/* 原来的「枪下方一排弹槽小格」已删除 ——
   转盘本身就把 6 个弹槽排成一个圈了，再加一排是重复信息，反而分散注意力。 */

.gs-info { margin-top: 18px; font-size: 12.5px; color: var(--ink-3); letter-spacing: .06em; }
.gs-info b { color: var(--bad); font-size: 15px; }
.gs-info .chamber-left { color: var(--ink-2); }

/* ---------- 揭晓大字 ---------- */
.gs-verdict {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  font-size: 78px; font-weight: 900; letter-spacing: .1em; opacity: 0;
  pointer-events: none; white-space: nowrap;
}
.gs-verdict.blank {
  color: #8fe0ae; text-shadow: 0 0 40px currentColor;
  animation: gsVerdict .85s cubic-bezier(.2,1.4,.3,1);
}
.gs-verdict.live {
  color: #ff4a2c; font-size: 132px;
  text-shadow: 0 0 26px #fff, 0 0 60px #ff4a2c, 0 0 130px rgba(255,60,20,.85);
  animation: gsVerdictLive 1.15s cubic-bezier(.2,1.6,.3,1);
}
@keyframes gsVerdict {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(2.5); }
  28% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  74% { opacity: 1; transform: translate(-50%,-50%) scale(1.02); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.1); }
}
@keyframes gsVerdictLive {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(3.4); }
  14% { opacity: 1; transform: translate(-50%,-50%) scale(.94); }
  24% { transform: translate(-50%,-50%) scale(1.06); }
  34% { transform: translate(-50%,-50%) scale(1); }
  78% { opacity: 1; transform: translate(-50%,-50%) scale(1.03); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.35); }
}

/* ---------- 血溅 ---------- */
.gs-blood { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gs-blood i {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  background: #b80f18; opacity: 0;
  filter: blur(.6px);
}
.gs-blood.on i { animation: gsBlood 1.15s cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes gsBlood {
  0% { opacity: 1; transform: translate(-50%,-50%) scale(.3); }
  72% { opacity: .9; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(var(--sc)); }
}

/* 屏幕边缘的血：中枪后一段时间内一直在，压着你 */
.gs-bloodscreen { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.gs-bloodscreen.on { animation: gsBloodScr 2.1s ease-out forwards; }
@keyframes gsBloodScr {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  62%  { opacity: .85; }
  100% { opacity: 0; }
}
.gs-bloodscreen::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 78% 70% at 50% 50%, transparent 22%, rgba(160,8,8,.62) 72%, rgba(90,0,0,.94) 100%);
}
.gs-bloodscreen::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 30% 16% at 18% 0%, rgba(150,6,6,.9), transparent 70%),
    radial-gradient(ellipse 22% 22% at 78% 4%, rgba(150,6,6,.75), transparent 70%),
    radial-gradient(ellipse 26% 12% at 52% 96%, rgba(140,6,6,.8), transparent 70%);
  filter: blur(3px);
}

/* ---------- 震屏：只抖内容层，抖全屏层会露出边缘 ---------- */
.gun-stage.recoil .gs-core { animation: gsShake .78s cubic-bezier(.36,.07,.19,.97); }
@keyframes gsShake {
  0%, 100% { transform: translate(0,0) rotate(0deg); }
  6%  { transform: translate(-26px, 15px) rotate(-1.7deg); }
  13% { transform: translate(24px, -19px) rotate(1.5deg); }
  21% { transform: translate(-20px, -13px) rotate(-1.05deg); }
  30% { transform: translate(26px, 14px) rotate(1.25deg); }
  40% { transform: translate(-17px, 18px) rotate(-.85deg); }
  52% { transform: translate(18px, -13px) rotate(.95deg); }
  64% { transform: translate(-14px, 10px) rotate(-.62deg); }
  76% { transform: translate(11px, -7px) rotate(.45deg); }
  88% { transform: translate(-6px, 4px) rotate(-.2deg); }
}

.gs-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: #6b5d4c; letter-spacing: .14em;
  opacity: 0; transition: opacity .3s;
}
.gun-stage.suspense .gs-hint { opacity: 1; animation: gsHintPulse 1.4s ease-in-out infinite; }
@keyframes gsHintPulse { 0%,100% { opacity: .35 } 50% { opacity: .85 } }

/* 截图/调试用：把所有动画钉住 */
.gun-stage.anim-paused *,
.gun-stage.anim-paused *::before,
.gun-stage.anim-paused *::after { animation-play-state: paused !important; }

/* ============================================================
   濒死压力：只剩 1 点血时，全屏红色暗角持续脉动
   ============================================================ */
body.deadly::after {
  content: ''; position: fixed; inset: 0; z-index: 50; pointer-events: none;
  box-shadow: inset 0 0 190px 44px rgba(180, 22, 22, .55);
  animation: deadlyPulse 1.45s ease-in-out infinite;
}
@keyframes deadlyPulse { 0%, 100% { opacity: .40; } 50% { opacity: .88; } }

/* 生命值扣减时的抖动 */
.hp.hurt { animation: hpHurt .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes hpHurt {
  0%, 100% { transform: translateX(0) scale(1); }
  20% { transform: translateX(-5px) scale(1.25); }
  40% { transform: translateX(5px) scale(1.15); }
  60% { transform: translateX(-3px) scale(1.1); }
  80% { transform: translateX(2px) scale(1.05); }
}

/* 换枪时 HUD 里的弹巢转一圈 */
.cylinder.spin { animation: cylSpin .72s cubic-bezier(.3,1,.4,1); }
@keyframes cylSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* 座位上的信誉档案（公开信息：被亮牌抓过几次谎 / 被冤过几次） */
.seat-rep { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.seat-rep span { font-size: 9.5px; padding: 1px 5px; border-radius: 4px; letter-spacing: .03em; white-space: nowrap; }
.rep-lie { background: rgba(229,72,77,.16); color: #f0938f; }
.rep-true { background: rgba(87,201,138,.14); color: #86d3a6; }

/* 真牌盒子：被当前真牌的颜色染色，换牌时平滑过渡 */
.target-box { transition: border-color .45s ease, background .45s ease; }
.target-box .swatch { font-size: 22px; }
.target-box .swatch-name { font-size: 15px; }

/* 桌面正上方的「当前声称」大徽章 —— 一眼看清现在在赌什么 */
.pile-claim {
  display: none; align-items: center; gap: 7px;
  font-size: 13.5px; color: var(--ink-2); letter-spacing: .04em;
  background: rgba(10,8,5,.78); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 16px;
}
.pile-claim.on { display: flex; animation: claimIn .3s cubic-bezier(.2,1.3,.4,1); }
.pile-claim i { font-style: normal; font-size: 15px; }
.pile-claim b { font-weight: 800; }
.claim-tip { font-size: 11px; color: #6b5d4c; letter-spacing: .1em; }
@keyframes claimIn { from { opacity: 0; transform: translateY(7px) scale(.94); } to { opacity: 1; transform: none; } }

/* ============================================================
   联机大厅（js/net.js 动态生成，单机版用不到）
   z-index 比开枪演出（85）高：大厅只在开局前显示，开局后整个藏起来，
   两者不会同时出现，但留点余量更保险。
   ============================================================ */
.net-stage {
  position: fixed; inset: 0; z-index: 95;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.net-stage.hidden { display: none !important; }

/* 大厅里也能看规则：.net-stage 是 95，普通弹窗(60)会被盖住，
   从大厅打开的弹窗加 .ontop 抬到它上面 */
.modal-mask.ontop { z-index: 120; }

/* 大厅首页的「规则说明」入口：做成虚线框的安静按钮，
   不跟「创建房间 / 加入房间」抢视觉，但一眼能看到 */
.net-rules-link {
  display: block; width: 100%;
  margin-top: 12px; padding: 10px;
  background: none;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 12.5px; letter-spacing: .1em;
  font-family: inherit; cursor: pointer;
  transition: border-color .18s, color .18s;
}
.net-rules-link:hover {
  border-color: var(--brass);
  color: var(--brass);
}

.net-veil {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(0,0,0,.55) 0%, rgba(0,0,0,.95) 68%);
  backdrop-filter: blur(3px);
}

.net-box {
  position: relative; width: 100%; max-width: 380px;
  background: rgba(18,14,10,.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px 22px;
  box-shadow: 0 26px 70px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.05);
  animation: netIn .34s cubic-bezier(.2,1.25,.4,1);
}
@keyframes netIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

.net-brand { text-align: center; margin-bottom: 22px; }
.net-brand h1 {
  margin: 0; font-size: 26px; letter-spacing: .16em; color: var(--brass);
  text-shadow: 0 0 22px rgba(217,164,65,.35);
}
.net-brand p {
  margin: 6px 0 0; font-size: 10px; letter-spacing: .26em;
  color: var(--ink-3); text-transform: uppercase;
}

.net-pane.hidden { display: none; }

.net-field { margin-bottom: 16px; }
.net-field label {
  display: block; font-size: 11.5px; letter-spacing: .14em;
  color: var(--ink-3); margin-bottom: 7px;
}

.net-input {
  width: 100%; box-sizing: border-box;
  background: rgba(0,0,0,.42);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  color: #f3ead9; font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.net-input:focus {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(217,164,65,.16);
}
/* ⚠ placeholder 必须显式设色。
   不设的话用的是浏览器默认深灰 rgb(117,117,117)，
   叠在这种近黑底上对比度只有 4.3:1 —— 亮屏勉强能看，暗屏/手机上很费劲。
   （注意：input 的 color 不影响 placeholder，得单独写 ::placeholder） */
.net-input::placeholder {
  /* 透明度定在 .55：这是实算出来的。
     placeholder 是半透明的，真正显示的颜色 = 自身色 × α + 底色 × (1-α)。
     .42 时实际只有 rgb(108,103,95)，对比度 3.3:1（勉强够大字）；
     .55 时是 rgb(138,132,124)，对比度 5.3:1，超过 WCAG AA 的 4.5:1。 */
  color: rgba(243, 234, 217, .55);
  letter-spacing: .04em;   /* 别跟着房间号的大字距走，否则显得被扯开 */
}

/* 房间号输入框：联机最核心的一步操作，做得又大又醒目。
   字号 24px 是照着「一眼就能看见」定的；字距刻意压到 .18em ——
   之前用 .3em 时，placeholder「输入 4 位房间号」要 126px 宽，
   小屏上会被裁掉半截。 */
.net-input-code {
  letter-spacing: .18em;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  padding: 14px 13px;
  text-transform: uppercase;
}

.net-row { display: flex; gap: 9px; align-items: stretch; }
.net-row .net-input { flex: 1; min-width: 0; }
/* ⚠ .btn.big 带 width:100%，放进 flex 行里 flex-basis:auto 会解析成整行宽，
   把同行的输入框挤成一条缝（踩过：输入框只剩 28px）。
   这里强制回 auto —— 谁再往 .net-row 里塞 .big 按钮也不会挤坏同行元素。 */
.net-row .btn { flex: 0 0 auto; width: auto; white-space: nowrap; }

.net-or {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--ink-3); font-size: 11px;
}
.net-or::before, .net-or::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.net-hint {
  margin: 14px 0 0; font-size: 11.5px; line-height: 1.7;
  color: var(--ink-3); text-align: center; letter-spacing: .04em;
}

/* ---- 房间等待 ---- */
.net-code-wrap {
  display: flex; align-items: center; gap: 10px;
  justify-content: center; margin-bottom: 20px;
}
.net-code-label { font-size: 11.5px; color: var(--ink-3); letter-spacing: .14em; }
.net-code {
  font-size: 30px; font-weight: 900; letter-spacing: .22em;
  color: var(--brass); text-shadow: 0 0 20px rgba(217,164,65,.4);
  padding-left: .22em;   /* 补掉最后一个字的 letter-spacing，视觉才居中 */
}

.net-players { list-style: none; margin: 0 0 4px; padding: 0; }
.net-players li {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; margin-bottom: 7px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  font-size: 14px; color: #eadfcc;
  animation: npIn .26s ease;
}
@keyframes npIn { from { opacity: 0; transform: translateX(-7px); } to { opacity: 1; transform: none; } }
.net-players li.is-host { border-color: rgba(217,164,65,.4); background: rgba(217,164,65,.07); }
.net-players li.np-empty { opacity: .34; border-style: dashed; }

.np-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #57c98a; box-shadow: 0 0 9px rgba(87,201,138,.7);
  flex: 0 0 auto;
}
.np-empty .np-dot { background: #4a4438; box-shadow: none; }
.np-name { flex: 1; }
.np-tag {
  font-size: 10px; padding: 2px 7px; border-radius: 5px;
  background: rgba(217,164,65,.18); color: var(--brass);
  letter-spacing: .06em;
}
.np-tag.me { background: rgba(255,255,255,.1); color: var(--ink-2); }

.net-actions { margin-top: 18px; }
.net-actions .btn { flex: 1; }
.net-actions .btn:disabled { opacity: .4; cursor: not-allowed; }

.net-wait {
  text-align: center; font-size: 13.5px; color: var(--ink-2);
  letter-spacing: .06em; line-height: 1.9; padding: 18px 0;
}

/* ============================================================
   ⑤ 规则说明（规则图）
   ------------------------------------------------------------
   规则内容**直接用设计好的整张规则图** assets/rules.jpg，
   不再维护一份 HTML 文字版 —— 图和代码两处写同一套数字很容易漂移
   （牌数就曾经对不上一次）。图统一放在 assets/ 下。
   展示：等比缩放、整张一次看完（高度不超过 68vh），点图看原图。
   ⚠ 图是「死文本」：以后改了 CFG.DECK / START_HAND / 道具表，
     记得同步让规则图跟着改，否则规则页会和实际配置对不上。
   ============================================================ */
.modal.modal-wide { max-width: 620px; }

.rules-poster { text-align: center; }
.rules-poster img {
  display: block; margin: 0 auto;
  width: auto; height: auto;
  max-width: 100%; max-height: 68vh;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
  cursor: zoom-in;
}
.rules-poster .rp-hint {
  margin: 10px 0 0; font-size: 12px;
  color: var(--ink-3); letter-spacing: .05em;
}
.rules-poster .rp-hint a { color: var(--brass); }



