/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #1a1d23;
  --text-secondary: #5b616e;
  --accent: #0f766e;
  --accent-hover: #0d5f58;
  --accent-light: #e6f4f2;
  --radius: 10px;
  --max-w: 1100px;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app-main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.3; }

/* ===== Navbar ===== */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center;
  gap: 24px;
  padding: 0 24px; height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; color: var(--text); flex-shrink: 0; }
.nav-logo img { height: 36px; width: auto; }
.nav-links {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 28px;
  list-style: none;
  /* ⚠️ 这里原来是 overflow-x:auto + 横向滚动。
     2026-10-13 加「产品」下拉时删掉了：`.nav-dd-menu` 是绝对定位的子元素，
     祖先只要有一个轴不是 visible，另一个轴就会被算成 auto ⇒ 下拉会被裁掉。
     改成换行（flex-wrap），窄屏最多两行，下拉能正常溢出。 */
  flex-wrap: wrap;
}
.nav-links li { flex-shrink: 0; }
.nav-links li:first-child { margin-left: auto; }
.nav-links a { color: var(--text-secondary); font-size: 15px; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: var(--accent); }

/* ===== Navbar · 「产品」下拉（纯 CSS，不引 JS） =====
   hover（鼠标）/ focus-within（键盘 Tab、触屏点一下）两种都能开，
  所以手机上"点一下"就能展开 —— 不需要额外脚本，也不用给 13 个页面加 <script>。 */
/* ⚠️ 2026-10-13 修两个 bug（老板反馈：鼠标一动下拉就收、点不到菜单项；点「产品」也时灵时不灵）：
   ① 菜单原来在 `top: calc(100% + 16px)`，开关底边到菜单顶边之间**留了 16px 空隙**。
      鼠标往菜单走、路过这段空隙时既不在 li 上也不在菜单上 ⇒ `.nav-dd:hover` 断掉 ⇒ 菜单 display:none。
      修法：菜单加一段**透明的 16px「桥」**（`::before`），把空隙变成菜单的一部分，hover 不断。
   ② Safari 点击 `<button>` **不给焦点**，`:focus-within` 永远不触发 ⇒ 点「产品」打不开。
      这属于浏览器行为差异，纯 CSS 无解 ⇒ 加 `js/nav.js` 做「点击切换 / 点外部关闭 / Esc 关闭」，
      并用 `.nav-dd.open` 这一个类同时驱动菜单与箭头。CSS 仍是基础（JS 挂了 hover 照样能用）。 */
.nav-dd { position: relative; }
.nav-dd-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; margin: 0; padding: 0; cursor: pointer;
  color: var(--text-secondary); font-size: 15px; font-weight: 500;
  font-family: inherit; white-space: nowrap;
}
.nav-dd-toggle:hover, .nav-dd:focus-within .nav-dd-toggle { color: var(--accent); }
.nav-dd .caret {
  width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform .15s;
}
.nav-dd:hover .caret, .nav-dd:focus-within .caret { transform: rotate(180deg); }
.nav-dd-menu {
  display: none;
  position: absolute; top: calc(100% + 16px); left: 50%;
  transform: translateX(-50%);
  min-width: 200px; margin: 0; padding: 8px 0;
  list-style: none; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0,0,0,.18);
  z-index: 200;
}
/* 透明「桥」：把开关与菜单之间那 16px 空隙也变成可 hover 的区域（见上面 ① 的说明） */
.nav-dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu, .nav-dd.open .nav-dd-menu { display: block; }
.nav-dd.open .caret { transform: rotate(180deg); }
.nav-dd.open .nav-dd-toggle { color: var(--accent); }
.nav-dd-menu li { margin: 0; }
.nav-dd-menu a { display: block; padding: 9px 16px; font-size: 14px; color: var(--text-secondary); }
.nav-dd-menu a:hover { background: rgba(15,118,110,.08); color: var(--accent); }
.nav-dd-menu .soon {
  font-size: 11px; font-weight: 600; color: var(--accent);
  border: 1px solid currentColor; border-radius: 999px;
  padding: 1px 6px; margin-left: 6px;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #0a1628 0%, #122540 40%, #0f2e2b 100%);
  color: #fff; text-align: center; padding: 56px 24px 48px;
}
.hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; }
.hero p { font-size: 18px; color: #bcc8d6; max-width: 620px; margin: 0 auto; }
.hero .btn {
  display: inline-block; padding: 13px 32px; border-radius: 8px;
  font-weight: 600; font-size: 15px; transition: background 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { border: 1.5px solid #4a5b6e; color: #d0d8e0; margin-left: 12px; }
.btn-outline:hover { border-color: #8899aa; color: #fff; }

/* ===== Sections ===== */
.section { padding: 72px 24px; }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-title { font-size: 30px; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-desc { text-align: center; color: var(--text-secondary); max-width: 560px; margin: 0 auto 48px; font-size: 16px; }

/* ===== Product Cards (Home) ===== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 28px; transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.07); transform: translateY(-2px); }
.product-card .icon-box {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 20px;
}
.icon-player { background: #eef2ff; color: #4f46e5; }
.icon-controller { background: var(--accent-light); color: var(--accent); }
.product-card h3 { font-size: 20px; margin-bottom: 8px; }
.product-card p { color: var(--text-secondary); font-size: 15px; margin-bottom: 20px; }
.product-card .card-link { font-weight: 600; font-size: 14px; }

/* ===== Feature Table ===== */
.feature-table { width: 100%; border-collapse: collapse; margin-top: 32px; font-size: 14px; }
.feature-table th, .feature-table td {
  padding: 12px 16px; text-align: center; border-bottom: 1px solid var(--border);
}
.feature-table th { background: #f8f9fb; font-weight: 600; }
.feature-table th:first-child, .feature-table td:first-child { text-align: left; }
.feature-table .check { color: var(--accent); font-weight: 700; }
.feature-table .cross { color: #c0c4cc; }

/* ===== Edition Cards ===== */
.edition-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 32px; }
.edition-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 24px;
}
.edition-card h3 { font-size: 20px; margin-bottom: 4px; }
.edition-card .edition-label { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.edition-card ul { list-style: none; padding: 0; }
.edition-card li { padding: 7px 0; font-size: 14px; color: var(--text-secondary); border-bottom: 1px solid #f0f1f3; }
.edition-card li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* ===== Scenario Tags ===== */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag { background: var(--accent-light); color: var(--accent); padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; }

/* ===== About / Contact ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 32px; }
.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin-top: 16px;
}
.contact-card .label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.contact-card .value { font-size: 16px; font-weight: 500; }

/* ===== Screenshot ===== */
.screenshot { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: 0 4px 20px rgba(0,0,0,0.06); }

/* ===== Footer ===== */
.footer {
  background: #1a1d23; color: #8b909a; text-align: center; padding: 32px 24px; font-size: 14px;
}
.footer .brand { color: #c8ccd4; font-weight: 600; margin-bottom: 4px; }

/* ===== WeChat Section ===== */
.wechat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.wechat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}
.wechat-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.wechat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 16px;
}
.wechat-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}
.wechat-card p {
  color: var(--text-secondary);
  font-size: 14px;
}
.wechat-sub {
  margin-top: 6px;
  font-size: 13px !important;
  color: #9096a0 !important;
}
.wechat-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ===== Back link ===== */
.back-link { display: inline-block; margin-bottom: 32px; font-size: 14px; color: var(--text-secondary); }
.back-link::before { content: "← "; }

/* ===== Product Hero ===== */
.product-hero {
  background: linear-gradient(135deg, #0a1628 0%, #122540 40%, #0f2e2b 100%);
  color: #fff; text-align: center; padding: 64px 24px;
}
.product-hero h1 { font-size: 36px; font-weight: 800; }
.product-hero .subtitle { color: #bcc8d6; font-size: 17px; margin-top: 8px; }


/* ===== Responsive ===== */
@media (max-width: 768px) {
  /* 窄屏：导航允许换行（原来是横向滚动条），高度改成自适应 */
  .nav-inner { gap: 10px 14px; padding: 8px 16px; height: auto; min-height: 64px; flex-wrap: wrap; }
  .nav-links { gap: 12px 18px; }
  /* 下拉改左对齐，避免在窄屏上被右边缘吃掉 */
  .nav-dd-menu { left: 0; transform: none; min-width: 176px; }
  .hero h1 { font-size: 30px; }
  .about-grid { grid-template-columns: 1fr; }
}
