:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #697387;
  --line: #dfe5ee;
  --accent: #216bff;
  --accent-dark: #164fc2;
  --accent-soft: #eef4ff;
  --green: #0f8a63;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 56px;
  background: rgba(247, 248, 251, 0.9);
  border-bottom: 1px solid rgba(223, 229, 238, 0.78);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--text);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav a {
  padding: 8px 12px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

main {
  width: calc(100% - 40px);
  max-width: 1080px;
  margin: 0 auto;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 76px 0 42px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-text {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(33, 107, 255, 0.16);
  border-radius: 8px;
  font-weight: 720;
}

.hero-link:hover,
.hero-link:focus-visible {
  border-color: rgba(33, 107, 255, 0.38);
  outline: none;
}

.section {
  margin: 28px 0;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.download-list {
  display: grid;
  gap: 12px;
}

.download-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 94px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.download-item:hover {
  border-color: rgba(33, 107, 255, 0.32);
  box-shadow: 0 10px 28px rgba(33, 107, 255, 0.08);
}

.download-item.is-current {
  border-color: rgba(33, 107, 255, 0.68);
  background: linear-gradient(0deg, rgba(33, 107, 255, 0.055), rgba(33, 107, 255, 0.055)), #fff;
  box-shadow: 0 16px 36px rgba(33, 107, 255, 0.14);
}

.download-item.is-current .system-icon {
  border-color: rgba(33, 107, 255, 0.32);
}

.current-system-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.download-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.system-icon {
  flex: 0 0 46px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(33, 107, 255, 0.12);
  border-radius: 8px;
}

.system-icon img {
  display: block;
  width: 23px;
  height: 23px;
}

.android-icon {
  background: rgba(15, 138, 99, 0.1);
  border-color: rgba(15, 138, 99, 0.16);
}

.apple-icon {
  background: #f4f6f8;
  border-color: rgba(23, 32, 51, 0.1);
}

.tutorial-item {
  background: linear-gradient(0deg, rgba(15, 138, 99, 0.06), rgba(15, 138, 99, 0.06)), #fff;
  border-color: rgba(15, 138, 99, 0.22);
}

.platform {
  display: inline-flex;
  margin: 0 0 6px;
  padding: 3px 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 780;
}

.tutorial-item .platform {
  color: var(--green);
  background: rgba(15, 138, 99, 0.1);
}

.download-item h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 760;
  white-space: nowrap;
}

.primary-btn {
  color: #fff;
  background: var(--accent);
}

.primary-btn:hover,
.primary-btn:focus-visible {
  background: var(--accent-dark);
  outline: none;
}

.secondary-btn {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.secondary-btn:hover,
.secondary-btn:focus-visible {
  color: var(--accent);
  border-color: rgba(33, 107, 255, 0.42);
  background: var(--accent-soft);
  outline: none;
}

.help-section {
  margin-bottom: 48px;
}

.tips {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

summary {
  min-height: 58px;
  padding: 17px 18px;
  cursor: pointer;
  font-weight: 760;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 800;
}

details[open] summary::after {
  content: "-";
}

.tip-content {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}

.tip-content p {
  margin: 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  min-width: 160px;
  max-width: calc(100% - 40px);
  padding: 12px 16px;
  color: #fff;
  background: rgba(23, 32, 51, 0.94);
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

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

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: calc(100% - 40px);
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 0 38px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .site-header {
    min-height: auto;
    padding: 16px 20px;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  main,
  .site-footer {
    width: calc(100% - 28px);
    max-width: 1080px;
  }

  .hero {
    display: block;
    padding: 44px 0 24px;
  }

  h1 {
    font-size: 32px;
    line-height: 1.12;
    word-break: break-word;
  }

  .hero-link {
    margin-top: 22px;
    width: 100%;
  }

  .section {
    padding: 20px;
  }

  .section-heading {
    display: block;
  }

  .download-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .download-copy {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .actions {
    width: 100%;
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}
