/* 街头小吃 - 资讯风格样式 */

/* CSS变量 */
:root {
  --accent-color: #e65100;
  --primary: #e65100;
  --primary-light: #ff9800;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-body: #f5f5f5;
  --bg-card: #fff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 4px;
}

/* 重置 */
* {
  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-body);
}

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

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

ul {
  list-style: none;
}

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

/* 头部 */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

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

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

.nav a {
  font-size: 15px;
  font-weight: 500;
}

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-body);
  border-radius: 20px;
  padding: 6px 15px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 150px;
  font-size: 13px;
}

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

/* 主体布局 */
.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 200px 1fr 240px;
  gap: 20px;
}

/* 侧边栏 */
.sidebar {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow);
  height: fit-content;
}

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

.sidebar-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

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

.sidebar-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg-body);
  border-radius: 12px;
}

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

/* 主内容区 */
.main {
  min-width: 0;
}

/* Hero区域 */
.hero {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 20px;
  text-align: center;
}

.hero h1 {
  font-size: 26px;
  color: var(--accent-color);
  margin-bottom: 10px;
}

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

/* 卡片 */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

/* 特色内容 */
.featured-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.featured-thumb {
  width: 180px;
  height: 120px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}

.featured-content {
  flex: 1;
  min-width: 0;
}

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

.featured-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

/* 内容列表 */
.content-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.content-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-body);
  border-radius: var(--radius);
  transition: background 0.2s;
}

.content-item:hover {
  background: #fff3e0;
}

.content-thumb {
  width: 100px;
  height: 70px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}

.content-info {
  flex: 1;
  min-width: 0;
}

.content-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.4;
}

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

/* 排行列表 */
.rank-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
}

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

.rank-num {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.rank-list li:nth-child(1) .rank-num {
  background: #ff4d4f;
  color: #fff;
}

.rank-list li:nth-child(2) .rank-num {
  background: #ff7a45;
  color: #fff;
}

.rank-list li:nth-child(3) .rank-num {
  background: #ffa940;
  color: #fff;
}

.rank-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* 面包屑 */
.breadcrumb {
  background: var(--bg-card);
  padding: 12px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13px;
}

.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 {
  background: var(--bg-card);
  padding: 25px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  text-align: center;
}

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

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

/* 筛选 */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar a {
  padding: 6px 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  font-size: 13px;
}

.filter-bar a.active,
.filter-bar a:hover {
  background: var(--accent-color);
  color: #fff;
}

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

.pagination a,
.pagination span {
  padding: 8px 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  font-size: 13px;
}

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

/* 文章页 */
.article-header {
  background: var(--bg-card);
  padding: 25px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.article-title {
  font-size: 24px;
  line-height: 1.4;
  margin-bottom: 15px;
}

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

.article-cover {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.article-content {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 20px;
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

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

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

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

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

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

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

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

/* 作者卡片 */
.author-card {
  text-align: center;
  padding: 20px;
}

.author-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 12px;
  object-fit: cover;
}

.author-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 5px;
}

.author-bio {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 目录 */
.toc-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

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

.toc-list a {
  font-size: 13px;
  display: block;
}

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

/* 404页面 */
.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: 20px;
}

.error-title {
  font-size: 24px;
  margin-bottom: 15px;
}

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

.error-btn {
  display: inline-block;
  padding: 12px 35px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 25px;
  font-size: 14px;
}

.error-btn:hover {
  background: #d84315;
  color: #fff;
}

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

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

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

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

/* 响应式 */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 180px 1fr 200px;
  }
}

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

  .sidebar {
    display: none;
  }

  .nav {
    display: none;
  }

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

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

@media (max-width: 600px) {
  .header-inner {
    padding: 0 15px;
  }

  .logo {
    font-size: 18px;
  }

  .search-box {
    display: none;
  }

  .hero {
    padding: 20px;
  }

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

  .card {
    padding: 15px;
  }

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

  .article-content {
    padding: 20px;
  }

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