/* ===== iter30：移动端/触屏设备优化 =====
   1) 触屏设备 tap 后 :hover 状态会"粘住"，配合 transition 持续触发 layout/paint，
      用 @media (hover: none) 全局禁用 hover 视觉变化
   2) 中画质也关闭扫描线（mix-blend-mode 全屏合成在移动端 GPU 极重） */
@media (hover: none) {
  *:hover { transform: none !important; }
}
body.graphics-medium::before,
body.graphics-low::before { display: none !important; }

:root {
  --cyber-bg-deep: #0a0418;
  --cyber-bg-panel: rgba(15, 8, 40, 0.78);
  --cyber-bg-panel-solid: #0f0828;
  --cyber-border: rgba(168, 85, 247, 0.35);
  --cyber-border-glow: rgba(168, 85, 247, 0.6);
  --cyber-neon-purple: #a855f7;
  --cyber-neon-purple-soft: #c084fc;
  --cyber-neon-cyan: #06b6d4;
  --cyber-neon-cyan-soft: #22d3ee;
  --cyber-neon-pink: #ec4899;
  --cyber-neon-pink-soft: #f472b6;
  --cyber-neon-gold: #fbbf24;
  --cyber-neon-green: #10b981;
  --cyber-neon-red: #ff3366;
  --cyber-text-primary: #f0e6ff;
  --cyber-text-secondary: #a78bfa;
  --cyber-text-muted: #6d5b9e;
  --cyber-glow-purple: 0 0 8px rgba(168, 85, 247, 0.7), 0 0 20px rgba(168, 85, 247, 0.4);
  --cyber-glow-cyan: 0 0 8px rgba(6, 182, 212, 0.7), 0 0 20px rgba(6, 182, 212, 0.4);
  --cyber-glow-pink: 0 0 8px rgba(236, 72, 153, 0.7), 0 0 20px rgba(236, 72, 153, 0.4);
  --cyber-glow-gold: 0 0 8px rgba(251, 191, 36, 0.7), 0 0 20px rgba(251, 191, 36, 0.4);
  --cyber-font-display: 'Orbitron', 'Noto Sans SC', sans-serif;
  --cyber-font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --cyber-font-body: 'Noto Sans SC', -apple-system, 'PingFang SC', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%;
  /* iter54：用 dvh 替代 100%，适配手机浏览器地址栏显隐（dvh=动态视口高度，随浏览器UI变化） */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--cyber-bg-deep);
  font-family: var(--cyber-font-body);
  user-select: none; -webkit-user-select: none;
  color: var(--cyber-text-primary);
}
/* 赛博扫描线叠加（全局微弱效果） */
body::before {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(168, 85, 247, 0.025) 3px,
    transparent 4px
  );
  pointer-events: none; z-index: 9999;
  mix-blend-mode: overlay;
}
/* ===== 低画质模式（body.graphics-low）：关闭扫描线/backdrop-blur，降低低端机 GPU 负担 ===== */
body.graphics-low::before { display: none !important; }
body.graphics-low *,
body.graphics-low *::before,
body.graphics-low *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.graphics-low .panel,
body.graphics-low .batch-result-toast {
  background: var(--cyber-bg-panel-solid);
}
/* iter33：低画质关闭持续运行的装饰性 CSS 动画（技能就绪光晕等），减少 GPU 合成层开销 */
body.graphics-low .skill-slot-ready-glow {
  animation: none !important;
  opacity: 0.5 !important;
}
/* 性能优化：低端设备禁用 GPU 密集 filter 模糊（与 backdrop-filter 同级开销） */
body.graphics-low .paragon-progress-glow {
  filter: none !important;
}
#gameCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; display: block; }
/* #canvasFlash 已移除（屏震/闪烁整体下线），保留位置注释便于回溯 */
.ui {
  position: absolute; z-index: 50; pointer-events: none;
  color: var(--cyber-neon-gold);
  font-family: var(--cyber-font-mono);
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.6), 1px 1px 3px rgba(0,0,0,0.9);
  font-weight: 700;
  letter-spacing: 0.5px;
}
/* 左上 HUD 栈：加大行距避免数值增长时互相遮挡；统一 left 对齐基线 */
#coinsUI { top: 14px; left: 18px; font-size: 22px; color: var(--cyber-neon-gold); text-shadow: var(--cyber-glow-gold); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 右上 DPS：限制宽度 + 右对齐，防止双行（DPS+暴击）横向溢出侵入中部星系名/统计 HUD */
#dpsUI   { top: 14px; right: 18px; font-size: 16px; color: var(--cyber-neon-cyan); text-shadow: var(--cyber-glow-cyan); max-width: 40vw; text-align: right; line-height: 1.25; }
#dmUI    { top: 50px; left: 18px; font-size: 14px; color: var(--cyber-neon-purple-soft); text-shadow: var(--cyber-glow-purple); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#shardsUI { top: 76px; left: 18px; font-size: 12px; color: var(--cyber-neon-cyan-soft); text-shadow: var(--cyber-glow-cyan); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bottomBar {
  position: absolute; left: 4%; right: 4%; bottom: 14px; height: 62px;
  background: var(--cyber-bg-panel);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  border: 1px solid var(--cyber-border);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: space-around; z-index: 50;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.15), inset 0 1px 0 rgba(255,255,255,0.06);
}
/* 底部栏切角装饰（::before/::after 已被切角占用，勿复用） */
#bottomBar::before, #bottomBar::after {
  content: ''; position: absolute; width: 12px; height: 12px;
  border: 2px solid var(--cyber-neon-purple);
  pointer-events: none;
}
#bottomBar::before { top: -1px; left: -1px; border-right: none; border-bottom: none; border-radius: 12px 0 0 0; }
#bottomBar::after { bottom: -1px; right: -1px; border-left: none; border-top: none; border-radius: 0 0 12px 0; }

.ui-btn {
  flex: 1; height: 42px; margin: 0 5px;
  background: linear-gradient(180deg, rgba(60, 30, 100, 0.6), rgba(30, 15, 60, 0.8));
  color: var(--cyber-text-primary);
  border: 1px solid var(--cyber-border);
  border-radius: 6px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; pointer-events: auto;
  font-family: var(--cyber-font-display);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.ui-btn::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.4s ease;
}
.ui-btn:hover {
  border-color: var(--cyber-neon-purple);
  box-shadow: var(--cyber-glow-purple);
  transform: translateY(-1px) scale(1.02);
  color: #fff;
}
.ui-btn:hover::before { left: 100%; }
.ui-btn:active {
  transform: translateY(0) scale(0.97);
  background: linear-gradient(180deg, rgba(80, 40, 130, 0.8), rgba(40, 20, 80, 0.9));
}
.ui-btn.muted  {
  background: linear-gradient(180deg, rgba(100, 30, 50, 0.6), rgba(60, 15, 30, 0.8));
  border-color: rgba(236, 72, 153, 0.3);
  color: var(--cyber-neon-pink-soft);
}

#upgradeOverlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 2, 15, 0.82);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  z-index: 100; display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s ease; }
#upgradeOverlay.open { display: flex; opacity: 1; }
#upgradeOverlay.open #upgradePanel { animation: panelFadeIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
#upgradeOverlay.closing { opacity: 0; }
#upgradeOverlay.closing #upgradePanel { animation: panelFadeOut 0.2s ease-in both; }
#upgradePanel {
  background: var(--cyber-bg-panel);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--cyber-border-glow);
  border-radius: 2px;
  width: 92%; max-width: 560px;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.3), 0 0 80px rgba(6, 182, 212, 0.1), inset 0 1px 0 rgba(255,255,255,0.05);
  max-height: 88vh; display: flex; flex-direction: column; overflow: hidden;
  padding: 0;
  position: relative;
}
/* 面板切角装饰 */
#upgradePanel::before, #upgradePanel::after {
  content: ''; position: absolute; width: 20px; height: 20px;
  border: 2px solid var(--cyber-neon-purple);
  pointer-events: none; z-index: 10;
}
#upgradePanel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
#upgradePanel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
/* 面板顶部扫描线光效 */
#upgradePanel > .panel-header::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyber-neon-purple), var(--cyber-neon-cyan), var(--cyber-neon-purple), transparent);
  animation: scanLine 3s linear infinite;
  opacity: 0.7;
}
@keyframes scanLine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes panelFadeIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes panelFadeOut {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(10px) scale(0.98); }
}

#upgradePanel h2 {
  color: var(--cyber-neon-purple-soft);
  font-size: 16px; text-align: center; margin: 0;
  font-family: var(--cyber-font-display);
  text-shadow: var(--cyber-glow-purple);
  letter-spacing: 2px;
}
#upgradePanel h3 {
  color: var(--cyber-neon-cyan); font-size: 12px; margin: 10px 0 6px 0; text-align: center;
  border-top: 1px solid rgba(6, 182, 212, 0.2); padding-top: 8px;
  font-family: var(--cyber-font-display);
  text-shadow: var(--cyber-glow-cyan);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
  .panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--cyber-border);
    display: flex; justify-content: space-between; align-items: center;
    position: relative; flex-shrink: 0;
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.12), rgba(15, 8, 40, 0.4));
  }
  .panel-close-x {
    width: 28px; height: 28px; line-height: 26px; text-align: center;
    color: var(--cyber-text-muted); font-size: 20px; font-weight: 400;
    border: 1px solid var(--cyber-border); border-radius: 4px;
    cursor: pointer; user-select: none;
    transition: all 0.2s;
    font-family: var(--cyber-font-mono);
  }
  .panel-close-x:hover { color: var(--cyber-neon-pink); border-color: var(--cyber-neon-pink);
    text-shadow: var(--cyber-glow-pink); box-shadow: var(--cyber-glow-pink); }
  .panel-body {
    flex: 1; overflow-y: auto; padding: 12px 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--cyber-neon-purple) transparent;
  }
  .panel-body::-webkit-scrollbar { width: 4px; }
  .panel-body::-webkit-scrollbar-track { background: transparent; }
  .panel-body::-webkit-scrollbar-thumb { background: var(--cyber-neon-purple); border-radius: 2px; opacity: 0.5; }
  .panel-footer {
    padding: 10px 16px 12px 16px;
    border-top: 1px solid var(--cyber-border);
    flex-shrink: 0;
    background: linear-gradient(0deg, rgba(168, 85, 247, 0.08), transparent);
  }
  .upg-row {
    display: flex; align-items: center;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.04), rgba(6, 182, 212, 0.02));
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 4px;
    padding: 10px 12px; margin-bottom: 8px; gap: 10px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
  }
  .upg-row:hover {
    border-color: var(--cyber-border);
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.08), rgba(6, 182, 212, 0.04));
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
  }
  .upg-row::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, var(--cyber-neon-purple), var(--cyber-neon-cyan));
    opacity: 0.6;
  }
  .upg-info { flex: 1; min-width: 0; }
  .upg-name { color: var(--cyber-text-primary); font-size: 13px; font-weight: 600;
    margin-bottom: 3px; font-family: var(--cyber-font-display); letter-spacing: 0.5px; }
  .upg-desc { color: var(--cyber-text-secondary); font-size: 10px; line-height: 1.4; }
  .upg-level { color: var(--cyber-neon-gold); font-size: 10px; margin-top: 2px;
    font-family: var(--cyber-font-mono); text-shadow: 0 0 4px rgba(251, 191, 36, 0.5); }
  .upg-milestone { color: var(--cyber-neon-purple-soft); font-size: 10px; margin-top: 2px;
    font-weight: 600; text-shadow: 0 0 4px rgba(168, 85, 247, 0.5); }
  .upg-milestone-done { color: var(--cyber-neon-green); text-shadow: 0 0 4px rgba(16, 185, 129, 0.5); }
  .upg-buy-btn {
    min-width: 72px; height: 36px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.6), rgba(6, 95, 70, 0.8));
    color: #fff;
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: 4px;
    font-size: 11px; font-weight: 700; cursor: pointer;
    font-family: var(--cyber-font-display);
    padding: 0 8px; white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
  }
  .upg-buy-btn:hover {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.8), rgba(6, 95, 70, 0.9));
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
    border-color: var(--cyber-neon-green);
  }
  .upg-buy-btn.cant {
    background: linear-gradient(180deg, rgba(50, 20, 30, 0.6), rgba(25, 10, 20, 0.8));
    border-color: rgba(180, 50, 50, 0.3);
    cursor: not-allowed;
    color: rgba(255,255,255,0.4);
    opacity: 0.7;
  }
  .upg-buy-btn.cant:hover {
    transform: none;
    box-shadow: none;
  }
  .upg-buy-btn.purple {
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.6), rgba(88, 28, 135, 0.8));
    border-color: rgba(168, 85, 247, 0.5);
  }
  .upg-buy-btn.purple:hover {
    box-shadow: var(--cyber-glow-purple);
    border-color: var(--cyber-neon-purple);
  }
  .upg-buy-btn.purple.cant {
    background: linear-gradient(180deg, rgba(50, 20, 30, 0.6), rgba(25, 10, 20, 0.8));
    border-color: rgba(180, 50, 50, 0.3);
    opacity: 0.7;
  }
  .upg-buy-btn.flash { animation: cyberFlashRed 0.3s ease; }
  @keyframes cyberFlashRed {
    0%, 100% { background: linear-gradient(180deg, rgba(239, 68, 68, 0.5), rgba(127, 29, 29, 0.7)); }
    50% { background: linear-gradient(180deg, rgba(239, 68, 68, 0.9), rgba(127, 29, 29, 1));
      box-shadow: 0 0 16px rgba(239, 68, 68, 0.8); }
  }
  .upg-buy-btn.flash-success { animation: cyberFlashGold 0.5s ease; }
  @keyframes cyberFlashGold {
    0% { background: linear-gradient(180deg, rgba(251, 191, 36, 1), rgba(217, 119, 6, 1));
      transform: scale(1.08); box-shadow: 0 0 20px rgba(251, 191, 36, 0.9); }
    100% { transform: scale(1); }
  }
  .upg-buy-btn.expensive {
    background: linear-gradient(180deg, rgba(251, 146, 60, 0.7), rgba(194, 65, 12, 0.8));
    border-color: rgba(251, 146, 60, 0.5);
    animation: cyberExpensivePulse 1.5s ease-in-out infinite;
  }
  @keyframes cyberExpensivePulse {
    0%, 100% { box-shadow: 0 0 0 rgba(251, 146, 60, 0); }
    50% { box-shadow: 0 0 12px rgba(251, 146, 60, 0.6); }
  }
  .upg-buy-btn:not(.cant):not(:disabled):hover {
    transform: translateY(-1px);
  }
  .upg-buy-btn:not(.cant):not(:disabled):active {
    transform: translateY(0) scale(0.96);
  }
  /* 升级时显示 "+1" 飘字 */
  .upg-level-up-toast {
    position: absolute; color: var(--cyber-neon-gold); font-weight: 800;
    font-size: 16px; pointer-events: none;
    animation: upgLevelUpToast 1s ease-out forwards;
    text-shadow: var(--cyber-glow-gold);
    z-index: 10;
    font-family: var(--cyber-font-mono);
  }
  @keyframes upgLevelUpToast {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    20% { transform: translateY(-10px) scale(1.2); opacity: 1; }
    100% { transform: translateY(-40px) scale(1); opacity: 0; }
  }
  .upg-batch-btns { display: flex; gap: 4px; flex-shrink: 0; }
  .upg-batch-btn {
    min-width: 42px; height: 34px;
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.5), rgba(8, 51, 68, 0.7));
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 4px;
    color: #fff; font-size: 10px; font-weight: 600; cursor: pointer;
    font-family: var(--cyber-font-display);
    padding: 0 5px; white-space: nowrap;
    letter-spacing: 0.5px;
    transition: all 0.15s;
  }
  .upg-batch-btn:hover {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.7), rgba(8, 51, 68, 0.8));
    box-shadow: var(--cyber-glow-cyan);
    border-color: var(--cyber-neon-cyan);
  }
  .upg-batch-btn.cant {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.4), rgba(127, 29, 29, 0.6));
    border-color: rgba(239, 68, 68, 0.3);
    cursor: not-allowed;
    color: rgba(255,255,255,0.5);
  }
  .upg-batch-btn.flash { animation: cyberFlashRed 0.3s ease; }
  #toastStack {
    position: fixed; top: 80px; right: 20px;
    display: flex; flex-direction: column; gap: 8px;
    z-index: 10000; pointer-events: none;
    max-width: calc(100vw - 40px);
  }
  .batch-result-toast {
    background: var(--cyber-bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--cyber-neon-gold); padding: 10px 18px;
    border-radius: 4px; font-size: 13px; font-weight: 600;
    border: 1px solid var(--cyber-border-glow);
    border-right: 3px solid var(--cyber-neon-purple);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3), 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    font-family: var(--cyber-font-mono);
    text-shadow: var(--cyber-glow-gold);
    max-width: 280px;
    pointer-events: auto;
    animation: toastSlideIn 2.6s ease forwards;
  }
  @keyframes toastSlideIn {
    0% { opacity: 0; transform: translateX(120%); }
    12% { opacity: 1; transform: translateX(0); }
    85% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(120%); }
  }
  .equ-batch-bar {
    display: flex; gap: 8px; margin-bottom: 10px;
  }
  .equ-batch-btn {
    flex: 1; height: 36px;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.6), rgba(180, 83, 9, 0.8));
    color: #fff;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 4px;
    font-size: 12px; font-weight: 700; cursor: pointer;
    font-family: var(--cyber-font-display);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.15s;
  }
  .equ-batch-btn:hover {
    box-shadow: var(--cyber-glow-gold);
    border-color: var(--cyber-neon-gold);
  }
  #closeUpgradeBtn {
    display: block; width: 100%; margin-top: 10px; height: 38px;
    background: linear-gradient(180deg, rgba(100, 90, 140, 0.5), rgba(50, 40, 80, 0.7));
    color: var(--cyber-text-secondary);
    border: 1px solid var(--cyber-border);
    border-radius: 4px;
    font-size: 14px; cursor: pointer;
    font-family: var(--cyber-font-display);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s;
  }
  #closeUpgradeBtn:hover {
    border-color: var(--cyber-neon-purple);
    color: #fff;
    box-shadow: var(--cyber-glow-purple);
  }

  .pass-btn {
    display: block; width: 100%; height: 44px; margin-top: 14px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.7), rgba(236, 72, 153, 0.7));
    color: #fff; border: 1px solid rgba(168, 85, 247, 0.6);
    border-radius: 4px; font-size: 14px; font-weight: 700; cursor: pointer;
    font-family: var(--cyber-font-display);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
  }
  .pass-btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.6), 0 0 40px rgba(236, 72, 153, 0.3);
  }
  .pass-btn.purchased {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.6), rgba(6, 95, 70, 0.8));
    border-color: rgba(16, 185, 129, 0.5);
    cursor: default;
  }
  .pass-status { text-align: center; color: var(--cyber-neon-purple-soft); font-size: 13px;
    font-weight: 600; margin-top: 8px;
    text-shadow: 0 0 6px rgba(168, 85, 247, 0.5);
    font-family: var(--cyber-font-mono); }
  #upgradePanel::-webkit-scrollbar { width: 4px; }
  #upgradePanel::-webkit-scrollbar-track { background: transparent; }
  #upgradePanel::-webkit-scrollbar-thumb { background: var(--cyber-neon-purple); border-radius: 2px; opacity: 0.6; }

  #offlineOverlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 2, 15, 0.82);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    z-index: 200; display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.25s ease; }
  #offlineOverlay.open { display: flex; opacity: 1; }
  #offlineOverlay.open #offlinePanel { animation: panelFadeIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  #offlineOverlay.closing { opacity: 0; }
  #offlineOverlay.closing #offlinePanel { animation: panelFadeOut 0.2s ease-in both; }
  #offlinePanel {
    background: var(--cyber-bg-panel);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid var(--cyber-border-glow);
    border-radius: 2px;
    width: 90%; max-width: 420px; padding: 24px 20px;
    text-align: center;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.3), 0 0 80px rgba(6, 182, 212, 0.1);
    position: relative;
  }
  #offlinePanel::before, #offlinePanel::after {
    content: ''; position: absolute; width: 16px; height: 16px;
    border: 2px solid var(--cyber-neon-purple);
    pointer-events: none;
  }
  #offlinePanel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
  #offlinePanel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
  #offlineTitle { color: var(--cyber-neon-purple-soft); font-size: 20px; margin: 0 0 14px 0;
    font-family: var(--cyber-font-display);
    text-shadow: var(--cyber-glow-purple);
    letter-spacing: 2px; }
  .offline-text { color: var(--cyber-text-secondary); font-size: 15px; margin: 6px 0; line-height: 1.5; }
  .offline-claim-btn {
    width: 100%; height: 44px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.7), rgba(6, 95, 70, 0.9));
    color: #fff;
    border: 1px solid rgba(16, 185, 129, 0.6);
    border-radius: 4px;
    font-size: 16px; font-weight: 700; cursor: pointer;
    font-family: var(--cyber-font-display);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.2s;
  }
  .offline-claim-btn:hover {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.7);
    border-color: var(--cyber-neon-green);
  }

  #transcendOverlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 2, 15, 0.82);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    z-index: 250; display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.25s ease; }
  #transcendOverlay.open { display: flex; opacity: 1; }
  #transcendOverlay.open #transcendPanel { animation: panelFadeIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  #transcendOverlay.closing { opacity: 0; }
  #transcendOverlay.closing #transcendPanel { animation: panelFadeOut 0.2s ease-in both; }

  /* 离线收益面板 - 赛博增强版 */
  #offlinePanel { position: relative; }
  .offline-glow {
    position: absolute; top: 50%; left: 50%;
    width: 200%; height: 200%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, transparent 60%);
    pointer-events: none; z-index: 0;
    animation: offlineGlowPulse 3s ease-in-out infinite;
  }
  @keyframes offlineGlowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  }
  .offline-icon-wrap { text-align: center; margin-bottom: 8px; position: relative; z-index: 1; }
  .offline-icon {
    display: inline-block; font-size: 56px;
    animation: offlineShipFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.8)) drop-shadow(0 0 40px rgba(6, 182, 212, 0.4));
  }
  @keyframes offlineShipFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
  }
  .offline-coins-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(6, 182, 212, 0.1));
    border: 1px solid var(--cyber-border);
    border-radius: 4px; padding: 14px 12px; margin: 14px 0;
    text-align: center; position: relative; z-index: 1;
  }
  .offline-coins-label { font-size: 11px; color: var(--cyber-text-secondary); margin-bottom: 4px;
    font-family: var(--cyber-font-display); letter-spacing: 1.5px; text-transform: uppercase; }
  .offline-coins-value {
    font-size: 32px; font-weight: 800;
    background: linear-gradient(90deg, var(--cyber-neon-gold), #f59e0b, var(--cyber-neon-gold));
    background-size: 200% 100%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShine 2s linear infinite;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    font-family: var(--cyber-font-mono);
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
  }
  @keyframes goldShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
  }
  .offline-coins-unit { font-size: 12px; color: var(--cyber-text-muted); margin-top: 2px; }
  .offline-claim-btn { position: relative; z-index: 1; }
  .offline-claim-btn:hover { box-shadow: 0 0 24px rgba(16, 185, 129, 0.7); }
  .offline-hint {
    color: var(--cyber-text-muted); font-size: 11px; margin-top: 10px;
    text-align: center; position: relative; z-index: 1;
  }
  #transcendPanel {
    background: var(--cyber-bg-panel);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid var(--cyber-border-glow);
    border-radius: 2px; width: 90%; max-width: 420px; padding: 24px 20px;
    text-align: center;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.4), 0 0 80px rgba(236, 72, 153, 0.2);
    position: relative;
  }
  #transcendPanel::before, #transcendPanel::after {
    content: ''; position: absolute; width: 16px; height: 16px;
    border: 2px solid var(--cyber-neon-pink);
    pointer-events: none;
  }
  #transcendPanel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
  #transcendPanel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
  #transcendTitle { color: var(--cyber-neon-pink); font-size: 20px; margin: 0 0 14px 0;
    font-family: var(--cyber-font-display);
    text-shadow: var(--cyber-glow-pink);
    letter-spacing: 2px; }
  .transcend-text { color: var(--cyber-text-secondary); font-size: 14px; margin: 8px 0; line-height: 1.6; }
  .transcend-reward {
    color: var(--cyber-neon-purple-soft); font-size: 18px; font-weight: 700; margin: 14px 0;
    padding: 12px;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    border: 1px solid var(--cyber-border);
    border-radius: 4px;
    text-shadow: 0 0 6px rgba(168, 85, 247, 0.5);
    font-family: var(--cyber-font-mono);
  }
  .transcend-hint { color: var(--cyber-neon-red); font-size: 12px; margin: 10px 0;
    text-shadow: 0 0 4px rgba(255, 51, 102, 0.5); }
  .transcend-btn-row { display: flex; gap: 10px; margin-top: 14px; }
  .transcend-btn {
    flex: 1; height: 44px; border-radius: 4px; font-size: 14px; font-weight: 700;
    cursor: pointer; font-family: var(--cyber-font-display);
    border: 1px solid var(--cyber-border);
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s;
  }
  .transcend-btn.confirm {
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.7), rgba(88, 28, 135, 0.9));
    border-color: rgba(168, 85, 247, 0.6);
  }
  .transcend-btn.confirm:hover:not(:disabled) {
    box-shadow: var(--cyber-glow-purple);
    border-color: var(--cyber-neon-purple);
  }
  .transcend-btn.confirm:disabled {
    background: linear-gradient(180deg, rgba(80, 70, 100, 0.5), rgba(40, 30, 60, 0.7));
    color: var(--cyber-text-muted); cursor: not-allowed;
    border-color: var(--cyber-border);
  }
  .transcend-btn.cancel {
    background: linear-gradient(180deg, rgba(80, 70, 100, 0.5), rgba(40, 30, 60, 0.7));
  }
  .transcend-btn.cancel:hover {
    border-color: var(--cyber-neon-pink);
    color: var(--cyber-neon-pink-soft);
  }

  #settingsOverlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 2, 15, 0.82);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    z-index: 150; display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.25s ease; }
  #settingsOverlay.open { display: flex; opacity: 1; }
  #settingsOverlay.open #settingsPanel { animation: panelFadeIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  #settingsOverlay.closing { opacity: 0; }
  #settingsOverlay.closing #settingsPanel { animation: panelFadeOut 0.2s ease-in both; }
  #settingsPanel {
    background: var(--cyber-bg-panel);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid var(--cyber-border-glow);
    border-radius: 2px; width: 90%; max-width: 360px; padding: 0;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.3);
    max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
    position: relative;
  }
  #settingsPanel::before, #settingsPanel::after {
    content: ''; position: absolute; width: 14px; height: 14px;
    border: 2px solid var(--cyber-neon-purple);
    pointer-events: none; z-index: 10;
  }
  #settingsPanel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
  #settingsPanel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
  #settingsPanel > h2 {
    color: var(--cyber-neon-purple-soft); font-size: 18px; text-align: center;
    margin: 0; padding: 14px 20px 12px 20px;
    border-bottom: 1px solid var(--cyber-border);
    position: relative; flex-shrink: 0;
    font-family: var(--cyber-font-display);
    text-shadow: var(--cyber-glow-purple);
    letter-spacing: 2px;
  }
  #settingsPanel > h2::after {
    content: '×'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px; line-height: 26px; text-align: center;
    color: var(--cyber-text-muted); font-size: 22px; font-weight: 400;
    border: 1px solid var(--cyber-border); border-radius: 4px;
    cursor: pointer; user-select: none;
    transition: all 0.2s;
    font-family: var(--cyber-font-mono);
  }
  #settingsPanel > h2::after:hover { color: var(--cyber-neon-pink); border-color: var(--cyber-neon-pink);
    text-shadow: var(--cyber-glow-pink); }
  #settingsPanel > #closeSettingsBtn { display: none; }
  #settingsScroll {
    flex: 1; overflow-y: auto; padding: 14px 16px;
    -webkit-overflow-scrolling: touch;
  }
  #settingsFooter {
    padding: 10px 16px 12px 16px;
    border-top: 1px solid var(--cyber-border);
    flex-shrink: 0;
    background: linear-gradient(0deg, rgba(168, 85, 247, 0.06), transparent);
  }
  .setting-row {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.04), rgba(6, 182, 212, 0.02));
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 4px; padding: 12px; margin-bottom: 10px;
  }
  .setting-row span { color: var(--cyber-text-primary); font-size: 14px; font-weight: 600; }
  .setting-btn {
    min-width: 80px; height: 36px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.6), rgba(6, 95, 70, 0.8));
    color: #fff;
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: 4px;
    font-size: 13px; font-weight: 700; cursor: pointer;
    font-family: var(--cyber-font-display);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.15s;
  }
  .setting-btn:hover { box-shadow: 0 0 12px rgba(16, 185, 129, 0.6); }
  .setting-btn.off {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.5), rgba(127, 29, 29, 0.7));
    border-color: rgba(239, 68, 68, 0.4);
  }
  .setting-btn.off:hover { box-shadow: 0 0 12px rgba(239, 68, 68, 0.5); }
  #closeSettingsBtn {
    display: block; width: 100%; height: 38px;
    background: linear-gradient(180deg, rgba(100, 90, 140, 0.5), rgba(50, 40, 80, 0.7));
    color: var(--cyber-text-secondary);
    border: 1px solid var(--cyber-border);
    border-radius: 4px;
    font-size: 14px; cursor: pointer;
    font-family: var(--cyber-font-display);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s;
  }
  #closeSettingsBtn:hover {
    border-color: var(--cyber-neon-purple);
    color: #fff;
    box-shadow: var(--cyber-glow-purple);
  }

  /* 装备系统样式 - 赛博版 */
  .equip-slot {
    display: flex; align-items: center;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.04), rgba(6, 182, 212, 0.02));
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 4px; padding: 10px 12px; margin-bottom: 8px; gap: 10px;
    border-left: 3px solid var(--cyber-text-muted);
    transition: all 0.2s;
  }
  .equip-slot.equipped {
    border-left-color: var(--cyber-neon-gold);
    box-shadow: -3px 0 12px -3px rgba(251, 191, 36, 0.5);
  }
  .equip-slot-icon { font-size: 22px; min-width: 30px; text-align: center;
    filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.5)); }
  .equip-slot-info { flex: 1; min-width: 0; }
  .equip-slot-name { color: var(--cyber-text-primary); font-size: 13px; font-weight: 600;
    font-family: var(--cyber-font-display); letter-spacing: 0.5px; }
  .equip-slot-stat { color: var(--cyber-text-secondary); font-size: 11px; margin-top: 2px;
    font-family: var(--cyber-font-mono); }
  .equip-empty { color: var(--cyber-text-muted); font-size: 11px; font-style: italic; }
  .enhance-btn {
    min-width: 64px; height: 34px;
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.6), rgba(8, 51, 68, 0.8));
    color: #fff;
    border: 1px solid rgba(6, 182, 212, 0.5);
    border-radius: 4px;
    font-size: 11px; font-weight: 700; cursor: pointer;
    font-family: var(--cyber-font-display);
    padding: 0 6px; white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.15s;
  }
  .enhance-btn:hover { box-shadow: var(--cyber-glow-cyan); border-color: var(--cyber-neon-cyan); }
  .enhance-btn.cant {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.4), rgba(127, 29, 29, 0.6));
    border-color: rgba(239, 68, 68, 0.3);
    cursor: not-allowed;
    color: rgba(255,255,255,0.5);
  }
  .enhance-btn.maxed {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.6), rgba(180, 83, 9, 0.8));
    border-color: rgba(251, 191, 36, 0.5);
    cursor: default;
  }
  .alloy-display {
    text-align: center; color: var(--cyber-neon-cyan); font-size: 15px; font-weight: 700;
    margin: 8px 0; padding: 10px;
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.1), rgba(168, 85, 247, 0.08));
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 4px;
    font-family: var(--cyber-font-mono);
    text-shadow: var(--cyber-glow-cyan);
  }

  #dropPopup {
    position: fixed; top: 35%; left: 50%; z-index: 180; display: none; pointer-events: none;
    padding: 16px 32px; border-radius: 2px;
    border: 2px solid var(--cyber-neon-gold);
    background: var(--cyber-bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.6), 0 0 60px rgba(236, 72, 153, 0.3), inset 0 0 20px rgba(251, 191, 36, 0.1);
    text-align: center; transform: translate(-50%, -50%);
  }
  #dropPopup::before, #dropPopup::after {
    content: ''; position: absolute; width: 12px; height: 12px;
    border: 2px solid var(--cyber-neon-pink);
    pointer-events: none;
  }
  #dropPopup::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
  #dropPopup::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
  @keyframes dropPopupAnim {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
    25% { transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  }
  .drop-icon { font-size: 36px; margin-bottom: 4px;
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.8)); }
  .drop-name { font-size: 20px; font-weight: 700;
    font-family: var(--cyber-font-display); letter-spacing: 1px; }
  .drop-quality { font-size: 13px; margin-top: 4px; font-weight: 600;
    font-family: var(--cyber-font-mono); text-transform: uppercase; letter-spacing: 1px; }

  /* 皮肤系统样式 - 赛博版 */
  .skin-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px;
  }
  .skin-card {
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.06), rgba(15, 8, 40, 0.4));
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 4px; padding: 10px 8px; cursor: pointer; text-align: center;
    transition: all 0.2s;
  }
  .skin-card:hover {
    border-color: var(--cyber-border);
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.12), rgba(15, 8, 40, 0.5));
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
  }
  .skin-card.active {
    border-color: var(--cyber-neon-gold);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.12), rgba(168, 85, 247, 0.08));
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.5);
  }
  .skin-card.locked { opacity: 0.45; cursor: not-allowed; }
  .skin-card-icon { font-size: 22px; filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.6)); }
  .skin-card-name { color: var(--cyber-text-primary); font-size: 12px; font-weight: 600; margin-top: 4px;
    font-family: var(--cyber-font-display); letter-spacing: 0.5px; }
  .skin-card-cond { color: var(--cyber-text-muted); font-size: 10px; margin-top: 2px; }

  /* 设置面板分组样式 - 赛博版 */
  .settings-group { margin-bottom: 14px; }
  .settings-group-title {
    color: var(--cyber-neon-cyan); font-size: 13px; font-weight: 700; margin: 0 0 8px 0;
    padding-bottom: 4px; border-bottom: 1px solid rgba(6, 182, 212, 0.2);
    font-family: var(--cyber-font-display);
    text-shadow: var(--cyber-glow-cyan);
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  .skin-section { margin-top: 4px; }

  /* 暗物质当前加成显示 */
  .dm-current-bonus {
    color: #00e5ff; font-size: 11px; margin-top: 3px; font-weight: 600;
  }

  /* 套装系统样式 */
  .set-section {
    background: rgba(255,215,0,0.05); border: 1px solid rgba(255,215,0,0.2);
    border-radius: 10px; padding: 12px; margin-bottom: 12px;
  }
  .set-title {
    font-size: 15px; font-weight: 700; margin-bottom: 8px;
    text-shadow: 0 0 8px currentColor;
  }
  .set-bonus-row {
    display: flex; align-items: center; gap: 6px; padding: 4px 0;
    font-size: 12px; color: #666;
  }
  .set-bonus-row.active { color: #fff; text-shadow: 0 0 6px rgba(255,215,0,0.6); }
  .set-bonus-tag {
    display: inline-block; min-width: 36px; text-align: center;
    padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700;
    background: rgba(100,100,100,0.4); color: #aaa;
  }
  .set-bonus-row.active .set-bonus-tag { background: rgba(255,215,0,0.3); color: #ffd700; }

  /* 传说装备流动金边动画 */
  .equip-slot.legendary {
    border-left: 3px solid #ffd700;
    box-shadow: 0 0 12px rgba(255,215,0,0.4), inset 0 0 8px rgba(255,215,0,0.1);
    animation: legendaryGlow 2s ease-in-out infinite;
  }
  @keyframes legendaryGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(255,215,0,0.4), inset 0 0 8px rgba(255,215,0,0.1); }
    50% { box-shadow: 0 0 20px rgba(255,215,0,0.7), inset 0 0 12px rgba(255,215,0,0.2); }
  }
  .equip-set-tag {
    display: inline-block; margin-left: 6px; padding: 1px 5px;
    border-radius: 3px; font-size: 9px; font-weight: 700;
    background: rgba(255,215,0,0.2); color: #ffd700;
  }
  .equip-set-tag.void { background: rgba(179,136,255,0.2); color: #b388ff; }
  .inv-batch-bar {
    display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap;
  }
  .inv-batch-btn {
    flex: 1; min-width: 0; height: 30px; border-radius: 6px;
    font-size: 10px; font-weight: 600; cursor: pointer; font-family: inherit;
    border: 1px solid rgba(255,255,255,0.15); color: #fff;
    display: flex; align-items: center; justify-content: center; gap: 3px;
    padding: 0 4px;
  }
  .inv-batch-btn.decompose { background: rgba(180,60,60,0.7); border-color: rgba(220,80,80,0.4); }
  .inv-batch-btn.decompose:hover { background: rgba(200,80,80,0.85); }
  /* iter35：含史诗分解按钮——紫色主题区分 */
  .inv-batch-btn.decompose.epic { background: rgba(120,50,180,0.7); border-color: rgba(180,100,240,0.45); }
  .inv-batch-btn.decompose.epic:hover { background: rgba(150,70,210,0.85); }
  .inv-batch-btn.craft { background: rgba(60,100,160,0.7); border-color: rgba(100,160,220,0.4); }
  .inv-batch-btn.craft:hover { background: rgba(80,130,200,0.85); }
  .inv-batch-btn.lock { background: rgba(100,80,140,0.7); border-color: rgba(150,120,200,0.4); }
  .inv-batch-btn.lock:hover { background: rgba(120,100,180,0.85); }
  .inv-batch-btn.cant { opacity: 0.5; cursor: not-allowed; }

  /* ===== 合成链可视化 ===== */
  .craft-chain-wrap {
    background: rgba(0,0,0,0.25); border-radius: 8px;
    padding: 6px 8px 8px 8px; margin-bottom: 6px;
    border: 1px solid rgba(255,255,255,0.06);
  }
  .craft-chain-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px;
  }
  .craft-chain-title {
    font-size: 11px; color: #b388ff; font-weight: 600;
  }
  .craft-chain-help-btn {
    background: rgba(100,140,200,0.3); border: 1px solid rgba(120,160,220,0.4);
    color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px;
    cursor: pointer; font-family: inherit;
  }
  .craft-chain-help-btn:hover { background: rgba(120,160,220,0.5); }
  .craft-chain {
    display: flex; align-items: center; justify-content: space-between; gap: 2px;
  }
  .craft-chain-node {
    display: flex; flex-direction: column; align-items: center;
    flex: 1; min-width: 0;
    background: rgba(0,0,0,0.3); border-radius: 6px;
    padding: 4px 2px; position: relative;
    border: 1px solid transparent;
    transition: all 0.2s;
  }
  .craft-chain-node.craftable { border-color: rgba(76,175,80,0.7); background: rgba(76,175,80,0.10); }
  .craft-chain-node .node-dot {
    width: 18px; height: 18px; border-radius: 50%;
    margin-bottom: 3px;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
  }
  .craft-chain-node .node-name {
    font-size: 9px; color: #ddd; font-weight: 600; line-height: 1;
  }
  .craft-chain-node .node-count {
    font-size: 10px; color: #ffe94c; font-weight: 700; margin-top: 1px;
  }
  .craft-chain-arrow {
    color: #888; font-size: 12px; flex-shrink: 0; line-height: 1;
  }
  .craft-chain-summary {
    font-size: 10px; color: #888; margin-top: 5px; text-align: center;
  }
  .craft-chain-summary strong { color: #4caf50; }
  .craft-chain-summary.locked { color: #ff9800; }

  /* ===== 规则帮助面板 ===== */
  .craft-rules {
    background: rgba(179,136,255,0.08); border: 1px solid rgba(179,136,255,0.2);
    border-radius: 6px; padding: 8px 10px; margin-bottom: 6px;
    font-size: 10px; line-height: 1.5; color: #d0c8e0;
  }
  .craft-rules-title {
    font-size: 11px; color: #b388ff; font-weight: 700; margin-bottom: 4px;
  }
  .craft-rules-section { margin-bottom: 6px; }
  .craft-rules-section:last-child { margin-bottom: 0; }
  .craft-rules-section strong { color: #ffe94c; }
  .craft-rules-section .craft-rule-icon { display: inline-block; width: 14px; }

  /* ===== 合成预览模态框 ===== */
  .craft-preview-box {
    background: rgba(18,22,30,0.98); border: 1px solid rgba(179,136,255,0.3);
    border-radius: 12px; padding: 14px 16px;
    width: 92%; max-width: 480px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
    max-height: 80vh; overflow-y: auto;
  }
  .craft-preview-title {
    font-size: 14px; color: #b388ff; font-weight: 700;
    text-align: center; margin-bottom: 10px;
  }
  .craft-preview-body { font-size: 12px; }
  .craft-preview-section { margin-bottom: 10px; }
  .craft-preview-section-title {
    font-size: 11px; color: #888; margin-bottom: 4px;
  }
  .craft-preview-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 6px; border-radius: 4px; margin-bottom: 2px;
    font-size: 11px; background: rgba(0,0,0,0.25);
  }
  .craft-preview-row.output { background: rgba(76,175,80,0.15); }
  .craft-preview-row .row-left { display: flex; align-items: center; gap: 5px; min-width: 0; }
  .craft-preview-row .row-icon { font-size: 14px; }
  .craft-preview-row .row-name { color: #fff; font-weight: 600; }
  .craft-preview-row .row-quality { font-size: 9px; padding: 1px 4px; border-radius: 3px; }
  .craft-preview-row .row-right { color: #ffe94c; font-weight: 700; }
  .craft-preview-summary {
    text-align: center; padding: 8px; margin-top: 6px;
    background: rgba(255,233,76,0.08); border-radius: 6px;
    color: #ffe94c; font-weight: 700; font-size: 12px;
  }
  .craft-preview-noop {
    text-align: center; padding: 16px; color: #888; font-size: 12px;
  }

  /* ===== 库存按钮预览（实时显示） ===== */
  .inv-batch-btn-label { font-weight: 700; }
  .inv-batch-btn-sub { font-size: 9px; opacity: 0.85; margin-top: 1px; line-height: 1; }

  .inv-confirm-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); z-index: 300; display: none; align-items: center; justify-content: center;
  }
  .inv-confirm-overlay.open { display: flex; }
  .inv-confirm-box {
    background: rgba(18,22,30,0.98); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px; width: 90%; max-width: 380px; padding: 20px; text-align: center;
  }
  .inv-confirm-text { color: #d6dce6; font-size: 14px; margin: 10px 0; line-height: 1.5; }
  .inv-confirm-btns { display: flex; gap: 10px; margin-top: 14px; }
  .inv-confirm-btn {
    flex: 1; height: 40px; border-radius: 8px; font-size: 14px; font-weight: 700;
    cursor: pointer; font-family: inherit; border: 1px solid rgba(255,255,255,0.2); color: #fff;
  }
  .inv-confirm-btn.ok { background: rgba(180,60,60,0.85); border-color: rgba(220,80,80,0.5); }
  .inv-confirm-btn.ok:hover { background: rgba(220,80,80,0.95); }
  .inv-confirm-btn.cancel { background: rgba(80,80,100,0.5); }
  .inv-confirm-btn.cancel:hover { background: rgba(100,100,130,0.6); }
  .inv-item-row {
    display: flex; align-items: center; background: rgba(255,255,255,0.04);
    border-radius: 6px; padding: 5px 8px; margin-bottom: 4px; gap: 6px;
  }
  .inv-item-row.equipped { border: 1px solid rgba(255,215,0,0.3); }
  .inv-empty { color: #666; font-size: 12px; text-align: center; padding: 8px; }
  /* 品质筛选栏 */
  .inv-filter-bar { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
  .inv-filter-btn {
    font-size: 11px; padding: 3px 8px; border-radius: 4px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
    color: #aaa; cursor: pointer; font-family: inherit;
  }
  .inv-filter-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
  .inv-filter-btn.active { background: rgba(255,255,255,0.12); }
  /* 槽位筛选栏 */
  .inv-slot-filter-bar { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
  .inv-slot-filter-btn {
    font-size: 11px; padding: 3px 8px; border-radius: 4px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
    color: #aaa; cursor: pointer; font-family: inherit;
  }
  .inv-slot-filter-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
  .inv-slot-filter-btn.active { background: rgba(255,255,255,0.12); }
  /* 传说特效简述 */
  .inv-item-legendary-brief {
    font-size: 10px; color: #ffd700; margin-top: 2px;
    text-shadow: 0 0 4px rgba(255,215,0,0.3);
  }
  /* 装备槽位强化等级徽章 */
  .slot-enhance-badge {
    position: absolute; top: -4px; right: -4px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e; font-size: 10px; font-weight: 700;
    border-radius: 8px; padding: 1px 5px; line-height: 1.2;
    box-shadow: 0 0 6px rgba(255,215,0,0.5);
  }
  /* 一键强化浮动按钮 */
  .batch-enhance-fab {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    padding: 6px 16px; border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,215,0,0.9), rgba(255,140,0,0.9));
    color: #1a1a2e; font-size: 12px; font-weight: 700; font-family: inherit;
    border: 1px solid rgba(255,215,0,0.5); cursor: pointer;
    box-shadow: 0 2px 12px rgba(255,215,0,0.3);
    transition: transform 0.15s, box-shadow 0.15s;
    z-index: 5;
  }
  .batch-enhance-fab:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 4px 18px rgba(255,215,0,0.5);
  }
  .equip-visual-hint {
    position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%);
    font-size: 11px; color: #94a3b8; white-space: nowrap;
    pointer-events: none; opacity: 0.85;
  }
  .inv-lock-btn {
    font-size: 14px; background: none; border: none; cursor: pointer; padding: 0 2px;
    font-family: inherit; line-height: 1;
  }
  .inv-lock-btn.locked { color: #ff6666; }
  .inv-lock-btn.unlocked { color: #888; }
  .inv-equip-btn {
    min-width: 44px; height: 24px; background: rgba(60,130,70,0.7); color: #fff;
    border: 1px solid rgba(120,220,140,0.3); border-radius: 5px;
    font-size: 10px; font-weight: 600; cursor: pointer; font-family: inherit;
  }
  .inv-equip-btn:hover { background: rgba(70,160,85,0.9); }
  .inv-equip-btn.cant { background: rgba(80,80,100,0.5); cursor: not-allowed; }
  .inv-batch-result {
    text-align: center; font-size: 12px; font-weight: 700; color: #ffe94c;
    padding: 4px; margin-bottom: 4px; background: rgba(255,233,76,0.08);
    border-radius: 6px; display: none;
  }
  .inv-batch-result.show { display: block; animation: toastFade 2.5s ease forwards; }
  .inv-item-icon { font-size: 18px; min-width: 22px; text-align: center; }
  .inv-item-info { flex: 1; min-width: 0; }
  .inv-item-name { font-size: 11px; font-weight: 600; }
  .inv-item-stat { font-size: 9px; color: #a0a8b8; margin-top: 1px; }

  /* ===== 装备面板标签页系统 ===== */
  .panel-tabs {
    display: flex; gap: 3px;
    background: rgba(255,255,255,0.04); border-radius: 8px; padding: 3px;
    flex-shrink: 0;
  }
  .panel-tab {
    flex: 1; height: 30px; border-radius: 6px; border: none;
    background: transparent; color: #888; font-size: 11px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: all 0.2s;
    white-space: nowrap; padding: 0 4px;
  }
  .panel-tab.active { background: rgba(255,233,76,0.2); color: #ffe94c; }
  .panel-tab:hover:not(.active) { color: #fff; background: rgba(255,255,255,0.06); }

  /* ===== 属性面板 ===== */
  .stats-section {
    background: rgba(255,255,255,0.03); border-radius: 8px;
    padding: 8px 10px; margin-bottom: 8px;
  }
  .stats-section-title {
    color: #ffe94c; font-size: 12px; font-weight: 700;
    margin-bottom: 6px; padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,233,76,0.2);
  }
  .stats-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 3px 0; font-size: 11px;
  }
  .stats-row .stats-label { color: #a0b8d0; }
  /* iter21：统计面板数值跳动动画 */
  .stats-row .stats-value {
    color: #fff; font-weight: 600;
    animation: statsValuePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
  @keyframes statsValuePop {
    0% { transform: scale(0.7); opacity: 0.3; color: var(--cyber-neon-gold); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
  }
  .stats-row .stats-bonus { color: #4caf50; font-size: 10px; margin-left: 4px; }

  /* ===== 装备可视化区域 ===== */
  #equipVisualArea {
    position: relative; width: 100%; min-height: 280px;
    display: flex; flex-direction: column; align-items: center;
  }
  .ship-visual-container {
    position: relative; width: 280px; height: 280px; margin: 0 auto 10px;
  }
  .ship-canvas-wrap {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px;
  }
  #equipShipCanvas { width: 130px; height: 130px; }

  /* 装备槽位环绕飞船 */
  .equip-orbit {
    position: absolute; width: 100%; height: 100%;
  }
  .equip-slot-visual {
    position: absolute; width: 60px; height: 60px;
    border-radius: 10px; border: 2px solid rgba(255,255,255,0.12);
    background: rgba(20,25,35,0.85);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
    font-size: 22px;
  }
  .equip-slot-visual:hover { transform: scale(1.1); box-shadow: 0 0 16px rgba(255,255,255,0.2); }
  .equip-slot-visual.empty { opacity: 0.4; border-style: dashed; }
  .equip-slot-visual.empty:hover { opacity: 0.7; }
  .equip-slot-visual.normal { border-color: rgba(255,255,255,0.3); background: rgba(40,40,50,0.9); }
  .equip-slot-visual.rare { border-color: rgba(79,195,247,0.6); box-shadow: 0 0 10px rgba(79,195,247,0.3); }
  .equip-slot-visual.epic { border-color: rgba(179,136,255,0.7); box-shadow: 0 0 12px rgba(179,136,255,0.4); }
  .equip-slot-visual.legendary {
    border-color: rgba(255,215,0,0.8); box-shadow: 0 0 16px rgba(255,215,0,0.5);
    animation: legendarySlotGlow 2s ease-in-out infinite;
  }
  @keyframes legendarySlotGlow {
    0%,100% { box-shadow: 0 0 16px rgba(255,215,0,0.5); }
    50% { box-shadow: 0 0 28px rgba(255,215,0,0.9), 0 0 40px rgba(255,215,0,0.3); }
  }
  .slot-icon { font-size: 22px; line-height: 1; }
  .slot-empty-icon { font-size: 18px; color: #555; }
  .slot-name-label { font-size: 9px; color: #888; margin-top: 2px; font-weight: 600; }
  /* iter21：空槽位点击引导 */
  .slot-empty-hint {
    font-size: 8px; color: var(--cyber-neon-cyan-soft);
    text-align: center; margin-top: 1px;
    animation: slotHintPulse 1.8s ease-in-out infinite;
    text-shadow: 0 0 4px rgba(34, 211, 238, 0.6);
    letter-spacing: 0.5px;
  }
  @keyframes slotHintPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
  }
  .slot-quality-dot {
    position: absolute; bottom: 3px; right: 3px;
    width: 8px; height: 8px; border-radius: 50%;
  }
  .slot-quality-dot.normal { background: #aaa; }
  .slot-quality-dot.rare { background: #4fc3f7; box-shadow: 0 0 4px #4fc3f7; }
  .slot-quality-dot.epic { background: #b388ff; box-shadow: 0 0 4px #b388ff; }
  .slot-quality-dot.legendary { background: #ffd700; box-shadow: 0 0 6px #ffd700; animation: pulseGold 1.5s infinite; }
  @keyframes pulseGold { 0%,100%{box-shadow:0 0 4px #ffd700} 50%{box-shadow:0 0 10px #ffd700} }

  /* 槽位位置（6个槽位环绕飞船，280x280 容器） */
  .equip-slot-visual[data-slot="weapon"]    { top: 4px;    left: 50%; transform: translateX(-50%); }
  .equip-slot-visual[data-slot="engine"]   { top: 18%;   right: 4px; }
  .equip-slot-visual[data-slot="shield"]   { bottom: 4px; left: 50%; transform: translateX(-50%); }
  .equip-slot-visual[data-slot="antigravity"]{ bottom: 18%; left: 4px; }
  .equip-slot-visual[data-slot="quantum"]  { top: 18%;   left: 4px; }
  .equip-slot-visual[data-slot="nano"]     { bottom: 18%; right: 4px; }

  /* 槽位 tooltip 提示 */
  .equip-slot-tooltip {
    position: absolute; bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%); white-space: nowrap;
    background: rgba(0,0,0,0.92); color: #fff;
    padding: 5px 9px; border-radius: 5px;
    font-size: 11px; line-height: 1.4;
    pointer-events: none; opacity: 0; transition: opacity 0.15s;
    z-index: 50; border: 1px solid rgba(255,255,255,0.15);
  }
  .equip-slot-visual:hover .equip-slot-tooltip { opacity: 1; }
  .equip-slot-tooltip::after {
    content: ''; position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent; border-top-color: rgba(0,0,0,0.92);
  }

  /* 套装奖励条 */
  .set-reward-bar {
    width: 100%; background: rgba(255,255,255,0.04);
    border-radius: 6px; padding: 5px 8px; margin-bottom: 4px;
  }
  .set-reward-title { font-size: 11px; font-weight: 700; color: #ffe94c; margin-bottom: 3px; display: flex; justify-content: space-between; align-items: center; }
  .set-reward-progress {
    height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px;
    margin: 4px 0 5px; overflow: hidden; position: relative;
  }
  .set-reward-progress-fill {
    height: 100%; border-radius: 2px; transition: width 0.4s;
    background: linear-gradient(90deg, #4fc3f7, #b388ff, #ffd700);
  }
  .set-reward-hint {
    font-size: 9px; color: #888; font-style: italic; margin-top: 3px;
    padding: 2px 4px; background: rgba(79,195,247,0.08);
    border-left: 2px solid #4fc3f7; border-radius: 2px;
  }
  .set-reward-hint.active { color: #b9f6ca; background: rgba(67,160,71,0.12); border-left-color: #43a047; }
  .set-reward-row { font-size: 10px; color: #666; padding: 1px 0; }
  .set-reward-row.active { color: #fff; }

  /* 装备详情弹窗 */
  .equip-detail-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8); z-index: 300; display: none; align-items: center; justify-content: center;
  }
  .equip-detail-overlay.open { display: flex; }
  .equip-detail-box {
    background: rgba(15,18,28,0.98); border-radius: 14px;
    width: 90%; max-width: 340px; padding: 16px; border: 1px solid rgba(255,255,255,0.1);
    max-height: 86vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  /* 品质渐变背景：不同品质装备详情弹窗有不同视觉氛围 */
  .equip-detail-box[data-quality="rare"]      { border-color: rgba(79,195,247,0.4); box-shadow: 0 0 24px rgba(79,195,247,0.12); }
  .equip-detail-box[data-quality="epic"]      { border-color: rgba(179,136,255,0.4); box-shadow: 0 0 24px rgba(179,136,255,0.15); }
  .equip-detail-box[data-quality="legendary"] { border-color: rgba(255,215,0,0.5); box-shadow: 0 0 32px rgba(255,215,0,0.2); background: linear-gradient(135deg, rgba(40,35,15,0.98), rgba(15,18,28,0.98)); }
  .equip-detail-box[data-quality="ancient"]   { border-color: rgba(255,140,66,0.5); box-shadow: 0 0 32px rgba(255,140,66,0.22); background: linear-gradient(135deg, rgba(40,25,15,0.98), rgba(15,18,28,0.98)); }
  .equip-detail-box[data-quality="primal"]    { border-color: rgba(255,51,102,0.6); box-shadow: 0 0 36px rgba(255,51,102,0.25); background: linear-gradient(135deg, rgba(40,15,25,0.98), rgba(15,18,28,0.98)); animation: primalPulse 2.5s ease-in-out infinite; }
  .equip-detail-box[data-quality="set"]       { border-color: rgba(0,255,136,0.5); box-shadow: 0 0 32px rgba(0,255,136,0.2); background: linear-gradient(135deg, rgba(15,40,25,0.98), rgba(15,18,28,0.98)); }
  @keyframes primalPulse {
    0%, 100% { box-shadow: 0 0 36px rgba(255,51,102,0.25); }
    50% { box-shadow: 0 0 48px rgba(255,51,102,0.4); }
  }
  /* 传说特效说明区 */
  .equip-detail-legendary {
    display: flex; align-items: flex-start; gap: 8px; margin: 8px 0;
    padding: 8px 10px; border-radius: 8px;
    background: linear-gradient(90deg, rgba(255,215,0,0.1), rgba(255,215,0,0.02));
    border-left: 3px solid rgba(255,215,0,0.6);
  }
  .equip-detail-box[data-quality="ancient"] .equip-detail-legendary { background: linear-gradient(90deg, rgba(255,140,66,0.12), rgba(255,140,66,0.02)); border-left-color: rgba(255,140,66,0.7); }
  .equip-detail-box[data-quality="primal"] .equip-detail-legendary { background: linear-gradient(90deg, rgba(255,51,102,0.12), rgba(255,51,102,0.02)); border-left-color: rgba(255,51,102,0.7); }
  .legendary-icon { font-size: 18px; line-height: 1.2; }
  .legendary-info { flex: 1; min-width: 0; }
  .legendary-name { font-size: 12px; font-weight: 700; color: #ffd700; margin-bottom: 2px; }
  .equip-detail-box[data-quality="ancient"] .legendary-name { color: #ff8c42; }
  .equip-detail-box[data-quality="primal"] .legendary-name { color: #ff3366; }
  .legendary-desc { font-size: 11px; color: #d6dce6; line-height: 1.4; }
  /* 词缀主/副标签 */
  .affix-tag-main, .affix-tag-sub {
    display: inline-block; font-size: 9px; font-weight: 700;
    padding: 1px 4px; border-radius: 3px; margin-right: 4px;
    vertical-align: middle; line-height: 1.4;
  }
  .affix-tag-main { background: rgba(255,215,0,0.25); color: #ffd700; border: 1px solid rgba(255,215,0,0.4); }
  .affix-tag-sub { background: rgba(255,255,255,0.08); color: #9ca3af; border: 1px solid rgba(255,255,255,0.12); }
  .affix-row-main { font-weight: 700; }
  .equip-detail-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .equip-detail-icon { font-size: 32px; }
  .equip-detail-name { font-size: 16px; font-weight: 700; }
  .equip-detail-quality { font-size: 11px; font-weight: 600; }
  .equip-detail-stats { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 8px; }
  .stat-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; font-size: 12px; }
  .stat-row.up { color: #4caf50; }
  .stat-row.down { color: #f44336; }
  .stat-row.neutral { color: #aaa; }
  .stat-diff { font-weight: 700; }
  .stat-arrow { font-weight: 900; margin-right: 4px; }
  .equip-detail-affixes { margin-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 8px; }
  .affix-row { font-size: 11px; color: #b388ff; padding: 2px 0; }
  .equip-detail-actions { display: flex; gap: 8px; margin-top: 12px; }
  .equip-detail-btn {
    flex: 1; height: 36px; border-radius: 8px; font-size: 13px; font-weight: 700;
    cursor: pointer; font-family: inherit; border: 1px solid rgba(255,255,255,0.2); color: #fff;
  }
  .equip-detail-btn.swap { background: rgba(60,130,70,0.8); border-color: rgba(120,220,140,0.4); }
  .equip-detail-btn.swap:hover { background: rgba(70,160,85,0.9); }
  .equip-detail-btn.enhance-btn { background: linear-gradient(135deg, rgba(255,170,30,0.85), rgba(255,120,20,0.85)); border-color: rgba(255,200,80,0.5); box-shadow: 0 0 10px rgba(255,160,40,0.3); }
  .equip-detail-btn.enhance-btn:hover { background: linear-gradient(135deg, rgba(255,190,50,0.95), rgba(255,140,30,0.95)); }
  .equip-detail-btn.enhance-btn.cant { background: rgba(80,60,40,0.5); border-color: rgba(150,100,50,0.3); box-shadow: none; opacity: 0.7; cursor: not-allowed; }
  .equip-detail-btn.enhance-btn.maxed { background: rgba(120,100,40,0.6); border-color: rgba(255,215,0,0.4); color: #ffd700; cursor: default; }
  .equip-detail-btn.close-btn { background: rgba(80,80,100,0.5); }
  .equip-detail-btn.close-btn:hover { background: rgba(100,100,130,0.6); }
  .equip-detail-set { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; margin-top: 6px; display: inline-block; }
  .equip-detail-set.raider { background: rgba(255,215,0,0.15); color: #ffd700; }
  .equip-detail-set.void { background: rgba(179,136,255,0.15); color: #b388ff; }

  /* ===== 压制效果样式 ===== */
  .debuff-stun-icon { position: absolute; font-size: 12px; pointer-events: none; }
  .debuff-burn-tick { position: absolute; font-size: 10px; pointer-events: none; color: #ff6600; font-weight: 900; }
  .stun-overlay { position: absolute; pointer-events: none; }

  /* ===== 子弹反弹拖尾 ===== */
  .bullet-trail-dot { position: absolute; border-radius: 50%; pointer-events: none; }

  @media (max-width: 600px) {
    #coinsUI { font-size: 18px; top: 10px; left: 12px; }
    #dpsUI   { font-size: 14px; top: 10px; right: 12px; }
    #dmUI    { font-size: 12px; top: 40px; left: 12px; }
    #shardsUI { font-size: 11px; top: 60px; left: 12px; }
    #bottomBar { height: 54px; bottom: 12px; }
    /* 移动端技能栏：贴紧缩短的底部栏（top@66px），缩小槽位释放游戏区空间 */
    .skill-bar { bottom: 84px; padding: 6px 12px; gap: 8px; }
    .skill-slot { width: 44px; height: 44px; }
    .skill-slot-icon { font-size: 20px; }
    .ui-btn { font-size: 12px; height: 36px; }
    #upgradePanel h2 { font-size: 18px; }
    #upgradePanel h3 { font-size: 14px; }
    .upg-name { font-size: 13px; }
    .upg-desc { font-size: 10px; }
    .upg-buy-btn { font-size: 11px; height: 34px; min-width: 60px; }
    #closeUpgradeBtn { font-size: 13px; height: 34px; }
    .pass-btn { font-size: 13px; height: 40px; }
    .offline-text { font-size: 13px; }
    #offlineTitle { font-size: 18px; }
    .offline-claim-btn { font-size: 14px; height: 40px; }
    #transcendTitle { font-size: 18px; }
    .transcend-text { font-size: 13px; }
    .transcend-reward { font-size: 16px; }
    .transcend-btn { font-size: 13px; height: 40px; }
  }

  /* 超小屏（320-360px）：底部按钮压缩，避免文字截断 */
  @media (max-width: 360px) {
    #coinsUI { font-size: 16px; }
    #dpsUI { font-size: 12px; }
    .ui-btn { font-size: 10px; height: 38px; padding: 0 4px; }
    #bottomBar { height: 48px; bottom: 8px; }
    .upg-buy-btn { font-size: 10px; height: 30px; min-width: 50px; }
    #upgradePanel h2 { font-size: 16px; }
  }

  /* 平板断点（601-768px）：适度调整 */
  @media (min-width: 601px) and (max-width: 768px) {
    #coinsUI { font-size: 20px; }
    #dpsUI { font-size: 15px; }
    .ui-btn { font-size: 13px; }
  }

  /* 横屏小屏（手机横屏）：垂直空间紧张 */
  @media (max-height: 450px) and (orientation: landscape) {
    #coinsUI { top: 6px; font-size: 14px; }
    #dpsUI { top: 6px; font-size: 12px; }
    #dmUI { top: 28px; font-size: 11px; }
    #shardsUI { top: 44px; font-size: 10px; }
    #bottomBar { height: 44px; bottom: 4px; }
    .ui-btn { height: 32px; font-size: 11px; }
    /* 横屏：技能栏上移贴紧缩短的底部栏（top@48px），并缩小技能槽释放游戏区空间 */
    .skill-bar { bottom: 62px; padding: 6px 12px; gap: 8px; }
    .skill-slot { width: 40px; height: 40px; }
  }

  /* iter54：竖屏适配——底部栏不换行（换行会变高遮挡canvas触摸区），用 safe-area 避开手机home条/浏览器栏 */
  @media (orientation: portrait) and (max-width: 600px) {
    /* 顶部 HUD 缩小 + 下移避开刘海/状态栏 */
    #coinsUI { font-size: 15px; top: 8px; left: 10px; max-width: 55vw; top: calc(8px + env(safe-area-inset-top, 0px)); }
    #dpsUI { font-size: 12px; top: 8px; right: 10px; max-width: 42vw; top: calc(8px + env(safe-area-inset-top, 0px)); }
    #dmUI { font-size: 11px; top: calc(32px + env(safe-area-inset-top, 0px)); left: 10px; }
    #shardsUI { font-size: 10px; top: calc(50px + env(safe-area-inset-top, 0px)); left: 10px; }
    /* 底部按钮栏：单行不换行（flex-wrap 会变高遮挡 canvas），缩小按钮，用 safe-area 避开浏览器底栏 */
    #bottomBar { height: 44px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding: 2px 2px; flex-wrap: nowrap; gap: 1px; }
    .ui-btn { font-size: 9px; height: 30px; margin: 0 1px; padding: 0 2px; min-width: 0; flex: 1 1 0; }
    /* 竖屏技能栏上移，避开底部栏 */
    .skill-bar { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); padding: 4px 8px; gap: 6px; }
    .skill-slot { width: 36px; height: 36px; }
    .skill-slot-icon { font-size: 16px; }
  }

  /* ===== 物品强度与满值星标 ===== */
  .slot-strength { font-size: 9px; margin-top: 2px; text-align: center; font-weight: bold; }
  .full-star { display: inline-block; color: #ffd700; font-size: 14px; text-shadow: 0 0 6px #ffd700; margin-left: 2px; animation: fullStarPulse 1.5s ease-in-out infinite; }
  .full-star-inline { color: #ffd700; font-size: 13px; text-shadow: 0 0 5px #ffd700; margin-left: 8px; }
  @keyframes fullStarPulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.7;transform:scale(1.15);} }

  /* ===== 完美之器边框动画 ===== */
  .equip-slot-visual.perfect { position: relative; }
  .equip-slot-visual.perfect::before { content:''; position:absolute; inset:-2px; border-radius:8px; background:linear-gradient(45deg,#ff0000,#ff8800,#ffff00,#00ff00,#00ffff,#0088ff,#ff00ff,#ff0000); background-size:400% 400%; z-index:-1; animation: perfectRainbowBorder 3s linear infinite; }
  .inv-item-row.perfect { position: relative; border: 2px solid transparent !important; background: linear-gradient(#1a1a2e,#1a1a2e) padding-box, linear-gradient(45deg,#ff0000,#ff8800,#ffff00,#00ff00,#00ffff,#0088ff,#ff00ff) border-box !important; animation: perfectRainbowBorder 3s linear infinite; }
  @keyframes perfectRainbowBorder { 0%{background-position:0% 50%;} 100%{background-position:400% 50%;} }

  /* ===== 太古/远古品质视觉 ===== */
  .equip-slot-visual.ancient { border-color: #ff8c42; box-shadow: 0 0 12px rgba(255,140,66,0.4); }
  .equip-slot-visual.primal { border-color: #ff3366; box-shadow: 0 0 15px rgba(255,51,102,0.5); }
  .slot-quality-dot.ancient { background: #ff8c42; box-shadow: 0 0 8px #ff8c42; }
  .slot-quality-dot.primal { background: #ff3366; box-shadow: 0 0 10px #ff3366; animation: primalDotPulse 1s ease-in-out infinite; }
  @keyframes primalDotPulse { 0%,100%{box-shadow:0 0 8px #ff3366;} 50%{box-shadow:0 0 16px #ff3366,0 0 24px #ff8800;} }

  /* ===== 词缀范围条可视化 ===== */
  .affix-row { position: relative; padding: 6px 8px; margin: 4px 0; background: rgba(255,255,255,0.03); border-radius: 4px; }
  .affix-range-bar { position: relative; height: 18px; margin-top: 6px; background: rgba(255,255,255,0.08); border-radius: 9px; overflow: hidden; }
  .affix-range-fill { position: absolute; left: 0; top: 0; height: 100%; background: linear-gradient(90deg,#4fc3f7,#ffd700); transition: width 0.3s; }
  .affix-range-dot { position: absolute; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; border-radius: 50%; background: #888; }
  .affix-range-dot.min-dot { left: 2px; }
  .affix-range-dot.max-dot { right: 2px; }
  .affix-range-dot.curr-dot { width: 10px; height: 10px; background: #ffd700; border: 2px solid #fff; box-shadow: 0 0 8px #ffd700; }
  .affix-range-dot.curr-dot.golden { background: #ffdd00; box-shadow: 0 0 12px #ffdd00,0 0 20px #ffaa00; animation: goldenDotPulse 1s ease-in-out infinite; }
  @keyframes goldenDotPulse { 0%,100%{transform:translate(-50%,-50%) scale(1);} 50%{transform:translate(-50%,-50%) scale(1.3);} }
  .affix-range-dot.curr-dot { transform: translateY(-50%) translateX(-50%); }
  .affix-range-values { position: absolute; right: 8px; top: 0; font-size: 10px; color: #aaa; line-height: 18px; }

  /* ===== 装备详情强度行 ===== */
  .equip-detail-strength { font-size: 13px; margin: 4px 0; font-weight: bold; }

  /* ===== 完美之器文字动画 ===== */
  @keyframes perfectTextScale { 0%{opacity:0;transform:translate(-50%,-50%) scale(0.3);} 15%{opacity:1;transform:translate(-50%,-50%) scale(1.2);} 30%{transform:translate(-50%,-50%) scale(1);} 85%{opacity:1;transform:translate(-50%,-50%) scale(1);} 100%{opacity:0;transform:translate(-50%,-50%) scale(1.5);} }
  /* perfectRainbowPulse 已移除（全屏彩虹闪光属屏幕闪烁，已下线） */

  /* ===== 物品栏扩展样式 ===== */
  .inv-item-actions { display: flex; flex-direction: column; gap: 4px; }
  .inv-item-strength { font-size: 12px; margin-top: 4px; font-weight: bold; }
  .inv-extract-btn, .inv-inscribe-btn { padding: 4px 10px; font-size: 12px; border: none; border-radius: 4px; cursor: pointer; }
  .inv-extract-btn { background: linear-gradient(135deg,#ffd700,#ff8c42); color: #1a1a2e; }
  .inv-extract-btn:hover { filter: brightness(1.15); }
  .inv-inscribe-btn { background: linear-gradient(135deg,#9b59b6,#e74c3c); color: #fff; }
  .inv-inscribe-btn:hover { filter: brightness(1.15); }
  .inv-item-row.ancient { border-left: 3px solid #ff8c42; }
  .inv-item-row.primal { border-left: 3px solid #ff3366; box-shadow: inset 0 0 15px rgba(255,51,102,0.15); }

  /* ===== 刻印面板样式 ===== */
  .inscribe-header { font-size: 18px; color: #ffd700; margin-bottom: 16px; font-weight: bold; }
  .inscribe-list { max-height: 400px; overflow-y: auto; }
  .inscribe-item { display: flex; align-items: center; padding: 12px; margin: 8px 0; background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.3); border-radius: 6px; }
  .inscribe-icon { font-size: 28px; color: #ff8c42; margin-right: 12px; }
  .inscribe-info { flex: 1; }
  .inscribe-name { font-size: 15px; color: #ffd700; font-weight: bold; }
  .inscribe-desc { font-size: 12px; color: #ccc; margin: 4px 0; }
  .inscribe-source { font-size: 11px; color: #888; }
  .inscribe-confirm-btn { padding: 8px 14px; background: linear-gradient(135deg,#ffd700,#ff8c42); color: #1a1a2e; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; }
  .inscribe-confirm-btn:hover { filter: brightness(1.15); }
  .inscribe-empty { padding: 20px; text-align: center; color: #888; }
  .inscribe-footer { margin-top: 16px; text-align: right; }

  /* ===== 自动分解设置样式 ===== */
  .auto-decompose-section { margin-bottom: 6px; padding: 6px 8px; background: rgba(255,255,255,0.05); border-radius: 6px; }
  .auto-decompose-title { font-size: 11px; color: #ffd700; margin-bottom: 4px; font-weight: bold; }
  .auto-decompose-options { display: flex; gap: 8px; flex-wrap: wrap; }
  .auto-decompose-opt { font-size: 11px; color: #ccc; cursor: pointer; user-select: none; }
  .auto-decompose-opt input { margin-right: 3px; cursor: pointer; }
  .auto-decompose-hint { font-size: 10px; color: #888; margin-top: 4px; font-style: italic; }

  /* ===== 品质行样式补充 ===== */
  .inv-item-row.normal { border-left: 3px solid #ffffff; }
  .inv-item-row.rare { border-left: 3px solid #4fc3f7; }
  .inv-item-row.epic { border-left: 3px solid #b388ff; }
  .inv-item-row.legendary { border-left: 3px solid #ffd700; }

  /* ===== 深空裂隙样式 ===== */
  #riftHUD {
    position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
    z-index: 15; display: flex; gap: 20px; align-items: center;
    background: rgba(10, 5, 30, 0.85); border: 1px solid #7c4dff;
    border-radius: 8px; padding: 6px 18px;
    font-size: 15px; color: #b388ff; font-weight: bold;
    text-shadow: 0 0 6px rgba(179, 136, 255, 0.6);
  }
  #riftHUD span { white-space: nowrap; }
  #riftTimerDisplay { color: #00e5ff; }

  .rift-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 2, 15, 0.82); z-index: 100;
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
  }
  .rift-overlay.open { display: flex; }
  .rift-panel-box {
    background: rgba(12, 6, 35, 0.92);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid rgba(124, 77, 255, 0.4); border-radius: 2px;
    padding: 28px 24px 24px; min-width: 420px; max-width: 600px;
    max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 0 40px rgba(124, 77, 255, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  }
  .rift-panel-box h2 {
    color: #b388ff; font-size: 22px; text-align: center; margin-bottom: 16px;
    text-shadow: 0 0 10px rgba(179, 136, 255, 0.5);
    flex-shrink: 0;
  }
  .rift-desc {
    color: #aaa; font-size: 13px; text-align: center; margin-bottom: 20px; line-height: 1.5;
    flex-shrink: 0;
  }
  .rift-scroll-body { flex: 1; overflow-y: auto; padding-right: 4px; min-height: 0; }
  .rift-stats-row {
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 20px;
  }
  .rift-stat-item {
    background: rgba(124, 77, 255, 0.1); border: 1px solid rgba(124, 77, 255, 0.3);
    border-radius: 8px; padding: 8px 14px; text-align: center; min-width: 90px;
  }
  .rift-stat-label { display: block; font-size: 11px; color: #888; margin-bottom: 4px; }
  .rift-stat-value { display: block; font-size: 16px; color: #b388ff; font-weight: bold; }

  .rift-level-select {
    display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 16px;
  }
  .rift-level-select label { color: #ccc; font-size: 15px; }
  .rift-level-select input {
    width: 80px; background: rgba(0,0,0,0.5); border: 1px solid #7c4dff;
    color: #fff; font-size: 18px; text-align: center; border-radius: 6px; padding: 4px;
  }

  .rift-preview {
    background: rgba(0,0,0,0.3); border: 1px solid rgba(124, 77, 255, 0.2);
    border-radius: 8px; padding: 14px; margin-bottom: 20px;
  }
  .rift-preview-title {
    color: #00e5ff; font-size: 14px; font-weight: bold; margin-bottom: 10px; text-align: center;
  }
  .rift-preview-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  }
  .rift-preview-item {
    display: flex; justify-content: space-between; font-size: 13px;
    color: #ccc; padding: 4px 8px; background: rgba(255,255,255,0.03); border-radius: 4px;
  }
  .rift-preview-item.boss { grid-column: 1 / -1; color: #ffd700; }

  .rift-btn-row, .rift-complete-btn-row {
    display: flex; gap: 12px; justify-content: center;
  }
  .rift-btn {
    padding: 10px 24px; border: none; border-radius: 8px;
    font-size: 15px; font-weight: bold; cursor: pointer; transition: all 0.2s;
  }
  .rift-btn.start { background: linear-gradient(135deg, #7c4dff, #651fff); color: #fff; }
  .rift-btn.start:hover { box-shadow: 0 0 15px rgba(124, 77, 255, 0.6); }
  .rift-btn.continue { background: linear-gradient(135deg, #00bcd4, #0097a7); color: #fff; }
  .rift-btn.continue:hover { box-shadow: 0 0 15px rgba(0, 188, 212, 0.6); }
  .rift-btn.cancel, .rift-btn.exit {
    background: rgba(80, 80, 80, 0.6); color: #ccc; border: 1px solid #555;
  }
  .rift-btn.cancel:hover, .rift-btn.exit:hover { background: rgba(100, 100, 100, 0.7); }

  .rift-complete-level {
    text-align: center; font-size: 28px; color: #b388ff; font-weight: bold; margin-bottom: 8px;
  }
  .rift-complete-time {
    text-align: center; font-size: 16px; color: #00e5ff; margin-bottom: 16px;
  }
  .rift-complete-rewards {
    background: rgba(0,0,0,0.3); border-radius: 8px; padding: 14px; margin-bottom: 16px;
  }
  .rift-reward-row {
    font-size: 15px; color: #ffd700; padding: 4px 0; text-align: center;
  }
  .rift-new-record {
    text-align: center; font-size: 18px; color: #ffeb3b; font-weight: bold;
    margin-bottom: 16px; text-shadow: 0 0 10px rgba(255, 235, 59, 0.6);
    animation: riftPulse 1s ease-in-out infinite alternate;
  }
  @keyframes riftPulse {
    from { opacity: 0.7; }
    to { opacity: 1; }
  }

  /* ===== 绿色套装装备样式 ===== */
  .inv-item-row.set { border-left: 3px solid #00ff88; }
  .equip-slot.set { border-color: #00ff88; box-shadow: 0 0 8px rgba(0, 255, 136, 0.4); }
  .quality-text.set { color: #00ff88; text-shadow: 0 0 6px rgba(0, 255, 136, 0.5); }
  .set-tag {
    display: inline-block; font-size: 10px; padding: 1px 6px;
    border-radius: 3px; background: rgba(0, 255, 136, 0.15);
    color: #00ff88; border: 1px solid rgba(0, 255, 136, 0.3); margin-left: 4px;
  }

  /* ===== 怪物图鉴样式 ===== */
  .bestiary-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); z-index: 100;
    display: none; align-items: center; justify-content: center;
    overflow-y: auto;
  }
  .bestiary-overlay.open { display: flex; }
  .bestiary-panel-box {
    background: linear-gradient(145deg, #0d1117, #161b22);
    border: 2px solid #4fc3f7; border-radius: 16px;
    padding: 24px 32px; max-width: 900px; width: 90%; max-height: 90vh;
    overflow-y: auto; box-shadow: 0 0 40px rgba(79, 195, 247, 0.3);
  }
  .bestiary-panel-box h2 {
    color: #4fc3f7; font-size: 24px; text-align: center; margin-bottom: 12px;
  }
  .bestiary-completion {
    text-align: center; font-size: 14px; color: #aaa; margin-bottom: 20px;
  }
  .bestiary-panel-box { position: relative; }
  .bestiary-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px; margin-bottom: 20px;
  }
  .bestiary-card {
    background: rgba(20, 25, 35, 0.8); border: 2px solid #333;
    border-radius: 10px; padding: 14px; transition: all 0.3s;
  }
  .bestiary-card.locked { opacity: 0.5; filter: grayscale(0.5); }
  .bestiary-card.partially-unlocked { border-color: #4fc3f7; box-shadow: 0 0 8px rgba(79, 195, 247, 0.2); }
  .bestiary-card.fully-unlocked {
    border-color: #ffd700; box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    background: rgba(35, 30, 15, 0.8);
  }
  /* iter36：4级全解锁"完全掌握"卡——更深的金光 + 微弱呼吸动画 */
  .bestiary-card.mastered {
    border-color: #ffd700 !important;
    background: linear-gradient(145deg, rgba(50, 40, 15, 0.92), rgba(30, 22, 8, 0.95));
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.55), inset 0 0 12px rgba(255, 215, 0, 0.15);
    animation: bestiaryMasteredPulse 2.4s ease-in-out infinite;
  }
  @keyframes bestiaryMasteredPulse {
    0%, 100% { box-shadow: 0 0 18px rgba(255, 215, 0, 0.45), inset 0 0 12px rgba(255, 215, 0, 0.12); }
    50% { box-shadow: 0 0 28px rgba(255, 215, 0, 0.7), 0 0 50px rgba(255, 165, 0, 0.25), inset 0 0 16px rgba(255, 215, 0, 0.2); }
  }
  /* 4级奖励（top-tier）：金色加粗 */
  .bestiary-reward.top-tier {
    font-weight: 700;
    color: #ffb700 !important;
    text-shadow: 0 0 4px rgba(255, 183, 0, 0.45);
  }
  .bestiary-reward.top-tier.unlocked {
    color: #ffd700 !important;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.7);
  }
  /* iter36：当前生效加成摘要 */
  .bestiary-bonus-summary {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(6, 182, 212, 0.08));
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 8px; padding: 10px 14px; margin-bottom: 14px;
  }
  .bestiary-bonus-title {
    font-size: 12px; font-weight: 700; color: #c084fc;
    margin-bottom: 4px; letter-spacing: 1px;
  }
  .bestiary-bonus-list {
    font-size: 12px; color: #f0e6ff; line-height: 1.5;
    font-family: var(--cyber-font-mono);
  }
  .bestiary-card-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  }
  .bestiary-icon { font-size: 24px; }
  .bestiary-name { flex: 1; font-size: 14px; color: #ddd; font-weight: bold; }
  .bestiary-level { font-size: 12px; color: #888; }
  .bestiary-progress-bar {
    height: 8px; background: rgba(0,0,0,0.5); border-radius: 4px;
    overflow: hidden; margin-bottom: 4px;
  }
  .bestiary-progress-fill {
    height: 100%; border-radius: 4px; transition: width 0.3s;
  }
  .bestiary-progress-text {
    font-size: 11px; color: #888; text-align: right; margin-bottom: 10px;
  }
  .bestiary-rewards { display: flex; flex-direction: column; gap: 4px; }
  .bestiary-reward {
    display: flex; align-items: center; gap: 6px; font-size: 12px;
    color: #666; padding: 2px 0;
  }
  .bestiary-reward.unlocked { color: #00ff88; }
  .bestiary-reward-icon { font-size: 12px; }
  .bestiary-btn-row { text-align: center; }
  .bestiary-close-btn {
    padding: 8px 30px; background: rgba(80, 80, 80, 0.6); color: #ccc;
    border: 1px solid #555; border-radius: 8px; font-size: 15px; cursor: pointer;
  }
  .bestiary-close-btn:hover { background: rgba(100, 100, 100, 0.7); }

  /* ===== 巅峰系统面板 ===== */
  .paragon-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
  }
  .paragon-overlay.open { display: flex; }
  .paragon-panel-box {
    width: min(92vw, 900px); height: min(88vh, 680px);
    background: linear-gradient(160deg, rgba(20, 15, 40, 0.97), rgba(10, 8, 25, 0.97));
    border: 2px solid #ffd700; border-radius: 14px;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.35), inset 0 0 30px rgba(255, 215, 0, 0.05);
    display: flex; flex-direction: column; overflow: hidden;
    color: #f0e6c0;
  }
  .paragon-header {
    padding: 12px 18px; border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.12), transparent);
  }
  .paragon-title {
    font-size: 22px; font-weight: bold; color: #ffd700;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
  }
  .paragon-stats { font-size: 14px; color: #ffe9a8; }
  .paragon-stats .stat-points {
    color: #00ff88; font-weight: bold; margin-left: 12px;
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
  }
  .paragon-body {
    flex: 1; display: flex; min-height: 0;
  }
  .paragon-tabs {
    width: 130px; border-right: 1px solid rgba(255, 215, 0, 0.2);
    display: flex; flex-direction: column; padding: 10px 6px; gap: 6px;
    background: rgba(0, 0, 0, 0.25);
  }
  .paragon-tab {
    padding: 12px 8px; border-radius: 8px; cursor: pointer;
    text-align: center; font-size: 14px; font-weight: bold;
    border: 1px solid transparent; background: rgba(255, 255, 255, 0.04);
    color: #ccc; transition: all 0.2s; user-select: none;
  }
  .paragon-tab:hover { background: rgba(255, 255, 255, 0.08); }
  .paragon-tab.active {
    border-color: currentColor; background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
  }
  .paragon-tab .tab-icon { font-size: 20px; display: block; margin-bottom: 4px; }
  .paragon-tree {
    flex: 1; overflow-y: auto; padding: 14px;
    display: flex; flex-direction: column; gap: 10px;
  }
  .paragon-node {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
  }
  .paragon-node:hover { background: rgba(255, 255, 255, 0.08); }
  .paragon-node.maxed {
    border-color: #ffd700;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.18), rgba(255, 215, 0, 0.05));
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
    animation: paragonMaxedGlow 1.6s ease-in-out infinite alternate;
  }
  @keyframes paragonMaxedGlow {
    from { box-shadow: 0 0 8px rgba(255, 215, 0, 0.3); }
    to   { box-shadow: 0 0 18px rgba(255, 215, 0, 0.6); }
  }
  .paragon-node-icon {
    width: 44px; height: 44px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
    background: rgba(0, 0, 0, 0.4); border: 1px solid currentColor;
  }
  .paragon-node-info { flex: 1; min-width: 0; }
  .paragon-node-name {
    font-size: 15px; font-weight: bold; color: #fff;
    display: flex; align-items: center; gap: 8px;
  }
  .paragon-node-level {
    font-size: 11px; padding: 1px 6px; border-radius: 4px;
    background: rgba(255, 255, 255, 0.12); color: #ffe9a8;
  }
  .paragon-node-level.max { background: #ffd700; color: #1a1a1a; }
  .paragon-node-desc { font-size: 12px; color: #b8b8b8; margin-top: 2px; }
  .paragon-node-effect {
    font-size: 12px; color: #00ff88; margin-top: 2px;
    text-shadow: 0 0 4px rgba(0, 255, 136, 0.3);
  }
  .paragon-progress {
    margin-top: 6px; height: 8px; border-radius: 4px;
    background: rgba(10, 5, 30, 0.6); overflow: hidden;
    position: relative;
    border: 1px solid rgba(168, 85, 247, 0.2);
  }
  .paragon-progress-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    overflow: hidden;
  }
  .paragon-star {
    position: absolute; top: 50%; width: 4px; height: 4px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.3;
    animation: starTwinkle 2s ease-in-out infinite;
  }
  .paragon-star::before {
    content: ''; position: absolute;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0);
    transition: all 0.3s ease;
  }
  .paragon-star.lit {
    background: #ffd700;
    opacity: 1;
    animation: none;
  }
  .paragon-star.lit::before {
    background: rgba(255, 215, 0, 0.4);
    animation: starGlow 1.5s ease-in-out infinite;
  }
  .paragon-star.animate-lit {
    animation: starPop 0.6s ease-out;
  }
  @keyframes starTwinkle {
    0%, 100% { opacity: 0.3; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.7; transform: translateY(-50%) scale(1.2); }
  }
  @keyframes starGlow {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.5); opacity: 0.7; }
  }
  @keyframes starPop {
    0% { transform: translateY(-50%) scale(0); opacity: 0; }
    30% { transform: translateY(-50%) scale(1.8); opacity: 1; }
    100% { transform: translateY(-50%) scale(1); opacity: 1; }
  }
  .paragon-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, 
      rgba(168, 85, 247, 0.6) 0%, 
      rgba(192, 132, 252, 0.8) 30%, 
      rgba(251, 191, 36, 1) 70%, 
      rgba(255, 215, 0, 1) 100%);
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
  }
  .paragon-progress-bar::after {
    content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 10px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
    animation: barShine 1.5s ease-in-out infinite;
  }
  @keyframes barShine {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
  }
  .paragon-progress-glow {
    position: absolute; inset: -2px;
    border-radius: 6px;
    background: linear-gradient(90deg, 
      rgba(168, 85, 247, 0) 0%, 
      rgba(168, 85, 247, 0.3) 30%, 
      rgba(251, 191, 36, 0.4) 70%, 
      rgba(255, 215, 0, 0) 100%);
    filter: blur(4px);
    opacity: 0.6;
    pointer-events: none;
  }
  .paragon-upgrade-btn {
    padding: 8px 14px; border-radius: 8px; cursor: pointer;
    font-size: 13px; font-weight: bold; border: 1px solid #ffd700;
    background: rgba(255, 215, 0, 0.15); color: #ffd700;
    transition: all 0.15s; flex-shrink: 0; min-width: 70px;
  }
  .paragon-upgrade-btn:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  }
  .paragon-upgrade-btn:disabled {
    opacity: 0.4; cursor: not-allowed; border-color: #666; color: #999;
    background: rgba(100, 100, 100, 0.1);
  }
  .paragon-upgrade-btn.maxed {
    background: rgba(255, 215, 0, 0.25); color: #ffd700;
    border-color: #ffd700; cursor: default;
  }
  .paragon-footer {
    padding: 10px 18px; border-top: 1px solid rgba(255, 215, 0, 0.2);
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    background: rgba(0, 0, 0, 0.3);
  }
  .paragon-reset-btn {
    padding: 8px 16px; border-radius: 8px; cursor: pointer;
    font-size: 13px; border: 1px solid #ff6644;
    background: rgba(255, 100, 70, 0.15); color: #ff8866;
    transition: all 0.15s;
  }
  .paragon-reset-btn:hover:not(:disabled) {
    background: rgba(255, 100, 70, 0.3);
    box-shadow: 0 0 8px rgba(255, 100, 70, 0.4);
  }
  .paragon-reset-btn:disabled { opacity: 0.4; cursor: not-allowed; }
  .paragon-close-btn {
    padding: 8px 24px; border-radius: 8px; cursor: pointer;
    font-size: 14px; border: 1px solid #888;
    background: rgba(100, 100, 100, 0.4); color: #ddd;
  }
  .paragon-close-btn:hover { background: rgba(120, 120, 120, 0.6); }
  .paragon-empty {
    text-align: center; color: #888; padding: 40px 20px; font-size: 14px;
  }

  /* ===== 挑战奖励领取动画 ===== */
  .challenge-reward-chest {
    position: fixed; width: 60px; height: 60px;
    transform: translate(-50%, -50%);
    z-index: 9999; pointer-events: none;
    animation: chestAppear 0.3s ease-out;
  }
  @keyframes chestAppear {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    60% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  }
  .challenge-reward-chest.closing {
    animation: chestDisappear 0.3s ease-in forwards;
  }
  @keyframes chestDisappear {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  }
  .chest-body {
    font-size: 48px; line-height: 60px; text-align: center;
    animation: chestShake 0.2s ease-in-out;
  }
  .challenge-reward-chest.opening .chest-body {
    animation: chestOpenBody 0.4s ease-out;
  }
  @keyframes chestShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
  }
  @keyframes chestOpenBody {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
  }
  .chest-lid {
    position: absolute; top: -10px; left: 50%;
    width: 50px; height: 25px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #8b4513, #654321);
    border-radius: 50% 50% 0 0;
    border: 2px solid #5d4037;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom center;
  }
  .challenge-reward-chest.opening .chest-lid {
    transform: translateX(-50%) rotateX(-120deg);
  }
  .challenge-reward-coin {
    position: fixed; font-size: 16px; font-weight: bold;
    pointer-events: none; z-index: 9998;
    text-shadow: 0 0 8px currentColor;
    animation: coinFly 1.2s ease-out forwards;
  }
  @keyframes coinFly {
    0% { transform: translate(0, 0) scale(0); opacity: 0; }
    20% { transform: translate(var(--tx), var(--ty)) scale(1.3); opacity: 1; }
    100% { transform: translate(calc(var(--tx) * 1.2), calc(var(--ty) + 60px)) scale(0.8); opacity: 0; }
  }
  .challenge-reward-flash {
    position: fixed; width: 200px; height: 200px;
    pointer-events: none; z-index: 9997;
    animation: rewardFlash 0.6s ease-out forwards;
  }
  @keyframes rewardFlash {
    0% { transform: scale(0); opacity: 0; }
    30% { transform: scale(1.5); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
  }
  .challenge-reward-flash::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.8) 0%, rgba(255, 215, 0, 0.4) 40%, transparent 70%);
    border-radius: 50%;
    animation: flashPulse 0.3s ease-out;
  }
  @keyframes flashPulse {
    0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.8); }
    100% { box-shadow: 0 0 40px 20px rgba(251, 191, 36, 0); }
  }

  /* ===== 赛季系统面板 ===== */
  .season-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
  }
  .season-overlay.open { display: flex; }
  .season-panel-box {
    width: min(92vw, 720px); height: min(88vh, 720px);
    background: linear-gradient(160deg, rgba(25, 20, 45, 0.97), rgba(12, 10, 30, 0.97));
    border: 2px solid #c084fc; border-radius: 14px;
    box-shadow: 0 0 40px rgba(192, 132, 252, 0.35), inset 0 0 30px rgba(192, 132, 252, 0.05);
    display: flex; flex-direction: column; overflow: hidden;
    color: #f0e6f8;
  }
  .season-end-box { border-color: #fbbf24; box-shadow: 0 0 40px rgba(251, 191, 36, 0.4); }
  .season-header {
    padding: 12px 18px; border-bottom: 1px solid rgba(192, 132, 252, 0.3);
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(90deg, rgba(192, 132, 252, 0.12), transparent);
  }
  .season-title {
    font-size: 22px; font-weight: bold; color: #c084fc;
    text-shadow: 0 0 12px rgba(192, 132, 252, 0.7);
  }
  .season-countdown {
    font-size: 14px; color: #fbbf24; font-weight: bold;
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
  }
  .season-body {
    flex: 1; overflow-y: auto; padding: 14px 18px;
  }
  .season-progress-section { margin-bottom: 16px; }
  .season-level-info {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px; font-size: 15px;
  }
  .season-level-info span:first-child {
    font-size: 18px; font-weight: bold; color: #c084fc; display: inline-block;
  }
  .season-xp-text { color: #aaa; font-size: 13px; }
  .season-progress-bar {
    height: 14px; border-radius: 7px;
    background: linear-gradient(180deg, rgba(20, 10, 40, 0.9), rgba(30, 15, 60, 0.7));
    overflow: hidden;
    border: 1px solid rgba(192, 132, 252, 0.4);
    position: relative;
    box-shadow: 0 0 12px rgba(192, 132, 252, 0.2), inset 0 1px 0 rgba(255,255,255,0.05);
  }
  .season-progress-fill {
    height: 100%;
    background: linear-gradient(90deg,
      #c084fc 0%,
      #a855f7 20%,
      #06b6d4 40%,
      #fbbf24 60%,
      #ec4899 80%,
      #c084fc 100%);
    background-size: 200% 100%;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 12px rgba(192, 132, 252, 0.7), 0 0 24px rgba(6, 182, 212, 0.3);
    animation: seasonProgressShine 3s linear infinite;
    position: relative;
  }
  .season-progress-fill::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 4px,
      rgba(255, 255, 255, 0.15) 4px,
      rgba(255, 255, 255, 0.15) 8px
    );
    animation: seasonProgressStripe 1.5s linear infinite;
  }
  @keyframes seasonProgressShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
  }
  @keyframes seasonProgressStripe {
    0% { transform: translateX(0); }
    100% { transform: translateX(16px); }
  }
  .season-level-info span:first-child.level-up-anim {
    animation: seasonLevelUpBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  @keyframes seasonLevelUpBounce {
    0% { transform: scale(1); color: #c084fc; }
    30% { transform: scale(1.4); color: #fbbf24; text-shadow: 0 0 20px rgba(251, 191, 36, 0.9); }
    50% { transform: scale(0.9); }
    70% { transform: scale(1.15); color: #fbbf24; }
    100% { transform: scale(1); color: #c084fc; }
  }
  .season-rewards-title, .season-stats-title, .season-history-title {
    font-size: 15px; font-weight: bold; color: #c084fc;
    margin: 14px 0 8px 0; padding-bottom: 4px;
    border-bottom: 1px solid rgba(192, 132, 252, 0.2);
  }
  .season-rewards-list {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  }
  .season-reward-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer; transition: all 0.15s;
  }
  .season-reward-item.claimed {
    background: rgba(0, 255, 136, 0.08);
    border-color: rgba(0, 255, 136, 0.3);
    cursor: default; opacity: 0.7;
  }
  .season-reward-item.available {
    background: rgba(251, 191, 36, 0.15);
    border-color: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
    animation: seasonRewardPulse 1.5s ease-in-out infinite alternate;
  }
  @keyframes seasonRewardPulse {
    from { box-shadow: 0 0 6px rgba(251, 191, 36, 0.3); }
    to   { box-shadow: 0 0 14px rgba(251, 191, 36, 0.6); }
  }
  .season-reward-item.locked {
    opacity: 0.45; cursor: not-allowed;
  }
  .season-reward-icon { font-size: 22px; flex-shrink: 0; }
  .season-reward-info { flex: 1; min-width: 0; }
  .season-reward-name { font-size: 13px; color: #fff; font-weight: bold; }
  .season-reward-level { font-size: 11px; color: #aaa; }
  .season-reward-status {
    font-size: 11px; padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
  }
  .season-reward-status.claimed { background: rgba(0, 255, 136, 0.2); color: #00ff88; }
  .season-reward-status.available { background: #fbbf24; color: #1a1a1a; font-weight: bold; }
  .season-reward-status.locked { background: rgba(100, 100, 100, 0.2); color: #888; }
  .season-stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  }
  .season-stat-card {
    padding: 10px 8px; border-radius: 8px; text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  .season-stat-value {
    font-size: 20px; font-weight: bold; color: #fbbf24;
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
  }
  .season-stat-label { font-size: 11px; color: #aaa; margin-top: 2px; }
  .season-history-list {
    display: flex; flex-direction: column; gap: 4px;
    max-height: 120px; overflow-y: auto;
  }
  .season-history-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 10px; border-radius: 6px; font-size: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }
  .season-history-item .hist-season { color: #c084fc; font-weight: bold; }
  .season-history-item .hist-level { color: #fbbf24; }
  .season-history-empty { text-align: center; color: #666; font-size: 12px; padding: 10px; }
  .season-footer {
    padding: 10px 18px; border-top: 1px solid rgba(192, 132, 252, 0.2);
    display: flex; justify-content: flex-end; gap: 10px;
    background: rgba(0, 0, 0, 0.3);
  }
  .season-close-btn {
    padding: 8px 24px; border-radius: 8px; cursor: pointer;
    font-size: 14px; border: 1px solid #c084fc;
    background: rgba(192, 132, 252, 0.15); color: #c084fc;
  }
  .season-close-btn:hover { background: rgba(192, 132, 252, 0.3); }
  .season-end-summary {
    text-align: center; padding: 10px 0;
  }
  .season-end-summary .end-season-num {
    font-size: 28px; font-weight: bold; color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.6); margin-bottom: 8px;
  }
  .season-end-summary .end-stats {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
    margin-top: 14px;
  }
  .season-end-summary .end-stat {
    padding: 10px; border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  .season-end-summary .end-stat-val {
    font-size: 22px; font-weight: bold; color: #c084fc;
  }
  .season-end-summary .end-stat-lbl { font-size: 12px; color: #aaa; margin-top: 2px; }
  .season-end-warning {
    margin-top: 14px; padding: 10px; border-radius: 8px;
    background: rgba(255, 100, 70, 0.1); border: 1px solid rgba(255, 100, 70, 0.3);
    color: #ff8866; font-size: 13px; text-align: center;
  }

/* ===== AI叙事系统样式 ===== */

/* 星系名称显示 */
#galaxyName {
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: #a78bfa;
  text-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
  letter-spacing: 2px;
  opacity: 0.8;
}

/* 装备背景故事文本 */
.equip-lore-text {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border-left: 3px solid #a78bfa;
}
.equip-lore-text .lore-label {
  font-size: 11px;
  color: #a78bfa;
  margin-bottom: 4px;
  display: block;
}
.equip-lore-text .lore-content {
  font-size: 13px;
  font-style: italic;
  color: rgba(200, 200, 200, 0.7);
  line-height: 1.5;
  display: block;
}

/* AI设置面板样式 */
.ai-status-text {
  margin-top: 8px;
  font-size: 12px;
  color: #888;
  text-align: center;
  min-height: 16px;
}
.ai-status-text.success { color: #4ade80; }
.ai-status-text.error { color: #f87171; }

.setting-input:focus {
  outline: none;
  border-color: #a78bfa !important;
}

/* === 货币闪动提示 === */
.ui.coins-flash {
  animation: coinsFlashPulse 0.25s ease-out;
  color: #ffd700 !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}
@keyframes coinsFlashPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* === 击杀统计 HUD === */
.stats-hud {
  position: absolute; top: 110px; right: 8px;
  display: flex; flex-direction: column; gap: 3px;
  z-index: 5; pointer-events: none;
  user-select: none;
}
.stat-item {
  background: rgba(15, 20, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 3px 7px; font-size: 11px;
  color: #cbd5e1; display: flex; align-items: center; gap: 4px;
  backdrop-filter: blur(4px);
  min-width: 70px; justify-content: space-between;
  font-variant-numeric: tabular-nums;
}
.stat-ico { font-size: 12px; }
.stat-item span:last-child { font-weight: 600; color: #fff; }
.stat-item:hover { background: rgba(99, 102, 241, 0.2); border-color: rgba(99, 102, 241, 0.4); }

/* === 底部"更多"按钮 + 图标按钮 === */
.ui-btn.icon-btn {
  flex: 0 0 50px; min-width: 50px;
  font-size: 18px;
}

/* === 暂停遮罩（DOM 层，含可点击恢复按钮） === */
.pause-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55); z-index: 260;
  display: none; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.pause-box {
  text-align: center; padding: 32px 48px;
}
.pause-title {
  font-family: var(--cyber-font-display);
  font-size: 32px; font-weight: bold;
  color: #ffffff; letter-spacing: 2px;
  text-shadow: 0 0 16px rgba(168, 85, 247, 0.8);
  margin-bottom: 24px;
}
.pause-resume-btn {
  min-width: 180px; height: 48px; font-size: 16px;
  margin-bottom: 14px;
}
.pause-hint {
  font-size: 12px; color: var(--cyber-text-muted);
}

/* === 更多功能下拉弹窗 === */
.more-menu-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 250;
  display: flex; align-items: center; justify-content: center;
  animation: moreMenuFadeIn 0.2s ease-out;
}
@keyframes moreMenuFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.more-menu-box {
  background: linear-gradient(135deg, #1f2937, #111827);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 16px;
  width: 280px; max-width: 90vw;
  max-height: 85vh; overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  animation: moreMenuSlideIn 0.25s ease-out;
}
/* 滚动条美化 */
.more-menu-box::-webkit-scrollbar { width: 6px; }
.more-menu-box::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
.more-menu-box::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.5); border-radius: 3px; }
.more-menu-box::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.7); }
.more-menu-group-title {
  font-size: 11px; font-weight: 700; color: #9ca3af;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 10px 0 6px 2px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.more-menu-group-title:first-child { margin-top: 0; }
@keyframes moreMenuSlideIn {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.more-menu-title {
  font-size: 14px; font-weight: 700; color: #fff;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}
.more-menu-item {
  display: block; width: 100%; padding: 10px 12px; margin-bottom: 6px;
  background: rgba(70, 78, 92, 0.4);
  color: #fff; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; font-size: 13px;
  text-align: left; cursor: pointer;
  transition: all 0.15s;
}
.more-menu-item:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateX(3px);
}
.more-menu-item:active { transform: translateX(3px) scale(0.98); }

/* === 新手引导弹窗（赛博朋克版） === */
.tutorial-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 2, 15, 0.9); z-index: 400;
  display: flex; align-items: center; justify-content: center;
  animation: tutorialFadeIn 0.3s ease-out;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@keyframes tutorialFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.tutorial-box {
  position: relative;
  background: var(--cyber-bg-panel);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--cyber-border-glow);
  border-radius: 2px;
  padding: 28px 24px 24px;
  width: 360px; max-width: 92vw; max-height: 86vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.4), 0 0 80px rgba(6, 182, 212, 0.15);
  animation: tutorialBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tutorial-box::before, .tutorial-box::after {
  content: ''; position: absolute; width: 16px; height: 16px;
  border: 2px solid var(--cyber-neon-purple);
  pointer-events: none;
}
.tutorial-box::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.tutorial-box::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
@keyframes tutorialBounce {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.tutorial-step {
  font-size: 20px; font-weight: 700;
  text-align: center; margin-bottom: 16px;
  background: linear-gradient(90deg, var(--cyber-neon-cyan), var(--cyber-neon-purple), var(--cyber-neon-pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--cyber-font-display);
  letter-spacing: 1px;
}
.tutorial-content {
  font-size: 13px; line-height: 1.7; color: var(--cyber-text-secondary);
  margin-bottom: 20px; min-height: 120px;
}
.tutorial-content p { margin: 6px 0; }
.tutorial-content b {
  color: var(--cyber-neon-gold);
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}
.tutorial-content .tut-tag {
  display: inline-block; padding: 3px 10px; margin: 2px;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.15), rgba(88, 28, 135, 0.2));
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 2px; font-size: 11px;
  color: var(--cyber-neon-purple-soft);
  font-family: var(--cyber-font-mono);
  text-shadow: 0 0 4px rgba(168, 85, 247, 0.4);
}
.tutorial-progress {
  text-align: center; margin: 16px 0;
}
.tut-dot {
  display: inline-block; width: 10px; height: 10px;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 2px;
  margin: 0 4px; transition: all 0.2s;
}
.tut-dot.active {
  background: var(--cyber-neon-purple);
  border-color: var(--cyber-neon-purple);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.8);
}
.tut-dot.done {
  background: var(--cyber-neon-green);
  border-color: var(--cyber-neon-green);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}
.tutorial-btns {
  display: flex; justify-content: space-between; gap: 10px;
}
.tutorial-btn {
  flex: 1; padding: 10px 16px;
  background: linear-gradient(180deg, rgba(60, 30, 100, 0.5), rgba(30, 15, 60, 0.7));
  color: var(--cyber-text-secondary);
  border: 1px solid var(--cyber-border);
  border-radius: 2px;
  font-size: 13px; cursor: pointer;
  transition: all 0.15s;
  font-family: var(--cyber-font-display);
  letter-spacing: 0.5px;
}
.tutorial-btn:hover {
  border-color: var(--cyber-neon-purple);
  color: #fff;
  box-shadow: var(--cyber-glow-purple);
}
.tutorial-btn.primary {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.7), rgba(88, 28, 135, 0.9));
  border-color: var(--cyber-neon-purple);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}
.tutorial-btn.primary:hover {
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.8), rgba(124, 58, 237, 0.95));
  box-shadow: var(--cyber-glow-purple);
  transform: translateY(-1px);
}
.tutorial-btn:disabled {
  opacity: 0.4; cursor: not-allowed;
  filter: grayscale(0.5);
}

/* === 通用空状态 === */
.bestiary-empty-state,
.empty-state {
  text-align: center; padding: 32px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 10px;
  margin: 16px 0;
}
.bestiary-empty-icon,
.empty-state-icon {
  font-size: 48px; margin-bottom: 12px;
  animation: emptyStateFloat 3s ease-in-out infinite;
}
@keyframes emptyStateFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.bestiary-empty-title,
.empty-state-title {
  font-size: 15px; color: #fff; font-weight: 600; margin-bottom: 6px;
}
.bestiary-empty-desc,
.empty-state-desc {
  font-size: 12px; color: #94a3b8; line-height: 1.5;
}

/* === 通用关闭按钮（悬浮在右上角） === */
.overlay-close-btn {
  position: absolute; top: 8px; right: 12px;
  width: 44px; height: 44px;
  background: rgba(0,0,0,0.4);
  color: #fff; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%; font-size: 14px;
  cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  line-height: 1; padding: 0;
}
.overlay-close-btn:hover {
  background: rgba(239, 68, 68, 0.5);
  border-color: rgba(239, 68, 68, 0.7);
  transform: scale(1.1);
}

/* === 快捷键面板 === */
.hotkey-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8); z-index: 260;
  display: flex; align-items: center; justify-content: center;
  animation: moreMenuFadeIn 0.2s ease-out;
}
.hotkey-box {
  position: relative;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 14px;
  padding: 22px 26px;
  width: 420px; max-width: 92vw; max-height: 86vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  animation: moreMenuSlideIn 0.25s ease-out;
}
.hotkey-title {
  font-size: 18px; font-weight: 700; color: #fff;
  text-align: center; margin-bottom: 18px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hotkey-section { margin-bottom: 16px; }
.hotkey-section-title {
  font-size: 12px; font-weight: 600; color: #a5b4fc;
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hotkey-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0; font-size: 13px;
}
.hotkey-key {
  flex: 0 0 60px; text-align: center;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 5px; padding: 3px 6px;
  font-family: monospace; font-size: 12px; font-weight: 700;
  color: #c7d2fe;
}
.hotkey-desc { color: #cbd5e1; }

/* iter18：通知红点动画 */
.notify-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  background: #ff3366;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 8px rgba(255, 51, 102, 0.6);
  pointer-events: none;
  animation: notifyPulse 1.5s ease-in-out infinite;
}
@keyframes notifyPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* iter20：面板动画 */
#upgradeOverlay, #settingsOverlay, #transcendOverlay,
[id$="Overlay"].open {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
[id$="Overlay"]:not(.open) {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}
[id$="Overlay"].open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.panel-close, .upg-buy-btn, .upg-batch-btn, .setting-btn {
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.panel-close:active, .upg-buy-btn:active, .upg-batch-btn:active, .setting-btn:active {
  transform: scale(0.95);
}
.upg-buy-btn:not(.cant):hover, .upg-batch-btn:not(.cant):hover {
  filter: brightness(1.1);
}

/* ===== 加载进度条 - 赛博朋克风格 ===== */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--cyber-bg-deep);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-box {
  text-align: center;
  width: 80%;
  max-width: 400px;
  position: relative;
  padding: 30px 20px;
  background: var(--cyber-bg-panel);
  border: 1px solid var(--cyber-border-glow);
  border-radius: 2px;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.4), 0 0 80px rgba(168, 85, 247, 0.2);
}
.loading-box::before, .loading-box::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid var(--cyber-neon-purple);
  pointer-events: none;
}
.loading-box::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.loading-box::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.loading-title {
  font-family: var(--cyber-font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--cyber-neon-purple-soft);
  text-shadow: var(--cyber-glow-purple);
  letter-spacing: 3px;
  margin-bottom: 8px;
  animation: loadingTitlePulse 2s ease-in-out infinite;
}
@keyframes loadingTitlePulse {
  0%, 100% { text-shadow: 0 0 8px rgba(168, 85, 247, 0.7), 0 0 20px rgba(168, 85, 247, 0.4); }
  50% { text-shadow: 0 0 16px rgba(168, 85, 247, 0.9), 0 0 40px rgba(168, 85, 247, 0.6); }
}
.loading-subtitle {
  font-size: 12px;
  color: var(--cyber-text-secondary);
  margin-bottom: 20px;
  font-family: var(--cyber-font-body);
  letter-spacing: 1px;
}
.loading-bar-container {
  width: 100%;
  height: 10px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--cyber-border);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}
.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc, #a855f7, #7c3aed);
  background-size: 200% 100%;
  animation: loadingBarShine 1.5s linear infinite;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.8), inset 0 0 6px rgba(255, 255, 255, 0.3);
  transition: width 0.3s ease;
  border-radius: 2px;
}
@keyframes loadingBarShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.loading-text {
  font-family: var(--cyber-font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--cyber-neon-purple-soft);
  text-shadow: 0 0 6px rgba(168, 85, 247, 0.6);
  letter-spacing: 1px;
}

/* ===== 暗物质获取特效飘字 ===== */
.coin-text-darkmatter {
  color: #c084fc !important;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.9), 0 0 20px rgba(168, 85, 247, 0.6) !important;
}

/* ===== 背包容量指示器 ===== */
.inv-capacity-indicator {
  text-align: right;
  font-size: 11px;
  font-family: var(--cyber-font-mono);
  margin-bottom: 6px;
  padding: 4px 8px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 4px;
  color: var(--cyber-text-secondary);
}
.inv-capacity-indicator.warning {
  color: #ff9800;
  border-color: rgba(255, 152, 0, 0.4);
  background: rgba(255, 152, 0, 0.08);
  text-shadow: 0 0 4px rgba(255, 152, 0, 0.5);
}
.inv-capacity-indicator.danger {
  color: #ff5252;
  border-color: rgba(255, 82, 82, 0.5);
  background: rgba(255, 82, 82, 0.1);
  text-shadow: 0 0 6px rgba(255, 82, 82, 0.6);
  animation: capacityDangerPulse 1s ease-in-out infinite;
}
@keyframes capacityDangerPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 82, 82, 0); }
  50% { box-shadow: 0 0 12px rgba(255, 82, 82, 0.4); }
}

/* ===== iter24：商店购买动画 ===== */
.shop-coin-fly {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  animation: shopCoinFly 0.6s ease-in forwards;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8));
}
@keyframes shopCoinFly {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  20% {
    transform: translate(calc(-50% + var(--fly-to-x) * 0.2), calc(-50% + var(--fly-to-y) * 0.2 - 30px)) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--fly-to-x)), calc(-50% + var(--fly-to-y))) scale(0.3);
    opacity: 0;
  }
}

.shop-item-fly {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  animation: shopItemFly 1s ease-in forwards;
  filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.9));
}
@keyframes shopItemFly {
  0% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: translate(calc(-50% + var(--fly-to-x) * 0.5), calc(-50% + var(--fly-to-y) * 0.5 - 40px)) scale(1.4) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--fly-to-x)), calc(-50% + var(--fly-to-y))) scale(0.2) rotate(360deg);
    opacity: 0;
  }
}

/* ===== iter24：图鉴解锁动画 ===== */
.bestiary-card-unlocking {
  animation: bestiaryCardFlip 0.6s ease-in-out forwards;
  transform-style: preserve-3d;
}
@keyframes bestiaryCardFlip {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}

.bestiary-card-unlocked {
  animation: bestiaryCardGlow 0.8s ease-out;
}
@keyframes bestiaryCardGlow {
  0% {
    box-shadow: 0 0 0 rgba(251, 191, 36, 0);
    border-color: #333;
  }
  50% {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.8), 0 0 60px rgba(251, 191, 36, 0.4);
    border-color: #fbbf24;
  }
  100% {
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
    border-color: #ffd700;
  }
}

.bestiary-unlock-particle {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: bestiaryParticleExplode 1s ease-out forwards;
  animation-delay: var(--particle-delay);
  box-shadow: 0 0 6px currentColor;
}
@keyframes bestiaryParticleExplode {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(
      calc(-50% + cos(var(--particle-angle)) * var(--particle-distance)),
      calc(-50% + sin(var(--particle-angle)) * var(--particle-distance))
    ) scale(0);
    opacity: 0;
  }
}

.bestiary-unlock-flash {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(251, 191, 36, 0.8) 0%, rgba(251, 191, 36, 0.2) 50%, transparent 70%);
  animation: bestiaryFlash 0.6s ease-out forwards;
}
@keyframes bestiaryFlash {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

/* ===== iter24：符文镶嵌特效 ===== */
.rune-energy-flow {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #a855f7, #c084fc, #ffffff);
  animation: runeEnergyFlow 0.6s ease-in forwards;
  animation-delay: var(--flow-delay);
  animation-duration: var(--flow-duration);
  box-shadow: 0 0 10px #a855f7, 0 0 20px #c084fc;
}
@keyframes runeEnergyFlow {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  20% {
    transform: translate(calc(-50% + var(--flow-to-x) * 0.1), calc(-50% + var(--flow-to-y) * 0.1)) scale(1.5);
    opacity: 1;
  }
  80% {
    transform: translate(calc(-50% + var(--flow-to-x) * 0.9), calc(-50% + var(--flow-to-y) * 0.9)) scale(0.8);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--flow-to-x)), calc(-50% + var(--flow-to-y))) scale(0);
    opacity: 0;
  }
}

.rune-glow-effect {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.8) 0%, rgba(192, 132, 252, 0.3) 50%, transparent 70%);
  animation: runeGlow 0.8s ease-out forwards;
}
@keyframes runeGlow {
  0% {
    transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5) rotate(180deg);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(2) rotate(360deg);
    opacity: 0;
  }
}

.rune-slot-pulse {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid #a855f7;
  animation: runeSlotPulse 1.2s ease-out forwards;
}
@keyframes runeSlotPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 1;
    border-width: 6px;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.9);
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
    border-width: 2px;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.3);
  }
}

/* ===== iter24：深渊入场特效 ===== */
.abyss-vortex {
  position: fixed;
  pointer-events: none;
  z-index: 99998;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: conic-gradient(
    from 0deg,
    #1a0a2e 0deg,
    #2d1b4e 60deg,
    #1a0a2e 120deg,
    #3d2b5e 180deg,
    #1a0a2e 240deg,
    #2d1b4e 300deg,
    #1a0a2e 360deg
  );
  animation: abyssVortexRotate 1.5s linear forwards;
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.5), 0 0 120px rgba(168, 85, 247, 0.2);
}
.abyss-vortex::before {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    #0d0518 0deg,
    #1a0a2e 90deg,
    #0d0518 180deg,
    #1a0a2e 270deg,
    #0d0518 360deg
  );
  animation: abyssVortexRotate 0.8s linear reverse forwards;
}
.abyss-vortex::after {
  content: '';
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #000000 0%, #0d0518 60%, transparent 100%);
}
@keyframes abyssVortexRotate {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.5); opacity: 0; }
  20% { opacity: 1; }
  80% { transform: translate(-50%, -50%) rotate(720deg) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(1080deg) scale(0); opacity: 0; }
}

.abyss-inhale-particle {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #a855f7, #2d1b4e);
  animation: abyssParticleInhale 1.5s ease-in forwards;
  animation-delay: var(--particle-delay);
  animation-duration: var(--particle-duration);
  box-shadow: 0 0 8px #a855f7;
}
@keyframes abyssParticleInhale {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
}

.abyss-vignette {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 99997;
  background: radial-gradient(
    ellipse at center,
    transparent 20%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.9) 100%
  );
  animation: abyssVignetteFade 1.8s ease-out forwards;
}
@keyframes abyssVignetteFade {
  0% { opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===== 响应式适配 ===== */
@media (max-width: 480px) {
  .ui {
    font-size: 14px;
    text-shadow: 0 0 4px rgba(251, 191, 36, 0.6), 1px 1px 2px rgba(0,0,0,0.9);
  }
  #coinsUI { top: 10px; left: 12px; font-size: 18px; }
  #dpsUI { top: 10px; right: 12px; font-size: 13px; }
  #dmUI { top: 40px; left: 12px; font-size: 12px; }
  #shardsUI { top: 58px; left: 12px; font-size: 10px; }
  #bottomBar {
    left: 2%; right: 2%; bottom: 8px; height: 54px;
    padding: 0 4px;
  }
  .ui-btn {
    height: 40px; font-size: 10px; padding: 0 4px;
    margin: 0 3px;
  }
  #upgradePanel {
    width: 96%; max-width: 400px; max-height: 90vh;
  }
  .panel-header { padding: 10px 12px; }
  .panel-body { padding: 8px 10px; }
  .upg-row { padding: 8px 10px; margin-bottom: 6px; gap: 8px; }
  .upg-name { font-size: 12px; }
  .upg-desc { font-size: 9px; }
  .upg-buy-btn { min-width: 60px; height: 38px; font-size: 10px; }
  #offlinePanel { width: 94%; padding: 18px 14px; }
  #offlineTitle { font-size: 16px; }
  .offline-text { font-size: 13px; }
}

@media (max-width: 360px) {
  #coinsUI { font-size: 16px; }
  #dpsUI { font-size: 11px; }
  .ui-btn { font-size: 9px; letter-spacing: 0; }
}

@media (min-width: 1200px) {
  #upgradePanel { max-width: 640px; }
  .upg-row { padding: 12px 14px; }
  .upg-name { font-size: 14px; }
  .upg-desc { font-size: 11px; }
  .upg-buy-btn { min-width: 80px; height: 40px; font-size: 12px; }
}

/* ===== UI细节优化 ===== */
.coins-flash {
  animation: coinsFlash 0.25s ease-out;
}
@keyframes coinsFlash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.8) drop-shadow(0 0 15px #fbbf24); }
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.8), 0 0 15px rgba(168, 85, 247, 0.5);
}

button:focus:not(:focus-visible) {
  outline: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 8, 40, 0.3);
}
::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.5);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.7);
}

::selection {
  background: rgba(168, 85, 247, 0.4);
  color: #fff;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(168, 85, 247, 0.2);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--cyber-neon-purple);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
  transition: all 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.8);
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--cyber-neon-purple);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

input[type="text"], input[type="number"] {
  background: rgba(15, 8, 40, 0.7);
  border: 1px solid var(--cyber-border);
  border-radius: 4px;
  color: var(--cyber-text-primary);
  padding: 8px 12px;
  font-family: var(--cyber-font-mono);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
input[type="text"]:focus, input[type="number"]:focus {
  border-color: var(--cyber-neon-purple);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

select {
  background: rgba(15, 8, 40, 0.7);
  border: 1px solid var(--cyber-border);
  border-radius: 4px;
  color: var(--cyber-text-primary);
  padding: 8px 12px;
  font-family: var(--cyber-font-display);
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}
select:hover {
  border-color: var(--cyber-neon-purple);
}
select:focus {
  border-color: var(--cyber-neon-purple);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

/* 数字动画类 */
.number-anim {
  transition: all 0.15s ease-out;
}

/* 按钮禁用状态增强 */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(30%);
}

/* 面板内容滚动优化 */
.panel-body {
  overscroll-behavior-y: contain;
  scroll-snap-type: y proximity;
}

/* 触摸设备优化 */
@media (hover: none) {
  .ui-btn:active {
    transform: scale(0.96);
  }
  .upg-row:active {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.1), rgba(6, 182, 212, 0.05));
  }
}

