/* ============================================================
 * 卡通前线 — 全套 UI 样式
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0b1420; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; color: #fff; }
canvas { display: block; }
.hidden { display: none !important; }

#app { position: fixed; inset: 0; }
#app canvas { position: absolute; inset: 0; }

/* ============ 通用屏幕 ============ */
.screen {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(10, 25, 45, 0.55) 0%, rgba(5, 12, 24, 0.82) 100%);
  backdrop-filter: blur(2px);
}
.menu-inner { text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }

.game-title {
  font-size: 84px; font-weight: 900; letter-spacing: 10px;
  color: #ffd54a;
  text-shadow: 0 4px 0 #c77d1e, 0 8px 0 rgba(0,0,0,0.35), 0 0 40px rgba(255, 213, 74, 0.35);
  display: flex; flex-direction: column; line-height: 1.1;
}
.title-sub { font-size: 20px; letter-spacing: 14px; color: #9fd8ff; text-shadow: 0 2px 0 rgba(0,0,0,0.5); }
.menu-desc { font-size: 18px; color: #cde6ff; margin-bottom: 12px; }
.menu-tip { font-size: 13px; color: #7fa8c9; margin-top: 18px; }

.big-btn {
  font-family: inherit; font-size: 26px; font-weight: 800; letter-spacing: 4px;
  padding: 16px 64px; border: none; border-radius: 14px; cursor: pointer;
  color: #4a2c00; background: linear-gradient(180deg, #ffd54a, #ffb52e);
  box-shadow: 0 6px 0 #c77d1e, 0 10px 18px rgba(0,0,0,0.4);
  transition: transform 0.08s, box-shadow 0.08s;
}
.big-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #c77d1e, 0 14px 22px rgba(0,0,0,0.45); }
.big-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #c77d1e; }

.menu-btn {
  font-family: inherit; font-size: 17px; font-weight: 600; letter-spacing: 2px;
  padding: 10px 42px; border: 2px solid rgba(160, 210, 255, 0.5); border-radius: 10px;
  cursor: pointer; color: #cde6ff; background: rgba(30, 60, 100, 0.35);
  transition: background 0.12s, border-color 0.12s;
}
.menu-btn:hover { background: rgba(60, 110, 170, 0.5); border-color: #9fd8ff; }

.blue-text { color: #4d9bff; } .red-text { color: #ff6a57; }

/* ============ HUD ============ */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }

/* 准星 */
#crosshair { position: absolute; left: 50%; top: 50%; --gap: 8px; }
.ch-line { position: absolute; background: #fff; box-shadow: 0 0 3px rgba(0,0,0,0.8); border-radius: 2px; }
.ch-t { width: 2.5px; height: 9px; left: -1.25px; top: calc(-1 * var(--gap) - 9px); }
.ch-b { width: 2.5px; height: 9px; left: -1.25px; top: var(--gap); }
.ch-l { width: 9px; height: 2.5px; top: -1.25px; left: calc(-1 * var(--gap) - 9px); }
.ch-r { width: 9px; height: 2.5px; top: -1.25px; left: var(--gap); }
.ch-dot { position: absolute; width: 3px; height: 3px; left: -1.5px; top: -1.5px; background: #fff; border-radius: 50%; box-shadow: 0 0 3px rgba(0,0,0,0.8); }

/* 命中标记 */
#hitmarker { position: absolute; left: 50%; top: 50%; opacity: 0; }
#hitmarker span { position: absolute; width: 11px; height: 2.5px; background: #fff; border-radius: 2px; box-shadow: 0 0 4px rgba(0,0,0,0.7); }
#hitmarker span:nth-child(1) { transform: translate(-13px, -10px) rotate(45deg); }
#hitmarker span:nth-child(2) { transform: translate(3px, -10px) rotate(-45deg); }
#hitmarker span:nth-child(3) { transform: translate(-13px, 8px) rotate(-45deg); }
#hitmarker span:nth-child(4) { transform: translate(3px, 8px) rotate(45deg); }
#hitmarker.show { animation: hitPop 0.22s ease-out; }
#hitmarker.kill span { background: #ff5340; width: 15px; }
@keyframes hitPop { 0% { opacity: 1; transform: scale(1.5); } 100% { opacity: 0; transform: scale(0.9); } }

/* 狙击镜 */
#scopeOverlay { position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 26%, rgba(0,0,0,0.985) 27.5%); }
.scope-circle { position: absolute; left: 50%; top: 50%; width: 56vmin; height: 56vmin; transform: translate(-50%, -50%); border-radius: 50%; border: 3px solid #111; box-shadow: inset 0 0 60px rgba(0,0,0,0.6); }
.scope-line { position: absolute; background: rgba(20, 20, 20, 0.9); }
.scope-h { left: 22%; right: 22%; top: 50%; height: 1.5px; }
.scope-v { top: 22%; bottom: 22%; left: 50%; width: 1.5px; }

/* 顶部条 */
#topBar {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
  background: rgba(8, 18, 32, 0.55); padding: 8px 22px; border-radius: 14px;
  border: 1px solid rgba(150, 200, 255, 0.18);
}
.tickets { font-size: 26px; font-weight: 900; display: flex; align-items: center; gap: 8px; text-shadow: 0 2px 3px rgba(0,0,0,0.6); }
.tickets-blue { color: #4d9bff; } .tickets-red { color: #ff6a57; }
.team-dot { width: 13px; height: 13px; border-radius: 50%; display: inline-block; }
.dot-blue { background: #4d9bff; box-shadow: 0 0 8px #4d9bff; }
.dot-red { background: #ff6a57; box-shadow: 0 0 8px #ff6a57; }

#flagRow { display: flex; gap: 8px; }
.flag-chip {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 17px; color: #fff;
  background: #6a7684; border: 2px solid rgba(255,255,255,0.25);
  position: relative; overflow: hidden; text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  transition: background 0.3s;
}
.flag-chip .fc-fill { position: absolute; left: 0; bottom: 0; right: 0; background: rgba(255,255,255,0.35); height: 0%; }
.flag-chip.owner-blue { background: #2f6fd0; }
.flag-chip.owner-red { background: #d0402f; }
.flag-chip.contested { animation: contestBlink 0.8s infinite; }
@keyframes contestBlink { 0%, 100% { border-color: rgba(255,255,255,0.25); } 50% { border-color: #ffd54a; } }

/* 占点进度 */
#captureWrap { position: absolute; top: 84px; left: 50%; transform: translateX(-50%); text-align: center; }
#captureLabel { font-size: 16px; font-weight: 700; text-shadow: 0 2px 3px rgba(0,0,0,0.7); margin-bottom: 5px; }
#captureBarBg { width: 240px; height: 10px; background: rgba(0,0,0,0.5); border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,0.25); }
#captureBar { height: 100%; width: 0%; background: linear-gradient(90deg, #ffd54a, #ffb52e); border-radius: 6px; transition: width 0.1s linear; }

/* 击杀信息流 */
#killfeed { position: absolute; top: 76px; right: 18px; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.kf-row {
  background: rgba(8, 18, 32, 0.6); padding: 4px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 600; animation: kfIn 0.25s ease-out;
  border: 1px solid rgba(150, 200, 255, 0.12);
}
.kf-row .kf-blue { color: #4d9bff; } .kf-row .kf-red { color: #ff6a57; } .kf-row .kf-grey { color: #aab8c5; }
.kf-row .kf-weapon { color: #ffd54a; margin: 0 7px; font-weight: 400; font-size: 13px; }
.kf-row.kf-me { border-color: #ffd54a; background: rgba(60, 45, 8, 0.7); }
@keyframes kfIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 得分提示 */
#scorePopups { position: absolute; top: 56%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.score-pop { font-size: 20px; font-weight: 900; color: #ffd54a; text-shadow: 0 2px 4px rgba(0,0,0,0.8); animation: scoreUp 1.1s ease-out forwards; }
@keyframes scoreUp { 0% { transform: translateY(10px); opacity: 0; } 15% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-26px); opacity: 0; } }

/* 左下 */
#leftBottom { position: absolute; left: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
#minimap {
  border-radius: 12px; border: 2px solid rgba(150, 200, 255, 0.3);
  background: rgba(8, 18, 32, 0.6); box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
#healthWrap { display: flex; align-items: center; gap: 10px; }
#healthBarBg { width: 170px; height: 14px; background: rgba(0,0,0,0.55); border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.25); }
#healthBar { height: 100%; width: 100%; background: linear-gradient(90deg, #57d96b, #2fb648); border-radius: 8px; transition: width 0.15s; }
#healthBar.low { background: linear-gradient(90deg, #ff6a57, #d0402f); }
#healthNum { font-size: 22px; font-weight: 900; text-shadow: 0 2px 3px rgba(0,0,0,0.7); min-width: 40px; }

/* 右下武器 */
#ammoWrap { position: absolute; right: 22px; bottom: 18px; text-align: right; }
#weaponName { font-size: 17px; font-weight: 700; color: #cde6ff; text-shadow: 0 2px 3px rgba(0,0,0,0.7); }
#ammoLine { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; }
#magAmmo { font-size: 46px; font-weight: 900; text-shadow: 0 3px 5px rgba(0,0,0,0.7); }
#magAmmo.low { color: #ff6a57; }
#reserveAmmo { font-size: 20px; color: #9fb8d0; font-weight: 700; }
#gearLine { display: flex; justify-content: flex-end; gap: 14px; font-size: 15px; color: #cde6ff; margin-top: 2px; }
#gearLine b { margin-left: 3px; font-size: 17px; }
#fireMode { color: #ffd54a; font-weight: 700; }
#slotHints { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; font-size: 11px; color: rgba(160, 190, 220, 0.55); }

/* 反馈层 */
#dmgVignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(255, 30, 20, 0); transition: box-shadow 0.1s; }
#dmgVignette.hurt { box-shadow: inset 0 0 140px rgba(255, 30, 20, 0.75); }
#dmgVignette.critical { box-shadow: inset 0 0 160px rgba(255, 30, 20, 0.55); animation: heartbeat 1s infinite; }
@keyframes heartbeat { 0%, 100% { box-shadow: inset 0 0 130px rgba(255, 30, 20, 0.45); } 50% { box-shadow: inset 0 0 170px rgba(255, 30, 20, 0.7); } }
#healFlash { position: absolute; inset: 0; background: rgba(80, 255, 130, 0); transition: background 0.35s; }
#healFlash.show { background: rgba(80, 255, 130, 0.12); transition: background 0.05s; }

/* 方向伤害指示 */
#dmgIndicators { position: absolute; left: 50%; top: 50%; }
.dmg-arc {
  position: absolute; width: 120px; height: 120px; left: -60px; top: -60px;
  animation: arcFade 1s forwards;
}
.dmg-arc::before {
  content: ''; position: absolute; left: 50%; top: -46px; transform: translateX(-50%);
  border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-bottom: 22px solid rgba(255, 60, 40, 0.85);
  border-radius: 4px;
}
@keyframes arcFade { from { opacity: 1; } to { opacity: 0; } }

/* 伤害数字 */
#dmgLayer { position: absolute; inset: 0; overflow: hidden; }
.dmg-num {
  position: absolute; font-size: 19px; font-weight: 900; color: #fff;
  text-shadow: 0 0 4px rgba(0,0,0,0.9); transform: translate(-50%, -50%);
  display: none;
}
.dmg-num.head { color: #ffd54a; font-size: 23px; }
.dmg-num.kill { color: #ff5340; font-size: 26px; }
.dmg-num.pop { animation: dmgFloat 0.75s ease-out forwards; }
@keyframes dmgFloat { 0% { opacity: 0; margin-top: 6px; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; margin-top: -34px; } }

/* 出界 */
#oobWarn {
  position: absolute; top: 30%; left: 50%; transform: translateX(-50%);
  font-size: 26px; font-weight: 900; color: #ff5340;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8); animation: contestBlink 0.5s infinite;
}

/* 阵亡 */
#deathScreen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: rgba(60, 0, 0, 0.35);
}
.death-title { font-size: 64px; font-weight: 900; color: #ff5340; text-shadow: 0 4px 8px rgba(0,0,0,0.8); letter-spacing: 8px; }
.death-killer { font-size: 20px; color: #ffd0c8; margin-top: 12px; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

#fps { position: absolute; top: 8px; right: 10px; font-size: 11px; color: rgba(160, 190, 220, 0.5); }
#vehicleHint {
  position: fixed; left: 50%; bottom: 118px; transform: translateX(-50%);
  z-index: 45; padding: 8px 18px; border-radius: 10px;
  background: rgba(8, 18, 32, 0.78); border: 1px solid rgba(255, 213, 74, 0.42);
  color: #ffd54a; font-size: 16px; font-weight: 900; letter-spacing: 2px;
  text-shadow: 0 2px 3px rgba(0,0,0,0.7); pointer-events: none;
}

/* ============ 记分板 ============ */
#scoreboard {
  position: fixed; z-index: 40; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(860px, 92vw); background: rgba(8, 18, 32, 0.92);
  border: 1px solid rgba(150, 200, 255, 0.25); border-radius: 16px; padding: 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.sb-title { text-align: center; font-size: 20px; font-weight: 800; margin-bottom: 14px; color: #ffd54a; }
.sb-cols { display: flex; gap: 18px; }
.sb-team { flex: 1; }
.sb-team-head { font-size: 17px; font-weight: 800; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 2px solid rgba(255,255,255,0.15); }
.sb-row { display: grid; grid-template-columns: 1fr 44px 44px 44px 60px; font-size: 13.5px; padding: 3px 6px; border-radius: 6px; color: #d7e6f5; }
.sb-row.sb-head-row { color: #8fa8c0; font-size: 12px; }
.sb-row.me { background: rgba(255, 213, 74, 0.18); color: #ffd54a; font-weight: 700; }
.sb-row span:not(:first-child) { text-align: center; }

/* ============ 部署界面 ============ */
#deployScreen { flex-direction: column; }
.deploy-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; max-height: 96vh; overflow-y: auto; padding: 4px 8px; }
.deploy-title { font-size: 34px; font-weight: 900; color: #ffd54a; letter-spacing: 6px; text-shadow: 0 3px 0 rgba(0,0,0,0.4); }
.deploy-cols { display: flex; gap: 26px; align-items: flex-start; }
.panel-label { font-size: 15px; color: #9fd8ff; margin-bottom: 8px; font-weight: 600; }
#deployMap { border-radius: 14px; border: 2px solid rgba(150, 200, 255, 0.35); cursor: pointer; background: #123; }
#spawnLabel { text-align: center; margin-top: 8px; font-size: 15px; color: #ffd54a; font-weight: 700; }
#spawnOptions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.spawn-option {
  min-width: 0; min-height: 48px; padding: 7px 9px; border: 1px solid rgba(150, 200, 255, 0.3);
  border-radius: 8px; cursor: pointer; color: #fff; background: rgba(20, 40, 68, 0.72);
  font-family: inherit; letter-spacing: 0; text-align: left; transition: background 0.12s, border-color 0.12s;
}
.spawn-option:hover { background: rgba(50, 90, 135, 0.82); border-color: #9fd8ff; }
.spawn-option.selected { border-color: #ffd54a; background: rgba(70, 55, 12, 0.72); box-shadow: 0 0 10px rgba(255, 213, 74, 0.2); }
.spawn-option .so-name { display: block; font-size: 13px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.spawn-option .so-meta { display: block; margin-top: 2px; color: #9fb8d0; font-size: 10px; line-height: 1.2; }
.spawn-option.contested .so-meta { color: #ffd54a; }
.deploy-right { width: 380px; }
#loadoutCards { display: flex; flex-direction: column; gap: 7px; max-height: 340px; overflow-y: auto; padding-right: 6px; }
#loadoutCards::-webkit-scrollbar { width: 6px; }
#loadoutCards::-webkit-scrollbar-thumb { background: rgba(150,200,255,0.3); border-radius: 3px; }
.weapon-card {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(20, 40, 68, 0.6); border: 2px solid rgba(150, 200, 255, 0.15);
  border-radius: 10px; padding: 8px 14px; cursor: pointer; transition: border-color 0.1s, background 0.1s;
}
.weapon-card:hover { background: rgba(35, 65, 100, 0.7); }
.weapon-card.selected { border-color: #ffd54a; background: rgba(70, 55, 12, 0.55); }
.wc-name { font-size: 16px; font-weight: 800; }
.wc-desc { font-size: 12px; color: #9fb8d0; margin-top: 2px; }
.wc-stats { display: flex; flex-direction: column; gap: 2px; }
.wc-stat { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #8fa8c0; }
.wc-bar { width: 60px; height: 5px; background: rgba(0,0,0,0.5); border-radius: 3px; overflow: hidden; }
.wc-bar i { display: block; height: 100%; background: #ffd54a; border-radius: 3px; }
.deploy-tickets { font-size: 16px; font-weight: 700; }

/* ============ 结算 ============ */
.go-title { font-size: 72px; font-weight: 900; letter-spacing: 10px; text-shadow: 0 4px 0 rgba(0,0,0,0.4), 0 0 50px currentColor; }
.go-title.win { color: #ffd54a; } .go-title.lose { color: #ff6a57; }
.go-stats { font-size: 18px; color: #cde6ff; line-height: 2; }
.pause-title { font-size: 52px; font-weight: 900; letter-spacing: 10px; color: #9fd8ff; text-shadow: 0 4px 0 rgba(0,0,0,0.4); }

/* ============ 弹出面板 ============ */
.overlay-panel {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}
.panel-box {
  background: rgba(10, 24, 42, 0.96); border: 1px solid rgba(150, 200, 255, 0.3);
  border-radius: 16px; padding: 28px 36px; min-width: 420px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.7);
}
.panel-title { font-size: 24px; font-weight: 900; color: #ffd54a; text-align: center; margin-bottom: 6px; }
.setting-row { display: flex; align-items: center; gap: 12px; }
.setting-row label { width: 110px; font-size: 15px; color: #cde6ff; }
.setting-row input[type=range] { flex: 1; accent-color: #ffd54a; }
.setting-row select {
  flex: 1; background: rgba(20, 40, 68, 0.9); color: #fff; border: 1px solid rgba(150,200,255,0.3);
  border-radius: 6px; padding: 5px 8px; font-family: inherit; font-size: 14px;
}
.setting-row span { min-width: 40px; text-align: right; font-size: 14px; color: #ffd54a; }
.setting-note { font-size: 11px !important; color: #7fa8c9 !important; }
.help-grid { display: grid; grid-template-columns: 150px 1fr; gap: 7px 16px; font-size: 15px; }
.help-grid span:nth-child(odd) { color: #ffd54a; font-weight: 700; text-align: right; }
.help-goal { font-size: 14px; color: #9fd8ff; line-height: 1.6; max-width: 420px; margin-top: 8px; }

/* ============ 主菜单：生涯档案卡 + 模式选择 ============ */
.menu-inner { max-height: 97vh; overflow-y: auto; padding: 8px; }
.menu-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

#profileCard {
  background: rgba(8, 18, 32, 0.62); border: 1px solid rgba(150, 200, 255, 0.25);
  border-radius: 14px; padding: 13px 22px; display: flex; flex-direction: column; gap: 9px;
  min-width: 470px;
}
.pc-rank { display: flex; align-items: center; gap: 14px; text-align: left; }
#pcRankIcon { font-size: 38px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5)); }
.pc-rank-info { flex: 1; }
#pcRankName { font-size: 18px; font-weight: 800; color: #ffd54a; }
.pc-xpbar {
  height: 8px; background: rgba(0,0,0,0.5); border-radius: 5px; overflow: hidden;
  margin: 5px 0 3px; border: 1px solid rgba(255,255,255,0.15);
}
.pc-xpbar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #ffd54a, #ffb52e); border-radius: 5px; transition: width 0.5s ease-out; }
#pcXpText { font-size: 11.5px; color: #8fa8c0; }
.pc-stats { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #9fb8d0; }
.pc-stats b { color: #fff; margin-left: 4px; }

.selector-group { display: grid; gap: 6px; width: max-content; max-width: 92vw; }
.selector-label {
  color: #9fd8ff; font-size: 12px; font-weight: 800; text-align: left;
  letter-spacing: 0; text-transform: uppercase;
}
#modeSelect, #mapSelect { display: flex; gap: 14px; }
.mode-card {
  width: 225px; background: rgba(20, 40, 68, 0.6); border: 2px solid rgba(150, 200, 255, 0.2);
  border-radius: 14px; padding: 13px 10px 12px; cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
}
.mode-card:hover { transform: translateY(-2px); background: rgba(35, 65, 100, 0.7); }
.mode-card.selected { border-color: #ffd54a; background: rgba(70, 55, 12, 0.55); box-shadow: 0 0 18px rgba(255, 213, 74, 0.25); }
.mc-icon { font-size: 29px; }
.mc-name { font-size: 19px; font-weight: 800; margin: 4px 0 6px; }
.mc-desc { font-size: 12px; color: #9fb8d0; line-height: 1.5; }
.map-card {
  width: 345px; min-height: 62px; padding: 9px 14px;
  display: grid; grid-template-columns: 45px 1fr; grid-template-rows: auto auto;
  column-gap: 10px; text-align: left; align-content: center;
}
.map-card .mc-icon { grid-row: 1 / 3; align-self: center; text-align: center; }
.map-card .mc-name { margin: 0 0 2px; font-size: 17px; }

/* ============ TDM 顶栏信息 ============ */
#tdmInfo { display: flex; flex-direction: column; align-items: center; line-height: 1.25; min-width: 90px; }
#tdmTimer { font-size: 22px; font-weight: 900; color: #ffd54a; text-shadow: 0 2px 3px rgba(0,0,0,0.6); }
#tdmTarget { font-size: 11px; color: #9fb8d0; }

/* ============ 连杀播报 ============ */
#streakBanner {
  position: absolute; top: 23%; left: 50%; transform: translateX(-50%);
  font-size: 44px; font-weight: 900; color: #ffd54a; letter-spacing: 4px; white-space: nowrap;
  text-shadow: 0 3px 0 #c77d1e, 0 6px 16px rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none;
}
#streakBanner.show { animation: streakPop 1.7s ease-out forwards; }
@keyframes streakPop {
  0% { opacity: 0; transform: translateX(-50%) scale(0.55); }
  12% { opacity: 1; transform: translateX(-50%) scale(1.18); }
  22% { transform: translateX(-50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(1); }
}

/* ============ 结算 XP ============ */
.go-xp {
  width: 400px; max-width: 90vw; background: rgba(8, 18, 32, 0.62);
  border: 1px solid rgba(150, 200, 255, 0.25); border-radius: 12px; padding: 13px 18px;
}
.go-xp-line { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800; margin-bottom: 8px; }
#goXpGain { color: #57d96b; }
#goRankName { color: #ffd54a; }
.go-levelup { margin-top: 8px; font-size: 18px; font-weight: 900; color: #ffd54a; animation: contestBlink 0.7s infinite; }

/* ============ 移动端触屏控制 ============ */
#touchUI { position: fixed; inset: 0; z-index: 30; display: none; pointer-events: none; }
.touch-mode.state-playing #touchUI { display: block; }
#tJoyZone, #tLookZone { position: absolute; top: 18%; bottom: 0; touch-action: none; pointer-events: auto; }
#tJoyZone { left: 0; width: 44%; }
#tLookZone { right: 0; width: 56%; }
#tJoyBase {
  position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.07); display: none;
}
#tJoyBase.active { display: block; }
#tJoyStick {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: rgba(255,255,255,0.45); box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
#tJoyStick.sprint { background: rgba(255, 213, 74, 0.85); }

.t-btn {
  position: absolute; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(10, 25, 45, 0.5); border: 2px solid rgba(255,255,255,0.3);
  font-size: 22px; touch-action: none; pointer-events: auto;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6); box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.t-btn.pressed { background: rgba(255, 213, 74, 0.5); transform: scale(0.94); }
.t-btn.on { border-color: #ffd54a; background: rgba(255, 213, 74, 0.32); }
#tPause { right: 12px; top: 8px; width: 42px; height: 42px; font-size: 17px; border-radius: 12px; }
#tFire { right: 104px; bottom: 58px; width: 92px; height: 92px; font-size: 36px; background: rgba(200, 60, 40, 0.4); }
#tFireL { left: 22px; bottom: 246px; width: 64px; height: 64px; font-size: 26px; background: rgba(200, 60, 40, 0.35); }
#tJump { right: 22px; bottom: 58px; width: 66px; height: 66px; }
#tAds { right: 26px; bottom: 150px; width: 56px; height: 56px; }
#tMed { right: 28px; bottom: 226px; width: 50px; height: 50px; font-size: 19px; }
#tNade { right: 118px; bottom: 172px; width: 56px; height: 56px; }
#tMelee { right: 196px; bottom: 130px; width: 50px; height: 50px; font-size: 19px; }
#tReload { right: 208px; bottom: 40px; width: 54px; height: 54px; }
#tSwap { right: 288px; bottom: 26px; width: 48px; height: 48px; font-size: 18px; }
#tCrouch { left: 26px; bottom: 156px; width: 54px; height: 54px; font-size: 20px; }

/* 触屏模式下的 HUD 重排 */
.touch-mode #slotHints, .touch-mode #fps { display: none; }
.touch-mode #ammoWrap { right: 64px; top: 52px; bottom: auto; transform: scale(0.82); transform-origin: top right; }
.touch-mode #leftBottom { left: 8px; top: 56px; bottom: auto; transform: scale(0.72); transform-origin: top left; }
.touch-mode #topBar { top: 6px; padding: 5px 14px; gap: 12px; transform: translateX(-50%) scale(0.9); }
.touch-mode #killfeed { top: 148px; right: 10px; transform: scale(0.85); transform-origin: top right; }
.touch-mode .menu-tip { display: none; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .game-title { font-size: 46px; letter-spacing: 6px; }
  .title-sub { font-size: 14px; letter-spacing: 8px; }
  .deploy-cols { flex-direction: column; align-items: center; gap: 10px; }
  .deploy-right { width: min(380px, 92vw); }
  #deployMap { width: min(300px, 80vw); height: auto; }
  #spawnOptions { width: min(300px, 80vw); }
  .deploy-title { font-size: 24px; }
  #loadoutCards { max-height: 200px; }
  #profileCard { min-width: 0; width: 92vw; max-width: 470px; padding: 10px 16px; }
  .selector-group { width: 92vw; max-width: 470px; }
  #modeSelect, #mapSelect { width: 100%; }
  .mode-card { flex: 1; width: auto; }
  .map-card { min-width: 0; grid-template-columns: 36px minmax(0, 1fr); padding: 8px 9px; column-gap: 6px; }
  .map-card .mc-name, .map-card .mc-desc { overflow-wrap: anywhere; }
  .big-btn { font-size: 21px; padding: 12px 44px; }
  .panel-box { min-width: 0; width: 94vw; max-width: 460px; padding: 20px 22px; max-height: 92vh; overflow-y: auto; }
  .help-grid { font-size: 13px; grid-template-columns: 110px 1fr; }
  #streakBanner { font-size: 30px; }
  .go-title { font-size: 48px; }
  .menu-inner { gap: 10px; }
}
