/* ============ 精灵幸存者 · 样式 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  background: #10131a;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: #e8ebf0;
  user-select: none;
  -webkit-user-select: none;
}
#game-canvas { position: fixed; inset: 0; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
.muted { color: #8b93a3; font-size: 13px; font-weight: normal; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 12px 26px; font-size: 17px;
  background: #232a38; color: #e8ebf0; border: 1px solid #3a4356;
  border-radius: 12px; cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.btn:hover { background: #2c3547; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(180deg, #ffd23e, #ff9d2e);
  border: 3px solid #fff; color: #8a3c00; font-weight: 900;
  border-radius: 16px;
  box-shadow: 0 6px 0 #c96a15, 0 10px 24px rgba(255,157,46,.45);
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
.btn.primary:hover { background: linear-gradient(180deg, #ffdd5c, #ffab42); transform: translateY(-2px); }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #c96a15; }
.btn.primary.big { font-size: 24px; padding: 15px 30px; letter-spacing: 4px; width: 300px; }
.btn.ghost {
  background: rgba(255,255,255,.78); color: #2a3a8f; font-weight: bold;
  border: 2px solid #2a3a8f; border-radius: 12px;
  box-shadow: 0 3px 0 rgba(42,58,143,.3);
}
.btn.ghost:hover { background: #fff; transform: translateY(-2px); }
.btn.danger { background: #5a2626; border-color: #8a3a3a; }
.btn.small { padding: 8px 18px; font-size: 14px; }
.btn.back { padding: 8px 16px; font-size: 14px; }

/* ---------- 屏幕 ---------- */
.screen {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: radial-gradient(1200px 800px at 50% 30%, #1a2030 0%, #10131a 70%);
  overflow: auto;
}
.screen.active { display: flex; }
#screen-home { background: transparent; }

/* ---------- 主菜单（明亮像素风 · 双栏布局） ---------- */
#screen-home { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; }
.home-topbar {
  display: flex; justify-content: flex-end; padding: 14px 18px 0;
}
.player-badge {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.85); border: 2px solid #2a3a8f; border-radius: 16px;
  padding: 8px 14px; box-shadow: 0 4px 0 rgba(42,58,143,.3);
}
.pb-face { font-size: 24px; }
.pb-info { display: flex; flex-direction: column; text-align: left; }
.pb-info b { color: #2a3a8f; font-size: 15px; }
.pb-info span { font-size: 11px; color: #5a6a9f; }
.home-layout {
  flex: 1; display: flex; gap: 20px; align-items: flex-start;
  justify-content: center; padding: 6px 20px 24px; overflow: auto;
}
.home-left { display: flex; flex-direction: column; align-items: center; max-width: 480px; width: 46vw; min-width: 340px; }
.home-right { width: 360px; flex-shrink: 0; margin-top: 8px; }

.logo { margin-bottom: 12px; position: relative; text-align: center; }
.logo h1 {
  font-size: 58px; line-height: 1.1; letter-spacing: 4px; font-weight: 900;
  -webkit-text-stroke: 8px #2a3a8f; paint-order: stroke fill;
  text-shadow: 0 8px 0 rgba(42,58,143,.35), 0 14px 30px rgba(30,45,110,.45);
}
.logo h1 .lg-w { color: #ffffff; }
.logo h1 .lg-y { color: #ffd23e; }
.logo-ribbon {
  display: inline-block; margin-top: 10px; padding: 6px 22px;
  font-size: 15px; font-weight: bold; color: #fff; letter-spacing: 2px;
  background: linear-gradient(90deg, #ff7d4d, #ffb35c);
  border: 3px solid #fff; border-radius: 10px;
  box-shadow: 0 5px 0 rgba(42,58,143,.35);
  transform: rotate(-1.5deg);
  text-shadow: 0 2px 0 rgba(160,60,20,.4);
}
.btn.primary.big {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 26px; letter-spacing: 6px; width: 100%; padding: 14px 20px; margin-bottom: 14px;
  position: relative;
}
.btn.primary.big .pb-sub-line { font-size: 12px; letter-spacing: 1px; font-weight: bold; opacity: .8; }
.btn.primary.big .pb-ball {
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(#e33d34 50%, #f4f4f6 50%);
  border: 3px solid #26262e; box-shadow: 0 0 14px rgba(255,255,255,.6);
}
.btn.primary.big .pb-ball::after {
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #26262e;
}
.mode-row { display: flex; gap: 10px; width: 100%; margin-bottom: 10px; }
.mode-card {
  flex: 1; display: flex; align-items: center; gap: 9px; cursor: pointer;
  background: rgba(255,255,255,.8); border: 2px solid #2a3a8f; border-radius: 13px;
  padding: 10px 14px; font-family: inherit; transition: all .15s;
  box-shadow: 0 4px 0 rgba(42,58,143,.28);
}
.mode-card:hover { background: #fff; transform: translateY(-2px); }
.mode-card.small { flex: 0 0 40%; }
.mc-ic { font-size: 20px; }
.mc-t { font-size: 15px; font-weight: bold; color: #2a3a8f; display: flex; flex-direction: column; align-items: flex-start; }
.mc-t b { font-size: 11px; color: #5a6a9f; font-weight: normal; }
.home-team-label {
  margin-top: 10px; color: #2a3a8f; font-size: 13px; font-weight: bold; margin-bottom: 6px;
  text-shadow: 0 1px 0 rgba(255,255,255,.8);
}
.home-team {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  min-height: 70px; align-items: center;
  background: rgba(255,255,255,.55); border: 2px dashed rgba(42,58,143,.4);
  border-radius: 14px; padding: 6px 8px; width: 100%;
}
.home-footer { margin-top: 14px; color: #2a3a8f; font-size: 12px; font-weight: bold; opacity: .75; }
.fan-badge {
  display: inline-block; margin-top: 8px; padding: 3px 14px;
  font-size: 11px; color: #fff; background: rgba(42,58,143,.75);
  border-radius: 12px;
}

/* 排行榜面板 */
.lb-panel {
  background: #fffdf6; border: 3px solid #2a3a8f; border-radius: 18px;
  box-shadow: 0 6px 0 rgba(42,58,143,.3), 0 14px 34px rgba(30,45,110,.25);
  overflow: hidden;
}
.lb-head {
  background: linear-gradient(90deg, #ffb35c, #ffd23e);
  padding: 10px 16px; display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 3px solid #2a3a8f;
}
.lb-season { font-size: 18px; font-weight: 900; color: #7a3c00; }
.lb-ends { font-size: 11px; color: #8a5a20; }
.lb-metric {
  padding: 8px 16px; font-size: 13px; font-weight: bold; color: #2a3a8f;
  border-bottom: 2px dashed rgba(42,58,143,.25);
}
.lb-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-bottom: 1px dashed rgba(42,58,143,.18);
}
.lb-row.top { background: rgba(255,210,62,.16); }
.lb-medal { width: 26px; text-align: center; font-weight: 900; color: #2a3a8f; font-size: 14px; flex-shrink: 0; }
.lb-name { flex: 1; font-size: 13px; color: #223; font-weight: bold; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lb-guest {
  font-style: normal; font-size: 10px; background: #b8c0cf; color: #fff;
  border-radius: 6px; padding: 1px 5px; margin-right: 5px;
}
.lb-pro {
  font-style: normal; font-size: 10px; background: #ff9d2e; color: #fff;
  border-radius: 6px; padding: 1px 5px; margin-right: 5px;
}
.lb-meta { font-size: 10px; color: #8a8f9d; }
.lb-score { font-size: 15px; font-weight: 900; color: #e0662d; }
.lb-score em { font-style: normal; font-size: 10px; color: #8a8f9d; }
.lb-foot { padding: 10px 14px; text-align: center; }
.lb-prize { font-size: 11px; color: #8a8f9d; margin-bottom: 8px; }
.btn.lb-more {
  width: 100%; background: #2a3a8f; color: #fff; font-weight: bold;
  border-radius: 10px; padding: 9px 0; font-size: 14px; border: none; cursor: pointer;
  font-family: inherit;
}
.btn.lb-more:hover { background: #3a4aad; }
.lb-full-box { width: min(520px, 92vw); max-height: 84vh; overflow: auto; }

.pet-chip {
  width: 62px; background: #fffdf6; border: 2px solid #2a3a8f; border-radius: 10px;
  padding: 5px 3px; text-align: center;
  box-shadow: 0 3px 0 rgba(42,58,143,.3);
}
.pet-chip img { width: 42px; height: 42px; object-fit: contain; }
.pc-name { font-size: 11px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #222; }
.pc-lv { font-size: 10px; color: #2266cc; }

/* ---------- 面板通用 ---------- */
.panel {
  width: min(860px, 94vw); max-height: 92vh; overflow: auto;
  background: rgba(24, 29, 42, .96); border: 1px solid #333c50;
  border-radius: 16px; padding: 22px 26px 30px;
}
.panel-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.panel-head h2 { font-size: 24px; }

/* ---------- 地图选择 ---------- */
.map-list { display: flex; flex-direction: column; gap: 14px; }
.map-card {
  display: flex; gap: 16px; padding: 14px; border-radius: 14px; cursor: pointer;
  background: #1c2331; border: 1px solid #333c50; transition: all .15s;
}
.map-card:hover { transform: translateX(4px); border-color: #4a9bea; }
.map-card.locked { opacity: .55; cursor: not-allowed; filter: saturate(.4); }
.map-card.locked:hover { transform: none; border-color: #333c50; }
.map-preview {
  width: 120px; height: 86px; border-radius: 10px; flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.4);
  position: relative; overflow: hidden;
}
.theme-forest .map-preview { background: linear-gradient(160deg, #67b35f 0%, #3e7a3c 60%, #2c5a2c 100%); }
.theme-cave .map-preview { background: linear-gradient(160deg, #8f86ad 0%, #514b68 60%, #332f45 100%); }
.theme-sea .map-preview { background: linear-gradient(160deg, #5fa8c7 0%, #336a86 60%, #1f4257 100%); }
.theme-volcano .map-preview { background: linear-gradient(160deg, #e08543 0%, #66402f 55%, #402620 100%); }
.theme-final .map-preview { background: linear-gradient(160deg, #b09ae0 0%, #413b5c 55%, #282440 100%); }
.map-preview::after {
  content: ''; position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.75), rgba(255,255,255,.1) 60%), rgba(0,0,0,.25);
  border: 2px solid rgba(0,0,0,.35);
}
.map-info { flex: 1; }
.map-name { font-size: 19px; font-weight: bold; margin-bottom: 4px; }
.map-desc { color: #9aa4b6; font-size: 13px; margin-bottom: 8px; }
.map-meta { display: flex; gap: 16px; color: #7a8497; font-size: 12px; margin-bottom: 6px; }
.map-boss { color: #e0a06b; font-size: 13px; font-weight: bold; }

/* ---------- 队伍 ---------- */
.team-label { color: #8b93a3; font-size: 13px; margin: 14px 0 8px; }
.team-slots { display: flex; gap: 10px; flex-wrap: wrap; }
.team-slot {
  width: 86px; height: 104px; border-radius: 12px;
  border: 2px dashed #3a4356; background: #161c29;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s;
}
.team-slot.filled { border-style: solid; border-color: #4a9bea; background: #1c2a40; }
.team-slot.filled:hover { border-color: #ff6b6b; }
.team-slot img { width: 56px; height: 56px; object-fit: contain; }
.ts-name { font-size: 12px; }
.ts-lv { font-size: 11px; color: #7cd8ff; }
.ts-empty { color: #565f70; font-size: 13px; }
.pet-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px; margin-top: 4px;
}
.pet-card {
  background: #1c2331; border: 1px solid #333c50; border-radius: 12px;
  padding: 10px 8px; text-align: center; position: relative; transition: all .15s;
}
.pet-card.in-team { border-color: #4a9bea; background: #1c2a40; box-shadow: 0 0 12px rgba(74,155,234,.25); }
.pet-card img { width: 62px; height: 62px; object-fit: contain; }
.pt-name { font-size: 14px; font-weight: bold; margin-top: 2px; }
.pt-tags { display: flex; gap: 4px; justify-content: center; margin: 4px 0; }
.tag { font-size: 10px; padding: 1px 7px; border-radius: 8px; color: #10131a; font-weight: bold; }
.tag.tier { background: #333c50; color: #b8c0cf; }
.pt-lv { color: #7cd8ff; font-size: 12px; }
.pt-stats { color: #8b93a3; font-size: 11px; margin: 3px 0; }
.pt-evo { color: #b09ae0; font-size: 11px; margin-bottom: 4px; min-height: 14px; }
.pt-evo.done { color: #ffe45c; }
.pt-btn {
  width: 100%; padding: 5px 0; font-size: 12px; cursor: pointer;
  background: #2c3547; color: #e8ebf0; border: 1px solid #3a4356; border-radius: 8px;
  font-family: inherit;
}
.pt-btn:hover { background: #3a4356; }

/* ---------- 图鉴 ---------- */
.dex-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px;
}
.dex-cell {
  background: #161c29; border: 1px solid #2a3140; border-radius: 10px;
  padding: 8px 4px 6px; text-align: center; cursor: default;
}
.dex-cell.caught { background: #1c2331; border-color: #3a4356; }
.dex-cell.caught:hover { border-color: #4a9bea; transform: translateY(-2px); }
.dex-cell img { width: 48px; height: 48px; object-fit: contain; }
.dx-no { font-size: 10px; color: #565f70; }
.dx-name { font-size: 12px; }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; display: none; pointer-events: none; }
#hud.active { display: block; }
.hud-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 12px 16px;
}
.hud-hpwrap { width: 230px; }
.hud-row { display: flex; align-items: center; gap: 8px; }
.hud-lvl {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #4a9bea, #2258a8);
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 15px; border: 2px solid #7cc0ff;
}
.hud-hp { flex: 1; height: 14px; background: rgba(0,0,0,.55); border-radius: 7px; overflow: hidden; border: 1px solid rgba(255,255,255,.2); }
#hud-hp-fill { height: 100%; width: 100%; background: linear-gradient(#7ce07c, #4aa84a); transition: width .2s; }
.hud-hptext { font-size: 11px; color: #c9cdd6; width: 58px; }
.hud-xp { height: 6px; background: rgba(0,0,0,.55); border-radius: 3px; margin-top: 5px; overflow: hidden; border: 1px solid rgba(255,255,255,.15); }
#hud-xp-fill { height: 100%; width: 0; background: #6ee7ff; transition: width .2s; }
.hud-mid { text-align: center; }
#hud-timer { font-size: 30px; font-weight: bold; text-shadow: 0 2px 6px rgba(0,0,0,.7); }
.hud-mapname { font-size: 12px; color: #9aa4b6; }
.hud-right { display: flex; align-items: center; gap: 10px; }
.hud-kills-wrap { background: rgba(0,0,0,.45); padding: 7px 12px; border-radius: 10px; font-size: 15px; }
.hud-btn {
  width: 40px; height: 40px; border-radius: 10px; font-size: 16px;
  background: rgba(0,0,0,.45); color: #e8ebf0; border: 1px solid rgba(255,255,255,.25);
  cursor: pointer; pointer-events: auto;
}
.hud-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 12px 16px;
}
#hud-pets { display: flex; gap: 8px; }
.hud-pet {
  width: 54px; background: rgba(0,0,0,.5); border-radius: 10px; padding: 4px;
  border: 1px solid rgba(255,255,255,.15); text-align: center; position: relative;
}
.hud-pet img { width: 40px; height: 40px; object-fit: contain; }
.hud-pet .hp { height: 5px; background: rgba(255,255,255,.15); border-radius: 3px; overflow: hidden; margin-top: 2px; }
.hud-pet .hp-fill { height: 100%; background: #7ce07c; transition: width .2s; }
.hud-pet .lv { position: absolute; top: -7px; right: -4px; font-size: 10px; background: #2258a8; border-radius: 6px; padding: 1px 4px; border: 1px solid #4a9bea; }
.hud-pet.dead { opacity: .45; }
.hud-pet.dead .hp-fill { background: #666; }
#btn-capture {
  width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8564d, #b02a24);
  border: 3px solid rgba(255,255,255,.4); color: #fff; font-size: 26px;
  cursor: pointer; pointer-events: auto; box-shadow: 0 6px 18px rgba(0,0,0,.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: inherit;
}
#btn-capture span { font-size: 11px; margin-top: -2px; }
#btn-capture:active { transform: scale(.93); }

/* Boss 血条 & 横幅 */
#boss-bar {
  position: absolute; top: 74px; left: 50%; transform: translateX(-50%);
  width: min(480px, 80vw); display: none; text-align: center;
}
#boss-name { font-size: 14px; color: #ffb0b0; font-weight: bold; text-shadow: 0 2px 4px #000; }
#boss-hp { height: 14px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,120,120,.6); border-radius: 7px; overflow: hidden; margin-top: 3px; }
#boss-hp-fill { height: 100%; width: 100%; background: linear-gradient(#ff7b6b, #c62b2b); transition: width .15s; }
#boss-banner {
  position: absolute; top: 34%; left: 0; right: 0; text-align: center;
  opacity: 0; transform: scale(.8); transition: all .3s; pointer-events: none;
}
#boss-banner.show { opacity: 1; transform: scale(1); }
.bb-inner {
  display: inline-block; font-size: 30px; font-weight: bold; color: #ffdcdc;
  background: rgba(120, 20, 20, .82); border: 2px solid #ff6b6b;
  padding: 14px 34px; border-radius: 14px;
  animation: bbPulse 1s ease-in-out infinite alternate;
}
@keyframes bbPulse { from { box-shadow: 0 0 10px rgba(255,80,80,.4); } to { box-shadow: 0 0 40px rgba(255,80,80,.8); } }

/* ---------- 弹窗 ---------- */
.modal {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: rgba(8, 10, 16, .7); backdrop-filter: blur(3px);
}
.modal.open { display: flex; }
.modal-box {
  background: #1c2331; border: 1px solid #3a4356; border-radius: 18px;
  padding: 26px 30px; width: min(640px, 92vw); text-align: center;
  animation: modalIn .2s ease-out;
}
.modal-box.small { width: min(380px, 92vw); }
@keyframes modalIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-box h3 { font-size: 22px; margin-bottom: 18px; }

.upgrade-options { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.upgrade-card {
  width: 170px; padding: 18px 12px; cursor: pointer;
  background: #232a38; border: 1px solid #3a4356; border-radius: 14px;
  transition: all .15s;
}
.upgrade-card:hover { border-color: #ffd76b; transform: translateY(-4px); background: #2a3242; }
.up-icon { font-size: 34px; margin-bottom: 8px; }
.up-name { font-size: 15px; font-weight: bold; margin-bottom: 6px; }
.up-lv { font-size: 11px; color: #8b93a3; font-weight: normal; }
.up-desc { font-size: 12px; color: #9aa4b6; }

.setting-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.setting-row label { width: 40px; text-align: right; color: #9aa4b6; }
.setting-row input[type=range] { flex: 1; accent-color: #4a9bea; }
.modal-box .menu-btns { margin-top: 16px; }
.modal-box .menu-btns .btn { width: auto; min-width: 140px; }

.starter-options { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.starter-card {
  width: 150px; padding: 16px 10px; cursor: pointer;
  background: #232a38; border: 1px solid #3a4356; border-radius: 14px;
  transition: all .15s;
}
.starter-card:hover { border-color: #7ce07c; transform: translateY(-4px); }
.starter-card img { width: 84px; height: 84px; object-fit: contain; }
.st-name { font-size: 16px; font-weight: bold; margin: 6px 0 4px; }
.st-desc { font-size: 11px; color: #8b93a3; margin-top: 6px; }

/* ---------- 结算 ---------- */
.screen.result { background: rgba(8, 10, 16, .82); }
.result-box {
  background: #1c2331; border: 1px solid #3a4356; border-radius: 18px;
  padding: 30px 36px; width: min(520px, 92vw); text-align: center;
}
#result-title.win { color: #ffd76b; font-size: 34px; text-shadow: 0 0 24px rgba(255,215,107,.5); }
#result-title.lose { color: #ff8f8f; font-size: 34px; }
.result-map { color: #9aa4b6; margin: 6px 0 16px; }
.result-stats { display: flex; justify-content: center; gap: 34px; margin-bottom: 16px; }
.result-stats span { display: block; font-size: 26px; font-weight: bold; color: #7cd8ff; }
.result-stats label { font-size: 12px; color: #8b93a3; }
#result-unlock {
  background: rgba(255, 215, 107, .1); border: 1px solid rgba(255,215,107,.4);
  border-radius: 10px; padding: 10px; margin-bottom: 8px; color: #ffe9b0; font-size: 14px;
}

/* ---------- 提示 ---------- */
#toast-wrap {
  position: absolute; top: 120px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
  z-index: 50;
}
.toast {
  background: rgba(20, 24, 36, .92); border: 1px solid #3a4356;
  padding: 9px 20px; border-radius: 10px; font-size: 14px;
  animation: toastIn .25s ease-out; transition: opacity .4s, transform .4s;
}
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 技能槽 / 隐藏BOSS / 帮助 ---------- */
.pt-skill-label { color: #8b93a3; font-size: 11px; margin: 4px 0 3px; }
.pt-iv { font-size: 11px; color: #8b93a3; margin-bottom: 3px; }
.pt-iv b { font-size: 12px; }
.pt-skills { display: flex; flex-direction: column; gap: 3px; margin-bottom: 5px; }
.sk-slot {
  display: flex; align-items: center; gap: 5px;
  background: #161c29; border: 1px solid #2a3140; border-radius: 7px; padding: 2px 5px;
}
.sk-slot.locked { opacity: .55; }
.sk-slot .sk-no {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  background: #2258a8; color: #fff; font-size: 10px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
}
.sk-slot.locked .sk-no { background: #3a4356; }
.sk-slot .sk-lock { font-size: 10px; color: #8b93a3; }
.sk-slot select {
  flex: 1; min-width: 0; font-size: 11px; padding: 2px 3px; cursor: pointer;
  background: #232a38; color: #dfe6f2; border: 1px solid #3a4356; border-radius: 5px;
  font-family: inherit; outline: none;
}
.sk-slot select:focus { border-color: #7cd8ff; }
.pet-card.clickable-card { cursor: pointer; }
.pet-chip.clickable { cursor: pointer; transition: transform .12s; }
.pet-chip.clickable:hover { transform: translateY(-3px); border-color: #ffd23e; }
.hidden-tag { color: #ff9de8; font-weight: bold; }
.map-boss .hidden-tag { font-size: 12px; }
#boss-banner.hidden-banner .bb-inner {
  background: rgba(110, 20, 110, .85); border-color: #ff9de8; color: #ffd6f4;
  animation: bbPulseH .8s ease-in-out infinite alternate;
}
@keyframes bbPulseH { from { box-shadow: 0 0 14px rgba(255,120,235,.5); } to { box-shadow: 0 0 50px rgba(255,120,235,1); } }
#btn-skip-victory {
  padding: 10px 18px; font-size: 14px; cursor: pointer; pointer-events: auto;
  background: rgba(255,210,62,.92); color: #6b3a00; font-weight: bold;
  border: 2px solid #fff; border-radius: 12px; box-shadow: 0 4px 0 rgba(160,90,10,.5);
  font-family: inherit;
}
#btn-skip-victory:hover { background: #ffdd5c; transform: translateY(-2px); }
.help-box { text-align: left; max-height: 86vh; overflow: auto; }
.help-box h3 { text-align: center; }
.help-sec { margin-bottom: 14px; background: #1a2030; border: 1px solid #2c3547; border-radius: 12px; padding: 12px 16px; }
.help-title { font-size: 16px; font-weight: bold; color: #ffd76b; margin-bottom: 6px; }
.help-sec p { font-size: 13px; color: #c3cad6; line-height: 1.7; }
.help-steps { padding-left: 20px; }
.help-steps li { font-size: 13px; color: #c3cad6; line-height: 1.8; margin-bottom: 4px; }
.help-tips {
  margin-top: 8px; font-size: 12px; color: #9fb8a8; line-height: 1.7;
  background: rgba(60, 120, 80, .12); border-radius: 8px; padding: 8px 10px;
}
kbd {
  background: #3a4356; border: 1px solid #56607a; border-bottom-width: 3px;
  border-radius: 5px; padding: 1px 7px; font-size: 12px; color: #fff; font-family: monospace;
}
.hl-green { color: #8effa0; font-weight: bold; }
.hl-red { color: #ff8f8f; font-weight: bold; }

/* ---------- 加载动画 ---------- */
#boot-loader {
  position: fixed; inset: 0; z-index: 200;
  background: radial-gradient(1000px 700px at 50% 35%, #2a3a8f 0%, #16204a 55%, #0d1228 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; transition: opacity .5s; 
}
#boot-loader.hide { opacity: 0; pointer-events: none; }
.boot-ball {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(#e33d34 50%, #f4f4f6 50%);
  border: 4px solid #26262e; position: relative;
  box-shadow: 0 0 40px rgba(255,220,120,.5);
  animation: bootSpin 1.1s cubic-bezier(.6,.05,.4,.95) infinite;
}
.boot-ball::after {
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid #26262e;
}
@keyframes bootSpin {
  0% { transform: rotate(0) translateX(0); }
  25% { transform: rotate(90deg) translateX(6px); }
  50% { transform: rotate(180deg); }
  75% { transform: rotate(270deg) translateX(-6px); }
  100% { transform: rotate(360deg); }
}
.boot-title { font-size: 26px; font-weight: 900; letter-spacing: 6px; color: #fff; -webkit-text-stroke: 6px #2a3a8f; paint-order: stroke fill; }
.boot-bar { width: 240px; height: 12px; border-radius: 6px; background: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.5); overflow: hidden; }
.boot-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ffd23e, #ff9d2e); transition: width .2s; }
.boot-tip { font-size: 13px; color: #cfe0ff; }
.spinner {
  width: 26px; height: 26px; flex-shrink: 0;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #ffd23e;
  border-radius: 50%; display: inline-block; vertical-align: middle;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.lb-loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: #9aa4b6; font-size: 13px; padding: 22px 0; }

/* ---------- 窄屏适配 ---------- */
@media (max-width: 640px) {
  .logo h1 { font-size: 40px; -webkit-text-stroke-width: 6px; }
  .hud-hpwrap { width: 170px; }
  #hud-timer { font-size: 22px; }
  .hud-pet { width: 44px; }
  .hud-pet img { width: 32px; height: 32px; }
  .btn.primary.big { width: 240px; font-size: 20px; }
  .map-card { flex-direction: column; }
  .map-preview { width: 100%; height: 60px; }
}

/* ---------- 组队模式 ---------- */
.coop-panel { width: min(560px, 94vw); }
.coop-desc { background: rgba(74,155,234,.1); border: 1px solid rgba(74,155,234,.35); border-radius: 10px; padding: 12px 16px; font-size: 13px; line-height: 1.8; color: #cfe0ff; margin-bottom: 16px; }
.coop-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.join-row { display: flex; gap: 8px; }
.join-row input {
  width: 130px; text-align: center; font-size: 20px; letter-spacing: 6px; font-weight: bold;
  background: #161c29; border: 2px solid #3a4356; color: #ffd23e; border-radius: 10px; padding: 8px;
  text-transform: uppercase; font-family: monospace; outline: none;
}
.join-row input:focus { border-color: #ffd23e; }
.coop-code { background: #161c29; border: 2px solid #ffd23e; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: 15px; text-align: center; }
.coop-code b { font-size: 30px; letter-spacing: 10px; color: #ffd23e; font-family: monospace; margin: 0 10px; }
.coop-members { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.coop-member { background: #1c2331; border: 1px solid #333c50; border-radius: 10px; padding: 9px 14px; font-size: 14px; }
.coop-member.empty { opacity: .45; border-style: dashed; }
.cm-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; }
.coop-map-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 14px; }
.coop-map-row select { flex: 1; background: #232a38; color: #e8ebf0; border: 1px solid #3a4356; border-radius: 8px; padding: 9px; font-family: inherit; }
