/* ============ Motrix 官网样式 ============ */
:root {
  --bg: #f6f7fc;
  --surface: #ffffff;
  --text: #1c2030;
  --text-soft: #5a607a;
  --border: #e8eaf3;
  --brand: #5c5edc;
  --brand-2: #7d7ff0;
  --brand-dark: #4547b0;
  --brand-tint: rgba(92, 94, 220, 0.10);
  --glow: rgba(92, 94, 220, 0.14);
  --grid: rgba(92, 94, 220, 0.05);
  --shadow: 0 14px 44px rgba(92, 94, 220, 0.10);
  --shadow-sm: 0 4px 16px rgba(28, 32, 48, 0.06);
  --radius-card: 24px;
  --radius-btn: 16px;
  --header-h: 64px;
  --maxw: 1140px;
}
[data-theme="dark"] {
  --bg: #0c0d18;
  --surface: #15162c;
  --text: #e9eaf6;
  --text-soft: #a6abc8;
  --border: #262a47;
  --brand: #6f71ec;
  --brand-2: #9b9cf5;
  --brand-tint: rgba(111, 113, 236, 0.16);
  --glow: rgba(111, 113, 236, 0.22);
  --grid: rgba(255, 255, 255, 0.04);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 18px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1000px 520px at 50% -160px, var(--glow), transparent 62%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  background-attachment: fixed, scroll, scroll;
  transition: background-color .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
section { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 19px; }
.brand-icon { width: 54px; height: 54px; border-radius: 12px; }
.brand-name { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main-nav { display: flex; gap: 26px; margin-left: 18px; }
.main-nav a { color: var(--text-soft); font-weight: 500; font-size: 15px; transition: color .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--brand); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.theme-toggle, .menu-toggle {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; font-size: 18px; transition: .2s;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--brand); color: var(--brand); }
.menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; border-radius: var(--radius-btn);
  padding: 13px 22px; cursor: pointer; border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn i { font-size: 18px; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 22px rgba(92,94,220,.28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(92,94,220,.38); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { color: var(--brand); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 12px; }
.btn-lg { padding: 16px 30px; font-size: 17px; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand); font-size: 13.5px; font-weight: 600; margin-bottom: 20px;
}
.badge i { font-size: 16px; }
.hero-title { font-size: clamp(34px, 5vw, 56px); font-weight: 900; letter-spacing: -0.5px; }
.hero-sub { margin: 18px 0 28px; font-size: 17px; color: var(--text-soft); max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-cta-center { justify-content: center; }
.hero-center { text-align: center; }
.hero-center .hero-sub { margin-left: auto; margin-right: auto; }

.hero-visual { position: relative; }
.device-frame {
  border-radius: 22px; border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden; padding: 10px;
}
.device-frame .hero-shot { border-radius: 14px; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.device-bar { display: flex; gap: 7px; padding: 13px 14px 0; }
.device-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.device-bar span:nth-child(1) { background: #ff5f57; }
.device-bar span:nth-child(2) { background: #febc2e; }
.device-bar span:nth-child(3) { background: #28c840; }
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 9px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-sm);
}
.float-chip i { color: var(--brand); }
.chip-1 { top: 16px; left: 16px; }
.chip-2 { bottom: 16px; right: 16px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.section-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.section-desc { margin-top: 14px; color: var(--text-soft); font-size: 16px; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 30px 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); box-shadow: var(--shadow); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 26px; margin-bottom: 18px;
}
.feature-card h3 { font-size: 19px; margin-bottom: 8px; }
.feature-card p { color: var(--text-soft); font-size: 15px; }

/* ---------- Intro ---------- */
.section-intro { padding: 36px 0 8px; }
.intro-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.intro-facts { list-style: none; display: grid; gap: 12px; margin: 24px 0 28px; }
.intro-facts li { display: flex; align-items: center; gap: 10px; font-size: 15.5px; color: var(--text); }
.intro-facts i { color: var(--brand); font-size: 20px; flex: none; }
.intro-card { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-radius: var(--radius-card); padding: 34px; box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 22px; }
.intro-stat { color: #fff; display: flex; flex-direction: column; gap: 4px; }
.intro-stat strong { font-size: 34px; font-weight: 900; line-height: 1; }
.intro-stat span { font-size: 14px; opacity: .9; }

/* ---------- Download ---------- */
.platform-tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 36px; flex-wrap: wrap; }
.ptab {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-soft);
  font-size: 15px; font-weight: 600; cursor: pointer; transition: .2s;
}
.ptab i { font-size: 18px; }
.ptab:hover { color: var(--brand); border-color: var(--brand); }
.ptab.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(92,94,220,.3); }
.platform-panels { display: grid; gap: 16px; }
.ppanel { display: none; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ppanel.active { display: grid; }
.dl-card {
  display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow-sm); transition: .2s;
}
.dl-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); transform: translateY(-2px); }
.dl-card-icon { width: 48px; height: 48px; flex: none; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-tint); color: var(--brand); font-size: 24px; }
.dl-card-info { flex: 1; }
.dl-card-info h4 { font-size: 16px; }
.dl-card-info p { font-size: 13.5px; color: var(--text-soft); }
.dl-more { text-align: center; margin-top: 30px; color: var(--text-soft); font-size: 15px; display: flex; gap: 12px; justify-content: center; align-items: center; }
.dl-more a { color: var(--brand); font-weight: 600; }
.dl-more span { opacity: .5; }

/* download page */
.platform-group { margin-bottom: 40px; }
.platform-group-title { display: flex; align-items: center; gap: 10px; font-size: 22px; margin-bottom: 18px; }
.platform-group-title i { color: var(--brand); }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dl-card.lg { padding: 22px 24px; }

/* download: requirements & install */
.info-block { margin-top: 56px; }
.req-grid, .install-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.req-card, .install-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; box-shadow: var(--shadow-sm); }
.req-card h4, .install-card h4 { display: flex; align-items: center; gap: 9px; font-size: 17px; margin-bottom: 14px; }
.req-card h4 i, .install-card h4 i { color: var(--brand); font-size: 20px; }
.req-card ul { list-style: none; display: grid; gap: 9px; }
.req-card li { font-size: 14.5px; color: var(--text-soft); padding-left: 16px; position: relative; }
.req-card li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.step-list { padding-left: 20px; display: grid; gap: 9px; color: var(--text-soft); font-size: 14.5px; }
.step-list li { margin-bottom: 2px; }
.step-list code, .req-card code { background: var(--brand-tint); color: var(--brand-dark); padding: 1px 6px; border-radius: 6px; font-size: 13px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.sys-req-tip { margin-top: 22px; color: var(--text-soft); font-size: 14px; }
.sys-req-tip a { color: var(--brand); font-weight: 600; }

/* ---------- FAQ ---------- */
.section-faq { background: color-mix(in srgb, var(--bg) 70%, var(--surface)); }
.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; background: none; border: none; cursor: pointer; color: var(--text); font-size: 16.5px; font-weight: 600; text-align: left; }
.faq-q i { flex: none; font-size: 22px; color: var(--brand); transition: transform .25s; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 22px 20px; color: var(--text-soft); font-size: 15px; }

/* ---------- CTA band ---------- */
.cta-band { padding: 0 0 84px; }
.cta-inner { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-radius: 28px; padding: 56px 32px; text-align: center; box-shadow: var(--shadow); }
.cta-inner h2 { font-size: clamp(24px, 3vw, 34px); }
.cta-inner p { opacity: .9; margin: 12px 0 26px; font-size: 16px; }
.cta-inner .btn-primary { background: #fff; color: var(--brand-dark); box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.cta-inner .btn-primary:hover { color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--text-soft); font-size: 14.5px; margin-top: 14px; max-width: 280px; }
.footer-col h4 { font-size: 15px; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-soft); font-size: 14.5px; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--text-soft); font-size: 13.5px; }
.footer-note { opacity: .8; }

/* ---------- Docs ---------- */
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; max-width: var(--maxw); margin: 0 auto; padding: 48px 20px 80px; }
.docs-toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.docs-toc nav { display: flex; flex-direction: column; gap: 4px; border-left: 2px solid var(--border); }
.docs-toc a { padding: 8px 16px; color: var(--text-soft); font-size: 14.5px; border-left: 2px solid transparent; margin-left: -2px; transition: .2s; }
.docs-toc a:hover, .docs-toc a.active { color: var(--brand); border-left-color: var(--brand); }
.docs-content { min-width: 0; }
.docs-head { margin-bottom: 28px; }
.docs-head h1 { font-size: 34px; }
.docs-head p { color: var(--text-soft); margin-top: 10px; }
.docs-content section { margin-bottom: 36px; }
.docs-content h2 { font-size: 23px; margin-bottom: 14px; }
.docs-content p { color: var(--text-soft); margin-bottom: 12px; }
.doc-steps, .doc-list { padding-left: 22px; color: var(--text-soft); display: grid; gap: 10px; }
.doc-steps li, .doc-list li { margin-bottom: 4px; }
.doc-list strong { color: var(--text); }
.docs-content code { background: var(--brand-tint); color: var(--brand-dark); padding: 2px 7px; border-radius: 6px; font-size: 13.5px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.docs-content a { color: var(--brand); font-weight: 600; }
.docs-content a:hover { text-decoration: underline; }
.doc-note { display: flex; gap: 10px; align-items: flex-start; background: var(--brand-tint); border-radius: 14px; padding: 14px 16px; color: var(--text-soft); font-size: 14.5px; margin-top: 12px; }
.doc-note i { color: var(--brand); font-size: 18px; flex: none; margin-top: 2px; }
.doc-more { margin-top: 18px; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.notfound-inner { text-align: center; }
.notfound-code { font-size: 96px; font-weight: 900; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound-inner h1 { font-size: 30px; margin: 6px 0 10px; }
.notfound-inner p { color: var(--text-soft); margin-bottom: 24px; }

/* ---------- Fade-up (progressive enhancement) ---------- */
.fade-up { opacity: 1; }
html.js .fade-up { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
html.js .fade-up.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 20px 16px;
    transform: translateY(-120%); transition: transform .3s ease; box-shadow: var(--shadow-sm); z-index: 40;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .menu-toggle { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 40px 0 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
  .ppanel { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
  .intro-card { grid-template-columns: 1fr 1fr; }
  .req-grid, .install-grid { grid-template-columns: 1fr; }
  .docs-toc { position: static; }
  .docs-toc nav { flex-direction: row; flex-wrap: wrap; border-left: none; }
  .docs-toc a { border-left: none; border-bottom: 2px solid transparent; }
  .docs-toc a.active { border-left: none; border-bottom-color: var(--brand); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .btn span { display: none; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}
