/* 美缝剂 - 食谱风格样式表 */
/* 主色调: #ff9800 (橙色) */

:root {
  --accent-color: #ff9800;
  --accent-light: #ffb74d;
  --accent-dark: #f57c00;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --bg-card: #fff;
  --border-color: #e8e8e8;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --content-width: 800px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

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

/* ===== Header ===== */
.header {
  background: var(--bg-primary);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

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

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

.nav a {
  color: var(--text-primary);
  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;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 24px;
  padding: 8px 16px;
  width: 240px;
}

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

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

/* ===== Main ===== */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  color: #fff;
  margin-bottom: 32px;
}

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

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

.hero-cta {
  display: inline-flex;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

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

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

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

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

/* ===== Section Title ===== */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

/* ===== Featured Cards ===== */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

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

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

.featured-card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-color) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.featured-card-body {
  padding: 20px;
}

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

.featured-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Content List ===== */
.content-section {
  margin-bottom: 40px;
}

.content-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

.content-thumb {
  width: 160px;
  height: 120px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

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

.content-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

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

.content-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.content-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.content-tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

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

.tag-highlight {
  background: rgba(255, 152, 0, 0.1);
  color: var(--accent-color);
}

/* ===== Sidebar Grid ===== */
.sidebar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.sidebar-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.sidebar-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

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

.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-primary);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-list a::before {
  content: '•';
  color: var(--accent-color);
}

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

/* ===== Breadcrumb ===== */
.breadcrumb {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px 20px;
  margin-bottom: 24px;
  font-size: 14px;
}

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

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

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

.breadcrumb strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== Category Header ===== */
.category-header {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.category-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

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

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

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

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

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

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

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

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

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

/* ===== Article Page ===== */
.article-container {
  max-width: var(--content-width);
  margin: 0 auto;
}

.article-header {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.article-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
}

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

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

.article-featured-img {
  width: 100%;
  height: 320px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  overflow: hidden;
}

.article-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  font-size: 16px;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

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

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

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

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

.article-content strong {
  color: var(--text-primary);
}

/* ===== Step Instructions (Recipe Style) ===== */
.step-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.step-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.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 h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-content p {
  margin: 0;
  font-size: 15px;
}

/* ===== Ingredient List ===== */
.ingredient-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.ingredient-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.ingredient-item::before {
  content: '✓';
  width: 20px;
  height: 20px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ===== Info Box ===== */
.info-box {
  background: rgba(255, 152, 0, 0.08);
  border-left: 4px solid var(--accent-color);
  padding: 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

.info-box h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.info-box p {
  margin: 0;
  font-size: 15px;
}

/* ===== Related Articles ===== */
.related-section {
  margin-top: 40px;
}

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

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

.related-card-img {
  height: 120px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.related-card-body {
  padding: 16px;
}

.related-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

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

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

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

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

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

.error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* ===== Footer ===== */
.footer {
  background: var(--text-primary);
  color: #fff;
  padding: 48px 20px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.footer-brand h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-brand h3 span {
  color: var(--accent-color);
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  line-height: 1.6;
}

.footer-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

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

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

  .nav {
    order: 3;
    width: 100%;
    gap: 20px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .search-box {
    width: auto;
    flex: 1;
    margin-left: 16px;
  }

  .hero {
    padding: 32px 20px;
  }

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

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

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

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

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

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

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

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

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

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

  .article-content {
    padding: 20px;
  }

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

  .article-featured-img {
    height: 200px;
  }

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

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