:root {
  --primary: #ff8a4c;
  --primary-deep: #ff6a3c;
  --text-dark: #3f2d22;
  --text-light: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fff5ef;
}

body.wechat-mask-open {
  overflow: hidden;
}

.page {
  min-height: 100vh;
  max-width: 750px;
  margin: 0 auto;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff5ef url("./appBg.png") center top / cover no-repeat;
}

.center-content {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.invite-card {
  width: min(86%, 420px);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  gap: 8px;
}

.invite-label {
  font-size: 18px;
  color: var(--text-dark);
  font-weight: 700;
}

.invite-code {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #6b6bff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1px;
}

.copy-btn {
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  color: var(--text-light);
  font-size: 16px;
  font-weight: 700;
  padding: 8px 14px;
}

.app-area {
  width: 100%;
  text-align: center;
}

.app-logo-wrap {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.82);
}

.app-name {
  margin: 10px 0 0;
  color: var(--text-dark);
  font-size: 24px;
  font-weight: 700;
}

.download-btn {
  width: min(74%, 360px);
  margin-top: 8px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-deep), #ffb15b);
  color: var(--text-light);
  font-size: 30px;
  font-weight: 700;
  padding: 14px 18px;
  box-shadow: 0 12px 22px rgba(255, 99, 59, 0.25);
}

.tip {
  margin: 8px 0 0;
  color: #7d5f4f;
  font-size: 15px;
  text-align: center;
}

.wechat-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
}

.wechat-mask-arrow {
  margin: calc(10px + env(safe-area-inset-top)) 18px 0 0;
  text-align: right;
  font-size: 46px;
  line-height: 1;
}

.wechat-mask-panel {
  width: min(86vw, 520px);
  margin: 14px auto 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.wechat-mask-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.wechat-mask-text {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .page {
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
  }

  .center-content {
    gap: 10px;
  }

  .invite-card {
    width: min(92%, 360px);
    padding: 8px 10px;
    border-radius: 10px;
  }

  .invite-label {
    font-size: 15px;
  }

  .invite-code {
    font-size: 22px;
    max-width: 120px;
  }

  .copy-btn {
    font-size: 14px;
    padding: 6px 10px;
  }

  .app-logo-wrap {
    width: 152px;
    height: 152px;
  }

  .app-name {
    font-size: 20px;
  }

  .download-btn {
    width: min(78%, 300px);
    font-size: 24px;
    padding: 12px 12px;
  }

  .tip {
    font-size: 13px;
  }

  .wechat-mask-arrow {
    font-size: 38px;
    margin-right: 12px;
  }

  .wechat-mask-panel {
    width: calc(100% - 24px);
    margin-top: 10px;
    padding: 14px;
  }

  .wechat-mask-title {
    font-size: 18px;
  }

  .wechat-mask-text {
    font-size: 14px;
  }
}
