/* ============================================================
 * 记着玩 · 官网基础样式 base.css
 * 依赖 tokens.css（先引入）。
 * 字体：系统字体栈（Q2 拍板：霞鹜文楷仅在 App 内声明提及，网站不载字体）。
 * 响应式断点：<768 手机 / 768-1199 平板 / ≥1200 桌面（原生自适应，无框架）。
 * ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "HarmonyOS Sans SC", "MiSans",
    "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: var(--text-1);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
}

/* —— 墨夜径向光晕底（同 App ImmersiveBg 意象）—— */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, var(--glow-top), transparent 60%),
    radial-gradient(ellipse 100% 45% at 50% 108%, var(--glow-bottom), transparent 65%),
    var(--page-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.35; font-weight: 700; }

/* —— 布局容器 —— */
.container { width: min(1120px, 92%); margin-inline: auto; }
.section { padding: 72px 0; }
@media (max-width: 767px) { .section { padding: 48px 0; } }

/* —— 玻璃卡片（App 玻璃规范：85% 底 + 发丝描边，禁 shadow 过重）—— */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
}

/* —— 通用卡片 —— */
.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

/* —— 按钮 —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--brand); color: var(--brand-on); }
.btn-primary:hover { background: var(--brand-pressed); }
:root[data-theme="dark"] .btn-primary,
:root:not([data-theme]) .btn-primary { background: var(--brand-strong); }
:root[data-theme="dark"] .btn-primary:hover,
:root:not([data-theme]) .btn-primary:hover { background: var(--brand-pressed); }

.btn-glass {
  background: var(--glass-bg);
  color: var(--text-1);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* —— 导航 —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text-1);
}
.nav-logo:hover { text-decoration: none; }
.nav-logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 15px;
}
.nav-links a:hover { color: var(--text-1); background: var(--surface-2); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text-1); background: var(--surface-2); font-weight: 600; }

/* 移动端导航：折叠为可横向滚动条 */
@media (max-width: 767px) {
  .site-nav .container { height: auto; flex-wrap: wrap; padding: 10px 0; }
  .nav-links { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-links a { white-space: nowrap; padding: 8px 12px; }
}

/* —— 区块标题 —— */
.section-title {
  text-align: center;
  font-size: clamp(24px, 4vw, 34px);
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto 40px;
}

/* —— 页脚 —— */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: 48px 0 32px;
  color: var(--text-2);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { color: var(--text-1); font-size: 15px; margin-bottom: 12px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-2); }
.footer-grid a:hover { color: var(--text-1); }
.footer-icp {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  color: var(--text-3);
  font-size: 13px;
  line-height: 2.1;
}
.footer-icp a { color: var(--text-3); }
.footer-icp a:hover { color: var(--text-1); }
.footer-icp .sep { margin: 0 8px; opacity: .45; }
.footer-icp .beian-icon {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: 4px;
}

/* —— 工具类 —— */
.text-center { text-align: center; }
.gold { color: var(--gold); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}
