/* ===== 设计变量 ===== */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --ink: #1a1726;
  --muted: #6b6577;
  --line: #ece8f0;
  --brand: #6d4aff;
  --brand-2: #ff5d8f;
  --brand-soft: #f1ecff;
  --accent: #12a37a;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(26, 23, 38, .05), 0 6px 16px rgba(26, 23, 38, .05);
  --shadow-md: 0 8px 30px rgba(109, 74, 255, .12);
  --maxw: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== 按钮 ===== */
.btn {
  --pad: 11px 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: var(--pad); border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(135deg, var(--brand), #8b6bff); color: #fff; box-shadow: 0 6px 18px rgba(109, 74, 255, .3); }
.btn--primary:hover { box-shadow: 0 10px 24px rgba(109, 74, 255, .42); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--sm { --pad: 8px 16px; font-size: 13px; }
.btn--lg { --pad: 15px 30px; font-size: 16px; }

/* ===== 导航 ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 248, .82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand__mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; border-radius: 10px; font-size: 18px;
}
.brand__text em { font-style: normal; color: var(--muted); font-weight: 600; font-size: 13px; }
.nav__links { display: flex; gap: 24px; margin-left: auto; font-size: 15px; color: var(--muted); font-weight: 500; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { margin-left: 8px; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(255, 93, 143, .18), transparent 60%),
    radial-gradient(760px 420px at 5% 0%, rgba(109, 74, 255, .18), transparent 55%);
  padding: 72px 0 56px;
}
.hero__inner { display: grid; grid-template-columns: 1fr; gap: 40px; }
.eyebrow {
  display: inline-block; margin: 0 0 16px; padding: 5px 14px;
  background: var(--brand-soft); color: var(--brand); border-radius: 999px;
  font-size: 13px; font-weight: 700;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 850; letter-spacing: -.02em; }
.hero__sub { max-width: 620px; margin: 18px 0 28px; color: var(--muted); font-size: 17px; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 8px 7px 16px; max-width: 560px;
  box-shadow: var(--shadow-sm);
}
.search:focus-within { border-color: var(--brand); box-shadow: var(--shadow-md); }
.search__icon { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; background: transparent; color: var(--ink); }
.hero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 6px 14px; border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer;
  transition: all .18s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat strong { display: block; font-size: 30px; font-weight: 850; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 13px; color: var(--muted); }

/* ===== 通用区块 ===== */
.section { padding: 72px 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 680px; margin-bottom: 36px; }
.section__head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 820; }
.section__head p { color: var(--muted); margin: 10px 0 0; font-size: 16px; }
.section__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; flex-wrap: wrap; }

/* ===== 分类卡 ===== */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.cat {
  text-align: left; cursor: pointer; font: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 6px;
  transition: transform .18s, box-shadow .22s, border-color .2s;
}
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.cat__icon { font-size: 28px; }
.cat__name { font-weight: 700; font-size: 17px; }
.cat__desc { color: var(--muted); font-size: 13.5px; }
.cat__count { margin-top: 6px; font-size: 12.5px; color: var(--brand); font-weight: 600; }

/* ===== 筛选条 ===== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 8px 16px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .18s;
}
.filter:hover { color: var(--ink); border-color: var(--brand); }
.filter.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ===== 模版卡 ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .22s, border-color .2s; cursor: pointer;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card__hot {
  position: absolute; top: 14px; right: 14px;
  background: linear-gradient(135deg, var(--brand-2), #ff8c42); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.card__top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.badge {
  font-size: 11px; font-weight: 800; letter-spacing: .03em; color: #fff;
  background: var(--c, #666); padding: 4px 9px; border-radius: 6px;
}
.card__type { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.card__title { font-size: 17px; font-weight: 700; }
.card__desc { color: var(--muted); font-size: 14px; margin: 8px 0 14px; flex: 1; }
.card__meta { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.card__actions { display: flex; gap: 8px; }
.card__actions .btn { flex: 1; }

.empty { text-align: center; padding: 48px 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.empty[hidden] { display: none; }

/* ===== 分页 ===== */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; }
.pager[hidden] { display: none; }
.pager__btn {
  min-width: 38px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .16s;
}
.pager__btn:hover:not(:disabled):not(.is-active) { border-color: var(--brand); color: var(--brand); }
.pager__btn.is-active { background: var(--ink); color: #fff; border-color: var(--ink); cursor: default; }
.pager__btn:disabled { opacity: .4; cursor: not-allowed; }
.pager__dots { color: var(--muted); padding: 0 4px; }
.pager__info { margin-left: 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 560px) {
  .pager__info { width: 100%; text-align: center; margin: 6px 0 0; }
}

/* ===== 流程 ===== */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; counter-reset: step; }
.flow__step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; position: relative;
}
.flow__num {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px;
  background: var(--brand-soft); color: var(--brand); border-radius: 12px; font-weight: 800; font-size: 18px;
}
.flow__step h3 { font-size: 17px; margin-bottom: 6px; }
.flow__step p { color: var(--muted); font-size: 14px; margin: 0; }
.flow__step a { display: inline-block; margin-top: 10px; color: var(--brand); font-weight: 600; font-size: 13.5px; }

/* ===== 合集 ===== */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.pack {
  border-radius: var(--radius); padding: 26px 24px; border: 1px solid var(--line);
  background: var(--surface); display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .22s;
}
.pack:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pack__emoji { font-size: 34px; margin-bottom: 10px; }
.pack h3 { font-size: 18px; }
.pack__type { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }
.pack ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pack li { font-size: 14px; padding-left: 22px; position: relative; color: var(--ink); }
.pack li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.pack--pink  { background: linear-gradient(160deg, #fff, #fff5f8); }
.pack--blue  { background: linear-gradient(160deg, #fff, #f1f6ff); }
.pack--green { background: linear-gradient(160deg, #fff, #f1fbf6); }
.pack--amber { background: linear-gradient(160deg, #fff, #fff9ee); }

/* ===== CTA ===== */
.cta { padding: 76px 0; background: radial-gradient(700px 300px at 50% 0%, rgba(109,74,255,.16), transparent 65%); }
.cta__inner { text-align: center; max-width: 620px; margin: 0 auto; }
.cta h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 820; }
.cta p { color: var(--muted); font-size: 17px; margin: 14px 0 28px; }

/* ===== 页脚 ===== */
.footer { background: var(--ink); color: #c9c4d6; padding: 56px 0 28px; }
.footer__inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; }
.brand--footer .brand__text { color: #fff; }
.footer__desc { color: #948ea8; font-size: 14px; margin-top: 14px; max-width: 280px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer__cols a { display: block; color: #a39dba; font-size: 13.5px; padding: 5px 0; }
.footer__cols a:hover { color: #fff; }
.footer__bar { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 22px; font-size: 13px; color: #7c7693; }

/* ===== 弹窗 ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(26, 23, 38, .55); backdrop-filter: blur(4px); }
.modal__card {
  position: relative; background: var(--surface); border-radius: 20px; padding: 32px;
  max-width: 520px; width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.3);
  animation: pop .22s ease; max-height: 90vh; overflow: auto;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal__close {
  position: absolute; top: 16px; right: 18px; border: 0; background: transparent;
  font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer;
}
.modal__close:hover { color: var(--ink); }
.modal__title { font-size: 22px; margin: 14px 0 12px; }
.modal__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.modal__tags span { background: var(--bg); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; font-size: 12.5px; color: var(--muted); }
.modal__hot { background: var(--brand-soft) !important; color: var(--brand) !important; border-color: transparent !important; font-weight: 700; }
.modal__desc { color: var(--muted); font-size: 15px; }
.modal__use { background: var(--bg); border-radius: 12px; padding: 16px 18px; margin: 18px 0; }
.modal__use h4 { font-size: 14px; margin-bottom: 6px; }
.modal__use p { margin: 0; color: var(--muted); font-size: 14px; }
.modal__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.modal__actions .btn { flex: 1; }

/* ===== 联系方式弹窗 ===== */
.modal__card--sm { max-width: 380px; text-align: center; }
.contact__icon {
  width: 60px; height: 60px; margin: 4px auto 14px; display: grid; place-items: center;
  font-size: 28px; background: var(--brand-soft); border-radius: 16px;
}
.contact__title { font-size: 20px; margin-bottom: 8px; }
.contact__sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.contact__email {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 10px 10px 16px;
}
.contact__email span { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.contact__hint { color: var(--muted); font-size: 12px; margin: 16px 0 0; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,.3);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 200;
}
.toast.is-show { opacity: 1; transform: translateX(-50%); }

/* ===== 响应式 ===== */
@media (min-width: 880px) {
  .hero__inner { grid-template-columns: 1.35fr 1fr; align-items: center; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 52px 0; }
}
