/* CS WIKI — 骨架样式（无框架、无依赖） */

:root {
  --bg: #0b0e14;
  --bg-soft: #11161f;
  --panel: #131821;
  --panel-2: #171d27;
  --line: #232b36;
  --line-soft: #1b222c;
  --fg: #e6edf3;
  --fg-dim: #9aa7b4;
  --muted: #78848f;
  --accent: #66c0f4;
  --accent-dim: #2a4a63;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.86em;
  background: #0e131b;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1px 5px;
  color: #b7c4d1;
}
h1, h2, h3 { line-height: 1.3; }
h1 { font-size: 1.7rem; margin: 0 0 6px; }
h2 { font-size: 1.15rem; margin: 26px 0 12px; }
h3 { font-size: 0.95rem; margin: 18px 0 8px; color: var(--fg-dim); }

.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }

/* ---------------- topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 14, 20, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 56px; }
.brand {
  display: flex; align-items: center; gap: 9px;
  color: var(--fg); font-weight: 700; letter-spacing: 0.04em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, #2a4a63, #66c0f4);
  color: #06121b; font-size: 12px; font-weight: 800;
}
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { color: var(--fg-dim); font-size: 0.92rem; }
.nav a:hover { color: var(--fg); text-decoration: none; }

.main { padding: 28px 0 40px; }

/* ---------------- hero ---------------- */
.hero { padding: 14px 0 6px; }
.hero h1 { font-size: 2rem; letter-spacing: -0.01em; }
.searchbox { display: flex; gap: 8px; margin: 18px 0 6px; max-width: 720px; }
.searchbox input {
  flex: 1; height: 42px; padding: 0 14px;
  background: var(--panel); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 0.95rem; outline: none;
}
.searchbox input:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 3px rgba(102, 192, 244, 0.12); }
.searchbox button {
  height: 42px; padding: 0 20px; cursor: pointer;
  background: var(--accent); color: #06121b;
  border: 0; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 700;
}
.searchbox button:hover { filter: brightness(1.08); }

/* ---------------- stats ---------------- */
.statgrid {
  display: grid; gap: 10px; margin: 22px 0 8px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
}
.stat-n { font-size: 1.5rem; font-weight: 700; color: var(--accent); line-height: 1.2; }
.stat-k { font-size: 0.8rem; color: var(--muted); }

.section-title {
  font-size: 1.05rem; color: var(--fg-dim);
  border-left: 3px solid var(--accent-dim); padding-left: 10px;
}

/* ---------------- weapon grid ---------------- */
.wgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.wcard {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px;
  color: var(--fg); transition: border-color 0.15s, transform 0.15s;
}
.wcard:hover { text-decoration: none; border-color: var(--accent-dim); transform: translateY(-1px); }
.wcard-img { width: 62px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; }
.wcard-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.wcard-name { font-weight: 600; font-size: 0.92rem; }
.wcard-meta { font-size: 0.78rem; color: var(--muted); }

/* ---------------- skin cards ---------------- */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 14px; }

.card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  border-top: 2px solid var(--rc, var(--line));
  border-radius: var(--radius); overflow: hidden;
  color: var(--fg); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.card:hover {
  text-decoration: none; transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--rc, var(--accent-dim));
}
.card-img {
  aspect-ratio: 4 / 3; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 65%, rgba(102, 192, 244, 0.10), transparent 62%),
    var(--panel-2);
  padding: 8px;
}
.card-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.noimg { color: var(--muted); font-size: 0.78rem; }
.card-body { padding: 9px 11px 11px; }
.card-title { font-size: 0.88rem; font-weight: 600; line-height: 1.35; }
.card-meta { font-size: 0.76rem; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rc, var(--muted)); display: inline-block; }
.card-float { font-size: 0.72rem; color: #6f7b87; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ---------------- badges ---------------- */
.badge {
  display: inline-block; font-size: 0.7rem; line-height: 1.5;
  padding: 0 7px; border-radius: 999px;
  border: 1px solid var(--line); background: #0e131b; color: var(--fg-dim);
  white-space: nowrap;
}
.badge.rarity { border-color: var(--rc, var(--line)); color: var(--rc, var(--fg-dim)); }
.badge.phase { border-color: #6a4fa8; color: #c3a8ff; }
.badge.vanilla { border-color: #5b6672; color: #b7c4d1; }
.badge.st { border-color: #cf6a32; color: #ffb27a; }
.badge.sou { border-color: #b79b3b; color: #ffe08a; }
.badge.wear { border-color: var(--line); color: var(--fg-dim); }

/* ---------------- breadcrumb / page head ---------------- */
.crumb { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.crumb a { color: var(--fg-dim); }

.pagehead {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line);
  border-top: 2px solid var(--rc, var(--line));
  border-radius: var(--radius); padding: 18px;
}
.pagehead-img {
  flex: 0 0 auto; width: 140px; height: 100px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 65%, rgba(102, 192, 244, 0.10), transparent 62%);
  border-radius: 8px;
}
.pagehead-img.big { width: 260px; height: 195px; }
.pagehead-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pagehead-main { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.desc { color: #b7c4d1; font-size: 0.9rem; margin: 10px 0 0; white-space: normal; }

/* ---------------- float bar ---------------- */
.floatbar {
  position: relative; height: 7px; border-radius: 4px;
  background: linear-gradient(90deg, #4b69ff 0%, #4b69ff 14%, #8847ff 14% 30%, #d32ce6 30% 76%, #eb4b4b 76% 90%, #e4ae39 90% 100%);
  opacity: 0.35; margin: 12px 0 10px;
}
.floatbar span {
  position: absolute; top: -3px; height: 13px; border-radius: 3px;
  background: var(--accent); box-shadow: 0 0 0 2px rgba(102, 192, 244, 0.25);
}

/* ---------------- panels ---------------- */
.cols { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-top: 16px; }
@media (max-width: 860px) {
  .cols { grid-template-columns: 1fr; }
  .pagehead { flex-direction: column; }
  .pagehead-img, .pagehead-img.big { width: 100%; height: 180px; }
}
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
}
.panel h2 { margin-top: 0; font-size: 1rem; color: var(--fg); }

.kv { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.kv th {
  text-align: left; font-weight: 400; color: var(--muted);
  padding: 7px 12px 7px 0; width: 108px; vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
.kv td { padding: 7px 0; border-bottom: 1px solid var(--line-soft); word-break: break-word; }

.plainlist { list-style: none; margin: 0; padding: 0; }
.plainlist li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.88rem;
}
.li-name { color: var(--fg); }
.li-meta { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }

/* ---------------- search ---------------- */
#search-results .card-img { display: none; }
#search-status { min-height: 1.6em; }

/* ---------------- footer ---------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 40px; margin-top: 30px;
  font-size: 0.8rem; color: var(--muted);
}
.footer p { margin: 4px 0; }
.footer .muted { color: #5d6874; }

/* ---------------- 分页 / 分类筛选 / 小字号 ---------------- */
.pager {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  margin: 26px 0 10px; font-size: 0.85rem;
}
.pager a, .pager span {
  min-width: 32px; height: 32px; padding: 0 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--fg-dim);
}
.pager a:hover { color: var(--fg); border-color: var(--accent-dim); text-decoration: none; }
.pager .cur { background: var(--accent-dim); border-color: var(--accent); color: #eaf6ff; }
.pager .gap { border: 0; background: transparent; color: var(--muted); min-width: 16px; }

.chip-btn {
  cursor: pointer; font: inherit; font-size: 0.78rem; line-height: 1.6;
  padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #0e131b; color: var(--fg-dim);
}
.chip-btn:hover { border-color: var(--accent-dim); color: var(--fg); }
.chip-btn.cur { border-color: var(--accent); color: #eaf6ff; background: var(--accent-dim); }

.sub { font-size: 0.8rem; color: var(--muted); font-weight: 400; margin-left: 6px; }
.section-title { margin-top: 30px; }

/* 列表页的卡片更紧凑 */
.grid.small .card-title { font-size: 0.82rem; }
.grid.small .card-img { aspect-ratio: 5 / 4; }


/* ---------------- 变体表（磨损 × 品质 透视） ---------------- */
.vtable { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.vtable th {
  text-align: left; font-weight: 400; color: var(--muted);
  padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-soft); white-space: nowrap;
}
.vtable td { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.vtable td code { font-size: 0.76rem; word-break: break-all; }
.vtable tr:last-child th, .vtable tr:last-child td { border-bottom: 0; }

/* ---------------- 语言切换按钮 ---------------- */
.lang-switch {
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--fg-dim);
  line-height: 1.6;
}
.lang-switch:hover { border-color: var(--accent); color: var(--fg); text-decoration: none; }
