/* 街头小吃 - 资讯风格样式表 */
/* 查询关键词: 街头小吃 www.jietouxiaochi.cn 专注于全国各地街头小吃推荐与攻略 提供地方特色美食介绍 夜市美食排行榜及小吃文化探寻 */

/* CSS 变量定义 */
:root {
  --accent-color: #d63384;
  --accent-light: #f8d7da;
  --accent-dark: #a61e6b;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --bg-dark: #e9ecef;
  --border-color: #dee2e6;
  --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: 60px;
}

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

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

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

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 16px;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-color);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-color);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

/* 导航 */
.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  font-size: 15px;
  font-weight: 500;
  padding: 4px 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: 20px;
  padding: 6px 16px;
  width: 200px;
}

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

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

/* 三栏布局 */
.layout {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 24px;
  padding: 24px 0;
}

/* 侧边栏 */
.sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.sidebar-section {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.sidebar-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-primary);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  margin-bottom: 12px;
}

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

.sidebar-list a {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.sidebar-list a:hover {
  color: var(--accent-color);
  padding-left: 4px;
}

.sidebar-list a::before {
  content: "•";
  margin-right: 8px;
  color: var(--accent-color);
}

/* 主内容区 */
.main {
  min-height: 600px;
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  border-radius: var(--radius);
  padding: 40px;
  color: #fff;
  margin-bottom: 24px;
  text-align: center;
}

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

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

/* 卡片组件 */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

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

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-dark);
}

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  line-height: 1.4;
}

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

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.6;
}

/* 特色内容网格 */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.featured-grid .card:first-child {
  grid-column: span 2;
}

.featured-grid .card:first-child .card-image {
  height: 240px;
}

.featured-grid .card:first-child .card-title {
  font-size: 20px;
}

/* 内容列表 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: bold;
  padding-left: 12px;
  border-left: 4px solid var(--accent-color);
}

.section-more {
  font-size: 13px;
  color: var(--text-muted);
}

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

.content-item {
  display: flex;
  gap: 16px;
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

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

.content-item-image {
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  flex-shrink: 0;
}

.content-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.content-item-title {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 8px;
}

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

.content-item-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}

/* 热门排行 */
.hot-list {
  counter-reset: hot-rank;
}

.hot-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.hot-item:last-child {
  border-bottom: none;
}

.hot-rank {
  width: 24px;
  height: 24px;
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.hot-item:nth-child(1) .hot-rank {
  background: #ff4d4f;
  color: #fff;
}

.hot-item:nth-child(2) .hot-rank {
  background: #ff7a45;
  color: #fff;
}

.hot-item:nth-child(3) .hot-rank {
  background: #ffa940;
  color: #fff;
}

.hot-title {
  font-size: 13px;
  line-height: 1.4;
  flex: 1;
}

.hot-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

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

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

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

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

/* 分类头部 */
.category-header {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.category-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 8px;
}

.category-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 筛选器 */
.filter-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filter-item {
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.filter-item:hover,
.filter-item.active {
  color: var(--accent-color);
}

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

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: var(--shadow);
}

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

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

/* 文章页样式 */
.article {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

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

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

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

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

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

.article-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

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

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

.article-content h3 {
  font-size: 17px;
  margin: 24px 0 12px;
}

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

.article-content li {
  margin: 8px 0;
}

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

/* 作者卡片 */
.author-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-dark);
}

.author-info h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.author-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 分享按钮 */
.share-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

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

/* 目录 */
.toc {
  position: sticky;
  top: 80px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 0;
  padding-left: 12px;
  border-left: 2px solid var(--border-color);
}

.toc-item:hover,
.toc-item.active {
  color: var(--accent-color);
  border-left-color: var(--accent-color);
}

/* 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: 24px;
  margin-bottom: 16px;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

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

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

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

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

/* 页脚 */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: 40px;
}

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

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 160px 1fr 160px;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    order: 2;
  }

  .main {
    order: 1;
  }

  .nav {
    display: none;
  }

  .search-box {
    width: 140px;
  }

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

  .featured-grid .card:first-child {
    grid-column: span 1;
  }

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

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

  .article {
    padding: 20px;
  }

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

  .article-image {
    height: 200px;
  }

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

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

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

  .search-box {
    width: 100%;
    order: 3;
  }

  .hero {
    padding: 24px 16px;
  }

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

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

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
