/* ========== Reset & Base ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/*
  响应式 rem：设计基准 375 宽 → 1rem = 16px
  - 小屏（如 iPhone5 320）按 vw 等比缩小
  - ≥375 封顶 16px，PC 居中页不再继续放大
*/
html {
  font-size: clamp(12.8px, 4.26666667vw, 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #0d0d12;
  color: #fff;
  line-height: 1.4;
  min-height: 100vh;
  font-size: 0.875rem;
}

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

img {
  display: block;
  max-width: 100%;
}

/* ========== Layout: mobile full / PC centered ========== */
.page {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0d0d12;
  padding-bottom: 6.5rem;
}

/* ========== Header ==========
   设计稿：背景按 bg.png 原始比例铺满宽度（750:406），
   logo 与永久地址间距约 15px，内容高度随内容走，不靠 space-between 撑开
*/
.header {
  position: relative;
  z-index: 0;
  width: 100%;
}

.header__bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 0;
  aspect-ratio: 750 / 406;
  pointer-events: none;
  overflow: hidden;
}

.header__bg-img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

.header__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 13, 18, 0.1) 0%,
    rgba(13, 13, 18, 0.18) 55%,
    rgba(13, 13, 18, 0.45) 82%,
    rgba(13, 13, 18, 0.82) 100%
  );
}

.header__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0.9375rem; /* 设计稿约 15px */
  padding: 0.875rem 1rem 0.75rem;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
}

.brand__logo {
  width: min(13.75rem, 58vw);
  height: auto;
}

/* 设计稿约屏宽 43%，明显窄于内容卡片 */
.address-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  width: 45%;
  min-width: 9.5rem;
  max-width: 11.5rem;
  margin-inline: auto;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  background: #e65467;
  text-align: center;
  flex-shrink: 0;
}

.address-card__label {
  font-size: 0.875rem;
  color: #fff;
  line-height: 1.2;
}

.address-card__url {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
  color: #fff;
}

/* ========== Main ========== */
.main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
  padding: 0 1rem;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.section__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
}

/* ========== App Download List ========== */
.app-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem;
  border-radius: 0.75rem;
  background: #fff;
}

.app-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  object-fit: cover;
  flex-shrink: 0;
}

.app-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-card__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}

.app-card__desc {
  font-size: 0.6875rem;
  color: #999;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-card__action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.375rem;
  flex-shrink: 0;
}

/* ========== H5 Grid ========== */
.h5-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.h5-card {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4375rem 0.5rem;
  border-radius: 0.75rem;
  background: #fff;
  min-width: 0;
}

.h5-card__icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  object-fit: cover;
  flex-shrink: 0;
}

.h5-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
}

.h5-card__name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== Shared: latency & button ========== */
.latency {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #2ed573;
  line-height: 1.2;
}

.btn-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 1.625rem;
  padding: 0 0.75rem;
  border-radius: 0.8125rem;
  background: #e65467;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.btn-enter--sm {
  min-width: 2rem;
  height: 1.25rem;
  padding: 0 0.4375rem;
  font-size: 0.625rem;
  border-radius: 0.625rem;
  flex-shrink: 0;
}

/* ========== Footer: fixed + 半透明（对齐 114） ========== */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  max-width: 500px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.625rem;
  padding: 0.75rem 1rem 0.875rem;
  background: rgba(0, 0, 0, 0.7);
}

.footer__tg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.625rem;
  border-radius: 0.75rem;
  background: #e65467;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
}

.footer__tip {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.6875rem;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  line-height: 1.4;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.footer__tip:active {
  opacity: 0.75;
}

/* ========== PC ========== */
@media (min-width: 501px) {
  body {
    background: #050508;
  }

  .page {
    box-shadow: 0 0 2.5rem rgba(0, 0, 0, 0.45);
  }
}
