/* ========================================
   高达模型 - 内容聚合器样式
   关键词: 高达模型 www.wanjiafushi.cn 提供高达模型拼装教程 DIY技巧 工具材料推荐及社区交流
   ======================================== */

/* CSS 变量 */
:root {
  --accent-color: #2196f3;
  --accent-dark: #1976d2;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --bg-dark: #263238;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 8px;
  --max-width: 1200px;
  --gap: 24px;
}

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

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

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

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

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

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

.header .container {
  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;
  transition: all 0.3s;
}

.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: var(--radius);
  padding: 8px 16px;
  width: 240px;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
}

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

/* ========================================
   Hero Section
   ======================================== */
.hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  color: var(--bg-primary);
  padding: 60px 0;
  text-align: center;
}

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

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

/* ========================================
   Sources 来源区块
   ======================================== */
.sources {
  padding: 40px 0;
  background: var(--bg-primary);
}

.section-title {
  font-size: 20px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

.source-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
}

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

.source-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-color);
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.source-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

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

/* ========================================
   Content List 内容列表
   ======================================== */
.content-section {
  padding: 40px 0;
}

.content-list {
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.content-item {
  padding: 20px var(--gap);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: var(--gap);
  transition: background 0.3s;
}

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

.content-item:hover {
  background: var(--bg-secondary);
}

.content-thumb {
  width: 160px;
  height: 100px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  flex-shrink: 0;
  overflow: hidden;
}

.content-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-info {
  flex: 1;
}

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

.content-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

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

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

.source-tag {
  background: var(--accent-color);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

/* ========================================
   Three Column Layout 三栏布局
   ======================================== */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 40px 0;
}

.col-box {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: var(--gap);
  box-shadow: var(--shadow);
}

.col-box h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

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

.col-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.col-list a {
  color: var(--text-primary);
  font-size: 14px;
  display: block;
}

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

.col-list .meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========================================
   Breadcrumb 面包屑
   ======================================== */
.breadcrumb {
  background: var(--bg-primary);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.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-primary);
  padding: 40px 0;
  text-align: center;
}

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

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

/* ========================================
   Filter 筛选
   ======================================== */
.filter-bar {
  background: var(--bg-primary);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.filter-bar .container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* ========================================
   Load More 加载更多
   ======================================== */
.load-more {
  text-align: center;
  padding: 32px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: white;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

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

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

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

/* ========================================
   Article 文章详情
   ======================================== */
.article-page {
  padding: 40px 0;
}

.article-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gap);
}

.article-content {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

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

.article-header h1 {
  font-size: 28px;
  line-height: 1.4;
  margin-bottom: 16px;
}

.article-source {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.source-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 14px;
}

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

.article-featured-img {
  width: 100%;
  height: 300px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 32px;
  overflow: hidden;
}

.article-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.article-body h2 {
  font-size: 22px;
  margin: 32px 0 16px;
}

.article-body h3 {
  font-size: 18px;
  margin: 24px 0 12px;
}

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

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

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

.key-points {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.key-points h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

.key-points ul {
  list-style: none;
  padding: 0;
}

.key-points li {
  padding-left: 24px;
  position: relative;
}

.key-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

.read-original {
  text-align: center;
  margin: 32px 0;
  padding: 32px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

/* ========================================
   Sidebar 侧边栏
   ======================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.sidebar-box {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: var(--gap);
  box-shadow: var(--shadow);
}

.sidebar-box h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

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

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

.related-thumb {
  width: 100%;
  height: 80px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card p {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.4;
}

/* ========================================
   404 Page
   ======================================== */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 0;
}

.error-content {
  max-width: 480px;
}

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

.error-content h1 {
  font-size: 28px;
  margin-bottom: 16px;
}

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

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

/* ========================================
   Footer 页脚
   ======================================== */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 48px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap);
  margin-bottom: 32px;
}

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

.footer-brand p {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 14px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

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

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

.footer-links a:hover {
  color: white;
}

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

/* ========================================
   Responsive 响应式设计
   ======================================== */
@media (max-width: 1024px) {
  .article-main {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .hero {
    padding: 40px 0;
  }

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

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

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

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

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

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

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

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

  .article-content {
    padding: 24px;
  }

  .article-header h1 {
    font-size: 22px;
  }

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

@media (max-width: 480px) {
  :root {
    --gap: 16px;
  }

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

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

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

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

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