:root {
  --bg: #0c1210;
  --bg-elev: #131b18;
  --ink: #e8f0ea;
  --muted: #8fa396;
  --line: rgba(232, 240, 234, 0.1);
  --accent: #3ecf8e;
  --accent-2: #c8f56a;
  --warn: #f0b429;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --display: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(62, 207, 142, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(200, 245, 106, 0.08), transparent 50%),
    linear-gradient(180deg, #0a100e 0%, var(--bg) 40%, #0b100f 100%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(232, 240, 234, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 240, 234, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, #000 20%, transparent 75%);
  opacity: 0.7;
}

.bg-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  right: -80px;
  top: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 207, 142, 0.18), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  animation: drift 12s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(40px) scale(1.08);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(12, 18, 16, 0.88);
  border-bottom: 1px solid var(--line);
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.nav-strip {
  border-top: 1px solid rgba(232, 240, 234, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.nav-wrap {
  position: relative;
}

.nav-wrap::before,
.nav-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  z-index: 2;
}

.nav-wrap::before {
  left: 0;
  background: linear-gradient(90deg, rgba(12, 18, 16, 0.95), transparent);
}

.nav-wrap::after {
  right: 0;
  background: linear-gradient(270deg, rgba(12, 18, 16, 0.95), transparent);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 10, 8, 0.62);
  backdrop-filter: blur(3px);
  padding: 1rem;
}

.nav-drawer-panel {
  margin: 0 auto;
  max-width: 560px;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

.nav-drawer-close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}

.nav-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.85rem;
}

.nav-drawer-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-drawer-item:hover,
.nav-drawer-item.active {
  border-color: rgba(62, 207, 142, 0.4);
  background: rgba(62, 207, 142, 0.08);
}

.nav-drawer-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-drawer-desc {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
}

body.nav-open {
  overflow: hidden;
}

.nav-external {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.1);
  color: var(--accent-2);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-external:hover {
  background: rgba(62, 207, 142, 0.16);
  border-color: rgba(62, 207, 142, 0.55);
  transform: translateY(-1px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--accent), #1f8f5f);
  color: #04140c;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.brand-text {
  font-weight: 650;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.55rem 0;
  scroll-snap-type: x proximity;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  flex: 0 0 auto;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  border: 1px solid transparent;
  scroll-snap-align: start;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(232, 240, 234, 0.06);
}

.nav a.active {
  color: #dfffe8;
  background: rgba(62, 207, 142, 0.14);
  border-color: rgba(62, 207, 142, 0.35);
}

.search input {
  width: min(240px, 34vw);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  outline: none;
  font: inherit;
}

.search input:focus {
  border-color: rgba(62, 207, 142, 0.55);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.12);
}

.hero {
  padding: 4.5rem 0 2.5rem;
  animation: rise 0.7s ease both;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-2);
  font-family: var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 10ch;
}

.lede {
  margin: 1rem 0 0;
  font-size: 1.15rem;
  color: #c6d5cb;
}

.notice {
  margin: 1.1rem 0 0;
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.7rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #2aa86f);
  color: #04140c;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: rgba(62, 207, 142, 0.45);
}

.catalog {
  padding: 1rem 0 4rem;
}

.catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.catalog-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

#result-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.category {
  margin-bottom: 2.2rem;
  scroll-margin-top: 8.5rem;
  animation: rise 0.55s ease both;
}

.category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.category-head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.category-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
}

.item {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.item:hover {
  border-color: rgba(62, 207, 142, 0.35);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(62, 207, 142, 0.08), rgba(255, 255, 255, 0.02));
}

.item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.item h4 {
  margin: 0;
  font-size: 1.02rem;
}

.item .desc {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  align-content: flex-start;
}

.tag {
  font-size: 0.72rem;
  color: #b7d9c4;
  border: 1px solid rgba(62, 207, 142, 0.28);
  background: rgba(62, 207, 142, 0.08);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  color: #a8bdb0;
  font-size: 0.8rem;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.item-actions .btn {
  flex: 1;
  min-height: 2.35rem;
  font-size: 0.88rem;
}

.btn-soft {
  background: rgba(232, 240, 234, 0.06);
  color: var(--ink);
  border-color: var(--line);
}

.empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.footer {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer .muted {
  opacity: 0.8;
}

.footer code {
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
}

.dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(520px, calc(100vw - 2rem));
}

.dialog::backdrop {
  background: rgba(4, 10, 8, 0.72);
  backdrop-filter: blur(4px);
}

.dialog-panel {
  position: relative;
  margin: 0;
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.dialog-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}

.dialog h3 {
  margin: 0 2rem 0.5rem 0;
}

.dialog p {
  margin: 0.4rem 0;
  color: var(--muted);
  line-height: 1.6;
}

.link-box {
  margin-top: 0.9rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: #cfe8d8;
}

.dialog-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 1rem;
}

.item-online {
  border-color: rgba(200, 245, 106, 0.22);
  background: linear-gradient(180deg, rgba(200, 245, 106, 0.06), rgba(255, 255, 255, 0.02));
}

.item-online:hover {
  border-color: rgba(200, 245, 106, 0.42);
  background: linear-gradient(180deg, rgba(200, 245, 106, 0.1), rgba(255, 255, 255, 0.02));
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-strip {
    display: none;
  }

  .nav-external {
    font-size: 0.78rem;
    padding: 0 0.65rem;
  }

  .search input {
    width: min(140px, 32vw);
  }

  .hero {
    padding-top: 3rem;
  }
}

@media (max-width: 520px) {
  .nav-external span-long {
    display: none;
  }

  .nav-drawer-grid {
    grid-template-columns: 1fr;
  }
}
