:root {
  --bg: #0b1020;
  --bg-soft: #101731;
  --surface: #141c38;
  --surface-2: #1a2547;
  --line: rgba(148, 178, 255, .14);
  --text: #e8eefc;
  --muted: #9aa8c7;
  --brand: #3d7bff;
  --brand-2: #4fd6ff;
  --accent: #ffd166;
  --ok: #34d399;
  --danger: #f87171;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(2, 8, 30, .45);
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --maxw: 1120px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 32, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: 1px; }
.logo-img { width: 38px; height: 38px; flex: none; object-fit: contain; }
.logo small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); letter-spacing: 2px; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-size: 14.5px; color: var(--muted); transition: .18s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-links a.active { color: var(--text); background: rgba(61, 123, 255, .16); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 7px 12px; font-size: 15px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: 10px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: .18s; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), #2f5fe0); color: #fff; box-shadow: 0 6px 18px rgba(61,123,255,.35); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-2); }
.btn-gold { background: linear-gradient(135deg, #ffd166, #f5a623); color: #3c2800; }
.btn-sm { padding: 7px 14px; font-size: 13.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 84px; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 340px at 78% 18%, rgba(61,123,255,.28), transparent 65%),
    radial-gradient(520px 320px at 12% 82%, rgba(79,214,255,.14), transparent 60%);
  pointer-events: none;
}
.hero-grid-lines {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(120,160,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; max-width: 720px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: 2px;
  color: var(--brand-2); border: 1px solid rgba(79,214,255,.35); border-radius: 999px; padding: 5px 14px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.25; font-weight: 800; }
.hero h1 .grad { background: linear-gradient(90deg, var(--brand-2), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin: 20px 0 34px; color: var(--muted); font-size: 17px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section.block { padding: 76px 0; }
.section-head { margin-bottom: 40px; }
.section-head .kicker { color: var(--brand-2); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); margin-top: 10px; }
.section-head p { color: var(--muted); margin-top: 10px; max-width: 640px; }
.bg-soft { background: var(--bg-soft); border-block: 1px solid var(--line); }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: .2s;
}
.card:hover { border-color: rgba(79,214,255,.4); transform: translateY(-3px); box-shadow: var(--shadow); }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(61,123,255,.15); color: var(--brand-2); font-size: 21px; margin-bottom: 16px;
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 26px 12px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; }
.stat b { font-size: 30px; color: var(--brand-2); font-weight: 800; display: block; }
.stat span { color: var(--muted); font-size: 13.5px; }

/* ---------- News cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .2s; position: relative;
}
.news-card:hover { border-color: rgba(79,214,255,.4); transform: translateY(-3px); }
.news-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.tag {
  align-self: flex-start; font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: rgba(61,123,255,.16); color: var(--brand-2);
}
.tag-free { background: rgba(52,211,153,.14); color: var(--ok); }
.tag-vip { background: rgba(255,209,102,.14); color: var(--accent); }
.news-body h3 { font-size: 16.5px; line-height: 1.45; }
.news-body p { color: var(--muted); font-size: 13.5px; flex: 1; }
.news-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12.5px; border-top: 1px dashed var(--line); padding-top: 12px; }
.price { color: var(--accent); font-weight: 700; }

/* ---------- Forms / auth ---------- */
.auth-wrap { min-height: calc(100vh - 68px - 260px); display: grid; place-items: center; padding: 60px 24px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 36px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.tabs { display: flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.tabs button { flex: 1; padding: 9px; border: none; background: none; color: var(--muted); font-size: 14.5px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.tabs button.active { background: var(--brand); color: #fff; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font-size: 15px; font-family: inherit; outline: none; transition: .15s;
}
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(61,123,255,.18); }
.field .err { color: var(--danger); font-size: 12.5px; margin-top: 5px; display: none; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .err { display: block; }
.check-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); margin: 18px 0; }
.check-row input { margin-top: 4px; accent-color: var(--brand); }
.check-row a { color: var(--brand-2); text-decoration: underline; }
.form-msg { padding: 11px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; display: none; }
.form-msg.ok { display: block; background: rgba(52,211,153,.12); color: var(--ok); border: 1px solid rgba(52,211,153,.3); }
.form-msg.bad { display: block; background: rgba(248,113,113,.1); color: var(--danger); border: 1px solid rgba(248,113,113,.3); }

/* ---------- Article ---------- */
.article-wrap { max-width: 780px; margin: 0 auto; padding: 56px 24px; }
.article-head h1 { font-size: clamp(24px, 3.6vw, 34px); line-height: 1.35; }
.article-meta { display: flex; gap: 16px; color: var(--muted); font-size: 13.5px; margin: 18px 0 30px; flex-wrap: wrap; }
.article-body { font-size: 16px; color: #cdd7ef; }
.article-body p { margin-bottom: 18px; }
.article-body h2 { font-size: 20px; margin: 30px 0 14px; color: var(--text); }
.locked-box {
  margin-top: 24px; background: linear-gradient(135deg, rgba(255,209,102,.08), rgba(61,123,255,.08));
  border: 1px solid rgba(255,209,102,.35); border-radius: var(--radius); padding: 34px; text-align: center;
}
.locked-box .lock-icon { font-size: 38px; margin-bottom: 12px; }
.locked-box h3 { margin-bottom: 8px; }
.locked-box p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.back-link { display: inline-flex; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.back-link:hover { color: var(--brand-2); }

/* ---------- Membership ---------- */
.price-card { text-align: center; position: relative; }
.price-card .plan { font-size: 15px; color: var(--muted); letter-spacing: 2px; }
.price-card .amount { font-size: 44px; font-weight: 800; margin: 10px 0 4px; }
.price-card .amount small { font-size: 15px; font-weight: 400; color: var(--muted); }
.price-card .per { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.price-card ul { list-style: none; text-align: left; margin: 0 0 24px; font-size: 14px; color: #cdd7ef; }
.price-card ul li { padding: 8px 0 8px 26px; position: relative; border-top: 1px dashed var(--line); }
.price-card ul li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); }
.price-card.featured { border-color: rgba(255,209,102,.5); background: linear-gradient(180deg, rgba(255,209,102,.06), var(--surface) 40%); }
.badge-hot { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #ffd166, #f5a623); color: #3c2800; font-size: 12px; font-weight: 700; padding: 3px 14px; border-radius: 999px; }
.vip-banner { display: flex; align-items: center; gap: 14px; background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.3); padding: 14px 18px; border-radius: 12px; font-size: 14px; margin-top: 22px; }

/* ---------- User panel ---------- */
.user-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid rgba(255,209,102,.4); color: var(--accent); background: rgba(255,209,102,.07); cursor: pointer;
}
.user-chip .avatar { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; font-size: 11px; color: #06122e; font-weight: 700; }
.user-chip.vip { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #080d1a; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 34px; padding: 56px 0 36px; }
.footer-grid h4 { font-size: 15px; margin-bottom: 16px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a, .footer-grid p { color: var(--muted); font-size: 13.5px; }
.footer-grid a:hover { color: var(--brand-2); }
.footer-bottom { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: 12.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--brand-2); }

/* ---------- Legal pages ---------- */
.legal { max-width: 800px; margin: 0 auto; padding: 56px 24px; }
.legal h1 { font-size: 30px; margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 13px; margin-bottom: 34px; }
.legal h2 { font-size: 19px; margin: 30px 0 12px; padding-left: 12px; border-left: 3px solid var(--brand); }
.legal p, .legal li { color: #c3cee8; font-size: 14.5px; margin-bottom: 12px; }
.legal ul { padding-left: 22px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 22px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: .25s; z-index: 99;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: none; }
}
@media (max-width: 640px) {
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 20px 18px; gap: 4px;
  }
  .nav-links.open { display: flex; }
  .menu-btn { display: block; }
  .grid-3, .grid-2, .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-cta .btn-ghost { display: none; }
  section.block { padding: 54px 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 支付弹窗 ---------- */
.pay-mask {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
  background: rgba(4, 8, 22, .72); backdrop-filter: blur(4px);
}
.pay-dialog {
  position: relative; width: 100%; max-width: 360px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 26px; box-shadow: var(--shadow);
}
.pay-dialog h3 { font-size: 18px; margin-bottom: 10px; }
.pay-amount { font-size: 34px; font-weight: 800; color: var(--accent); }
.pay-desc { color: var(--muted); font-size: 13.5px; margin: 6px 0 16px; }
.pay-qr { margin: 0 auto 14px; border-radius: 12px; background: #fff; padding: 8px; }
.pay-tip { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
.pay-note { color: var(--muted); font-size: 12px; margin-top: 12px; }
.pay-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  color: var(--muted); font-size: 17px; cursor: pointer;
}
.pay-close:hover { color: var(--text); }
