/* ===== 基础变量 ===== */
:root {
  --accent-color: #2196f3;
  --accent-dark: #1976d2;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --bg-white: #fff;
  --bg-gray: #f5f5f5;
  --border-color: #e0e0e0;
  --success: #4caf50;
  --danger: #f44336;
  --star: #ffc107;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --radius: 8px;
  --max-width: 1200px;
}

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

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

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

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

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

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

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

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
}

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

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

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

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

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

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

.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: 60px 0;
  text-align: center;
}

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

.hero p {
  font-size: 18px;
  opacity: 0.9;
}

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

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

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

/* ===== 卡片组件 ===== */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body {
  padding: 20px;
}

/* ===== 评分组件 ===== */
.rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stars {
  color: var(--star);
  font-size: 16px;
}

.rating-score {
  font-weight: bold;
  color: var(--accent-color);
}

/* ===== 优缺点组件 ===== */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.pros, .cons {
  padding: 15px;
  border-radius: var(--radius);
}

.pros {
  background: #e8f5e9;
}

.cons {
  background: #ffebee;
}

.pros h4 {
  color: var(--success);
  margin-bottom: 10px;
}

.cons h4 {
  color: var(--danger);
  margin-bottom: 10px;
}

.pros ul, .cons ul {
  list-style: none;
}

.pros li::before {
  content: '✓ ';
  color: var(--success);
  font-weight: bold;
}

.cons li::before {
  content: '✗ ';
  color: var(--danger);
  font-weight: bold;
}

.pros li, .cons li {
  padding: 5px 0;
  color: var(--text-secondary);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.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: 2px solid var(--accent-color);
}

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

/* ===== 分类网格 ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.category-item {
  background: var(--bg-white);
  padding: 30px;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.category-item:hover {
  transform: translateY(-5px);
}

.category-item h3 {
  color: var(--text-primary);
  margin-top: 10px;
}

/* ===== 评测列表 ===== */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.review-thumb {
  width: 200px;
  height: 150px;
  background: var(--bg-gray);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  flex-shrink: 0;
}

.review-content {
  flex: 1;
}

.review-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.review-content h3 a {
  color: var(--text-primary);
}

.review-content h3 a:hover {
  color: var(--accent-color);
}

.review-meta {
  display: flex;
  gap: 15px;
  color: var(--text-light);
  font-size: 14px;
  margin-top: 10px;
}

.review-excerpt {
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.6;
}

/* ===== 文章详情 ===== */
.article-header {
  background: var(--bg-white);
  padding: 40px 0;
  margin-bottom: 30px;
}

.article-header h1 {
  font-size: 32px;
  margin-bottom: 15px;
}

.article-meta {
  display: flex;
  gap: 20px;
  color: var(--text-secondary);
}

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

.article-body h2 {
  font-size: 24px;
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

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

.article-image {
  width: 100%;
  height: 400px;
  background: var(--bg-gray);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  margin: 20px 0;
}

.verdict {
  background: #e3f2fd;
  padding: 20px;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent-color);
  margin: 20px 0;
}

.verdict h3 {
  color: var(--accent-color);
  margin-bottom: 10px;
}

.rating-breakdown {
  margin: 20px 0;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
}

.rating-row span:first-child {
  width: 100px;
  color: var(--text-secondary);
}

.buy-section {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

/* ===== 排序栏 ===== */
.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 20px;
  background: var(--bg-white);
  border-radius: var(--radius);
}

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

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

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

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

.pagination a, .pagination span {
  padding: 10px 15px;
  background: var(--bg-white);
  border-radius: var(--radius);
  color: var(--text-primary);
}

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

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

/* ===== 侧边栏组件 ===== */
.sidebar-section {
  background: var(--bg-white);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.sidebar-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
}

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

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

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

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

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

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

/* ===== 两栏布局 ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 40px 0;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  margin-bottom: 15px;
  color: var(--accent-color);
}

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

.footer-section li {
  padding: 5px 0;
}

.footer-section a {
  color: #aaa;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #444;
  color: #aaa;
}

/* ===== 404页面 ===== */
.error-page {
  text-align: center;
  padding: 100px 20px;
}

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

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

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

/* ===== 区块标题 ===== */
.section-title {
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

/* ===== 特色评测 ===== */
.featured-review {
  background: var(--bg-white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 30px 0;
}

.featured-review h2 {
  font-size: 28px;
  margin-bottom: 15px;
}

.featured-review h2 a {
  color: var(--text-primary);
}

.featured-review h2 a:hover {
  color: var(--accent-color);
}

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

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

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

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
  }

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

  .search-box {
    display: none;
  }

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

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

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

  .review-thumb {
    width: 100%;
    height: 200px;
  }

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

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

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

  .article-body {
    padding: 20px;
  }

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

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

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

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

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

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

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