
:root {
  --bg: #f4f7fb;
  --bg2: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, .08);
  --card: rgba(255,255,255,.72);
  --accent: #3b82f6;
  --accent2: #a855f7;
  --accent3: #06b6d4;
  --danger: #ef4444;
  --shadow: 0 12px 40px rgba(15, 23, 42, .08);
  --hero-grad: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 45%, #ec4899 100%);
  --nav-bg: rgba(255,255,255,.75);
  --chip: #e2e8f0;
}
[data-theme="dark"] {
  --bg: #0b1220;
  --bg2: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, .15);
  --card: rgba(17, 24, 39, .75);
  --accent: #38bdf8;
  --accent2: #c084fc;
  --accent3: #22d3ee;
  --shadow: 0 16px 48px rgba(0,0,0,.45);
  --hero-grad: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 50%, #f472b6 100%);
  --nav-bg: rgba(11, 18, 32, .8);
  --chip: #1f2937;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 400px at 10% -10%, rgba(59,130,246,.25), transparent 60%),
    radial-gradient(700px 360px at 90% 0%, rgba(168,85,247,.2), transparent 55%),
    radial-gradient(600px 300px at 50% 100%, rgba(6,182,212,.12), transparent 50%);
  pointer-events: none;
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(900px 400px at 10% -10%, rgba(56,189,248,.15), transparent 60%),
    radial-gradient(700px 360px at 90% 0%, rgba(192,132,252,.12), transparent 55%),
    radial-gradient(600px 300px at 50% 100%, rgba(34,211,238,.08), transparent 50%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(1.2);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem;
  color: var(--text); text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav-links {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  line-height: 1.3;
}
.nav-links a:hover { color: var(--text); }
.nav-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.nav-actions .btn,
.nav-actions select,
#theme-toggle {
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  line-height: 1.25;
}
#theme-toggle {
  min-width: 3.2em;
  text-align: center;
}

/* 手机：两行布局 — 上：Logo+语言+主题+下载；下：使用说明 功能 关于 横排 */
@media (max-width: 860px) {
  .nav-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 8px;
    padding: 8px 12px 10px;
  }
  .brand {
    grid-column: 1;
    grid-row: 1;
    order: unset !important;
  }
  .nav-actions {
    grid-column: 2;
    grid-row: 1;
    order: unset !important;
    margin-left: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 6px;
    max-width: 100%;
  }
  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    order: unset !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    align-items: center;
    gap: 18px;
    width: 100% !important;
    flex: none !important;
    min-width: 0;
    padding-top: 8px;
    margin-top: 0;
    border-top: 1px solid var(--border);
  }
  .nav-links a {
    display: inline-block !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    word-break: keep-all !important;
    font-size: .88rem;
    line-height: 1.4;
  }
  .nav-actions select,
  .nav-actions .btn,
  #theme-toggle {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    word-break: keep-all !important;
    width: auto !important;
    min-width: fit-content !important;
    height: auto !important;
    max-width: none !important;
  }
  .nav-actions .btn-primary {
    padding: 8px 10px !important;
    font-size: .78rem !important;
  }
  .nav-actions select {
    font-size: .78rem !important;
    max-width: 6.8rem !important;
  }
  #theme-toggle {
    padding: 8px 10px !important;
    font-size: .78rem !important;
  }
}
@media (max-width: 400px) {
  .brand span { font-size: .95rem; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: .82rem; }
}
select, .btn {
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: .85rem;
  cursor: pointer;
}
.btn-primary {
  background: var(--hero-grad);
  border: none; color: #fff; font-weight: 700;
  box-shadow: 0 8px 24px rgba(59,130,246,.35);
}
.btn-primary:hover { filter: brightness(1.05); text-decoration: none; color: #fff; }
.btn-ghost { background: transparent; }
.btn[disabled], a.disabled {
  opacity: .45; pointer-events: none; cursor: not-allowed;
}

.hero {
  max-width: 1100px; margin: 0 auto;
  padding: 56px 20px 32px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 32px; align-items: center;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin: 0 0 8px;
  background: var(--hero-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.02em;
}
.hero .sub { font-size: 1.25rem; font-weight: 700; margin: 0 0 12px; }
.hero .desc { color: var(--muted); margin: 0 0 24px; max-width: 36rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  text-align: center;
}
.hero-card img {
  width: min(220px, 70%);
  filter: drop-shadow(0 16px 32px rgba(59,130,246,.35));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.section { max-width: 1100px; margin: 0 auto; padding: 28px 20px 48px; }
.section h2 { font-size: 1.6rem; margin: 0 0 8px; }
.section .hint { color: var(--muted); margin: 0 0 20px; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.feature h3 { margin: 0 0 8px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }

.platforms {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 720px) {
  .platforms { grid-template-columns: repeat(2, 1fr); }
}
.plat-btn {
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 10px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s ease;
}
.plat-btn:hover, .plat-btn.active {
  border-color: transparent;
  background: var(--hero-grad);
  color: #fff;
}

.dl-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  min-height: 160px;
}
.dl-group { margin-bottom: 14px; }
.dl-group h4 {
  margin: 0 0 10px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.dl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
  font-size: .86rem;
  font-weight: 600;
  border: 1px solid var(--border);
  text-decoration: none;
}
.chip:hover { filter: brightness(1.05); text-decoration: none; }
.chip.store {
  background: linear-gradient(135deg, rgba(59,130,246,.2), rgba(168,85,247,.2));
}
.chip.file {
  background: linear-gradient(135deg, rgba(6,182,212,.18), rgba(59,130,246,.18));
}
.sub-block {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: rgba(0,0,0,.02);
}
[data-theme="dark"] .sub-block { background: rgba(255,255,255,.03); }
.sub-block strong { display: block; margin-bottom: 8px; font-size: .9rem; }

.about-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.about-box p { color: var(--muted); margin: 0; }

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px 40px;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}
.footer a { font-weight: 600; }
.footer .links { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }

[dir="rtl"] .nav-inner { flex-direction: row-reverse; }
[dir="rtl"] .nav-links { justify-content: flex-end; }
@media (max-width: 860px) {
  [dir="rtl"] .nav-links { justify-content: flex-end; }
}

.guide-box ul { margin: 8px 0 0; padding-left: 1.2em; color: var(--muted); }
.guide-box h3 { font-size: 1.05rem; margin: 12px 0 6px; }
.guide-box li { margin-bottom: 6px; }
