/* ==========================================================
   HYPERNEXT (hypernext.cn)
   neon.css — 暗色霓虹 / 雷达 / 网格
   ========================================================== */

:root {
  --bg: #05060a;
  --panel: rgba(14, 18, 30, .66);
  --line: rgba(120, 170, 255, .14);
  --txt: #e9f0ff;
  --dim: #8492ae;
  --lime: #b6ff3d;
  --cyan: #22d3ee;
  --magenta: #ff4d9d;
  --amber: #ffb020;
  --font: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 620px at 82% -6%, rgba(34, 211, 238, .10), transparent 62%),
    radial-gradient(900px 600px at 6% 12%, rgba(182, 255, 61, .07), transparent 60%),
    linear-gradient(rgba(120, 170, 255, .022) 1px, transparent 1px) 0 0 / 100% 46px,
    linear-gradient(90deg, rgba(120, 170, 255, .022) 1px, transparent 1px) 0 0 / 46px 100%;
}

#radar {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
}

.page { position: relative; z-index: 1; }
.wrap { width: min(var(--maxw), calc(100% - 48px)); margin: 0 auto; }

/* ---------------- 导航 ---------------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(5, 6, 10, .78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 66px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--txt);
  font-family: var(--mono);
  font-weight: 700; letter-spacing: .2em; font-size: 14px;
}
.brand i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px var(--lime);
  animation: blip 2.2s infinite;
}
@keyframes blip { 50% { opacity: .3; box-shadow: 0 0 4px var(--lime); } }

.nav-links { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.nav-links a {
  color: var(--dim); text-decoration: none; font-size: 14px;
  padding: 7px 13px; border-radius: 6px; transition: all .25s;
}
.nav-links a:hover { color: var(--txt); background: rgba(120, 170, 255, .08); }
.nav-links a[aria-current="page"] { color: var(--lime); }

/* ---------------- 排版 ---------------- */
section { padding: 78px 0; }
.kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: .34em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 14px;
}
h1, h2, h3 { margin: 0 0 16px; line-height: 1.24; letter-spacing: -.01em; }
h1 { font-size: clamp(38px, 6.4vw, 78px); font-weight: 900; }
h2 { font-size: clamp(25px, 3.4vw, 38px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { color: var(--dim); margin: 0 0 15px; }
.lede { font-size: clamp(15px, 1.5vw, 18px); color: var(--dim); max-width: 62ch; }

.grad {
  background: linear-gradient(100deg, var(--lime), var(--cyan) 42%, var(--magenta));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------- Hero ---------------- */
.hero { min-height: calc(100vh - 66px); display: grid; align-items: center; padding: 46px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 52px; align-items: center; }
.hero-sub { font-size: clamp(15px, 1.55vw, 18px); color: var(--dim); max-width: 54ch; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 8px;
  font-size: 15px; font-weight: 700; text-decoration: none;
  background: var(--lime); color: #08120a;
  border: 1px solid var(--lime);
  box-shadow: 0 10px 30px rgba(182, 255, 61, .16);
  transition: transform .3s, box-shadow .3s;
  cursor: pointer; font-family: var(--font);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(182, 255, 61, .26); }
.btn.ghost { background: transparent; color: var(--txt); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* 终端块 */
.terminal {
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(8, 11, 20, .85);
  font-family: var(--mono); font-size: 13px;
  overflow: hidden;
}
.terminal header {
  display: flex; gap: 7px; align-items: center;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: rgba(20, 26, 42, .6);
}
.terminal header span { width: 10px; height: 10px; border-radius: 50%; background: #2b3450; }
.terminal header span:nth-child(1) { background: #ff5f57; }
.terminal header span:nth-child(2) { background: #febc2e; }
.terminal header span:nth-child(3) { background: #28c840; }
.terminal header b { margin-left: 8px; font-weight: 500; color: var(--dim); font-size: 12px; }
.terminal pre { margin: 0; padding: 18px; color: #a9f5c0; white-space: pre-wrap; line-height: 1.85; }
.terminal .k { color: var(--cyan); }
.terminal .s { color: var(--amber); }
.terminal .c { color: #5b6a88; }

/* ---------------- 数字 ---------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat { background: rgba(8, 11, 20, .82); padding: 24px 18px; text-align: center; }
.stat b { display: block; font-family: var(--mono); font-size: clamp(22px, 3vw, 32px); color: var(--lime); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--dim); letter-spacing: .16em; }

/* ---------------- 工具卡 ---------------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.tool {
  position: relative;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.9,.3,1), border-color .3s, box-shadow .3s;
}
.tool::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent, var(--lime));
  opacity: .7;
}
.tool:hover { transform: translateY(-4px); border-color: rgba(182, 255, 61, .35); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
.tool-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tool-ico {
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  color: var(--accent, var(--lime));
  background: color-mix(in srgb, var(--accent, var(--lime)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--lime)) 30%, transparent);
}
.tool-name { font-weight: 700; font-size: 15px; }
.tool-cat { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .1em; }
.tool p { font-size: 14px; margin: 0 0 14px; min-height: 44px; }
.tool-meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--dim); border-top: 1px solid var(--line); padding-top: 12px; }
.bar { display: inline-flex; gap: 2px; }
.bar i { width: 9px; height: 4px; border-radius: 1px; background: #232b42; }
.bar i.on { background: var(--lime); }

/* ---------------- 筛选 ---------------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip {
  padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent;
  color: var(--dim); font-size: 13px; cursor: pointer;
  font-family: var(--mono); letter-spacing: .06em;
  transition: all .22s;
}
.chip:hover { color: var(--txt); border-color: rgba(34, 211, 238, .45); }
.chip.active { background: var(--lime); color: #08120a; border-color: var(--lime); font-weight: 700; }

.search {
  flex: 1 1 220px; min-width: 180px;
  background: rgba(8, 11, 20, .8);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 15px; color: var(--txt);
  font-size: 14px; font-family: var(--mono); outline: none;
}
.search:focus { border-color: rgba(182, 255, 61, .5); }

/* ---------------- 笔记 ---------------- */
.notes { display: grid; gap: 14px; }
.note {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); padding: 4px 24px;
}
.note summary {
  list-style: none; cursor: pointer; padding: 18px 0;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.note summary::-webkit-details-marker { display: none; }
.note summary .n { font-family: var(--mono); font-size: 11px; color: var(--cyan); letter-spacing: .2em; }
.note summary h3 { margin: 0; font-size: 17px; }
.note summary .more { margin-left: auto; color: var(--lime); font-family: var(--mono); font-size: 18px; }
.note[open] summary .more { transform: rotate(45deg); }
.note .body { border-top: 1px solid var(--line); padding: 18px 0 20px; }
.note .body p:last-child { margin-bottom: 0; }

/* ---------------- 页脚 ---------------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 58px; margin-top: 20px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; font-size: 12px; color: var(--dim); font-family: var(--mono); }
.footer a { color: var(--dim); text-decoration: none; }
.footer a:hover { color: var(--lime); }

/* ---------------- 入场 ---------------- */
.up {
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.2,.9,.3,1), transform .8s cubic-bezier(.2,.9,.3,1);
  transition-delay: var(--d, 0ms);
}
.up.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  section { padding: 56px 0; }
}
