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

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

body {
  background: #ffd0d0;
  color: #343434;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  background: #ffd0d0 url("../imgs/bg.jpg") top center / cover no-repeat;
}

.hero-section {
  padding: 30px 0 0;
  margin-top: 0;
}

.hero-section__bg {
  width: 100%;
}

.hero-banner {
  width: 100%;
  height: auto;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  padding: 20px 19%;
}

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 410 / 85;
  gap: 8px;
  background: transparent url("../imgs/action_btn.png") center / 100% 100% no-repeat;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.cta-btn:active,
.nav-item:active,
.modal-link-btn:active,
.verify-submit:active {
  transform: scale(0.98);
}

.cta-btn__icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.cta-btn__text {
  color: #fff9f0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(120, 0, 0, 0.28);
}

.promo-block {
  position: relative;
}

.promo-bottom {
  position: relative;
  margin-top: -25px;
  padding-bottom: 20px;
}

.promo-ribbon {
  position: relative;
  z-index: 2;
  margin-bottom: -70px;
}

.promo-ribbon img {
  width: 100%;
  margin: 42px auto;
}

.promo-ribbon__deco-1,
.promo-ribbon__deco-2 {
  position: absolute;
  z-index: 10;
  width: 70px;
  height: 70px;
}

.promo-ribbon__deco-1 {
  top: 35%;
  right: 3%;
}

.promo-ribbon__deco-2 {
  bottom: 30px;
  left: 0;
}

.promo-features {
  position: relative;
  display: block;
  margin: -132px 40px 0;
  padding: 0;
  aspect-ratio: 1340 / 510;
  border-radius: 16px;
  background: url("../imgs/promo_feature_bg.png") top center / 100% 100% no-repeat;
}

.promo-features__item {
  position: absolute;
  left: 24%;
  right: 5%;
  display: flex;
  align-items: center;
  height: 22%;
  min-width: 0;
  transform: translateY(-50%);
}

.promo-features__item:nth-child(1) {
  top: 29.5%;
}

.promo-features__item:nth-child(2) {
  top: 58%;
}

.promo-features__item:nth-child(3) {
  top: 86%;
}

.promo-features__bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  color: #480a00;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.promo-features__bar strong {
  color: #f00;
}

.top-bar {
  position: fixed;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  z-index: 29;
  display: flex;
  align-items: center;
  width: calc(100% - 3.2%);
  max-width: 580px;
  min-height: 62px;
  padding: 0 10px;
  color: #fff;
  background: rgba(170, 0, 0, 0.55);
  border-radius: 21px;
  transform: translateX(-50%);
}

.top-bar__close {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 2;
  width: 24px;
  height: 24px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  border-radius: 50%;
  font-size: 14px;
  line-height: 24px;
}

.top-bar__logo {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
}

.top-bar__text {
  flex: 1;
  min-width: 0;
  padding-left: 5px;
  overflow: hidden;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.top-bar__btn {
  width: 141px;
  background: transparent;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  max-width: 600px;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fce6e6;
  border-radius: 18px 18px 0 0;
  transform: translateX(-50%);
}

.nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  min-width: 70px;
  color: #480a00;
  background: transparent;
}

.nav-item__icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav-item__label {
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 0;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0);
  visibility: hidden;
  pointer-events: none;
  transition: background 0.25s ease, visibility 0.25s ease;
}

.modal-overlay > * {
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.modal-overlay.active {
  background: rgba(0, 0, 0, 0.7);
  visibility: visible;
  pointer-events: auto;
}

.modal-overlay.active > * {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.modal-title-img {
  flex-shrink: 0;
  width: min(450px, 86vw);
  height: auto;
  margin: 0 auto;
}

.modal-container {
  position: relative;
  flex-shrink: 0;
  width: min(90vw, 450px);
  overflow: visible;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffd0d0 0%, #fff 100%);
}

.modal-container-bg {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: url("../imgs/modal-bg.png") top center / contain no-repeat;
}

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

.modal-logo-bg {
  width: 85%;
  margin: 0 auto;
}

.modal-logo-img {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 40%;
  transform: translateX(-50%);
}

.modal-body {
  position: relative;
  z-index: 1;
  padding: 10px 24px 30px;
}

.modal-title {
  margin: 10px 0 25px;
  color: #8c2b02;
  font-size: 32px;
  font-weight: 800;
  text-align: center;
}

.modal-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  color: #fff;
  background: linear-gradient(145deg, #ef5151 20%, #e2221c 85%);
  border: 1px solid #fff6a7;
  border-radius: 42px;
  box-shadow: 0 4px 4px rgba(255, 128, 109, 0.35);
  font-size: 18px;
}

.modal-close {
  position: relative;
  z-index: 101;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: 20px 0;
  background: transparent;
}

.form-grid {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 8px 0;
  align-items: center;
  padding: 10px 0;
}

.form-grid dt {
  color: #8c2b02;
  font-size: 0.9rem;
  font-weight: 800;
}

.form-grid dd {
  position: relative;
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  color: #fff;
  background: #ef5151;
  border-radius: 0.6rem 0 0 0.6rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.flag-cn {
  width: 20px;
  height: 20px;
  margin-right: 4px;
}

.form-control {
  width: 100%;
  height: 2.8rem;
  padding: 0 0.8rem;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.6rem;
  outline: 0;
}

.input-group .form-control {
  border-radius: 0 0.6rem 0.6rem 0;
}

.form-control::placeholder {
  color: #b1b1b1;
  font-size: 0.85rem;
}

.form-control:focus {
  border-color: #ef5151;
}

.field-icon {
  position: absolute;
  top: 9px;
  left: 6px;
  z-index: 2;
  width: 28px;
}

.has-icon {
  padding-left: 2.1rem;
}

.error-message {
  min-height: 14px;
  margin-top: 2px;
  color: #ff5353;
  font-size: 12px;
}

.checking .form-control {
  padding-right: 9.5rem;
}

.checking-box {
  position: absolute;
  top: 0;
  right: 0;
  width: 9rem;
  height: 2.8rem;
  color: #fff;
  border-radius: 0 0.6rem 0.6rem 0;
}

.captcha-box {
  color: #6b1000;
  background:
    repeating-linear-gradient(25deg, rgba(236, 40, 20, 0.15) 0 5px, rgba(255, 220, 160, 0.28) 5px 10px),
    #fff3c5;
  border-left: 1px solid #f0b69d;
  font-weight: 800;
  letter-spacing: 2px;
}

.send-otp {
  background: linear-gradient(180deg, #ff2e0d 0%, #f01b1b 50%);
  font-size: 0.9rem;
  font-weight: 600;
}

.send-otp.disabled {
  background: #999;
  cursor: not-allowed;
}

.verify-submit {
  display: block;
  width: 100%;
  height: 52px;
  margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(180deg, #eac9c1 0%, #ff8466 26%, #ff321b 72%, #ff5941 118%);
  border-radius: 56px;
  box-shadow: 0 10px 18.7px rgba(255, 87, 87, 0.33), inset 0 4px 28px rgba(255, 255, 255, 0.25);
  font-size: 22px;
  font-weight: 600;
}

.verify-submit:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.verify-steps {
  margin-top: 10px;
}

.verify-steps__header {
  padding: 12px 0;
  color: #ff1200;
  background: linear-gradient(93deg, rgba(235, 126, 125, 0) 6%, rgba(255, 198, 198, 0.5) 45%, rgba(255, 198, 198, 0.5) 54%, rgba(235, 126, 125, 0) 94%);
  border-top: 1px solid rgba(235, 126, 125, 0.3);
  border-bottom: 1px solid rgba(235, 126, 125, 0.3);
  font-size: 18px;
  text-align: center;
}

.verify-steps__body,
.detail-rules {
  padding: 10px 0;
  font-size: 14px;
  line-height: 1.6;
}

.verify-steps__body p,
.detail-rules p {
  margin-bottom: 4px;
}

.verify-steps__warn {
  color: #e63200;
}

.detail-table {
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 12px;
}

.detail-table__head,
.detail-table__body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
}

.detail-table__head {
  padding: 14px 8px;
  color: #fff;
  background: linear-gradient(145deg, #ef5151 20%, #e2221c 85%);
}

.detail-table__body {
  padding: 16px 8px;
  background: #fff;
}

.detail-table span {
  font-size: 18px;
  text-align: center;
}

.detail-notice {
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.5;
}

.text-link {
  display: inline;
  color: #e69d00;
  background: transparent;
  font-weight: 600;
  text-decoration: underline;
}

.toast-wrap {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  display: grid;
  gap: 8px;
  width: min(320px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  color: #fff;
  background: #db2b1d;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  animation: toastIn 0.22s ease;
}

.toast.success {
  background: #27ab72;
}

.toast.info {
  background: #27abdb;
}

.toast-title {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 800;
}

.toast-text {
  font-size: 13px;
  line-height: 1.45;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 749px) {
  .wrapper {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .top-bar {
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    min-height: 48px;
    border-radius: 12px;
  }

  .top-bar__logo {
    width: 48px;
    height: 48px;
  }

  .top-bar__text {
    font-size: 13.5px;
  }

  .top-bar__btn {
    width: 100px;
  }

  .hero-section {
    padding: 20px 0 0;
  }

  .cta-buttons {
    gap: 10px;
    padding: 4px 22%;
  }

  .cta-btn__icon {
    width: 4.27vw;
    height: 4.27vw;
  }

  .cta-btn__text {
    font-size: 3.73vw;
  }

  .promo-bottom {
    margin-top: 20px;
    padding-bottom: 5px;
  }

  .promo-ribbon img {
    margin: 25px 0 20px;
  }

  .promo-features {
    min-height: 0;
    margin: -80px 18px 15px;
    background-size: 100% 100%;
  }

  .promo-features__item {
    left: 24%;
    right: 4%;
    height: 22%;
  }

  .promo-features__bar {
    margin: 0;
    padding: 0;
    font-size: clamp(13px, 2.8vw, 18px);
    line-height: 1.1;
  }

  .promo-ribbon__deco-1,
  .promo-ribbon__deco-2 {
    width: 42px;
    height: 42px;
  }

  .bottom-nav {
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
    border-radius: 2.4vw 2.4vw 0 0;
  }

  .nav-item {
    min-width: 0;
    gap: 2px;
  }

  .nav-item__icon {
    width: 7vw;
    height: 7vw;
  }

  .nav-item__label {
    font-size: 14px;
  }

  .modal-title-img {
    width: min(325px, 86vw);
  }

  .modal-body {
    padding: 8px 14px 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 4px 0;
  }

  .form-grid dt {
    font-size: 0.75rem;
  }

  .form-control {
    height: 2.2rem;
    border-radius: 0.4rem;
    font-size: 0.8rem;
  }

  .form-control::placeholder {
    font-size: 0.75rem;
  }

  .input-prefix {
    border-radius: 0.4rem 0 0 0.4rem;
    font-size: 0.75rem;
  }

  .input-group .form-control {
    border-radius: 0 0.4rem 0.4rem 0;
  }

  .field-icon {
    top: 7px;
    width: 22px;
  }

  .checking .form-control {
    padding-right: 6.5rem;
  }

  .checking-box {
    width: 6rem;
    height: 2.2rem;
    border-radius: 0 0.4rem 0.4rem 0;
    font-size: 0.72rem;
  }

  .verify-submit {
    height: 40px;
    margin-bottom: 12px;
    border-radius: 40px;
    font-size: 18px;
  }

  .verify-steps__header {
    padding: 8px 0;
    font-size: 14px;
  }

  .verify-steps__body,
  .detail-rules {
    padding: 8px 0;
    font-size: 12px;
  }

  .detail-table span {
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .cta-buttons {
    padding-inline: 20%;
  }

  .nav-item__label {
    font-size: 12px;
  }

  .promo-features__bar {
    font-size: clamp(12px, 3.15vw, 13px);
  }
}
