* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: calc(100vw / 7.5);
}

@media (min-width: 480px) {
  html {
    font-size: 64px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #1a0a40;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: linear-gradient(180deg, #3d2080 0%, #301a6b 40%, #251456 100%);
  overflow: hidden;
}

/* 主视觉 — 裁剪至角色区域，避免与设计稿内嵌按钮重叠 */
.hero {
  position: relative;
  width: 100%;
  height: 9.6rem;
  /* overflow: hidden; */
  line-height: 0;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* 下载按钮区 */
.download-area {
  position: relative;
  margin: -0.6rem auto 0;
  width: 3.0rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  z-index: 5;
}

.btn-download {
  display: block;
  width: 100%;
  text-decoration: none;
  transition: transform 0.15s ease;
  cursor: pointer;
}

.btn-download-img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.btn-download:active {
  transform: scale(0.97);
}

/* 底部统计栏 */
.stats-bar {
  position: relative;
  margin: 0.5rem auto 0.4rem;
  width: 6.6rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(20, 8, 50, 0.75);
  border-radius: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 5;
  margin-top: 1.4rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06rem;
}

.stat-label {
  font-size: 0.22rem;
  color: rgba(255, 255, 255, 0.55);
}

.stat-value {
  font-size: 0.32rem;
  font-weight: 700;
  color: #fff;
}

/* 客服浮动按钮 */
.cs-btn {
  position: fixed;
  left: calc(50% - 3.4rem - 0.1rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

@media (min-width: 480px) {
  .cs-btn {
    left: calc(50% - 240px - 0.55rem);
  }
}

.cs-icon-img {
  width: 0.88rem;
  height: auto;
  display: block;
  pointer-events: none;
}

/* 客服弹框 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
}

.modal-mask[hidden] {
  display: none;
}

.modal-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  animation: modalIn 0.25s ease;
}

.modal-card {
  width: 5.4rem;
  background: #fff;
  border-radius: 0.32rem;
  padding: 0.48rem 0.4rem 0.4rem;
  text-align: center;
}

.modal-qr {
  width: 2.12rem;
  height: 2.12rem;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.modal-desc {
  margin-top: 0.28rem;
  font-size: 0.26rem;
  color: #b0b0b0;
  line-height: 1.4;
}

.modal-action {
  display: block;
  width: 50%;
  height: 0.6rem;
  border: none;
  border-radius: 0.44rem;
  background: #00a0e9;
  color: #fff;
  font-size: 0.28rem;
  font-weight: 600;
  letter-spacing: 0.04rem;
  cursor: pointer;
  margin: 0 auto;
  margin-top: 0.25rem;
}

.modal-close {
  width: 0.56rem;
  height: 0.56rem;
  border: none;
  border-radius: 50%;
  background: #00a0e9;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-close-icon {
  position: relative;
  width: 0.24rem;
  height: 0.24rem;
}

.modal-close-icon::before,
.modal-close-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.24rem;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

.modal-close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 微信内打开提示 */
.wechat-tip {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.3rem 0.5rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.wechat-tip.show {
  opacity: 1;
}

.wechat-tip-arrow {
  width: 1.2rem;
  height: 1.2rem;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  transform: rotate(-45deg);
  margin-bottom: 0.4rem;
  margin-right: 0.2rem;
}

.wechat-tip p {
  color: #fff;
  font-size: 0.32rem;
  line-height: 1.8;
  text-align: right;
}

.wechat-tip strong {
  font-size: 0.48rem;
  color: #ffe566;
}

/* 安全区适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .stats-bar {
    margin-bottom: calc(0.4rem + env(safe-area-inset-bottom));
  }
}
