/* WARDOGS 小助手 —— 黑色主调 / 白金黄副调 / Noto Sans，无蓝紫 */
:root {
  --bg: #0a0b0c;
  --carbon: #141517;
  --panel: #191b1d;
  --panel2: #202225;
  --line: #2a2c2e;
  --line2: #3a3d40;
  --text: #e9e9e4;
  --dim: #9a9c98;
  --mute: #6a6c68;
  --gold: #e7b324;
  --gold-dim: #b38a1a;
  --danger: #d1424a;
  --danger-dim: #e07d7f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶部导航条 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  height: 56px;
  border-bottom: 1px solid var(--line);
  background: var(--carbon);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-brand {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 1px;
  color: var(--text);
  margin-right: 16px;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand em { color: var(--gold); font-style: normal; }
/* 品牌词 WARDOGS：使用 Anton（Google Fonts 免费字体）；Anton 本身已是粗体，保持 400 避免二次加粗发糊 */
.brand-word {
  font-family: "Anton", "Noto Sans", "Noto Sans SC", sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--dim);
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link.active { color: var(--gold); border-bottom-color: var(--gold); }

/* 导航链接容器（桌面横排，左对齐） */
.nav-links { display: flex; gap: 8px; height: 100%; }

/* 汉堡按钮（竖屏显示） */
.nav-burger {
  display: none;
  margin-left: auto;
  width: 40px; height: 40px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: transparent; border: none; cursor: pointer;
}
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--text); }

/* 右侧边栏抽屉 */
.nav-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: 250px; max-width: 80vw;
  background: var(--carbon);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform .25s ease;
}
body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
body.nav-open .nav-drawer { transform: translateX(0); }
.nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.nd-title { font-weight: 700; color: var(--text); letter-spacing: 1px; }
.nav-drawer-close { background: transparent; border: none; color: var(--dim); font-size: 20px; cursor: pointer; line-height: 1; }
.nav-drawer-links { display: flex; flex-direction: column; padding: 8px 0; }
.nav-drawer-link {
  display: block; padding: 14px 20px;
  color: var(--dim); font-size: 15px;
  border-left: 3px solid transparent;
}
.nav-drawer-link:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav-drawer-link.active { color: var(--gold); border-left-color: var(--gold); background: rgba(231, 179, 36, 0.06); }

.container { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }

/* 首页 */
.home-hero { padding: 56px 0 20px; text-align: center; }
.home-hero .kicker {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--mute);
}
.home-hero h1 { font-size: 34px; font-weight: 800; margin: 12px 0 6px; }
.home-hero h1 em { color: var(--gold); font-style: normal; }
.home-hero p { color: var(--dim); max-width: 560px; margin: 0 auto; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 36px;
}
.category-card {
  display: block;
  border: 1px solid var(--line);
  background: var(--carbon);
  padding: 26px 24px;
  transition: border-color .15s, transform .15s;
  color: var(--text);
}
.category-card:hover { border-color: var(--gold); transform: translateY(-2px); text-decoration: none; }
.category-card .card-no { font-size: 12px; color: var(--mute); letter-spacing: 2px; }
.category-card h3 { font-size: 20px; margin: 8px 0 8px; }
.category-card h3 .zh { color: var(--gold); }
.category-card p { color: var(--dim); font-size: 14px; }
.category-card .card-arrow { color: var(--gold); font-size: 20px; float: right; }

/* 页头 */
.page-head { border-bottom: 1px solid var(--line); padding: 26px 0 18px; margin-bottom: 22px; }
.page-head h1 { font-size: 26px; font-weight: 800; }
.page-head h1 em { color: var(--gold); font-style: normal; }
.page-head p { color: var(--dim); margin-top: 6px; }

/* 武器数据库 */
.weapon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.weapon-card {
  border: 1px solid var(--line);
  background: var(--carbon);
  overflow: hidden;
}
.weapon-card .wc-img {
  height: 150px;
  display: flex; align-items: center; justify-content: center;
  background: #0d0e0f;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}
.weapon-card .wc-img img { max-width: 82%; max-height: 126px; object-fit: contain; }
.weapon-card .wc-body { padding: 16px 18px 18px; }
.weapon-card .wc-name { font-size: 18px; font-weight: 700; }
.wip {
  border: 1px solid var(--line);
  background: var(--carbon);
  padding: 80px 20px;
  text-align: center;
}
.wip h2 { color: var(--gold); font-size: 22px; margin-bottom: 12px; }
.wip p { color: var(--dim); font-size: 14px; }

.weapon-card .wc-name .tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; margin-left: 8px;
  border: 1px solid var(--gold); color: var(--gold); letter-spacing: 1px; vertical-align: 2px;
}
.weapon-card .wc-kind { color: var(--mute); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin: 2px 0 12px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table td { padding: 6px 0; border-top: 1px solid var(--line); }
.spec-table td:first-child { color: var(--dim); }
.spec-table td:last-child { text-align: right; color: var(--text); font-weight: 600; }
.spec-table tr:first-child td { border-top: none; }

/* 炮兵计算器 */
.calc-layout { display: flex; gap: 16px; height: calc(100vh - 56px); height: calc(100dvh - 56px); }
.map-pane { flex: 1; position: relative; min-width: 0; background: #08090a; border: 1px solid var(--line); overflow: hidden; }
.map-pane canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.map-pane canvas.panning { cursor: grabbing; }
.side-panel {
  width: 320px; flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--carbon);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.sp-head { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sp-head h2 { font-size: 16px; letter-spacing: 1px; color: var(--gold); }
.sp-section { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sp-section .sp-label { font-size: 11px; letter-spacing: 2px; color: var(--mute); text-transform: uppercase; margin-bottom: 8px; }

.weapon-select { display: flex; flex-direction: column; gap: 10px; }
.map-select { display: flex; flex-direction: column; gap: 8px; }
.map-opt {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); padding: 10px 12px; cursor: pointer;
  background: transparent; color: var(--text); text-align: left; width: 100%;
}
.map-opt:hover { border-color: var(--line2); }
.map-opt.active { border-color: var(--gold); background: rgba(231,179,36,.08); }
.map-opt.disabled { opacity: .45; cursor: not-allowed; }
.map-opt.disabled:hover { border-color: var(--line); }
.map-opt .mo-name { font-weight: 700; font-size: 14px; }
.map-opt .mo-en { font-size: 12px; color: var(--dim); letter-spacing: 1px; text-transform: uppercase; }
.map-opt .mo-badge {
  margin-left: auto;
  font-size: 11px; color: var(--dim);
  border: 1px solid var(--line2); padding: 2px 8px;
}
.weapon-opt {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); padding: 8px; cursor: pointer;
  background: transparent; color: var(--text); text-align: left;
}
.weapon-opt:hover { border-color: var(--line2); }
.weapon-opt.active { border-color: var(--gold); background: rgba(231,179,36,.08); }
.weapon-opt img { width: 74px; height: 44px; object-fit: contain; }
.weapon-opt .wo-name { font-weight: 700; font-size: 14px; }
.weapon-opt .wo-kind { font-size: 12px; color: var(--dim); }

.result-rows { display: flex; flex-direction: column; gap: 6px; }
.result-row { display: flex; justify-content: space-between; align-items: baseline; }
.result-row .rk { color: var(--dim); font-size: 13px; }
.result-row .rv { font-weight: 700; font-size: 15px; }
.result-row.primary .rv { color: var(--gold); font-size: 20px; }
.result-row .unit { color: var(--mute); font-size: 12px; margin-left: 4px; }

.status-msg { padding: 10px 12px; border: 1px solid var(--danger); color: var(--danger-dim); font-size: 13px; margin-top: 8px; }
.status-msg.ok { border-color: var(--line2); color: var(--dim); }

.coord-inputs { display: flex; gap: 8px; align-items: center; }
.coord-inputs input {
  flex: 1; min-width: 0; height: 34px;
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  padding: 0 8px; font-size: 13px; font-family: inherit;
}
.coord-inputs .ci-label { color: var(--dim); font-size: 12px; width: 14px; text-align: center; }
.coord-inputs .ci-note { color: var(--mute); font-size: 11px; }

.tool-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
}
.btn:hover { border-color: var(--line2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #0a0b0c; font-weight: 700; }
.btn.ghost { background: transparent; }
.btn.active { border-color: var(--gold); color: var(--gold); }
.btn.small { padding: 5px 10px; font-size: 12px; }


.map-coord {
  position: absolute; right: 12px; bottom: 12px; z-index: 5;
  background: rgba(10,11,12,.78); border: 1px solid var(--line);
  padding: 6px 10px; font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums;
}
.map-hint {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5;
  background: rgba(10,11,12,.85); border: 1px solid var(--line);
  padding: 6px 14px; font-size: 12px; color: var(--dim); white-space: nowrap;
}

/* 地图左上角浮动工具（竖屏显示） */
.map-tools {
  position: absolute; left: 12px; top: 12px; z-index: 5;
  display: none;
  flex-direction: column; gap: 8px;
}
.mt-btn {
  min-width: 64px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 6px;
  background: rgba(10, 11, 12, 0.85);
  color: var(--text); font-size: 13px; cursor: pointer;
  text-align: center;
}
.mt-btn.active { border-color: var(--gold); background: rgba(231, 179, 36, 0.16); color: var(--gold); }

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px;
  text-align: center;
  color: var(--mute);
  font-size: 12px;
}
.site-footer div { margin-top: 6px; }
.site-footer div:first-child { margin-top: 0; }

/* 响应式：移动端底部抽屉 */
.drawer-handle, .drawer-arrow { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .calc-layout { flex-direction: column; height: calc(100vh - 56px); height: calc(100dvh - 56px); }
  .map-pane { flex: 1; min-height: 0; height: auto; }
  .map-tools { display: flex; }
  .map-hint { top: 12px; left: 96px; transform: none; }

  .side-panel {
    width: auto;
    flex-shrink: 0;
    max-height: 74vh;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    transition: max-height .28s ease;
  }
  .side-panel:not(.open) {
    max-height: 56px;
    overflow: hidden;
  }

  .sp-head {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--carbon);
  }
  .sp-head h2 { margin-top: 10px; }
  .drawer-handle {
    display: block;
    position: absolute;
    left: 50%; top: 7px; transform: translateX(-50%);
    width: 46px; height: 4px; border-radius: 2px; background: var(--line2);
  }
  .drawer-arrow {
    display: inline-block;
    margin-left: auto;
    color: var(--dim);
    font-size: 14px;
    transition: transform .28s ease;
  }
  .side-panel.open .drawer-arrow { transform: rotate(180deg); }

  .category-grid { grid-template-columns: 1fr; }
}
