.editor-content {
  font-family: "SF Pro", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.editor-content ol {
  padding-left: 0 !important;
  margin: 0.5em 0 !important;
  list-style: none !important;
  counter-reset: tiptap-list-counter;
}

.editor-content ol > li {
  position: relative !important;
  display: block !important;
  padding-left: 1.5em !important;
  margin: 0.25em 0 !important;
  counter-increment: tiptap-list-counter;
}

.editor-content ol > li::before {
  position: absolute !important;
  left: 0 !important;
  width: 1.5em !important;
  font-weight: normal !important;
  color: #333 !important;
  text-align: right !important;
  content: counter(tiptap-list-counter) ". " !important;
}

.editor-content ul {
  padding-left: 0;
  margin: 0.5em 0;
  list-style: none;
}

.editor-content ul > li {
  position: relative;
  display: block;
  padding-left: 1em;
  margin: 0.25em 0;
}

.editor-content ul > li::before {
  position: absolute;
  left: 0;
  color: #333;
  content: "•";
}

/* 嵌套列表 */
.editor-content ul ul > li::before {
  content: "◦";
}

.editor-content ul ul ul > li::before {
  content: "▪";
}

.editor-content ol ol > li::before {
  content: counter(tiptap-list-counter, lower-alpha) ". ";
}

.editor-content ol ol ol > li::before {
  content: counter(tiptap-list-counter, lower-roman) ". ";
}

/* 简洁版待办事项样式 */
.editor-content ul[data-type="taskList"] {
  padding: 0 !important;
  margin: 1em 0 !important;
  list-style: none !important;
}

.editor-content ul[data-type="taskList"] li {
  display: flex !important;
  align-items: flex-start !important;
  padding: 0.5em !important;
  margin: 0.5em 0 !important;
  list-style: none !important;
}

.editor-content ul[data-type="taskList"] li::before {
  content: "" !important;
}

/* 隐藏原生复选框 */
.editor-content ul[data-type="taskList"] li input[type="checkbox"] {
  display: none !important;
}

/* 自定义复选框 */
.editor-content ul[data-type="taskList"] li label {
  display: block !important;
  margin-top: 0.1em !important;
  margin-right: 0.5em !important;
  cursor: pointer !important;
}

.editor-content ul[data-type="taskList"] li label span {
  position: relative !important;
  display: block !important;
  width: 1.1em !important;
  height: 1.1em !important;
  background: white !important;
  border: 1px solid #ccc !important;
  border-radius: 3px !important;
  transition: all 0.2s ease !important;
}

/* 已完成状态 */
.editor-content ul[data-type="taskList"] li[data-checked="true"] label span {
  background: #4caf50 !important;
  border-color: #4caf50 !important;
}

.editor-content
  ul[data-type="taskList"]
  li[data-checked="true"]
  label
  span::after {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  font-size: 0.7em !important;
  font-weight: bold !important;
  color: white !important;
  content: "✓" !important;
  transform: translate(-50%, -50%) !important;
}

/* 文本内容 */
.editor-content ul[data-type="taskList"] li > div {
  flex: 1 !important;
  line-height: normal;
}

.editor-content ul[data-type="taskList"] li p {
  margin: 0 !important;
}

.editor-content ul[data-type="taskList"] li[data-checked="true"] p {
  color: #999 !important;
  text-decoration: line-through !important;
}

/* 链接样式 */
.editor-content a {
  color: #409eff;
  text-decoration: underline;
  cursor: pointer;
}

.editor-content a:hover {
  color: #3375b9;
}

/* 表格样式 */
.editor-content table {
  width: 100%;
  margin: 0;
  overflow: hidden;
  vertical-align: middle;
  table-layout: fixed;
  border-collapse: collapse;
}

.editor-content td,
th {
  position: relative;
  box-sizing: border-box;
  min-width: 1em;
  padding: 6px 8px;
  vertical-align: top;
  border: 1px solid #e0e0e0;
  word-wrap: break-word;
}

.editor-content th {
  /* font-weight: bold; */
  text-align: left;
  background-color: #eee;
}

.editor-content .selectedCell::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  content: "";
  background: #ccc;
}

.editor-content .column-resize-handle {
  position: absolute;
  top: 0;
  right: -2px;
  bottom: -2px;
  width: 4px;
  pointer-events: none;
  background-color: blue;
}

.editor-content .tableWrapper {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.editor-content .resize-cursor {
  cursor: ew-resize;
  cursor: col-resize;
}

.editor-content h1 {
  margin: 0.67em 0;
  font-size: 2em;
}

.editor-content h2 {
  margin: 0.75em 0;
  font-size: 1.5em;
}

.editor-content h3 {
  margin: 0.83em 0;
  font-size: 1.17em;
}

.editor-content blockquote {
  padding-left: 1em;
  margin: 1em 0;
  font-style: italic;
  border-left: 3px solid #e0e0e0;
}

.editor-content code {
  padding: 0.1em 0.2em;
  font-size: 0.85em;
  background: #f5f5f5;
  border-radius: 3px;
}

.editor-content pre {
  padding: 0.75em 1em;
  margin: 1em 0;
  overflow-x: auto;
  background: #f8f8f8;
  border-radius: 5px;
}

.editor-content img {
  max-width: 100%;
  height: auto;
}

.editor-content video {
  object-fit: cover;
}
