/* ---------- 基础 ---------- */
:root {
  --ink: #0d1526;
  --ink-2: #24324a;
  --muted: #5d6b82;
  --muted-2: #8b98ad;
  --line: #e5eaf1;
  --bg: #f6f8fc;
  --card: #ffffff;
  --accent: #3b5bfd;
  --accent-2: #7c3aed;
  --accent-soft: #eef1ff;
  --ok: #0f9d58;
  --warn: #b45309;
  --danger: #dc2626;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(13, 21, 38, .06), 0 2px 8px rgba(13, 21, 38, .04);
  --shadow-md: 0 8px 28px rgba(13, 21, 38, .08);
  --shadow-lg: 0 24px 60px rgba(13, 21, 38, .12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.01em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 40px)); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ok-text { color: var(--ok); }

/* ---------- 顶部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 16px; font-weight: 700;
}
.brand-text { font-size: 16px; letter-spacing: .01em; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 9px; font-size: 14px; }
.nav a:hover { background: #f1f4f9; text-decoration: none; }
.nav a.on { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 11px; padding: 11px 18px;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: .18s ease;
  text-decoration: none !important; font-family: inherit; line-height: 1.2;
}
.btn.primary { background: linear-gradient(135deg, var(--accent), #5b4bf6); color: #fff; box-shadow: 0 6px 18px rgba(59, 91, 253, .25); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(59, 91, 253, .32); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: #c9d3e4; background: #fbfcff; }
.btn.block { width: 100%; }
.btn.lg { padding: 14px 24px; font-size: 16px; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #f0f3fe 0%, #f6f8fc 78%); padding: 64px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em;
  color: var(--accent); background: #fff; border: 1px solid #dfe5ff;
  padding: 5px 11px; border-radius: 99px; margin-bottom: 16px; text-transform: uppercase;
}
.eyebrow.ok { color: var(--ok); border-color: #cdeddb; background: #f1fbf6; }
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); margin: 0 0 16px; letter-spacing: -.025em; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 24px; max-width: 560px; }
.lead.sm { font-size: 15px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.trust { list-style: none; display: flex; gap: 28px; padding: 0; margin: 0; }
.trust li { display: flex; flex-direction: column; }
.trust strong { font-size: 20px; }
.trust span { color: var(--muted); font-size: 13px; }

.hero-art { position: relative; height: 300px; }
.orb { position: absolute; border-radius: 50%; filter: blur(28px); opacity: .55; }
.orb-a { width: 230px; height: 230px; background: #9fb0ff; top: -10px; right: 60px; opacity: .5; }
.orb-b { width: 180px; height: 180px; background: #c9b4ff; bottom: 0; left: 30px; opacity: .45; }
.float-card {
  position: absolute; inset: auto 0 0 auto; width: 280px; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 18px; box-shadow: var(--shadow-lg); right: 8px; bottom: 24px;
}
.float-line { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.float-line.muted { color: var(--muted); font-weight: 400; margin-top: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(15, 157, 88, .12); }
.float-bar { height: 6px; background: #eef1f7; border-radius: 99px; margin: 12px 0 2px; overflow: hidden; }
.float-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.float-link { margin-top: 10px; font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 8px 10px; border-radius: 9px; }

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0; }
.section.band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: 26px; margin: 0 0 6px; }
.section-head p { color: var(--muted); margin: 0; }
.crumbs { padding: 20px 0 0; color: var(--muted-2); font-size: 13px; }

/* ---------- 商品卡 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 360px)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: .2s ease; }
.product-card { display: block; color: inherit; }
.product-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d5ddec; }
.cover {
  position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #e8edff, #f3ecff);
  background-size: cover; background-position: center; display: grid; place-items: center;
}
.cover-fallback { font-size: 34px; font-weight: 800; letter-spacing: .05em; color: #5667a8; opacity: .55; }
.cover-fallback.xl { font-size: 64px; }
.cover-badge {
  position: absolute; top: 12px; left: 12px; background: rgba(13, 21, 38, .78); color: #fff;
  font-size: 11px; padding: 4px 9px; border-radius: 7px; font-weight: 600; letter-spacing: .04em;
}
.card-body { padding: 16px 18px 18px; }
.card-body h3 { font-size: 17px; margin: 0 0 4px; }
.subtitle { color: var(--muted); font-size: 13px; margin: 0 0 12px; min-height: 20px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pill { font-size: 12px; background: var(--accent-soft); color: var(--accent); padding: 3px 9px; border-radius: 7px; font-weight: 600; }
.pill.ghost { background: #f2f5f9; color: var(--muted); font-weight: 500; }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.price i { font-style: normal; font-size: 14px; margin-right: 1px; }
.price-old { color: var(--muted-2); text-decoration: line-through; font-size: 13px; }
.buy-hint { margin-left: auto; font-size: 13px; color: var(--accent); font-weight: 600; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- 流程 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step span { font-size: 12px; font-weight: 800; color: var(--accent); letter-spacing: .1em; }
.step h3 { font-size: 16px; margin: 6px 0 6px; }
.step p { color: var(--muted); font-size: 13.5px; margin: 0; }

/* ---------- FAQ ---------- */
.faq-preview h2 { margin-bottom: 18px; font-size: 24px; }
details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
details[open] { box-shadow: var(--shadow-sm); }
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; float: right; color: var(--muted-2); font-weight: 400; }
details[open] summary::after { content: '−'; }
details p { color: var(--muted); margin: 10px 0 0; font-size: 14px; }

/* ---------- 详情页 ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.detail-cover {
  aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(135deg, #e8edff, #f3ecff); background-size: cover; background-position: center;
  display: grid; place-items: center; margin-bottom: 24px;
}
.detail-main h1 { font-size: 30px; margin: 0 0 6px; }
.detail-sub { color: var(--muted); margin: 0 0 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-top: 22px; }
.panel h3 { font-size: 16px; margin: 0 0 12px; }
.panel.prose p { margin: 0 0 10px; color: var(--ink-2); }
.panel.prose p:last-child { margin-bottom: 0; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.checklist li { position: relative; padding-left: 26px; color: var(--ink-2); }
.checklist li::before {
  content: '✓'; position: absolute; left: 0; top: 1px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.panel.notice { background: #fffdf7; border-color: #f3e6c8; }
.panel.notice ul { margin: 0; padding-left: 20px; color: #6b5323; font-size: 14px; }
.panel.notice li { margin-bottom: 6px; }

.detail-side { position: sticky; top: 88px; display: grid; gap: 16px; }
.buy-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-md); }
.buy-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.buy-price .cur { font-size: 16px; font-weight: 700; }
.buy-price .num { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.buy-note { font-size: 12.5px; color: var(--muted); text-align: center; margin: 10px 0 0; }
.mini-steps { margin: 18px 0 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; }
.mini-steps li { margin-bottom: 5px; }
.buy-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.service-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.service-card h4 { margin: 0 0 6px; font-size: 15px; }
.service-card p { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }

/* ---------- 兑换 / 领取 ---------- */
.redeem-wrap { padding-top: 40px; }
.redeem-card { padding: 34px 32px; }
.redeem-card h1 { font-size: 26px; margin: 0 0 10px; }
#redeemForm { display: flex; gap: 10px; margin: 22px 0 6px; }
#codeInput {
  flex: 1; border: 1px solid var(--line); border-radius: 11px; padding: 13px 16px; font-size: 17px;
  letter-spacing: .16em; text-transform: uppercase; font-family: ui-monospace, Menlo, Consolas, monospace;
  background: #fbfcfe; outline: none;
}
#codeInput:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(59, 91, 253, .1); background: #fff; }
#redeemForm .btn { white-space: nowrap; }
.form-msg { min-height: 20px; font-size: 13.5px; color: var(--danger); margin: 6px 0 0; }
.redeem-help { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 13.5px; }
.redeem-help p { margin: 0 0 4px; }

.links { display: grid; gap: 14px; margin: 22px 0; }
.link-item { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fbfcff; }
.link-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.link-head strong { font-size: 15px; }
.link-note { font-size: 12px; color: var(--warn); background: #fff7ed; padding: 2px 8px; border-radius: 6px; }
.link-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.link-code { background: #fff; border: 1px dashed #cfd8e6; border-radius: 8px; padding: 8px 12px; font-size: 14px; color: var(--ink); }
.claim-tip, .claim-steps { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.claim-tip h3, .claim-steps h3 { font-size: 15px; margin: 0 0 8px; }
.claim-tip p, .claim-steps p { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; }
.claim-steps ol { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; }
.claim-steps li { margin-bottom: 6px; }
.copy-input { width: 100%; max-width: 420px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: 13px; color: var(--muted); background: #fbfcfe; margin-bottom: 8px; }

/* ---------- 静态页 ---------- */
.page { padding: 34px 36px; }
.page h1 { font-size: 28px; margin: 0 0 18px; }
.page h2 { font-size: 18px; margin: 28px 0 10px; }
.page h3 { font-size: 15.5px; margin: 22px 0 6px; }
.page p, .page li { color: var(--ink-2); }
.page ul { padding-left: 20px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.contact-item { background: #fbfcff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; }
.contact-item span { font-size: 12px; color: var(--muted); }
.contact-item strong { font-size: 16px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 24px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer-col { display: grid; gap: 6px; align-content: start; }
.footer-col strong { font-size: 15px; }
.footer-col p { color: var(--muted); font-size: 13px; margin: 0; }
.footer-title { font-size: 12px; font-weight: 700; color: var(--muted-2); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }
.footer-col a { color: var(--ink-2); font-size: 13.5px; }
.copyright { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 12.5px; flex-wrap: wrap; }

/* ---------- 后台 ---------- */
.admin-body { background: #f2f5fa; }
.admin-top { background: #0d1526; color: #fff; }
.admin-top .header-inner { height: 60px; }
.admin-top .brand { color: #fff; }
.admin-top .brand-mark { background: linear-gradient(135deg, #3b5bfd, #7c3aed); }
.admin-nav { display: flex; gap: 6px; }
.admin-nav button {
  background: transparent; border: 0; color: #b9c4d8; padding: 8px 14px; border-radius: 9px;
  cursor: pointer; font-size: 14px; font-family: inherit;
}
.admin-nav button.on { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-main { padding: 28px 0 60px; }
.login-box { max-width: 380px; margin: 8vh auto 0; background: #fff; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.login-box h1 { font-size: 20px; margin: 0 0 4px; }
.login-box p { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 14px; font-family: inherit; background: #fbfcfe; outline: none; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(59, 91, 253, .1); }
.field textarea { min-height: 90px; resize: vertical; line-height: 1.6; }
.field .hint { font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.stat strong { font-size: 24px; letter-spacing: -.02em; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 18px; }
.admin-card h2 { font-size: 16px; margin: 0 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid #f1f4f9; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table code { font-size: 12.5px; }
.tag { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.tag.unused { background: #eef7f1; color: var(--ok); }
.tag.used { background: #f2f5f9; color: var(--muted); }
.tag.void { background: #fdecec; color: var(--danger); }
.tag.on { background: #eef7f1; color: var(--ok); }
.tag.off { background: #f2f5f9; color: var(--muted); }
.row-actions { display: flex; gap: 6px; }
.mini-btn { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; font-size: 12px; cursor: pointer; font-family: inherit; color: var(--ink-2); }
.mini-btn:hover { border-color: #c9d3e4; }
.mini-btn.danger { color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.modal-mask { position: fixed; inset: 0; background: rgba(13, 21, 38, .5); display: grid; place-items: center; padding: 20px; z-index: 100; }
.modal { background: #fff; border-radius: 16px; width: min(720px, 100%); max-height: 88vh; overflow: auto; padding: 24px 26px; }
.modal h3 { margin: 0 0 16px; font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #0d1526; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13.5px; z-index: 200; box-shadow: var(--shadow-md); }
.toast.err { background: #b91c1c; }
.code-list { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: #fbfcff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; max-height: 240px; overflow: auto; white-space: pre-wrap; }
.empty-tip { color: var(--muted-2); font-size: 13px; padding: 16px 0; text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap, .narrow { width: calc(100% - 28px); }
  .header-inner { height: 58px; }
  .brand-text { font-size: 15px; }
  .nav a { padding: 7px 10px; font-size: 13px; }
  .nav a:nth-child(n+3) { display: none; }
  .hero { padding: 40px 0 20px; }
  .hero h1 { font-size: 28px; }
  .lead { font-size: 15px; }
  .trust { gap: 18px; }
  .section { padding: 36px 0; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .redeem-card { padding: 24px 20px; }
  #redeemForm { flex-direction: column; }
  .page { padding: 24px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .detail-main h1 { font-size: 24px; }
  .buy-price .num { font-size: 30px; }
}
