/**
 * 上海梅林红包 H5 — 公共样式
 * 设计稿尺寸 750 × 1476。
 * 1rem = 100 设计像素（375 宽屏幕上 1rem = 50px）。
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* 脚本加载前的兜底缩放，common.js 会按实际宽度再写一次 */
  font-size: calc(100vw / 7.5);
}

@media (min-width: 750px) {
  html {
    font-size: 100px;
  }
}

html,
body {
  height: 100%;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #d5d8e0;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
}

/* 单屏页面：宽 7.5rem，高 14.76rem，与设计稿一一对应 */
.page {
  position: relative;
  width: 7.5rem;
  height: 14.76rem;
  margin: 0 auto;
  overflow: hidden;
  background-color: #023793;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
}

/* 红色顶栏上的文字入口 */
.nav-link {
  position: absolute;
  top: 0.22rem;
  z-index: 5;
  height: 0.48rem;
  padding: 0 0.22rem;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 0.24rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.24rem;
  line-height: 0.46rem;
  text-decoration: none;
}

.nav-link-back {
  left: 0.24rem;
}

.nav-link-rule {
  right: 0.24rem;
}

/* H5 轻提示 / 登录成功态 */
.hb-toast-root {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  pointer-events: none;
}

.hb-toast-root.hb-toast-root--dim {
  background: rgba(8, 12, 28, 0.42);
  pointer-events: auto;
}

.hb-toast-root.hb-toast-fade-out .hb-toast-card {
  opacity: 0;
  transform: scale(0.92) translateY(0.12rem);
}

.hb-toast-card {
  width: 5.6rem;
  max-width: 100%;
  padding: 0.44rem 0.4rem 0.4rem;
  border-radius: 0.28rem;
  background: linear-gradient(165deg, #ff6f62 0%, #ff4a44 42%, #e8221c 100%);
  box-shadow: 0 0.14rem 0.36rem rgba(120, 10, 0, 0.32);
  text-align: center;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.34, 1.35, 0.64, 1);
  pointer-events: auto;
}

.hb-toast-root.is-show .hb-toast-card {
  opacity: 1;
  transform: scale(1);
}

.hb-toast-card--plain {
  width: auto;
  min-width: 3.2rem;
  max-width: 6rem;
  padding: 0.22rem 0.36rem;
  border-radius: 0.4rem;
  background: rgba(20, 24, 40, 0.88);
  box-shadow: 0 0.08rem 0.24rem rgba(0, 0, 0, 0.22);
}

.hb-toast-icon {
  width: 0.88rem;
  height: 0.88rem;
  margin: 0 auto 0.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.48rem;
  font-weight: 800;
  line-height: 0.88rem;
  text-align: center;
}

.hb-toast-icon--spin {
  position: relative;
  font-size: 0;
}

.hb-toast-icon--spin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.44rem;
  height: 0.44rem;
  margin: -0.22rem 0 0 -0.22rem;
  border: 0.04rem solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: hb-toast-spin 0.75s linear infinite;
}

@keyframes hb-toast-spin {
  to {
    transform: rotate(360deg);
  }
}

.hb-toast-title {
  color: #fff;
  font-size: 0.36rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.02rem;
}

.hb-toast-sub {
  margin-top: 0.12rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.28rem;
  line-height: 1.45;
}

.hb-toast-plain {
  color: #fff;
  font-size: 0.28rem;
  line-height: 1.45;
}
