/* ========== 基础 ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f7fb;
  --fg: #1f2329;
  --muted: #6b7280;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --border: #e5e7eb;
  --card: #ffffff;
  --accent: #10b981;
  --danger: #ef4444;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.10);
  --shadow-xl: 0 20px 48px rgba(0,0,0,.12);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: none; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* 屏幕阅读器专用（SEO 无障碍）*/
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* 图片懒加载 */
img { content-visibility: auto; }

/* ========== Header ========== */
.site-header {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.header-row { gap: 16px; }
.logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -.5px;
  flex-shrink: 0;
}
.logo::before {
  content: "📊";
  font-size: 22px;
}

/* ========== 搜索框 ========== */
.search-form {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  min-height: 40px;
}
.search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 0 0 20px;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--fg);
  min-width: 0;
}
.search-input::placeholder {
  color: #9ca3af;
  font-size: 13px;
}
.search-btn {
  border: none;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  width: 44px;
  min-width: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s, transform .15s;
}
.search-btn:hover { opacity: .9; }
.search-btn:active { transform: scale(.95); }

/* Hero 搜索结果标题 */
.hero-search h1 { font-size: 28px; }
.hero-search p strong { color: #fcd34d; font-weight: 700; }
.hero-search p em {
  background: rgba(255,255,255,.2);
  padding: 2px 10px;
  border-radius: 100px;
  font-style: normal;
  margin: 0 6px;
}
.clear-search {
  display: inline-block;
  margin-left: 14px;
  background: rgba(255,255,255,.2);
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  text-decoration: none;
  transition: background .15s;
}
.clear-search:hover {
  background: rgba(255,255,255,.35);
  text-decoration: none;
}

.nav a {
  margin-left: 24px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  position: relative;
  padding: 4px 0;
}
.nav a:hover { color: var(--primary); }
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .2s ease;
  border-radius: 1px;
}
.nav a:hover::after { width: 100%; }

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
  color: #fff;
  padding: 72px 0 64px;
  border-radius: 0 0 24px 24px;
  text-align: center;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  filter: blur(40px);
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -40px;
  width: 400px; height: 400px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  filter: blur(50px);
}
.hero h1 {
  font-size: 40px;
  margin-bottom: 12px;
  position: relative;
  font-weight: 800;
  letter-spacing: -.5px;
}
.hero p {
  font-size: 17px;
  opacity: .92;
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}
.hero .stats-badge {
  display: inline-flex;
  gap: 24px;
  margin-top: 20px;
  position: relative;
}
.hero .stats-badge span {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,.2);
}

/* ========== 分类筛选 ========== */
.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding: 4px;
}
.cat-filter a {
  padding: 7px 16px;
  border-radius: 100px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
}
.cat-filter a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}
.cat-filter a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, .3);
}

/* ========== 卡片网格 ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s;
  display: block;
  color: inherit;
  box-shadow: var(--shadow-sm);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(79, 70, 229, .3);
  text-decoration: none;
}
.card-cover {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e0e7ff 0%, #fce7f3 100%);
  overflow: hidden;
  position: relative;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f3f4f6;
  transition: transform .4s ease;
}
.card:hover .card-cover img {
  transform: scale(1.04);
}
.no-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 13px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}
.card-body { padding: 14px 16px 16px; background: #fff; }
.cat-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 8px;
  letter-spacing: .3px;
}
.card-body h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--fg);
  line-height: 1.45;
}
.card-body .desc {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.card-body .meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* ========== 分页 ========== */
.pager {
  margin: 36px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.pager a {
  padding: 9px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-weight: 500;
  font-size: 14px;
  transition: all .2s;
  min-height: 44px;
}
.pager a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(79, 70, 229, .3);
}
.pager .current {
  color: #374151;
  font-size: 13px;
  padding: 6px 14px;
  background: #f3f4f6;
  border-radius: 100px;
}

/* ========== 详情页 ========== */
.detail { padding: 24px 0 60px; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 20px; display: flex; align-items: center; gap: 4px; }
.breadcrumb a {
  padding: 2px 8px;
  border-radius: 6px;
  transition: all .15s;
}
.breadcrumb a:hover { background: var(--primary-light); color: var(--primary); }
.detail h1 {
  font-size: 30px;
  margin-bottom: 20px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -.3px;
}

/* ========== 详情页封面 Hero（标题叠在封面上）========== */
.detail-hero {
  position: relative;
  width: 100%;
  max-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}
.detail-hero .cover {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
  margin-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}
.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.5) 40%,
    rgba(0, 0, 0, 0.1) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}
.detail-hero-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 32px;
  color: #fff;
  pointer-events: none;
}
.detail-hero-text h1 {
  font-size: 30px;
  margin-bottom: 0;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -.3px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.hero-cat {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: .5px;
  border: 1px solid rgba(255,255,255,.3);
}

/* 无封面时的兜底 */
.detail > h1 { margin-bottom: 20px; }
.detail-hero ~ .info-grid { margin-top: 0; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: #fff;
  padding: 8px 0;
  border-radius: 14px;
  margin-bottom: 24px;
  font-size: 14px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: var(--shadow-sm);
}
.info-grid > div {
  padding: 14px 20px;
  border-right: 1px solid var(--border);
}
.info-grid > div:nth-child(3n) { border-right: none; }
.info-grid > div strong {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.detail h2 { font-size: 20px; margin: 28px 0 14px; font-weight: 700; letter-spacing: -.2px; }
.long-desc {
  white-space: pre-wrap;
  background: #fff;
  padding: 22px 24px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.8;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: var(--shadow-sm);
}
.tags { margin: 20px 0; }
.tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--primary-light);
  border: none;
  border-radius: 100px;
  font-size: 12px;
  color: var(--primary);
  margin: 3px;
  font-weight: 500;
}
.cta {
  text-align: center;
  background: linear-gradient(135deg, #f0fdf4 0%, #f0f9ff 100%);
  padding: 32px 24px;
  border-radius: 16px;
  margin: 28px 0;
  border: 1px solid #bbf7d0;
}
.cta .hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}
.related { margin-top: 48px; }

/* ========== 按钮 ========== */
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff !important;
  border-radius: 100px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 15px;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(79, 70, 229, .35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, .45);
  text-decoration: none;
}
.btn-primary.big { padding: 16px 40px; font-size: 17px; }

/* ========== 中转页 ========== */
.go-page {
  text-align: center;
  padding: 48px 24px;
  max-width: 560px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}
.go-page h1 { font-size: 24px; margin-bottom: 16px; font-weight: 800; }
.go-page .resource-title { margin-bottom: 20px; color: var(--muted); font-weight: 500; }
.notice {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 20px;
  border-radius: 12px;
  text-align: left;
  font-size: 13px;
  margin: 24px 0;
  border: 1px solid #fbbf24;
}
.notice ul { margin-left: 20px; margin-top: 6px; }
.countdown {
  color: var(--accent);
  font-size: 15px;
  margin: 24px 0;
  font-weight: 600;
}
.pwd {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.pwd strong {
  color: var(--danger);
  font-family: monospace;
  font-size: 16px;
  padding: 4px 12px;
  background: #fee2e2;
  border-radius: 6px;
}

/* ========== 关于页 ========== */
.about {
  padding: 36px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
  margin: 24px auto;
}
.about h1 { font-size: 26px; margin-bottom: 20px; font-weight: 800; }
.about h2 { font-size: 18px; margin: 24px 0 12px; font-weight: 700; }
.about p { margin-bottom: 12px; line-height: 1.8; color: var(--fg); }
.about ul { margin-left: 24px; margin-bottom: 12px; line-height: 1.8; }
.about code { background: #f3f4f6; padding: 2px 8px; border-radius: 4px; font-size: 13px; }

/* ========== 404 ========== */
.not-found { text-align: center; padding: 100px 20px; }
.not-found h1 { font-size: 96px; color: var(--primary); font-weight: 800; letter-spacing: -4px; }
.not-found p { color: var(--muted); font-size: 16px; margin-bottom: 24px; }

/* ========== 后台 ========== */
.admin-header {
  background: #1f2937;
  color: #fff;
  padding: 12px 0;
}
.admin-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-header nav a {
  color: #fff;
  margin-left: 16px;
  font-size: 14px;
}
.admin-main { padding: 24px 20px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}
.stat {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat .num { font-size: 32px; font-weight: 800; color: var(--primary); }
.stat > div:last-child { color: var(--muted); font-size: 13px; margin-top: 6px; }

.data-table {
  width: 100%;
  background: #fff;
  border-collapse: collapse;
  margin-bottom: 30px;
  font-size: 14px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th, .data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.data-table th {
  background: #f9fafb;
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.data-table tr:last-child td { border-bottom: none; }
.link-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
}
.link-btn:hover { background: #fee2e2; }

.resource-form {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.resource-form label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--muted);
  gap: 6px;
}
.resource-form input, .resource-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.resource-form input:focus, .resource-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.resource-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.resource-form .checkbox { flex-direction: row; align-items: center; gap: 10px; }
.resource-form .checkbox input { width: auto; }

/* ========== 待分享工作台 ========== */
.muted { color: var(--muted); font-size: 13px; }
.pending-table td { vertical-align: middle; }
.publish-form { display: flex; gap: 10px; align-items: center; }
.publish-form input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.publish-form .btn-primary { padding: 8px 18px; font-size: 13px; }

/* ========== 登录页 ========== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}
.login-box {
  background: #fff;
  padding: 36px;
  border-radius: 20px;
  width: 360px;
  box-shadow: var(--shadow-xl);
}
.login-box h1 { font-size: 22px; margin-bottom: 24px; text-align: center; font-weight: 800; }
.login-box form { display: flex; flex-direction: column; gap: 14px; }
.login-box label { display: flex; flex-direction: column; font-size: 13px; gap: 6px; }
.login-box input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.login-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.error { color: var(--danger); font-size: 13px; }

/* ========== Footer ========== */
.site-footer {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #a5b4fc;
  padding: 40px 0;
  text-align: center;
  font-size: 13px;
  margin-top: 80px;
}
.site-footer .links a {
  color: #c7d2fe;
  margin: 0 10px;
  padding: 4px 12px;
  border-radius: 100px;
  transition: all .15s;
}
.site-footer .links a:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
}
.site-footer p { margin: 6px 0; }

/* ========== 全部分类导航（SEO 内链增强）========== */
.cat-sitemap {
  margin: 56px 0 36px;
  padding: 28px;
  background: linear-gradient(135deg, #eef2ff 0%, #fdf4ff 100%);
  border-radius: 20px;
  border: 1px solid rgba(79, 70, 229, .12);
  position: relative;
}
.cat-sitemap h2 {
  font-size: 19px;
  margin-bottom: 20px;
  color: var(--fg);
  text-align: center;
  font-weight: 800;
  letter-spacing: -.2px;
}
.cat-sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.cat-sitemap-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 10px;
  text-decoration: none;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  min-height: 44px;
}
.cat-sitemap-item:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, .35);
  text-decoration: none;
}
.cat-sitemap-item .cat-count {
  font-size: 12px;
  color: #374151;
  font-weight: 500;
  padding: 2px 8px;
  background: #f3f4f6;
  border-radius: 100px;
}
.cat-sitemap-item:hover .cat-count {
  color: rgba(79, 70, 229, 1);
  background: rgba(255,255,255,.95);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .site-header { padding: 8px 0; }
  .site-header .container { gap: 8px; }
  .header-row { gap: 8px; }
  .logo { font-size: 16px; gap: 6px; }
  .logo::before { font-size: 18px; }
  .nav { margin-left: auto; }
  .nav a { margin-left: 12px; font-size: 13px; padding: 4px 0; }

  /* 搜索框在 768px 就全宽 */
  .search-form {
    flex-basis: 100%;
    max-width: none;
    min-height: 38px;
    order: 3;
  }
  .search-input { padding: 0 0 0 16px; font-size: 15px; }
  .search-btn { width: 40px; min-width: 40px; }

  .hero { padding: 40px 0 32px; border-radius: 0 0 18px 18px; margin-bottom: 24px; }
  .hero h1 { font-size: 26px; margin-bottom: 6px; letter-spacing: -.3px; }
  .hero p { font-size: 14px; line-height: 1.6; }
  .hero .stats-badge { gap: 10px; margin-top: 14px; flex-wrap: wrap; }
  .hero .stats-badge span { font-size: 12px; padding: 4px 12px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
  .card-body { padding: 10px 12px 12px; }
  .card-body .desc { display: none; }
  .card-body h3 { font-size: 13px; -webkit-line-clamp: 2; line-height: 1.35; }
  .card-body .meta { font-size: 10px; gap: 6px; padding-top: 6px; }
  .cat-tag { font-size: 10px; padding: 2px 8px; margin-bottom: 4px; }

  .detail h1 { font-size: 22px; margin-bottom: 14px; line-height: 1.35; }
  .detail-hero { max-height: 260px; border-radius: 12px; margin-bottom: 16px; }
  .detail-hero .cover { height: 260px; }
  .detail-hero-text { padding: 20px 22px; }
  .detail-hero-text h1 { font-size: 22px; }
  .breadcrumb { font-size: 12px; margin-bottom: 14px; }

  .info-grid { grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
  .info-grid > div { padding: 12px 14px; }
  .info-grid > div:nth-child(3n) { border-right: 1px solid var(--border); }
  .info-grid > div:nth-child(2n) { border-right: none; }
  .info-grid > div strong { font-size: 11px; }

  .cta { padding: 24px 16px; margin: 20px 0; }
  .cta .btn-primary { padding: 16px 32px; font-size: 16px; min-height: 52px; }

  .long-desc { padding: 18px 16px; font-size: 14px; line-height: 1.7; }
  .stats-grid { grid-template-columns: 1fr; }
  .container { padding: 0 14px; }
}

/* 分类筛选：移动端改成横向滚动 */
@media (max-width: 768px) {
  .cat-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 2px 12px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cat-filter::-webkit-scrollbar { display: none; }
  .cat-filter a {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 12px;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .hero { padding: 32px 0 26px; border-radius: 0 0 16px 16px; }
  .hero h1 { font-size: 22px; }
  .hero-search h1 { font-size: 20px; }
  .hero-search p { font-size: 13px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-cover { aspect-ratio: 16/10; }
  .card-body { padding: 8px 10px 10px; }
  .card-body h3 { font-size: 12px; -webkit-line-clamp: 2; }
  .card-body .meta { font-size: 9px; gap: 5px; }
  .cat-tag { font-size: 9px; padding: 1px 7px; }
  .pager a { padding: 8px 14px; font-size: 13px; min-height: 40px; }

  .detail h1 { font-size: 20px; }
  .detail-hero { max-height: 220px; border-radius: 10px; }
  .detail-hero .cover { height: 220px; }
  .detail-hero-text { padding: 16px 18px; }
  .detail-hero-text h1 { font-size: 20px; }
  .info-grid { grid-template-columns: 1fr; }
  .info-grid > div { padding: 10px 14px; border-right: none !important; border-bottom: 1px solid var(--border); }
  .info-grid > div:last-child { border-bottom: none; }

  .cat-sitemap { padding: 16px; margin: 28px 0 16px; border-radius: 14px; }
  .cat-sitemap h2 { font-size: 15px; margin-bottom: 14px; }
  .cat-sitemap-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cat-sitemap-item { padding: 8px 10px; font-size: 12px; min-height: 40px; }
  .cat-sitemap-item .cat-count { font-size: 11px; padding: 1px 6px; }

  .site-footer { padding: 20px 0; margin-top: 40px; font-size: 12px; }
  .site-footer .links a { margin: 0 6px; padding: 3px 8px; }

  .container { padding: 0 10px; }
  .logo { font-size: 15px; }
  .nav a { margin-left: 8px; font-size: 12px; }

  .btn-primary { padding: 14px 24px; font-size: 15px; min-height: 48px; }
  .btn-primary.big { padding: 16px 28px; font-size: 16px; }

  .go-page { padding: 24px 16px; margin: 20px 12px; }
  .go-page h1 { font-size: 20px; }

  .related h2, .detail h2 { font-size: 17px; }
}

/* 极小屏（iPhone SE 375px） */
@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card-cover { aspect-ratio: 4/3; }
  .card-body h3 { font-size: 11px; }
  .card-body .meta { display: none; }
  .hero h1 { font-size: 20px; }
  .container { padding: 0 8px; }
  .logo { font-size: 14px; }
  .logo::before { font-size: 16px; }
  .nav a { margin-left: 6px; font-size: 11px; }
  .search-input { font-size: 14px; }
  .search-input::placeholder { font-size: 11px; }
}

/* ===== 详情页扩展正文 ===== */
.detail-extra { margin-top: 28px; }
.detail-extra h2 { font-size: 20px; margin: 26px 0 12px; padding-left: 10px; border-left: 4px solid #4f46e5; }
.detail-extra .long-desc { color: #374151; line-height: 1.9; margin: 10px 0; }
.scene-list, .hl-list, .tip-list { margin: 10px 0; padding-left: 0; list-style: none; }
.scene-list li { display: inline-block; background: #eef2ff; color: #4338ca; border-radius: 999px; padding: 6px 14px; margin: 0 8px 8px 0; font-size: 14px; }
.hl-list li, .tip-list li { position: relative; padding: 6px 0 6px 22px; color: #374151; line-height: 1.8; }
.hl-list li::before, .tip-list li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: #4f46e5; }
.tip-list li::before { background: #10b981; }
.faq { margin: 10px 0; }
.faq-item { border: 1px solid #e5e7eb; border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: #1f2937; list-style: none; position: relative; }
.faq-item summary::after { content: "+"; position: absolute; right: 16px; color: #9ca3af; font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { padding: 0 16px 14px; margin: 0; color: #4b5563; line-height: 1.8; }

/* 分类页 SEO 文案区块 */
.cat-seo {
  margin: 0 0 24px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--border, #eee);
  border-radius: 12px;
  line-height: 1.9;
  color: #444;
}
.cat-seo h2 {
  font-size: 18px;
  margin: 0 0 10px;
  color: #222;
  font-weight: 600;
}
.cat-seo p {
  margin: 0 0 10px;
  font-size: 15px;
}
.cat-seo p:last-of-type { margin-bottom: 0; }
.cat-kw {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #eee;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cat-kw-label { font-size: 13px; color: #888; }
.cat-kw-item {
  font-size: 13px;
  color: #666;
  background: #f5f7fa;
  padding: 4px 10px;
  border-radius: 14px;
}
@media (max-width: 640px) {
  .cat-seo { padding: 16px; }
  .cat-seo p { font-size: 14px; line-height: 1.8; }
}

/* 分类页 SEO 文案区块 v2 —— 置于页尾，柔和卡片 */
.cat-seo {
  margin: 36px 0 10px;
  padding: 26px 28px;
  background: #fff;
  border: 1px solid #e9eaf2;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(17, 24, 39, .04);
  line-height: 1.95;
  color: #4a4a55;
}
.cat-seo h2 {
  font-size: 17px;
  line-height: 1.4;
  margin: 0 0 10px;
  color: #222;
  font-weight: 600;
}
.cat-seo-sub {
  font-size: 13px !important;
  color: #8a8a99 !important;
  margin: 0 0 16px !important;
}
.cat-seo p {
  font-size: 14.5px;
  margin: 0 0 12px;
  color: #4a4a55;
}
.cat-kw {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #e2e4ee;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cat-kw-label { font-size: 12.5px; color: #9a9aab; }
.cat-kw-item {
  font-size: 12.5px;
  color: #5a5a6b;
  background: #fff;
  border: 1px solid #e6e7ef;
  padding: 5px 12px;
  border-radius: 14px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .cat-seo { padding: 18px 16px; border-radius: 12px; margin-top: 26px; }
  .cat-seo p { font-size: 14px; line-height: 1.85; }
  .cat-kw-item { font-size: 12px; padding: 4px 10px; }
}

/* v3: 杂志式双栏 intro，位于 hero 下方 */
.cat-seo {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin: 26px 0 6px;
  padding: 22px 26px;
  background: linear-gradient(135deg, #fafaff 0%, #f5f3ff 100%);
  border: 1px solid #ece9fb;
  border-radius: 14px;
  box-shadow: none;
  line-height: 1.9;
}
.cat-seo h2 {
  flex: 0 0 auto;
  max-width: 220px;
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
  padding-left: 14px;
  position: relative;
  color: #1f2333;
  font-weight: 600;
}
.cat-seo h2::before {
  content: '';
  position: absolute;
  left: 0; top: 3px; bottom: 3px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7c3aed, #ec4899);
}
.cat-seo-body { flex: 1; min-width: 0; }
.cat-seo-body p { margin: 0 0 8px; font-size: 14px; color: #4a4a55; line-height: 1.9; }
.cat-seo-body p:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .cat-seo { flex-direction: column; gap: 10px; padding: 16px 18px; margin: 20px 0 4px; }
  .cat-seo h2 { max-width: none; font-size: 15.5px; }
  .cat-seo-body p { font-size: 13.5px; line-height: 1.85; }
}
