:root {
  color-scheme: light dark;
  --bg: #f5f7ff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --text: #171a25;
  --muted: #6d7180;
  --line: rgba(43, 49, 76, 0.1);
  --primary: #5b5ce2;
  --primary-deep: #4143c8;
  --primary-soft: #eeefff;
  --shadow: 0 24px 70px rgba(55, 60, 110, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 5%, rgba(123, 125, 255, 0.2), transparent 32rem),
    radial-gradient(circle at 88% 22%, rgba(81, 205, 197, 0.13), transparent 28rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(91, 92, 226, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(91, 92, 226, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  content: "";
  pointer-events: none;
}

.page-shell {
  width: min(100% - 32px, 960px);
  margin: 0 auto;
  padding: 72px 0 30px;
}

.hero {
  max-width: 680px;
  margin: 0 auto 44px;
  text-align: center;
}

.brand-mark {
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: 0 18px 44px rgba(66, 68, 172, 0.2);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 23px;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5.5vw, 54px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.intro {
  max-width: 540px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.platform-hint {
  min-height: 24px;
  margin-top: 18px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 650;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 780px;
  margin: 0 auto;
}

.download-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.download-card::after {
  position: absolute;
  top: -72px;
  right: -72px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--primary-soft);
  content: "";
  pointer-events: none;
}

.download-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 76px rgba(55, 60, 110, 0.18);
}

.card-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.platform-icon {
  display: grid;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 16px;
  color: white;
}

.platform-icon svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.android-icon {
  background: linear-gradient(145deg, #42c98b, #16a267);
}

.ios-icon {
  background: linear-gradient(145deg, #343640, #090a0d);
}

.platform-name,
.platform-copy {
  margin: 0;
}

.platform-name {
  font-size: 18px;
  font-weight: 800;
}

.platform-copy {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.qr-frame {
  width: min(100%, 224px);
  margin: 26px auto 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
}

.qr-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.scan-tip {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.download-button {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 12px 24px rgba(76, 78, 211, 0.24);
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease;
}

.download-button:hover {
  filter: brightness(1.07);
}

.download-button:active {
  transform: scale(0.98);
}

.download-button.is-unavailable {
  cursor: not-allowed;
  opacity: 0.5;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 42px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

footer p {
  margin: 0;
}

footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  color: #7d2600;
  background: #fff0e8;
  text-align: center;
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 28px, 520px);
    padding-top: max(44px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .hero {
    margin-bottom: 30px;
  }

  .brand-mark {
    width: 80px;
    height: 80px;
    border-radius: 24px;
  }

  .brand-mark img {
    border-radius: 19px;
  }

  .intro {
    font-size: 15px;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    padding: 22px;
    border-radius: 26px;
  }

  footer {
    flex-direction: column;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090b12;
    --surface: rgba(24, 27, 39, 0.82);
    --surface-strong: #181b27;
    --text: #f5f5fb;
    --muted: #a5a8b5;
    --line: rgba(255, 255, 255, 0.09);
    --primary: #9294ff;
    --primary-deep: #6769e9;
    --primary-soft: rgba(114, 116, 240, 0.12);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  }

  body {
    background:
      radial-gradient(circle at 12% 5%, rgba(92, 94, 226, 0.25), transparent 32rem),
      radial-gradient(circle at 88% 22%, rgba(40, 157, 151, 0.12), transparent 28rem),
      var(--bg);
  }

  .brand-mark {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
