/* ============================================
   音响设备评测网站样式 - www.yingxiangshebei.cn
   对比评测风格 | 响应式设计
   ============================================ */

/* CSS 变量定义 */
:root {
  --accent-color: #00bcd4;
  --accent-dark: #0097a7;
  --accent-light: #b2ebf2;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --bg-dark: #263238;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --radius-sm: 4px;
  --radius-md: 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-color: var(--bg-primary);
}

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

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.75rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-primary);
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* ============================================
   头部导航
   ============================================ */

.header {
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  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);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

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

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

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

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

.search-box button {
  border: none;
  background: var(--accent-color);
  color: white;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.3s ease;
}

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

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

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

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

.hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-keywords {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-keywords span {
  background: rgba(255,255,255,0.1);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.875rem;
  border: 1px solid rgba(255,255,255,0.2);
}

/* ============================================
   对比表格
   ============================================ */

.comparison-section {
  background: var(--bg-secondary);
}

.comparison-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: var(--bg-primary);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.comparison-table th,
.comparison-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table .product-name {
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-table .price {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 1.125rem;
}

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

.comparison-table .stars {
  color: var(--warning-color);
}

.comparison-table .score {
  background: var(--accent-color);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

.comparison-table .check {
  color: var(--success-color);
  font-weight: bold;
}

.comparison-table .cross {
  color: var(--text-muted);
}

/* ============================================
   分类卡片
   ============================================ */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.category-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

.category-card .icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.category-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.category-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.category-card .link {
  font-weight: 500;
  font-size: 0.875rem;
}

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

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

.article-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

.article-item .thumb {
  width: 160px;
  height: 100px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.article-item .content {
  flex: 1;
}

.article-item h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-item .meta {
  display: flex;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.article-item .excerpt {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-item .badge {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

/* ============================================
   三栏布局
   ============================================ */

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

.column-box {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
}

.column-box h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

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

.column-box ul li:last-child {
  border-bottom: none;
}

.column-box ul li a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.column-box ul li a:hover {
  color: var(--accent-color);
}

.column-box .tag {
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.breadcrumb {
  background: var(--bg-secondary);
  padding: 16px 0;
  font-size: 0.875rem;
}

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

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

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

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

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

.article-header {
  padding: 48px 0 32px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
}

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

.article-header .meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.5rem;
  margin: 40px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-light);
}

.article-content h3 {
  font-size: 1.25rem;
  margin: 32px 0 16px;
  color: var(--accent-dark);
}

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

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

.article-content ul li {
  list-style: disc;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.article-content ol li {
  list-style: decimal;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* 快速摘要框 */
.summary-box {
  background: var(--accent-light);
  border-left: 4px solid var(--accent-color);
  padding: 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 32px 0;
}

.summary-box h3 {
  margin-top: 0;
  color: var(--text-primary);
}

.summary-box ul {
  margin-bottom: 0;
}

.summary-box li {
  color: var(--text-primary);
}

/* 结论框 */
.verdict-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 32px;
  margin: 40px 0;
  text-align: center;
}

.verdict-box h3 {
  margin-top: 0;
  color: var(--accent-color);
  font-size: 1.5rem;
}

.verdict-box p {
  font-size: 1.125rem;
  margin-bottom: 0;
}

/* 相关产品 */
.related-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.product-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

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

.product-card .img-placeholder {
  width: 100%;
  height: 120px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.product-card h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.product-card .price {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 1.125rem;
}

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

.error-page {
  min-height: calc(100vh - var(--header-height) - 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 20px;
}

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

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

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

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

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

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
}

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

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

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

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

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

.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
  margin-top: 64px;
}

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

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

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.8;
}

.footer-column h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 16px;
}

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

.footer-column ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

.footer-column ul li a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

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

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

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

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

  .header .container {
    flex-direction: column;
    padding: 12px 20px;
    gap: 12px;
  }

  .nav {
    gap: 20px;
    font-size: 0.875rem;
  }

  .search-box {
    width: 100%;
  }

  .search-box input {
    flex: 1;
    width: auto;
  }

  .hero {
    padding: 48px 0;
  }

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

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

  .section {
    padding: 32px 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

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

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

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

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

  .comparison-table {
    font-size: 0.875rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .hero-keywords {
    gap: 8px;
  }

  .hero-keywords span {
    padding: 6px 14px;
    font-size: 0.75rem;
  }

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

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

  .article-content {
    font-size: 1rem;
  }

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