/* ==========================================================================
 * ak-about.css — freegg.top「关于本站」
 * 排版与设计令牌与首页（demo.html）完全同步：毛玻璃顶栏、同一套字体与
 * 间距体系；右侧为开源复刻引擎驱动的可交互粒子点阵徽标。
 * ========================================================================== */

:root {
  --bg: #111113;
  --text: #f5f5f4;
  --muted: #8b8b93;
  --line: rgba(255, 255, 255, 0.07);
  --line-soft: rgba(255, 255, 255, 0.05);
  --nav-bg: rgba(17, 17, 19, 0.42);
  /* 本页顶栏层级保持原值 20：揭幕层 .ak-overlay 是 z-50，必须继续盖住顶栏 */
  --nav-z: 20;
  --accent: #a78bfa;
  --accent-soft: rgba(167, 139, 250, 0.5);
  --sans: Inter, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Code", Consolas, "JetBrains Mono", "Courier New", monospace;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --pad-x: 44px;
}

html[data-theme="light"] {
  --bg: #f4f4f6;
  --text: #1a1a1e;
  --muted: #6b6b74;
  --line: rgba(0, 0, 0, 0.08);
  --line-soft: rgba(0, 0, 0, 0.05);
  --nav-bg: rgba(244, 244, 246, 0.55);
  --accent: #7c58f0;
  --accent-soft: rgba(124, 88, 240, 0.45);
}

* { box-sizing: border-box; }

html { scrollbar-color: #3a3a44 var(--bg); }
html[data-theme="light"] { scrollbar-color: #c9c9d2 var(--bg); }

body.ak-body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;              /* 单屏展示：无页面滚动，滚轮用于 3D 缩放 */
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
  /* 整页即 3D 场景：按住左键拖拽旋转，禁用原生文字选择 */
  user-select: none;
  -webkit-user-select: none;
}

/* 入场动画期间锁定滚动 */
body.ak-body:not(.is-revealed) { overflow: hidden; }

a { color: inherit; }

::selection { background: var(--accent); color: #111113; }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* ---------- 粒子画布（开源复刻引擎，纱罩拖尾与页面底色无缝） ---------- */

.fp-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

html[data-theme="light"] .fp-canvas { mix-blend-mode: normal; }

/* 方舟式细网格底纹（位于粒子画布之上，纱罩残迹不影响其显示） */
body.ak-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 60% 45%, #000 26%, transparent 82%);
  mask-image: radial-gradient(ellipse 90% 80% at 60% 45%, #000 26%, transparent 82%);
}

html[data-theme="light"] body.ak-body::before {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
}

/* 粒子蛋背后的紫色环境晕影（z-0 落在粒子画布 z-1 之下、网格 z-2 之下） */
body.ak-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 40% 46% at 68% 46%, rgba(167, 139, 250, 0.12), transparent 70%);
}

html[data-theme="light"] body.ak-body::after {
  background: radial-gradient(ellipse 40% 46% at 68% 46%, rgba(124, 88, 240, 0.10), transparent 70%);
}

/* ---------- 顶栏 ----------
   外观（固定、毛玻璃、下边线、logo、链接、蛋形主题按钮）已抽到共享 nav.css。
   这里只留本页特有的：揭幕层的淡入（见下方 .ak-nav, .ak-foot）与移动端高度。
   ---------- */

/* ---------- 主体 ---------- */

.ak-main {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 84px var(--pad-x) 56px;
}

.ak-wrap {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.ak-col-text { max-width: 620px; }


.eyebrow {
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
}

.ak-title {
  margin: 0 0 12px;
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.05;
  color: var(--text);
}

.ak-sub {
  margin: 0 0 42px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

/* ---------- 词条列表 ---------- */

.ak-terms {
  display: flex;
  flex-direction: column;
  width: 520px;
  max-width: 100%;
  border-top: 1px solid var(--line);
  margin-bottom: 8px;
}

.ak-term {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 10px 10px 12px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.25s, background-color 0.25s, padding-left 0.25s var(--ease);
}

.ak-term::before {
  content: "";
  position: absolute;
  left: -2px;
  width: 24px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease);
}

.ak-term { position: relative; }

.ak-term:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  padding-left: 20px;
}

html[data-theme="light"] .ak-term:hover { background: rgba(0, 0, 0, 0.03); }

.ak-term.is-active {
  color: var(--text);
  padding-left: 24px;
  background: rgba(167, 139, 250, 0.06);   /* 激活词条底光 */
}

html[data-theme="light"] .ak-term.is-active { background: rgba(124, 88, 240, 0.06); }

.ak-term.is-active::before { transform: scaleX(1); }

.ak-term .no {
  flex: none;
  min-width: 24px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  transition: color 0.25s;
}

.ak-term.is-active .no, .ak-term:hover .no { color: var(--accent); }

.ak-term .cn {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.ak-term .en {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  opacity: 0.5;
}

/* ---------- 详情 ---------- */

.ak-detail { margin-top: 22px; height: 176px; }

.ak-detail-panel { display: none; }

.ak-detail-panel.is-active {
  display: block;
  animation: dpIn 0.5s var(--ease) both;
}

@keyframes dpIn {
  from { opacity: 0; transform: translateY(14px); }
}

.ak-dp-line {
  position: relative;
  height: 1px;
  margin: 0 0 22px;
  background: var(--line);
}

.ak-dp-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 64px;
  height: 1px;
  background: var(--accent);
}

.ak-dp-desc {
  margin: 0;
  max-width: 520px;
  font-size: 14px;
  line-height: 1.95;
  color: var(--muted);
  letter-spacing: 0.04em;
  min-height: 4.5em;
}

html[data-theme="light"] .ak-dp-desc { color: #55555e; }

.ak-dp-meta {
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.ak-dp-meta b { font-weight: 400; color: var(--accent); }

/* ---------- 页脚 ---------- */

.ak-foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 36px;
  padding: 14px var(--pad-x) 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  transition: background-color 0.35s ease;
}

.ak-foot-sec {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.ak-ticks { display: flex; gap: 6px; }

.ak-ticks i {
  width: 20px;
  height: 2px;
  background: var(--line);
  transition: background-color 0.3s;
}

.ak-ticks i.is-on { background: var(--accent); }

.ak-foot-hint {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.ak-foot-legal {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ak-foot-legal a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s;
}

.ak-foot-legal a:hover { color: var(--text); }

/* ---------- 入场：词条自上而下逐条从左侧滑入（明日方舟式） ---------- */

.ak-terms .ak-term {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease),
              color 0.25s, background-color 0.25s, padding-left 0.25s var(--ease);
}

.ak-terms .ak-term:nth-child(1) { transition-delay: 60ms; }
.ak-terms .ak-term:nth-child(2) { transition-delay: 150ms; }
.ak-terms .ak-term:nth-child(3) { transition-delay: 240ms; }
.ak-terms .ak-term:nth-child(4) { transition-delay: 330ms; }
.ak-terms .ak-term:nth-child(5) { transition-delay: 420ms; }
.ak-terms .ak-term:nth-child(6) { transition-delay: 510ms; }

body.is-revealed .ak-terms .ak-term {
  opacity: 1;
  transform: translateX(0);
}

/* 落定后清除延迟，保证悬停/切换即时响应 */
body.is-revealed.done .ak-terms .ak-term { transition-delay: 0ms; }

.ak-nav, .ak-foot {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease) 0.1s, transform 0.6s var(--ease) 0.1s,
              background-color 0.35s ease;
}

body.is-revealed .ak-nav, body.is-revealed .ak-foot {
  opacity: 1;
  transform: none;
}

/* ---------- 入场：AK 式加载层（淡出揭示） ---------- */

.ak-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.ak-overlay.is-out { opacity: 0; pointer-events: none; }

.ak-loading {
  position: relative;
  width: min(430px, 82vw);
  padding: 30px 26px;
  color: var(--text);
}

.ak-loading::before,
.ak-loading::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.ak-loading::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.ak-loading::after { right: 0; bottom: 0; border-left: 0; border-top: 0; }

.ak-loading-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.26em;
}

.ak-loading-dots {
  font-family: var(--mono);
  letter-spacing: 0.32em;
  color: var(--muted);
}

.ak-loading-bar {
  margin-top: 16px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.ak-loading-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #fff 55%, var(--accent));
}

.ak-loading-sub {
  display: flex;
  justify-content: space-between;
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

/* ---------- 移动端 ---------- */

@media (max-width: 960px) {
  :root { --pad-x: 22px; }

  /* 用变量而不是直接写 height/selector：共享 nav.css 里是 height: var(--nav-h)，
     且 .nav .nav-inner / .nav .links 是两类选择器，旧的单类覆盖会被它压掉 */
  .ak-nav { --nav-h: 58px; }
  .ak-nav .nav-inner { padding: 0 20px; }
  .ak-nav .links { gap: 20px; }

  .ak-main { padding-top: 84px; align-items: flex-start; }

  .ak-col-text { max-width: 100%; }
  .ak-term .cn { font-size: 15px; }
  .ak-detail { min-height: 0; }
  .ak-dp-desc { min-height: 0; }
  .ak-foot-hint { display: none; }
  .ak-foot-legal { margin-left: 0; width: 100%; }
}

/* ---------- 减弱动态效果 ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .ak-terms .ak-term {
    opacity: 1 !important;
    transform: none !important;
  }

  .ak-nav, .ak-foot { opacity: 1; transform: none; }
}
