/* ===================== 模板中心 /web-template =====================
   设计语言：简洁大气
   - Banner：多彩渐变 + 极光漂移背景（垫在全局导航下，保证导航白字可见），
             右侧为纯 SVG 矢量网页设计动画（浮动卡片 / 流光 / 光标 / 星点）
   - 结构：Banner → 筛选面板（仅行业分类，末行筛选之下为搜索框）
           → 12 列网格卡片列表（缩略图 1:1，hover 过渡遮罩：编号 / 教程 / 预览）
   - 布局：12 列网格，卡片默认占 3 列（4 列/行），随断点收缩 3/2/1 列
   - 配色：白 / 浅灰为底，低饱和主色仅用于按钮与标签，中性灰承担信息层级
   - 卡片：圆角 6px，默认无重阴影，hover 轻微上浮（-4px）并加深阴影
   - 字体：无衬线字体栈；留白充足，无多余装饰元素
==================================================================== */

.wt-page {
  /* ---- 页面级设计变量 ---- */
  --wt-primary: #3d5a80;                 /* 低饱和主色（按钮 / 标签 / 选中态） */
  --wt-primary-dark: #334e70;
  --wt-primary-tint: rgba(61, 90, 128, .08);
  --wt-primary-border: rgba(61, 90, 128, .32);
  --wt-bg: #f6f7f9;                      /* 页面浅灰底 */
  --wt-surface: #fff;
  --wt-border: #e6e8ec;
  --wt-border-strong: #d8dce3;
  --wt-text: #1e293b;
  --wt-text-2: #475569;
  --wt-text-3: #64748b;
  --wt-muted: #94a3b8;
  --wt-radius: 6px;
  --wt-shadow-hover: 0 12px 28px -8px rgba(15, 23, 42, .14);

  padding-bottom: 88px;
  background: var(--wt-bg);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ---- 搜索框（位于筛选面板“是否收费”行下方） ---- */
.wt-search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.wt-search svg { flex-shrink: 0; color: var(--wt-muted); }
.wt-search input {
  flex: 1;
  min-width: 0;
  max-width: 460px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--wt-border-strong);
  border-radius: var(--wt-radius);
  background: var(--wt-surface);
  color: var(--wt-text);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.wt-search input::placeholder { color: var(--wt-muted); }
.wt-search input:focus {
  border-color: var(--wt-primary);
  box-shadow: 0 0 0 3px var(--wt-primary-tint);
}
.wt-search button {
  flex-shrink: 0;
  height: 36px;
  padding: 0 20px;
  border: none;
  border-radius: var(--wt-radius);
  background: var(--wt-primary);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s ease;
}
.wt-search button:hover { background: var(--wt-primary-dark); }

/* ===================== Banner（大背景，垫在全局导航之下） ===================== */
.wt-banner {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: calc(var(--nav-h, 72px) + 64px) 0 72px;
  background: linear-gradient(135deg, #0b1026 0%, #151b3d 26%, #1d1550 52%, #241645 76%, #0d1730 100%);
}
/* 静态多彩径向光晕 */
.wt-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(900px 540px at 8% -12%, rgba(99, 102, 241, .45), transparent 62%),
    radial-gradient(760px 500px at 90% -6%, rgba(34, 211, 238, .28), transparent 60%),
    radial-gradient(820px 560px at 78% 110%, rgba(168, 85, 247, .34), transparent 62%),
    radial-gradient(640px 420px at 26% 114%, rgba(244, 114, 182, .20), transparent 60%);
}
/* 细网格 */
.wt-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 18%, #000, transparent 72%);
          mask-image: radial-gradient(ellipse 90% 80% at 50% 18%, #000, transparent 72%);
}
.wt-banner .container { position: relative; z-index: 3; }

/* ---- 极光色块（缓慢漂移，丰富色彩层次） ---- */
.wt-aurora { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.wt-aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}
.wt-aurora i:nth-child(1) { width: 420px; height: 420px; left: -120px; top: -150px; background: rgba(99, 102, 241, .5); animation: wtDrift1 22s ease-in-out infinite alternate; }
.wt-aurora i:nth-child(2) { width: 380px; height: 380px; right: -110px; top: -110px; background: rgba(34, 211, 238, .4); animation: wtDrift2 26s ease-in-out infinite alternate; }
.wt-aurora i:nth-child(3) { width: 460px; height: 460px; left: 36%; bottom: -250px; background: rgba(168, 85, 247, .42); animation: wtDrift3 30s ease-in-out infinite alternate; }
.wt-aurora i:nth-child(4) { width: 300px; height: 300px; right: 16%; bottom: -170px; background: rgba(251, 113, 133, .3); animation: wtDrift1 24s ease-in-out infinite alternate-reverse; }

@keyframes wtDrift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.12); } }
@keyframes wtDrift2 { from { transform: translate(0, 0) scale(1.06); } to { transform: translate(-70px, 50px) scale(.92); } }
@keyframes wtDrift3 { from { transform: translate(0, 0) scale(.95); } to { transform: translate(50px, -60px) scale(1.1); } }
.wt-banner-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
.wt-banner h1 {
  font-size: clamp(28px, 4.2vw, 40px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.35;
  color: #fff;
  margin: 0 0 16px;
}
.wt-banner-sub {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .72);
  max-width: 640px;
  margin: 0 0 26px;
}
.wt-banner-points { display: flex; flex-wrap: wrap; gap: 24px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.wt-banner-points li { display: flex; align-items: center; gap: 7px; }
.wt-banner-points svg { flex-shrink: 0; color: rgba(255, 255, 255, .5); }
.wt-banner-stat { display: flex; align-items: baseline; gap: 10px; margin-top: 28px; }
.wt-banner-stat b {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.wt-banner-stat span { font-size: 13px; color: rgba(255, 255, 255, .55); }

/* ---- 矢量高端网页设计动画（纯 SVG） ---- */
.wt-banner-art { position: relative; }
.wt-banner-art svg { display: block; width: 100%; height: auto; }

/* 入场 */
.wa-in { animation: waIn .8s cubic-bezier(.22, .68, .32, 1) both; }
@keyframes waIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* 浮动 */
.wa-float { animation: waFloat 5s ease-in-out infinite alternate; }
.wa-float-2 { animation: waFloat 6.4s ease-in-out .5s infinite alternate; }
.wa-float-3 { animation: waFloat 5.6s ease-in-out 1.1s infinite alternate; }
@keyframes waFloat { from { transform: translateY(0); } to { transform: translateY(-10px); } }

/* 主图流光 */
.wa-shimmer { animation: waShimmer 3.2s ease-in-out infinite; }
@keyframes waShimmer {
  0% { transform: translateX(-60px) skewX(-16deg); }
  60%, 100% { transform: translateX(210px) skewX(-16deg); }
}

/* 打字点 */
.wa-dot { animation: waDot 1.4s ease-in-out infinite; }
.wa-dot:nth-of-type(2) { animation-delay: .18s; }
.wa-dot:nth-of-type(3) { animation-delay: .36s; }
@keyframes waDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* 虚线流动 */
.wa-dash { stroke-dasharray: 5 7; animation: waDash 1.8s linear infinite; }
@keyframes waDash { to { stroke-dashoffset: -24; } }

/* CTA 光晕脉冲 */
.wa-cta-glow { animation: waPulse 2.4s ease-in-out infinite; }
@keyframes waPulse { 0%, 100% { opacity: .25; } 50% { opacity: .55; } }

/* 光标移动 + 点击 */
.wa-cursor { animation: waCursor 4.2s ease-in-out infinite; }
@keyframes waCursor {
  0%, 100% { transform: translate(0, 0); }
  28% { transform: translate(16px, 10px); }
  50% { transform: translate(16px, 10px) scale(.88); }
  72% { transform: translate(16px, 10px); }
}
.wa-ripple { animation: waRipple 2s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes waRipple { 0% { transform: scale(.5); opacity: .7; } 80%, 100% { transform: scale(1.5); opacity: 0; } }

/* 星点闪烁 */
.wa-spark { animation: waSpark 2.8s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.wa-spark-2 { animation-delay: .9s; }
.wa-spark-3 { animation-delay: 1.8s; }
@keyframes waSpark { 0%, 100% { opacity: .25; transform: scale(.7) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }

/* 减弱动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  .wt-aurora i,
  .wa-in, .wa-float, .wa-float-2, .wa-float-3, .wa-shimmer, .wa-dot,
  .wa-dash, .wa-cta-glow, .wa-cursor, .wa-ripple, .wa-spark, .wa-spark-2, .wa-spark-3 { animation: none; }
}

/* ===================== 筛选面板 ===================== */
.wt-filter {
  margin-top: 32px;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  padding: 6px 24px;
}
.wt-filter-row {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--wt-border);
}

/* ---- 搜索行（位于最后一行筛选之下） ---- */
.wt-filter-search {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--wt-border);
}

.wt-filter-label {
  flex: 0 0 96px;
  padding-top: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wt-text-3);
}
.wt-filter-tag {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 400;
  color: var(--wt-muted);
  border: 1px solid var(--wt-border);
  border-radius: 4px;
  padding: 0 5px;
  vertical-align: 1px;
}

/* ---- 筛选标签（顶部导航与筛选面板共用） ---- */
.wt-chip-row { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.wt-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--wt-radius);
  border: 1px solid var(--wt-border-strong);
  background: var(--wt-surface);
  color: var(--wt-text-2);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.wt-chip:hover {
  color: var(--wt-primary);
  border-color: var(--wt-primary-border);
  background: var(--wt-primary-tint);
}
.wt-chip.active {
  color: #fff;
  border-color: var(--wt-primary);
  background: var(--wt-primary);
  font-weight: 600;
}

.wt-filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
}
.wt-sort { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.wt-sort-label { margin-right: 6px; font-size: 13px; color: var(--wt-text-3); }
.wt-sort a {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 13px;
  border-radius: var(--wt-radius);
  font-size: 13px;
  color: var(--wt-text-2);
  transition: color .2s ease, background .2s ease;
}
.wt-sort a:hover { color: var(--wt-primary); background: var(--wt-primary-tint); }
.wt-sort a.active { color: #fff; background: var(--wt-primary); font-weight: 600; }
.wt-clear { font-size: 13px; color: var(--wt-text-3); transition: color .2s ease; }
.wt-clear:hover { color: var(--wt-primary); }

/* ===================== 结果区 ===================== */
.wt-result { padding: 36px 0 8px; }
.wt-result-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 2px 18px;
}
.wt-result-head h2 { font-size: 17px; font-weight: 700; color: var(--wt-text); }
.wt-result-head .cnt { font-size: 13px; color: var(--wt-text-3); }
.wt-result-head .cnt b { color: var(--wt-text); font-weight: 700; }

/* ---- 12 列网格：卡片占 3 列 = 4 列/行 ---- */
.wt-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }

.wt-card {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--wt-radius);
  border: 1px solid var(--wt-border);
  background: var(--wt-surface);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.wt-card:hover {
  transform: translateY(-4px);
  border-color: var(--wt-border-strong);
  box-shadow: var(--wt-shadow-hover);
}

.wt-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eef1f5;
}
.wt-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.wt-card:hover .wt-cover img { transform: scale(1.04); }
.wt-cover-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #b3bcc9;
}

/* ---- 缩略图 hover 过渡遮罩：模板编号 / 查看教程 / 在线预览 ---- */
.wt-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, .68);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .3s ease;
}
.wt-mask-no,
.wt-mask-btns { transform: translateY(8px); transition: transform .3s ease; }
.wt-card:hover .wt-mask,
.wt-card:focus-within .wt-mask { opacity: 1; }
.wt-card:hover .wt-mask-no,
.wt-card:hover .wt-mask-btns,
.wt-card:focus-within .wt-mask-no,
.wt-card:focus-within .wt-mask-btns { transform: translateY(0); }

.wt-mask-no { font-size: 12px; letter-spacing: .5px; color: rgba(255, 255, 255, .78); }
.wt-mask-btns { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.wt-mask-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border-radius: var(--wt-radius);
  border: 1px solid rgba(255, 255, 255, .45);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.wt-mask-btn:hover { background: #fff; border-color: #fff; color: var(--wt-text); }
.wt-mask-btn.is-primary { background: var(--wt-primary); border-color: var(--wt-primary); }
.wt-mask-btn.is-primary:hover { background: var(--wt-primary-dark); border-color: var(--wt-primary-dark); color: #fff; }

.wt-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 14px 16px 16px; }
.wt-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--wt-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.wt-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.wt-badge {
  font-size: 11.5px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--wt-primary-tint);
  color: var(--wt-primary);
  white-space: nowrap;
}

/* ---- 空状态 ---- */
.wt-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  color: var(--wt-text-3);
  font-size: 14px;
}
.wt-empty b { display: block; font-size: 16px; font-weight: 600; color: var(--wt-text); margin-bottom: 8px; }
.wt-empty a { color: var(--wt-primary); }
.wt-empty a:hover { text-decoration: underline; }

/* ---- 键盘焦点可见性 ---- */
.wt-chip:focus-visible,
.wt-sort a:focus-visible,
.wt-clear:focus-visible,
.wt-mask-btn:focus-visible,
.wt-search button:focus-visible {
  outline: 2px solid var(--wt-primary);
  outline-offset: 2px;
}

/* ===================== 分页（覆盖 pagination.css 的全局红色样式） ===================== */
.wt-page .pg-link { border-radius: var(--wt-radius); }
.wt-page .pg-item:not(.disabled):not(.active) .pg-link:hover {
  color: var(--wt-primary);
  border-color: var(--wt-primary-border);
  background: var(--wt-primary-tint);
  transform: none;
  box-shadow: none;
}
.wt-page .pg-item.active .pg-link {
  background: var(--wt-primary);
  border-color: var(--wt-primary);
  box-shadow: none;
}
.wt-page .pg-item.disabled .pg-link { background: #f1f3f6; }

/* ===================== 响应式 ===================== */
@media (max-width: 1024px) {
  .wt-card { grid-column: span 4; }        /* 3 列/行 */
  .wt-banner { padding: calc(var(--nav-h, 72px) + 44px) 0 52px; }
  .wt-banner-inner { grid-template-columns: 1fr; gap: 28px; }
  .wt-banner-art { max-width: 540px; margin: 4px auto 0; }
  .wt-filter-label { flex-basis: 84px; }
}

@media (max-width: 768px) {
  .wt-page { padding-bottom: 56px; }
  .wt-banner { padding: calc(var(--nav-h, 72px) + 36px) 0 44px; }
  .wt-banner h1 { font-size: 26px; }
  .wt-banner-sub { font-size: 14px; margin-bottom: 20px; }
  .wt-banner-points { gap: 14px; }
  .wt-banner-art { max-width: 480px; }
  .wt-card { grid-column: span 6; }        /* 2 列/行 */
  /* 触屏无 hover：遮罩常态显示为底部渐变条，保证入口可用 */
  .wt-mask {
    opacity: 1;
    justify-content: flex-end;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .82) 100%);
    padding: 10px 10px 12px;
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
  }
  .wt-mask-no,
  .wt-mask-btns { transform: none; }
  .wt-mask-btn { padding: 0 10px; }
  .wt-filter { padding: 4px 16px; }
  .wt-filter-row { flex-direction: column; gap: 8px; padding: 12px 0; }
  .wt-filter-search { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 0; }
  .wt-filter-search .wt-filter-label { padding-top: 0; }
  .wt-filter-label { flex: none; padding-top: 0; }
  .wt-chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .wt-chip-row::-webkit-scrollbar { display: none; }
}

@media (max-width: 560px) {
  .wt-card { grid-column: span 12; }       /* 1 列/行 */
  .wt-grid { gap: 14px; }
  .wt-result { padding-top: 28px; }
}
