/* 导航首页：水墨 + 鎏金 */
:root {
  --ink: #07080b;
  --ink-2: #0d1016;
  --paper: #e9e2d0;
  --paper-dim: #a39c8b;
  --gold: #d4af6a;
  --gold-hi: #f6e3b0;
  --gold-lo: #8a6a33;
  --cinnabar: #b3261e;
  --line: rgba(212, 175, 106, .22);
  --brush: "STXingkai", "华文行楷", "Xingkai SC", "STKaiti", "KaiTi", "楷体", serif;
  --kai: "STKaiti", "KaiTi", "楷体", "Songti SC", "SimSun", serif;
  --sans: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.portal {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  color: var(--paper); font: 15px/1.7 var(--sans);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(212,175,106,.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(179,38,30,.07), transparent 60%),
    linear-gradient(180deg, var(--ink-2), var(--ink) 70%);
}
a { color: inherit; text-decoration: none; }

#inkrain { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.mist { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.mist i {
  position: absolute; width: 70vmax; height: 40vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(233,226,208,.05), transparent);
  filter: blur(20px); animation: drift 38s ease-in-out infinite alternate;
}
.mist i:nth-child(1) { top: 5%; left: -20%; }
.mist i:nth-child(2) { top: 45%; right: -25%; animation-duration: 46s; animation-delay: -12s; }
.mist i:nth-child(3) { bottom: -15%; left: 15%; animation-duration: 54s; animation-delay: -25s; }
@keyframes drift { to { transform: translate3d(12vw, -4vh, 0) scale(1.15); } }

/* 顶栏 */
.p-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(7,8,11,.85), rgba(7,8,11,0));
  backdrop-filter: blur(6px);
}
.p-logo { display: flex; align-items: center; gap: 12px; font-family: var(--kai); font-size: 17px; letter-spacing: .15em; color: var(--paper); }
.p-seal {
  display: grid; place-items: center; width: 34px; height: 34px;
  font-family: var(--brush); font-size: 20px; color: #fbe9e7; letter-spacing: 0;
  background: var(--cinnabar); border-radius: 4px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12), 0 0 18px rgba(179,38,30,.35);
}
.p-user { display: flex; align-items: center; gap: 18px; font-size: 14px; color: var(--paper-dim); }
.p-user a { transition: color .2s; }
.p-user a:hover { color: var(--gold-hi); }
.p-name { color: var(--paper); }
.p-login {
  padding: 6px 20px; border: 1px solid var(--line); border-radius: 999px; color: var(--gold) !important;
  letter-spacing: .2em; transition: border-color .2s, background .2s, color .2s !important;
}
.p-login:hover { border-color: var(--gold); background: rgba(212,175,106,.08); }

main { position: relative; z-index: 1; }

/* 主视觉 */
.hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: clamp(96px, 13vh, 140px) 16px clamp(28px, 5vh, 56px);
}
.hero-kicker {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: .45em; color: var(--gold);
  opacity: 0; animation: fadeUp 1.2s .2s forwards;
}
.hero-kicker span { width: clamp(24px, 8vw, 80px); height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero-kicker span:last-child { transform: scaleX(-1); }

.hero-title {
  margin: 22px 0 6px; font-family: var(--brush); font-weight: 400;
  font-size: clamp(42px, 8vw, 100px); line-height: 1.15; letter-spacing: .06em;
  display: flex; flex-wrap: wrap; justify-content: center;
}
.hero-title span {
  display: inline-block;
  background: linear-gradient(115deg, var(--gold-lo) 0%, var(--gold) 30%, var(--gold-hi) 48%, var(--gold) 62%, var(--gold-lo) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 24px rgba(212,175,106,.25));
  opacity: 0; transform: translateY(24px) scale(.96);
  animation: inkIn 1.1s cubic-bezier(.2,.7,.2,1) forwards, shimmer 7s linear infinite;
  animation-delay: calc(.45s + var(--i) * .12s), calc(2s + var(--i) * .12s);
}
@keyframes inkIn {
  0% { opacity: 0; transform: translateY(24px) scale(.96); filter: blur(10px) drop-shadow(0 4px 24px rgba(212,175,106,0)); }
  100% { opacity: 1; transform: none; filter: blur(0) drop-shadow(0 4px 24px rgba(212,175,106,.25)); }
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }

.hero-motto { margin-top: 18px; font-family: var(--kai); font-size: clamp(17px, 2.6vw, 26px); letter-spacing: .3em; }
.hero-motto p { margin: 0; opacity: 0; animation: fadeUp 1.4s forwards; }
.hero-motto .m1 { color: var(--paper-dim); animation-delay: 1.6s; }
.hero-motto .m2 { margin-top: 10px; color: var(--paper); animation-delay: 2.3s; }
.hero-motto .m2::first-letter { color: var(--gold); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 工具区 */
.tool-state { align-self: flex-start; margin-top: 14px; padding: 2px 10px; font-size: 12px; letter-spacing: .08em; border-radius: 999px; border: 1px solid; }
.st-ok { color: #9fd8a8; border-color: rgba(159,216,168,.35); background: rgba(159,216,168,.06); }
.st-warn { color: #f3c96b; border-color: rgba(243,201,107,.4); background: rgba(243,201,107,.08); }
.st-bad { color: #f19a92; border-color: rgba(241,154,146,.4); background: rgba(179,38,30,.12); }
.st-off { color: var(--paper-dim); border-color: rgba(255,255,255,.12); }
.tool-locked.in { opacity: .75; }
.tool-locked .tool-go { letter-spacing: .1em; }

.tools { max-width: 1160px; margin: 0 auto; padding: 0 16px 80px; }
.sec-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 28px; }
.sec-head::before, .sec-head::after { content: ""; flex: 0 1 160px; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.sec-head::after { transform: scaleX(-1); }
.sec-head h2 { margin: 0; white-space: nowrap; font-family: var(--brush); font-weight: 400; font-size: clamp(24px, 3.4vw, 32px); letter-spacing: .3em; color: var(--paper); }
.sec-head p { margin: 0; white-space: nowrap; font-size: 11px; letter-spacing: .5em; color: var(--gold-lo); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.tool {
  position: relative; display: flex; flex-direction: column; min-height: 270px; padding: 26px 26px 22px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.01));
  backdrop-filter: blur(8px);
  transition: transform .45s cubic-bezier(.2,.7,.2,1), border-color .35s, box-shadow .45s;
  opacity: 0; transform: translateY(30px);
}
.tool.in { opacity: 1; transform: none; transition: opacity .9s, transform .9s cubic-bezier(.2,.7,.2,1), border-color .35s, box-shadow .45s; }
.tool::before { /* 跟随鼠标的光晕 */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(212,175,106,.16), transparent 45%);
}
.tool::after { /* 顶部鎏金线 */
  content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .5; transition: opacity .35s;
}
a.tool:hover, a.tool:focus-visible {
  transform: translateY(-6px); border-color: rgba(212,175,106,.6);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(212,175,106,.15), 0 0 40px -10px rgba(212,175,106,.35);
  outline: none;
}
a.tool:hover::before, a.tool:focus-visible::before, a.tool:hover::after { opacity: 1; }

.tool-no { position: absolute; top: 18px; right: 24px; font: 600 44px/1 Georgia, serif; color: rgba(212,175,106,.10); }
.tool-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: 50%; color: var(--gold);
  background: radial-gradient(circle, rgba(212,175,106,.12), transparent 70%);
}
.tool-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tool-en { font-size: 11px; letter-spacing: .35em; color: var(--gold-lo); }
.tool-name { margin-top: 6px; font-family: var(--kai); font-size: 26px; letter-spacing: .12em; color: var(--paper); }
.tool-desc { margin-top: 12px; font-size: 14px; color: var(--paper-dim); flex: 1; }
.tool-go {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; letter-spacing: .25em; color: var(--gold);
}
.tool-go i { font-style: normal; transition: transform .35s; }
a.tool:hover .tool-go i { transform: translateX(6px); }

.tool-off { cursor: default; border-style: dashed; border-color: rgba(255,255,255,.08); }
.tool-off .tool-icon, .tool-off .tool-go { color: var(--paper-dim); border-color: rgba(255,255,255,.08); background: none; }
.tool-off .tool-name { color: var(--paper-dim); }
.tool-off .tool-desc { color: #6f6a5f; }
.tool-off::after { display: none; }
.tool-off.in { opacity: .55; }

.p-foot {
  position: relative; z-index: 1; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px;
  padding: 28px 16px 36px; font-size: 13px; letter-spacing: .15em; color: #6f6a5f;
  border-top: 1px solid rgba(255,255,255,.05);
}
.p-foot .dot { color: var(--cinnabar); }
/* 作者 QQ：放在左上角 LOGO 旁边 */
.p-left { display: flex; align-items: center; gap: 18px; }
.p-qq {
  padding: 4px 12px; border-radius: 999px; font-size: 13px; letter-spacing: .08em;
  color: var(--gold) !important; border: 1px solid var(--line); background: rgba(212,175,106,.05);
}
.p-qq:hover { border-color: var(--gold); background: rgba(212,175,106,.12); }
.p-foot-qq, .lg-qq { color: var(--gold); border-bottom: 1px dashed rgba(212,175,106,.4); }
.p-foot-qq:hover, .lg-qq:hover { color: var(--gold-hi); }

@media (max-width: 560px) {
  .p-logo > span:last-child { display: none; }
  .hero-motto { letter-spacing: .15em; }
  .tool { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .tool { opacity: 1; transform: none; }
}
