/*
 * Purchase UI — 与主站 / 移动端统一的视觉风格
 *
 * 设计语言：Apple‑inspired + "静谧学习"
 * 背景：暖灰绿 #F2F5F0  |  卡片：白色玻璃态  |  CTA：翡翠绿 #059669
 * 文本：stone 灰色系  |  强调：Apple 蓝 #0071e3
 * 圆角：卡片 24px / 按钮 12px / 输入框 12px
 */

:root {
  /* ---- surface ---- */
  --bg-base: #F2F5F0;
  --bg-subtle: #eaede7;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --surface-glass-border: rgba(168, 162, 158, 0.24);
  --surface-glass-border-strong: rgba(168, 162, 158, 0.38);

  /* ---- text (stone) ---- */
  --text-strong: #1c1917;
  --text-medium: #44403c;
  --text-muted: #78716c;
  --text-faint: #a8a29e;

  /* ---- brand ---- */
  --primary: #059669;          /* emerald-600 — CTA 按钮 */
  --primary-hover: #047857;    /* emerald-700 */
  --primary-light: #ecfdf5;    /* emerald-50 */
  --primary-border: #a7f3d0;   /* emerald-200 */

  --accent: #0071e3;           /* Apple blue — 链接 / 次要强调 */
  --accent-hover: #0077ed;
  --accent-light: #eff6ff;

  /* ---- status ---- */
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --error: #dc2626;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;

  /* ---- shape ---- */
  --radius-card: 24px;
  --radius-inner: 16px;
  --radius-btn: 12px;
  --radius-input: 12px;
  --radius-full: 9999px;

  /* ---- shadow ---- */
  --shadow-card: 0 4px 20px -4px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 8px 30px -4px rgba(0, 0, 0, 0.08);
  --shadow-btn: 0 1px 3px rgba(5, 150, 105, 0.18);
}

/* ========== reset ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  color: var(--text-strong);
  background: var(--bg-base);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== aurora background — 与移动端 AuroraBackground 对齐 ========== */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 15%, rgba(255,255,255,0.45), rgba(255,255,255,0) 70%);
}

/* ========== page ========== */
.page {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 20px 72px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========== glass card — 与 GlassCard "glass" 变体对齐 ========== */
.card {
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.25s ease;
}

/* ========== hero ========== */
.hero {
  text-align: center;
  padding: 32px 24px 28px;
}

.hero h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-strong);
  margin: 14px 0 10px;
}

.lead {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 400px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  padding: 4px 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

/* ========== section head ========== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  font-size: 17px;
  font-weight: 600;
}

.section-head p {
  color: var(--text-faint);
  font-size: 13px;
}

/* ========== plans grid ========== */
.plans-grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.plan-card {
  border: 1px solid var(--surface-glass-border-strong);
  border-radius: 22px;
  padding: 22px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.25s;
}

.plan-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-card-hover);
}

.plan-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.plan-head h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-strong);
}

.plan-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.plan-meta {
  margin: 4px 0 0;
  color: var(--text-faint);
  font-size: 13px;
}

/* ---- feature list (green check) ---- */
.feature-list {
  list-style: none;
  margin: 18px 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--text-medium);
  line-height: 1.55;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
}

.feature-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 9px;
  width: 7px;
  height: 4px;
  border-left: 1.8px solid var(--primary);
  border-bottom: 1.8px solid var(--primary);
  transform: rotate(-45deg);
}

/* ========== steps ========== */
.steps h2 {
  font-size: 17px;
  font-weight: 600;
}

.steps ol {
  list-style: none;
  padding: 0;
  margin: 16px 0 22px;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.steps ol li {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  color: var(--text-medium);
  line-height: 1.55;
}

.steps ol li::before {
  content: counter(step);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--primary-border);
}

/* ========== buttons — 与 PrimaryButton 对齐 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-btn);
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.35;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid rgba(5, 150, 105, 0.6);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-btn);
}

.btn-outline {
  background: var(--surface);
  color: var(--text-medium);
  border: 1px solid var(--surface-glass-border-strong);
}

.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--text-faint);
}

.btn-accent {
  background: none;
  color: var(--accent);
  border: 1px solid transparent;
  padding: 10px 16px;
  font-size: 14px;
}

.btn-accent:hover {
  color: var(--accent-hover);
  background: var(--accent-light);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  transform: none !important;
}

.plan-card .btn {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  border-radius: 14px;
}

/* ========== tip ========== */
.tip {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.55;
}

.tip strong {
  color: var(--text-muted);
  font-weight: 500;
}

/* ========== input ========== */
input[type="email"],
input[type="text"] {
  width: 100%;
  border: 1px solid var(--surface-glass-border-strong);
  background: #fff;
  color: var(--text-medium);
  border-radius: var(--radius-input);
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="email"]:focus,
input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

/* ========== status (success page) ========== */
.status {
  padding: 16px 18px;
  border-radius: var(--radius-inner);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.5;
}

.status.loading {
  color: var(--info);
  border: 1px solid var(--info-border);
  background: var(--info-bg);
}

.status.ok {
  color: var(--success);
  border: 1px solid var(--success-border);
  background: var(--success-bg);
}

.status.warn {
  color: var(--warning);
  border: 1px solid var(--warning-border);
  background: var(--warning-bg);
}

.status.error {
  color: var(--error);
  border: 1px solid var(--error-border);
  background: var(--error-bg);
}

/* ========== order info ========== */
.order-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.order-row strong {
  flex-shrink: 0;
  color: var(--text-medium);
  font-weight: 500;
  min-width: 72px;
}

.order-row span {
  color: var(--text-faint);
  word-break: break-all;
}

/* ========== trust footer ========== */
.trust-footer {
  text-align: center;
  padding: 12px 0 0;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.6;
}

.trust-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
}

.trust-icons span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ========== responsive ========== */
@media (max-width: 600px) {
  .page {
    padding: 32px 16px 56px;
    gap: 14px;
  }

  .card {
    padding: 20px;
    border-radius: 20px;
  }

  .hero {
    padding: 24px 20px 22px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .plan-card {
    padding: 18px;
    border-radius: 18px;
  }

  .plan-price {
    font-size: 24px;
  }

  .btn {
    padding: 11px 18px;
    font-size: 14px;
  }

  .steps ol li::before {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
}
