/* 中式烹饪 - 食谱风格样式表 */
/* 主色调: #ff9800 (橙色) */

/* CSS 变量 */
:root {
  --accent-color: #ff9800;
  --accent-dark: #e65100;
  --accent-light: #ffb74d;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --bg-white: #fff;
  --bg-light: #f5f5f5;
  --bg-cream: #fff8e1;
  --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-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

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-light);
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  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-white);
  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: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: "🍜";
}

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

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

.nav a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color);
  border-radius: 1px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-light);
  border-radius: 20px;
  padding: 8px 16px;
  gap: 8px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 160px;
  font-size: 0.875rem;
}

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

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

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-white) 100%);
  padding: 48px 0;
  text-align: center;
  margin-bottom: 32px;
}

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

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

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

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

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

/* 特色卡片 */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.feature-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.feature-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

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

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

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

.section-title {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 24px;
  background: var(--accent-color);
  border-radius: 2px;
}

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

.view-more:hover {
  color: var(--accent-dark);
}

/* 内容卡片列表 */
.content-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

.content-card {
  display: flex;
  gap: 20px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
}

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

.content-card .thumbnail {
  width: 200px;
  height: 140px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}

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

.content-card .category {
  color: var(--accent-color);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.content-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.content-card .excerpt {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 12px;
  flex: 1;
}

.content-card .meta {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-light);
}

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

/* 三栏列表 */
.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.column-box {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.column-box h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-box li {
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-light);
}

.column-box li:last-child {
  border-bottom: none;
}

.column-box a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s;
}

.column-box a::before {
  content: "•";
  color: var(--accent-color);
}

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

/* 面包屑导航 */
.breadcrumb {
  background: var(--bg-white);
  padding: 16px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

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

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

/* 分类页头部 */
.category-header {
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.category-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.category-header p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.category-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  font-size: 0.875rem;
  color: var(--text-light);
}

.category-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

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

.pagination a {
  background: var(--bg-white);
  color: var(--text-secondary);
  box-shadow: var(--shadow);
}

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

.pagination .current {
  background: var(--accent-color);
  color: var(--bg-white);
  font-weight: 600;
}

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

/* 文章页 */
.article-header {
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

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

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

.article-meta .category-tag {
  background: var(--bg-cream);
  color: var(--accent-dark);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* 文章内容 */
.article-content {
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.article-content .featured-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.article-content h2 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-light);
}

.article-content h3 {
  font-size: 1.25rem;
  margin: 24px 0 12px;
  color: var(--accent-dark);
}

.article-content p {
  margin-bottom: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

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

.article-content ul li {
  list-style: disc;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.article-content ol li {
  list-style: decimal;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

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

.ingredient-list h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ingredient-list ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.ingredient-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

.ingredient-list li::before {
  content: "✓";
  color: var(--accent-color);
  font-weight: bold;
}

/* 烹饪步骤 */
.cook-steps {
  margin: 24px 0;
}

.step {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--bg-light);
}

.step:last-child {
  border-bottom: none;
}

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

.step-content h4 {
  margin-bottom: 8px;
  color: var(--text-primary);
}

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

/* 营养信息 */
.nutrition-info {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.nutrition-info h3 {
  margin-top: 0;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.nutrition-item {
  text-align: center;
  padding: 16px;
  background: var(--bg-white);
  border-radius: var(--radius);
}

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

.nutrition-item .label {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 4px;
}

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

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.related-card:hover {
  transform: translateY(-4px);
}

.related-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.related-card h4 {
  padding: 16px;
  font-size: 1rem;
}

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

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

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

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

.error-suggestions {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 500px;
  margin: 0 auto 32px;
  box-shadow: var(--shadow);
}

.error-suggestions h3 {
  margin-bottom: 16px;
  font-size: 1rem;
}

.error-suggestions li {
  margin-bottom: 12px;
}

.error-suggestions a {
  color: var(--accent-color);
}

.error-suggestions a:hover {
  text-decoration: underline;
}

/* 页脚 */
.footer {
  background: var(--text-primary);
  color: var(--bg-white);
  padding: 48px 0 24px;
  margin-top: 48px;
}

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

.footer-brand h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--accent-color);
}

.footer-brand p {
  color: var(--text-light);
  font-size: 0.875rem;
  line-height: 1.8;
}

.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 16px;
}

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

.footer-column a {
  color: var(--text-light);
  font-size: 0.875rem;
  transition: color 0.3s;
}

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

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

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

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

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

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

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

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .search-box {
    display: none;
  }

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

  .hero p {
    font-size: 1rem;
  }

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

  .content-card {
    flex-direction: column;
  }

  .content-card .thumbnail {
    width: 100%;
    height: 200px;
  }

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

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

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

  .article-title {
    font-size: 1.5rem;
  }

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

  .ingredient-list ul {
    grid-template-columns: 1fr;
  }

  .step {
    flex-direction: column;
    gap: 12px;
  }

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

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .pagination a,
  .pagination span {
    min-width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }
}
