/* 自行车旅行 - 白皮书简报风格样式 */

/* CSS 变量 */
:root {
  --accent-color: #673ab7;
  --accent-light: #7e57c2;
  --accent-dark: #512da8;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --bg-card: #fff;
  --border-color: #e0e0e0;
  --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;
  --gap: 24px;
  --gap-sm: 16px;
}

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

ul {
  list-style: none;
}

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

/* 布局容器 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

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

.nav a {
  color: var(--text-primary);
  font-weight: 500;
}

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

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box input {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  width: 200px;
  font-size: 14px;
}

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

.search-box button:hover {
  background: var(--accent-dark);
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

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

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-search {
  max-width: 500px;
  margin: 0 auto;
}

.hero-search input {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 16px;
  box-shadow: var(--shadow);
}

/* 分类标签 */
.categories {
  padding: 40px 0;
  background: var(--bg-primary);
}

.category-list {
  display: flex;
  justify-content: center;
  gap: var(--gap);
  flex-wrap: wrap;
}

.category-item {
  padding: 12px 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s;
}

.category-item:hover {
  background: var(--accent-color);
  color: white;
}

/* 内容区块标题 */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

/* 卡片列表 */
.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

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

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

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

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

.card-body {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.card-footer {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

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

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

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

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

/* 特色内容区 */
.featured {
  padding: 60px 0;
}

/* 三栏布局 */
.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 40px 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

.column h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

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

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

.column ul li a {
  color: var(--text-secondary);
  display: block;
}

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

/* 页脚 */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 40px 0;
  text-align: center;
}

.footer p {
  opacity: 0.8;
  font-size: 14px;
}

/* 面包屑 */
.breadcrumb {
  padding: 16px 0;
  background: var(--bg-secondary);
  font-size: 14px;
  color: var(--text-muted);
}

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

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

.breadcrumb span {
  margin: 0 8px;
}

/* 页面头部 */
.page-header {
  padding: 40px 0;
  background: var(--bg-primary);
  text-align: center;
}

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

.page-header p {
  color: var(--text-secondary);
}

/* 排序选项 */
.sort-bar {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

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

.sort-bar a.active {
  color: var(--accent-color);
  font-weight: 500;
}

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

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

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

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

.pagination span {
  background: var(--accent-color);
  color: white;
}

/* 文章详情 */
.article-header {
  padding: 40px 0;
  background: var(--bg-primary);
}

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

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

.article-cover {
  margin: 32px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-cover img {
  width: 100%;
  display: block;
}

.article-content {
  background: var(--bg-primary);
  padding: 40px 0;
}

.article-section {
  margin-bottom: 40px;
}

.article-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

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

.article-section ul {
  list-style: disc;
  padding-left: 24px;
  color: var(--text-secondary);
}

.article-section ul li {
  margin-bottom: 12px;
  line-height: 1.7;
}

.article-section ol {
  padding-left: 24px;
  color: var(--text-secondary);
}

.article-section ol li {
  margin-bottom: 12px;
  line-height: 1.7;
}

/* 下载区 */
.download-section {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: var(--radius-lg);
  margin: 32px 0;
}

.download-section h3 {
  font-size: 1.125rem;
  margin-bottom: 16px;
}

/* 相关推荐 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 24px;
}

.related-item {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
}

.related-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* 404页面 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px var(--gap);
}

.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-message {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  :root {
    --gap: 16px;
  }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 0;
    gap: 16px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 16px;
  }

  .search-box {
    display: none;
  }

  .hero {
    padding: 60px 0;
  }

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

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

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

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

  .card-header {
    flex-direction: column;
    gap: 8px;
  }

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

  .article-meta {
    flex-wrap: wrap;
    gap: 12px;
  }

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

@media (max-width: 480px) {
  .category-list {
    gap: 12px;
  }

  .category-item {
    padding: 10px 16px;
    font-size: 14px;
  }

  .card {
    padding: 16px;
  }

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

  .btn {
    width: 100%;
    text-align: center;
  }
}
