/* ========================================
   户外摄影 - 内容聚合器风格样式
   www.ziranpaike.cn - 专注于户外摄影技巧
   ======================================== */

/* CSS 变量定义 */
:root {
  --accent-color: #2196f3;
  --accent-dark: #1976d2;
  --accent-light: #64b5f6;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --bg-dark: #2c3e50;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --max-width: 1200px;
  --header-height: 70px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

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

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

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

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

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 8px 16px;
  gap: 8px;
}

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

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

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

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

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

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

.section-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--accent-color);
  border-radius: 2px;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

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

.source-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.source-card .icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.source-card h3 {
  font-size: 1rem;
  color: var(--text-primary);
}

.source-card span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========================================
   内容卡片
   ======================================== */
.content-section {
  padding: 40px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.content-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.content-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.content-card .thumbnail {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.content-card .info {
  padding: 20px;
}

.content-card .source-tag {
  display: inline-block;
  background: var(--accent-light);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.content-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--text-primary);
}

.content-card .meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========================================
   三栏布局 (推荐/热门/最新)
   ======================================== */
.three-column {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 40px 0;
}

.column-box {
  background: var(--bg-primary);
  padding: 25px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.column-box h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--bg-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-box h3 .icon {
  color: var(--accent-color);
}

.article-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-secondary);
}

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

.article-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  transition: color 0.3s;
}

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

.article-list .num {
  width: 24px;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.article-list .num.hot {
  background: #ff6b6b;
  color: #fff;
}

.article-list .title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========================================
   Footer 页脚
   ======================================== */
.footer {
  background: var(--bg-dark);
  color: #fff;
  padding: 50px 0 20px;
}

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

.footer-brand .logo {
  color: #fff;
  margin-bottom: 15px;
}

.footer-brand p {
  opacity: 0.8;
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-links h4 {
  font-size: 1rem;
  margin-bottom: 20px;
  color: #fff;
}

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

.footer-links a {
  opacity: 0.7;
  font-size: 0.9rem;
  transition: opacity 0.3s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  opacity: 0.6;
  font-size: 0.85rem;
}

/* ========================================
   分类页样式
   ======================================== */
.breadcrumb {
  background: var(--bg-primary);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

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

.category-header {
  background: var(--bg-primary);
  padding: 40px 0;
  text-align: center;
}

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

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

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

.filter-bar .container {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-options a {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--bg-secondary);
  font-size: 0.9rem;
  transition: all 0.3s;
}

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

.aggregated-list {
  padding: 40px 0;
}

.aggregated-item {
  background: var(--bg-primary);
  padding: 25px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

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

.aggregated-item .source {
  display: inline-block;
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.aggregated-item h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.aggregated-item .summary {
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.7;
}

.aggregated-item .meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.load-more {
  text-align: center;
  padding: 30px 0;
}

.load-more-btn {
  display: inline-block;
  padding: 12px 40px;
  background: var(--bg-primary);
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s;
}

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

/* ========================================
   文章页样式
   ======================================== */
.article-header {
  background: var(--bg-primary);
  padding: 40px 0;
}

.article-header .source-info {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.article-header .source-tag {
  background: var(--accent-color);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.article-header .author {
  color: var(--text-secondary);
}

.article-header h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

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

.article-body {
  padding: 40px 0;
}

.article-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

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

.article-content .featured-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
}

.article-content .summary-box {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  padding: 25px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  border-left: 4px solid var(--accent-color);
}

.article-content .summary-box h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--accent-dark);
}

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

.article-content .key-points {
  margin-bottom: 30px;
}

.article-content .key-points h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.article-content .key-points li {
  padding: 10px 0;
  padding-left: 25px;
  position: relative;
  color: var(--text-secondary);
}

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

.article-content .full-content {
  line-height: 1.9;
  color: var(--text-primary);
}

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

.article-content .full-content h2 {
  font-size: 1.5rem;
  margin: 30px 0 15px;
  color: var(--text-primary);
}

.read-original {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.read-original-btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s;
}

.read-original-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.article-sidebar .sidebar-box {
  background: var(--bg-primary);
  padding: 25px;
  border-radius: var(--radius-md);
  margin-bottom: 25px;
  box-shadow: var(--shadow-sm);
}

.article-sidebar h4 {
  font-size: 1rem;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--bg-secondary);
}

.related-grid {
  display: grid;
  gap: 15px;
}

.related-item {
  display: flex;
  gap: 12px;
}

.related-item img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.related-item h5 {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.related-item:hover h5 {
  color: var(--accent-color);
}

/* ========================================
   404 页面
   ======================================== */
.error-page {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

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

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

.error-content h1 {
  font-size: 2rem;
  margin-bottom: 15px;
}

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

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

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s;
}

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

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

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

.btn-secondary:hover {
  background: var(--border-color);
}

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

  .article-wrapper {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    order: 2;
  }

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

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

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

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

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

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

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

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

  .article-content {
    padding: 25px;
  }

  .article-content .featured-image {
    height: 250px;
  }

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

@media (max-width: 480px) {
  .sources-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-bar .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .aggregated-item {
    padding: 20px;
  }

  .aggregated-item h2 {
    font-size: 1.1rem;
  }
}
