/* ==========================================================================
   弹道对比页样式：左侧条件栏 + 右侧多标签视图
   ========================================================================== */

.bl-wrap {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  align-items: start;
}

/* ---------- 侧栏 ---------- */
.bl-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 72px; }
.bl-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.bl-box-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--mute); margin-bottom: 10px;
}
.bl-rangeout { color: var(--gold); font-size: 12px; letter-spacing: 0; }

/* 对比武器列表 */
.bl-weapons { display: flex; flex-direction: column; gap: 2px; }
.bl-wrow {
  display: grid; grid-template-columns: 4px 1fr auto auto; align-items: center; gap: 8px;
  padding: 6px 4px; border-radius: var(--radius); font-size: 13.5px;
}
.bl-wrow:hover { background: var(--panel2); }
.bl-swatch { display: inline-block; width: 4px; height: 18px; border-radius: 2px; }
.bl-swatch.ghost { background: var(--line2); opacity: .5; }
.bl-wname { color: var(--text); font-weight: 600; }
.bl-wcal { color: var(--mute); font-size: 11.5px; }
.bl-wdel {
  background: none; border: none; color: var(--mute); font-size: 15px; line-height: 1;
  padding: 0 4px; border-radius: var(--radius);
}
.bl-wdel:hover { color: var(--danger); background: var(--panel3); }
.bl-mini {
  background: var(--panel2); border: 1px solid var(--line2); color: var(--dim);
  border-radius: var(--radius); padding: 3px 8px; font-size: 11.5px; font-weight: 700;
}
.bl-mini:hover:not(:disabled) { border-color: var(--gold-dim); color: var(--gold); }
.bl-mini:disabled { opacity: .45; cursor: default; }

/* 命中部位图 */
.bl-figure-wrap { display: flex; gap: 12px; align-items: flex-start; }
.bl-figure { width: 92px; height: 210px; flex: none; }
.bl-zone {
  fill: #3a3f45; stroke: #545a61; stroke-width: 1; cursor: pointer;
  transition: fill .12s ease;
}
.bl-zone:hover { fill: var(--gold-dim); stroke: var(--gold); }
.bl-zone.active { fill: var(--gold); stroke: var(--gold); }
.bl-figure-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.bl-kv { font-size: 12px; }
.bl-kv span { display: block; color: var(--mute); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.bl-kv b { color: var(--text); font-weight: 700; }

/* 弹种 / 护甲档位 */
.bl-rounds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bl-round {
  background: var(--panel2); border: 1px solid var(--line2); color: var(--dim);
  border-radius: var(--radius); padding: 8px 4px; font-size: 12px; font-weight: 700;
}
.bl-round:hover { border-color: var(--gold-dim); color: var(--text); }
.bl-round.active { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }

.bl-tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.bl-tier {
  background: var(--panel2); border: 1px solid var(--line2); color: var(--dim);
  border-radius: var(--radius); padding: 6px 2px; text-align: center;
}
.bl-tier b { display: block; font-size: 12px; font-weight: 800; }
.bl-tier i { display: block; font-size: 10.5px; font-style: normal; color: var(--mute); }
.bl-tier:hover { border-color: var(--gold-dim); }
.bl-tier.active { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.bl-tier.active i { color: var(--gold-dim); }

.bl-slider { width: 100%; accent-color: var(--gold); margin: 2px 0 8px; }
.bl-presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.bl-preset {
  background: var(--panel2); border: 1px solid var(--line2); color: var(--dim);
  border-radius: var(--radius); padding: 4px 0; font-size: 11.5px;
}
.bl-preset.active { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); font-weight: 700; }

/* ---------- 主区 ---------- */
.bl-main { min-width: 0; }
.bl-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 12px;
}
.bl-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-chip-s {
  background: var(--panel2); border: 1px solid var(--line2); border-radius: 999px;
  padding: 4px 11px; font-size: 12.5px; color: var(--dim);
}
.bl-share {
  background: var(--panel2); border: 1px solid var(--line2); color: var(--dim);
  border-radius: var(--radius); padding: 6px 12px; font-size: 12.5px; font-weight: 700;
}
.bl-share:hover { border-color: var(--gold-dim); color: var(--gold); }

/* 标签页 */
.bl-tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.bl-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--mute); font-size: 13.5px; font-weight: 700; padding: 9px 14px;
}
.bl-tab:hover { color: var(--text); }
.bl-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.bl-subbar { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.bl-subgroup { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px; }
.bl-sub {
  background: none; border: none; color: var(--mute); font-size: 12.5px; font-weight: 700;
  padding: 5px 11px; border-radius: 2px;
}
.bl-sub:hover { color: var(--text); }
.bl-sub.active { background: var(--gold-soft); color: var(--gold); }

.bl-types { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.bl-type {
  background: var(--panel2); border: 1px solid var(--line2); color: var(--mute);
  border-radius: 999px; padding: 4px 11px; font-size: 12px;
}
.bl-type:hover { color: var(--text); }
.bl-type.active { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); font-weight: 700; }

/* 表格 */
.bl-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.bl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bl-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--panel3); color: var(--mute); font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; text-align: left;
  padding: 9px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap;
}
.bl-table thead th i { font-style: normal; color: var(--mute); opacity: .8; }
.bl-table tbody td { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--dim); }
.bl-table tbody tr:hover { background: var(--panel2); }
.bl-table tbody tr.in-compare { background: rgba(231, 179, 36, .05); }
.bl-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.bl-table td b { display: block; font-weight: 800; }
.bl-table td i { display: block; font-style: normal; font-size: 11px; color: var(--mute); }
.bl-table td.na b { color: var(--mute) !important; }
.bl-wcell { display: flex; align-items: center; gap: 7px; color: var(--text); font-weight: 600; white-space: nowrap; }
.bl-wtype { color: var(--mute); font-size: 11px; font-weight: 400; margin-left: 4px; }
.bl-round-cell { color: var(--mute); font-size: 11.5px; }
.bl-note { color: var(--mute); font-size: 12px; margin-top: 8px; }
.bl-empty { color: var(--mute); font-size: 13px; padding: 20px; text-align: center; }

/* 逐武器命中图 */
.bl-hits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.bl-hitcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.bl-hitcard-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bl-hitcard-head b { color: var(--text); font-size: 14px; }
.bl-hitcard-head span { color: var(--mute); font-size: 11.5px; margin-left: auto; }
.bl-hitcard-figure { position: relative; width: 120px; margin: 0 auto 10px; }
.bl-body { width: 120px; height: 273px; display: block; }
.bl-body-nums { position: absolute; inset: 0; pointer-events: none; }
.bl-body-nums span {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 11px; font-weight: 800; color: #06070a; text-shadow: 0 0 3px rgba(255,255,255,.35);
}
.bl-math { border-top: 1px solid var(--line); padding-top: 8px; }
.bl-math-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--dim); padding: 2px 0; }
.bl-math-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.bl-math-row.total { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 5px; font-weight: 700; }
.bl-math-row.total b { font-size: 13.5px; }

/* 距离曲线 */
.bl-chart { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.bl-chart-svg { width: 100%; height: auto; display: block; }
.bl-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12.5px; color: var(--dim); }
.bl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bl-bands { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; }
.bl-bandrow { display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 8px; }
.bl-bandlabel { color: var(--mute); font-size: 11.5px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-bandtrack { position: relative; height: 20px; background: var(--panel2); border-radius: 2px; }
.bl-bandtrack i {
  position: absolute; top: 0; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-style: normal; font-weight: 700; overflow: hidden;
}
.bl-scale-legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--mute); }
.bl-scale-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bl-scale-legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.bl-scale-legend em { font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
.bl-scale-legend em::before { content: '· '; }

/* 弹药表 */
.bl-ammo-weapons { display: flex; flex-wrap: wrap; gap: 4px; }
.bl-ammo-weapons span { background: var(--panel2); border-radius: 2px; padding: 1px 6px; font-size: 11.5px; }
.bl-kind { display: inline-block; font-style: normal; font-size: 11px; font-weight: 700; border-radius: 2px; padding: 1px 5px; margin-right: 4px; }
.bl-kind.k-FMJ { background: rgba(79, 156, 249, .18); color: #7db4fb; }
.bl-kind.k-HP { background: rgba(242, 112, 138, .18); color: #f2768f; }
.bl-kind.k-AP { background: rgba(63, 191, 127, .18); color: #5bcb95; }

/* 选择弹窗 */
.bl-modal { position: fixed; inset: 0; z-index: 90; background: rgba(6, 7, 10, .68); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; }
.bl-modal[hidden] { display: none; }
.bl-modal-box {
  background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius);
  width: min(520px, 100%); max-height: 70vh; display: flex; flex-direction: column;
}
.bl-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bl-modal-head b { font-size: 14px; }
.bl-input {
  margin: 12px 14px; background: var(--panel2); border: 1px solid var(--line2);
  border-radius: var(--radius); padding: 8px 10px; font-size: 13.5px;
}
.bl-input:focus { outline: none; border-color: var(--gold-dim); }
.bl-picker-list { overflow: auto; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.bl-pick {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: none; border: none; color: var(--text); text-align: left;
  padding: 8px 10px; border-radius: var(--radius); font-size: 13.5px;
}
.bl-pick:hover { background: var(--panel2); }
.bl-pick i { font-style: normal; color: var(--mute); font-size: 11.5px; }

.bl-notes { padding-top: 0; }

@media (max-width: 1000px) {
  .bl-wrap { grid-template-columns: 1fr; }
  .bl-side { position: static; }
  .bl-figure-wrap { align-items: center; }
}

/* 表格列宽：武器与弹种列固定，护甲档位等分 */

.bl-table thead th:first-child { width: 30%; }
.bl-table thead th:nth-child(2) { width: 76px; }
.bl-table thead th.num { width: 13%; }

/* 对比武器排行条 */
.bl-rank { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.bl-rank-row {
  display: grid; grid-template-columns: 26px 4px 1fr auto auto; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 12px; font-size: 13px;
}
.bl-rank-row.first { border-color: var(--gold-dim); background: linear-gradient(90deg, rgba(231,179,36,.08), transparent); }
.bl-rank-no { color: var(--mute); font-weight: 800; font-size: 12px; text-align: center; }
.bl-rank-row.first .bl-rank-no { color: var(--gold); }
.bl-rank-name { color: var(--text); font-weight: 700; }
.bl-rank-sub { color: var(--mute); font-size: 11.5px; margin-left: 6px; font-weight: 400; }
.bl-rank-cell { color: var(--dim); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.bl-rank-cell b { font-weight: 800; }
.bl-rank-sort { color: var(--mute); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; text-align: right; }
