/* 博客文章详情页样式 */
.blog-post-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  background: #fff;
  min-height: calc(100vh - 200px);
}

.blog-post-content {
  line-height: 1.8;
  color: #333;
}

/* 文章头部 */
.blog-post-header {
  margin-bottom: 40px;
  text-align: center;
}

.blog-post-meta {
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}

.blog-post-meta span {
  margin-right: 20px;
}

.blog-post-meta span:last-child {
  margin-right: 0;
}

.blog-post-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 30px;
  line-height: 1.3;
}

.blog-post-image {
  margin: 30px 0;
}

.blog-post-image img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important; /* 确保不裁切 */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 文章正文 */
.blog-post-body {
  font-size: 16px;
  line-height: 1.8;
}

.blog-post-body p {
  margin-bottom: 20px;
}

.blog-post-body h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #333;
  margin: 40px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #fbbf24;
}

.blog-post-body h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  margin: 30px 0 15px 0;
}

.blog-post-body ul, .blog-post-body ol {
  margin: 20px 0;
  padding-left: 30px;
}

.blog-post-body li {
  margin-bottom: 10px;
}

.blog-post-body blockquote {
  margin: 30px 0;
  padding: 20px;
  background: #fef3c7;
  border-left: 4px solid #fbbf24;
  font-style: italic;
  border-radius: 4px;
}

.blog-post-body em {
  font-style: italic;
  color: #666;
}

/* 标签 */
.blog-post-tags {
  margin: 40px 0;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.tag {
  display: inline-block;
  background: #fbbf24;
  color: #333;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  margin-right: 10px;
  margin-bottom: 10px;
  font-weight: 500;
}

/* 文章底部 */
.blog-post-footer {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.blog-post-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.back-to-blog {
  display: inline-flex;
  align-items: center;
  color: #fbbf24;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.back-to-blog:hover {
  color: #f59e0b;
  text-decoration: underline;
}

.blog-post-share {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-post-share span {
  color: #666;
  font-size: 14px;
}

.share-link {
  color: #fbbf24;
  text-decoration: none;
  font-size: 14px;
  padding: 5px 10px;
  border: 1px solid #fbbf24;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.share-link:hover {
  background: #fbbf24;
  color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .blog-post-main {
    padding: 20px 15px;
  }
  
  .blog-post-title {
    font-size: 2rem;
  }
  
  .blog-post-navigation {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .blog-post-meta span {
    display: block;
    margin-bottom: 5px;
  }
}

@media (max-width: 480px) {
  .blog-post-title {
    font-size: 1.5rem;
  }
  
  .blog-post-body h2 {
    font-size: 1.4rem;
  }
  
  .blog-post-body h3 {
    font-size: 1.2rem;
  }
}

/* 图片完整显示和浮窗样式 */
.clickable-image {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clickable-image:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* 文章正文中的图片样式 */
.blog-post-body img {
  display: block;
  width: 100% !important;          /* 宽度随容器缩放 */
  max-width: 100% !important;      /* 不限制具体像素 */
  height: auto !important;          /* 按比例缩放显示完整图片 */
  object-fit: contain !important;   /* 避免裁切 */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 20px auto;                /* 居中显示 */
}

.blog-post-body img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* 图片浮窗样式 */
.image-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.image-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
  animation: zoomIn 0.3s ease;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 90vh;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.image-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10001;
}

.image-modal-close:hover {
  color: #fbbf24;
}

.image-modal-info {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  color: #fff;
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
}

/* 浮窗动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* 响应式浮窗 */
@media (max-width: 768px) {
  .image-modal-content {
    max-width: 95%;
    max-height: 95%;
  }
  
  .image-modal-close {
    top: -50px;
    font-size: 40px;
  }
  
  .image-modal-info {
    bottom: -50px;
    font-size: 16px;
  }
} 