/* ============================================
   皮鞋 - www.zhenpihuili.cn
   白皮书简报风格样式表
   主色调: #673ab7 (紫色)
   ============================================ */

/* CSS 变量定义 */
:root {
  --accent-color: #673ab7;
  --accent-light: #7e57c2;
  --accent-dark: #512da8;
  --text-primary: #212121;
  --text-secondary: #757575;
  --text-muted: #9e9e9e;
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f5f5f5;
  --border-color: #e0e0e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --content-width: 800px;
}

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

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-primary);
  background: var(--bg-primary);
}

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

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

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

ul, ol {
  list-style: none;
}

/* ============================================
   布局组件
   ============================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.content-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ============================================
   页头 Header
   ============================================ */

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

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

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

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

.search-box {
  position: relative;
}

.search-box input {
  width: 240px;
  padding: 8px 16px 8px 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: var(--bg-secondary);
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: var(--bg-primary);
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.5;
}

/* ============================================
   Hero 区域
   ============================================ */

.hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  padding: 80px 0 60px;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

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

.hero-search input {
  width: 100%;
  padding: 16px 24px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background: var(--bg-primary);
  transition: all 0.2s;
}

.hero-search input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(103, 58, 183, 0.1);
}

/* 分类标签 */
.category-tags {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

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

.category-tag:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   卡片组件
   ============================================ */

.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

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

.card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   特色内容区域
   ============================================ */

.section {
  padding: 60px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 32px;
  text-align: center;
}

/* 白皮书列表 */
.whitepaper-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.whitepaper-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.whitepaper-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

.whitepaper-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.whitepaper-info h3 a {
  color: var(--text-primary);
}

.whitepaper-info h3 a:hover {
  color: var(--accent-color);
}

.whitepaper-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.whitepaper-actions {
  display: flex;
  gap: 12px;
}

/* ============================================
   按钮组件
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  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;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* ============================================
   三栏文章列表
   ============================================ */

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

.article-col {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 24px;
}

.article-col-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.9rem;
}

.article-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.article-list a {
  color: var(--text-secondary);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* ============================================
   面包屑导航
   ============================================ */

.breadcrumb {
  padding: 20px 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-inner {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

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

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

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

/* ============================================
   分类页头部
   ============================================ */

.category-header {
  text-align: center;
  padding: 48px 0 32px;
}

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

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

/* 排序选项 */
.sort-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
}

.sort-option {
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s;
}

.sort-option:hover,
.sort-option.active {
  color: var(--accent-color);
  font-weight: 500;
}

/* ============================================
   分页
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

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

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

.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 16px;
}

/* ============================================
   文章详情页
   ============================================ */

.article-header {
  text-align: center;
  padding: 48px 0 32px;
}

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

.article-meta-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

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

.article-cover img {
  width: 100%;
  height: auto;
}

/* 执行摘要 */
.executive-summary {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-left: 4px solid var(--accent-color);
  padding: 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 32px 0;
}

.executive-summary h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.executive-summary p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* 关键要点 */
.key-points {
  margin: 32px 0;
}

.key-points h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.key-points-list {
  display: grid;
  gap: 16px;
}

.key-point-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.key-point-number {
  width: 32px;
  height: 32px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.key-point-content h4 {
  font-weight: 600;
  margin-bottom: 4px;
}

.key-point-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* 目录 */
.table-of-contents {
  margin: 32px 0;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.table-of-contents h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}

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

.toc-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.toc-list .number {
  width: 28px;
  height: 28px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-color);
}

/* 下载区域 */
.download-section {
  margin: 32px 0;
  text-align: center;
  padding: 32px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

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

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

/* 相关内容 */
.related-section {
  margin: 48px 0;
}

.related-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;
}

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

.related-item {
  text-align: center;
}

.related-thumb {
  aspect-ratio: 3/4;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.related-item h4 {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ============================================
   页脚 Footer
   ============================================ */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
  margin-top: 60px;
}

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

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

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

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.85rem;
  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 24px;
}

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

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
}

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

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 1024px) {
  .articles-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: 16px 0;
    gap: 16px;
  }

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

  .search-box {
    order: 2;
  }

  .search-box input {
    width: 180px;
  }

  .hero {
    padding: 48px 0 40px;
  }

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

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

  .category-tags {
    gap: 12px;
  }

  .category-tag {
    padding: 10px 18px;
    font-size: 0.9rem;
  }

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

  .whitepaper-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .whitepaper-actions {
    width: 100%;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

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

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

  .download-actions {
    flex-direction: column;
  }

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

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

  .nav {
    font-size: 0.85rem;
    gap: 16px;
  }

  .section {
    padding: 40px 0;
  }

  .card {
    padding: 20px;
  }

  .article-col {
    padding: 20px;
  }
}
