* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}
body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background: #ededed;
  color: #191919;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
}
.hidden { display: none !important; }

/* ==================== 1. 微信风格顶栏 ==================== */
.topbar-compact {
  background: #ededed;
  border-bottom: 1px solid #dcdcdc;
  padding-top: max(8px, env(safe-area-inset-top, 0px));
  padding-bottom: 6px;
  padding-left: max(12px, env(safe-area-inset-left, 12px));
  padding-right: max(12px, env(safe-area-inset-right, 12px));
  flex-shrink: 0;
  z-index: 30;
}
@media (max-width: 600px) {
  .topbar-compact {
    padding-top: max(38px, env(safe-area-inset-top, 38px));
  }
}
.top-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 32px;
}
.top-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
}
.top-title {
  font-size: 15px;
  font-weight: 700;
  color: #191919;
  letter-spacing: 0.5px;
  user-select: none;
}
.top-count {
  font-size: 11px;
  color: #737373;
}

/* 8人微型两排网格（紧跟标题，从左向右排，在手机屏幕上完整展示） */
.top-player-grid {
  display: grid;
  grid-template-rows: repeat(2, 14px);
  grid-auto-flow: column;
  gap: 3px 5px;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 32px;
  scrollbar-width: none;
}
.top-player-grid::-webkit-scrollbar { display: none; }

.player-micro-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 14px;
  line-height: 14px;
  font-size: 10px;
  padding: 0 4px;
  border-radius: 3px;
  max-width: 60px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  user-select: none;
  background: #ffffff;
  border: 1px solid #d5d5d5;
  color: #333333;
  flex-shrink: 0;
}
.player-micro-badge:hover { border-color: #6366f1; color: #4f46e5; }
.player-micro-badge .badge-name { overflow: hidden; text-overflow: ellipsis; }

.conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}
.conn-dot.disconnected {
  background: #fa5151;
  box-shadow: 0 0 6px rgba(250, 81, 81, 0.6);
}

/* 顶栏控制按钮：单排紧凑平铺，绝不折叠换行 */
.top-ctrl-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 5px;
  border-top: 1px dashed #d5d5d5;
  margin-top: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.top-ctrl-bar::-webkit-scrollbar { display: none; }

.btn-ctrl {
  cursor: pointer;
  border: 1px solid #c9c9c9;
  background: #f7f7f7;
  color: #191919;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 600;
  height: 25px;
  line-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
  user-select: none;
  transition: all .15s;
}
.btn-ctrl:hover { opacity: .9; }
.btn-ctrl.start-btn {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: #4338ca;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.25);
}
.btn-ctrl.share-btn {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  border-color: #0369a1;
  color: #ffffff;
  font-weight: 700;
}
.btn-ctrl.gold-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #b45309;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.25);
}
.btn-ctrl.danger-btn {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
  font-weight: 700;
}
.btn-ctrl.gray-btn {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
  font-weight: 600;
}

/* ==================== 2. 大厅登录面板（填名字选头像） ==================== */
.panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ededed;
}
.lobby-in {
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  padding: 20px;
  max-width: 440px;
  margin: 16px auto;
  width: 90%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
@media (max-width: 600px) {
  .lobby-in {
    margin-top: max(36px, env(safe-area-inset-top, 36px));
  }
}
.lobby-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; color: #191919; text-align: center; }

/* 头像选择与预览卡片 */
.avatar-select-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.avatar-preview-wrap { flex-shrink: 0; }
.avatar-preview-box {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  user-select: none;
}
.avatar-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-action-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.btn-avatar-upload {
  display: inline-block;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}
.btn-avatar-reset {
  cursor: pointer;
  background: #ffffff;
  border: 1px solid #d5d5d5;
  color: #4b5563;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
}

#nameInput {
  width: 100%; padding: 10px 12px; border-radius: 6px;
  border: 1px solid #dcdcdc; background: #fafafa; color: #191919; font-size: 14px;
}
.btn {
  cursor: pointer; border: none; border-radius: 6px; padding: 9px 14px; font-size: 14px; font-weight: 600;
  margin-top: 10px; transition: opacity .15s; width: 100%; text-align: center;
}
.btn.primary { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; box-shadow: 0 1px 4px rgba(79, 70, 229, 0.3); }
.btn.small { padding: 5px 10px; margin-top: 0; font-size: 12px; width: auto; }
.btn.gold { background: #eab308; color: #000; }
.lobby-status { font-size: 12px; color: #888888; margin-top: 8px; text-align: center; }
.player-list { margin-top: 14px; }
.list-title { font-size: 12px; color: #737373; margin-bottom: 6px; }
#playerList { list-style: none; margin: 0; padding: 0; max-height: 160px; overflow-y: auto; }
#playerList li { padding: 5px 0; border-bottom: 1px dashed #e5e5e5; font-size: 13px; display: flex; justify-content: space-between; color: #333; }
.tag { font-size: 10px; color: #4f46e5; border: 1px solid rgba(79, 70, 229, 0.4); border-radius: 3px; padding: 0 4px; }
.hint { font-size: 11px; color: #888888; margin-top: 6px; }
.agent-links { margin-top: 14px; border-top: 1px dashed #e5e5e5; padding-top: 10px; }
.agent-links .row { display: flex; gap: 6px; margin-top: 4px; }
.agent-links .row input { flex: 1; padding: 6px 8px; border-radius: 5px; border: 1px solid #dcdcdc; background: #fff; color: #191919; font-size: 13px; }
#seatLinks { list-style: none; margin: 8px 0 0; padding: 0; }
.seat-item { padding: 8px; border: 1px solid #e5e5e5; border-radius: 6px; margin-bottom: 8px; background: #fafafa; font-size: 11px; color: #333; }
.seat-item .seat-name { font-weight: 700; color: #191919; margin-bottom: 2px; }
.seat-item .url { color: #0284c7; word-break: break-all; margin-bottom: 4px; }
.copy-btn { cursor: pointer; border: 1px solid #d5d5d5; background: #ffffff; color: #333; border-radius: 4px; padding: 3px 8px; font-size: 11px; }

/* ==================== 3. 微信群聊核心高保真视图 ==================== */
.cr-box {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ededed;
  position: relative;
}
.chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 微信居中时间戳 */
.wx-time-stamp {
  align-self: center;
  background: rgba(0, 0, 0, 0.07);
  color: #8c8c8c;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  user-select: none;
  margin: 2px 0;
}
.wx-sys-notice {
  align-self: center;
  font-size: 12px;
  color: #8c8c8c;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 10px;
  border-radius: 4px;
  text-align: center;
  max-width: 90%;
}

/* 微信消息行 */
.wx-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 88%;
}

/* 他人消息（左侧） */
.wx-msg-left {
  align-self: flex-start;
}
/* 自己消息（右侧） */
.wx-msg-right {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* 微信头像：方形圆角 40x40 */
.wx-avatar-box {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wx-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* AI 纯色底色方块写名字 */
.wx-avatar-color {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  line-height: 1.1;
  padding: 2px;
  word-break: break-all;
}

/* 内容区域 */
.wx-content-wrap {
  display: flex;
  flex-direction: column;
}
.wx-msg-left .wx-content-wrap { align-items: flex-start; }
.wx-msg-right .wx-content-wrap { align-items: flex-end; }

/* 发言人昵称：在头像旁边小字清晰呈现 */
.wx-nickname {
  font-size: 11.5px;
  color: #737373;
  margin-bottom: 4px;
  line-height: 1.2;
  user-select: none;
}
.wx-msg-left .wx-nickname {
  text-align: left;
  margin-left: 2px;
}
.wx-msg-right .wx-nickname {
  text-align: right;
  margin-right: 2px;
}

/* 微信聊天气泡 */
.wx-bubble {
  position: relative;
  padding: 9px 12px;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  max-width: 100%;
}

/* 他人气泡（纯白） */
.wx-bubble-white {
  background: #ffffff;
  color: #191919;
}
.wx-bubble-white::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 13px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 6px solid #ffffff;
}

/* 自己气泡：高贵典雅蓝紫 / 浅天青（彻底告别微信绿） */
.wx-bubble-me,
.wx-bubble-blue,
.wx-bubble-green {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.28);
}
.wx-bubble-me::before,
.wx-bubble-blue::before,
.wx-bubble-green::before {
  content: '';
  position: absolute;
  right: -5px;
  top: 13px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid #4f46e5;
}

/* 微信群聊截图 1:1 文件卡片样式 */
.wx-file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 240px;
  background: #ffffff;
  text-decoration: none;
  color: #191919;
}
.wx-file-meta {
  flex: 1;
  overflow: hidden;
}
.wx-file-name {
  font-size: 14px;
  font-weight: 600;
  color: #191919;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.wx-file-sub {
  font-size: 11.5px;
  color: #8c8c8c;
}
.wx-file-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: #fff8e6;
  border: 1px dashed #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

/* 微信图片展示 */
.wx-img-wrap {
  border-radius: 4px;
  overflow: hidden;
  display: block;
}
.wx-img {
  max-width: 220px;
  max-height: 220px;
  display: block;
  border-radius: 4px;
}

/* 微信原生风格底部打字输入栏 */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f7f7f7;
  border-top: 1px solid #dcdcdc;
  position: relative;
  flex-shrink: 0;
}
.btn-attach {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#chatRoomInput {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid #e2e2e2;
  background: #ffffff;
  color: #191919;
  font-size: 15px;
}
#chatRoomInput:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}
.btn-send {
  height: 34px;
  padding: 0 16px;
  border-radius: 6px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.28);
  transition: all 0.2s;
}
.btn-send:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
}

/* 📎 弹出面板 */
.quick-popover {
  position: absolute;
  bottom: 52px;
  left: 8px;
  width: min(340px, calc(100vw - 16px));
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 60;
  padding: 8px;
}
.pop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.pop-tabs { display: flex; gap: 4px; }
.pop-tab {
  cursor: pointer; border: none; background: none; color: #737373; font-size: 12px;
  padding: 3px 8px; border-radius: 4px;
}
.pop-tab.active { background: #eef2ff; color: #4f46e5; font-weight: 600; }
.pop-close { cursor: pointer; border: none; background: none; color: #737373; font-size: 16px; }
.pop-pane { min-height: 60px; max-height: 150px; overflow-y: auto; }
.pop-chips-wrap { display: flex; flex-wrap: wrap; gap: 5px; }
.pop-chip {
  cursor: pointer; padding: 4px 8px; border-radius: 4px; border: 1px solid #e0e0e0;
  background: #fafafa; color: #191919; font-size: 11.5px;
}
.pop-chip:hover { border-color: #6366f1; color: #4f46e5; }
.pop-emojis-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.pop-emoji-btn { cursor: pointer; background: none; border: none; font-size: 20px; padding: 2px 4px; }
.pop-file-upload-btn {
  display: block; text-align: center; padding: 14px 10px; border: 1px dashed #6366f1;
  border-radius: 6px; color: #4f46e5; font-size: 13px; cursor: pointer; background: #eef2ff;
}

/* ==================== 4. 沉浸式游戏舞台（左右分列） ==================== */
.game-stage {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 25%, #182230 0%, #0a0d12 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 40;
}

/* 舞台顶栏：针对手机灵动岛与刘海屏专门做安全下移留白 */
.stage-topbar {
  height: auto;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 6px;
  background: rgba(16, 22, 30, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .stage-topbar {
    padding-top: max(44px, env(safe-area-inset-top, 44px));
    padding-bottom: 8px;
  }
}
.stage-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.stage-badge-round { font-weight: 700; color: #f59e0b; }
.stage-score-line { color: #94a3b8; }
.stage-role-tag {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.stage-host-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stage-host-actions::-webkit-scrollbar { display: none; }

.btn-stage-return {
  cursor: pointer;
  background: #b91c1c;
  border: 1px solid #ef4444;
  color: #fee2e2;
  font-size: 11.5px;
  font-weight: 700;
  padding: 0 8px;
  height: 25px;
  line-height: 25px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  user-select: none;
  transition: all .15s;
}
.btn-stage-return:hover { background: #dc2626; }

/* 主对战竞技场（左右分列席位） */
.stage-arena {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  padding: 6px 4px;
  gap: 4px;
  align-items: stretch;
}

/* 左右席位列（一边3~4人） */
.stage-col {
  width: 76px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 6px;
  flex-shrink: 0;
  z-index: 10;
}

/* 每个玩家席位卡片 */
.stage-seat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(22, 30, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 5px 3px;
  position: relative;
  transition: all .25s ease;
  user-select: none;
}
.stage-seat-card .seat-avatar-box {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.stage-seat-card .seat-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stage-seat-card .seat-name {
  font-size: 10.5px;
  color: #cbd5e1;
  max-width: 68px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  font-weight: 600;
}
.stage-seat-card .seat-role-hint {
  font-size: 9px;
  color: #94a3b8;
  line-height: 1;
  margin-top: 1px;
}
.stage-seat-card .badge-leader {
  position: absolute;
  top: -6px;
  left: 2px;
  font-size: 13px;
  filter: drop-shadow(0 1px 2px #000);
}
.stage-seat-card .badge-team {
  position: absolute;
  top: -4px;
  right: 2px;
  font-size: 11px;
  background: rgba(239, 68, 68, 0.2);
  border-radius: 3px;
}

/* 🌟 当前发言人头像放大 + 呼吸缩放闪烁 */
.stage-seat-card.is-speaker {
  border-color: #f59e0b !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(180, 83, 9, 0.5) 100%) !important;
  transform: scale(1.18) !important;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.95), inset 0 0 14px rgba(254, 240, 138, 0.6) !important;
  animation: speakerPulseBreath 1.3s infinite alternate ease-in-out !important;
  z-index: 25 !important;
}

@keyframes speakerPulseBreath {
  0% {
    transform: scale(1.14);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.7), inset 0 0 8px rgba(254, 240, 138, 0.4);
  }
  100% {
    transform: scale(1.26);
    box-shadow: 0 0 32px rgba(245, 158, 11, 1), inset 0 0 18px rgba(254, 240, 138, 0.8);
  }
}

/* 🚫 禁止发言的人：卡片暗化 + 头像正中央红圈斜杠明确标识 */
.stage-seat-card.is-forbidden-speaker {
  opacity: 0.48;
  filter: grayscale(30%);
  position: relative;
}

.forbidden-speak-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: rgba(220, 38, 38, 0.85);
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ffffff;
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  animation: forbiddenPop 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes forbiddenPop {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* 👑 队长挑选时：队长头像底色变为金色并闪烁脉冲 */
.stage-seat-card.is-leader-active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.5) 0%, rgba(180, 83, 9, 0.7) 100%) !important;
  border: 2px solid #fef08a !important;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.9), inset 0 0 14px rgba(254, 240, 138, 0.5) !important;
  animation: leaderGoldGlow 1.4s infinite alternate ease-in-out !important;
  z-index: 22 !important;
}

@keyframes leaderGoldGlow {
  0% { transform: scale(1.05); box-shadow: 0 0 14px rgba(245, 158, 11, 0.6); }
  100% { transform: scale(1.15); box-shadow: 0 0 28px rgba(254, 240, 138, 1), inset 0 0 16px rgba(254, 240, 138, 0.8); }
}

/* 🛡️ 队长选定的队员：金色光芒缠绕闪烁动效 */
.stage-seat-card.team-picked-glow {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.28) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.9), inset 0 0 10px rgba(254, 240, 138, 0.5) !important;
  animation: teamPickedTwinkle 1.2s infinite alternate ease-in-out !important;
  z-index: 21 !important;
}

@keyframes teamPickedTwinkle {
  0% { transform: scale(1.02); filter: brightness(1); }
  100% { transform: scale(1.08); filter: brightness(1.25); box-shadow: 0 0 26px rgba(245, 158, 11, 1); }
}

/* 中央核心舞台 */
.stage-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  padding: 0 4px;
}

/* 横向单排圆圈棋盘 */
.quest-row-single {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 4px 0 6px;
  width: 100%;
  max-width: 320px;
}
.q-circle {
  flex: 1;
  max-width: 58px;
  height: 28px;
  border-radius: 14px;
  border: 1px solid #33404d;
  background: #1a222c;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  user-select: none;
}
.q-circle.current {
  border-color: #f59e0b;
  background: #2b2210;
  color: #fef08a;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}
.q-circle.success { border-color: #10b981; background: #064e3b; color: #6ee7b7; }
.q-circle.fail { border-color: #ef4444; background: #7f1d1d; color: #fca5a5; }

/* 实时等待表决与出牌进度条 */
.stage-pending-vote-bar {
  background: rgba(254, 243, 199, 0.95);
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11.5px;
  color: #b45309;
  text-align: center;
  font-weight: 600;
  margin: 4px auto 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  max-width: 95%;
  line-height: 1.35;
}

/* 中央主展示区（大字幕 + 引出气泡） */
.stage-main-display {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 120px;
}

/* 居中流程大字幕提示卡 */
.stage-flow-notice {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #f59e0b;
  color: #fef08a;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  animation: flowFade .3s ease-out;
  margin-bottom: 6px;
  max-width: 95%;
}
@keyframes flowFade {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ==================== 🗨️ 3D拟物白色泡泡聊天框（还原用户参考图，小三角形精准指向发言人） ==================== */
.stage-bubble-wrap {
  width: 95%;
  max-width: 320px;
  position: relative;
  z-index: 30;
  animation: bubbleFloat 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bubbleFloat {
  0% { opacity: 0; transform: scale(0.8) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.stage-bubble-box {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 22px;
  padding: 12px 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.18), inset 0 2px 4px rgba(255, 255, 255, 0.9);
  position: relative;
  color: #0f172a;
}

.stage-bubble-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
}

.speaker-avatar-wrap {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.speaker-name {
  font-weight: 800;
  color: #0284c7;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.speaking-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: #d97706;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: auto;
}

.stage-bubble-content {
  font-size: 14.5px;
  line-height: 1.5;
  color: #1e293b;
  word-break: break-word;
  font-weight: 600;
}

/* 三角形圆润小尾巴（对准发言人头像） */
.stage-bubble-pointer {
  position: absolute;
  width: 0;
  height: 0;
  bottom: -13px;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.15));
}

.stage-bubble-pointer.pointer-left {
  left: 28px;
  border-left: 10px solid transparent;
  border-right: 14px solid transparent;
  border-top: 15px solid #ffffff;
}

.stage-bubble-pointer.pointer-right {
  right: 28px;
  border-left: 14px solid transparent;
  border-right: 10px solid transparent;
  border-top: 15px solid #ffffff;
}

/* ==================== ⚡ 金色连线动效 SVG 画布 ==================== */
.stage-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 18;
}

.golden-beam-line {
  stroke: #f59e0b;
  stroke-width: 3.5;
  stroke-linecap: round;
  fill: none;
  filter: drop-shadow(0 0 8px #fef08a) drop-shadow(0 0 16px rgba(245, 158, 11, 0.8));
  stroke-dasharray: 8 4;
  animation: flowGoldLine 0.8s linear infinite;
}

@keyframes flowGoldLine {
  0% { stroke-dashoffset: 24; }
  100% { stroke-dashoffset: 0; }
}

/* ==================== 👑 环节仪式大卡片（队长挑选 / 开始投票） ==================== */
.stage-ceremony-overlay {
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 32px rgba(245, 158, 11, 0.5);
  z-index: 35;
  width: 90%;
  max-width: 330px;
  animation: modalPop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.ceremony-badge {
  font-size: 11px;
  font-weight: 800;
  color: #fef08a;
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.5);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 6px;
}

.ceremony-title {
  font-size: 24px;
  font-weight: 900;
  color: #fef08a;
  letter-spacing: 2px;
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.8);
  margin-bottom: 10px;
}

.ceremony-countdown-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.ceremony-countdown-num {
  width: 48px;
  height: 48px;
  line-height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.9);
  animation: pulseCountdown 1s infinite alternate;
}

@keyframes pulseCountdown {
  0% { transform: scale(1); box-shadow: 0 0 14px rgba(239, 68, 68, 0.7); }
  100% { transform: scale(1.2); box-shadow: 0 0 28px rgba(239, 68, 68, 1); }
}

.ceremony-detail {
  font-size: 13.5px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.45;
}

/* ==================== 🎴 牌桌发牌与翻牌动效容器（极简紧凑桌面） ==================== */
.stage-card-table {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(59, 130, 246, 0.5);
  border-radius: 8px;
  padding: 4px 8px;
  width: auto;
  max-width: 96%;
  z-index: 24;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.2s ease-out;
  backdrop-filter: blur(4px);
}

.card-table-title {
  font-size: 10px;
  font-weight: 700;
  color: #93c5fd;
  text-align: center;
  margin-bottom: 3px;
  letter-spacing: 0.3px;
}

.card-table-slots {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 2px 0;
}

.card-item-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.card-player-name {
  font-size: 9.5px;
  font-weight: 700;
  color: #cbd5e1;
  max-width: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* 单张卡牌（紧凑微型扑克 26x38px） */
.poker-card {
  width: 26px;
  height: 38px;
  perspective: 400px;
  cursor: default;
}

.poker-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.poker-card.flipped .poker-card-inner {
  transform: rotateY(180deg);
}

.poker-card-front, .poker-card-back {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 牌背：暗色金边神秘魔法花纹 */
.poker-card-back {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #f59e0b;
  color: #fef08a;
  font-size: 13px;
  box-shadow: inset 0 0 4px rgba(245, 158, 11, 0.4);
}

/* 牌面：翻出赞成或反对 */
.poker-card-front {
  transform: rotateY(180deg);
  font-size: 10px;
  font-weight: 900;
  border: 1px solid transparent;
}

.poker-card-front.is-yes {
  background: #064e3b;
  border-color: #10b981;
  color: #6ee7b7;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.poker-card-front.is-no {
  background: #7f1d1d;
  border-color: #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

/* 卡牌下方的选择结果标签 */
.card-result-badge {
  font-size: 8.5px;
  font-weight: 800;
  padding: 0 3px;
  border-radius: 2px;
  white-space: nowrap;
  animation: fadeIn 0.25s;
}
.card-result-badge.result-yes {
  background: #065f46;
  color: #34d399;
  border: 1px solid #10b981;
}
.card-result-badge.result-no {
  background: #991b1b;
  color: #f87171;
  border: 1px solid #ef4444;
}
.card-result-badge.result-wait {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #475569;
}

.card-table-stats {
  margin-top: 4px;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #fef08a;
  animation: fadeIn 0.3s;
}

/* 中央选人与行动浮层（最高交互优先级，独占中央核心） */
.stage-propose-box, .stage-action-box {
  background: rgba(15, 23, 42, 0.98);
  border: 1.5px solid #f59e0b;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.85), 0 0 20px rgba(245, 158, 11, 0.25);
  width: 92%;
  max-width: 310px;
  text-align: center;
  z-index: 45;
  backdrop-filter: blur(8px);
  animation: modalPop 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.propose-title, .stage-action-title { font-size: 13px; font-weight: 700; color: #fef08a; margin-bottom: 8px; }
.propose-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 8px; }
.propose-chip {
  cursor: pointer; padding: 5px 10px; border-radius: 6px; border: 1px solid #33404d;
  background: #1f2834; color: #cbd5e1; font-size: 12px; font-weight: 600;
}
.propose-chip.selected { border-color: #f59e0b; background: rgba(245, 158, 11, 0.3); color: #fef08a; font-weight: 800; }
.stage-action-buttons { display: flex; gap: 12px; justify-content: center; }

/* 舞台底部：历史聊天翻阅小框 + 交互打字栏 */
.stage-bottom-wrap {
  display: flex;
  flex-direction: column;
  background: #111720;
  border-top: 1px solid #222d3b;
  flex-shrink: 0;
}
/* ==================== 历史全景战报流（平滑缓慢上移 + 向上滑回溯） ==================== */
@keyframes slideUpSmooth {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  40% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.stage-history-box {
  height: 30px;
  padding: 3px 10px;
  background: rgba(12, 17, 25, 0.96);
  display: flex;
  flex-direction: column;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.stage-history-box.expanded {
  height: 140px;
}

.history-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  flex-shrink: 0;
  height: 24px;
}

.history-label {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.3px;
  user-select: none;
}

/* 向上滑回溯时浮现的最新消息药丸按钮 */
.history-scroll-bottom-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.6);
  animation: pulsePill 1.6s infinite ease-in-out;
  transition: all 0.2s;
}

.history-scroll-bottom-btn:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: translateY(-1px);
}

@keyframes pulsePill {
  0% { transform: scale(1); box-shadow: 0 2px 6px rgba(37, 99, 235, 0.5); }
  50% { transform: scale(1.05); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.85); }
  100% { transform: scale(1); box-shadow: 0 2px 6px rgba(37, 99, 235, 0.5); }
}

.stage-history-log {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  font-size: 11.5px;
  line-height: 1.5;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
}

/* 自定义纤细滚动条，方便滑动回溯 */
.stage-history-log::-webkit-scrollbar {
  width: 5px;
}
.stage-history-log::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.stage-history-log::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 4px;
}
.stage-history-log::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.7);
}

/* 每一条战报平滑缓动上移 */
.stage-history-item {
  word-break: break-word;
  animation: slideUpSmooth 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  padding: 2px 5px;
  border-radius: 4px;
  transition: background-color 0.15s;
}

.stage-history-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.stage-history-item .h-time {
  font-size: 9.5px;
  color: #64748b;
  margin-right: 5px;
  font-family: monospace;
}

.stage-history-item .h-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 5px;
  display: inline-block;
  line-height: 1.2;
}

.stage-history-item.sys-item .h-tag {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.stage-history-item.player-item .h-tag {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.stage-history-item .h-name {
  font-weight: 700;
  color: #f1f5f9;
  margin-right: 4px;
}

.stage-history-item.sys-item {
  color: #fbbf24;
}

.stage-input-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #141922;
  border-top: 1px solid #202834;
}
#stageChatInput {
  flex: 1;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #33404d;
  background: #18202b;
  color: #fff;
  font-size: 13px;
}
#stageChatInput:disabled { background: #121720; color: #64748b; border-color: #242c38; }
.btn-stage-send {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: none;
  background: #0284c7;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.btn-stage-send:disabled { background: #334155; color: #64748b; cursor: not-allowed; }
.btn-stage-pass {
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #d97706;
  background: #b45309;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.btn-stage-skip {
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #475569;
  background: #1e293b;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
}

/* ==================== 5. 手机横屏模式自适应 (Orientation: Landscape) ==================== */
@media (orientation: landscape) and (max-height: 520px) {
  .stage-topbar { height: 30px; padding: 0 8px; }
  .stage-arena { padding: 4px; gap: 8px; }
  .stage-col { width: 84px; gap: 4px; }
  .stage-seat-card { padding: 3px 2px; }
  .stage-seat-card .seat-avatar-box { width: 28px; height: 28px; margin-bottom: 1px; }
  .stage-seat-card .seat-name { font-size: 9.5px; max-width: 76px; }
  .stage-main-display { min-height: 100px; }
  .stage-bubble-wrap { max-width: 380px; }
  .stage-bubble-box { padding: 8px 12px; }
  .stage-bubble-content { font-size: 13.5px; }
  .stage-bottom-wrap { flex-direction: row; align-items: center; }
  .stage-history-box { width: 45%; height: 50px; border-top: none; border-right: 1px solid #222d3b; }
  .stage-input-bar { flex: 1; border-top: none; height: 50px; }
}

/* 模态弹窗与Toast */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; backdrop-filter: blur(2px);
}
.modal-box {
  background: #ffffff; border: 1px solid #dcdcdc; border-radius: 8px;
  padding: 18px; width: 90%; max-width: 360px; box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.modal-title { font-size: 15px; font-weight: 700; color: #191919; margin-bottom: 10px; }
.toast {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%);
  background: rgba(0,0,0,0.75); color: #fff; padding: 7px 14px; border-radius: 4px;
  font-size: 12px; z-index: 150; box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

/* @所有人 醒目高亮微标签 */
.mention-all-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 12.5px;
  padding: 1px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.3);
  margin: 0 2px;
}

/* 皇冠房主勋章 */
.host-crown-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #d97706;
}

/* 顶栏个人名片快速入口按钮 */
.top-my-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  color: #191919;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.top-my-profile-btn:hover {
  background: #f0f0f0;
  border-color: #bfbfbf;
}
.top-my-profile-btn .my-avatar-mini {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

/* 自定义表情包区域 */
.pop-upload-sticker-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  background: #eff6ff;
  border: 1px dashed #3b82f6;
  border-radius: 6px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.pop-upload-sticker-btn:hover {
  background: #dbeafe;
}
.pop-sticker-subheading {
  font-size: 11px;
  color: #8c8c8c;
  font-weight: 600;
  margin: 6px 0 4px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pop-custom-stickers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  padding: 2px;
}
.pop-sticker-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pop-sticker-item img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
.pop-sticker-del {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* 个人资料修改弹窗 */
.profile-modal-box {
  background: #ffffff;
  width: 88%;
  max-width: 320px;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  box-sizing: border-box;
}
.profile-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #191919;
  margin-bottom: 12px;
  text-align: center;
}
.profile-host-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #fef3c7;
  color: #b45309;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #fde68a;
  margin-bottom: 12px;
}
.profile-field-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  font-weight: 600;
}
.profile-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
}
.profile-input:focus {
  border-color: #3b82f6;
}
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.profile-avatar-preview {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.profile-btn-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f5ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
}
.profile-btn-reset-ai {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.profile-btn-row {
  display: flex;
  gap: 8px;
}
.profile-btn-row button {
  flex: 1;
  padding: 8px 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.btn-profile-save {
  background: #3b82f6;
  color: #fff;
}
.btn-profile-cancel {
  background: #f3f4f6;
  color: #4b5563;
}

/* 针对手机端窄屏（< 480px）极度紧凑排版，确保人名网格100%可见 */
@media (max-width: 480px) {
  .topbar-compact {
    padding: 4px 6px;
  }
  .top-row-main {
    gap: 4px;
    height: 30px;
  }
  .top-title {
    font-size: 13px;
  }
  .top-count {
    font-size: 10px;
    margin-left: 1px;
  }
  .top-player-grid {
    gap: 2px 4px;
    max-height: 30px;
  }
  .player-micro-badge {
    height: 13px;
    line-height: 13px;
    font-size: 9.5px;
    padding: 0 3px;
    max-width: 52px;
    border-radius: 2px;
  }
  .top-my-profile-btn {
    padding: 1px 4px;
    max-width: 70px;
    font-size: 10px;
    height: 22px;
  }
  #myProfileName {
    max-width: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
  }
}

/* ==================== 队员高亮与呼吸闪烁动效 ==================== */
@keyframes candidatePulse {
  0% { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 0 4px rgba(59, 130, 246, 0.3); }
  50% { background: rgba(59, 130, 246, 0.35); border-color: #3b82f6; box-shadow: 0 0 12px rgba(59, 130, 246, 0.7); }
  100% { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 0 4px rgba(59, 130, 246, 0.3); }
}

.stage-seat-card.candidate-team {
  animation: candidatePulse 1.4s infinite ease-in-out !important;
}

/* 正式确定选定后的实色底色与金框 */
.stage-seat-card.on-team-solid {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.38)) !important;
  border: 2px solid #f59e0b !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.6) !important;
}

.seat-team-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  z-index: 5;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* 阵营视野角标（梅林看坏人、派西维尔看大拇指、坏人互认） */
.seat-vision-badge {
  position: absolute;
  top: -9px;
  left: -4px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  z-index: 6;
  white-space: nowrap;
}
.seat-vision-badge.vision-evil {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  border: 1px solid #fca5a5;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}
.seat-vision-badge.vision-percival {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fde047;
  border: 1px solid #c084fc;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.7);
}
.seat-vision-badge.vision-ally {
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  color: #fef08a;
  border: 1px solid #f87171;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.7);
}

/* 状态角标：已发言、托管中 */
.seat-status-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  margin-top: 2px;
  font-weight: 600;
}
.seat-status-tag.status-spoken {
  background: #10b981;
  color: #fff;
}
.seat-status-tag.status-speaking {
  background: #3b82f6;
  color: #fff;
  animation: pulse 1s infinite;
}
.seat-status-tag.status-managed {
  background: #ef4444;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
}

/* 头像下方的亮票结果徽章 */
.seat-vote-badge {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.seat-vote-badge.vote-yes {
  background: #10b981;
  color: #ffffff;
  border: 1px solid #34d399;
}
.seat-vote-badge.vote-no {
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #f87171;
}

/* 发言 60 秒倒计时小徽章 */
.speaker-timer-badge {
  background: #1e293b;
  border: 1px solid #3b82f6;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

/* ==================== 揭晓 10 秒确认大弹窗 ==================== */
.reveal-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.reveal-modal-box {
  background: #18202b;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 20px 24px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 158, 11, 0.35);
  text-align: center;
  color: #fff;
  animation: modalPop 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes modalPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.reveal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.reveal-title {
  font-size: 18px;
  font-weight: 800;
  color: #fbbf24;
}
.reveal-countdown-badge {
  background: #ef4444;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}
.reveal-subtitle {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 14px;
  line-height: 1.5;
}
.reveal-detail-content {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 16px;
  background: rgba(0,0,0,0.25);
  padding: 10px;
  border-radius: 6px;
  line-height: 1.6;
}

/* 顶部投票计数卡片 */
.reveal-vote-tally {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 14px 0 18px;
}
.tally-box {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.tally-box.yes-box {
  background: rgba(16, 185, 129, 0.15);
  border: 1.5px solid #10b981;
}
.tally-box.no-box {
  background: rgba(239, 68, 68, 0.15);
  border: 1.5px solid #ef4444;
}
.tally-label {
  font-size: 12px;
  font-weight: 600;
}
.yes-box .tally-label { color: #34d399; }
.no-box .tally-label { color: #f87171; }
.tally-num {
  font-size: 26px;
  font-weight: 900;
}
.yes-box .tally-num { color: #10b981; }
.no-box .tally-num { color: #ef4444; }
.tally-vs {
  font-size: 16px;
  font-weight: 900;
  color: #64748b;
}

.reveal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.reveal-ack-status {
  font-size: 12px;
  color: #94a3b8;
}
.reveal-ack-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

/* ==================== 7. 开局全员就绪准备弹窗 ==================== */
.ready-modal-mask {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.82) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}
.ready-modal-mask.hidden {
  display: none !important;
}
.ready-modal-box {
  background: #18222f;
  border: 2px solid #3b82f6;
  border-radius: 14px;
  padding: 24px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 24px rgba(59, 130, 246, 0.4);
  color: #fff;
  animation: modalPop 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.ready-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ready-modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #60a5fa;
}
.ready-countdown-num {
  background: #10b981;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  width: 38px;
  height: 38px;
  line-height: 38px;
  text-align: center;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.8);
  animation: cdPulse 1s infinite alternate;
}
@keyframes cdPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); box-shadow: 0 0 22px rgba(16, 185, 129, 1); }
}
.ready-check-notice {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.4;
}
.ready-players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.28);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ready-player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.ready-player-item.is-ready {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}
.ready-player-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ready-mark {
  font-size: 15px;
  font-weight: 900;
  width: 18px;
  text-align: center;
}
.ready-player-item.is-ready .ready-mark {
  color: #34d399;
}
.ready-player-item:not(.is-ready) .ready-mark {
  color: #64748b;
}
.ready-name {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
}
.ready-state-text {
  font-size: 12px;
  font-weight: 700;
}
.ready-player-item.is-ready .ready-state-text {
  color: #10b981;
}
.ready-player-item:not(.is-ready) .ready-state-text {
  color: #94a3b8;
}
.ready-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.ready-confirm-btn {
  flex: 1;
  padding: 11px 0;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
  transition: all 0.2s;
  animation: readyBtnPulse 1.5s infinite;
}
@keyframes readyBtnPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.ready-confirm-btn:disabled {
  background: #334155 !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  animation: none !important;
  transform: none !important;
}
