/* ===== 苹果风格官网样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-white: #ffffff;
  --bg-gray: #f5f5f7;      /* 苹果浅灰段 */
  --text-black: #1d1d1f;   /* 近黑 */
  --text-gray: #6e6e73;    /* 副标题灰 */
  --link-blue: #0066cc;    /* 链接蓝 */
}

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "微软雅黑", "Microsoft YaHei", "思源黑体", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg-white);
  color: var(--text-black);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

a { color: var(--link-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 顶部固定导航栏 ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: rgba(22,22,23,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 1000;
}
.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 0 20px;
}
.nav a {
  color: #e8e8ed;
  font-size: 13px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav a:hover { color: #fff; text-decoration: none; }
.nav .logo { font-weight: 600; font-size: 15px; margin-right: 6px; }

/* ===== 首屏 Hero ===== */
.hero {
  height: 100vh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #000;
  color: #fff;
  padding: 48px 20px;
  margin-top: 0;
}
.hero .eyebrow { font-size: 20px; color: #86868b; margin-bottom: 12px; }
.hero h1 {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  max-width: 900px;
}
.hero .subtitle {
  font-size: 26px;
  color: #a1a1a6;
  margin-top: 16px;
  max-width: 700px;
}
.hero .author { font-size: 17px; color: #6e6e73; margin-top: 24px; }

/* ===== 通用 section ===== */
.section { padding: 88px 0; }
.section-gray { background: var(--bg-gray); }
.section-white { background: var(--bg-white); }

.section-title {
  text-align: center;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-sub {
  text-align: center;
  font-size: 21px;
  color: var(--text-gray);
  margin-top: 8px;
  font-weight: 500;
}

/* ===== 模块总览标题（白底 section-head） ===== */
.section-head {
  text-align: center;
  padding: 96px 20px 24px;
}
.section-head .headline {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.section-head .subhead {
  font-size: 24px;
  color: var(--text-gray);
  margin-top: 12px;
  font-weight: 500;
}

/* ===== 超宽大图竖排滚动（苹果首页结构） ===== */
.banner {
  position: relative;
  width: 100%;
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 88px 24px;
  text-align: center;
}
/* 白 / 浅灰 交替背景，真正做出来 */
.banner-white { background: var(--bg-white); }
.banner-gray  { background: var(--bg-gray); }
.banner-dark  { background: #000; color: #fff; }

/* 纯黑首屏：不用图，只居中文字 */
.hero-noimg {
  min-height: 100vh;
}
.hero-noimg .banner-text { margin-top: 0; }

/* 文字在上，图在下（图缩小一点） */
.banner-text {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin-bottom: 36px;
}
.banner-dark .banner-text { color: #fff; }
.banner-white .banner-text,
.banner-gray .banner-text { color: var(--text-black); }

/* 大图：缩小一点，不占满整屏，加立体白边边框 */
.banner-media {
  position: relative;
  width: 100%;
  max-width: 1080px;
  z-index: 1;
}
.banner-media img,
.banner-media video {
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 16px;
  /* 立体光影边：光线从左上方打向右下方，左上亮、右下暗 */
  border: 1px solid rgba(0,0,0,0.06);
  background: #ffffff;
  /* 方向性投影：阴影偏向右下方，营造单侧光照射的立体感 */
  box-shadow:
    inset 2px 2px 4px rgba(255,255,255,0.9),
    inset -3px -3px 8px rgba(0,0,0,0.32),
    14px 18px 36px rgba(0,0,0,0.32),
    -4px -4px 12px rgba(255,255,255,0.5);
}

.banner-text h1 {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.banner-text .banner-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.1;
}
.banner-text .sub {
  font-size: 22px;
  margin-top: 14px;
  color: var(--text-gray);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.banner-dark .banner-text .sub { color: #a1a1a6; }

/* 蓝字链接（「了解详情」「进一步了解」） */
.banner-links {
  margin-top: 22px;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.banner-links a {
  font-size: 17px;
  color: var(--link-blue);
  text-decoration: none;
}
.banner-links a:hover { text-decoration: underline; }

.banner .author {
  font-size: 15px;
  color: var(--text-gray);
  margin-top: 20px;
}
.banner-dark .author { color: #6e6e73; }

/* ===== 详情页 ===== */
.detail-hero {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 140px 20px 90px;
}
.detail-hero .eyebrow { font-size: 18px; color: #86868b; }
.detail-hero h1 { font-size: 56px; font-weight: 700; letter-spacing: -0.01em; margin-top: 8px; }
.detail-hero .sub { font-size: 22px; color: #a1a1a6; margin-top: 12px; max-width: 720px; margin-left: auto; margin-right: auto; }

.detail-body {
  max-width: 1150px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.detail-text {
  max-width: 760px;
  margin: 0 auto 48px;
  font-size: 17px;
  line-height: 1.7;
  color: #333;
}
.detail-text h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--text-black);
}
.detail-text p { margin-bottom: 14px; }
.detail-text ul { margin: 0 0 14px 20px; }
.detail-text li { margin-bottom: 8px; }
/* 详情页正文图片：按原始像素等比显示、绝不放大，避免图片内文字糊/锯刺 */
.detail-text img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 16px;
  image-rendering: auto;
}

/* 详情页图文块：图(可视频) + 图旁/图上文字 */
.media-block {
  margin-bottom: 56px;
  text-align: center;
}
.media-block img,
.media-block video {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  display: block;
  margin: 0 auto;
}
.media-block .caption {
  font-size: 15px;
  color: var(--text-gray);
  margin-top: 14px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== 下载专区 ===== */
.wld-download-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wld-dl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wld-dl-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}
.wld-dl-info { flex: 1; min-width: 0; }
.wld-dl-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-black);
  margin-bottom: 4px;
}
.wld-dl-meta {
  font-size: 13px;
  color: var(--text-gray);
  word-break: break-all;
}
.wld-dl-btn {
  flex-shrink: 0;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,102,204,0.3);
  transition: background 0.2s ease;
}
.wld-dl-btn:hover { background: #0055aa; }

/* 编辑模式下的下载项操作按钮 */
.wld-editing .wld-dl-item { outline: 2px dashed #0066cc; outline-offset: 4px; }
.wld-dl-ops { display: flex; gap: 8px; flex-shrink: 0; }
.wld-dl-ops button {
  border: none;
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.wld-dl-edit { background: #f0f0f2; color: #1d1d1f; }
.wld-dl-edit:hover { background: #e0e0e2; }
.wld-dl-del { background: #ff3b30; color: #fff; }
.wld-dl-del:hover { background: #d6302a; }
.wld-dl-add {
  display: block;
  margin: 4px auto 0;
  background: transparent;
  color: #0066cc;
  border: 2px dashed #0066cc;
  border-radius: 16px;
  padding: 14px 0;
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.wld-dl-add:hover { background: rgba(0,102,204,0.06); }
.wld-dl-empty {
  text-align: center;
  color: var(--text-gray);
  font-size: 15px;
  padding: 20px 0;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--bg-gray);
  padding: 48px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-gray);
}
.footer .f-name { font-size: 15px; color: var(--text-black); font-weight: 600; margin-bottom: 8px; }
.footer .wld-beian { margin-top: 12px; }
.footer .wld-beian a {
  font-size: 13px;
  color: var(--text-gray);
  text-decoration: none;
}
.footer .wld-beian a:hover { text-decoration: underline; }

/* 返回链接 */
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 15px;
}

/* ===== 隐藏编辑模式（Ctrl+E 开关）===== */
.wld-editing [data-wld-editable] {
  cursor: text;
  outline: 2px dashed #0066cc;
  outline-offset: 4px;
  background: rgba(0,102,204,0.06);
  transition: outline 0.15s, background 0.15s;
}
.wld-editing [data-wld-editable]:hover {
  outline: 2px solid #0066cc;
  background: rgba(0,102,204,0.12);
}
.wld-editing [data-wld-editable]:focus {
  outline: 2px solid #ff3b30;
  background: rgba(255,59,48,0.08);
}

/* 媒体容器编辑态 */
.wld-editing [data-wld-media] {
  outline: 2px dashed #0066cc;
  outline-offset: 6px;
  border-radius: 16px;
  position: relative;
}
.wld-editing .wld-media-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.wld-editing .wld-media-btn:hover { background: #0055aa; }

/* 媒体项（被替换进来的图/视频/音频） */
.wld-media-item {
  max-width: 100%;
  border-radius: 14px;
  display: block;
  margin: 0 auto 8px;
}

/* 编辑工具栏（右下角） */
#wld-editor-toolbar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: rgba(22,22,23,0.9);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 10px 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
#wld-editor-toolbar button {
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
}
#wld-editor-toolbar button:hover { background: #0055aa; }
#wld-editor-toolbar button.wld-btn-save {
  background: #28a745;
}
#wld-editor-toolbar button.wld-btn-save:hover { background: #1e7e34; }

/* ===== 四指标重画图（可编辑文字） ===== */
.figure-card {
  margin: 28px 0;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.figure-card .fig-caption {
  font-size: 14px;
  color: var(--text-gray);
  padding: 10px 16px;
  background: #f5f5f7;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.figure-card .fig-body {
  padding: 22px 20px;
  background: #fff;
}

/* DSI 公式卡 + 分级条 */
.dsi-formula {
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  padding: 18px;
  background: #f5f5f7;
  border-radius: 12px;
  margin-bottom: 16px;
  color: #1d1d1f;
}
.dsi-scale {
  display: flex;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  margin: 8px 0 6px;
  border: 1px solid rgba(0,0,0,0.1);
}
.dsi-scale .seg { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; font-weight: 600; }
.dsi-scale .seg.lv-正常 { background: #34c759; }
.dsi-scale .seg.lv-轻度 { background: #ffd60a; color: #333; }
.dsi-scale .seg.lv-中度 { background: #ff9f0a; }
.dsi-scale .seg.lv-重度 { background: #ff3b30; }
.dsi-scale-label { text-align: center; font-size: 12px; color: var(--text-gray); margin-top: 4px; }

/* VEM 声域图坐标 */
.vem-box {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border: 1px solid #ccc;
  background:
    linear-gradient(#f0f0f0 1px, transparent 1px),
    linear-gradient(90deg, #f0f0f0 1px, transparent 1px);
  background-size: 25% 25%;
  border-radius: 8px;
}
.vem-area {
  position: absolute;
  left: 18%; right: 18%; top: 20%; bottom: 22%;
  background: rgba(77,163,255,0.18);
  border: 2px solid #4da3ff;
  border-radius: 50% 50% 45% 45%;
}
.vem-axis-x {
  position: absolute; bottom: -22px; left: 0; right: 0;
  text-align: center; font-size: 12px; color: var(--text-gray);
}
.vem-axis-y {
  position: absolute; left: -18px; top: 50%;
  transform: rotate(-90deg); font-size: 12px; color: var(--text-gray);
  white-space: nowrap;
}

/* GNE 频带示意 */
.gne-bands { display: flex; align-items: flex-end; gap: 8px; justify-content: center; margin: 12px 0; }
.gne-band { width: 40px; text-align: center; }
.gne-band .bar { background: linear-gradient(#4da3ff, #0066cc); border-radius: 4px 4px 0 0; margin: 0 auto; }
.gne-band .lbl { font-size: 11px; color: var(--text-gray); margin-top: 4px; }

/* CSID 倒谱示意 */
.csid-box { text-align: center; padding: 10px 0; }
.csid-formula {
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-size: 19px;
  font-weight: 700;
  padding: 16px;
  background: #f5f5f7;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 10px;
}

/* 通用小标签 */
.fig-tag { display: inline-block; font-size: 12px; color: #4da3ff; font-weight: 600; margin-bottom: 8px; }

/* ===== 苹果风动画 ===== */

/* 图片悬停：微微放大 + 浮起，带柔和阴影 */
.banner-media a {
  display: block;
  overflow: hidden;
  border-radius: 16px;
}
.banner-media img,
.banner-media video {
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.banner-media a:hover img {
  transform: scale(1.025);
  box-shadow:
    inset 2px 2px 4px rgba(255,255,255,0.9),
    inset -3px -3px 8px rgba(0,0,0,0.32),
    20px 26px 50px rgba(0,0,0,0.38),
    -4px -4px 12px rgba(255,255,255,0.5);
}

/* 滚动进入：淡入 + 上移（苹果官网式） */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 「了解详情」蓝字链接悬停：箭头微动 + 下划线 */
.banner-links a {
  transition: color 0.25s ease, transform 0.25s ease;
  position: relative;
}
.banner-links a:hover {
  color: #0066cc;
}
.banner-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.banner-links a:hover::after {
  transform: scaleX(1);
}

/* ===== 响应式 ===== */
@media (max-width: 800px) {
  .nav-inner { gap: 16px; overflow-x: auto; justify-content: flex-start; }
  .modules-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .detail-hero h1 { font-size: 38px; }
  .section-title { font-size: 34px; }
}

/* ===== 太极动画小人（握金箍棒的 Q 版吴教授） ===== */
#wld-avatar {
  position: fixed;
  /* 默认位置=黄金分割点：中心落在视口 61.8% / 61.8%，左上角 56.42% / 54.71%（小人180x180） */
  left: 56.42%;
  top: 54.71%;
  z-index: 2000;
  width: 180px;
  height: 180px;
  cursor: grab;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,0.35));
}
#wld-avatar.dragging { cursor: grabbing; }
.wa-stage { position: relative; width: 100%; height: 100%; }
.wa-body {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 50% 90%;
}
.wa-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 50%;
  background: #f1f1f3;
}
/* 视频小人：右下角圆角视频窗口 */
#wa-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  background: #f1f1f3;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  cursor: pointer;
}
.wa-shadow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 16px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.35), rgba(0,0,0,0));
  border-radius: 50%;
}
.wa-stick {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  transform-origin: center bottom;
  width: 12px;
  height: 130px;
  background: linear-gradient(90deg, #f6c344, #f5b301, #f6c344);
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(245,179,1,0.8);
  transition: transform 0.6s cubic-bezier(0.22,0.61,0.36,1), opacity 0.5s ease;
  opacity: 0;
  z-index: 5;
}
#wld-avatar.stick-out .wa-stick {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}
@keyframes waTaichi {
  0%   { transform: translateX(0) rotate(0deg) translateY(0); }
  12%  { transform: translateX(-14px) rotate(-4deg) translateY(-4px); }
  25%  { transform: translateX(0) rotate(0deg) translateY(-8px); }
  37%  { transform: translateX(14px) rotate(4deg) translateY(-4px); }
  50%  { transform: translateX(0) rotate(0deg) translateY(0); }
  62%  { transform: translateX(-12px) rotate(-3deg) translateY(-6px); }
  75%  { transform: translateX(0) rotate(0deg) translateY(-10px); }
  87%  { transform: translateX(12px) rotate(3deg) translateY(-6px); }
  100% { transform: translateX(0) rotate(0deg) translateY(0); }
}
#wld-avatar.taichi .wa-body { animation: waTaichi 7s ease-in-out infinite; }
@keyframes waBreathe {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.02); }
}
#wld-avatar.idle .wa-body { animation: waBreathe 3s ease-in-out infinite; }
@keyframes waJump {
  0%,100% { transform: translateY(0); }
  40% { transform: translateY(-30px); }
  60% { transform: translateY(-30px); }
}
#wld-avatar.jump .wa-body { animation: waJump 0.6s cubic-bezier(0.22,0.61,0.36,1); }
.wa-bubble {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #fff;
  color: #1d1d1f;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.wa-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}
#wld-avatar.talk .wa-bubble { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 800px) {
  #wld-avatar { transform: scale(0.85); left: 56.42%; top: 54.71%; right: auto; bottom: auto; }
}

/* 说明书表格样式 */
.doc-meta { color: #6e6e73; font-size: 14px; margin: 8px 0 20px; }
.detail-text table.doc-table { width: 100%; border-collapse: collapse; margin: 12px 0 24px; font-size: 15px; }
.detail-text table.doc-table th { background: #f5f5f7; text-align: left; padding: 10px 12px; font-weight: 600; border: 1px solid #e5e5ea; }
.detail-text table.doc-table td { padding: 10px 12px; border: 1px solid #e5e5ea; vertical-align: top; line-height: 1.55; }
.detail-text table.doc-table tr:nth-child(even) td { background: #fafafc; }
.detail-text table.doc-table td:first-child { white-space: nowrap; font-weight: 500; width: 180px; }
.detail-text hr { border: none; border-top: 1px solid #e5e5ea; margin: 32px 0; }

