/* PlayMesh 官网样式。单一深色主题，与桌面客户端视觉一致；不依赖任何外部字体或脚本。 */
:root {
  --ground: #080d1b;
  --panel: #0f1729;
  --panel-2: #131d33;
  --ink: #e8eefc;
  --muted: #8b97b3;
  --faint: #5d6a86;
  --line: rgba(148, 163, 184, 0.16);
  --accent: #5272ff;
  --accent-deep: #2743c7;
  --accent-soft: rgba(82, 114, 255, 0.16);
  --teal: #12cdad;
  --warn: #f5c97a;
  --code-bg: #060a14;
  --radius: 14px;
  --max: 1080px;
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(68, 102, 255, 0.22), transparent 38rem),
    radial-gradient(circle at 90% 90%, rgba(18, 205, 173, 0.10), transparent 30rem),
    var(--ground);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
code, pre, .mono { font-family: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* 顶栏：品牌左，菜单右，等距对齐 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(8, 13, 27, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; font-size: 18px; letter-spacing: 0.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand span { color: #91a5ff; font-weight: 650; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); font-size: 14.5px; padding: 8px 14px; border-radius: 10px; line-height: 1; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: rgba(148, 163, 184, 0.10); text-decoration: none; }
.nav .btn { margin-left: 10px; padding: 9px 16px; font-size: 14px; color: #fff; }
.nav .btn:hover { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); box-shadow: 0 12px 30px rgba(58, 85, 223, 0.35); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: rgba(15, 23, 42, 0.7); }
.btn-ghost:hover { border-color: rgba(148, 163, 184, 0.4); }
.btn-large { padding: 16px 32px; font-size: 17px; border-radius: 14px; }

/* 首屏：居中单栏 */
.hero { padding: 88px 0 64px; text-align: center; }
.hero .inner { max-width: 780px; margin: 0 auto; display: grid; justify-items: center; gap: 18px; }
.eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); margin: 0; font-weight: 600; }
.hero h1 { font-size: clamp(36px, 5.4vw, 58px); line-height: 1.12; margin: 0; font-weight: 750; letter-spacing: -0.01em; }
.hero h1 em { font-style: normal; color: #91a5ff; }
.hero .lede { font-size: 17.5px; color: var(--muted); margin: 0; max-width: 40em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.hero-facts { display: flex; gap: 0; margin: 22px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(15, 23, 42, 0.6); }
.hero-facts li { padding: 12px 22px; font-size: 13.5px; color: var(--muted); border-right: 1px solid var(--line); }
.hero-facts li:last-child { border-right: 0; }
.hero-facts strong { display: block; color: var(--ink); font-size: 15px; font-weight: 650; }

/* 通用分区 */
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 46em; margin: 0 auto 32px; text-align: center; }
.section-head h2 { font-size: 30px; margin: 0 0 10px; letter-spacing: -0.01em; }
.section-head p { margin: 0; color: var(--muted); }

/* 卡片网格：三列等高 */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card .n { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: #91a5ff; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.card.alt { background: var(--panel-2); }

/* 自建中继横幅 */
.relay-banner { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: 28px 30px; border-radius: 18px; background: linear-gradient(120deg, rgba(18, 205, 173, 0.12), rgba(82, 114, 255, 0.12)); border: 1px solid var(--line); }
.relay-banner h2 { margin: 0 0 6px; font-size: 24px; }
.relay-banner p { margin: 0; color: var(--muted); }
.relay-banner pre { margin: 14px 0 0; }

/* 下载 */
.download-single { display: grid; justify-items: center; gap: 10px; text-align: center; }
.download-single .meta { color: var(--faint); font-size: 13.5px; margin: 0; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }

/* 代码块与文档页 */
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; color: #dbe4ff; margin: 12px 0; }
pre code { font-family: inherit; }
p code, li code, td code { background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; font-size: 0.92em; }
.doc { max-width: 780px; padding: 56px 0 80px; }
.breadcrumb { font-size: 13px; color: var(--faint); margin: 0 0 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin: 0 8px; }
.doc h1 { font-size: 36px; margin: 0 0 10px; letter-spacing: -0.01em; }
.doc .lede { color: var(--muted); font-size: 17px; margin: 0 0 24px; }
.doc h2 { font-size: 22px; margin: 44px 0 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc h2 .n { color: #91a5ff; margin-right: 8px; font-variant-numeric: tabular-nums; }
.doc h3 { font-size: 17px; margin: 22px 0 8px; }
.doc p, .doc li { color: #c7d0e6; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 10px 0 18px; }
.doc th, .doc td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 500; font-size: 13px; }
.table-wrap { overflow-x: auto; }
.callout { border-left: 3px solid var(--teal); background: rgba(18, 205, 173, 0.08); padding: 12px 14px; border-radius: 0 10px 10px 0; margin: 12px 0; font-size: 14.5px; }
.callout.warn { border-left-color: var(--warn); background: rgba(245, 201, 122, 0.08); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.toc a { font-size: 13px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.toc a:hover { color: var(--ink); text-decoration: none; border-color: rgba(148, 163, 184, 0.4); }

/* 页脚：三栏 */
footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--faint); font-size: 13.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { margin: 0 0 10px; color: var(--muted); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom a { color: var(--muted); }

@media (max-width: 860px) {
  .topbar .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .nav { width: 100%; justify-content: flex-start; overflow-x: auto; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .hero { padding-top: 56px; }
  .hero-facts { flex-direction: column; }
  .hero-facts li { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-facts li:last-child { border-bottom: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .relay-banner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
