@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Noto+Serif+SC:wght@600;700;900&family=Orbitron:wght@600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

/* 銆婁唬鍙凤細绁炵鍗氬紙銆?鍏ㄥ眬璁捐绯荤粺涓庣Щ鍔ㄧ鏍峰紡搴?*/
/* Google Fonts：补齐中文常规字重，标题用衬线中文 */
:root {
  /* [comment removed] */
  --bg-dark: #0a0b0e;
  --bg-card: rgba(22, 24, 33, 0.7);
  --bg-glass: rgba(15, 17, 24, 0.85);
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-glass-active: rgba(255, 255, 255, 0.15);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* [comment removed] */
  --color-lv1: #10b981; /* 1璐?缈犵豢 */
  --color-lv1-glow: rgba(16, 185, 129, 0.2);
  --color-lv2: #3b82f6; /* 3璐?钄氳摑 */
  --color-lv2-glow: rgba(59, 130, 246, 0.25);
  --color-lv3: #ec4899;
  --color-lv3-glow: rgba(236, 72, 153, 0.35);

  /* [comment removed] */
  --color-zeus: #60a5fa; /* 闆烽渾钃?*/
  --color-zeus-glow: rgba(96, 165, 250, 0.4);
  --color-athena: #fbbf24; /* 绁炲湥閲?*/
  --color-athena-glow: rgba(251, 191, 36, 0.4);
  --color-ares: #f87171; /* 鍡滆绾?*/
  --color-ares-glow: rgba(248, 113, 113, 0.4);

  /* 字体系统：中文标题衬线 + 正文无衬线，数字用 Orbitron */
  --font-title: 'Noto Serif SC', 'Noto Sans SC', serif;
  --font-display: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Outfit', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-num: 'Orbitron', 'Outfit', sans-serif;

  /* 鍔ㄧ敾杩囨浮 */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* 绉诲姩绔槻鎷栧姩閫変腑 */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
html,
body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow: hidden;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  /* iOS Capacitor：铺满含安全区，避免底部露出系统白底 */
  min-height: 100vh;
  min-height: 100dvh;
}
#root {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background: radial-gradient(circle at 50% 30%, #151a24 0%, #0a0b0e 70%);
}
/* 鐜荤拑鎷熸€佸崱鐗?*/
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  transition: var(--transition-normal);
}
.glass-panel-active {
  border-color: var(--border-glass-active);
  background: rgba(22, 24, 33, 0.85);
}
/* 娓愬彉鏍囬 */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-title);
  font-weight: 700;
}
/* 鎸夐挳鍩虹绫?*/
.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-body);
}
.btn-primary:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}
/* 鎶曢檷鎸夐挳鏍峰紡 */
.btn-surrender {
  background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
  font-size: 14px;
  transition: var(--transition-fast);
}
.btn-surrender:active {
  transform: scale(0.95);
}
/* 婊氬姩鏉￠殣钘忥紙涓昏鐢ㄤ簬鎵嬬墝婊氬姩绛夛級 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
/* [comment removed] */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* 闂儊鍛煎惛鍏夋檿鍔ㄧ敾 */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}
.glow-effect {
  animation: pulse-glow 2s infinite ease-in-out;
}
/* ── Military-tech design tokens ── */
:root {
  --lobby-steel: #12151c;
  --lobby-steel-light: #1a1f2a;
  --lobby-steel-edge: rgba(148, 163, 184, 0.14);
  --lobby-amber: #f59e0b;
  --lobby-amber-dim: rgba(245, 158, 11, 0.15);
  --lobby-cyan: #22d3ee;
  --lobby-cyan-dim: rgba(34, 211, 238, 0.12);
  --lobby-red: #ef4444;
  --lobby-red-dim: rgba(239, 68, 68, 0.12);
  --lobby-win: #34d399;
  --lobby-loss: #f87171;
  --lobby-draw: #94a3b8;
}
/* ══════════════════════════════════════
   AUTH PAGE — mobile game: art + bottom dock
   背景图放到 public/assets/auth-bg.jpg（也可用 .png）
   ══════════════════════════════════════ */
.auth-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #07090d;
  padding:
    env(safe-area-inset-top, 0)
    env(safe-area-inset-right, 0)
    env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
}
.auth-bg {
  position: absolute;
  inset: 0;
  background-color: #0a0e14;
  /* 优先 png（你放的素材）；有 webp/jpg 也会自动用 */
  background-image: url('../assets/auth-bg.png');
  background-size: cover;
  /* 偏上：给标题留乌云区，爆炸落在中部，坦克被底部表单坞盖住一部分 */
  background-position: center 22%;
  background-repeat: no-repeat;
  transform: scale(1.04);
  animation: auth-bg-drift 22s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes auth-bg-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(0, -1.2%, 0); }
}
.auth-bg-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* 顶部略压暗，金属标题更稳 */
    linear-gradient(180deg, rgba(6, 8, 12, 0.42) 0%, rgba(6, 8, 12, 0.12) 18%, transparent 32%),
    /* 中段几乎透出爆炸，只加一点冷色压对比 */
    linear-gradient(180deg, transparent 35%, rgba(8, 10, 14, 0.15) 52%, rgba(8, 10, 14, 0.55) 68%),
    /* 底部表单坞可读性 */
    linear-gradient(180deg, transparent 58%, rgba(7, 9, 13, 0.78) 78%, rgba(7, 9, 13, 0.96) 100%),
    /* 爆炸暖光一点氛围，别盖死画面 */
    radial-gradient(ellipse at 50% 48%, rgba(255, 120, 40, 0.14) 0%, transparent 45%);
}
.auth-topbar {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 0;
}
.auth-hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: clamp(28px, 8vh, 56px) 24px 16px;
  min-height: 0;
  animation: auth-hero-in 0.7s ease-out both;
}
@keyframes auth-hero-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-brand-mark {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.06em;
  color: #f0d78c;
  background: linear-gradient(160deg, #1a1510 0%, #0a0a0c 55%, #12100c 100%);
  border: 1.5px solid #c9a227;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 4px 18px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(201, 162, 39, 0.28),
    inset 0 1px 0 rgba(255, 220, 140, 0.2);
}
.auth-title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 13vw, 58px);
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1.05;
  text-indent: 0.18em; /* 光学居中：抵消 letter-spacing 右偏 */
  /* 金属银铬渐变字面 */
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f3f4f6 12%,
    #c8ced2 38%,
    #8b939e 52%,
    #e8eaed 68%,
    #a8aeb6 82%,
    #6b7280 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55))
    drop-shadow(0 3px 0 rgba(55, 65, 81, 0.85))
    drop-shadow(0 8px 16px rgba(0, 0, 0, 0.75))
    drop-shadow(0 0 18px rgba(226, 232, 240, 0.22));
}
/* 英文品牌名稍收紧字距 */
.auth-shell--en .auth-title {
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  font-family: 'Cinzel', var(--font-display);
}
.auth-sub {
  margin-top: 12px;
  max-width: 300px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}
.auth-dock {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 20px calc(18px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(180deg, rgba(12, 14, 18, 0.72) 0%, rgba(8, 10, 14, 0.92) 100%);
  border: 1px solid rgba(255, 180, 80, 0.12);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  box-shadow:
    0 -16px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 200, 120, 0.08);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  animation: auth-dock-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}
@keyframes auth-dock-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-dock-handle {
  width: 40px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-form label span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}
.auth-form input {
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 16px; /* 避免 iOS 聚焦自动放大 */
  color: var(--text-primary);
  background: rgba(7, 9, 13, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  outline: none;
  transition: var(--transition-fast);
  -webkit-user-select: text;
  user-select: text;
}
.auth-form input:focus {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}
.auth-error {
  padding: 10px 12px;
  font-size: 13px;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 10px;
}
.auth-submit {
  margin-top: 4px;
  min-height: 48px;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0a0c10;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.35);
  transition: var(--transition-fast);
}
.auth-submit:hover:not(:disabled) {
  filter: brightness(1.06);
}
.auth-submit:active:not(:disabled) {
  transform: scale(0.985);
}
.auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.auth-switch {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--lobby-cyan);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: center;
}
.auth-switch:active {
  opacity: 0.75;
}
.auth-hint {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.75);
  text-align: center;
}
@media (min-width: 768px) {
  .auth-shell {
    justify-content: center;
  }

  .auth-hero {
    flex: 0 0 auto;
    padding: 48px 24px 28px;
  }

  .auth-dock {
    border-radius: 22px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    margin-bottom: 32px;
    padding-bottom: 22px;
  }
}
/* ══════════════════════════════════════
   LOBBY PAGE — dark steel / amber / cyan
   ══════════════════════════════════════ */
.lobby-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #05070a;
}
.lobby-scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 14px calc(76px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
/* 背景图：与登录页同路径写法，lobby-bg 缺失时回退 auth-bg */
.lobby-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #0a0e14;
  background-image: url('../assets/lobby-bg.png'), url('../assets/auth-bg.png');
  background-size: cover;
  background-position: center 18%;
  background-repeat: no-repeat;
  transform: scale(1.05);
  animation: lobby-bg-drift 24s ease-in-out infinite alternate;
}
@keyframes lobby-bg-drift {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to { transform: scale(1.09) translate3d(0, -1.5%, 0); }
}
.lobby-bg-veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 7, 10, 0.4) 0%, rgba(5, 7, 10, 0.1) 20%, transparent 40%),
    linear-gradient(180deg, transparent 40%, rgba(5, 7, 10, 0.6) 70%, rgba(5, 7, 10, 0.95) 100%),
    radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.08) 0%, transparent 60%);
}
.lobby-atmosphere {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 15, 0.4) 0%, rgba(8, 10, 15, 0.75) 45%, rgba(6, 8, 12, 0.95) 100%),
    radial-gradient(circle at 10% 90%, rgba(34, 211, 238, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.06) 0%, transparent 35%);
  pointer-events: none;
  z-index: 0;
}
.lobby-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 40%, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
  transform: perspective(500px) rotateX(25deg) translateY(-50px) translateZ(0);
  animation: grid-slow-pan 45s linear infinite;
}
@keyframes grid-slow-pan {
  from { background-position: 0 0; }
  to { background-position: 0 1000px; }
}
.lobby-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 6px 2px;
}
.lobby-topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  min-width: 0;
  flex: 1;
}
.lobby-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 640px) {
  .lobby-topbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .lobby-topbar-meta {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  .lobby-topbar-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
}
.lobby-topbar-btn {
  position: relative;
  flex-shrink: 0;
  padding: 7px 12px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.lobby-topbar-btn:hover {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.35);
}
.lobby-topbar-btn--byok {
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(99, 102, 241, 0.15);
}
.lobby-topbar-badge {
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #0f172a;
  background: rgba(125, 211, 252, 0.9);
}
.lobby-llm-modal {
  max-width: 520px;
}
.lobby-llm-modal .lobby-llm-sub {
  margin-top: 4px;
}
.lobby-topbar-meta .lobby-status-text {
  white-space: nowrap;
}
.lobby-topbar .lobby-username {
  display: inline;
}
.lobby-logout-btn {
  flex-shrink: 0;
  padding: 7px 12px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.lobby-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lobby-cyan);
  box-shadow: 0 0 8px var(--lobby-cyan);
  animation: pulse-glow 2.5s infinite ease-in-out;
}
.lobby-username {
  color: var(--text-secondary);
  font-family: monospace;
  font-size: 11px;
}
.lobby-logout-btn:hover {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}
.lobby-body {
  position: relative;
  display: flex;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}
.lobby-sidebar {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  gap: 6px;
  width: 88px;
  padding: 10px 8px;
  background: rgba(10, 15, 26, 0.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.lobby-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 2px;
  padding-top: 6px;
  padding-left: max(8px, env(safe-area-inset-left, 0px));
  padding-right: max(8px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(8, 10, 14, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}
.lobby-dock-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 6px 2px;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.lobby-dock-item.active {
  color: var(--lobby-cyan);
}
.lobby-dock-item.active .lobby-dock-icon {
  background: var(--lobby-cyan-dim);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.15);
}
.lobby-dock-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.lobby-dock-item.soon {
  opacity: 0.42;
  cursor: not-allowed;
}
.lobby-dock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  font-size: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
}
.lobby-dock-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
@media (min-width: 900px) {
  .lobby-sidebar {
    display: flex;
  }

  .lobby-dock {
    display: none;
  }

  .lobby-scroll {
    padding-bottom: 16px;
  }
}
.lobby-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.lobby-nav-item:hover:not(.disabled) {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}
.lobby-nav-item.active {
  color: var(--lobby-cyan);
  background: var(--lobby-cyan-dim);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.12);
}
.lobby-nav-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.lobby-nav-item.soon,
.lobby-dock-item.soon {
  opacity: 0.42;
  cursor: not-allowed;
}
.lobby-nav-soon,
.lobby-dock-soon {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  line-height: 1.1;
}
.lobby-dock-soon {
  font-size: 6px;
}
.lobby-nav-icon {
  font-size: 16px;
  line-height: 1;
}
.lobby-nav-label {
  text-align: center;
  line-height: 1.2;
}
.lobby-main {
  flex: 1;
  min-width: 0;
}
.lobby-main:has(.gallery-root) {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 168px);
}
.lobby-main:has(.gallery-root) > .gallery-root {
  flex: 1;
}
.lobby-hero-head {
  text-align: center;
  margin-bottom: 18px;
  padding-top: 4px;
}
.lobby-brand {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 10vw, 52px);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  line-height: 1.05;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f3f4f6 12%,
    #c8ced2 38%,
    #8b939e 52%,
    #e8eaed 68%,
    #a8aeb6 82%,
    #6b7280 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55))
    drop-shadow(0 3px 0 rgba(55, 65, 81, 0.85))
    drop-shadow(0 8px 16px rgba(0, 0, 0, 0.75))
    drop-shadow(0 0 18px rgba(226, 232, 240, 0.22));
}
.lobby-shell--en .lobby-brand {
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  font-family: 'Cinzel', var(--font-display);
}
.lobby-tagline {
  margin-top: 8px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
/* 玻璃拟态面板系统 */
.lobby-profile-card,
.lobby-match-hub,
.lobby-loadout-panel,
.lobby-llm-panel,
.lobby-history,
.lobby-leaderboard {
  position: relative;
  margin-bottom: 16px;
  padding: 20px;
  background: rgba(10, 15, 26, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.lobby-profile-card::before,
.lobby-match-hub::before,
.lobby-loadout-panel::before,
.lobby-llm-panel::before,
.lobby-history::before,
.lobby-leaderboard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--lobby-cyan);
  border-left: 2px solid var(--lobby-cyan);
  border-top-left-radius: 16px;
  pointer-events: none;
  opacity: 0.85;
}
.lobby-profile-card::after,
.lobby-match-hub::after,
.lobby-loadout-panel::after,
.lobby-llm-panel::after,
.lobby-history::after,
.lobby-leaderboard::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-bottom: 2px solid var(--lobby-cyan);
  border-right: 2px solid var(--lobby-cyan);
  border-bottom-right-radius: 16px;
  pointer-events: none;
  opacity: 0.85;
}
/* Match hub corners: Cyan */
.lobby-match-hub::before {
  border-top-color: var(--lobby-cyan);
  border-left-color: var(--lobby-cyan);
}
.lobby-match-hub::after {
  border-bottom-color: var(--lobby-cyan);
  border-right-color: var(--lobby-cyan);
}
/* Loadout corners: Amber */
.lobby-loadout-panel::before {
  border-top-color: var(--lobby-amber);
  border-left-color: var(--lobby-amber);
}
.lobby-loadout-panel::after {
  border-bottom-color: var(--lobby-amber);
  border-right-color: var(--lobby-amber);
}
/* Commander profile corners: Cyan */
.lobby-profile-card::before {
  border-top-color: var(--lobby-cyan);
  border-left-color: var(--lobby-cyan);
}
.lobby-profile-card::after {
  border-bottom-color: var(--lobby-cyan);
  border-right-color: var(--lobby-cyan);
}
/* History corners: Steel edge / Slate */
.lobby-history::before {
  border-top-color: rgba(255, 255, 255, 0.25);
  border-left-color: rgba(255, 255, 255, 0.25);
}
.lobby-history::after {
  border-bottom-color: rgba(255, 255, 255, 0.25);
  border-right-color: rgba(255, 255, 255, 0.25);
}
/* Leaderboard corners: Amber */
.lobby-leaderboard::before {
  border-top-color: var(--lobby-amber);
  border-left-color: var(--lobby-amber);
}
.lobby-leaderboard::after {
  border-bottom-color: var(--lobby-amber);
  border-right-color: var(--lobby-amber);
}
.lobby-profile-card:hover,
.lobby-match-hub:hover,
.lobby-loadout-panel:hover,
.lobby-history:hover,
.lobby-leaderboard:hover {
  border-color: rgba(34, 211, 238, 0.15);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(34, 211, 238, 0.03),
    inset 0 1px 1px rgba(255, 255, 255, 0.08);
}
@media (min-width: 640px) {
  .lobby-profile-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}
.lobby-commander-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.lobby-avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 20px;
  color: var(--lobby-amber);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.25) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 2px solid rgba(245, 158, 11, 0.45);
  border-radius: 10px;
}
.lobby-avatar--hex {
  width: 58px;
  height: 66px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border-radius: 0;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 2px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
  font-weight: 900;
  color: #fff;
  transition: transform 0.3s ease;
}
.lobby-commander-identity:hover .lobby-avatar--hex {
  transform: rotate(5deg) scale(1.05);
}
.lobby-commander-info {
  min-width: 0;
  flex: 1;
}
.lobby-nickname-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.lobby-nickname-btn:hover {
  color: var(--lobby-cyan);
}
.lobby-edit-icon {
  font-size: 12px;
  opacity: 0.45;
}
.lobby-nickname-input {
  padding: 4px 10px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(10, 12, 16, 0.9);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 6px;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}
.lobby-level-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.lobby-level-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0a0c10;
  background: var(--lobby-amber);
  border-radius: 4px;
}
.lobby-exp-track {
  position: relative;
  flex: 1;
  min-width: 120px;
  max-width: 220px;
  height: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}
.lobby-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4 0%, #22d3ee 50%, #0891b2 100%);
  background-size: 200% 100%;
  animation: exp-shimmer 3s linear infinite;
  border-radius: 8px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes exp-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.lobby-exp-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.lobby-record-row {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.lobby-record-sep {
  margin: 0 4px;
  opacity: 0.4;
}
.lobby-economy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
}
.lobby-economy-chip--wide {
  grid-column: 1 / -1;
}
@media (min-width: 640px) {
  .lobby-economy-grid {
    display: flex;
    flex-wrap: wrap;
    width: auto;
    max-width: 420px;
  }

  .lobby-economy-chip--wide {
    grid-column: auto;
  }
}
.lobby-economy-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  min-width: 76px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: all 0.25s ease;
}
.lobby-economy-chip:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}
.lobby-economy-chip--accent {
  border-color: rgba(245, 158, 11, 0.2);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(10, 15, 26, 0.4) 100%);
}
.lobby-economy-chip--accent:hover {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}
.lobby-economy-chip--cyan {
  border-color: rgba(34, 211, 238, 0.2);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08) 0%, rgba(10, 15, 26, 0.4) 100%);
}
.lobby-economy-chip--cyan:hover {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.1);
}
.lobby-chip-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.lobby-economy-chip--accent .lobby-chip-label {
  color: rgba(245, 158, 11, 0.7);
}
.lobby-economy-chip--cyan .lobby-chip-label {
  color: rgba(34, 211, 238, 0.7);
}
.lobby-chip-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.lobby-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 16px;
  margin-bottom: 20px;
}
.lobby-match-hub {
  border-top: 3px solid rgba(34, 211, 238, 0.45);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.02) 0%, rgba(10, 15, 26, 0.68) 100%);
}
.lobby-loadout-panel {
  border-top: 3px solid rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.02) 0%, rgba(10, 15, 26, 0.68) 100%);
}
.lobby-llm-panel {
  border-top: 3px solid rgba(129, 140, 248, 0.45);
  background: linear-gradient(180deg, rgba(129, 140, 248, 0.04) 0%, rgba(10, 15, 26, 0.68) 100%);
}
.lobby-llm-panel::before {
  border-top-color: rgba(165, 180, 252, 0.9);
  border-left-color: rgba(165, 180, 252, 0.9);
}
.lobby-llm-panel::after {
  border-bottom-color: rgba(165, 180, 252, 0.9);
  border-right-color: rgba(165, 180, 252, 0.9);
}
.lobby-llm-sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.55);
  line-height: 1.45;
}
.lobby-llm-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.lobby-llm-mode {
  text-align: left;
  padding: 12px 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 16, 0.7);
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.lobby-llm-mode strong {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #e2e8f0;
}
.lobby-llm-mode span {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(148, 163, 184, 0.9);
}
.lobby-llm-mode.active {
  border-color: rgba(129, 140, 248, 0.65);
  background: rgba(99, 102, 241, 0.12);
}
.lobby-llm-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.lobby-llm-fields input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 6, 23, 0.75);
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.lobby-llm-advanced-toggle {
  align-self: flex-start;
  border: none;
  background: transparent;
  color: rgba(165, 180, 252, 0.9);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.lobby-llm-privacy {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(165, 180, 252, 0.35);
  background: rgba(49, 46, 129, 0.18);
  font-size: 11px;
  line-height: 1.55;
  color: rgba(199, 210, 254, 0.92);
}
@media (max-width: 720px) {
  .lobby-llm-modes {
    grid-template-columns: 1fr;
  }
}
.lobby-match-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lobby-quick-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-items: stretch;
}
.lobby-match-action {
  grid-column: 1 / -1;
  margin-top: 2px;
}
.lobby-quick-card {
  position: relative;
  text-align: left;
  padding: 10px 8px 12px;
  min-height: 0;
  background: rgba(10, 12, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-family: inherit;
  color: inherit;
  overflow: hidden;
  width: 100%;
  min-width: 0;
}
.lobby-quick-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.06) 0%, transparent 55%);
  pointer-events: none;
}
.lobby-quick-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.04), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lobby-quick-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(15, 23, 42, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.lobby-quick-card:hover::after {
  opacity: 1;
}
.lobby-quick-card.featured {
  border-left-color: rgba(255, 255, 255, 0.35);
}
.lobby-quick-card.featured.active {
  border-left-color: var(--lobby-cyan);
  box-shadow:
    0 8px 24px rgba(34, 211, 238, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.lobby-quick-card.active {
  border-color: rgba(34, 211, 238, 0.5);
  border-left-color: var(--lobby-cyan);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12) 0%, rgba(10, 15, 26, 0.75) 100%);
  box-shadow:
    0 6px 22px rgba(34, 211, 238, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.lobby-quick-badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--lobby-cyan);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 4px;
}
.lobby-quick-card .lobby-mode-title {
  font-size: 13px;
  margin-bottom: 2px;
  font-weight: 700;
  line-height: 1.25;
}
.lobby-quick-card .lobby-mode-desc {
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lobby-more-modes {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.lobby-side-mode {
  position: relative;
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.lobby-side-mode:hover:not(.disabled) {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(255, 255, 255, 0.04);
}
.lobby-side-mode.active {
  border-color: rgba(34, 211, 238, 0.45);
  background: var(--lobby-cyan-dim);
}
.lobby-side-mode.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.lobby-side-mode-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--lobby-amber);
}
.lobby-side-mode-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.lobby-side-mode-desc {
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-muted);
}
.lobby-soon-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 6px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}
.lobby-active-mode-banner {
  margin-top: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
}
.lobby-active-mode-banner strong {
  font-size: 13px;
  color: var(--lobby-amber);
}
@media (min-width: 900px) {
  .lobby-match-layout {
    flex-direction: row;
    align-items: stretch;
  }

  .lobby-quick-modes {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .lobby-quick-card {
    min-height: 0;
    padding: 12px 10px 14px;
  }

  .lobby-quick-card .lobby-mode-title {
    font-size: 14px;
  }

  .lobby-quick-card .lobby-mode-desc {
    font-size: 11px;
    -webkit-line-clamp: 3;
  }

  .lobby-more-modes {
    flex-direction: column;
    flex-shrink: 0;
    width: 180px;
    overflow-x: visible;
  }

  .lobby-side-mode {
    min-width: 0;
    flex: none;
  }
}
@media (max-width: 420px) {
  .lobby-quick-modes {
    gap: 6px;
  }

  .lobby-quick-card {
    padding: 8px 6px 10px;
  }

  .lobby-quick-badge {
    font-size: 8px;
    padding: 1px 4px;
  }

  .lobby-quick-card .lobby-mode-title {
    font-size: 12px;
  }

  .lobby-quick-card .lobby-mode-desc {
    font-size: 9px;
    -webkit-line-clamp: 2;
  }
}
.lobby-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.lobby-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.lobby-panel-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
/* 战车预览全息投影效果 */
.lobby-tank-preview {
  position: relative;
  width: 100%;
  height: 200px;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.06) 0%, rgba(9, 11, 16, 0.9) 80%),
    repeating-linear-gradient(0deg, rgba(34, 211, 238, 0.01) 0px, rgba(34, 211, 238, 0.01) 1px, transparent 1px, transparent 4px);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow:
    0 0 30px rgba(0, 0, 0, 0.6),
    inset 0 0 20px rgba(34, 211, 238, 0.05);
}
.lobby-tank-preview::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1px solid rgba(34, 211, 238, 0.06);
  border-radius: 8px;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
}
.lobby-tank-preview::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 50%, rgba(34, 211, 238, 0.08) 100%);
  animation: radar-rotate 8s linear infinite;
  pointer-events: none;
  transform-origin: center center;
}
@keyframes radar-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.lobby-tank-canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  z-index: 1;
}
.lobby-loadout-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.lobby-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lobby-field span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.lobby-field select {
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  background: rgba(10, 12, 16, 0.85);
  border: 1px solid var(--lobby-steel-edge);
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.25s ease;
}
.lobby-field select:focus {
  border-color: rgba(34, 211, 238, 0.5);
}
.lobby-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 520px) {
  .lobby-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.lobby-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--lobby-steel-edge);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.lobby-stat:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(34, 211, 238, 0.15);
}
.lobby-stat strong {
  font-size: 14px;
  color: var(--lobby-cyan);
  font-variant-numeric: tabular-nums;
}
.lobby-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.lobby-mode-tab {
  flex: 1;
  padding: 9px 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--lobby-steel-edge);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.lobby-mode-tab.active {
  color: var(--lobby-cyan);
  background: var(--lobby-cyan-dim);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.1);
}
.lobby-mode-card {
  flex: 1;
  padding: 16px;
  margin-bottom: 16px;
  background: rgba(10, 12, 16, 0.6);
  border: 1px solid var(--lobby-steel-edge);
  border-left: 3px solid var(--lobby-amber);
  border-radius: 10px;
}
.lobby-ticker {
  position: relative;
  z-index: 4;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  height: calc(36px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: 0;
  background: rgba(8, 10, 14, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--lobby-steel-edge);
  overflow: hidden;
  box-sizing: border-box;
}
.lobby-ticker-label {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--lobby-amber);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 4px;
}
.lobby-ticker-track {
  flex: 1;
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
}
.lobby-ticker-text {
  flex-shrink: 0;
  padding-right: 80px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  animation: lobby-ticker-scroll 48s linear infinite;
}
@keyframes lobby-ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}
.lobby-mode-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.lobby-mode-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.lobby-cost-hint {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--lobby-amber);
}
.lobby-cost-hint--warn {
  color: #f87171;
}
.lobby-cta-btn {
  position: relative;
  width: 100%;
  padding: 16px 28px;
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #05070a;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow:
    0 6px 30px rgba(245, 158, 11, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}
.lobby-cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: all 0.6s ease;
}
.lobby-cta-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 10px 36px rgba(245, 158, 11, 0.5),
    0 0 15px rgba(245, 158, 11, 0.3);
}
.lobby-cta-btn:hover:not(:disabled)::before {
  left: 100%;
}
.lobby-cta-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}
.lobby-cta-btn:disabled {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
  opacity: 0.7;
}
.lobby-history-entry {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}
.lobby-history-open-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 14, 20, 0.72);
  backdrop-filter: blur(12px);
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.lobby-history-open-btn:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.88);
  transform: translateY(-1px);
}
.lobby-history-open-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.lobby-history-open-meta {
  font-size: 12px;
  color: #94a3b8;
}
.lobby-history-open-cta {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.12);
}
.lobby-history-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}
.lobby-history-modal {
  width: min(560px, 100%);
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 14, 20, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.lobby-history-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.lobby-history-modal-head .lobby-history-title {
  margin: 0 0 4px;
}
.lobby-history-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.lobby-history-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.lobby-history-list--modal {
  max-height: none;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
}
.lobby-history {
  position: relative;
  z-index: 1;
  padding: 16px;
  background: rgba(12, 14, 20, 0.68);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}
.lobby-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--lobby-steel-edge);
}
.lobby-history-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}
.lobby-history-count {
  font-size: 11px;
  color: var(--text-muted);
}
.lobby-history-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.lobby-history-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lobby-history-item {
  display: grid;
  grid-template-columns: 56px 48px 72px 64px 48px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  transition: var(--transition-fast);
}
.lobby-history-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(34, 211, 238, 0.15);
  transform: translateX(2px);
}
@media (max-width: 640px) {
  .lobby-history-item {
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
  }

  .lobby-history-time {
    grid-column: 1 / -1;
    text-align: right;
  }
}
.lobby-outcome-badge {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 4px;
  text-align: center;
}
.lobby-outcome-badge--win {
  color: var(--lobby-win);
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.lobby-outcome-badge--loss {
  color: var(--lobby-loss);
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
}
.lobby-outcome-badge--draw {
  color: var(--lobby-draw);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.lobby-history-mode {
  font-weight: 700;
  color: var(--lobby-cyan);
  letter-spacing: 0.04em;
}
.lobby-history-exp.positive {
  color: var(--lobby-win);
  font-weight: 600;
}
.lobby-history-exp.negative {
  color: var(--lobby-loss);
  font-weight: 600;
}
.lobby-history-hp {
  color: var(--text-muted);
}
.lobby-history-duration {
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
.lobby-history-time {
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.lang-switch {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: Outfit, sans-serif;
}
.lang-switch button.active {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
/* ── 排行榜 ── */
.lobby-leaderboard {
  padding: 16px;
  background: rgba(12, 14, 20, 0.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 2px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.lobby-leaderboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--lobby-steel-edge);
}
.lobby-leaderboard-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}
.lobby-leaderboard-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.lobby-leaderboard-you {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
}
.lobby-leaderboard-you-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(245, 158, 11, 0.75);
  text-transform: uppercase;
}
.lobby-leaderboard-you strong {
  font-size: 16px;
  color: var(--lobby-amber);
}
.lobby-leaderboard-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.lobby-leaderboard-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lobby-leaderboard-row {
  display: grid;
  grid-template-columns: 44px 1fr 52px 40px 52px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 10px;
  transition: var(--transition-fast);
}
.lobby-leaderboard-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--lobby-steel-edge);
}
.lobby-leaderboard-row.is-me {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.08);
}
.lobby-leaderboard-row.top-1 .lobby-lb-rank {
  color: #ffd54f;
}
.lobby-leaderboard-row.top-2 .lobby-lb-rank {
  color: #cfd8dc;
}
.lobby-leaderboard-row.top-3 .lobby-lb-rank {
  color: #b0bec5;
}
.lobby-lb-rank {
  font-weight: 800;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}
.lobby-lb-player {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.lobby-lb-name {
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lobby-lb-user {
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lobby-lb-stat {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.lobby-lb-wins {
  font-weight: 700;
  color: var(--lobby-cyan);
}
@media (max-width: 480px) {
  .lobby-leaderboard-row {
    grid-template-columns: 36px 1fr 44px 36px;
  }

  .lobby-leaderboard-row .lobby-lb-stat:last-child {
    display: none;
  }
}
/* 对局准备界面特效 (青蓝高科技暗色调) */
@keyframes preparing-radar-pulse {
  0% { transform: scale(0.9); opacity: 0.35; }
  50% { transform: scale(1.18); opacity: 0.85; }
  100% { transform: scale(0.9); opacity: 0.35; }
}
@keyframes preparing-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes preparing-dot-pulse {
  0% { transform: scale(0.85); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 10px rgba(34, 211, 238, 0.9); }
  100% { transform: scale(0.85); opacity: 0.4; }
}
.preparing-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at center, rgba(15, 23, 42, 0.75) 0%, rgba(5, 8, 14, 0.96) 100%), url('../assets/matchmaking_bg_new.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Outfit", var(--font-body), sans-serif;
  color: #fff;
  z-index: 100;
  overflow: hidden;
}
/* scanlines for waiting view */
.preparing-backdrop::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(34, 211, 238, 0.015) 0px, rgba(34, 211, 238, 0.015) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
  z-index: 1;
}
.preparing-card {
  position: relative;
  background: rgba(13, 18, 28, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(34, 211, 238, 0.22);
  padding: 40px 48px;
  border-radius: 24px;
  text-align: center;
  width: 90%;
  max-width: 380px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(6, 182, 212, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  z-index: 2;
}
/* Cyber corners to wait overlay card */
.preparing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  border-top: 2px solid #22d3ee;
  border-left: 2px solid #22d3ee;
  border-top-left-radius: 24px;
  pointer-events: none;
  opacity: 0.9;
}
.preparing-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  border-bottom: 2px solid #22d3ee;
  border-right: 2px solid #22d3ee;
  border-bottom-right-radius: 24px;
  pointer-events: none;
  opacity: 0.9;
}
.preparing-radar-container {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
}
.preparing-radar-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px dashed rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
  animation: preparing-spin 8s linear infinite;
}
.preparing-radar-core {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35) 0%, rgba(34, 211, 238, 0) 70%);
  animation: preparing-radar-pulse 2s infinite ease-in-out;
}
.preparing-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  margin: 0 0 12px 0;
}
.preparing-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #cbd5e1;
  font-size: 13px;
  margin-bottom: 32px;
}
.preparing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22d3ee;
  animation: preparing-dot-pulse 1.8s infinite ease-in-out;
}
.preparing-cancel-btn {
  padding: 11px 32px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.preparing-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
}
/* ==========================================
   BATTLE HUD — tactical visor overlay
   ========================================== */
@keyframes hud-bar-scan {
  from { background-position: 0 0; }
  to { background-position: 30px 0; }
}
@keyframes hud-glow-pulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; filter: drop-shadow(0 0 4px currentColor); }
  100% { opacity: 0.7; }
}
.battle-hud-header {
  background: rgba(10, 14, 22, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 16px !important;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
  position: relative;
  overflow: hidden;
}
/* Left Faction Accent Edge */
.battle-hud-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #38bdf8, transparent);
  opacity: 0.8;
}
/* Right Faction Accent Edge */
.battle-hud-header::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #f43f5e, transparent);
  opacity: 0.8;
}
/* Glowing Health Bar Fill */
.hud-hp-fill-anim {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 8px currentColor;
}
.hud-hp-fill-anim::after {
  content: '';
  position: absolute;
  inset: 0;
  background-size: 24px 24px;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.22) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.22) 75%,
    transparent 75%,
    transparent
  );
  animation: hud-bar-scan 1.2s linear infinite;
  pointer-events: none;
}
/* Glowing SP Bar Fill */
.hud-sp-fill-anim {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 6px currentColor;
}
.hud-sp-fill-anim::after {
  content: '';
  position: absolute;
  inset: 0;
  background-size: 24px 24px;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.18) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.18) 75%,
    transparent 75%,
    transparent
  );
  animation: hud-bar-scan 1.8s linear infinite;
  pointer-events: none;
}
/* Visor Bracket corners for panels */
.hud-tech-bracket {
  position: relative;
}
.hud-tech-bracket::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #38bdf8;
  border-left: 2px solid #38bdf8;
  pointer-events: none;
}
.hud-tech-bracket::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid #f43f5e;
  border-right: 2px solid #f43f5e;
  pointer-events: none;
}
/* AI intent strip (ally-only, low-churn) */
.ai-intent-strip {
  pointer-events: none;
  align-self: center;
  width: min(640px, 100%);
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(8, 12, 20, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.ai-intent-strip__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ai-intent-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  font-size: 11px;
  color: #cbd5e1;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.ai-intent-strip__title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}
.ai-intent-row--self {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(56, 189, 248, 0.18);
  padding: 6px 8px;
}
.ai-intent-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
.ai-intent-row--ally {
  font-size: 10px;
  padding: 2px 6px;
  opacity: 0.95;
}
.ai-intent-row--ally .ai-intent-row__who {
  color: #fbbf24;
  min-width: auto;
}
.ai-intent-row__who {
  font-weight: 800;
  color: #38bdf8;
  min-width: 2em;
}
.ai-intent-row--self .ai-intent-row__who {
  color: #7dd3fc;
}
.ai-intent-row__phase {
  font-weight: 700;
  color: #f8fafc;
}
.ai-intent-row__target,
.ai-intent-row__secondary {
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
}
.ai-intent-row__secondary {
  color: #94a3b8;
  font-weight: 500;
}
.ai-intent-row__fallback {
  font-weight: 800;
  font-size: 10px;
  color: #f87171;
  letter-spacing: 0.04em;
}
.ai-intent-row__thought {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-intent-row__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ai-intent-chip {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 4px;
  padding: 1px 5px;
}
.ai-intent-row--flash-target_switch {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  animation: ai-intent-flash 0.9s ease-in-out 2;
}
.ai-intent-row--flash-target_switch .ai-intent-row__target {
  color: #fbbf24;
  font-weight: 800;
}
.ai-intent-row--flash-fallback {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(239, 68, 68, 0.14);
  animation: ai-intent-flash 0.9s ease-in-out 2;
}
.ai-intent-row--flash-phase {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(56, 189, 248, 0.12);
  animation: ai-intent-flash 0.9s ease-in-out 2;
}
@keyframes ai-intent-flash {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.82;
  }
}
@media (max-width: 767px) {
  .ai-intent-strip {
    padding: 6px 10px;
  }
  .ai-intent-row__chips .ai-intent-chip:nth-child(n + 5) {
    display: none;
  }
}
/* Tactically themed buttons */
.hud-btn-action {
  font-family: "Outfit", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(10px) !important;
  transition: all 0.25s ease !important;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}
.hud-btn-action:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: currentColor !important;
  box-shadow: 
    0 0 14px currentColor,
    inset 0 1px 0 rgba(255,255,255,0.1) !important;
  transform: translateY(-1px);
}
.hud-btn-action:active {
  transform: translateY(1px);
}
/* ==========================================
   SETTLE PAGE — hologram / glassmorphism
   ========================================== */
.settle-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at center, rgba(15, 23, 42, 0.45) 0%, rgba(8, 12, 21, 0.96) 100%), url('../assets/settle_bg_new.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  overflow-y: auto;
  padding: 24px 12px;
  box-sizing: border-box;
  font-family: var(--font-body);
}
/* 叠在战场上的结算弹窗：透出终局画面，不再整页切图 */
.settle-backdrop.settle-overlay {
  background-image: none;
  background: rgba(6, 10, 18, 0.52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: settle-overlay-in 0.35s ease-out;
}
@keyframes settle-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.settle-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 28px 24px;
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.75);
}
.settle-overlay .settle-card {
  animation: settle-card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.settle-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
}
.settle-close-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(255, 255, 255, 0.28);
}
@keyframes settle-card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.settle-card.win {
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 
    0 30px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(0, 230, 118, 0.05);
}
.settle-card.loss {
  border-color: rgba(239, 68, 68, 0.25);
  box-shadow: 
    0 30px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(255, 23, 68, 0.05);
}
.settle-card.draw {
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 
    0 30px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(255, 214, 0, 0.05);
}
.settle-title-win,
.settle-title-loss,
.settle-title-draw {
  font-family: var(--font-title);
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: center;
  margin-bottom: 8px;
}
.settle-title-win {
  background: linear-gradient(135deg, #00e676 0%, #00b0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 230, 118, 0.25));
}
.settle-title-loss {
  background: linear-gradient(135deg, #ff1744 0%, #ff5252 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 23, 68, 0.25));
}
.settle-title-draw {
  background: linear-gradient(135deg, #ffd600 0%, #ffab00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 214, 0, 0.25));
}
.settle-subtitle {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.5;
}
.settle-team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-bottom: 16px;
}
.settle-team-card {
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  backdrop-filter: blur(4px);
}
.settle-team-card.blue {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
}
.settle-team-card.red {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.settle-team-title-blue,
.settle-team-title-red {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}
.settle-team-title-blue { color: #38bdf8; }
.settle-team-title-red { color: #f87171; }
.settle-team-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}
.settle-table-container {
  width: 100%;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 8px 14px;
  margin-bottom: 16px;
  box-sizing: border-box;
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.settle-table-header,
.settle-table-row {
  display: grid;
  width: 100%;
  max-width: 440px;
  /* 列宽更均衡，避免战车名把右侧三列顶到边缘 */
  grid-template-columns: 40px minmax(0, 1.35fr) minmax(52px, 0.85fr) minmax(40px, 0.55fr) minmax(64px, 0.9fr);
  align-items: center;
  justify-items: stretch;
  column-gap: 10px;
  padding: 9px 10px;
}
.settle-table-header {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.settle-table-header > span {
  text-align: center;
}
.settle-table-header > span:nth-child(1) {
  text-align: left;
}
.settle-table-header > span:nth-child(2) {
  text-align: left;
  padding-left: 2px;
}
.settle-table-row {
  font-family: var(--font-display);
  font-size: 12px;
  border-radius: 8px;
  margin: 3px 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}
.settle-table-row > * {
  min-width: 0;
}
.settle-table-row.is-me {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.25);
}
.settle-rank {
  font-weight: 800;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.settle-pilot {
  display: grid;
  grid-template-columns: 8px auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 5px;
  min-width: 0;
  overflow: hidden;
}
.settle-pilot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.settle-pilot-id {
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.settle-pilot-name {
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settle-bot-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fffbeb;
  background: rgba(245, 158, 11, 0.9);
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.2;
}
.settle-faction {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settle-kills {
  text-align: center;
  font-weight: 800;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
}
.settle-hp {
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.settle-hp.alive { color: #34d399; }
.settle-hp.dead { color: #f87171; }
.settle-reward-panel {
  background: rgba(15, 23, 42, 0.35);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px;
  width: 100%;
  text-align: center;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.settle-reward-label {
  font-family: var(--font-display);
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.settle-reward-value {
  font-family: var(--font-num);
  font-size: 30px;
  font-weight: 800;
  color: #00e676;
  margin-top: 4px;
  text-shadow: 0 0 16px rgba(0, 230, 118, 0.3);
}
.settle-ai-console {
  width: 100%;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: rgba(8, 12, 21, 0.75);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-left: 3px solid #0284c7;
  border-radius: 14px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 13px;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.settle-ai-header {
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.settle-ai-badge {
  font-size: 10px;
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(14, 165, 233, 0.15);
}
.settle-ai-summary {
  color: #94a3b8;
  margin-bottom: 4px;
  line-height: 1.5;
  font-weight: 400;
}
.settle-ai-advice {
  color: #f1f5f9;
  font-weight: 500;
  line-height: 1.55;
}
.settle-ai-top-rule {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #7dd3fc;
  line-height: 1.45;
}
.settle-btn-group {
  display: flex;
  gap: 12px;
  width: 100%;
}
.settle-btn-primary,
.settle-btn-secondary {
  flex: 1;
  padding: 12px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.settle-btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}
.settle-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45);
}
.settle-btn-secondary {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.settle-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
}
/* ── 大厅战车配置：紧凑按钮 + 弹窗图鉴 ── */
.lobby-loadout-panel--compact {
  margin-bottom: 14px;
}
.lobby-loadout-panel--compact .lobby-loadout-pickers {
  margin-bottom: 10px;
}
.lobby-loadout-pickers {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
}
.lobby-loadout-pick-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  text-align: left;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.lobby-loadout-pick-btn:hover {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(30, 41, 59, 0.9);
  transform: translateY(-1px);
}
.lobby-loadout-pick-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  white-space: nowrap;
}
.lobby-loadout-pick-body {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.lobby-loadout-pick-thumb {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 8px;
  padding: 3px;
}
.lobby-loadout-pick-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}
/* 武器贴图透明边多，略放大显示 */
.lobby-loadout-pick-thumb--weapon {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  overflow: hidden;
}
.lobby-loadout-pick-thumb--weapon img {
  transform: scale(1.45);
}
.lobby-loadout-pick-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lobby-loadout-pick-action {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
  white-space: nowrap;
}
.lobby-stats-grid--compact {
  margin-top: 0;
}
.lobby-loadout-modal {
  max-width: min(720px, 94vw);
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
}
.lobby-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}
.lobby-cards-grid--modal {
  max-height: none;
  flex: 1;
  overflow-y: auto;
  padding: 4px 2px 8px;
}
.lobby-item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  background: rgba(18, 21, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}
.lobby-item-card:hover {
  background: rgba(30, 35, 48, 0.85);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}
.lobby-item-card.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(30, 35, 48, 0.9) 100%);
  border-color: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}
.lobby-item-card.locked {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}
.lobby-item-card.locked:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(18, 21, 28, 0.7);
}
.lobby-card-lock {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
}
.lobby-card-thumb {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 4px;
}
.lobby-card-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.lobby-card-thumb--weapon {
  width: 64px;
  height: 64px;
  overflow: hidden;
}
.lobby-card-thumb--weapon img {
  transform: scale(1.5);
}
.lobby-card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.lobby-card-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.lobby-card-desc {
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lobby-card-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background: #f59e0b;
  color: #000;
  font-size: 9px;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* ── 商店 / 背包（移动端紧凑） ── */
.lobby-main:has(.shop-root) {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 168px);
}
.lobby-main:has(.shop-root) > .shop-root {
  flex: 1;
  min-height: 0;
}
.shop-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 12px 12px 8px;
  color: #fff;
}
.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.shop-panel-tabs {
  display: flex;
  gap: 6px;
}
.shop-panel-tab {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.55);
  color: #94a3b8;
  cursor: pointer;
}
.shop-panel-tab.active {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 165, 233, 0.22);
  color: #e0f2fe;
}
.shop-currency {
  display: flex;
  gap: 8px;
  align-items: center;
}
.shop-currency-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.shop-currency-chip--gold {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}
.shop-currency-chip--gem {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}
.shop-cat-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.shop-equip-subtabs {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
  flex-shrink: 0;
}
.shop-equip-subtab {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.65);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.shop-equip-subtab:hover {
  color: #e2e8f0;
  border-color: rgba(226, 232, 240, 0.45);
}
.shop-equip-subtab.active {
  color: #0f172a;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  border-color: transparent;
}
.shop-equip-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
  flex-shrink: 0;
}
.shop-cat-tab {
  flex: 1;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  cursor: pointer;
}
.shop-cat-tab.active.amber {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
}
.shop-cat-tab.active.sky,
.shop-cat-tab.active.cyan {
  border-color: #38bdf8;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
}
.shop-msg {
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.shop-msg--success {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  color: #34d399;
}
.shop-msg--error {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid #ef4444;
  color: #f87171;
}
.shop-msg-link {
  margin-left: 8px;
  border: none;
  background: transparent;
  color: #6ee7b7;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}
.shop-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 8px;
  align-content: start;
  align-items: stretch;
  -webkit-overflow-scrolling: touch;
}
.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}
.shop-card.owned {
  border-color: rgba(16, 185, 129, 0.4);
}
.shop-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  color: #fff;
}
.shop-badge.owned { background: #10b981; }
.shop-badge.qty { background: #0284c7; }
.shop-card-art {
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  border-radius: 6px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
}
.shop-card-art img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
}
.shop-card-art--weapon {
  height: 72px;
  overflow: hidden;
}
.shop-card-art--weapon img {
  transform: scale(1.35);
}
.shop-card-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}
.shop-card-name {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
  /* 标题最多两行，避免撑破等高 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.25em * 2);
}
.shop-card-desc {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* 固定 3 行占位，短文案卡片也不会变矮 */
  min-height: calc(1.35em * 3);
  flex: 1 1 auto;
}
.shop-card-foot {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  flex-shrink: 0;
}
.shop-price {
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  flex-shrink: 0;
  white-space: nowrap;
}
.shop-price.gold { color: #fbbf24; }
.shop-price.gem { color: #38bdf8; }
.shop-buy-btn {
  flex: 1;
  min-width: 0;
  width: auto;
  padding: 7px 10px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
}
.shop-buy-btn:disabled {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #64748b;
  cursor: not-allowed;
}
.shop-buy-btn.gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.shop-buy-btn.gem {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}
.shop-bag-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
/* 背包列表 */
.bag-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  color: #fff;
  box-sizing: border-box;
  padding: 16px 14px;
}
.bag-root--embedded {
  padding: 0;
}
.bag-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.bag-toolbar-text {
  min-width: 0;
  flex: 1;
}
.bag-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.bag-sub {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: #94a3b8;
}
.bag-refresh {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.15);
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.bag-state {
  margin-top: 36px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.bag-state--error {
  color: #f87171;
}
.bag-list {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.bag-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.bag-thumb {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bag-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bag-thumb--weapon img {
  object-fit: contain;
  transform: scale(1.4);
}
.bag-thumb-fallback {
  color: #64748b;
  font-size: 14px;
}
.bag-meta {
  min-width: 0;
  flex: 1;
}
.bag-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.bag-name {
  font-size: 13px;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bag-qty {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  color: #fbbf24;
}
.bag-tag {
  display: inline-block;
  margin-bottom: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.28);
}
.bag-desc {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #94a3b8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 720px) {
  .shop-root {
    padding: 20px 24px;
  }

  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
  }

  .shop-card-art {
    height: 100px;
  }

  .shop-card-art--weapon {
    height: 118px;
  }

  .shop-card-name {
    font-size: 14px;
  }

  .bag-name {
    font-size: 14px;
  }

  .bag-desc {
    font-size: 12px;
    -webkit-line-clamp: 3;
  }

  .bag-thumb {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
  }
}
@media (min-width: 1024px) {
  .shop-root {
    padding: 24px 32px;
  }

  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .shop-card-art {
    height: 120px;
  }

  .shop-card-art--weapon {
    height: 140px;
  }
}
/* ── 对局道具栏：默认收起，少挡视野 ── */
.battle-item-dock {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  z-index: 35;
}
.battle-item-fab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 48px;
  min-height: 56px;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(10, 14, 22, 0.78);
  color: #e0f2fe;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.battle-item-fab-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 1;
}
.battle-item-fab-count {
  font-size: 11px;
  font-weight: 900;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
}
.battle-item-tray {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  width: 56px;
  background: rgba(10, 14, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.battle-item-tray-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.04em;
}
.battle-item-collapse {
  width: 22px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.battle-item-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.battle-item-slot {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.95);
  overflow: hidden;
  cursor: pointer;
}
.battle-item-slot:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.battle-item-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.battle-item-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #94a3b8;
  font-size: 12px;
}
.battle-item-qty {
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-size: 10px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
  padding: 0 3px;
  line-height: 13px;
}
.battle-item-inline-notice,
.battle-item-toast {
  font-size: 10px;
  color: #f87171;
  text-align: center;
  line-height: 1.3;
}
.battle-item-inline-notice {
  max-width: 40px;
}
.battle-item-toast {
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 36;
  background: rgba(10, 14, 22, 0.85);
  border: 1px solid rgba(248, 113, 113, 0.35);
  padding: 6px 8px;
  border-radius: 8px;
  max-width: 120px;
}
.battle-item-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 80;
  padding: 16px;
}
.battle-item-modal {
  width: min(320px, 100%);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.battle-item-modal h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #f8fafc;
}
.battle-item-modal-name {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}
.battle-item-modal-desc {
  margin: 0 0 16px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}
.battle-item-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.battle-item-modal-actions button {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
}
.battle-item-modal-actions button.ok {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 165, 233, 0.25);
  color: #e0f2fe;
  font-weight: 700;
}
@media (min-width: 768px) {
  .battle-item-fab {
    width: 52px;
  }

  .battle-item-tray {
    width: 60px;
  }

  .battle-item-slot {
    width: 48px;
    height: 48px;
  }
}
/* ── 图鉴 Gallery：移动端纵向堆叠，宽屏再左右分栏 ── */
.gallery-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-height: 0;
  color: #fff;
  overflow: hidden;
}
.gallery-picker {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  max-height: 42%;
  min-height: 0;
  background: rgba(15, 23, 42, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.gallery-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 12px 0;
  flex-shrink: 0;
}
.gallery-tab {
  flex: 1;
  padding: 10px 0;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: #94a3b8;
  font-weight: 700;
  cursor: pointer;
}
.gallery-tab.active.chassis {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
.gallery-tab.active.weapon {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}
.gallery-grid-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.gallery-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.15s, background 0.15s;
}
.gallery-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
}
.gallery-card--weapon {
  overflow: hidden;
}
.gallery-card--weapon img {
  transform: scale(1.4);
}
.gallery-card span {
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  white-space: normal;
}
.gallery-card.active.chassis {
  background: rgba(59, 130, 246, 0.22);
  border-color: #3b82f6;
}
.gallery-card.active.weapon {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
}
/* 手机隐藏中间大预览，详情里已有示意图 */
.gallery-preview {
  display: none;
}
.gallery-detail {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.82);
  -webkit-overflow-scrolling: touch;
}
.gallery-detail-body {
  padding: 16px 14px 28px;
}
.gallery-detail-title {
  margin: 0 0 8px;
  font-size: clamp(20px, 5.5vw, 28px);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.gallery-detail-desc {
  margin: 0 0 18px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}
.gallery-stat {
  margin-bottom: 14px;
}
.gallery-stat-label {
  color: #cbd5e1;
  margin-bottom: 6px;
  font-size: 13px;
}
.gallery-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gallery-stat-track {
  flex: 1;
  min-width: 0;
  background: #1e293b;
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
}
.gallery-stat-fill {
  height: 100%;
  border-radius: 6px;
}
.gallery-stat-value {
  flex: 0 0 auto;
  min-width: 52px;
  color: #fff;
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.gallery-sp-bonus {
  color: #38bdf8;
  font-weight: 700;
}
.gallery-schematic {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gallery-schematic-label {
  color: #94a3b8;
  font-size: 12px;
  margin-bottom: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.gallery-schematic-ring {
  position: relative;
  width: min(220px, 58vw);
  height: min(220px, 58vw);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
}
.gallery-schematic-ring--weapon {
  border-color: rgba(245, 158, 11, 0.25);
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
}
.gallery-schematic-scan {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border-top: 2px solid #38bdf8;
  opacity: 0.6;
  animation: gallery-spin 4s linear infinite;
}
.gallery-schematic-ring--weapon .gallery-schematic-scan {
  border-top-color: #f59e0b;
}
.gallery-schematic-cross-h,
.gallery-schematic-cross-v {
  position: absolute;
  background: rgba(56, 189, 248, 0.25);
}
.gallery-schematic-ring--weapon .gallery-schematic-cross-h,
.gallery-schematic-ring--weapon .gallery-schematic-cross-v {
  background: rgba(245, 158, 11, 0.25);
}
.gallery-schematic-cross-h {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
}
.gallery-schematic-cross-v {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
}
.gallery-schematic-img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  animation: gallery-spin 15s linear infinite;
  position: relative;
  z-index: 1;
}
.gallery-schematic-ring--weapon .gallery-schematic-img {
  width: 100%;
  height: 100%;
}
@keyframes gallery-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes gallery-hover-float {
  0%, 100% { transform: translateY(-4%); }
  50% { transform: translateY(-9%); }
}
/* 平板：列表略大，仍上下结构 */
@media (min-width: 720px) {
  .gallery-picker {
    max-height: 38%;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .gallery-detail-body {
    padding: 20px 24px 32px;
  }

  .gallery-schematic-ring {
    width: 260px;
    height: 260px;
  }
}
/* 宽屏：左列表 | 中预览 | 右详情 */
@media (min-width: 1024px) {
  .gallery-root {
    flex-direction: row;
  }

  .gallery-picker {
    width: 300px;
    max-height: none;
    height: 100%;
    flex: 0 0 300px;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-preview {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #1e293b 0%, #020617 100%);
  }

  .gallery-preview-glow {
    position: absolute;
    bottom: 15%;
    width: 60%;
    height: 100px;
    background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
    transform: rotateX(70deg);
  }

  .gallery-preview--weapon .gallery-preview-glow {
    background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
  }

  .gallery-preview-img {
    width: min(60%, 520px);
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 40px rgba(56, 189, 248, 0.3));
    animation: gallery-hover-float 4s ease-in-out infinite;
  }

  .gallery-preview--weapon .gallery-preview-img {
    width: min(78%, 620px);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 40px rgba(245, 158, 11, 0.3));
  }

  .gallery-detail {
    width: 360px;
    flex: 0 0 360px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }

  .gallery-schematic-ring {
    width: 240px;
    height: 240px;
  }
}
@media (min-width: 1280px) {
  .gallery-picker {
    width: 320px;
    flex-basis: 320px;
  }

  .gallery-detail {
    width: 400px;
    flex-basis: 400px;
  }

  .gallery-schematic-ring {
    width: 280px;
    height: 280px;
  }
}
/* ── Mail panel (mobile-friendly sheet) ── */
.mail-panel {
  width: min(920px, 100%);
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
}
.mail-panel-msg {
  margin: 0 16px 8px;
  color: #7dd3fc;
  font-size: 13px;
}
.mail-panel-body {
  display: grid;
  grid-template-columns: minmax(140px, 34%) 1fr;
  gap: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mail-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.mail-list-item {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.45);
  color: #e2e8f0;
  cursor: pointer;
}
.mail-list-item.unread {
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(14, 116, 144, 0.18);
}
.mail-list-item.active {
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(99, 102, 241, 0.18);
}
.mail-list-title {
  font-size: 13px;
  font-weight: 600;
}
.mail-list-meta {
  font-size: 11px;
  color: #94a3b8;
}
.mail-detail {
  padding: 14px 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mail-detail-title {
  margin: 0 0 8px;
  font-size: 16px;
}
.mail-detail-from,
.mail-detail-body,
.mail-detail-placeholder {
  margin: 0 0 10px;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
}
.mail-atts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.mail-att-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.mail-claim-btn {
  width: 100%;
  min-height: 44px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: #0f172a;
  background: linear-gradient(180deg, #fde68a, #fbbf24);
}
.mail-claim-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
@media (max-width: 720px) {
  .mail-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }
  .lobby-history-modal-backdrop:has(.mail-panel) {
    align-items: flex-end;
  }
  .mail-panel-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(120px, 38%) 1fr;
  }
  .mail-list {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: none;
  }
  .mail-claim-btn {
    min-height: 48px;
  }
}
/* 战斗日志基础样式 */
.battle-log-panel {
  position: absolute;
  width: 140px;
  max-height: 28vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 25;
  pointer-events: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}

.battle-log-panel--default {
  right: 8px;
  top: 72px;
  max-height: 38vh;
}

.battle-log-panel--top-left {
  left: 8px;
  top: 95px;
}

.battle-log-panel--bottom-right {
  right: 8px;
  bottom: 160px;
}

.battle-log-panel::-webkit-scrollbar {
  width: 4px;
}

.battle-log-panel::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.22);
  border-radius: 4px;
}

.battle-log-panel::-webkit-scrollbar-track {
  background: transparent;
}

.battle-log-panel__line {
  font-size: 10.5px;
  line-height: 1.4;
  color: rgba(255,255,255,0.78);
  text-shadow: 0 1px 3px rgba(0,0,0,0.95), 0 0 6px rgba(0,0,0,0.5);
  word-break: break-word;
  flex-shrink: 0;
}

.battle-log-panel__line--round {
  color: #c7d2fe;
}

.battle-log-panel__line--combo {
  color: #f472b6;
}

.app-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}@keyframes aiPickFly {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2) translateY(-20px); opacity: 0.8; }
  100% { transform: scale(0.5) translate(-100vw, -50vh); opacity: 0; }
}
.prep-card--ai-picking {
  animation: aiPickFly 0.6s ease-in forwards;
  z-index: 999;
}
