
/* 强制所有容器不裁剪内容 */
.article-optimized,
.article-detail,
.article-content,
.article-image,
.article-content.optimized-content,
article,
section,
div {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

/* ========================================
   文章页面专业级美化 - v3.0
   高优先级，确保覆盖默认样式
   ======================================== */

/* 全局容器 */
.article-optimized {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0;
}

/* ===== 文章头部样式 ===== */
.article-detail {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  overflow: hidden;
  padding: 40px !important;
  border: none !important;
}

/* 面包屑导航 */
.breadcrumb-nav {
  background: linear-gradient(135deg, #f8f9ff 0%, #fff5f5 100%);
  padding: 15px 25px !important;
  border-radius: 10px;
  margin-bottom: 30px !important;
  border-left: 4px solid #4a90d9 !important;
}
.breadcrumb-nav .breadcrumb {
  margin-bottom: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 14px;
}
.breadcrumb-nav li {
  color: #666;
}
.breadcrumb-nav li a {
  color: #4a90d9;
  font-weight: 500;
  transition: all 0.3s ease;
}
.breadcrumb-nav li a:hover {
  color: #e74c3c;
  transform: translateX(3px);
}

/* 文章标题 */
.article-title {
  font-size: 32px !important;
  font-weight: 700 !important;
  color: #1a1a2e !important;
  line-height: 1.4 !important;
  margin-bottom: 20px !important;
  padding-bottom: 18px;
  position: relative;
}
.article-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #4a90d9, #e74c3c);
  border-radius: 2px;
}

/* 元信息 */
.article-meta {
  display: flex !important;
  align-items: center !important;
  gap: 25px !important;
  flex-wrap: wrap;
  padding: 12px 20px !important;
  background: linear-gradient(135deg, #f0f4ff, #fff9f0);
  border-radius: 50px !important;
  margin: 0 0 30px 0 !important;
  font-size: 14px !important;
  width: fit-content;
}
.article-meta span.meta-item,
.article-meta span {
  color: #555 !important;
  font-weight: 500;
}
.article-meta i {
  color: #4a90d9;
  margin-right: 4px;
}

/* 文章图片 */
.article-image {
  border-radius: 12px !important;
  overflow: hidden;
  margin: 25px 0 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.article-image img {
  width: 100% !important;
  height: auto !important;
  border-radius: 12px !important;
  transition: transform 0.5s ease;
}
.article-image:hover img {
  transform: scale(1.02);
}

/* ===== 文章内容区域 ===== */
.article-content.optimized-content {
  font-size: 16px !important;
  line-height: 1.85 !important;
  color: #333 !important;
  padding: 25px 0 !important;
}
.article-content p {
  margin-bottom: 16px !important;
  text-align: justify;
}

/* 标签 */
.article-tags {
  margin-top: 25px !important;
  padding-top: 20px !important;
  border-top: 1px dashed #ddd;
}
.tag-label {
  font-weight: 600;
  color: #444;
  margin-right: 8px;
}
.tag-item {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  border-radius: 20px !important;
  font-size: 13px;
  margin-right: 8px;
  margin-bottom: 8px;
  text-decoration: none !important;
  transition: all 0.3s ease;
}
.tag-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

/* ===== 相关文章 - 卡片布局 ===== */
.related-articles {
  margin-top: 35px !important;
}
.related-articles > .panel {
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  overflow: hidden !important;
  border: none !important;
}
.section-title {
  background: linear-gradient(135deg, #4a90d9, #63b3ed) !important;
  color: white !important;
  padding: 16px 25px !important;
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}
.section-title i {
  margin-right: 8px;
}
.comment-header {
  background: linear-gradient(135deg, #f093fb, #f5576c) !important;
}

/* 相关文章网格 */
.related-grid,
.related-articles .row {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 18px !important;
  padding: 20px 25px !important;
}

/* 卡片样式 */
.related-card {
  display: block !important;
  padding: 18px !important;
  background: linear-gradient(145deg, #ffffff, #f8f9fa) !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  border: 1px solid #eee !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04) !important;
  transition: all 0.35s cubic-bezier(.4,0,.2,1) !important;
}
.related-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 12px 28px rgba(74,144,217,0.18) !important;
  border-color: #4a90d9 !important;
}
.card-title {
  display: block;
  color: #2d3748 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ===== 评论区域 ===== */
.comment-section {
  margin-top: 35px !important;
}
.comment-section > .panel {
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  overflow: hidden;
  border: none !important;
}
.comment-section .panel-body {
  padding: 25px !important;
}

/* 表单样式 */
.comment-form .form-group {
  margin-bottom: 18px !important;
}
.comment-form label {
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
  display: block;
}
.comment-form input[type="text"],
.comment-form textarea {
  width: 100%;
  padding: 14px 18px !important;
  border: 2px solid #e8ecf1 !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  transition: all 0.3s ease !important;
  background: #fafbfc !important;
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: #4a90d9 !important;
  box-shadow: 0 0 0 4px rgba(74,144,217,0.1) !important;
  outline: none;
  background: white !important;
}

/* 提交按钮 */
.btn-submit {
  background: linear-gradient(135deg, #4a90d9, #63b3ed) !important;
  color: white !important;
  border: none !important;
  padding: 14px 36px !important;
  border-radius: 30px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(.4,0,.2,1) !important;
  box-shadow: 0 4px 15px rgba(74,144,217,0.3) !important;
}
.btn-submit:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(74,144,217,0.45) !important;
  background: linear-gradient(135deg, #3a7bc8, #529ce0) !important;
}
.btn-submit i {
  margin-right: 6px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .article-detail {
    padding: 20px !important;
  }
  .article-title {
    font-size: 24px !important;
  }
  .related-grid,
  .related-articles .row {
    grid-template-columns: 1fr !important;
  }
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.article-detail {
  animation: fadeInUp 0.6s ease-out;
}


/* ===== 修复图片显示不完整 ===== */

/* 文章顶部图片 */
.article-image {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 25px auto !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  background: #f8f9fa !important;
}

.article-image img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
  border-radius: 12px !important;
}

/* 文章内容内的所有图片 */
.article-content.optimized-content img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 20px auto !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}

/* 确保图片不会超出容器 */
.article-content.optimized-content,
.article-detail {
  overflow-x: visible !important;
}

/* 视频容器也要限制宽度 */
.article-content video,
.article-detail video {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 20px auto !important;
  border-radius: 8px !important;
}

/* 修复可能的图片裁剪问题 */
img {
  max-width: 100% !important;
  height: auto !important;
}
