/* VSCode 风格代码块（EnlighterJS） */
/* 注意：不要全局修改 body 避免影响站点整体布局 */

/* 代码块容器 */
.lentasy-code-default-block {
  max-width: 100%;
  margin: 0 auto 24px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .04) inset;
}

/* 顶部标题栏 */
.lentasy-code-default-titlebar {
  height: 34px;
  background: #3c3c3c;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
}

.lentasy-code-default-controls {
  display: flex;
  gap: 8px;
  margin-right: 8px;
}

.lentasy-code-default-window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.lentasy-code-default-window-dot.red {
  background: #ff5f56;
}

.lentasy-code-default-window-dot.yellow {
  background: #ffbd2e;
}

.lentasy-code-default-window-dot.green {
  background: #27c93f;
}

.lentasy-code-default-filename {
  flex: 1;
  text-align: center;
  color: #ccc;
  font-size: 12px;
  opacity: .9;
}

.lentasy-code-default-actions {
  display: flex;
  gap: 8px;
}

.lentasy-code-default-icon,
.lentasy-copy-btn {
  border: 1px solid rgba(255, 255, 255, .1);
  background: transparent;
  color: #ddd;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.lentasy-code-default-icon:hover,
.lentasy-copy-btn:hover {
  background: rgba(255, 255, 255, .06);
}

/* VSCode 顶部标签栏（可选展示） */
.vscode-tabbar {
  height: 34px;
  background: #2d2d2d;
  display: flex;
  align-items: flex-end;
  padding: 0 8px;
  gap: 4px;
  border-bottom: 1px solid #000;
}

.vscode-tabbar .tab {
  background: transparent;
  color: #aaa;
  padding: 8px 12px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.vscode-tabbar .tab.active {
  background: #1e1e1e;
  color: #fff;
}

.vscode-tabbar {
  display: none;

}

/* 编辑器区域容器 */
.lentasy-code-default-editor {
  background: #1e1e1e;
}

/* 去掉编辑器默认 margin */
.lentasy-code-default-editor .enlighter-default,
.lentasy-code-default-editor pre {
  margin: 0 !important;
}

/* 包裹高亮后的容器 */
.lentasy-code-default-editor .EnlighterJS {
  border-radius: 0;
  scrollbar-gutter: stable both-edges;
  overflow-y: auto;
}

/* 状态栏 */
.vscode-statusbar {
  height: 22px;
  background: #0e639c;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  font-size: 12px;
}

.vscode-statusbar span {
  color: #fff;
}

.vscode-statusbar .status-right {
  margin-left: auto;
  opacity: .9;
}

/* Enlighter：让行号更像 VSCode 边栏 */
.EnlighterJS {
  background: #1e1e1e !important;
}

.EnlighterJS .enlighter-linenumbers {
  background: #252526 !important;
  color: #858585 !important;
  border-right: 1px solid #000 !important;
}

.EnlighterJS .enlighter-codeline {
  padding-left: 12px !important;
}

/* 隐藏默认工具栏，保持简洁 */
.EnlighterJS .enlighter-toolbar,
.enlighter-toolbar {
  display: none !important;
}

/* 字体、字号等 */
.enlighter-default {
  font-family: 'Cascadia Code', 'JetBrains Mono', 'Source Code Pro', 'Liberation Mono', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
}

/* 行号栏 */
.enlighter-linenumbers div.enlighter>div::before {
  background: #252526;
  color: #858585;
  border-right: 1px solid #000;
  width: 40px;
  min-width: 40px;
  text-align: right;
  padding-right: 10px;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

/* Hover 行效果 */
.enlighter-hover div.enlighter>div:hover {
  background: #2a2d2e;
}

.enlighter-hover.enlighter-linenumbers div.enlighter>div:hover::before {
  background: #2a2d2e;
  color: #c5c5c5;
}

/* Dracula 主题微调 */
.enlighter-t-dracula .enlighter span {
  font-size: 15px;
}

.enlighter-t-dracula div.enlighter>div {
  background: #1F1F1F;
}

.enlighter-t-dracula.enlighter-linenumbers div.enlighter>div::before {
  color: #6E7681;
}

/* 滚动条样式（WebKit） */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-thumb {
  background-color: #ffffff83;
}

::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  background: #1F1F1F;
}

/* 限制最大高度的默认样式（由 JS 动态调整高度） */
.enlighter-default .enlighter {
  display: block;
  max-height: 500px;
  /* 兜底 */
  overflow: auto;
  background: #1F1F1F;
}
.enlighter-t-dracula .enlighter span{
      font-size: 1.2em!important;
}
/* 编辑器态输入框样式，使“代码内容”直接在高亮框内编辑 */
.lentasy-code-editor-input {
  width: 100%;
  display: block;
  box-sizing: border-box;
  background: #1e1e1e;
  color: #d4d4d4;
  border: none;
  outline: none;
  resize: vertical;
  padding: 12px 16px;
  font-family: 'Cascadia Code', 'JetBrains Mono', 'Source Code Pro', 'Liberation Mono', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  caret-color: #ffffff;
}

/* 与 Enlighter 视觉统一的滚动条（编辑器态） */
.lentasy-code-editor-input::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.lentasy-code-editor-input::-webkit-scrollbar-thumb {
  background-color: #ffffff83;
}
.lentasy-code-editor-input::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  background: #1F1F1F;
}

/* 取消可能的默认外边距差异，确保紧贴容器 */
.lentasy-code-default-editor .lentasy-code-editor-input {
  margin: 0;
}
