:root {
  --bg-main: #070a46;
  --bg-glow: #121867;
  --text-main: #f4f5ff;
  --text-subtle: rgba(228, 232, 255, 0.76);
  --btn-dark: #171c64;
  --btn-line: rgba(242, 247, 255, 0.65);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at 45% -12%, #232d92 0%, #10165f 32%, #060a43 62%, #050634 100%);
}

.page {
  min-height: 100dvh;
}

.download-card {
  min-height: 100dvh;
  width: 100%;
  position: relative;
  overflow: hidden;
  padding: 92px 24px 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.download-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 14%, rgba(148, 173, 255, 0.38) 0 9%, transparent 19%),
    radial-gradient(circle at 102% 52%, rgba(255, 150, 79, 0.92) 0 11%, rgba(255, 104, 52, 0.28) 12% 16%, transparent 18%),
    radial-gradient(circle at 100% 55%, rgba(255, 230, 130, 0.52) 0 2.4%, transparent 5%);
  pointer-events: none;
}

.planet {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.planet-left {
  width: 170px;
  height: 170px;
  top: -68px;
  left: -56px;
  background: radial-gradient(circle at 64% 40%, #5f7ee7 0%, #3557be 56%, #1f3587 100%);
  opacity: 0.8;
}

.planet-right {
  width: 132px;
  height: 132px;
  right: -54px;
  top: 270px;
  background: radial-gradient(circle at 44% 36%, #ffc05a 0%, #ff993f 36%, #ff6d37 74%, #eb4f2f 100%);
  box-shadow: 0 0 24px rgba(255, 170, 88, 0.65);
  opacity: 0.92;
}

.star {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9fc7ff;
  box-shadow: 0 0 8px rgba(165, 200, 255, 0.7);
}

.star-a {
  top: 210px;
  left: 28px;
}

.star-b {
  top: 452px;
  right: 36px;
}

.star-c {
  bottom: 186px;
  right: 54px;
}

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
}

.app-icon-box {
  width: 108px;
  height: 108px;
  margin: 0 auto;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f4f6fb);
  padding: 12px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.42);
  display: grid;
  place-items: center;
}

.app-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.brand {
  margin: 24px 0 0;
  font-size: clamp(30px, 7.6vw, 44px);
  line-height: 1.02;
  letter-spacing: 1px;
  font-weight: 500;
  color: var(--text-main);
}

.download-actions {
  position: relative;
  z-index: 1;
  width: min(94vw, 560px);
  margin-top: 140px;
  display: grid;
  gap: 18px;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-height: 66px;
  border-radius: 10px;
  text-decoration: none;
  padding: 0 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.android-btn {
  background: linear-gradient(180deg, #fcfdff, #f3f6ff);
  color: #2a2d5c;
  box-shadow: 0 10px 22px rgba(4, 6, 34, 0.38);
}

.ios-btn {
  background: rgba(10, 14, 70, 0.12);
  border: 2px solid var(--btn-line);
  color: #eef1ff;
}

.download-btn:hover {
  transform: translateY(-1px);
}

.platform-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
}

.platform-icon svg {
  width: 24px;
  height: 24px;
}

.android-icon {
  background: #4f66cf;
  box-shadow: 0 0 10px rgba(79, 102, 207, 0.55);
}

.ios-icon {
  background: #5f83de;
  box-shadow: 0 0 10px rgba(95, 131, 222, 0.5);
}

.btn-text {
  font-size: clamp(16px, 2.9vw, 21px);
  line-height: 1.1;
  font-weight: 700;
}

.tutorial-link {
  position: relative;
  z-index: 1;
  margin-top: 50px;
  color: rgba(235, 241, 255, 0.9);
  font-size: clamp(15px, 3vw, 18px);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.site-link {
  position: relative;
  z-index: 1;
  margin: auto 0 0;
  padding-top: 34px;
  color: var(--text-subtle);
  font-size: clamp(14px, 2.5vw, 17px);
}

.browser-guide {
  position: fixed;
  inset: 0;
  z-index: 50;
  backdrop-filter: blur(2px);
  background: rgba(19, 26, 52, 0.42);
  display: block;
  padding: 0;
}

.browser-guide.hidden {
  display: none;
}

.guide-panel {
  position: relative;
  width: 100%;
  height: 100dvh;
  max-width: 100%;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.guide-arrow {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  right: 8px;
  width: min(42vw, 170px);
  opacity: 0.96;
}

.guide-arrow svg {
  display: block;
  width: 100%;
  height: auto;
}

.guide-content {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  padding: 0 24px;
}

.guide-title {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 6.8vw, 34px);
  line-height: 1.24;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
}

.guide-env {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(12px, 3.2vw, 16px);
  line-height: 1.5;
}

.guide-copy-btn {
  min-width: min(72vw, 250px);
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 999px;
  padding: 9px 16px;
  color: #232323;
  background: linear-gradient(180deg, #ffffff, #f4f4f4);
  font-size: clamp(13px, 3.2vw, 16px);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.guide-copy-btn:active {
  transform: translateY(1px);
}

body.lock-scroll {
  overflow: hidden;
}

@media (max-width: 560px) {
  .download-card {
    padding: 78px 22px 36px;
  }

  .planet-left {
    width: 146px;
    height: 146px;
  }

  .planet-right {
    width: 112px;
    height: 112px;
    top: 280px;
  }

  .app-icon-box {
    width: 92px;
    height: 92px;
    border-radius: 14px;
    padding: 10px;
  }

  .brand {
    margin-top: 20px;
    font-size: clamp(26px, 7.5vw, 36px);
  }

  .download-actions {
    margin-top: 122px;
    gap: 16px;
  }

  .download-btn {
    min-height: 60px;
    gap: 14px;
    border-radius: 8px;
    padding: 0 18px;
  }

  .platform-icon {
    width: 34px;
    height: 34px;
  }

  .platform-icon svg {
    width: 20px;
    height: 20px;
  }

  .btn-text {
    font-size: clamp(14px, 4.2vw, 17px);
  }

  .tutorial-link {
    margin-top: 42px;
    font-size: clamp(13px, 3.6vw, 16px);
    text-underline-offset: 4px;
  }

  .site-link {
    padding-top: 26px;
    font-size: clamp(12px, 3.3vw, 15px);
  }

  .guide-content {
    gap: 12px;
    padding: 0 18px;
  }

  .guide-title {
    font-size: clamp(22px, 6.8vw, 28px);
  }

  .guide-env {
    font-size: clamp(11px, 3.3vw, 14px);
  }
}
