/* ===== 时辰换算 · 官网样式 ===== */

:root {
  --bg: #f6f7f9;
  --bg-soft: #eef1f5;
  --card: #ffffff;
  --text: #1f2328;
  --text-soft: #57606a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1a5fb4;
  --accent-2: #d9722a;
  --accent-soft: #e8f0fb;
  --ok: #2e7d32;
  --danger: #d32f2f;
  --shadow: 0 8px 30px rgba(16, 24, 40, .08);
  --radius: 16px;
  --maxw: 980px;
}

html[data-theme="dark"] {
  --bg: #0f1115;
  --bg-soft: #141821;
  --card: #161a20;
  --text: #e6e8eb;
  --text-soft: #b6bdc7;
  --muted: #9aa4b2;
  --line: #262b33;
  --accent: #7fb0ff;
  --accent-2: #f0a35e;
  --accent-soft: #1b2431;
  --ok: #7ecb8a;
  --danger: #ff8a8a;
  --shadow: 0 8px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body { max-width: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "HarmonyOS Sans SC", "PingFang SC",
               "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- 布局 ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 14px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font-size: 17px; letter-spacing: .3px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-soft); font-size: 14px; padding: 8px 10px; border-radius: 8px;
}
.nav a:hover { background: var(--accent-soft); text-decoration: none; color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

.theme-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 15px;
  display: grid; place-items: center;
}
.theme-btn:hover { border-color: var(--accent); }
.theme-btn svg { display: block; }
.theme-btn .icon-sun { display: none; }
html[data-theme="dark"] .theme-btn .icon-moon { display: none; }
html[data-theme="dark"] .theme-btn .icon-sun { display: block; }

/* ---------- 首屏 ---------- */
.hero { padding: 64px 0 40px; text-align: center; }
.hero .app-icon {
  width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 20px;
  box-shadow: var(--shadow);
}
.hero h1 { font-size: 40px; line-height: 1.25; margin: 0 0 12px; letter-spacing: .5px; }
.hero p.lead { font-size: 17px; color: var(--text-soft); margin: 0 auto 22px; max-width: 620px; }

.badge {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  font-size: 13px; padding: 6px 14px; border-radius: 999px; margin-bottom: 8px;
}

.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); text-decoration: none; }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--card); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- 区块 ---------- */
section { padding: 40px 0; }
.section-title { font-size: 22px; margin: 0 0 6px; }
.section-sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .num {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 700;
  margin-bottom: 10px;
}

/* 截图 */
.shots { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .shots { grid-template-columns: repeat(4, 1fr); } }
.shots img {
  width: 100%; border-radius: 14px; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* 文档型页面 */
.doc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; margin: 32px 0 48px;
}
.doc h1 { font-size: 28px; margin: 0 0 6px; }
.doc .meta { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.doc h2 {
  font-size: 18px; margin: 32px 0 10px; padding-left: 10px;
  border-left: 4px solid var(--accent);
}
.doc h3 { font-size: 15px; margin: 18px 0 6px; }
.doc p, .doc li { font-size: 15px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc code {
  background: var(--accent-soft); color: var(--accent);
  padding: 1px 6px; border-radius: 5px; font-size: 13px; word-break: break-all;
}
.doc .note {
  background: var(--accent-soft); border-radius: 10px; padding: 12px 14px;
  font-size: 14px; margin: 14px 0;
}
.doc .warn { color: var(--danger); font-weight: 600; }

/* 键值表 */
.kv { margin: 12px 0; border-top: 1px solid var(--line); }
.kv-row { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.kv-k { flex: 0 0 100%; font-weight: 600; font-size: 14px; }
.kv-v { flex: 1 1 100%; font-size: 14px; }
@media (min-width: 560px) {
  .kv-k { flex: 0 0 245px; }
  .kv-v { flex: 1 1 240px; }
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  padding: 32px 0 40px; margin-top: 20px;
  color: var(--muted); font-size: 13px;
}
.site-footer .wrap { display: grid; gap: 14px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text-soft); }
.beian { font-size: 12px; color: var(--muted); line-height: 2; }
.beian a { color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .hero { padding: 44px 0 28px; }
  .hero h1 { font-size: 30px; }
  .hero p.lead { font-size: 15px; }
  .doc { padding: 24px 18px; }
  .nav a { padding: 8px 8px; font-size: 13px; }
  .brand span { display: none; }
}

/* 打印 */
@media print {
  .site-header, .site-footer, .theme-btn { display: none; }
  .doc { border: none; padding: 0; }
}
