:root {
  --bg: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --accent: #2563eb;
  --accent-2: #4f46e5;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.08);
  --max: 1040px;
  --radius-xl: 28px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(59, 130, 246, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(99, 102, 241, 0.08), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black, transparent 85%);
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.header {
  padding: 28px 0 0;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-link {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(180deg, #4f8ef7 0%, #2563eb 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.24);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.03em;
  color: var(--text);
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.05s forwards;
}

.brand-logo {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  overflow: hidden;
  display: block;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 40px 0 72px;
}

.main-home {
  align-items: flex-start;
  padding: 32px 0 64px;
}

.main-download {
  align-items: center;
}

/* —— 介绍页 —— */

.hero {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
  opacity: 0;
  animation: rise 0.85s var(--ease) 0.08s forwards;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 5.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.045em;
  color: var(--text);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #2563eb, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 28px;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.8;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #4f8ef7 0%, #2563eb 100%);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 8px 24px rgba(37, 99, 235, 0.28);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.btn-primary svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 14px 32px rgba(37, 99, 235, 0.36);
}

.section-title {
  margin: 0 0 24px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text);
}

.features {
  margin-bottom: 56px;
  opacity: 0;
  animation: rise 0.85s var(--ease) 0.2s forwards;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-card .highlight-icon {
  margin-bottom: 14px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.steps {
  margin-bottom: 56px;
  opacity: 0;
  animation: rise 0.85s var(--ease) 0.26s forwards;
}

.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
  margin-inline: auto;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.step-item strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.step-item span {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cta-banner {
  opacity: 0;
  animation: rise 0.85s var(--ease) 0.32s forwards;
}

.cta-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(99, 102, 241, 0.04));
  box-shadow: var(--shadow-md);
}

.cta-banner-inner h2 {
  margin: 0 0 6px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.cta-banner-inner p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* —— 下载页 —— */

.download-page {
  width: min(480px, 100%);
  margin: 0 auto;
}

.download-header {
  text-align: center;
  margin-bottom: 28px;
  opacity: 0;
  animation: rise 0.85s var(--ease) 0.08s forwards;
}

.download-header h1 {
  margin: 0 0 12px;
  font-size: clamp(1.875rem, 4vw, 2.375rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: var(--text);
}

.download-header p {
  margin: 0 auto;
  max-width: 420px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.platform-tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  animation: rise 0.85s var(--ease) 0.12s forwards;
}

.platform-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.platform-tab-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.75;
}

.platform-tab:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}

.platform-tab.active {
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.platform-tab.active .platform-tab-icon {
  opacity: 1;
  color: var(--accent);
}

.platform-tab-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.download-panel {
  padding: 24px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  animation: rise 0.85s var(--ease) 0.16s forwards;
}

.download-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.download-panel-info {
  flex: 1;
  min-width: 0;
}

.download-panel-info h2 {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.download-panel-info p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.platform-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.04));
  border: 1px solid rgba(37, 99, 235, 0.12);
  display: grid;
  place-items: center;
}

.platform-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
}

.download-notes {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.download-requirements {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  opacity: 0;
  animation: rise 0.85s var(--ease) 0.2s forwards;
}

.download-requirements li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.download-requirements li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.35);
}

.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}

.intro {
  opacity: 0;
  animation: rise 0.85s var(--ease) 0.1s forwards;
}

.intro-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-sm);
}

.intro-label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.45);
}

.intro h1 {
  margin: 0 0 16px;
  font-size: clamp(2.25rem, 4.8vw, 3.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.045em;
  color: var(--text);
}

.intro h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #2563eb, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro > p {
  margin: 0 0 32px;
  max-width: 420px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}

.highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.highlight:hover {
  background: var(--surface-strong);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.highlight-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
}

.highlight-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
}

.highlight-text strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1px;
  color: var(--text);
}

.highlight-text span {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.card-wrap {
  opacity: 0;
  animation: rise 0.85s var(--ease) 0.2s forwards;
}

.card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(160deg, rgba(255,255,255,0.95), rgba(226, 232, 240, 0.6) 45%, rgba(203, 213, 225, 0.4));
  box-shadow: var(--shadow-lg);
}

.card-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.1), transparent 55%);
  pointer-events: none;
}

.card-inner {
  position: relative;
  padding: 28px;
  border-radius: calc(var(--radius-xl) - 1px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.os-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.os-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.04));
  border: 1px solid rgba(37, 99, 235, 0.12);
  display: grid;
  place-items: center;
}

.os-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
}

.os-info h2 {
  margin: 0 0 2px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.os-info p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.version-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(37, 99, 235, 0.14);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.version-pill.loading {
  color: transparent;
  background: rgba(15, 23, 42, 0.06);
  border-color: transparent;
  animation: pulse 1.2s ease infinite;
  min-width: 56px;
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #4f8ef7 0%, #2563eb 100%);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 8px 24px rgba(37, 99, 235, 0.28);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), opacity 0.28s;
}

.btn-download svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.btn-download:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 14px 32px rgba(37, 99, 235, 0.36);
}

.btn-download:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-download.btn-download-muted:disabled {
  opacity: 1;
  background: #f1f5f9;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-download.ready:not(:disabled) {
  animation: glow 2.8s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 8px 24px rgba(37, 99, 235, 0.28); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 12px 32px rgba(37, 99, 235, 0.38); }
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.meta-chip svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
}

.alert {
  display: none;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.alert.show { display: block; }
.alert-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
}

.notes-title {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.notes-body {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.75;
  white-space: pre-wrap;
}

.notes-empty {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.footer {
  padding: 20px 0 32px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.32s forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 24px;
}

.error-code {
  margin: 24px 0 10px;
  font-size: clamp(4rem, 12vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--text-secondary);
  line-height: 1;
}

.error-page p {
  margin: 0 0 24px;
  color: var(--text-secondary);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.24);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn-back:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn-back-outline {
  background: var(--surface-strong);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: var(--shadow-sm);
}

.btn-back-outline:hover {
  background: #fff;
  box-shadow: var(--shadow-md);
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 32px; }
  .intro > p { max-width: none; }
  .main { padding: 24px 0 48px; }
  .platform-tab { padding: 10px 8px; font-size: 0.8125rem; }
  .platform-tab-badge { display: none; }
  .download-panel { padding: 20px; }
  .download-panel-head { flex-wrap: wrap; }
  .download-panel-head .version-pill { margin-left: auto; }
  .features-grid { grid-template-columns: 1fr; }
  .cta-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .cta-banner-inner .btn-primary { width: 100%; }
  .header-inner { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .brand, .intro, .card-wrap, .footer,
  .hero, .features, .steps, .cta-banner,
  .download-header, .platform-tabs, .download-panel, .download-requirements { opacity: 1; transform: none; }
}
