/* 分子料理 - 食谱风格样式表 */
/* CSS变量定义 */
:root {
  --accent-color: #ff9800;
  --primary-color: #e65100;
  --secondary-color: #ffcc80;
  --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-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

/* 重置样式 */
* {
  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-color);
  background-color: var(--bg-color);
}

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

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

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

ul {
  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;
  height: var(--header-height);
}

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

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

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

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 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: 20px;
  padding: 0.5rem 1rem;
}

.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-muted);
}

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

/* Hero区域 */
.hero {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-color) 100%);
  padding: 4rem 0;
  text-align: center;
  margin-bottom: 3rem;
}

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

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

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

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

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

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

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

/* 区块标题 */
.section-title {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent-color);
  display: inline-block;
}

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

.view-more {
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

/* 特色卡片 */
.featured-section {
  margin-bottom: 3rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

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

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

.featured-card .content {
  padding: 1.5rem;
}

.featured-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.featured-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* 内容列表 */
.content-section {
  margin-bottom: 3rem;
}

.content-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.content-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
}

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

.content-item .image {
  width: 200px;
  height: 140px;
  background: var(--bg-gray);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2rem;
}

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

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

.content-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.content-item .desc {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.content-item .meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.content-item .meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* 三栏布局 */
.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.column h4 {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.column ul li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.column ul li a {
  color: var(--text-color);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

/* 面包屑 */
.breadcrumb {
  background: var(--bg-light);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

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

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

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

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

/* 分类页头部 */
.category-header {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 2rem;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
}

.category-header h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.category-header p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.category-header .stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  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);
}

.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 1rem;
}

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

.article-header h1 {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.article-featured-image {
  width: 100%;
  height: 400px;
  background: var(--bg-gray);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 4rem;
}

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

.article-content h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 2rem 0 1rem;
}

.article-content h3 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin: 1.5rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-content ul li {
  list-style: disc;
  margin-bottom: 0.5rem;
}

.article-content ol li {
  list-style: decimal;
  margin-bottom: 0.5rem;
}

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

.ingredient-list h3 {
  font-size: 1.125rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

.ingredient-list .amount {
  color: var(--accent-color);
  font-weight: 600;
}

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

.step-instructions h3 {
  font-size: 1.125rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.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: 700;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content p {
  margin-bottom: 0.5rem;
}

.step-image {
  width: 100%;
  height: 200px;
  background: var(--bg-gray);
  border-radius: var(--radius);
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

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

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

.cook-time-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cook-time-item .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

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

.nutrition-info h3 {
  font-size: 1.125rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.nutrition-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

/* 相关文章 */
.related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

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

.related-card {
  background: var(--bg-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.related-card .image {
  height: 150px;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.related-card .content {
  padding: 1rem;
}

.related-card h4 {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

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

/* 404页面 */
.error-page {
  text-align: center;
  padding: 6rem 0;
}

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

.error-title {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.error-desc {
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* 页脚 */
.footer {
  background: var(--bg-light);
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border-color);
}

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

.footer-brand .logo {
  margin-bottom: 1rem;
}

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

.footer-column h4 {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.footer-column ul li a {
  font-size: 0.875rem;
  color: var(--text-light);
}

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

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

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

  .three-columns {
    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) {
  .header .container {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 1rem;
    padding-top: 0.5rem;
    justify-content: center;
  }

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

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

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

  .content-item .image {
    width: 100%;
    height: 200px;
  }

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

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

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

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

  .article-content {
    font-size: 1rem;
  }

  .cook-time {
    flex-wrap: wrap;
    gap: 1rem;
  }

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

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

  .search-box {
    display: none;
  }

  .hero {
    padding: 2rem 0;
  }

  .category-header .stats {
    flex-direction: column;
    gap: 0.5rem;
  }

  .pagination a,
  .pagination span {
    width: 36px;
    height: 36px;
  }
}
