/* =========================================================
   NBFish documentation pages
   install / privacy / 404
   ========================================================= */

:root {
  --ink: #05070d;
  --panel: rgba(12, 19, 34, 0.72);
  --panel-2: rgba(18, 28, 48, 0.52);
  --text: #edf3ff;
  --muted: #96a4bb;
  --muted-2: #6d7b91;
  --blue: #6d8bff;
  --mint: #7cf0d4;
  --warm: #ffb37a;
  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.065);
  --font: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 82% 4%, rgba(109, 139, 255, 0.18), transparent 34%),
    radial-gradient(circle at 8% 84%, rgba(124, 240, 212, 0.08), transparent 36%),
    var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 30;
  padding: 9px 14px;
  border-radius: 999px;
  color: #061016;
  background: var(--mint);
  font-size: 12px;
  font-weight: 700;
  transform: translate(-50%, -160%);
  transition: transform 0.2s ease;
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

.doc-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 9px 12px 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 9, 17, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px) saturate(150%);
}

.doc-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: -0.02em;
}
.doc-brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 550;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.doc-brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(124, 240, 212, 0.24);
  border-radius: 50%;
  color: var(--mint);
  background: rgba(124, 240, 212, 0.07);
}
.doc-brand__mark svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doc-nav__links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 11px;
}
.doc-nav__links a:hover { color: var(--text); }
.doc-nav__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: #071018;
  background: #eef4ff;
  font-size: 10px;
  font-weight: 700;
}
.doc-nav__back svg { width: 14px; height: 14px; }

.doc-wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 60px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 92px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(8, 14, 25, 0.42);
  backdrop-filter: blur(16px);
}
.doc-toc strong {
  display: block;
  margin-bottom: 10px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.doc-toc a {
  display: block;
  padding: 7px 0 7px 11px;
  border-left: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}
.doc-toc a:hover { color: var(--text); border-left-color: var(--mint); }

.doc-main { min-width: 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}
.eyebrow i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 14px var(--mint);
}

.doc-title {
  margin: 14px 0 14px;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 760;
  line-height: 0.96;
  letter-spacing: -0.055em;
}
.doc-title em {
  color: var(--mint);
  font-style: normal;
  background: linear-gradient(120deg, var(--blue), var(--mint) 48%, #d6fff6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.doc-lede {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 30px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 9px;
}
.pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }
.pill--warm i { background: var(--warm); }
.pill--blue i { background: var(--blue); }

.doc-section {
  margin-top: 30px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.54), rgba(8, 14, 25, 0.5));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(20px) saturate(140%);
}
.doc-section + .doc-section { margin-top: 14px; }
.doc-section h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.03em;
}
.doc-section h3 {
  margin: 20px 0 8px;
  font-size: 13px;
  font-weight: 650;
}
.doc-section p,
.doc-section li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}
.doc-section p { margin: 8px 0; }
.doc-section strong { color: var(--text); font-weight: 630; }

.steps {
  display: grid;
  gap: 0;
  margin: 14px 0 4px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 14px 0 14px 40px;
  border-top: 1px solid var(--line-soft);
  counter-increment: step;
}
.steps li:first-child { border-top: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}
.steps b { display: block; margin-bottom: 3px; color: var(--text); font-size: 13px; }
.steps small { display: block; color: var(--muted-2); font-size: 10.8px; line-height: 1.7; }

.callout {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 179, 122, 0.22);
  border-radius: 12px;
  color: #f4d9c4;
  background: rgba(255, 179, 122, 0.055);
  font-size: 11px;
  line-height: 1.75;
}
.callout--mint {
  border-color: rgba(124, 240, 212, 0.2);
  color: #c9f8ed;
  background: rgba(124, 240, 212, 0.05);
}

.code {
  margin: 10px 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  color: #d9e8ff;
  background: rgba(2, 6, 12, 0.62);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-all;
}
.inline-code {
  padding: 2px 5px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  color: #d9e8ff;
  background: rgba(2, 6, 12, 0.42);
  font-family: var(--mono);
  font-size: 0.92em;
  white-space: normal;
  word-break: break-all;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-size: 10.5px;
  font-weight: 650;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(124, 240, 212, 0.4); transform: translateY(-1px); }
.btn svg { width: 15px; height: 15px; }
.btn--primary {
  border-color: transparent;
  color: #061016;
  background: linear-gradient(120deg, #e9f1ff, #a9fff0);
}
.btn--primary:hover { background: linear-gradient(120deg, #fff, #c8fff5); }

.faq { margin: 0; }
.faq details {
  border-top: 1px solid var(--line-soft);
  padding: 11px 0;
}
.faq details:first-child { border-top: 0; }
.faq summary {
  color: var(--text);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 7px 0 0; }

.doc-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 38px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 9px;
}
.doc-footer a { color: var(--muted); }
.doc-footer a:hover { color: var(--text); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  max-width: min(88vw, 560px);
  padding: 10px 14px;
  border: 1px solid rgba(124, 240, 212, 0.2);
  border-radius: 10px;
  color: #dffcf5;
  background: rgba(8, 16, 27, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  font-size: 10px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(16px);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.not-found {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 32px;
  text-align: center;
}
.not-found__code {
  color: rgba(124, 240, 212, 0.2);
  font-size: clamp(100px, 24vw, 260px);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.08em;
}
.not-found h1 { margin: 22px 0 8px; font-size: 26px; letter-spacing: -0.04em; }
.not-found p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.not-found__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }

@media (max-width: 820px) {
  .doc-layout { grid-template-columns: 1fr; gap: 18px; }
  .doc-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 12px 14px;
  }
  .doc-toc strong { width: 100%; margin-bottom: 2px; }
  .doc-toc a { border-left: 0; padding: 4px 0; }
  .doc-nav__links { display: none; }
  .doc-wrap { padding-top: 38px; }
  .doc-section { padding: 19px; }
}

@media (max-width: 520px) {
  .doc-nav { width: calc(100% - 20px); padding-left: 10px; }
  .doc-wrap, .doc-footer { width: calc(100% - 24px); }
  .doc-nav__back { min-height: 32px; padding: 0 10px; font-size: 9px; }
  .doc-title { font-size: 42px; }
  .doc-lede { font-size: 12px; }
  .doc-section { padding: 16px; border-radius: 15px; }
  .doc-footer { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .skip-link { transition: none; }
}
