/* ========================================
   数字插画 - 评测风格样式
   www.cixiupeixun.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: #f5f7fa;
  --bg-card: #fff;
  --border-color: #e8ecf1;
  --success: #4caf50;
  --warning: #ff9800;
  --error: #f44336;
  --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;
  --header-height: 64px;
}

/* 重置 */
*, *::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-secondary);
}

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 {
  list-style: none;
}

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

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

.section {
  padding: 48px 0;
}

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

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

.header {
  background: var(--bg-primary);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.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;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-color);
  border-bottom-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: 0.875rem;
}

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

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

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

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

.hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}

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

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

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

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.card-body {
  padding: 20px;
}

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

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

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

/* ========================================
   评分组件
   ======================================== */

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

.rating-stars {
  color: var(--warning);
  font-size: 1rem;
}

.rating-score {
  font-weight: 600;
  color: var(--text-primary);
}

.rating-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.rating-box .rating-score {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-color);
  display: block;
}

.rating-box .rating-stars {
  font-size: 1.5rem;
  margin: 8px 0;
}

.rating-breakdown {
  margin-top: 16px;
}

.rating-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

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

/* ========================================
   优缺点组件
   ======================================== */

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.pros,
.cons {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
}

.pros h4 {
  color: var(--success);
  margin-bottom: 12px;
  font-size: 1rem;
}

.cons h4 {
  color: var(--error);
  margin-bottom: 12px;
  font-size: 1rem;
}

.pros ul li,
.cons ul li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  font-size: 0.9375rem;
}

.pros ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 600;
}

.cons ul li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--error);
  font-weight: 600;
}

/* ========================================
   面包屑
   ======================================== */

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

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.breadcrumb li:not(:last-child)::after {
  content: ">";
  margin-left: 8px;
  color: var(--text-muted);
}

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

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

.breadcrumb li:last-child {
  color: var(--text-muted);
}

/* ========================================
   分类标签
   ======================================== */

.category-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}

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

/* ========================================
   文章列表
   ======================================== */

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

.article-item {
  display: flex;
  gap: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
}

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

.article-thumb {
  width: 200px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.article-title a {
  color: inherit;
}

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

.article-excerpt {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 12px;
  flex: 1;
}

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

/* ========================================
   排序选项
   ======================================== */

.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.sort-options {
  display: flex;
  gap: 16px;
}

.sort-options a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

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

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

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

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

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

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

.pagination .disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

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

.article-header {
  background: var(--bg-primary);
  padding: 40px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.article-info {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.article-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 40px 0;
}

.article-body {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 24px 0 12px;
}

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

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

.article-body li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

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

.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.sidebar-widget h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-widget ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.sidebar-widget a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

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

/* ========================================
   购买链接
   ======================================== */

.buy-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

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

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

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

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

/* ========================================
   快速结论
   ======================================== */

.verdict {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-color) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
}

.verdict h4 {
  font-size: 1.125rem;
  margin-bottom: 12px;
}

.verdict p {
  color: rgba(255,255,255,0.9);
  margin: 0;
}

/* ========================================
   三栏底部
   ======================================== */

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 48px 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

.footer-widget h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-widget ul li {
  padding: 8px 0;
}

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

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

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

.footer {
  background: var(--text-primary);
  color: var(--text-muted);
  padding: 24px 0;
  text-align: center;
  font-size: 0.875rem;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: #fff;
}

/* ========================================
   404 页面
   ======================================== */

.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 20px;
}

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

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

.error-message {
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 400px;
}

/* ========================================
   特色评测卡片
   ======================================== */

.featured-review {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.featured-image {
  height: 100%;
  min-height: 300px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.featured-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-content .rating {
  margin-bottom: 16px;
}

.featured-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.featured-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

/* ========================================
   网格布局
   ======================================== */

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

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

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

@media (max-width: 1024px) {
  .article-main {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    order: -1;
  }

  .featured-review {
    grid-template-columns: 1fr;
  }

  .featured-image {
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .header .container {
    flex-wrap: wrap;
  }

  .nav {
    display: none;
  }

  .search-box {
    display: none;
  }

  .hero {
    padding: 40px 0;
  }

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

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

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

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

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

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

  .pros-cons {
    grid-template-columns: 1fr;
  }

  .sort-bar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .buy-links {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

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

  .section {
    padding: 32px 0;
  }

  .article-body {
    padding: 20px;
  }

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