
/* 1. 容器基础样式 */
.htmlUEditor {
  line-height: 1.8;
  font-size: 16px;
  color: #333;
}

/* 2. 标题层级样式 */
.htmlUEditor h1,
.htmlUEditor h2,
.htmlUEditor h3,
.htmlUEditor h4,
.htmlUEditor h5,
.htmlUEditor h6 {
  margin-top: 20px;
  margin-bottom: 12px;
  font-weight: bold;
  line-height: 1.4;
}

.htmlUEditor h1 {
  font-size: 28px;
}

.htmlUEditor h2 {
  font-size: 24px;
}

.htmlUEditor h3 {
  font-size: 20px;
}

.htmlUEditor h4 {
  font-size: 18px;
}

/* 3. 段落样式 */
.htmlUEditor p {
  margin: 0 0 15px 0;
  text-align: justify;
}

/* 4. 列表样式 */
.htmlUEditor ul,
.htmlUEditor ol {
  margin: 15px 0;
  padding-left: 25px;
  width: 100% !important;
  /* 覆盖UEditor的固定宽度 */
  max-width: 100%;
}

.htmlUEditor li {
  list-style-position: outside;
  float: none !important;
  /* 取消导航样式的浮动 */
  width: auto !important;
  /* 恢复自适应宽度 */
  text-align: left !important;
  /* 左对齐 */
  height: auto !important;
  /* 恢复自适应高度 */
  border: none !important;
  /* 移除边框 */
  margin: 8px 0;
  /* 统一间距 */
  line-height: 1.6;
  /* 行高 */
  position: static !important;
  /* 取消定位 */
}

.htmlUEditor ul>li {
  list-style-type: disc;
  /* 无序列表：圆点 */
}

.htmlUEditor ol>li {
  list-style-type: decimal;
  /* 有序列表：数字 */
}

/* 5. 处理li内部嵌套p标签（UEditor常见结构） */
.htmlUEditor li>p {
  margin: 0;
  /* 移除p的上下间距 */
  line-height: inherit;
  /* 继承父级行高 */
  display: inline;
  /* 让p不独占一行 */
}

/* 6. 表格样式 */
.htmlUEditor table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  border: 1px solid #ddd;
}

.htmlUEditor th,
.htmlUEditor td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.htmlUEditor th {
  background-color: #f5f7fa;
  font-weight: bold;
}

/* 7. 强调文本 */
.htmlUEditor strong {
  font-weight: bold;
  color: #000;
}

.htmlUEditor em {
  font-style: italic;
}

/* 8. 链接样式 */
.htmlUEditor a {
  color: #4E6EF2;
  text-decoration: none;
}

.htmlUEditor a:hover {
  text-decoration: underline;
}

/* 9. 分隔线 */
.htmlUEditor hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 20px 0;
}

/* 10. 引用块 */
.htmlUEditor blockquote {
  border-left: 4px solid #4E6EF2;
  padding-left: 15px;
  margin: 15px 0;
  color: #666;
  font-style: italic;
}

/* 11. 图片样式 */
.htmlUEditor img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* 12. 处理UEditor特殊类名 */
.htmlUEditor .list-paddingleft-2,
.htmlUEditor .list-paddingleft-3 {
  padding-left: 30px;
}

/* 13. 代码块样式 */
.htmlUEditor pre {
  background-color: #f5f7fa;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 15px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  margin: 15px 0;
}

.htmlUEditor code {
  background-color: #f5f7fa;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

/* 14. 视频和多媒体 */
.htmlUEditor video,
.htmlUEditor iframe {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 15px auto;
}