/* 中式烹饪 - 食谱风格样式表 */
/* CSS变量定义 */
:root {
  --accent-color: #ff9800;
  --primary-color: #e65100;
  --secondary-color: #f57c00;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-color: #fff;
  --bg-light: #fafafa;
  --bg-gray: #f5f5f5;
  --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;
  --radius-sm: 4px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

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

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

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

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

ul, ol {
  list-style: none;
}

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

/* 头部 */
.header {
  background: var(--bg-color);
  box-shadow: var(--shadow);
  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: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

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

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

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

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-gray);
  border-radius: 24px;
  padding: 8px 16px;
  width: 240px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: 14px;
}

.search-box button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
}

/* 主要内容区 */
.main {
  min-height: calc(100vh - var(--header-height) - 200px);
  padding: 24px 0;
}

/* Hero区域 */
.hero {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  padding: 60px 0;
  text-align: center;
  margin-bottom: 40px;
}

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

.hero p {
  font-size: 18px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 24px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 24px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn:hover {
  background: var(--secondary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* 特色内容 */
.section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 24px;
  color: var(--text-color);
  margin-bottom: 24px;
  padding-left: 12px;
  border-left: 4px solid var(--accent-color);
}

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

.card {
  background: var(--bg-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

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

.card-image {
  width: 100%;
  height: 180px;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.card-content {
  padding: 16px;
}

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

.card-meta {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 8px;
  line-height: 1.5;
}

/* 列表项 */
.list-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: all 0.3s;
}

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

.list-item-image {
  width: 120px;
  height: 90px;
  background: var(--bg-gray);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
}

.list-item-content {
  flex: 1;
}

.list-item-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.list-item-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.list-item-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
}

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

.col-section h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text-color);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-color);
}

.col-section ul li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.col-section ul li:last-child {
  border-bottom: none;
}

.col-section ul li a {
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.col-section ul li a::before {
  content: "•";
  color: var(--accent-color);
}

.col-section ul li a:hover {
  color: var(--accent-color);
}

/* 面包屑 */
.breadcrumb {
  background: var(--bg-light);
  padding: 16px 0;
  margin-bottom: 24px;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li {
  font-size: 14px;
  color: var(--text-light);
}

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

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

.breadcrumb li:not(:last-child)::after {
  content: ">";
  margin-left: 8px;
  color: var(--text-muted);
}

/* 分类头部 */
.category-header {
  text-align: center;
  padding: 40px 0;
  background: var(--bg-light);
  margin-bottom: 32px;
}

.category-header h1 {
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.category-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.category-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 24px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-color);
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

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

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

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

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

/* 文章页 */
.article-header {
  text-align: center;
  margin-bottom: 32px;
}

.article-title {
  font-size: 32px;
  color: var(--text-color);
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.article-featured-image {
  width: 100%;
  max-width: 800px;
  height: 400px;
  background: var(--bg-gray);
  margin: 0 auto 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color);
}

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

.article-content h2 {
  font-size: 24px;
  color: var(--primary-color);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
  font-size: 20px;
  color: var(--text-color);
  margin: 24px 0 12px;
}

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

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

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

/* 食材清单 */
.ingredient-list {
  background: var(--bg-light);
  padding: 24px;
  border-radius: var(--radius);
  margin: 24px 0;
}

.ingredient-list h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.ingredient-list ul li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-color);
}

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

.ingredient-name {
  font-weight: 500;
}

.ingredient-amount {
  color: var(--text-muted);
}

/* 步骤说明 */
.step-instructions {
  margin: 24px 0;
}

.step {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content p {
  margin-bottom: 0;
}

/* 烹饪时间 */
.cook-time {
  display: flex;
  justify-content: center;
  gap: 48px;
  background: var(--bg-light);
  padding: 24px;
  border-radius: var(--radius);
  margin: 24px 0;
}

.time-item {
  text-align: center;
}

.time-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
}

.time-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* 相关文章 */
.related-articles {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.related-articles h2 {
  font-size: 20px;
  margin-bottom: 24px;
}

/* 404页面 */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

.error-code {
  font-size: 120px;
  font-weight: bold;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 16px;
}

.error-title {
  font-size: 28px;
  color: var(--text-color);
  margin-bottom: 16px;
}

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

/* 页脚 */
.footer {
  background: var(--bg-gray);
  padding: 40px 0 20px;
  margin-top: 60px;
}

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

.footer-brand p {
  color: var(--text-light);
  margin-top: 12px;
  font-size: 14px;
}

.footer-links h4 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--text-color);
}

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

.footer-links ul li a {
  color: var(--text-light);
  font-size: 14px;
}

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

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

/* 响应式设计 */
@media (max-width: 992px) {
  .three-col {
    grid-template-columns: 1fr;
  }

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

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

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

  .search-box {
    width: 160px;
  }

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

  .hero p {
    font-size: 16px;
  }

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

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

  .list-item-image {
    width: 100%;
    height: 180px;
  }

  .category-stats {
    flex-direction: column;
    gap: 24px;
  }

  .article-title {
    font-size: 24px;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 12px;
  }

  .article-featured-image {
    height: 240px;
  }

  .cook-time {
    flex-direction: column;
    gap: 16px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .logo {
    font-size: 20px;
  }

  .nav {
    gap: 12px;
    font-size: 14px;
  }

  .search-box {
    display: none;
  }

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

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