/* article.css - 文章详情排版（百科/新闻页加载） */

/* 文章头部 */
.article-header {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid var(--border);
}

.article-header h1 {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 20px;
  font-weight: 600;
  line-height: 1.4;
}

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

.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-meta .tag {
  display: inline-block;
  padding: 4px 12px;
  background-color: rgba(212, 165, 116, 0.1);
  color: var(--secondary);
  border-radius: 20px;
  font-size: 13px;
}

.article-meta .tag:hover {
  background-color: var(--secondary);
  color: var(--white);
}

@media (max-width: 768px) {
  .article-header h1 {
    font-size: 24px;
  }
  
  .article-meta {
    gap: 12px;
  }
}

/* 文章正文 */
.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.article-body h2 {
  font-size: 26px;
  color: var(--primary);
  margin: 40px 0 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.article-body h3 {
  font-size: 22px;
  color: var(--primary);
  margin: 30px 0 15px;
  font-weight: 600;
}

.article-body h4 {
  font-size: 18px;
  color: var(--primary);
  margin: 25px 0 12px;
  font-weight: 600;
}

.article-body p {
  margin-bottom: 18px;
  text-align: justify;
}

.article-body ul,
.article-body ol {
  margin: 18px 0 18px 25px;
}

.article-body ul li,
.article-body ol li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.article-body ul li {
  list-style-type: disc;
}

.article-body ol li {
  list-style-type: decimal;
}

.article-body a {
  color: var(--secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}

.article-body a:hover {
  color: var(--primary);
}

.article-body strong {
  color: var(--primary);
  font-weight: 600;
}

.article-body blockquote {
  margin: 25px 0;
  padding: 20px 25px;
  background-color: var(--light-bg);
  border-left: 4px solid var(--secondary);
  font-style: italic;
  color: var(--text-light);
}

.article-body code {
  background-color: var(--light-bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
  color: #e74c3c;
}

.article-body pre {
  background-color: var(--dark);
  color: var(--white);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
}

.article-body pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
}

.article-body th,
.article-body td {
  padding: 12px 15px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-body th {
  background-color: var(--primary);
  color: var(--white);
  font-weight: 600;
}

.article-body tr:nth-child(even) {
  background-color: var(--light-bg);
}

@media (max-width: 768px) {
  .article-body {
    font-size: 15px;
  }
  
  .article-body h2 {
    font-size: 22px;
  }
  
  .article-body h3 {
    font-size: 18px;
  }
  
  .article-body h4 {
    font-size: 16px;
  }
}

/* 文章底部 */
.article-footer {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.article-tags {
  margin-bottom: 30px;
}

.article-tags h4 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 600;
}

.article-tags .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-tags .tag-list a {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--light-bg);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text);
  transition: all 0.3s ease;
}

.article-tags .tag-list a:hover {
  background-color: var(--secondary);
  color: var(--white);
}

/* 相关文章 */
.related-articles {
  margin-top: 40px;
}

.related-articles h3 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 25px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary);
}

.related-articles-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.related-article-item {
  display: flex;
  gap: 15px;
  padding: 20px;
  background: var(--light-bg);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.related-article-item:hover {
  background: var(--white);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.related-article-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
}

.related-article-content h4 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 6px;
  font-weight: 600;
  line-height: 1.4;
}

.related-article-content h4 a {
  color: inherit;
  transition: color 0.3s ease;
  text-decoration: none;
}

.related-article-content h4 a:hover {
  color: var(--secondary);
}

.related-article-content p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 576px) {
  .related-articles-list {
    grid-template-columns: 1fr;
  }
}

/* 文章导航 */
.article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}

.article-nav-prev,
.article-nav-next {
  max-width: 45%;
}

.article-nav-next {
  text-align: right;
}

.article-nav-label {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.article-nav-title {
  font-size: 15px;
  color: var(--primary);
  font-weight: 600;
  line-height: 1.5;
  transition: color 0.3s ease;
}

.article-nav-title:hover {
  color: var(--secondary);
}

@media (max-width: 576px) {
  .article-nav {
    flex-direction: column;
    gap: 20px;
  }
  
  .article-nav-prev,
  .article-nav-next {
    max-width: 100%;
  }
  
  .article-nav-next {
    text-align: left;
  }
}

/* 百科列表页 */
.wiki-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.wiki-list-item {
  background: var(--white);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.wiki-list-item:hover {
  border-left-color: var(--secondary);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  transform: translateX(5px);
}

.wiki-list-item h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.wiki-list-item h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.wiki-list-item h3 a:hover {
  color: var(--secondary);
}

.wiki-list-item p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wiki-list-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .wiki-list {
    grid-template-columns: 1fr;
  }
}

/* 新闻列表页 */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.news-list-item {
  display: flex;
  gap: 25px;
  padding: 25px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.news-list-item:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.news-list-date {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  background-color: var(--primary);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.news-list-date .day {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.news-list-date .month {
  font-size: 13px;
  margin-top: 4px;
}

.news-list-content {
  flex: 1;
  min-width: 0;
}

.news-list-content h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.news-list-content h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-list-content h3 a:hover {
  color: var(--secondary);
}

.news-list-content p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-list-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-light);
}

@media (max-width: 576px) {
  .news-list-item {
    flex-direction: column;
    gap: 15px;
  }
  
  .news-list-date {
    width: 60px;
    height: 60px;
  }
  
  .news-list-date .day {
    font-size: 22px;
  }
  
  .news-list-content h3 {
    font-size: 18px;
  }
}

/* TAG聚合页 */
.tag-header {
  text-align: center;
  margin-bottom: 50px;
}

.tag-header h1 {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 15px;
}

.tag-header h1 span {
  color: var(--secondary);
}

.tag-header p {
  font-size: 16px;
  color: var(--text-light);
}
