/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #fbf8f3;
  color: #5a4a3f;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
  flex: 1;
}

/* 头部导航 */
.header {
  background-color: #8b7355;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: white;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: white;
  cursor: pointer;
}

/* 团队介绍区域 */
.team-section {
  margin-bottom: 40px;
}

.team-title {
  font-size: 24px;
  color: #8b5a2b;
  margin-bottom: 20px;
  padding-left: 8px;
  border-left: 4px solid #d4a373;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.team-card {
  background: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 115, 85, 0.15);
}

.team-role {
  font-size: 12px;
  color: #8b7355;
  background-color: #f8f0e3;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.team-name {
  font-size: 18px;
  font-weight: 600;
  color: #8b5a2b;
  margin-bottom: 6px;
}

.team-duty {
  font-size: 14px;
  color: #7a6a5a;
  line-height: 1.5;
}

/* 族谱树样式 */
.family-tree-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.family-generation {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
}

.family-node {
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.1);
  text-align: center;
  min-width: 120px;
  transition: all 0.2s;
  border: 3px solid transparent;
}

.family-node:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(139, 115, 85, 0.2);
  border-color: #d4a373;
}

.family-node-current {
  border-color: #d4a373;
  background-color: #faf5ed;
}

.family-node-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  background-color: #f8f0e3;
}

.family-node-name {
  font-size: 16px;
  font-weight: 600;
  color: #8b5a2b;
  margin-bottom: 4px;
}

.family-node-breed {
  font-size: 13px;
  color: #a08a73;
}

.family-connector {
  width: 2px;
  height: 24px;
  background-color: #d4a373;
}

.family-horizontal {
  display: none;
}

/* 详情页样式 */
.back-btn {
  display: inline-flex;
  align-items: center;
  color: #8b7355;
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 20px;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: #f8f0e3;
  transition: background-color 0.2s;
}

.back-btn:hover {
  background-color: #efe2cf;
}

.cat-detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.1);
}

.cat-detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 12px;
  background-color: #f8f0e3;
}

.thumbnail-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.2s;
}

.thumbnail:hover,
.thumbnail.active {
  border-color: #d4a373;
}

.cat-detail-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cat-detail-name {
  font-size: 32px;
  color: #8b5a2b;
  line-height: 1.2;
}

.cat-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 20px;
  color: white;
}

.badge-gender-male {
  background-color: #6495ed;
}

.badge-gender-female {
  background-color: #ff99bb;
}

.badge-status-alive {
  background-color: #6aa84f;
}

.badge-status-adopted {
  background-color: #f1c232;
}

.badge-status-deceased {
  background-color: #999999;
}

.badge-neutered {
  background-color: #8b7355;
}

.badge-vaccine {
  background-color: #76a5af;
}

.info-section {
  margin-bottom: 24px;
}

.info-title {
  font-size: 17px;
  font-weight: 600;
  color: #8b5a2b;
  margin-bottom: 12px;
}

.info-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #f0e6d6;
}

.info-label {
  width: 80px;
  color: #8b7355;
  font-weight: 500;
}

.info-value {
  color: #5a4a3f;
  flex: 1;
}

.cat-description {
  color: #5a4a3f;
  line-height: 1.8;
  font-size: 15px;
}

/* 时间线样式 */
.timeline {
  grid-column: 1 / -1;
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid #f0e6d6;
}

.timeline-item {
  position: relative;
  padding-left: 24px;
  margin-bottom: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #d4a373;
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 14px;
  width: 2px;
  height: calc(100% + 8px);
  background-color: #e6d5bd;
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-date {
  font-size: 13px;
  color: #8b7355;
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 16px;
  font-weight: 600;
  color: #8b5a2b;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 14px;
  color: #7a6a5a;
}

/* 404错误页面样式 */
.error-page {
  text-align: center;
  padding: 60px 20px;
  max-width: 500px;
  margin: 40px auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.1);
}

.error-code {
  font-size: 100px;
  font-weight: 700;
  color: #d4a373;
  line-height: 1;
  margin-bottom: 16px;
}

.error-title {
  font-size: 28px;
  color: #8b5a2b;
  margin-bottom: 16px;
}

.error-desc {
  font-size: 16px;
  color: #7a6a5a;
  margin-bottom: 32px;
  line-height: 1.8;
}

.back-home-btn {
  display: inline-block;
  padding: 12px 32px;
  background-color: #8b7355;
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-size: 16px;
  transition: background-color 0.2s;
}

.back-home-btn:hover {
  background-color: #6e5a42;
}

.error-cat {
  font-size: 60px;
  margin-top: 32px;
}

/* 页脚 */
.footer {
  background-color: #8b7355;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 20px 16px;
  margin-top: 40px;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .family-generation {
    gap: 12px;
  }

  .family-node {
    min-width: 100px;
    padding: 12px;
  }

  .family-node-image {
    width: 60px;
    height: 60px;
  }

  .cat-detail-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 16px;
  }

  .main-image {
    max-height: 400px;
  }

  .cat-detail-name {
    font-size: 24px;
  }

  .error-code {
    font-size: 70px;
  }

  .error-title {
    font-size: 22px;
  }
}
