/* 文章详情页样式 */

/* 文章容器 */
.article-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 20px 60px;
}

/* 面包屑导航 */
.breadcrumb {
  font-size: 14px;
  color: #666;
  margin-bottom: 30px;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #f86a3a;
}

.breadcrumb .separator {
  margin: 0 8px;
  color: #ccc;
}

.breadcrumb .current {
  color: #999;
}

/* 文章头部 */
.article-header {
  margin-bottom: 30px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.article-meta .category {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #fff5f2 0%, #ffebe5 100%);
  border-radius: 4px;
  font-size: 13px;
  color: #f86a3a;
  font-weight: 500;
}

.article-meta .date,
.article-meta .author {
  color: #999;
  font-size: 14px;
}

.article-title {
  font-size: 32px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  margin: 0;
}

/* 封面图 */
.cover-image,
.article-cover {
  margin-bottom: 40px;
  border-radius: 12px;
  overflow: hidden;
  max-height: 400px;
}

.cover-image img,
.article-cover img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

/* 文章正文 */
.article-content {
  font-size: 16px;
  line-height: 1.9;
  color: #333;
}

.article-content h2 {
  font-size: 24px;
  font-weight: 600;
  color: #222;
  margin: 40px 0 20px;
  padding-left: 12px;
  border-left: 4px solid #f86a3a;
}

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

.article-content p {
  margin-bottom: 20px;
  text-align: justify;
}

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

.article-content li {
  margin-bottom: 10px;
  line-height: 1.8;
}

.article-content strong {
  color: #222;
  font-weight: 600;
}

.article-content a {
  color: #f86a3a;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.article-content a:hover {
  border-bottom-color: #f86a3a;
}

.article-content blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  background: #f9f9f9;
  border-left: 4px solid #f86a3a;
  border-radius: 0 8px 8px 0;
  color: #555;
  font-style: italic;
}

.article-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
}

.article-content pre {
  background: #f5f5f5;
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.6;
}

.article-content code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  color: #e83e8c;
}

/* 文章标签 */
.article-tags {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.article-tags .label {
  color: #666;
  font-size: 14px;
  margin-right: 8px;
}

.article-tags .tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f5f5f5;
  border-radius: 4px;
  margin-right: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #666;
  text-decoration: none;
  transition: all 0.2s;
}

.article-tags .tag:hover {
  background: #fff5f2;
  color: #f86a3a;
}

/* 文章导航 */
.article-nav {
  margin-top: 40px;
  text-align: center;
}

.article-nav .back-to-list {
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(135deg, #f86a3a 0%, #ff8c5a 100%);
  color: white;
  text-decoration: none;
  border-radius: 24px;
  font-size: 15px;
  transition: all 0.3s;
}

.article-nav .back-to-list:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(248, 106, 58, 0.4);
}

/* 相关推荐 */
.related-articles {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #eee;
}

.related-articles h3 {
  font-size: 22px;
  font-weight: 600;
  color: #222;
  margin-bottom: 24px;
}

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

.related-item {
  display: block;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

.related-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.related-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.related-cover {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: #f5f5f5;
  background-image: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.related-item .info {
  padding: 16px;
}

.related-item h4 {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  line-height: 1.5;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item .date {
  font-size: 13px;
  color: #999;
}

/* 响应式 */
@media screen and (max-width: 768px) {
  .article-container {
    padding: 80px 16px 40px;
  }

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

  .article-content {
    font-size: 15px;
  }

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

  .related-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .related-item {
    display: flex;
  }

  .related-item img {
    width: 120px;
    height: 90px;
  }

  .related-cover {
    width: 120px;
    min-width: 120px;
    height: 90px;
  }

  .related-item .info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}
