:root {
  --bg: #0f1320;
  --card: #1a2033;
  --card-2: #222944;
  --line: #2f3758;
  --text: #eef1ff;
  --muted: #9aa3c7;
  --accent: #ff6b9a;
  --accent-2: #7a5cff;
  --ok: #3ddc97;
  --warn: #ffb74d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 10% -10%, #2a1f4d 0%, transparent 60%),
              radial-gradient(900px 500px at 110% 0%, #3a1d3f 0%, transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100%;
}

.wrap {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 18px;
}

/* 顶部 */
.top {
  padding: 44px 0 24px;
  text-align: center;
}
.badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--warn);
  background: rgba(255, 183, 77, .12);
  border: 1px solid rgba(255, 183, 77, .35);
}
.top h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 5vw, 36px);
  letter-spacing: .5px;
  background: linear-gradient(90deg, var(--accent), #ffd1e0 50%, #b9a6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  margin: 0 auto;
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
}

/* 区块 */
main section {
  margin-top: 26px;
}
h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
}

/* 档位 */
.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.tier {
  position: relative;
  cursor: pointer;
  padding: 16px 12px 14px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 2px solid var(--line);
  text-align: center;
  color: var(--text);
  font: inherit;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tier:hover { transform: translateY(-2px); border-color: #4a5590; }
.tier:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.tier[aria-checked="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 107, 154, .18), 0 10px 30px rgba(255, 107, 154, .15);
}
.gem {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 8px;
}
.amount {
  font-size: 22px;
  font-weight: 700;
}
.amount small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 2px;
}
.price {
  margin-top: 6px;
  font-size: 14px;
  color: var(--warn);
}
.tag {
  position: absolute;
  top: -10px;
  right: -6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* 支付方式 */
.pays {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.pay {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 2px solid var(--line);
  color: var(--text);
  font: inherit;
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
}
.pay:hover { border-color: #4a5590; }
.pay:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.pay[aria-checked="true"] {
  border-color: var(--ok);
  background: rgba(61, 220, 151, .08);
}
.pay .ico {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--card-2);
}
.pay .name { font-weight: 600; }
.pay .desc { font-size: 12px; color: var(--muted); }

/* 订单 */
.summary {
  padding: 20px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
}
.summary dl {
  margin: 0 0 18px;
}
.summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.summary dl > div:last-child { border-bottom: none; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
#sum-price { color: var(--accent); font-size: 18px; }

.buy {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(122, 92, 255, .3);
  transition: transform .1s ease, filter .15s ease;
}
.buy:hover { filter: brightness(1.08); }
.buy:active { transform: scale(.98); }
.buy:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.buy:disabled { opacity: .5; cursor: not-allowed; filter: none; }

.fine {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* 说明 */
.notice {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px dashed var(--line);
}
.notice h2 { font-size: 16px; color: var(--warn); }
.notice ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}
.notice li { margin: 4px 0; }

/* 页脚 */
.foot {
  margin-top: 40px;
  padding: 22px 0 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 8, 20, .65);
  backdrop-filter: blur(4px);
  z-index: 10;
}
.modal[hidden] { display: none; }
.sheet {
  width: 100%;
  max-width: 380px;
  padding: 24px 22px 20px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  text-align: center;
}
.sheet h2 { margin-bottom: 10px; }
.sheet p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.sheet .strong {
  color: var(--warn);
  font-weight: 600;
}
.close {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent-2);
  cursor: pointer;
}
.close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* 手机 */
@media (max-width: 480px) {
  .top { padding-top: 30px; }
  .summary { padding: 16px; }
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .pays { grid-template-columns: 1fr; }
}
