/* 金恐龙鱼之家 · 全站样式（深色水族 + 金色强调） */
:root {
  --bg: #061017;
  --bg-2: #0a1a22;
  --panel: #0e1c23;
  --panel-2: #0c1317;
  --gold: #e3ab35;
  --gold-2: #f0c25c;
  --text: #e9eff1;
  --muted: #9aa9ae;
  --line: rgba(255, 255, 255, 0.08);
  --line-gold: rgba(227, 171, 53, 0.35);
  --radius: 10px;
  --container: 1376px;
  --header-h: 70px;
  --font: 'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: #10120c; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 24px; border-radius: 999px;
  font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; transition: background .2s, border-color .2s, color .2s;
}
.btn-gold { background: var(--gold); color: #17130a; }
.btn-gold:hover { background: var(--gold-2); }
.btn-outline { border-color: var(--line-gold); color: var(--text); background: rgba(6, 16, 23, .35); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-2); }

/* ---------- 头部 ---------- */
.site-header {
  height: var(--header-h);
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 16, 23, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 26px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--gold); font-size: 21px; font-weight: 800; letter-spacing: .5px; }
.brand-mark { width: 44px; height: 24px; flex: none; }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: 6px; }
.site-nav a { font-size: 14px; color: #cfd9dc; padding: 24px 0; position: relative; }
.site-nav a:hover { color: var(--gold-2); }
.site-nav a.is-current { color: var(--gold); }
.site-nav a.is-current::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 16px; height: 2px; background: var(--gold);
}
.header-cta { margin-left: auto; height: 40px; padding: 0 20px; font-size: 14px; }
.nav-toggle { display: none; width: 42px; height: 38px; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--text); }

/* ---------- Hero ---------- */
.hero { display: flex; align-items: center; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1fr 1.16fr; gap: 40px; align-items: center; min-height: 372px; }
.hero-copy { padding: 30px 0; }
.hero h1 {
  font-size: 66px; line-height: 1.05; letter-spacing: 1px;
  color: var(--gold);
}
.hero-sub { margin-top: 14px; font-size: 30px; font-weight: 700; color: #f4f8f9; line-height: 1.3; }
.hero-desc { margin-top: 16px; max-width: 520px; font-size: 15px; line-height: 1.85; color: var(--muted); }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero-media { position: relative; align-self: stretch; }
.hero-media img {
  width: 100%; height: 372px; object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 100%);
}

/* ---------- 统计条 ---------- */
.stats { background: var(--bg-2); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line-gold); }
.stats-inner { display: flex; align-items: center; gap: 0; min-height: 97px; }
.stat { display: flex; align-items: baseline; gap: 4px; padding: 0 34px; border-left: 1px solid var(--line); flex-wrap: wrap; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num { font-size: 34px; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-unit { font-size: 15px; font-weight: 700; color: var(--gold); }
.stat-label { flex-basis: 100%; font-size: 13px; color: #cfd9dc; margin-top: 4px; }
.stats-note { margin-left: auto; max-width: 420px; font-size: 14px; line-height: 1.8; color: var(--muted); }

/* ---------- 通用小节 ---------- */
.section { padding: 20px 0; }
.sec-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 24px; font-weight: 800; color: #f4f8f9; margin-bottom: 14px;
}
.sec-title::before { content: ""; width: 4px; height: 22px; background: var(--gold); border-radius: 2px; }

/* ---------- 分类卡 ---------- */
.section-categories { padding-top: 20px; padding-bottom: 16px; }
.cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.cat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s;
}
.cat-card:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.cat-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel-2); }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-card h3 { font-size: 16px; padding: 12px 14px 0; color: #f4f8f9; }
.cat-card p { font-size: 12.5px; line-height: 1.65; color: var(--muted); padding: 6px 14px 14px; }

/* ---------- 图鉴精选 ---------- */
.section-species { padding-top: 18px; padding-bottom: 20px; }
.species-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.species-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); height: 195px; }
.species-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.species-card:hover img { transform: scale(1.04); }
.species-text {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 20px 16px;
  background: linear-gradient(180deg, rgba(6, 16, 23, 0) 0%, rgba(6, 16, 23, .86) 46%, rgba(6, 16, 23, .96) 100%);
}
.species-text h3 { font-size: 22px; color: #fff; }
.species-text p { margin-top: 4px; font-size: 13px; line-height: 1.6; color: #c8d4d7; }

/* ---------- 开缸路径 ---------- */
.section-path { padding-top: 20px; padding-bottom: 18px; }
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.path-step { display: flex; gap: 14px; align-items: flex-start; position: relative; padding-right: 16px; }
.path-step + .path-step::before {
  content: "›"; position: absolute; left: -20px; top: 34px;
  color: var(--gold); font-size: 30px; line-height: 1; opacity: .8;
}
.step-badge {
  flex: none; width: 66px; height: 66px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 22px; font-weight: 800;
  counter-increment: step;
}
.path-grid { counter-reset: step; }
.step-badge::before { content: counter(step); }
.step-tag { font-size: 13px; color: var(--gold); font-weight: 700; }
.step-body h3 { font-size: 17px; color: #f4f8f9; margin: 2px 0 4px; }
.step-body p { font-size: 12.5px; line-height: 1.7; color: var(--muted); }

/* ---------- 两个坑 ---------- */
.section-notes { padding-top: 18px; padding-bottom: 20px; }
.notes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.note-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; min-height: 122px;
}
.note-icon {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--gold); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; margin-top: 2px;
}
.note-icon::before { content: "!"; }
.note-body h3 { font-size: 18px; color: var(--gold); }
.note-body p { margin-top: 6px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.note-card img { width: 132px; height: 92px; object-fit: cover; border-radius: 8px; margin-left: auto; flex: none; }

/* ---------- FAQ ---------- */
.section-faq { padding-top: 18px; padding-bottom: 24px; }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; align-items: start; }
.faq-item { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 12px 46px 12px 18px; position: relative;
  font-size: 15px; font-weight: 600; color: #eef4f5;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 20px; font-weight: 400; line-height: 1;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 18px 14px; font-size: 13.5px; line-height: 1.8; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { position: relative; height: 165px; overflow: hidden; display: flex; align-items: center; }
.cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 16, 23, .78), rgba(6, 16, 23, .35) 55%, rgba(6, 16, 23, .8)); }
.cta-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 24px; }
.cta-copy { margin: 0 auto; text-align: center; }
.cta-copy h2 { font-size: 30px; color: #fff; }
.cta-copy p { margin-top: 6px; font-size: 14px; color: #d3dee0; }

/* ---------- 页脚 ---------- */
.site-footer { padding-top: 40px; border-top: 1px solid var(--line); background: #050d13; }
.footer-top { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; }
.footer-desc { margin-top: 14px; font-size: 13px; line-height: 1.85; color: var(--muted); }
.footer-nav h2 { font-size: 21px; color: var(--gold); font-weight: 800; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 16px; }
.footer-nav a { font-size: 15px; color: #cfd9dc; }
.footer-nav a:hover { color: var(--gold-2); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 34px; padding: 16px 0 22px; border-top: 1px solid var(--line);
  font-size: 13px; color: #7d8c91;
}

/* ---------- 直接子页基础样式（内页沿用同一套 token） ---------- */
.page-hero { padding: 34px 0 26px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; gap: 8px; font-size: 13px; color: var(--muted); }
.breadcrumb a:hover { color: var(--gold-2); }
.page-hero h1 { margin-top: 12px; font-size: 40px; color: var(--gold); }
.page-hero p { margin-top: 10px; max-width: 820px; font-size: 15px; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 1240px) {
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 13px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 54px; }
  .hero-sub { font-size: 26px; }
  .stats-note { max-width: 340px; font-size: 13px; }
}

@media (max-width: 1000px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: block; }
  .site-header { position: relative; }
  .site-nav.is-open {
    display: flex; position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: #07141c; border-bottom: 1px solid var(--line); padding: 6px 32px 16px;
  }
  .site-nav.is-open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav.is-open a.is-current::after { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 8px; min-height: 0; padding: 26px 0 0; }
  .hero-media img { height: 260px; -webkit-mask-image: none; mask-image: none; }
  .stats-inner { flex-wrap: wrap; padding: 18px 32px; gap: 18px 0; }
  .stats-note { margin-left: 0; max-width: none; flex-basis: 100%; }
  .species-card { height: 210px; }
  .path-grid { grid-template-columns: 1fr; gap: 18px; }
  .path-step + .path-step::before { display: none; }
  .notes-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .hero h1 { font-size: 40px; }
  .hero-sub { font-size: 21px; }
  .hero-actions .btn { height: 44px; padding: 0 18px; font-size: 14px; }
  .stats-inner { padding: 16px 20px; }
  .stat { padding: 0 18px; }
  .stat-num { font-size: 28px; }
  .sec-title { font-size: 21px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .species-grid { grid-template-columns: 1fr; gap: 14px; }
  .species-card { height: 190px; }
  .notes-grid { gap: 14px; }
  .note-card img { display: none; }
  .faq-grid { grid-template-columns: 1fr; }
  .cta { height: auto; padding: 34px 0; }
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-copy h2 { font-size: 24px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .page-hero h1 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ===== 数据化补充 v1.1 · 首页分类内容模块 / 列表 / 详情 ===== */

/* 首页「分类内容」：两个一行的大卡，卡内列该分类最新 3 条 */
.cat-modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cat-module-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 18px; transition: border-color .2s;
}
.cat-module-card:hover { border-color: var(--line-gold); }
.cat-module-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line);
}
.cat-module-head h3 { font-size: 17px; color: #f4f8f9; }
.cat-module-head h3 a:hover { color: var(--gold-2); }
.cat-module-count { font-size: 12.5px; color: var(--muted); }
.cat-module-more { margin-left: auto; font-size: 12.5px; color: var(--gold); }
.cat-module-more:hover { color: var(--gold-2); }
.mod-list { margin-top: 0; display: flex; flex-direction: column; gap: 7px; }
.mod-list li { min-width: 0; }
.mod-list a {
  display: block; font-size: 13.5px; line-height: 1.6; color: #cfd9dc;
  padding-left: 14px; position: relative;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mod-list a::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--line-gold);
}
.mod-list a:hover { color: var(--gold-2); }

/* 分类卡：标题下摘要单行截断，卡片等高 */
.cat-card p {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; word-break: break-word;
}
.species-text h3, .species-text p {
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word;
}
.species-text h3 { -webkit-line-clamp: 2; }
.species-text p { -webkit-line-clamp: 2; }

/* 列表页：卡片缩略图与摘要截断（沿用 components.css 的 .list-card） */
.list-card h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; word-break: break-word; }
.list-card p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; word-break: break-word; }
.list-card .thumb { display: block; }
.list-card .thumb img { display: block; }

/* 详情页：正文图片与分页导航 */
.article figure { margin: 20px 0 0; }
.article figure img { width: 100%; height: auto; max-width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.article figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.prev-next { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.prev-next a {
  display: block; padding: 14px 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13.5px; line-height: 1.6; color: #cfd9dc;
  overflow: hidden; text-overflow: ellipsis;
}
.prev-next a:hover { border-color: var(--line-gold); color: var(--gold-2); }
.prev-next span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.article-meta .tag { font-size: 12px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 26px 0 10px; }
.pager a, .pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-2);
  font-size: 13px; color: #cfd9dc;
}
.pager a:hover { border-color: var(--line-gold); color: var(--gold-2); }
.pager .is-current { background: var(--gold); border-color: var(--gold); color: #17130a; font-weight: 700; }
.pager-info { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.list-seo { margin-top: 6px; font-size: 12.5px; color: #7d8c91; }

@media (max-width: 1000px) {
  .cat-modules { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .mod-list a { font-size: 13px; }
  .prev-next { grid-template-columns: minmax(0, 1fr); }
  .pager-info { margin-left: 0; flex-basis: 100%; }
}

/* 详情页：无目录时单栏、正文分节与来源行 */
.article-layout--no-toc { grid-template-columns: minmax(0, 1fr); }
.article-source a { color: var(--gold); }
.article-source a:hover { color: var(--gold-2); }
.article .sec:first-child h2 { margin-top: 0; }
.article .sec { max-width: 100%; }
