/* 盆栽网 - 样式表 */
/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #2d5a27;
  --primary-dark: #1e3d1a;
  --primary-light: #4a7c42;
  --secondary: #8b6914;
  --accent: #c9a227;
  --bg: #f8f9f5;
  --bg-card: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #e0e5dc;
  --shadow: rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 70px;
}

html {
  scroll-behavior: smooth;
}

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

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

a:hover {
  color: var(--primary-light);
}

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

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

/* 头部导航 */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

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

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

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

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: 25px;
  padding: 8px 16px;
  border: 1px solid var(--border);
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 180px;
  font-size: 14px;
}

.search-box button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 16px;
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--primary);
  cursor: pointer;
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 30px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 40px;
}

.hero-stats .stat {
  text-align: center;
}

.hero-stats .stat-number {
  font-size: 36px;
  font-weight: 700;
  display: block;
}

.hero-stats .stat-label {
  font-size: 14px;
  opacity: 0.8;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

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

.btn-primary:hover {
  background: #b89420;
  color: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  color: white;
  border-color: white;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
}

/* 区块标题 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 28px;
  background: var(--primary);
  border-radius: 2px;
}

.view-more {
  color: var(--primary);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 内容区块 */
.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--bg-card);
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

/* 卡片 */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
}

.card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--text);
}

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

.card-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  color: var(--text-muted);
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 分类卡片 */
.category-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 8px var(--shadow);
  transition: all 0.3s;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
}

.category-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 32px;
}

.category-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.category-card p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 15px;
}

.category-card .count {
  font-size: 13px;
  color: var(--text-muted);
}

/* 文章列表 */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-item {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 2px 8px var(--shadow);
  transition: box-shadow 0.3s;
}

.article-item:hover {
  box-shadow: 0 4px 16px var(--shadow);
}

.article-thumb {
  width: 200px;
  height: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-excerpt {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 15px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-tag {
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
}

/* 面包屑导航 */
.breadcrumb {
  background: var(--bg-card);
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 14px;
}

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

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

.breadcrumb li:last-child {
  color: var(--text-muted);
}

.breadcrumb-separator {
  color: var(--text-muted);
}

/* 页面头部 */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 50px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
}

.page-header p {
  font-size: 16px;
  opacity: 0.9;
}

/* 侧边栏布局 */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  padding: 40px 0;
}

.main-content {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 侧边栏组件 */
.widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 2px 8px var(--shadow);
}

.widget-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-list {
  list-style: none;
}

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

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

.widget-list a {
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget-list a:hover {
  color: var(--primary);
}

.widget-list .count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
}

/* 热门标签 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  background: var(--bg);
  padding: 6px 14px;
  border-radius: 15px;
  font-size: 13px;
  color: var(--text);
  transition: all 0.2s;
}

.tag:hover {
  background: var(--primary);
  color: white;
}

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

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.2s;
}

.pagination a {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 2px 4px var(--shadow);
}

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

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

.pagination .disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

/* 文章详情页 */
.article-detail {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 2px 8px var(--shadow);
}

.article-header {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}

.article-info {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--text-light);
}

.article-info span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-body {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
}

.article-body h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 35px 0 20px;
  color: var(--text);
}

.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 30px 0 15px;
  color: var(--text);
}

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

.article-body img {
  border-radius: var(--radius);
  margin: 25px 0;
}

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

.article-body li {
  margin-bottom: 10px;
}

.article-body blockquote {
  background: var(--bg);
  border-left: 4px solid var(--primary);
  padding: 20px 25px;
  margin: 25px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-light);
}

/* 文章标签 */
.article-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}

.article-tags-label {
  font-weight: 500;
  color: var(--text);
}

/* 相关文章 */
.related-articles {
  margin-top: 40px;
}

.related-articles h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

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

.error-content {
  max-width: 500px;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 20px;
  opacity: 0.8;
}

.error-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 15px;
}

.error-desc {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 30px;
}

.error-illustration {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, var(--bg), var(--border));
  border-radius: 50%;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

/* 底部 */
.footer {
  background: var(--primary-dark);
  color: white;
  padding: 50px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 15px;
}

.footer-brand p {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.7;
}

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

.footer-links {
  list-style: none;
}

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

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
  opacity: 0.7;
}

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

  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

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

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .menu-toggle {
    display: block;
  }

  .search-box {
    display: none;
  }

  .hero {
    padding: 50px 0;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero-stats {
    gap: 30px;
  }

  .hero-stats .stat-number {
    font-size: 28px;
  }

  .card-grid,
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .section {
    padding: 40px 0;
  }

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

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

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

  .article-detail {
    padding: 25px;
  }

  .article-header h1 {
    font-size: 24px;
  }

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

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

  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .page-header h1 {
    font-size: 28px;
  }

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