
/* 全局样式继承自主页，这里只添加博客详情页面特有的样式 */
:root {
  --primary-color: #7e3ff2;
  --secondary-color: #5e17eb;
  --text-color: #333;
  --light-text: #666;
  --white: #fff;
  --light-bg: #f8f9fa;
  --border-color: #e9ecef;
  --gradient-bg: linear-gradient(135deg, #7e3ff2, #5e17eb);
}

/* 博客详情页面容器 */
.blog-detail-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.blog-detail-container {
  padding: 100px 0 50px;
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.container {
  width: 100%;
  padding: 0 15px;
}

/* 返回按钮 */
.back-button {
  margin-bottom: 20px;
  margin-top: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--secondary-color);
}

.arrow {
  margin-right: 8px;
  font-size: 20px;
}

/* 博客文章样式 */
.blog-article {
  border-radius: 10px;
  overflow: hidden;
  padding: 30px;
  margin-bottom: 40px;
}

.blog-title {
  font-size: 45px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-color);
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  color: #666;
  font-size: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.blog-cover {
  margin-bottom: 30px;
  border-radius: 10px;
  overflow: hidden;
}

.blog-cover img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.blog-content {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 30px;
}

.blog-content h1,.blog-content h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--text-color);
}

.blog-content p {
  margin-bottom: 20px;
}
.blog-content img{
  margin-bottom: 20px;
  margin-top: 20px;
}
.blog-content hr{
  margin-bottom: 20px;
  margin-top: 20px;
}
.blog-content table{
  text-align: center;
}

/* 点赞区域 */
.like-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px 0;
}

.like-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-bg);
  border: none;
  border-radius: 50px;
  padding: 10px 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.like-button:hover {
  background-color: #e9ecef;
}

.like-button img {
  width: 24px;
  margin-right: 10px;
}

.like-count {
  margin-top: 10px;
  font-size: 16px;
  color: var(--light-text);
}

/* 分享区域 */
.share-section {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.share-section h3 {
  margin-right: 20px;
  font-size: 18px;
  font-weight: 500;
}

.share-buttons {
  display: flex;
  gap: 15px;
}

.share-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-button img {
  width: 20px;
  height: 20px;
}

.weixin {
  background-color: #07c160;
}

.weibo {
  background-color: #e6162d;
}

.twitter {
  background-color: #1da1f2;
}

/* 相关推荐 */
.related-posts {
  margin-top: 30px;
}

/* 标签区域 */
.tags-section {
  margin-top: 50px;
}

.tags-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  position: relative;
  padding-left: 15px;
}

.tags-section h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  height: 24px;
  width: 4px;
  background: var(--gradient-bg);
  border-radius: 2px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tags-container h1{
  font-size: 14px;
  color: #666;
}
.tags-container h1:hover{
  color: #fff;
}

.tag-item {
  display: inline-block;
  padding: 6px 15px;
  background-color: #f0f0f0;
  border-radius: 10px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.tag-item:hover {
  background-color: var(--primary-color);
  color: white;
}

.related-posts h2 {
  font-size: 24px;
  margin-bottom: 30px;
  position: relative;
  padding-left: 15px;
}

.related-posts h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  height: 24px;
  width: 4px;
  background: var(--gradient-bg);
  border-radius: 2px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* 复用博客卡片样式 */
.blog-card { 
  border-radius: 10px;
  overflow: hidden; 
  transition: transform 0.3s ease;
  height: 100%;
  border: 1px solid #c9c9c9;
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-card-image {
  height: 180px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100% - 180px);
}

.blog-card-content h3 {
  font-size: 16px;
  margin-bottom: 15px;
  line-height: 1.4;
  height: 45px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  color: #666;
  font-size: 14px;
  margin-top: auto;
}

/* 图标样式 */
.good img{
  width: 24px; 
  margin-right: 5px;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-title {
    font-size: 28px;
  }
  
  .blog-content {
    font-size: 16px;
    padding: 2px !important;
  }
  
  .blog-article {
    padding: 2px;
  }
}

@media (max-width: 576px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .share-section {
    flex-direction: column;
  }
  
  .share-section h3 {
    margin-right: 0;
    margin-bottom: 15px;
  }
}

/* 加载和错误状态样式 */
.loading-state, .error-state {
  text-align: center;
  padding: 50px 0;
  font-size: 18px;
  color: var(--light-text);
}

.error-state {
  color: #e74c3c;
}

.retry-button {
  margin-top: 20px;
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.retry-button:hover {
  background: var(--secondary-color);
}

.blog-content a{  
  color: #337ab7;
  text-decoration: none;
}
.blog-content a:hover{
  color: #23527c;
  text-decoration: underline;
}

/* 上下篇博客导航样式 */
.prev-next-section {
  display: flex;
  justify-content: space-between;
  margin: 40px 0;
  padding: 20px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.prev-post, .next-post {
  max-width: 45%;
}

.prev-link, .next-link {
  display: flex;
  align-items: center;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.prev-link:hover, .next-link:hover {
  color: var(--primary-color);
}

.prev-link .arrow, .next-link .arrow {
  font-size: 20px;
  margin: 0 8px;
}

.prev-link {
  justify-content: flex-start;
}

.next-link {
  justify-content: flex-end;
  text-align: right;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .prev-next-section {
    flex-direction: column;
    gap: 20px;
  }
  
  .prev-post, .next-post {
    max-width: 100%;
  }
}
.no-post {
  color: #999;
  font-style: italic;
  padding: 0 10px;
}