﻿/* ========================================================
   tool-detail.css — 家族工具 / 内容详情页通用样式
   ======================================================== */

.tool-page { padding: 24px 0 40px; min-height: 600px; }

/* 面包屑 */
.breadcrumb { font-size: 13px; color: #888; margin-bottom: 20px; }
.breadcrumb a { color: #b58840; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 8px; color: #ccc; }

/* Hero 条 */
.page-hero {
  display: flex; align-items: center;
  background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
  border: 1px solid #f0e6d3;
  border-radius: 12px;
  padding: 24px 30px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(180,140,80,.08);
}
.hero-surname {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #c0392b, #a93226);
  color: #fff;
  font-size: 30px; font-weight: 700;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(192,57,43,.25);
  flex-shrink: 0;
}
.hero-meta { flex: 1; margin: 0 20px; }
.hero-meta h1 { font-size: 22px; color: #333; margin: 0 0 6px; font-weight: 700; }
.hero-meta .hero-sub { font-size: 13px; color: #999; margin: 0; }
.back-btn {
  padding: 8px 18px;
  background: #fff; border: 1px solid #e0d4bc;
  border-radius: 20px; color: #8b6f47;
  font-size: 13px; cursor: pointer;
  transition: all .2s;
}
.back-btn:hover { background: #f9f2e4; border-color: #d4a25e; color: #b58840; }

/* 加载/空态 */
.tool-body { min-height: 400px; }
.loading-state, .empty-state {
  text-align: center; padding: 80px 20px;
  color: #999;
}
.spinner {
  width: 40px; height: 40px; margin: 0 auto 20px;
  border: 3px solid #eee; border-top-color: #c0392b;
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state .empty-icon { font-size: 56px; margin-bottom: 16px; }

/* ===== 辈分排行 ===== */
.content-generation_table .gen-block {
  background: #fff; border: 1px solid #f0e6d3; border-radius: 10px;
  padding: 16px 20px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 20px;
}
.content-generation_table .gen-num {
  width: 72px; flex-shrink: 0;
  text-align: center;
  background: linear-gradient(135deg, #c0392b, #a93226);
  color: #fff; padding: 8px 0; border-radius: 8px;
  font-size: 14px; font-weight: 600;
}
.content-generation_table .gen-names {
  flex: 1; font-size: 14px; color: #444; line-height: 2;
}

/* ===== 祖先链 ===== */
.content-ancestor_chain .ancestor-chain {
  position: relative; padding-left: 30px;
}
.content-ancestor_chain .ancestor-chain::before {
  content: ''; position: absolute;
  left: 10px; top: 0; bottom: 0;
  width: 2px; background: #d4a25e;
}
.content-ancestor_chain .ancestor-node {
  position: relative; padding: 14px 20px 14px 20px;
  background: #fff; border: 1px solid #f0e6d3;
  border-radius: 10px; margin-bottom: 10px;
  margin-left: calc(var(--level,0) * 18px);
}
.content-ancestor_chain .ancestor-dot {
  position: absolute; left: -24px; top: 50%;
  width: 14px; height: 14px; border-radius: 50%;
  background: #c0392b; transform: translateY(-50%);
  border: 3px solid #fff;
}
.content-ancestor_chain .ancestor-name {
  font-size: 16px; font-weight: 600; color: #333; margin-bottom: 4px;
}
.content-ancestor_chain .ancestor-meta { font-size: 12px; color: #888; }

/* ===== 关系查询 ===== */
.content-relation_query .relation-search {
  max-width: 500px; margin: 40px auto;
  background: #fff; border: 1px solid #f0e6d3; border-radius: 12px;
  padding: 30px;
}
.content-relation_query .rel-row {
  display: flex; align-items: center; margin-bottom: 16px;
}
.content-relation_query .rel-row label {
  width: 80px; font-size: 14px; color: #555;
}
.content-relation_query .rel-row input {
  flex: 1; padding: 10px 14px;
  border: 1px solid #ddd; border-radius: 6px;
  font-size: 14px; outline: none;
}
.content-relation_query .rel-row input:focus { border-color: #d4a25e; }
.content-relation_query .rel-btn {
  width: 100%; padding: 12px; margin-top: 10px;
  background: linear-gradient(135deg, #c0392b, #a93226);
  color: #fff; border: none; border-radius: 6px;
  font-size: 15px; cursor: pointer;
}
.content-relation_query .rel-result {
  margin-top: 20px; padding: 16px;
  background: #fdf6f0; border-radius: 8px;
}
.content-relation_query .rel-calc { font-size: 14px; color: #555; }
.content-relation_query .rel-hint { font-size: 12px; color: #999; margin-top: 8px; }

/* ===== 取名 ===== */
.content-naming_tool .naming-wrap { }
.content-naming_tool .naming-info {
  background: #fff9f0; border: 1px solid #f0e6d3;
  border-radius: 10px; padding: 20px; margin-bottom: 20px;
}
.content-naming_tool .naming-info h3 { margin: 0 0 6px; font-size: 18px; color: #333; }
.content-naming_tool .naming-info p { margin: 0; font-size: 13px; color: #888; }
.content-naming_tool .naming-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
.content-naming_tool .name-card {
  background: #fff; border: 1px solid #f0e6d3;
  border-radius: 10px; padding: 18px 10px;
  text-align: center; font-family: inherit;
  transition: all .2s; cursor: pointer;
}
.content-naming_tool .name-card:hover {
  transform: translateY(-3px); box-shadow: 0 6px 16px rgba(192,57,43,.15);
  border-color: #c0392b;
}
.content-naming_tool .name-surname { color: #c0392b; font-weight: 700; font-size: 22px; }
.content-naming_tool .name-given { color: #333; font-size: 22px; }
.content-naming_tool .naming-disclaimer {
  text-align: center; font-size: 12px; color: #999;
  margin-top: 24px;
}

/* ===== 出名人物 ===== */
.content-celebrity_list .celeb-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.content-celebrity_list .celeb-card {
  background: #fff; border: 1px solid #f0e6d3;
  border-radius: 12px; padding: 18px; text-align: center;
}
.content-celebrity_list .celeb-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  margin-bottom: 10px; object-fit: cover;
  border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.content-celebrity_list .celeb-name { font-size: 15px; font-weight: 600; color: #333; }
.content-celebrity_list .celeb-gen { font-size: 12px; color: #b58840; margin: 4px 0; }
.content-celebrity_list .celeb-bio { font-size: 12px; color: #888; line-height: 1.6; }

/* ===== 相册 ===== */
.content-photo_gallery .gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.content-photo_gallery .gallery-card {
  cursor: pointer; transition: transform .2s;
}
.content-photo_gallery .gallery-card:hover { transform: translateY(-3px); }
.content-photo_gallery .gallery-img-wrap {
  aspect-ratio: 1; background: #f5f0e6;
  border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.content-photo_gallery .gallery-img {
  width: 100%; height: 100%; object-fit: cover;
}
.content-photo_gallery .gallery-ph { font-size: 40px; }
.content-photo_gallery .gallery-title {
  font-size: 13px; color: #555; margin-top: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== 大事记时间轴 ===== */
.content-timeline .timeline {
  position: relative; padding-left: 40px;
}
.content-timeline .timeline::before {
  content: ''; position: absolute;
  left: 14px; top: 0; bottom: 0;
  width: 2px; background: #d4a25e;
}
.content-timeline .tl-item {
  position: relative; margin-bottom: 24px;
}
.content-timeline .tl-year {
  position: absolute; left: -40px; top: 0;
  font-size: 13px; font-weight: 700;
  color: #b58840;
}
.content-timeline .tl-dot {
  position: absolute; left: -30px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #c0392b; border: 3px solid #fff;
  box-shadow: 0 0 0 2px #d4a25e;
}
.content-timeline .tl-content {
  background: #fff; border: 1px solid #f0e6d3;
  border-radius: 10px; padding: 16px 20px;
}
.content-timeline .tl-date { font-size: 12px; color: #b58840; margin-bottom: 4px; }
.content-timeline .tl-title { font-size: 16px; margin: 0 0 8px; color: #333; }
.content-timeline .tl-summary { font-size: 13px; color: #666; line-height: 1.8; margin: 0; }

/* ===== 祠堂/通用 ===== */
.content-forum_list .forum-list,
.content-gallery_list .forum-list {
  display: flex; flex-direction: column; gap: 12px;
}
.content-forum_list .forum-item {
  background: #fff; border: 1px solid #f0e6d3; border-radius: 10px;
  padding: 18px 22px; transition: box-shadow .2s;
}
.content-forum_list .forum-item:hover {
  box-shadow: 0 4px 14px rgba(180,140,80,.1);
}
.content-forum_list .forum-title { margin: 0 0 6px; font-size: 16px; color: #333; font-weight: 600; }
.content-forum_list .forum-summary { margin: 0 0 8px; font-size: 13px; color: #666; line-height: 1.8; }
.content-forum_list .forum-meta { font-size: 12px; color: #b58840; }

/* ===== Hero 区电子谱按钮（与吊系图并列） ===== */
.hero-ebook-btn {
  margin-left: 12px !important;
  background: linear-gradient(135deg, #d48806, #b36a00) !important;
  border-color: #d48806 !important;
}
.hero-ebook-btn .tree-btn-title { color: #fff !important; }
.hero-ebook-btn .tree-btn-subtitle { color: rgba(255,255,255,.8) !important; }

/* 响应式 */
@media (max-width: 768px) {
  .page-hero { flex-direction: column; gap: 16px; text-align: center; }
  .hero-surname { margin: 0 auto; }
  .content-celebrity_list .celeb-grid,
  .content-photo_gallery .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .content-naming_tool .naming-grid { grid-template-columns: repeat(3, 1fr); }
}
