/* ============================================
   口腔护理 - 汇总文章风格样式表
   配色: #ff5722 (橙红色强调色)
   ============================================ */

/* CSS 变量 */
:root {
  --accent-color: #ff5722;
  --accent-light: #ff8a65;
  --accent-dark: #e64a19;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --bg-card: #fafafa;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

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

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

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 页头
   ============================================ */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

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

.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;
  background: var(--bg-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
}

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

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

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

.hero-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
}

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

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 36px;
  font-weight: 700;
}

.stat-label {
  font-size: 14px;
  opacity: 0.8;
}

/* ============================================
   面包屑导航
   ============================================ */
.breadcrumb {
  background: var(--bg-secondary);
  padding: 16px 0;
  font-size: 14px;
}

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

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

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

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

/* ============================================
   区块标题
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.section-more {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================
   汇总卡片 (roundup-card)
   ============================================ */
.roundup-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.roundup-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.roundup-number {
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.roundup-info {
  flex: 1;
}

.roundup-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.roundup-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.roundup-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.roundup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.roundup-tags {
  display: flex;
  gap: 8px;
}

.tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
}

.tag.accent {
  background: rgba(255, 87, 34, 0.1);
  color: var(--accent-color);
}

.read-link {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   分类组 (category-group)
   ============================================ */
.category-group {
  padding: 40px 0;
}

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

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.2s;
}

.category-card:hover {
  border-color: var(--accent-color);
  background: var(--bg-primary);
}

.category-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 87, 34, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
}

.category-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ============================================
   文章列表
   ============================================ */
.article-section {
  padding: 40px 0;
  background: var(--bg-secondary);
}

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

.article-list {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.article-list-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.article-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.article-item a {
  color: var(--text-primary);
  font-size: 14px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.article-item .date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   编辑点评 (editor-comment)
   ============================================ */
.editor-comment {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);
  border-left: 4px solid var(--accent-color);
  padding: 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 20px 0;
}

.editor-comment-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-comment p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   评分星星
   ============================================ */
.rating {
  display: flex;
  gap: 4px;
  color: #ffc107;
  font-size: 14px;
}

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

.page-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.page-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

/* ============================================
   时间筛选
   ============================================ */
.date-filter {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
}

.date-filter a {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 20px;
  transition: all 0.2s;
}

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

/* ============================================
   文章详情页
   ============================================ */
.article-header {
  padding: 40px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

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

.article-content {
  padding: 40px 0;
  max-width: 800px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 40px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 30px 0 16px;
}

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

.article-content ul,
.article-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

/* ============================================
   对比表格
   ============================================ */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

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

.compare-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

.compare-table tr:hover {
  background: var(--bg-card);
}

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

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

.error-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: background 0.2s;
}

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

/* ============================================
   Footer 页脚
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
}

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

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

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

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

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

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

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

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .search-box {
    display: none;
  }

  .hero {
    padding: 40px 0;
  }

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

  .hero-stats {
    gap: 30px;
  }

  .stat-num {
    font-size: 28px;
  }

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

  .roundup-header {
    flex-direction: column;
    gap: 12px;
  }

  .article-title {
    font-size: 24px;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 24px;
  }

  .section-title {
    font-size: 20px;
  }

  .roundup-card {
    padding: 16px;
  }

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