/* 小鱼获客 - 前台样式 */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --accent: #22d3ee;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; }
.logo-fish { font-size: 26px; }
.logo-text em { color: var(--primary); font-style: normal; }
.main-nav { display: flex; gap: 20px; }
.main-nav a { color: var(--muted); font-weight: 500; padding: 6px 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); border-color: var(--primary); }
.header-search { margin-left: auto; display: flex; }
.header-search input {
  border: 1px solid var(--border); border-right: 0; border-radius: 8px 0 0 8px;
  padding: 8px 12px; width: 200px; outline: none; font-size: 14px;
}
.header-search input:focus { border-color: var(--primary); }
.header-search button {
  background: var(--primary); color: #fff; border: 0; padding: 8px 16px;
  border-radius: 0 8px 8px 0; cursor: pointer; font-size: 14px;
}

/* Category bar */
.category-bar { background: #fff; border-bottom: 1px solid var(--border); }
.cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  white-space: nowrap; padding: 6px 14px; border-radius: 20px; font-size: 13px;
  background: #f1f5f9; color: var(--muted); transition: .15s;
}
.cat-chip:hover { background: #e2e8f0; }
.cat-chip.on { background: var(--primary); color: #fff; font-weight: 600; }
.cat-chip span { margin-right: 4px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 45%, #0c4a6e 100%);
  color: #fff; padding: 64px 20px; text-align: center; position: relative; overflow: hidden;
}
.hero::after {
  content: "🐟"; position: absolute; font-size: 200px; opacity: .08;
  right: -20px; top: -40px; transform: rotate(-15deg);
}
.hero h1 { font-size: 40px; margin-bottom: 12px; }
.hero h1 span { color: #a5f3fc; }
.hero-sub { font-size: 16px; opacity: .9; margin-bottom: 28px; }
.hero-search { display: flex; max-width: 560px; margin: 0 auto 36px; }
.hero-search input {
  flex: 1; border: 0; border-radius: 30px 0 0 30px; padding: 15px 22px;
  font-size: 16px; outline: none;
}
.hero-search button {
  background: #f97316; color: #fff; border: 0; border-radius: 0 30px 30px 0;
  padding: 0 28px; font-size: 16px; cursor: pointer; white-space: nowrap;
}
.hero-stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat b { display: block; font-size: 30px; }
.stat span { font-size: 13px; opacity: .85; }

/* Listing */
.listing { padding: 36px 0 56px; }
.listing-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.listing-head h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.head-ico { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.listing-count { color: var(--muted); font-size: 14px; }

.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tpl-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; display: block;
}
.tpl-card:hover { transform: translateY(-6px); box-shadow: 0 14px 34px rgba(15, 23, 42, .12); }
.tpl-thumb {
  height: 150px; position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff;
}
.tpl-ico { font-size: 46px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); }
.tpl-name { margin-top: 6px; font-size: 15px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.2); }
.badge-hot, .badge-soon {
  position: absolute; top: 10px; right: 10px; font-size: 12px; padding: 2px 8px;
  border-radius: 12px; background: #ef4444; color: #fff;
}
.badge-soon { background: rgba(0,0,0,.35); }
.tpl-body { padding: 14px 16px 16px; }
.tpl-body h3 { font-size: 16px; margin-bottom: 6px; }
.tpl-body p { font-size: 13px; color: var(--muted); min-height: 40px; }
.tpl-meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--muted); }
.tpl-cat { color: var(--primary-dark); }

/* 行业分类栏目 */
.cats-section { padding: 8px 0 12px; }
.section-title { text-align: center; margin: 12px 0 30px; }
.section-title h2 { font-size: 30px; }
.section-title h2 span { color: var(--primary); }
.section-title p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.cats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cat-card {
  background: #fff; border: 1px solid #eef2f7; border-radius: 16px;
  padding: 24px 14px 20px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 10px; transition: .2s; position: relative; overflow: hidden;
}
.cat-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
}
.cat-card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(15,23,42,.1); border-color: var(--c1); }
.cat-ico {
  width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center;
  justify-content: center; font-size: 30px; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 10px 22px rgba(15,23,42,.15);
}
.cat-name { font-size: 14px; font-weight: 600; color: #1e293b; line-height: 1.5; }
.cat-count { font-size: 12px; color: #94a3b8; }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination a {
  min-width: 36px; height: 36px; padding: 0 12px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 8px; background: #fff; border: 1px solid var(--border); color: var(--muted);
}
.pagination a.cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }

/* Empty */
.empty { text-align: center; padding: 60px 0; color: var(--muted); }
.empty-ico { font-size: 64px; margin-bottom: 12px; }
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 10px; background: #fff;
  border: 1px solid var(--border); color: var(--text); cursor: pointer; font-size: 14px;
}
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn:hover { opacity: .9; }

/* Detail */
.detail { padding: 28px 0 56px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--primary); }
.detail-grid { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.detail-info { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.detail-title { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.tpl-ico.big { width: 60px; height: 60px; font-size: 30px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.detail-title h1 { font-size: 22px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag { font-size: 12px; background: #f1f5f9; color: var(--muted); padding: 2px 10px; border-radius: 12px; }
.tag.hot { background: #fee2e2; color: #dc2626; }
.detail-desc { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.detail-meta { list-style: none; border-top: 1px solid var(--border); padding-top: 14px; }
.detail-meta li { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.detail-meta li span { color: var(--muted); }
.detail-actions { display: flex; gap: 12px; margin-top: 20px; }
.detail-actions .btn { flex: 1; text-align: center; }
.detail-note { margin-top: 20px; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px; padding: 14px; font-size: 13px; color: #075985; }
.detail-note p { margin-top: 4px; }

.detail-preview { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: sticky; top: 80px; }
.preview-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f1f5f9; border-bottom: 1px solid var(--border); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #f87171; } .dot.y { background: #fbbf24; } .dot.g { background: #34d399; }
.preview-url { flex: 1; font-size: 12px; color: var(--muted); margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.open-new { font-size: 12px; color: var(--primary); }
.detail-preview iframe { width: 100%; height: 620px; border: 0; display: block; background: #fff; }
.preview-empty { padding: 80px 20px; text-align: center; color: var(--muted); }
.preview-empty span { font-size: 60px; display: block; margin-bottom: 12px; }

/* Footer */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 20px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 48px 20px; }
.footer-brand p { font-size: 13px; opacity: .8; margin-top: 10px; }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-links strong, .footer-contact strong { color: #fff; margin-bottom: 6px; }
.footer-links a { font-size: 14px; opacity: .85; }
.footer-links a:hover { color: var(--accent); }
.footer-contact p { font-size: 13px; opacity: .8; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 16px 0; font-size: 13px; opacity: .7; text-align: center; }

/* Responsive */
@media (max-width: 1024px) {
  .tpl-grid { grid-template-columns: repeat(3, 1fr); }
  .cats-grid { grid-template-columns: repeat(4, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-preview { position: static; }
  .main-nav a:nth-child(2) { display: none; }
}
@media (max-width: 720px) {
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .header-search { display: none; }
  .hero h1 { font-size: 28px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
