/* 灵刃阁 · 水墨风 */
:root {
  --paper: #f6f2e9;
  --paper-deep: #efe9db;
  --ink: #23211e;
  --ink-soft: #57534a;
  --ink-faint: #8a857a;
  --cinnabar: #b03a2e;
  --bamboo: #5f7058;
  --gold: #a8822f;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --brush: "Ma Shan Zheng", "STKaiti", "KaiTi", "Kaiti SC", "Noto Serif SC", serif;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(35, 33, 30, 0.03), transparent 60%),
    radial-gradient(ellipse at 90% 100%, rgba(176, 58, 46, 0.03), transparent 50%);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.8;
}

/* ── 顶栏 ── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246, 242, 233, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(35, 33, 30, 0.15);
}
.topbar-inner {
  max-width: 960px; margin: 0 auto; padding: 0.6rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar-brand {
  font-family: var(--brush); font-size: 1.5rem; font-weight: 700;
  color: var(--ink); text-decoration: none; letter-spacing: 0.15em;
}
.topbar-nav a {
  color: var(--ink-soft); text-decoration: none; margin-left: 1.4rem; font-size: 0.95rem;
}
.topbar-nav a:hover { color: var(--cinnabar); }
.topbar-nav .nav-console {
  border: 1px solid var(--ink); border-radius: 4px;
  padding: 0.1rem 0.7rem; color: var(--ink);
}
.topbar-nav .nav-console:hover { background: var(--ink); color: var(--paper); }

/* ── 首屏 ── */
#hero {
  position: relative; overflow: hidden;
  min-height: 78vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 4rem 1.2rem;
}
.hero-ink {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 40% 30% at 15% 20%, rgba(35, 33, 30, 0.06), transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 75%, rgba(35, 33, 30, 0.05), transparent 70%),
    radial-gradient(ellipse 25% 20% at 80% 15%, rgba(95, 112, 88, 0.08), transparent 70%);
}
.hero-ink::after {
  content: "灵刃";
  position: absolute; right: -2rem; bottom: -6rem;
  font-family: var(--brush); font-size: 22rem; line-height: 1;
  color: rgba(35, 33, 30, 0.045);
  writing-mode: vertical-rl; user-select: none;
}
.hero-content { position: relative; max-width: 640px; }
.seal { margin-bottom: 1.2rem; filter: drop-shadow(2px 2px 3px rgba(35, 33, 30, 0.25)); }
.seal-text {
  font-family: var(--brush); font-size: 40px; fill: #f6f2e9; font-weight: 700;
}
#brand-title {
  font-family: var(--brush); font-size: 4.2rem; letter-spacing: 0.25em;
  text-indent: 0.25em; margin-bottom: 0.4rem;
}
.hero-sub { color: var(--ink-soft); letter-spacing: 0.35em; text-indent: 0.35em; font-size: 0.95rem; }
.hero-desc { margin: 1.4rem 0 2rem; color: var(--ink-soft); }
.hero-cta { display: flex; gap: 1rem; justify-content: center; margin-bottom: 1.6rem; }
.hero-stats { font-size: 0.85rem; color: var(--ink-faint); letter-spacing: 0.05em; }

.btn {
  display: inline-block; padding: 0.55rem 1.8rem; border-radius: 4px;
  text-decoration: none; font-size: 1rem; letter-spacing: 0.15em; transition: all 0.2s;
}
.btn-ink { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-ink:hover { background: var(--cinnabar); border-color: var(--cinnabar); }
.btn-plain { color: var(--ink); border: 1px solid var(--ink); }
.btn-plain:hover { background: var(--ink); color: var(--paper); }

/* ── 墨线分隔 ── */
.ink-divider {
  border: none; max-width: 960px; margin: 0 auto; height: 2px;
  background: linear-gradient(to right, transparent, rgba(35, 33, 30, 0.35) 20%, rgba(35, 33, 30, 0.35) 80%, transparent);
}

/* ── 章节 ── */
main section:not(#hero) { max-width: 960px; margin: 0 auto; padding: 3.2rem 1.2rem 2.4rem; }
h2 {
  font-family: var(--brush); font-size: 2.1rem; letter-spacing: 0.2em;
  margin-bottom: 0.6rem;
}
h2::before { content: "· "; color: var(--cinnabar); }
.section-hint { color: var(--ink-faint); font-size: 0.9rem; margin-bottom: 1.6rem; }
.loading { color: var(--ink-faint); font-style: italic; }

/* ── 告示 ── */
.notice-list .notice-card {
  background: var(--paper-deep);
  border-left: 3px solid var(--cinnabar);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.3rem; margin-bottom: 1rem;
  white-space: pre-line;
}
.notice-card .notice-extra {
  display: block; margin-top: 0.5rem; font-size: 0.85rem; color: var(--ink-faint);
  font-family: monospace;
}

/* ── 兵器谱 ── */
.weapon-tools { margin-bottom: 1.4rem; }
#weapon-search {
  width: 100%; max-width: 360px; padding: 0.5rem 0.9rem;
  border: 1px solid rgba(35, 33, 30, 0.3); border-radius: 4px;
  background: rgba(255, 255, 255, 0.5); font-family: var(--serif); font-size: 0.95rem;
}
#weapon-search:focus { outline: 2px solid rgba(176, 58, 46, 0.4); }
.weapon-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.2rem;
}
.weapon-card {
  position: relative;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(35, 33, 30, 0.18);
  border-radius: 6px; padding: 1.2rem 1.3rem 1.1rem;
  transition: transform 0.18s, box-shadow 0.18s;
}
.weapon-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(35, 33, 30, 0.12); }
.weapon-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.weapon-name { font-size: 1.25rem; font-weight: 700; font-family: monospace; letter-spacing: 0.02em; }
.weapon-rank {
  font-family: var(--brush); font-size: 0.85rem; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 3px; padding: 0 0.45rem;
  white-space: nowrap;
}
.weapon-rank.rank-free { color: var(--cinnabar); border-color: var(--cinnabar); }
.weapon-vendor { font-size: 0.8rem; color: var(--ink-faint); margin-top: 0.15rem; }
.weapon-desc {
  font-size: 0.9rem; color: var(--ink-soft); margin: 0.7rem 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.weapon-tags { margin-bottom: 0.8rem; }
.weapon-tag {
  display: inline-block; font-size: 0.72rem; color: var(--bamboo);
  border: 1px solid rgba(95, 112, 88, 0.5); border-radius: 3px;
  padding: 0 0.4rem; margin: 0 0.3rem 0.3rem 0;
}
.weapon-price {
  display: flex; gap: 1.2rem; border-top: 1px dashed rgba(35, 33, 30, 0.25);
  padding-top: 0.7rem; font-size: 0.85rem;
}
.weapon-price .p-label { color: var(--ink-faint); margin-right: 0.3rem; }
.weapon-price .p-value { font-weight: 700; }
.weapon-price .p-free { color: var(--cinnabar); font-weight: 700; letter-spacing: 0.1em; }

/* ── 台况 ── */
.status-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem;
}
.status-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(35, 33, 30, 0.18); border-radius: 6px;
  padding: 1rem 1.2rem;
}
.status-label { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 0.3rem; }
.status-label small { font-size: 0.72rem; }
.status-value { font-size: 1.35rem; font-weight: 700; }
.lamp::before {
  content: "●"; margin-right: 0.4rem; font-size: 0.9em;
}
.lamp-ok::before { color: var(--bamboo); }
.lamp-mid::before { color: var(--gold); }
.lamp-bad::before { color: var(--cinnabar); }

/* ── 接入指南 ── */
.guide-block {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(35, 33, 30, 0.18); border-radius: 6px;
  padding: 1rem 1.3rem; margin-bottom: 1.2rem;
}
.guide-row { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.5rem; }
.guide-block .guide-row:first-child:last-child { margin-bottom: 0; }
.guide-label { font-size: 0.85rem; color: var(--ink-faint); }
.guide-code { font-size: 0.95rem; font-weight: 700; }
.btn-copy {
  margin-left: auto; cursor: pointer;
  background: none; border: 1px solid var(--ink-soft); border-radius: 4px;
  color: var(--ink-soft); font-family: var(--serif); font-size: 0.8rem;
  padding: 0.15rem 0.7rem; transition: all 0.2s;
}
.btn-copy:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-copy.copied { border-color: var(--bamboo); color: var(--bamboo); }
.guide-block pre {
  background: var(--ink); color: #d8d4c8; border-radius: 4px;
  padding: 0.9rem 1.1rem; overflow-x: auto; font-size: 0.85rem; line-height: 1.6;
}
.code-base { color: #e0b56a; }

/* ── 页脚 ── */
.footer { max-width: 960px; margin: 2rem auto 0; padding: 0 1.2rem 2.5rem; text-align: center; }
.footer .ink-divider { margin-bottom: 1.6rem; }
.footer p { color: var(--ink-faint); font-size: 0.85rem; margin-bottom: 0.3rem; }
.footer a { color: var(--ink-soft); }
.footer a:hover { color: var(--cinnabar); }

/* ── 窄屏 ── */
@media (max-width: 640px) {
  #brand-title { font-size: 2.8rem; }
  .hero-ink::after { font-size: 12rem; }
  .topbar-nav a { margin-left: 0.8rem; font-size: 0.85rem; }
}
