/* 爬行动物 - 简报风格样式表 */
/* 主色调: #00bcd4 */

/* ========== CSS 变量 ========== */
:root {
  --accent-color: #00bcd4;
  --accent-dark: #0097a7;
  --accent-light: #b2ebf2;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --bg-card: #fafafa;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 8px;
  --max-width: 1200px;
  --header-height: 64px;
}

/* ========== 基础重置 ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-dark);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== 布局容器 ========== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 页头 ========== */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.logo span {
  color: var(--text-primary);
}

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* ========== 搜索框 ========== */
.search-box {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--accent-color);
}

.search-box button {
  padding: 12px 24px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.search-box button:hover {
  background: var(--accent-dark);
}

/* ========== Hero 区域 ========== */
.hero {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-secondary) 100%);
  padding: 60px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* ========== 面包屑 ========== */
.breadcrumb {
  background: var(--bg-secondary);
  padding: 16px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-color);
}

.breadcrumb span {
  margin: 0 8px;
  color: var(--text-muted);
}

/* ========== 区块标题 ========== */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

/* ========== 分类标签 ========== */
.category-tags {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.category-tag {
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}

.category-tag:hover,
.category-tag.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* ========== 卡片列表 ========== */
.card-list {
  display: grid;
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-title a {
  color: inherit;
}

.card-title a:hover {
  color: var(--accent-color);
}

.card-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.card-actions {
  display: flex;
  gap: 12px;
}

/* ========== 按钮 ========== */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.btn-outline:hover {
  background: var(--accent-color);
  color: white;
}

/* ========== 产品卡片网格 ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow-hover);
}

.product-image {
  height: 180px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 3rem;
}

.product-info {
  padding: 20px;
}

.product-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-category {
  font-size: 0.875rem;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-dark);
}

/* ========== 文章列表 ========== */
.article-list {
  display: grid;
  gap: 16px;
}

.article-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: box-shadow 0.2s;
}

.article-item:hover {
  box-shadow: var(--shadow);
}

.article-thumb {
  width: 120px;
  height: 90px;
  background: var(--bg-secondary);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2rem;
}

.article-content {
  flex: 1;
}

.article-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.article-title a {
  color: var(--text-primary);
}

.article-title a:hover {
  color: var(--accent-color);
}

.article-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.article-summary {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== 侧边栏列表 ========== */
.sidebar-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.sidebar-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list a {
  color: var(--text-secondary);
  display: block;
}

.sidebar-list a:hover {
  color: var(--accent-color);
}

/* ========== 排序选项 ========== */
.sort-options {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 0.875rem;
}

.sort-options span {
  color: var(--text-muted);
}

.sort-options a {
  color: var(--text-secondary);
}

.sort-options a.active {
  color: var(--accent-color);
  font-weight: 500;
}

/* ========== 分页 ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.pagination a:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.pagination .current {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* ========== 文章详情 ========== */
.article-header {
  margin-bottom: 32px;
}

.article-header h1 {
  font-size: 2rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-info {
  display: flex;
  gap: 24px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 20px;
}

.article-body h2 {
  font-size: 1.5rem;
  margin: 40px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.article-body h3 {
  font-size: 1.25rem;
  margin: 32px 0 16px;
}

.article-body ul,
.article-body ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-body ul li {
  list-style: disc;
  margin-bottom: 8px;
}

.article-body ol li {
  list-style: decimal;
  margin-bottom: 8px;
}

/* ========== 要点列表 ========== */
.key-points {
  background: var(--accent-light);
  border-left: 4px solid var(--accent-color);
  padding: 24px;
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.key-points h3 {
  font-size: 1.125rem;
  margin-bottom: 16px;
  color: var(--accent-dark);
}

.key-points ul {
  margin: 0;
  padding-left: 20px;
}

.key-points li {
  list-style: disc;
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* ========== 信息框 ========== */
.info-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.info-box h3 {
  font-size: 1.125rem;
  margin-bottom: 16px;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-list li {
  display: flex;
  gap: 12px;
}

.info-list strong {
  color: var(--text-secondary);
  min-width: 100px;
}

/* ========== 标签 ========== */
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.tag {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ========== 相关文章 ========== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.2s;
}

.related-card:hover {
  box-shadow: var(--shadow);
}

.related-card h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.related-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ========== 三栏布局 ========== */
.three-column {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.two-column {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

/* ========== 页脚 ========== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 16px;
  line-height: 1.7;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ========== 404 页面 ========== */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 24px;
}

.error-title {
  font-size: 2rem;
  margin-bottom: 16px;
}

.error-desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.125rem;
}

/* ========== 区块间距 ========== */
.section {
  padding: 48px 0;
}

.section-gray {
  background: var(--bg-secondary);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 20px;
  }

  .nav {
    width: 100%;
    justify-content: center;
    margin-top: 16px;
    gap: 20px;
  }

  .hero {
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .three-column {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .article-item {
    flex-direction: column;
  }

  .article-thumb {
    width: 100%;
    height: 160px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sort-options {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .category-tags {
    justify-content: center;
  }

  .category-tag {
    padding: 10px 16px;
    font-size: 0.875rem;
  }

  .pagination a,
  .pagination span {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .error-code {
    font-size: 5rem;
  }
}
