/* ===== 基础重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

/* 输入元素必须可选中可聚焦：全局 user-select:none 会阻止 iOS/部分安卓输入框聚焦输入 */
input, textarea, select, [contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
  -webkit-touch-callout: default;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05060a;
  color: #e6f1ff;
  font-family: 'Orbitron', 'Rajdhani', 'Segoe UI', sans-serif;
  font-weight: 500;
  cursor: default;
}

/* 指针锁定时全局隐藏系统光标 */
body.pointer-locked,
body.pointer-locked * {
  cursor: none !important;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hidden {
  display: none !important;
}

/* ===== 字体加载（科幻风格） ===== */
@import url('https://miaoda.feishu.cn/fonts/css2?family=Orbitron:wght@500;600;700;900&family=Rajdhani:wght@400;500;600;700&display=swap');

/* ===== 节日标识 ===== */
.festival-badge {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: linear-gradient(135deg, rgba(255, 80, 80, 0.25), rgba(255, 180, 50, 0.2));
  border: 1px solid rgba(255, 180, 50, 0.5);
  border-radius: 20px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: #ffcc66;
  text-shadow: 0 0 6px rgba(255, 180, 50, 0.6);
  box-shadow: 0 0 15px rgba(255, 150, 50, 0.2);
  pointer-events: none;
  animation: festivalGlow 2.5s ease-in-out infinite;
}

.festival-badge .festival-icon {
  font-size: 14px;
}

@keyframes festivalGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 150, 50, 0.2); }
  50% { box-shadow: 0 0 25px rgba(255, 180, 80, 0.5); }
}

/* ===== HUD 基础样式 ===== */
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.hud-panel {
  position: absolute;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(0, 20, 40, 0.55), rgba(0, 10, 25, 0.35));
  border: 1px solid rgba(0, 200, 255, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  clip-path: polygon(
    0 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% 100%,
    14px 100%,
    0 calc(100% - 14px)
  );
  box-shadow: 0 0 20px rgba(0, 180, 255, 0.15), inset 0 0 15px rgba(0, 150, 255, 0.08);
}

.hud-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(0, 220, 255, 0.75);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.hud-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  color: #9dd8ff;
  letter-spacing: 1px;
}

/* ===== 准星 ===== */
#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 20;
}

.ch-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 2px;
  background: #00eaff;
  border-radius: 50%;
  box-shadow: 0 0 4px #00eaff, 0 0 8px rgba(0, 234, 255, 0.5);
}

.ch-line {
  position: absolute;
  background: #00eaff;
  box-shadow: 0 0 4px #00eaff;
}

.ch-top, .ch-bottom {
  width: 1px;
  height: 6px;
  left: 50%;
  transform: translateX(-50%);
}
.ch-top { top: 0; }
.ch-bottom { bottom: 0; }

.ch-left, .ch-right {
  width: 6px;
  height: 1px;
  top: 50%;
  transform: translateY(-50%);
}
.ch-left { left: 0; }
.ch-right { right: 0; }

#crosshair.hit .ch-line,
#crosshair.hit .ch-dot {
  background: #ff3b3b;
  box-shadow: 0 0 6px #ff3b3b;
  transition: background 0.08s, box-shadow 0.08s;
}

/* ===== 左下 HP 条 ===== */
.hud-bottom-left {
  bottom: 28px;
  left: 28px;
  min-width: 220px;
}

.exp-bar-wrap {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 180, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
}

.exp-label {
  margin-bottom: 0;
  font-size: 10px;
  color: #ffcc00;
  letter-spacing: 1px;
  white-space: nowrap;
}

.exp-bar-outer {
  flex: 1;
  height: 5px;
  background: rgba(0, 30, 60, 0.6);
  border: 1px solid rgba(255, 200, 0, 0.35);
  overflow: hidden;
}

.exp-bar-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffcc00, #ff8800);
  box-shadow: 0 0 6px rgba(255, 200, 0, 0.6);
  transition: width 0.35s ease;
}

/* ===== 底部中央 武器名 ===== */
.hud-bottom-center {
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  min-width: 160px;
}

.weapon-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 3px;
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.5);
}

.weapon-type {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  letter-spacing: 4px;
  color: rgba(0, 200, 255, 0.6);
  margin-top: 2px;
}

.hp-bar-outer {
  width: 100%;
  height: 8px;
  background: rgba(0, 40, 60, 0.6);
  border: 1px solid rgba(0, 180, 255, 0.4);
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
}

.hp-bar-inner {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #00ffaa, #00eaff);
  box-shadow: 0 0 8px rgba(0, 234, 255, 0.6);
  transition: width 0.25s ease, background 0.3s;
}

.hp-bar-inner.low {
  background: linear-gradient(90deg, #ff4444, #ff8800);
  box-shadow: 0 0 8px rgba(255, 60, 60, 0.7);
}

/* ===== 右下 弹药 ===== */
.hud-bottom-right {
  bottom: 28px;
  right: 28px;
  text-align: right;
  min-width: 180px;
}

.ammo-main {
  font-family: 'Orbitron', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: #00eaff;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.6);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.ammo-main .ammo-sep {
  color: rgba(0, 180, 255, 0.4);
  margin: 0 4px;
  font-size: 24px;
}

.ammo-label {
  margin-bottom: 0;
  margin-top: 2px;
}

.reload-indicator {
  position: absolute;
  top: -28px;
  right: 18px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  color: #ffcc00;
  letter-spacing: 3px;
  text-shadow: 0 0 6px rgba(255, 200, 0, 0.6);
  animation: reloadPulse 0.8s ease-in-out infinite;
}

@keyframes reloadPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes ammoFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ammo-main .reload-flash {
  animation: ammoFlash 0.4s ease-in-out infinite;
  color: #ffcc00 !important;
  text-shadow: 0 0 12px rgba(255, 200, 0, 0.8) !important;
}

/* ===== 顶部 得分 ===== */
.hud-top-center {
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  min-width: 200px;
}

.score-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(0, 234, 255, 0.8);
  letter-spacing: 3px;
}

/* ===== 右上 波次+击杀 ===== */
.hud-top-right {
  top: 24px;
  right: 28px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.wave-block, .kills-block {
  text-align: right;
}

.wave-value, .kills-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffcc00;
  text-shadow: 0 0 8px rgba(255, 200, 0, 0.6);
  letter-spacing: 2px;
}

.kills-value {
  color: #ff5577;
  text-shadow: 0 0 8px rgba(255, 80, 120, 0.6);
}

/* ===== 左上 战区名 + 倍率 ===== */
.hud-top-left {
  top: 24px;
  left: 28px;
  min-width: 180px;
}

.zone-name-hud {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.5);
}

.score-multiplier {
  margin-top: 4px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  color: #ffcc00;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(255, 200, 0, 0.6);
}

/* ===== 金币显示（在右上波次击杀下方）===== */
.hud-gold {
  top: 72px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  padding: 8px 16px;
}

.gold-icon {
  font-size: 16px;
  color: #ffcc00;
  text-shadow: 0 0 8px rgba(255, 200, 0, 0.8);
}

.gold-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffdd66;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 200, 0, 0.6);
}

/* ===== 受伤红屏 ===== */
.damage-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(255, 30, 30, 0.5) 100%);
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 5;
}

.damage-overlay.flash {
  opacity: 1;
}

/* ===== 覆盖层界面（通用） ===== */
.overlay-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(5, 10, 20, 0.85) 0%, rgba(0, 0, 10, 0.95) 100%);
  z-index: 100;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
  padding: 20px;
}

/* 暂停/游戏结束界面高于触控操作层：触控层意外未隐藏时按钮也一定能点 */
#pause-screen, #gameover-screen {
  z-index: 300;
}
#pause-screen button, #gameover-screen button {
  touch-action: manipulation;
}

.menu-content {
  text-align: center;
  padding: 48px 56px;
  background: linear-gradient(135deg, rgba(0, 30, 60, 0.4), rgba(0, 10, 30, 0.6));
  border: 1px solid rgba(0, 200, 255, 0.4);
  clip-path: polygon(
    0 0,
    calc(100% - 24px) 0,
    100% 24px,
    100% 100%,
    24px 100%,
    0 calc(100% - 24px)
  );
  box-shadow: 0 0 40px rgba(0, 180, 255, 0.2), inset 0 0 40px rgba(0, 100, 200, 0.1);
  max-width: 520px;
  width: 90%;
}

.menu-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #00eaff;
  text-shadow: 0 0 12px rgba(0, 234, 255, 0.6);
  margin-bottom: 28px;
}

.gameover-title {
  color: #ff3355;
  text-shadow: 0 0 12px rgba(255, 50, 80, 0.6);
}

.gameover-zone {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  letter-spacing: 3px;
  color: rgba(150, 200, 230, 0.6);
  margin-bottom: 8px;
}

.stats-block {
  margin: 24px 0 28px;
  padding: 18px 24px;
  background: rgba(0, 20, 40, 0.5);
  border: 1px solid rgba(0, 180, 255, 0.2);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(0, 180, 255, 0.15);
  font-family: 'Rajdhani', sans-serif;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row.highlight {
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 200, 0, 0.3);
  border-bottom: none;
}

.stat-label {
  font-size: 14px;
  color: #7fb8d8;
  letter-spacing: 2px;
}

.stat-row.highlight .stat-label {
  color: #ffcc00;
}

.stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #00eaff;
  letter-spacing: 2px;
}

.stat-row.highlight .stat-value {
  color: #ffcc00;
  text-shadow: 0 0 8px rgba(255, 200, 0, 0.5);
}

/* ===== 按钮 ===== */
.neon-btn {
  display: inline-block;
  padding: 14px 40px;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #00eaff;
  background: linear-gradient(135deg, rgba(0, 100, 180, 0.2), rgba(0, 50, 120, 0.3));
  border: 1px solid #00eaff;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.3), inset 0 0 15px rgba(0, 234, 255, 0.08);
  position: relative;
  overflow: hidden;
  margin: 6px;
}

.neon-btn:hover {
  background: linear-gradient(135deg, rgba(0, 150, 220, 0.35), rgba(0, 80, 160, 0.45));
  box-shadow: 0 0 25px rgba(0, 234, 255, 0.6), inset 0 0 20px rgba(0, 234, 255, 0.15);
  transform: translateY(-1px);
}

.neon-btn:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.4);
}

.neon-btn.secondary {
  color: #9dd8ff;
  border-color: rgba(100, 180, 220, 0.5);
  background: linear-gradient(135deg, rgba(40, 70, 100, 0.2), rgba(20, 40, 70, 0.3));
  box-shadow: 0 0 10px rgba(100, 180, 220, 0.15);
}

.neon-btn.secondary:hover {
  color: #00eaff;
  border-color: #00eaff;
  box-shadow: 0 0 20px rgba(0, 234, 255, 0.4);
}

.neon-btn.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 12px;
  letter-spacing: 2px;
  overflow: visible;
}

.btn-icon {
  font-size: 16px;
}

.close-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 80, 100, 0.15);
  border: 1px solid rgba(255, 100, 120, 0.4);
  color: #ff6677;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 4px;
}

.close-btn:hover {
  background: rgba(255, 80, 100, 0.3);
  box-shadow: 0 0 10px rgba(255, 80, 100, 0.4);
}

/* ===== 战区选择界面 ===== */
#zone-select-screen {
  justify-content: flex-start;
  padding: 40px 30px;
}

.zs-header {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.zs-logo-block {
  position: relative;
  padding: 10px 0;
}

.zs-logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(0, 200, 255, 0.3) 0%, transparent 70%);
  filter: blur(20px);
  z-index: 0;
}

.zs-title {
  position: relative;
  font-family: 'Orbitron', sans-serif;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #00eaff;
  text-shadow:
    0 0 10px #00eaff,
    0 0 20px rgba(0, 234, 255, 0.6),
    0 0 40px rgba(0, 180, 255, 0.4);
  z-index: 1;
}

.zs-subtitle {
  position: relative;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  letter-spacing: 6px;
  color: rgba(150, 220, 255, 0.7);
  margin-top: 4px;
  z-index: 1;
}

.zs-header-actions {
  display: flex;
  gap: 12px;
}

.zs-subheader {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 180, 255, 0.2);
}

.zs-section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 4px;
  color: #9dd8ff;
}

.zs-hint {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: rgba(150, 200, 230, 0.5);
  letter-spacing: 2px;
}

.zone-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin-bottom: 24px;
}

.zone-card {
  position: relative;
  background: linear-gradient(160deg, rgba(0, 30, 60, 0.5), rgba(0, 15, 35, 0.7));
  border: 1px solid rgba(0, 180, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  clip-path: polygon(
    0 0,
    calc(100% - 18px) 0,
    100% 18px,
    100% 100%,
    18px 100%,
    0 calc(100% - 18px)
  );
}

.zone-card:hover {
  border-color: #00eaff;
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 180, 255, 0.3), 0 0 20px rgba(0, 234, 255, 0.2);
}

.zone-card:hover .zc-image {
  transform: scale(1.08);
}

.zc-image {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
  position: relative;
}

.zc-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 15, 35, 0.8) 100%);
}

.zc-content {
  padding: 14px 16px;
}

.zc-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.4);
}

.zc-difficulty {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
}

.zc-star {
  font-size: 14px;
  color: #ffcc00;
  text-shadow: 0 0 4px rgba(255, 200, 0, 0.6);
}

.zc-star.inactive {
  color: rgba(100, 120, 140, 0.4);
  text-shadow: none;
}

.zc-info {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  color: #7fb8d8;
  line-height: 1.6;
  letter-spacing: 1px;
  margin-bottom: 10px;
  min-height: 40px;
}

.zc-info span {
  color: #9dd8ff;
  font-weight: 600;
}

.zc-level {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(150, 200, 230, 0.5);
  padding-top: 8px;
  border-top: 1px solid rgba(0, 180, 255, 0.15);
}

.zc-level strong {
  color: #00eaff;
  font-weight: 700;
}

.zone-card.selected {
  border-color: #ffcc00;
  box-shadow: 0 0 30px rgba(255, 200, 0, 0.5), 0 0 15px rgba(255, 200, 0, 0.3), inset 0 0 20px rgba(255, 200, 0, 0.1);
  transform: translateY(-4px);
}

.zone-card.selected::before {
  content: '\2713  已选择';
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  background: rgba(255, 200, 0, 0.9);
  color: #0a0a0a;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 3;
}

.zone-card:active {
  transform: translateY(-1px) scale(0.98);
  transition: transform 0.05s;
}

.zc-corner-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  background: rgba(0, 20, 40, 0.8);
  border: 1px solid rgba(0, 200, 255, 0.4);
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  letter-spacing: 1px;
  color: #00eaff;
  z-index: 2;
}

.zs-footer {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 20px;
  gap: 20px;
}

.zs-footer-left {
  display: flex;
  justify-content: flex-start;
}

.zs-footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.zs-footer-right {
  display: flex;
  justify-content: flex-end;
}

.selected-zone-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #9dd8ff;
  min-height: 24px;
}

.selected-zone-name.has-selection {
  color: #ffcc00;
  text-shadow: 0 0 8px rgba(255, 200, 0, 0.5);
}

.neon-btn.large {
  padding: 18px 60px;
  font-size: 16px;
  letter-spacing: 6px;
}

.neon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  filter: grayscale(0.5);
}

.selected-zone-info {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  color: #7fb8d8;
  letter-spacing: 1px;
  text-align: right;
  max-width: 220px;
  line-height: 1.6;
  padding: 10px 16px;
  background: rgba(0, 20, 40, 0.4);
  border: 1px solid rgba(0, 150, 220, 0.2);
  min-height: 56px;
  min-width: 200px;
}

.best-score-display {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 12px 24px;
  background: rgba(0, 20, 40, 0.4);
  border: 1px solid rgba(255, 200, 0, 0.25);
  clip-path: polygon(
    0 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
}

.bs-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255, 200, 100, 0.7);
}

.bs-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffcc00;
  text-shadow: 0 0 10px rgba(255, 200, 0, 0.6);
  letter-spacing: 2px;
}

/* ===== 任务面板 ===== */
.missions-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 560px;
  max-width: 90vw;
  max-height: 80vh;
  background: linear-gradient(160deg, rgba(0, 25, 50, 0.95), rgba(0, 10, 25, 0.98));
  border: 1px solid rgba(0, 200, 255, 0.4);
  z-index: 9999;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  clip-path: polygon(
    0 0,
    calc(100% - 20px) 0,
    100% 20px,
    100% 100%,
    20px 100%,
    0 calc(100% - 20px)
  );
  box-shadow: 0 0 50px rgba(0, 180, 255, 0.3), inset 0 0 30px rgba(0, 100, 200, 0.1);
  animation: panelIn 0.3s ease-out;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.missions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0, 180, 255, 0.25);
}

.missions-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #00eaff;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}

.missions-date {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: rgba(0, 40, 80, 0.3);
  border-bottom: 1px solid rgba(0, 180, 255, 0.15);
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  color: #7fb8d8;
  letter-spacing: 1px;
}

.missions-reset-hint {
  color: rgba(150, 200, 230, 0.5);
  font-size: 11px;
}

.missions-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 24px;
}

.mission-item {
  padding: 14px;
  margin-bottom: 10px;
  background: rgba(0, 30, 60, 0.4);
  border: 1px solid rgba(0, 150, 220, 0.25);
  transition: all 0.2s;
}

.mission-item.completed {
  border-color: rgba(0, 255, 150, 0.4);
  background: rgba(0, 50, 40, 0.3);
}

.mission-item.claimed {
  opacity: 0.5;
  border-color: rgba(100, 120, 140, 0.2);
}

.mission-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.mission-desc {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  color: #c0e0f5;
  letter-spacing: 0.5px;
  flex: 1;
  padding-right: 12px;
}

.mission-reward {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  color: #ffcc00;
  white-space: nowrap;
  padding: 3px 8px;
  background: rgba(255, 200, 0, 0.12);
  border: 1px solid rgba(255, 200, 0, 0.3);
}

.mission-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 30, 60, 0.8);
  border: 1px solid rgba(0, 100, 160, 0.3);
  margin-bottom: 8px;
  overflow: hidden;
}

.mission-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00aaff, #00eaff);
  box-shadow: 0 0 6px rgba(0, 234, 255, 0.6);
  transition: width 0.3s ease;
}

.mission-item.completed .mission-progress-fill {
  background: linear-gradient(90deg, #00dd88, #00ffaa);
  box-shadow: 0 0 6px rgba(0, 255, 150, 0.6);
}

.mission-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mission-progress-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  color: #7fb8d8;
  letter-spacing: 1px;
}

.mission-claim-btn {
  padding: 5px 16px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #050a0f;
  background: linear-gradient(135deg, #ffcc00, #ff9900);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 10px rgba(255, 200, 0, 0.4);
}

.mission-claim-btn:hover:not(:disabled) {
  box-shadow: 0 0 15px rgba(255, 200, 0, 0.7);
  transform: translateY(-1px);
}

.mission-claim-btn:disabled {
  background: rgba(80, 100, 120, 0.3);
  color: rgba(150, 180, 200, 0.4);
  cursor: not-allowed;
  box-shadow: none;
}

.mission-claim-btn.claimed-btn {
  background: rgba(0, 100, 80, 0.3);
  color: #00ffaa;
  border: 1px solid rgba(0, 255, 150, 0.3);
  cursor: default;
  box-shadow: none;
}

.missions-footer {
  padding: 14px 24px;
  border-top: 1px solid rgba(0, 180, 255, 0.2);
  background: rgba(0, 20, 40, 0.4);
}

/* ===== 武器商店 ===== */
.shop-panel {
  width: 90%;
  max-width: 960px;
}

.shop-gold-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffcc00;
  text-shadow: 0 0 8px rgba(255, 200, 0, 0.6);
  margin-right: 24px;
  padding: 6px 16px;
  background: rgba(255, 200, 0, 0.1);
  border: 1px solid rgba(255, 200, 0, 0.3);
}

.shop-hint {
  padding: 10px 24px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: rgba(150, 200, 230, 0.7);
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(0, 180, 255, 0.15);
}

.shop-weapons-list {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.shop-weapon-card {
  background: linear-gradient(160deg, rgba(0, 30, 60, 0.5), rgba(0, 15, 35, 0.7));
  border: 1px solid rgba(0, 180, 255, 0.3);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s;
  position: relative;
}

.shop-weapon-card:hover {
  border-color: rgba(0, 220, 255, 0.6);
  box-shadow: 0 0 15px rgba(0, 200, 255, 0.3);
  transform: translateY(-2px);
}

.shop-weapon-card.owned {
  border-color: rgba(0, 255, 150, 0.4);
}

.shop-weapon-card.equipped-primary,
.shop-weapon-card.equipped-secondary {
  border-color: #ffcc00;
  box-shadow: 0 0 20px rgba(255, 200, 0, 0.3);
}

.sw-equipped-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  letter-spacing: 1px;
  color: #0a0a0a;
  background: #ffcc00;
}

.sw-icon {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #00eaff;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
  letter-spacing: 2px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
}

.sw-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
  text-align: center;
}

.sw-type {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  color: #7fb8d8;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
}

.sw-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  color: #9dd8ff;
}

.sw-stat-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sw-stat-label {
  width: 36px;
  color: rgba(150, 200, 230, 0.7);
  letter-spacing: 0.5px;
}

.sw-stat-bar {
  flex: 1;
  height: 4px;
  background: rgba(0, 30, 60, 0.8);
  border: 1px solid rgba(0, 100, 160, 0.3);
  position: relative;
}

.sw-stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #00aaff, #00eaff);
  box-shadow: 0 0 4px rgba(0, 234, 255, 0.5);
}

.sw-stat-fill.high { background: linear-gradient(90deg, #ff5577, #ff3355); box-shadow: 0 0 4px rgba(255,80,120,0.5);}
.sw-stat-fill.mid { background: linear-gradient(90deg, #ffcc00, #ffaa00); box-shadow: 0 0 4px rgba(255,200,0,0.5);}

.sw-btn-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.sw-price {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  color: #ffcc00;
  text-align: center;
  text-shadow: 0 0 6px rgba(255, 200, 0, 0.5);
  letter-spacing: 1px;
}

.sw-price.free { color: #00ffaa; text-shadow: 0 0 6px rgba(0,255,150,0.5);}

.sw-buy-btn,
.sw-equip-btn {
  padding: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  border: 1px solid;
  background: rgba(0, 50, 100, 0.3);
  color: #00eaff;
  border-color: #00eaff;
  transition: all 0.15s;
}

.sw-buy-btn:hover:not(:disabled),
.sw-equip-btn:hover:not(:disabled) {
  background: rgba(0, 100, 180, 0.4);
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.4);
}

.sw-buy-btn:disabled,
.sw-equip-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sw-buy-btn {
  color: #ffcc00;
  border-color: #ffcc00;
  background: rgba(150, 100, 0, 0.2);
}

.sw-buy-btn:hover:not(:disabled) {
  background: rgba(200, 140, 0, 0.35);
  box-shadow: 0 0 10px rgba(255, 200, 0, 0.5);
}

.sw-equip-btn.primary { color: #00eaff; border-color: #00eaff; }
.sw-equip-btn.secondary { color: #00ffaa; border-color: #00ffaa; }

.sw-owned-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  color: #00ffaa;
  text-align: center;
  letter-spacing: 2px;
  padding: 6px;
  border: 1px solid rgba(0, 255, 150, 0.3);
}

/* ===== 升级面板 ===== */
.upgrade-panel {
  width: 90%;
  max-width: 480px;
}

.upgrade-info {
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 180, 255, 0.2);
  background: rgba(0, 20, 40, 0.3);
}

.upgrade-level {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  color: #9dd8ff;
  letter-spacing: 2px;
}

.upgrade-level span { color: #ffcc00; font-size: 18px; }

.upgrade-points {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  color: #ffcc00;
  letter-spacing: 1px;
}

.upgrade-points span { font-size: 18px; text-shadow: 0 0 8px rgba(255, 200, 0, 0.6);}

.upgrade-list {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upgrade-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0, 30, 60, 0.4);
  border: 1px solid rgba(0, 180, 255, 0.25);
}

.upg-info { flex: 1; }
.upg-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  color: #ffffff;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.upg-desc {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  color: #7fb8d8;
}
.upg-level {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  color: #ffcc00;
  margin-right: 16px;
  letter-spacing: 1px;
}
.upg-plus-btn {
  width: 32px;
  height: 32px;
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #00eaff;
  background: rgba(0, 100, 180, 0.3);
  border: 1px solid #00eaff;
  cursor: pointer;
  transition: all 0.15s;
}
.upg-plus-btn:hover:not(:disabled) {
  background: rgba(0, 150, 220, 0.5);
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}
.upg-plus-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ===== 升级特效 ===== */
.level-up-overlay {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 40;
  text-align: center;
}

.lvl-up-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 8px;
  color: #ffcc00;
  text-shadow: 0 0 20px rgba(255, 200, 0, 0.8), 0 0 40px rgba(255, 150, 0, 0.6);
  animation: lvlUpPop 2s ease-out forwards;
}

.lvl-up-sub {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  color: #ffffff;
  letter-spacing: 4px;
  margin-top: 8px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  animation: lvlUpPop 2s ease-out 0.2s both;
}

@keyframes lvlUpPop {
  0% { opacity: 0; transform: scale(0.5); }
  20% { opacity: 1; transform: scale(1.1); }
  40% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.2); }
}

.active-buffs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: #7fb8d8;
}

.ab-label {
  letter-spacing: 1px;
}

.ab-value {
  color: #ffcc00;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
}

/* ===== 波次公告 ===== */
.wave-announce {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 30;
  animation: waveIn 2s ease-out forwards;
}

.wave-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 8px;
  color: #ffcc00;
  text-shadow: 0 0 20px rgba(255, 200, 0, 0.7);
}

.wave-label span {
  font-size: 56px;
  color: #ffffff;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
}

.wave-desc {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  letter-spacing: 6px;
  color: rgba(255, 200, 100, 0.8);
  margin-top: 8px;
}

@keyframes waveIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

/* ===== 飘字提示 ===== */
.toast-container {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast-msg {
  padding: 10px 24px;
  background: linear-gradient(135deg, rgba(0, 80, 160, 0.8), rgba(0, 40, 100, 0.8));
  border: 1px solid #00eaff;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(0, 234, 255, 0.6);
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.4);
  animation: toastIn 0.4s ease-out, toastOut 0.5s ease-in 2s forwards;
}

.toast-msg.gold {
  background: linear-gradient(135deg, rgba(180, 120, 0, 0.8), rgba(120, 60, 0, 0.8));
  border-color: #ffcc00;
  color: #fff5cc;
  text-shadow: 0 0 6px rgba(255, 200, 0, 0.6);
  box-shadow: 0 0 15px rgba(255, 200, 0, 0.4);
}

.toast-msg.green {
  background: linear-gradient(135deg, rgba(0, 120, 80, 0.8), rgba(0, 60, 40, 0.8));
  border-color: #00ffaa;
  color: #ccffe8;
  text-shadow: 0 0 6px rgba(0, 255, 150, 0.6);
  box-shadow: 0 0 15px rgba(0, 255, 150, 0.4);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-15px); }
}

/* 右上角好友进出通知 */
.friend-notice-container {
  position: absolute;
  top: 100px;
  right: 20px;
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.friend-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  background: linear-gradient(135deg, rgba(0, 50, 30, 0.9), rgba(0, 30, 20, 0.9));
  border: 1px solid #00ff88;
  border-left: 4px solid #00ff88;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  color: #ccffe8;
  text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.3);
  animation: noticeIn 0.35s ease-out, noticeOut 0.5s ease-in 2.8s forwards;
  backdrop-filter: blur(4px);
}

.friend-notice.leave {
  background: linear-gradient(135deg, rgba(60, 60, 70, 0.9), rgba(30, 30, 40, 0.9));
  border-color: #8899aa;
  border-left-color: #8899aa;
  color: #ccd6e0;
  text-shadow: none;
  box-shadow: 0 0 12px rgba(120, 140, 160, 0.2);
}

.friend-notice-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid #00ff88;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #00ff88;
  flex-shrink: 0;
}

.friend-notice.leave .friend-notice-icon {
  background: rgba(136, 153, 170, 0.15);
  border-color: #8899aa;
  color: #8899aa;
}

.friend-notice-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.friend-notice-name {
  font-size: 13px;
  font-weight: bold;
  color: #ffffff;
}

.friend-notice-label {
  font-size: 11px;
  opacity: 0.85;
}

@keyframes noticeIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes noticeOut {
  to { opacity: 0; transform: translateX(20px); }
}

/* 同战场战友 HUD 面板 */
.battlefield-squad-panel {
  position: absolute;
  top: 80px;
  left: 20px;
  z-index: 50;
  min-width: 180px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(0, 30, 60, 0.85), rgba(0, 15, 30, 0.85));
  border: 1px solid #00c8ff;
  border-left: 3px solid #00c8ff;
  box-shadow: 0 0 15px rgba(0, 200, 255, 0.3);
  backdrop-filter: blur(6px);
}

.squad-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: #00eaff;
  text-shadow: 0 0 6px rgba(0, 234, 255, 0.6);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 200, 255, 0.3);
}

.squad-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.squad-member {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: #c0e8ff;
}

.squad-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #44dd77;
  box-shadow: 0 0 6px #44dd77;
  flex-shrink: 0;
  animation: squadPulse 2s ease-in-out infinite;
}

@keyframes squadPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .zone-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .zs-title { font-size: 28px; letter-spacing: 4px; }
}

@media (max-width: 600px) {
  .menu-content { padding: 32px 24px; }
  .menu-title { font-size: 26px; letter-spacing: 2px; }
  .zone-cards-grid { grid-template-columns: 1fr; }
  .zs-header { flex-direction: column; gap: 16px; align-items: flex-start; }
  .hud-bottom-left, .hud-bottom-right { bottom: 16px; }
  .hud-top-right { right: 12px; top: 16px; gap: 12px; }
  .hud-top-left { left: 12px; top: 16px; min-width: 140px; }
  .hud-top-center { top: 16px; min-width: 140px; }
  .score-value { font-size: 22px; }
  .wave-value, .kills-value { font-size: 18px; }
}

/* ===== 新增：按钮补充尺寸 ===== */
.neon-btn.large {
  padding: 16px 48px;
  font-size: 16px;
}
.neon-btn.small {
  padding: 8px 18px;
  font-size: 11px;
  letter-spacing: 2px;
  margin: 0;
}
.neon-btn.tiny {
  padding: 6px 12px;
  font-size: 10px;
  letter-spacing: 1px;
  margin: 0;
}
.neon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.neon-btn.danger {
  background: linear-gradient(135deg, rgba(160, 30, 40, 0.5), rgba(100, 10, 20, 0.7));
  border-color: #ff4455;
  color: #ffccd0;
  text-shadow: 0 0 6px rgba(255, 80, 100, 0.6);
}

.neon-btn.danger:hover {
  background: linear-gradient(135deg, rgba(200, 40, 50, 0.7), rgba(140, 20, 30, 0.9));
  box-shadow: 0 0 15px rgba(255, 60, 80, 0.5);
}

.neon-btn.danger:active {
  transform: translateY(1px);
  box-shadow: 0 0 8px rgba(255, 60, 80, 0.4);
}

.text-btn {
  background: none;
  border: none;
  color: #7fb8d8;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
  letter-spacing: 1px;
}
.text-btn:hover {
  color: #00eaff;
}

/* ===== 玩家信息 ===== */
.player-info-block {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: #7fb8d8;
  letter-spacing: 1px;
}
.player-name-text {
  color: #00eaff;
  font-weight: 600;
}

.badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  background: #ff4466;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff4466;
  animation: badgePulse 1.5s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.neon-btn.icon-btn {
  position: relative;
}

/* ===== 输入框 ===== */
.neon-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 30, 60, 0.6);
  border: 1px solid rgba(0, 180, 255, 0.4);
  color: #e6f1ff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  letter-spacing: 1px;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
  border-radius: 4px;
}
.neon-input:focus {
  border-color: #00eaff;
  box-shadow: 0 0 12px rgba(0, 234, 255, 0.4), inset 0 0 8px rgba(0, 234, 255, 0.1);
}
.neon-input::placeholder {
  color: rgba(150, 200, 230, 0.4);
}

/* ===== 登录面板 ===== */
.login-panel {
  width: 420px;
}
.login-body {
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}
.login-hint {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: #7fb8d8;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 4px;
}
.login-error {
  color: #ff6677;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  text-align: center;
  padding: 8px;
  background: rgba(255, 80, 100, 0.1);
  border: 1px solid rgba(255, 100, 120, 0.3);
  border-radius: 4px;
}
.login-submit { width: 100%; margin: 8px 0 0; }
.login-panel .neon-btn.secondary { width: 100%; margin: 0; }

/* ===== 排行榜面板 ===== */
.leaderboard-panel {
  width: 680px;
}
.lb-headers {
  display: grid;
  grid-template-columns: 60px 1fr 100px 70px 90px;
  gap: 12px;
  padding: 10px 24px;
  background: rgba(0, 40, 80, 0.3);
  border-bottom: 1px solid rgba(0, 180, 255, 0.2);
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: #7fb8d8;
  text-transform: uppercase;
}
.lb-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  max-height: 400px;
}
.lb-item {
  display: grid;
  grid-template-columns: 60px 1fr 100px 70px 90px;
  gap: 12px;
  padding: 10px 24px;
  align-items: center;
  border-bottom: 1px solid rgba(0, 180, 255, 0.08);
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  color: #c8e6ff;
  transition: background 0.2s;
}
.lb-item:hover {
  background: rgba(0, 100, 180, 0.1);
}
.lb-item.mine {
  background: rgba(0, 234, 255, 0.08);
  border-left: 3px solid #00eaff;
}
.lb-rank {
  font-weight: 700;
  color: #00eaff;
  font-size: 16px;
}
.lb-item.top-1 .lb-rank { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.6); }
.lb-item.top-2 .lb-rank { color: #c0c0c0; text-shadow: 0 0 8px rgba(192, 192, 192, 0.5); }
.lb-item.top-3 .lb-rank { color: #cd7f32; text-shadow: 0 0 8px rgba(205, 127, 50, 0.5); }
.lb-name { color: #e6f1ff; font-weight: 600; }
.lb-zone { color: #7fb8d8; font-size: 12px; }
.lb-kills { color: #ff9966; text-align: right; }
.lb-score { color: #ffcc00; font-weight: 700; text-align: right; font-size: 15px; }
.lb-loading {
  text-align: center;
  padding: 40px;
  color: #7fb8d8;
  font-family: 'Rajdhani', sans-serif;
}
.lb-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  border-top: 1px solid rgba(0, 180, 255, 0.15);
  background: rgba(0, 20, 40, 0.4);
}
.lb-page-info {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: #7fb8d8;
  min-width: 80px;
  text-align: center;
  letter-spacing: 1px;
}
.lb-my-rank {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(0, 50, 100, 0.2);
  border-top: 1px solid rgba(0, 180, 255, 0.15);
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: #7fb8d8;
  letter-spacing: 1px;
}
.lb-my-rank span:nth-child(2),
.lb-my-rank span:nth-child(4) {
  color: #ffcc00;
  font-weight: 700;
}

/* ===== 好友面板 ===== */
.friends-panel {
  width: 560px;
}
.friends-tabs {
  display: flex;
  border-bottom: 1px solid rgba(0, 180, 255, 0.25);
  padding: 0 24px;
  background: rgba(0, 40, 80, 0.2);
}
.friend-tab {
  background: none;
  border: none;
  color: #7fb8d8;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 14px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.friend-tab:hover {
  color: #00eaff;
}
.friend-tab.active {
  color: #00eaff;
  border-bottom-color: #00eaff;
}
.friend-tab .badge-dot {
  position: static;
  width: 8px;
  height: 8px;
  animation: none;
}
.friend-tab-content {
  flex: 1;
  overflow-y: auto;
  max-height: 420px;
  padding: 12px 0;
}
.friend-list { padding: 0; }
.friend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(0, 180, 255, 0.08);
  transition: background 0.2s;
  pointer-events: auto;
  position: relative;
}
.friend-item:hover {
  background: rgba(0, 100, 180, 0.1);
}
.friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #003366, #0066aa);
  border: 2px solid #00eaff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00eaff;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.friend-info {
  flex: 1;
  min-width: 0;
}
.friend-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #e6f1ff;
}
.friend-status {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  color: #7fb8d8;
  margin-top: 2px;
}
.friend-status.online { color: #44dd77; }
.friend-status.online::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #44dd77;
  margin-right: 6px;
  box-shadow: 0 0 6px #44dd77;
}

.same-zone-badge {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(68, 221, 119, 0.15);
  border: 1px solid #44dd77;
  color: #44dd77;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(68, 221, 119, 0.3);
}
.friend-actions {
  display: flex;
  gap: 8px;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.add-friend-row {
  display: flex;
  gap: 12px;
  padding: 16px 24px 12px;
}
.add-friend-row .neon-input { flex: 1; }

/* ===== 联机面板（游戏中） ===== */
.coop-panel {
  position: absolute;
  top: 80px;
  right: 20px;
  width: 220px;
  background: linear-gradient(160deg, rgba(0, 25, 50, 0.92), rgba(0, 10, 25, 0.95));
  border: 1px solid rgba(0, 200, 255, 0.4);
  padding: 12px 14px;
  z-index: 50;
  font-family: 'Rajdhani', sans-serif;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  box-shadow: 0 0 20px rgba(0, 180, 255, 0.3);
}
.coop-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: #00eaff;
  margin-bottom: 8px;
  text-align: center;
}
.coop-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.coop-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #c8e6ff;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0, 180, 255, 0.1);
}
.coop-player-name { font-weight: 600; color: #e6f1ff; }
.coop-player-stats {
  display: flex;
  gap: 8px;
  font-size: 11px;
}
.coop-player-score { color: #ffcc00; }
.coop-player-kills { color: #ff9966; }
.coop-player-hp { color: #66ff88; }
.coop-player.dead .coop-player-name { color: #ff6677; text-decoration: line-through; }

/* ===== 邀请弹窗 ===== */
.invite-modal {
  width: 400px;
  z-index: 10000;
  pointer-events: auto;
}
.invite-body {
  padding: 24px 32px 28px;
  text-align: center;
}
.inviter-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
  color: #00eaff;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-shadow: 0 0 12px rgba(0, 234, 255, 0.5);
}
.invite-hint {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  color: #7fb8d8;
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.invite-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* 面板滚动条美化 */
.lb-list::-webkit-scrollbar,
.friend-tab-content::-webkit-scrollbar {
  width: 6px;
}
.lb-list::-webkit-scrollbar-track,
.friend-tab-content::-webkit-scrollbar-track {
  background: rgba(0, 20, 40, 0.3);
}
.lb-list::-webkit-scrollbar-thumb,
.friend-tab-content::-webkit-scrollbar-thumb {
  background: rgba(0, 180, 255, 0.3);
  border-radius: 3px;
}
.lb-list::-webkit-scrollbar-thumb:hover,
.friend-tab-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 234, 255, 0.5);
}

/* ===== 聊天系统 ===== */
.chat-panel {
  position: absolute;
  left: 28px;
  bottom: 130px;
  width: 380px;
  max-width: 46vw;
  z-index: 45;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* 聊天输入框打开时置顶，盖过触控操作层（否则输入框点不到/键盘被挡） */
.chat-panel:has(.chat-input-bar:not(.hidden)) {
  z-index: 260;
  pointer-events: auto;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 200px;
  overflow-y: auto;
  pointer-events: none;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(0, 200, 255, 0.3); }

.chat-msg {
  align-self: flex-start;
  max-width: 100%;
  padding: 3px 10px;
  background: linear-gradient(135deg, rgba(0, 25, 50, 0.75), rgba(0, 15, 35, 0.65));
  border-left: 2px solid #00eaff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  line-height: 1.35;
  color: #d8f0ff;
  letter-spacing: 0.5px;
  text-shadow: 0 0 4px rgba(0, 200, 255, 0.3);
  backdrop-filter: blur(2px);
  transition: opacity 0.8s ease;
  word-break: break-word;
}

.chat-msg .chat-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-right: 4px;
}

.chat-msg.theirs {
  border-left-color: #00ff88;
}
.chat-msg.theirs .chat-name { color: #00ff88; }
.chat-msg.theirs { color: #ccffe8; text-shadow: 0 0 4px rgba(0, 255, 136, 0.3); }

.chat-msg.mine {
  border-left-color: #ffcc00;
}
.chat-msg.mine .chat-name { color: #ffcc00; }
.chat-msg.mine { color: #fff5cc; text-shadow: 0 0 4px rgba(255, 200, 0, 0.3); }

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(0, 35, 70, 0.92), rgba(0, 15, 35, 0.92));
  border: 1px solid #00eaff;
  box-shadow: 0 0 18px rgba(0, 234, 255, 0.35), inset 0 0 12px rgba(0, 234, 255, 0.08);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  pointer-events: auto;
}

.chat-input-prompt {
  color: #00eaff;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  text-shadow: 0 0 6px rgba(0, 234, 255, 0.7);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e6f1ff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  letter-spacing: 1px;
}
.chat-input::placeholder { color: rgba(150, 200, 230, 0.45); }

.chat-hint {
  align-self: flex-start;
  padding: 3px 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(0, 220, 255, 0.55);
  background: rgba(0, 20, 40, 0.5);
  border: 1px dashed rgba(0, 180, 255, 0.3);
  pointer-events: none;
  animation: chatHintPulse 2s ease-in-out infinite;
}

@keyframes chatHintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* 新消息高亮 */
.chat-panel.chat-active .chat-messages {
  animation: chatFlash 0.6s ease-in-out 2;
}
@keyframes chatFlash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
}
/* （注：内容由AI生成） */

/* ===== 移动端触控操作层 ===== */
.touch-controls {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none; /* 层本身不挡触控，按钮/摇杆单独开启 */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.touch-controls .tc-btn,
.touch-controls .tc-fire,
.touch-controls #tc-joystick {
  pointer-events: auto;
}
.tc-btn {
  border: 1px solid rgba(0, 234, 255, 0.55);
  background: rgba(10, 20, 40, 0.55);
  color: #bffcff;
  border-radius: 12px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 8px rgba(0, 234, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tc-btn:active { background: rgba(0, 234, 255, 0.25); transform: scale(0.96); }

.tc-top-right {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.tc-pause {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 48px;
  height: 44px;
  font-size: 16px;
  letter-spacing: 0;
}
.tc-weapon-switch { width: 72px; height: 44px; font-size: 15px; }
.tc-skills { display: flex; gap: 6px; }
.tc-skill { width: 40px; height: 40px; border-radius: 50%; font-size: 16px; }

.tc-reload {
  position: absolute;
  left: 14px;
  bottom: 26px;
  width: 92px;
  height: 54px;
  font-size: 16px;
}

.tc-chat {
  position: absolute;
  left: 14px;
  bottom: 92px;
  width: 92px;
  height: 46px;
  font-size: 15px;
}

.tc-fire {
  position: absolute;
  right: 18px;
  bottom: 184px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid rgba(255, 80, 80, 0.7);
  background: radial-gradient(circle at 35% 30%, rgba(255, 90, 90, 0.5), rgba(160, 20, 20, 0.45));
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 1px;
  box-shadow: 0 0 16px rgba(255, 60, 60, 0.4);
}
.tc-fire:active { background: radial-gradient(circle at 35% 30%, rgba(255, 120, 120, 0.7), rgba(200, 40, 40, 0.6)); transform: scale(0.95); }

.tc-joystick {
  position: absolute;
  right: 26px;
  bottom: 26px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 2px solid rgba(0, 234, 255, 0.4);
  background: rgba(10, 20, 40, 0.35);
  backdrop-filter: blur(3px);
}
.tc-joystick-thumb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  margin-top: -32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(0, 234, 255, 0.7), rgba(0, 120, 160, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 12px rgba(0, 234, 255, 0.5);
  pointer-events: none;
  touch-action: none;
}

/* 横屏提示 */
.rotate-hint {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 8, 20, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  color: #bffcff;
  font-family: 'Rajdhani', sans-serif;
}
.rh-icon { font-size: 60px; color: #00eaff; animation: rotHint 2.4s ease-in-out infinite; }
@keyframes rotHint {
  0%, 20% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
  100% { transform: rotate(90deg); }
}
.rh-text { font-size: 20px; line-height: 1.5; }
.rh-text small { color: #6aa8c0; font-size: 13px; }

/* 移动端：游戏容器全屏、HUD 缩放适配 */
@media (max-width: 900px), (pointer: coarse) {
  body, html { position: fixed; inset: 0; overflow: hidden; height: 100%; }
  #game-container, #game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; }
  .touch-controls { display: block; }
  /* 触控布局：左下给换弹，右下给摇杆/射击，HUD 信息避让触控区 */
  .hud-bottom-left { left: 14px; bottom: 150px; min-width: 0; }
  .hud-bottom-right { left: 14px; right: auto; bottom: 98px; min-width: 0; text-align: left; }
  .hud-bottom-center { bottom: 42px; }
  .hud-panel { transform: scale(0.9); transform-origin: bottom left; }
  /* 移动端菜单按钮加大，保证触控可点（暂停/结束画面） */
  .menu-content .neon-btn {
    min-height: 54px;
    font-size: 17px;
    padding: 14px 40px;
    margin: 6px auto;
    width: min(300px, 88%);
  }
  .menu-content { padding: 28px 18px; max-width: 92vw; }
  .overlay-screen { padding: 14px; }
  .text-btn { min-height: 36px; font-size: 14px; padding: 8px 14px; }
}
/* （注：内容由AI生成） */
