/* 全站共用：色板、导航、按钮、页脚。页面样式另见 home.css / about.css / error.css。 */

:root {
  /* 底色与文字 */
  --bg: #05090e;
  --bg-2: #080d15;
  --bg-3: #0c131d;
  --panel: #0a1017;
  --panel-2: #0e1621;
  --ink: #dbe7f2;
  --ink-dim: #86a2b8;
  --ink-faint: #496378;
  --border: rgba(130, 170, 210, 0.14);
  --border-strong: rgba(130, 170, 210, 0.28);

  /* 品牌色 */
  --cyan: #4fb0ff;               /* 主色 */
  --cyan-bright: #7ac5ff;         /* 悬停 */
  --cyan-deep: #2b86d6;           /* 按下、渐变终点 */
  --cyan-soft: rgba(79, 176, 255, 0.14);
  --green: #39ff6a;
  --green-soft: rgba(57, 255, 106, 0.14);
  --orange: #ff8a1e;
  --magenta: #ff2bd6;
  --violet: #7c4dff;

  /* 强调、成功、警告、严重 */
  --accent: var(--cyan);
  --accent-2: var(--green);
  --warn: var(--orange);
  --crit: #ff3355;

  /* 字体栈 */
  --f-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* 版心、圆角、阴影 */
  --maxw: 1600px;
  --radius: 4px;
  --radius-sm: 3px;
  --shadow-glow: 0 0 0 1px var(--border-strong), 0 0 40px rgba(79, 176, 255, 0.07);
}

/* 重置 */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code, pre { font-family: var(--f-mono); }

/* 版心与文字工具类 */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 72px);
}
.text-dim { color: var(--ink-dim); }
.text-mono { font-family: var(--f-mono); color: var(--accent); }
.accent { color: var(--accent); }
.blink { animation: blink 1.2s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* 背景：网格、噪点、扫描线 */
.bg-layer {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(79,176,255,.08), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 100%, rgba(124,77,255,.08), transparent 60%),
    linear-gradient(180deg, #05090e 0%, #04080c 100%);
}
.bg-grid {
  position: absolute; inset: -1px;
  background-image:
    linear-gradient(to right, rgba(126, 160, 181, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(126, 160, 181, .06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}
.bg-scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.015) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
  opacity: .6;
}
.bg-noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='8'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.45'/></svg>");
  opacity: .12;
  mix-blend-mode: overlay;
}
.bg-glow {
  position: absolute;
  width: 640px; height: 640px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .35;
  animation: float 18s ease-in-out infinite alternate;
}
.glow-cyan { background: radial-gradient(circle, var(--cyan) 0%, transparent 60%); top: -160px; left: -160px; }
.glow-magenta { background: radial-gradient(circle, var(--violet) 0%, transparent 60%); bottom: -200px; right: -200px; animation-delay: -9s; }
@keyframes float {
  0% { transform: translate(0,0); }
  100% { transform: translate(60px, 40px); }
}

/* 导航 */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px) saturate(140%);
  background: linear-gradient(180deg, rgba(5,9,14,.85), rgba(5,9,14,.55));
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(24px, 4vw, 72px);
  gap: 24px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent);
}
.logo__mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.nav .logo__mark {
  position: relative;
  width: 36px;
  height: 36px;
}
.nav .logo__mark::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(79, 176, 255, 0.42) 0%,
    rgba(79, 176, 255, 0.18) 42%,
    transparent 68%
  );
  pointer-events: none;
}
.nav .logo__mark .logo__img {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  filter:
    drop-shadow(0 0 4px rgba(79, 176, 255, 0.9))
    drop-shadow(0 0 12px rgba(79, 176, 255, 0.55))
    drop-shadow(0 0 22px rgba(79, 176, 255, 0.28));
}
.logo__text {
  display: flex; align-items: center; line-height: 1;
  font-family: var(--f-display);
  font-weight: 800; letter-spacing: .08em;
  color: var(--ink);
}
.logo__word {
  display: block;
  width: 145px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
  transform: translateY(10%);
}
.foot__brand .logo { gap: 8px; }
.foot__brand .logo__word { width: 122px; height: 20px; }
.logo__text b { font-weight: 800; }
.logo__text em {
  font-style: normal; color: var(--accent);
}
.nav__links {
  display: flex; gap: 4px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 12px;
  color: var(--ink-dim);
}
.nav__links a {
  padding: 8px 12px;
  border: 1px solid transparent;
  transition: .25s;
  position: relative;
}
.nav__links a:hover {
  color: var(--ink);
  background: var(--cyan-soft);
  border-color: var(--border-strong);
  text-shadow: 0 0 12px var(--cyan);
}
.nav__cta { display: inline-flex; gap: 8px; align-items: center; }

/* 语言切换 */
.lang-toggle {
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  gap: 0;
  background: rgba(5, 9, 14, .55);
  border: 1px solid var(--border-strong);
  font-family: var(--f-mono);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: border-color .2s;
}
.lang-toggle:hover { border-color: var(--accent); }
.lang-toggle__btn {
  padding: 7px 11px;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 600;
  color: var(--ink-faint);
  transition: color .18s, background .18s, text-shadow .18s;
  line-height: 1;
}
.lang-toggle__btn:hover { color: var(--ink); }
.lang-toggle__btn.is-on {
  background: var(--cyan-soft);
  color: var(--accent);
  text-shadow: 0 0 8px rgba(79, 176, 255, .5);
}
.lang-toggle--mobile {
  margin-left: auto;
  margin-right: 8px;
}
@media (max-width: 720px) {
  .lang-toggle__btn { padding: 6px 9px; font-size: 10px; }
  /* 窄屏用移动菜单里的切换，顶栏这份藏掉 */
  .nav__cta .lang-toggle { display: none; }
}

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  font-family: var(--f-mono); font-size: 12px;
  font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  position: relative;
  transition: .2s;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn--lg { padding: 14px 22px; font-size: 13px; }
.btn--ghost {
  color: var(--ink);
  background: transparent;
}
.btn--ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--cyan-soft);
}
.btn--primary {
  color: #001015;
  background: linear-gradient(180deg, var(--cyan-bright), var(--cyan));
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(79,176,255,.3), 0 0 28px rgba(79,176,255,.35);
}
.btn--primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); }

/* 通用区块标题 */
.section { padding: 112px 0; position: relative; }
.section--alt { background:
  linear-gradient(180deg, transparent, rgba(14,22,33,.35), transparent);
}
.section--dark {
  background: radial-gradient(ellipse at top, rgba(79,176,255,.06), transparent 60%), #06090e;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section--tight { padding: 60px 0; }

.section__head { max-width: none; margin: 0 0 64px; }
.section__head--min { margin-bottom: 32px; }
.section__idx {
  font-family: var(--f-mono);
  color: var(--accent); font-size: 12px; letter-spacing: .2em;
  margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 10px;
}
.section__idx::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
}
.section__title {
  font-family: var(--f-display);
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 800;
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 16px; text-transform: uppercase;
}
.section__title--sm { font-size: clamp(22px, 2.4vw, 28px); }
.section__desc {
  color: var(--ink-dim); font-size: 17px; margin: 0; max-width: 68ch; line-height: 1.7;
}

/* 联系区标题。首页表单和关于页底部都用这组类。 */
.cta__inner { position: relative; text-align: center; max-width: 1080px; margin: 0 auto; }
.cta__title {
  font-family: var(--f-display);
  font-size: clamp(42px, 6vw, 84px);
  font-weight: 800; line-height: .95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 24px;
}
.cta__title .accent { display: block; color: var(--accent); }
.cta__sub { color: var(--ink-dim); font-size: 16px; margin: 0 0 40px; }
.cta__title--cn { font-size: clamp(40px, 4.5vw, 64px); }

/* 页脚 */
.foot {
  background: #020508;
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
}
.foot__inner {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.foot__brand .logo { margin-bottom: 14px; }
.foot__brand p { color: var(--ink-dim); font-size: 13px; max-width: 280px; }
.foot__signal { margin-top: 14px; font-family: var(--f-mono); font-size: 11px; color: var(--accent-2); letter-spacing: .1em; }
.foot__cols {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.foot__tagline {
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.65;
  max-width: 300px;
  margin-top: 4px;
}
.foot__cols > div { display: flex; flex-direction: column; gap: 10px; }
.foot__cols code {
  font-size: 10px; color: var(--accent); letter-spacing: .25em;
  margin-bottom: 6px;
}
.foot__cols a { font-size: 13px; color: var(--ink-dim); }
.foot__cols a:hover { color: var(--ink); }

.foot__bottom {
  display: flex; justify-content: space-between;
  padding-top: 20px;
  font-family: var(--f-mono); font-size: 10px;
  color: var(--ink-faint); letter-spacing: .18em;
}

/* 滚入视口后显现 */
.reveal { opacity: 0; transform: translateY(20px); transition: .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* 窄屏：导航和页脚 */
@media (max-width: 1080px) {
  .foot__inner { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav__inner { padding: 12px clamp(24px, 4vw, 72px); flex-wrap: wrap; gap: 12px; }
  .nav__links { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .section { padding: 72px 0; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
}

/* 系统要求减少动效时关掉动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}


/* 顶部滚动进度 */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(to right, var(--accent), var(--accent-2), var(--orange));
  box-shadow: 0 0 12px var(--accent);
  z-index: 60;
  transition: width .1s linear;
}

/* 回到顶部 */
.back-top {
  position: fixed; bottom: 24px; right: 24px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: rgba(5,9,14,.9);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em;
  z-index: 40;
  opacity: 0; pointer-events: none;
  transform: translateY(12px);
  transition: .3s;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.back-top.is-on { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top:hover { color: #000; background: var(--accent); box-shadow: 0 0 20px var(--cyan); }

@media (max-width: 720px) {
  .back-top { bottom: 16px; right: 16px; }
}

/* 短暂提示 */
.toast {
  position: fixed; left: 50%; top: 80px;
  transform: translate(-50%, -20px);
  padding: 12px 20px;
  background: rgba(5,9,14,.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em;
  z-index: 150;
  opacity: 0; pointer-events: none;
  transition: .35s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 0 30px rgba(79,176,255,.3);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--err { border-color: var(--crit); color: var(--crit); box-shadow: 0 0 30px rgba(255,51,85,.3); }
.toast--ok  { border-color: var(--accent-2); color: var(--accent-2); box-shadow: 0 0 30px rgba(57,255,106,.3); }

/* 移动端菜单 */
.nav__burger {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border-strong);
  padding: 8px;
  flex-direction: column;
  justify-content: space-between;
}
.nav__burger i {
  display: block; height: 2px; background: var(--ink);
  transition: .3s;
}
.nav__burger.is-open i:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--accent); }
.nav__burger.is-open i:nth-child(2) { opacity: 0; }
.nav__burger.is-open i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--accent); }

.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(360px, 90vw);
  background: #02060b;
  border-left: 1px solid var(--accent);
  box-shadow: -40px 0 80px rgba(0,0,0,.6), 0 0 0 1px rgba(79,176,255,.12);
  padding: 20px;
  z-index: 70;
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--f-mono);
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu__head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 16px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 11px; letter-spacing: .2em; color: var(--accent);
}
.mobile-menu__close {
  color: var(--ink); font-size: 16px; padding: 4px 10px;
  border: 1px solid var(--border);
}
.mobile-menu a {
  display: grid; grid-template-columns: 32px 1fr 20px;
  align-items: center;
  padding: 14px 12px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px dashed var(--border);
  transition: .2s;
}
.mobile-menu a:hover,
.mobile-menu a:focus {
  background: var(--cyan-soft);
  color: var(--accent);
  padding-left: 18px;
}
.mobile-menu a code { color: var(--accent); font-size: 11px; letter-spacing: .15em; }
.mobile-menu a em { font-style: normal; color: var(--ink-faint); text-align: right; }
.mobile-menu__cta {
  margin-top: auto !important;
  justify-content: center;
  background: var(--accent);
  color: #000 !important;
  text-align: center;
  border: 0 !important;
  padding: 16px !important;
  font-weight: 700;
  letter-spacing: .2em;
  display: block !important;
}

@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
}

/* 检测面板随鼠标倾斜 */
.hero__panel .panel {
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}

/* 彩蛋：扫描模式 */
html.scanner-mode body { filter: hue-rotate(120deg) saturate(1.3); }
html.scanner-mode .bg-scanlines { opacity: 1; }
html.scanner-mode::after {
  content: "";
  position: fixed; inset: 0; z-index: 99;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 4px, rgba(79,176,255,.04) 4px 5px);
}

/* 当前章节的导航高亮（由脚本切换） */
.nav__links a.is-active {
  color: var(--accent);
  background: var(--cyan-soft);
  border-color: var(--border-strong);
}

/* 键盘快捷键提示里的按键样式 */
.kb-hint {
  position: fixed; right: 20px; bottom: 80px;
  z-index: 30;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .2em; color: var(--ink-faint);
  opacity: 0; transition: opacity .3s;
}
.kb-hint.is-on { opacity: 1; }
.kb-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--accent);
  margin: 0 3px;
  font-family: inherit;
}

/* Logo 图片 */
.logo__img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.foot__brand .logo__img { width: 22px; height: 22px; }

/* 页脚备案 */
.foot__filing {
  padding: 24px 0 32px;
  text-align: center;
  border-top: 1px solid var(--border);
}
.foot__filing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.foot__copyright {
  margin: 0;
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.6;
}
.foot__records {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 12px;
  line-height: 1.6;
}
.foot__records a {
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.foot__records a:hover {
  color: var(--accent);
}
.foot__records-sep {
  margin: 0 12px;
  color: var(--ink-faint);
  user-select: none;
}
.foot__psb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.foot__psb img {
  display: block;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .foot__records {
    flex-direction: column;
    gap: 6px;
  }
  .foot__records-sep {
    display: none;
  }
}

/* 指标条。首页简介和关于页首屏共用。 */
.about-stat {
  background: none;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: 24px 20px;
  text-align: left;
}
.about-stat:last-child { border-right: 0; }
.about-stat b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(22px, 2.2vw, 34px);
  color: var(--accent);
  margin-bottom: 6px;
}
.about-stat span {
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* 地点卡片。首页简介和关于页共用。 */
.loc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}
.loc-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
  text-align: center;
}
.loc-item b {
  display: block;
  color: var(--accent);
  font-family: var(--f-display);
  font-size: 16px;
  margin-bottom: 10px;
}
.loc-item span {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 960px) {
  .about-stat:nth-child(2) { border-right: 0; }
  .about-stat:nth-child(1),
  .about-stat:nth-child(2) { border-bottom: 1px solid var(--border); }
  .loc-grid { grid-template-columns: 1fr; }
}
