/* VXMOpen 下载页 v3 —— 发布会式首屏 + 中性面板 + 微信绿唯一点缀
 * 居中大标题 hero，标题后方一团淡绿光晕；截图错落双卡制造纵深；
 * 功能卡横向排布弱化"卡片墙"；等宽字体只承担版本 / 校验等工具信息。
 * 亮暗双主题独立调校，全部走 CSS 变量。功能钩子见 index.html 与 main.js。
 */

:root {
  --bg: #f8f9f9;
  --surface: #ffffff;
  --surface-2: #fbfcfc;
  --text: #16181a;
  --text-2: #464e56;
  --text-3: #6b737c;
  --border: rgba(18, 22, 26, 0.09);
  --border-strong: rgba(18, 22, 26, 0.18);
  --accent: #07c160;            /* 图标、绿点符号 */
  --accent-text: #067f45;       /* 文字级强调，≥4.5:1 */
  --accent-soft: rgba(7, 193, 96, 0.1);
  --btn-bg: #06874d;
  --btn-bg-hover: #057a45;
  --btn-fg: #ffffff;
  --code-bg: #f0f2f3;
  --glow: radial-gradient(640px 320px at 50% -60px, var(--accent-soft), transparent 72%);
  --shadow: 0 1px 2px rgba(16, 20, 24, 0.04);
  --shadow-pop: 0 12px 32px rgba(16, 20, 24, 0.1);
  --radius-s: 8px;
  --radius-m: 10px;
  --radius-l: 12px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  --bg: #0f1113;
  --surface: #17191c;
  --surface-2: #141618;
  --text: #eceef0;
  --text-2: #a9b1ba;
  --text-3: #79828c;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);
  --accent: #2bd577;
  --accent-text: #3ada85;
  --accent-soft: rgba(43, 213, 119, 0.09);
  --btn-bg: #0dbf69;
  --btn-bg-hover: #21cd7c;
  --btn-fg: #062b17;
  --code-bg: rgba(255, 255, 255, 0.07);
  --glow: radial-gradient(640px 320px at 50% -60px, rgba(43, 213, 119, 0.12), transparent 72%);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

/* flex/grid 元素被 hidden 属性隐藏时不再被作者 display 覆盖 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* 键盘导航统一焦点环 */
:focus-visible { outline: 2px solid var(--btn-bg); outline-offset: 2px; }

/* 锚点跳转时给 sticky header 让位 */
section[id], main[id] { scroll-margin-top: 76px; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow { max-width: 780px; }

.dot { color: var(--text-3); margin: 0 8px; }

h1, h2, h3 { line-height: 1.22; margin: 0; text-wrap: balance; }

h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.015em; }

a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand img { border-radius: 8px; display: block; }

.gh-link {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.gh-link:hover { color: var(--text); border-color: var(--border-strong); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* 按压态：所有可点元素统一反馈 */
.btn:active, .copy-btn:active, .theme-btn:active, .gh-link:active { transform: translateY(1px); }

.theme-icon { display: flex; }
.theme-icon[hidden] { display: none; }

/* ---------- Hero：发布会式居中首屏 ---------- */
.hero {
  padding: 96px 0 88px;
  border-bottom: 1px solid var(--border);
  background-image: var(--glow);
  background-repeat: no-repeat;
}

.hero-copy {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  border-radius: 16px;
  display: block;
  width: 64px;
  height: 64px;
  box-shadow: var(--shadow-pop);
}

.hero h1 {
  margin-top: 28px;
  font-size: clamp(44px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-sub {
  color: var(--text-2);
  font-size: 18px;
  max-width: 620px;
  margin: 20px 0 0;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}

/* 版本 / 日期 / 免费开源 → 等宽信息胶囊（分隔点由布局间距替代） */
.hero-meta {
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hero-meta span {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12.5px;
  white-space: nowrap;
}

.hero-meta .dot { display: none; }

/* ---------- 截图带：错落双卡（macOS 略高，Windows 下沉） ---------- */
.hero-showcase { margin-top: 72px; }

.hero-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
}

.hero-shot { margin: 0; min-width: 0; }

.hero-shot.shot-offset { margin-top: 56px; }

.shot-frame {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-pop);
}

.shot-body img { display: block; }

.shot-img {
  width: 100%;
  height: auto;
}

img.shot-dark { display: none; }

[data-theme="dark"] img.shot-light { display: none; }
[data-theme="dark"] img.shot-dark { display: block; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-s);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-lg { padding: 14px 30px; font-size: 16px; border-radius: var(--radius-m); }

.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-bg-hover); }.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--text-3); }

/* ---------- Section ---------- */
.section { padding: 80px 0; }

.section-alt {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 12px;
}

.section-head .section-sub {
  color: var(--text-2);
  margin: 12px 0 0;
  font-size: 16px;
}

/* ---------- 下载卡片 ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.dl-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dl-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-pop);
}

.dl-head { display: flex; gap: 14px; align-items: center; }

.dl-head .dl-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-text);
}

.dl-head .dl-icon svg { width: 24px; height: 24px; }

.dl-head h3 { font-size: 18px; font-weight: 700; }

.dl-fit { margin: 3px 0 0; color: var(--text-2); font-size: 13px; font-family: var(--mono); }

.dl-req {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  width: 100%;
  color: var(--text-2);
  font-size: 13.5px;
}

.dl-btn {
  margin-top: 18px;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
}

.dl-file {
  margin: 12px 0 0;
  color: var(--text-3);
  font-size: 12px;
  font-family: var(--mono);
  min-height: 18px;
  word-break: break-all;
}

.dl-sha {
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.dl-sha code {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  background: var(--code-bg);
  padding: 6px 8px;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover { color: var(--text); border-color: var(--text-3); }

.dl-alt {
  margin: 14px 0 0;
  color: var(--text-3);
  font-size: 13px;
}

.dl-alt a {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}

.dl-alt a:hover { color: var(--text); text-decoration-color: var(--text-3); }

/* ---------- 更新日志 ---------- */
.changelog { margin-top: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 26px 30px;
  box-shadow: var(--shadow);
}

.changelog h3 { font-size: 17px; }

.changelog ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.changelog li {
  position: relative;
  padding: 6px 0 6px 20px;
  color: var(--text-2);
  font-size: 14.5px;
}

.changelog li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 15px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- 功能卡：横向排布 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-pop);
}

.feature-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-m);
  background: var(--accent-soft);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg { width: 24px; height: 24px; }

.feature-text { min-width: 0; }

.feature-card h3 { font-size: 16.5px; }

.feature-card p { margin: 6px 0 0; color: var(--text-2); font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  margin-top: 12px;
  box-shadow: var(--shadow);
}

.faq-item summary {
  cursor: pointer;
  padding: 17px 20px;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--radius-m);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }

.faq-item summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  flex-shrink: 0;
  margin-top: -4px;
}

.faq-item summary:hover::after { border-color: var(--text-2); }

.faq-item[open] summary::after {
  transform: rotate(225deg);
  margin-top: 4px;
}

.faq-body { padding: 0 20px 18px; color: var(--text-2); font-size: 14.5px; }

.faq-body p { margin: 0 0 8px; }

.faq-body strong { color: var(--text); }

.faq-body pre {
  background: var(--code-bg);
  border-radius: var(--radius-s);
  padding: 12px 14px;
  overflow-x: auto;
}

.faq-body code {
  font-family: var(--mono);
  font-size: 12.5px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 32px;
}

.footer-inner {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.footer-disclaimer {
  margin: 0 auto 10px;
  max-width: 640px;
  font-size: 12.5px;
  line-height: 1.8;
}

.footer-note {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-3);
}

.footer-inner p:last-child {
  font-family: var(--mono);
  font-size: 12px;
}

.footer-inner a { color: var(--text-2); text-decoration: none; }
.footer-inner a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  background: var(--text);
  color: var(--bg);
  padding: 9px 18px;
  border-radius: var(--radius-s);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-pop);
  z-index: 50;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .hero { padding: 72px 0 64px; }
  .hero-shots { max-width: 720px; }
  .hero-shot.shot-offset { margin-top: 32px; }
}

@media (max-width: 640px) {
  .hero { padding: 52px 0 56px; }
  .hero-showcase { margin-top: 48px; }
  .hero-sub { font-size: 16px; }
  .hero-shots { grid-template-columns: 1fr; gap: 20px; max-width: 460px; }
  .hero-shot.shot-offset { margin-top: 0; }
  .section { padding: 56px 0; }
  .dl-grid, .feature-grid { grid-template-columns: 1fr; }
  h2 { font-size: 24px; }
  .container { padding: 0 20px; }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
