/* ============================================================
   创灵AI · 支付页（/pay/buy · /pay/success）
   只用官网 style-new.css 里已有的变量，不另起一套配色。
   ============================================================ */

.pay-page {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 头 ---------- */
.pay-head {
  height: 64px;
  padding: 0 clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.pay-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: .02em;
}
.pay-back {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.pay-back:hover { color: var(--brand); }

/* ---------- 容器 ---------- */
.pay-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 32px) 64px;
  flex: 1;
}

.pay-kicker {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 12px;
}
.pay-intro h1,
.result h1 {
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.3;
  letter-spacing: -.01em;
  margin: 0 0 12px;
}
.pay-sub {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 40em;
}

/* ---------- 套餐 ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 32px 0 28px;
}
.plan-skeleton {
  height: 176px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg-soft), #eef2f8, var(--bg-soft));
  background-size: 200% 100%;
  animation: pay-shimmer 1.2s linear infinite;
}
@keyframes pay-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.plan-fail {
  grid-column: 1 / -1;
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.plan:hover { border-color: var(--line-2); transform: translateY(-2px); }
.plan.on {
  border-color: var(--brand);
  box-shadow: 0 10px 30px rgba(30, 111, 255, .12);
}
.plan.on::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  border: 1px solid var(--brand);
  pointer-events: none;
}
.plan-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-ink);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 2px;
}
.plan-name { font-size: 15px; font-weight: 600; color: var(--text-2); }
.plan-price {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--text);
}
.plan-sub { font-size: 13px; color: var(--muted); }
.plan-days {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid var(--line);
  width: 100%;
}

/* ---------- 机器码与下单 ---------- */
.pay-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
  background: var(--panel-2);
}
.pay-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 10px;
}
.mc-row { display: flex; gap: 10px; }
.mc-input {
  flex: 1;
  height: 48px;
  padding: 0 14px;
  font-size: 17px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.mc-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.mc-input::placeholder { color: #b9c1cf; letter-spacing: .06em; }

.btn-ghost {
  height: 48px;
  padding: 0 16px;
  font-size: 14px;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.mc-tip {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  display: none;
}
.mc-tip.show { display: block; }

.pay-error {
  margin-top: 14px;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 10px;
}

.btn-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 18px;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-ink);
  background: var(--grad);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: filter .16s, transform .16s;
}
.btn-buy:hover:not(:disabled) { filter: brightness(1.06); }
.btn-buy:active:not(:disabled) { transform: translateY(1px); }
.btn-buy:disabled {
  background: #e8edf5;
  color: #98a2b3;
  cursor: not-allowed;
}

.pay-note {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
}

/* ---------- FAQ ---------- */
.pay-faq { margin-top: 48px; }
.pay-faq h2,
.steps h2,
.after h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
}
.pay-faq dl { margin: 0; }
.pay-faq dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  margin-top: 16px;
}
.pay-faq dd {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- 结果页 ---------- */
.result { text-align: center; padding-top: 12px; }
.result .pay-sub { margin: 0 auto; }

.spin {
  width: 34px;
  height: 34px;
  margin: 8px auto 22px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: pay-spin .8s linear infinite;
}
@keyframes pay-spin { to { transform: rotate(360deg); } }

.ok-mark,
.warn-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 26px;
  font-weight: 700;
}
.ok-mark { color: var(--ok); background: rgba(22, 163, 74, .1); border: 1px solid rgba(22, 163, 74, .3); }
.warn-mark { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; }

.license-box {
  margin: 28px auto 0;
  max-width: 620px;
  padding: 20px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  background: var(--brand-soft);
  text-align: left;
}
.lb-cap {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--brand);
  margin-bottom: 10px;
}
.code {
  display: block;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  word-break: break-all;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
#btn-copy { margin-top: 12px; height: 40px; }

.steps {
  margin: 36px auto 0;
  max-width: 620px;
  text-align: left;
}
.steps ol {
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 2;
}
.steps li b { color: var(--text); }

.btn-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 26px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--brand);
  border-radius: 10px;
  text-decoration: none;
}
.btn-dl:hover { background: var(--brand-soft); }
.dl-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

.after {
  margin: 40px auto 0;
  max-width: 620px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.after p { font-size: 13.5px; line-height: 1.9; color: var(--muted); margin: 0; }
.after code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--text);
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: 5px;
}
.after a { color: var(--brand); }

#btn-back { max-width: 260px; margin: 24px auto 0; }

/* ---------- 脚 ---------- */
.pay-foot {
  padding: 22px 16px 30px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.pay-foot a { color: var(--muted); text-decoration: none; }
.pay-foot a:hover { color: var(--brand); }
.pay-foot .dot { margin: 0 8px; color: var(--line-2); }

/* ---------- 小屏 ---------- */
@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
  .plan { align-items: center; text-align: center; }
  .plan-days { text-align: center; }
  .mc-row { flex-direction: column; }
  .btn-ghost { width: 100%; }
  .pay-head { height: 56px; }
}
