/**
 * 积分中心
 */

#points-center-view {
  min-height: 100vh;
  min-height: 100dvh;
  background: #070419;
  color: #f7f7ff;
  font-family: var(--onboard-font-sans, -apple-system, "PingFang SC", sans-serif);
}

#points-detail-view {
  min-height: 100vh;
  min-height: 100dvh;
  background: #070419;
  color: #f7f7ff;
  font-family: var(--onboard-font-sans, -apple-system, "PingFang SC", sans-serif);
}

.points-page {
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background:
    radial-gradient(circle at 50% 23%, rgba(91, 151, 238, 0.24), transparent 28%),
    linear-gradient(180deg, #060218 0%, #060218 100%);
}

.points-nav {
  height: 92px;
  padding: 28px 20px 0;
  display: grid;
  grid-template-columns: 44px 1fr 64px;
  align-items: center;
  background: #070219;
}

.points-nav__back,
.points-nav__detail {
  border: 0;
  background: transparent;
  color: #f5f2ff;
  cursor: pointer;
}

.points-nav__back {
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 38px;
  line-height: 1;
}

.points-nav__title {
  margin: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.points-nav__detail {
  justify-self: end;
  padding: 8px 0 8px 12px;
  font-size: 16px;
  color: rgba(245, 242, 255, 0.82);
}

.points-hero {
  min-height: 198px;
  padding: 42px 24px 38px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(116, 213, 255, 0.28), transparent 36%),
    linear-gradient(135deg, #071328 0%, #0d2241 52%, #163961 100%);
}

.points-hero__label {
  font-size: 16px;
  color: rgba(235, 242, 255, 0.78);
}

.points-hero__value {
  margin-top: 16px;
  font-size: 58px;
  line-height: 0.95;
  font-weight: 800;
  color: #7bd7ff;
  font-variant-numeric: tabular-nums;
}

.points-hero__hint {
  margin-top: 18px;
  font-size: 14px;
  color: #7ad4ff;
  line-height: 1.5;
}

.points-content {
  padding: 24px 20px 36px;
}

.points-section-title {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.2;
  color: #f7f7ff;
  font-weight: 800;
  letter-spacing: 0;
}

.points-products {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.points-product {
  position: relative;
  border: 1px solid rgba(116, 178, 255, 0.42);
  border-radius: 16px;
  background: #142044;
  padding: 34px 18px 20px;
  overflow: hidden;
}

.points-product--recommended {
  border-color: #69d6ff;
  box-shadow: 0 0 0 1px rgba(105, 214, 255, 0.18);
}

.points-product__badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 70px;
  height: 70px;
  padding: 0;
  border-radius: 15px 0 0 0;
  background: #71dbff;
  color: #07142d;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 9px;
  padding-left: 6px;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.points-product__badge span {
  display: block;
  transform: rotate(-45deg) translate(-10px, 4px);
  transform-origin: center;
  white-space: nowrap;
}

.points-product__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.points-product__title {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
  color: #f7f7ff;
  font-weight: 800;
}

.points-product__desc {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: rgba(235, 242, 255, 0.78);
  font-size: 15px;
  line-height: 1.45;
}

.points-product__price {
  min-width: 94px;
  text-align: right;
  color: rgba(235, 242, 255, 0.9);
  font-size: 14px;
  padding-top: 2px;
}

.points-product__price strong {
  color: #76dcff;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.points-product__actions {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.points-btn {
  min-width: 0;
  height: 52px;
  border: 0;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0;
}

.points-btn-spacer {
  min-width: 0;
}

.points-btn--redeem {
  color: #75dcff;
  background: rgba(54, 89, 158, 0.68);
  border: 1px solid rgba(116, 178, 255, 0.22);
}

.points-btn--redeem.is-disabled,
.points-btn--redeem:disabled {
  color: rgba(235, 242, 255, 0.45);
  background: rgba(32, 50, 98, 0.52);
  cursor: not-allowed;
}

.points-btn--buy {
  color: #fff;
  background: linear-gradient(105deg, #d8c7ff 0%, #8b5eff 46%, #3193ff 100%);
  box-shadow: 0 10px 24px rgba(68, 139, 255, 0.24);
}

.points-btn--buy:disabled {
  opacity: 0.68;
  cursor: wait;
}

.points-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.points-success-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: auto;
}

.points-confirm-sheet {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: auto;
}

.points-success-sheet__backdrop,
.points-confirm-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 2, 14, 0.32);
}

.points-success-sheet__panel,
.points-confirm-sheet__panel {
  position: relative;
  width: min(100%, 480px);
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  border: 1px solid rgba(116, 178, 255, 0.32);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: #101a3a;
  color: #f7f7ff;
  text-align: center;
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.28);
  animation: points-success-up 180ms ease-out;
}

.points-success-sheet__handle {
  width: 36px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(116, 178, 255, 0.36);
}

.points-success-sheet__title {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 800;
}

.points-success-sheet__check {
  width: 72px;
  height: 72px;
  margin: 16px auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #78df99 0%, #43aa6f 100%);
  color: #061226;
  font-size: 38px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 0 28px rgba(88, 214, 139, 0.44);
}

.points-success-sheet__package {
  color: #48e39d;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
}

.points-success-sheet__subtitle {
  margin: 8px 0 16px;
  color: rgba(235, 242, 255, 0.76);
  font-size: 13px;
  line-height: 1.5;
}

.points-success-sheet__cta {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(105deg, #d8c7ff 0%, #8b5eff 46%, #3193ff 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(68, 139, 255, 0.24);
}

.points-success-sheet__cta:active {
  transform: scale(0.98);
}

.points-confirm-sheet__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 800;
}

.points-confirm-sheet__desc {
  margin: 18px 0 22px;
  color: rgba(235, 242, 255, 0.78);
  font-size: 15px;
  line-height: 1.6;
}

.points-confirm-sheet__desc strong {
  color: #75dcff;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.points-confirm-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.points-confirm-sheet__cancel,
.points-confirm-sheet__submit {
  min-width: 0;
  height: 52px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.points-confirm-sheet__cancel {
  border: 1px solid rgba(116, 178, 255, 0.34);
  background: rgba(32, 50, 98, 0.52);
  color: rgba(235, 242, 255, 0.82);
}

.points-confirm-sheet__submit {
  border: 0;
  background: linear-gradient(105deg, #d8c7ff 0%, #8b5eff 46%, #3193ff 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(68, 139, 255, 0.24);
}

.points-confirm-sheet__submit:disabled {
  opacity: 0.68;
  cursor: wait;
}

.points-confirm-sheet__cancel:active,
.points-confirm-sheet__submit:active:not(:disabled) {
  transform: scale(0.98);
}

@keyframes points-success-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ============ 积分明细 ============ */
.points-detail-page {
  background: #070419;
}

.points-detail-nav {
  background: #070219;
}

.points-detail-content {
  padding: 18px 20px 36px;
}

.points-detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.points-detail-tab {
  height: 36px;
  border: 1px solid rgba(116, 178, 255, 0.38);
  border-radius: 999px;
  background: rgba(17, 33, 72, 0.74);
  color: rgba(235, 242, 255, 0.82);
  font-size: 14px;
  cursor: pointer;
}

.points-detail-tab.is-active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(105deg, #d8c7ff 0%, #8762ff 45%, #318eff 100%);
  box-shadow: 0 10px 24px rgba(68, 139, 255, 0.22);
}

.points-detail-list {
  border: 1px solid rgba(116, 178, 255, 0.38);
  border-radius: 16px;
  background: #142044;
  overflow: hidden;
}

.points-detail-item {
  min-height: 78px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(116, 178, 255, 0.16);
}

.points-detail-item:last-child {
  border-bottom: 0;
}

.points-detail-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}

.points-detail-item__icon.is-gain {
  color: #62e5bd;
  background: rgba(40, 117, 112, 0.58);
}

.points-detail-item__icon.is-spend {
  color: #a998ff;
  background: rgba(82, 67, 162, 0.68);
}

.points-detail-item__title {
  font-size: 15px;
  line-height: 1.35;
  color: #f7f7ff;
  font-weight: 700;
}

.points-detail-item__meta {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(235, 242, 255, 0.66);
}

.points-detail-item__amount {
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.points-detail-item__amount.is-gain {
  color: #54e0ae;
}

.points-detail-item__amount.is-spend {
  color: rgba(235, 242, 255, 0.78);
}

@media (max-width: 360px) {
  .points-nav {
    grid-template-columns: 38px 1fr 56px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .points-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .points-product__head {
    grid-template-columns: 1fr;
  }

  .points-product__price {
    text-align: left;
  }

  .points-product__actions {
    grid-template-columns: 1fr;
  }

  .points-detail-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .points-detail-tabs {
    gap: 8px;
  }

  .points-detail-item {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .points-detail-item__amount {
    font-size: 16px;
  }
}
