/* ====== 一介导图 — 样式表 ====== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #F5F0E8;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* ====== 木纹主题 ====== */
.wood-bg {
  background: linear-gradient(180deg, #DEB887 0%, #D2A56C 40%, #C4955A 100%);
  border-bottom: 2px solid #A67C4A;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.wood-bg-light {
  background: linear-gradient(180deg, #E8D5B7 0%, #DCC7A0 100%);
  border-bottom: 1px solid #C4A87C;
}

/* ====== 头部 ====== */
.header {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 52px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 50;
  position: relative;
}

.header-title {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
  white-space: nowrap;
}

.header-subtitle {
  font-size: 13px;
  opacity: 0.85;
  white-space: nowrap;
}

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* ====== 按钮（旧 btn-header 已废弃，由 btn-tool-wood 替代） ====== */

/* ====== 工具栏（统一单行） ====== */
.toolbar {
  display: flex;
  align-items: center;
  padding: 0 10px;
  height: 40px;
  gap: 4px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  overflow-x: auto;
  overflow-y: hidden;
  z-index: 40;
  transition: height 0.25s ease, padding 0.25s ease, opacity 0.2s ease;
}

.toolbar::-webkit-scrollbar {
  height: 0;
}

.toolbar-sep {
  width: 1px;
  height: 18px;
  background: #C4A87C;
  margin: 0 3px;
  flex-shrink: 0;
}

.toolbar-sep-wood {
  background: rgba(255,255,255,0.35);
}

.zoom-label {
  font-size: 11px;
  color: #fff;
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ====== 工具栏木纹按钮（覆盖默认 btn-tool 浅色配色） ====== */
.btn-tool-wood {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.15);
  padding: 2px 8px;
  font-size: 11px;
}
.btn-tool-wood:hover {
  background: rgba(255,255,255,0.35);
  border-color: rgba(255,255,255,0.55);
}

/* 通用 btn-tool 紧凑模式 */
.btn-tool {
  padding: 2px 7px;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 5px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}

.btn-tool:hover {
  background: rgba(255,255,255,0.35);
  border-color: rgba(255,255,255,0.55);
}

.btn-tool:active {
  transform: scale(0.96);
}

/* 删除线按钮：用伪元素画线，精准位于 S 正中间 */
.btn-tool-strike {
  position: relative;
}
.btn-tool-strike::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background: #fff;
  pointer-events: none;
}

.btn-tool-danger {
  color: #FFD6D6;
  border-color: rgba(255,180,180,0.4);
}

.btn-tool-danger:hover {
  background: rgba(200,60,40,0.3);
  border-color: rgba(255,180,180,0.6);
}

.btn-tool-color::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: currentColor;
  margin-right: 3px;
  vertical-align: middle;
}

/* ====== 工具栏按钮分组配色（覆盖默认 btn-tool 半透明白底） ====== */

/* 导航/视图 — 靛蓝 #5B7FA5 */
.tool-group-nav {
  background: #5B7FA5 !important;
  border-color: rgba(255,255,255,0.4) !important;
  color: #fff !important;
}
.tool-group-nav:hover {
  background: #4A6D90 !important;
  border-color: rgba(255,255,255,0.6) !important;
}

/* 缩放 — 墨绿 #5A8F7B */
.tool-group-zoom {
  background: #5A8F7B !important;
  border-color: rgba(255,255,255,0.4) !important;
  color: #fff !important;
}
.tool-group-zoom:hover {
  background: #4A7A68 !important;
  border-color: rgba(255,255,255,0.6) !important;
}

/* 节点操作 — 赭石 #B5764A */
.tool-group-node {
  background: #B5764A !important;
  border-color: rgba(255,255,255,0.4) !important;
  color: #fff !important;
}
.tool-group-node:hover {
  background: #9E6540 !important;
  border-color: rgba(255,255,255,0.6) !important;
}

/* 折叠 — 暗紫 #8B6BAE */
.tool-group-fold {
  background: #8B6BAE !important;
  border-color: rgba(255,255,255,0.4) !important;
  color: #fff !important;
}
.tool-group-fold:hover {
  background: #775A98 !important;
  border-color: rgba(255,255,255,0.6) !important;
}

/* 样式 — 暗橙 #C4763A */
.tool-group-style {
  background: #C4763A !important;
  border-color: rgba(255,255,255,0.4) !important;
  color: #fff !important;
}
.tool-group-style:hover {
  background: #A86530 !important;
  border-color: rgba(255,255,255,0.6) !important;
}

/* 文字 — 深青 #4A8C8C */
.tool-group-text {
  background: #4A8C8C !important;
  border-color: rgba(255,255,255,0.4) !important;
  color: #fff !important;
}
.tool-group-text:hover {
  background: #3D7676 !important;
  border-color: rgba(255,255,255,0.6) !important;
}

/* ====== 返回按钮 ====== */
.btn-back {
  padding: 2px 8px;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-back:hover {
  background: rgba(255,255,255,0.35);
}



/* ====== 工具栏折叠动画 ====== */
#main-toolbar {
  transition: height 0.25s ease, padding-top 0.25s ease, padding-bottom 0.25s ease, opacity 0.2s ease;
}

#editor-screen.toolbar-collapsed #main-toolbar {
  height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* 工具栏收起/展开按钮 */
.btn-toggle {
  font-size: 13px;
  padding: 2px 6px;
  flex-shrink: 0;
  font-weight: bold;
}

/* 浮动恢复按钮 */
.toolbar-restore-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 100;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: #5C4B2F;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 0;
  line-height: 1;
}
.toolbar-restore-btn:hover {
  background: #fff;
  transform: scale(1.08);
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}

/* ====== 画布容器 ====== */
#canvas-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #FDFAF3;
}

#mindmap-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#mindmap-canvas:active {
  cursor: grabbing;
}

/* ====== 全局布局 ====== */
.hidden {
  display: none !important;
}

/* ====== 首页文件列表 ====== */
#home-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#empty-hint {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#file-list {
  flex: 1;
  list-style: none;
  padding: 8px 16px;
  overflow-y: auto;
}

#file-list li {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  margin: 4px 0;
  background: #FFFEF9;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  gap: 10px;
}

#file-list li:hover {
  background: #F5E6D0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.file-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.file-name {
  flex: 1;
  font-size: 14px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-date {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}

.file-delete {
  border: none;
  background: none;
  color: #ccc;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.file-delete:hover {
  color: #C0392B;
  background: rgba(192,57,43,0.08);
}

/* ====== 市场卡片 ====== */
.market-entry-card {
  background: linear-gradient(135deg, #FDF8F0 0%, #F8EDD8 100%) !important;
  border: 2px solid #D4A96A !important;
  border-radius: 10px !important;
  padding: 14px 16px !important;
  margin-bottom: 8px !important;
  position: relative;
  overflow: hidden;
}
.market-entry-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #C4955A, #A67C4A);
  border-radius: 4px 0 0 4px;
}
.market-entry-card:hover {
  background: linear-gradient(135deg, #F5E6D0 0%, #ECD8B0 100%) !important;
  box-shadow: 0 3px 12px rgba(180,130,70,0.2) !important;
}

.market-badge {
  font-size: 12px;
  color: #A67C4A;
  background: rgba(196,149,90,0.12);
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
  font-weight: 500;
}

/* ====== 编辑页 ====== */
#editor-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

#editor-screen.hidden {
  display: none !important;
}

/* ====== 节点编辑框 ====== */
.node-editor {
  font-family: inherit;
}

/* ====== 颜色选择器 ====== */
#color-picker-popup {
  animation: popIn 0.15s ease;
}

@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ====== 背景色选择面板 ====== */
#bg-color-picker-popup {
  animation: popIn 0.15s ease;
}

.bg-color-swatch {
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bg-color-swatch:hover {
  transform: scale(1.08);
}

/* ====== 滚动条 ====== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* 文件列表中的 md 图标样式 */
li[data-type="md"] .file-icon {
  color: #5a8a5a;
}

/* ====== 内联格式工具栏 ====== */
.inline-format-toolbar {
  position: fixed;
  z-index: 20001;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  white-space: nowrap;
  border: 1px solid #E0E0E0;
}
.inline-format-toolbar.visible {
  opacity: 1;
  pointer-events: auto;
}
.inline-tool-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #333;
  transition: background 0.12s;
  font-family: inherit;
}
.inline-tool-btn:hover {
  background: #F0F0F0;
}
.inline-tool-btn.active {
  background: #D6E9FF;
  color: #309EFF;
}
.inline-tool-sep {
  width: 1px;
  height: 20px;
  background: #E0E0E0;
  margin: 0 3px;
}
.inline-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #ddd;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.inline-color-dot:hover {
  transform: scale(1.25);
  border-color: #999;
}
.inline-font-btn {
  width: auto;
  min-width: 24px;
  padding: 0 4px;
  height: 26px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  color: #555;
  transition: background 0.12s;
  font-family: inherit;
}
.inline-font-btn:hover {
  background: #F0F0F0;
  color: #309EFF;
}

/* ====== 笔记编辑器模态框 ====== */
.note-editor-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.note-editor-overlay.hidden {
  display: none;
}
.note-editor-dialog {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  width: max(700px, 55vw);
  max-width: 92vw;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.note-editor-header {
  display: flex;
  align-items: center;
}
.note-editor-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.note-editor-textarea {
  width: 100%;
  height: max(200px, 20vh);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  outline: none;
  box-sizing: border-box;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 120px;
}
.note-editor-textarea:empty::before {
  content: "输入备注内容...";
  color: #b0b0b0;
}
.note-editor-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.note-editor-btn {
  padding: 8px 22px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: inherit;
}
.note-editor-btn-cancel {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #e0e0e0;
}
.note-editor-btn-cancel:hover {
  background: #eee;
}
.note-editor-btn-save {
  background: #309EFF;
  color: #fff;
}
.note-editor-btn-save:hover {
  background: #1A8AE6;
}

/* ====== 搜索下拉列表 ====== */
.search-box {
  position: relative;
}

.search-dropdown {
  position: fixed;
  max-height: 400px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  z-index: 2000;
  min-width: 260px;
}

#search-input::placeholder {
  color: rgba(255,255,255,0.5);
}

.search-dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.12s;
  user-select: none;
  -webkit-user-select: none;
}

.search-dropdown-item:last-child {
  border-bottom: none;
}

.search-dropdown-item:hover {
  background: #F0F5FF;
}

.search-item-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-text mark {
  background: #FFE066;
  color: #333;
  border-radius: 2px;
  padding: 0 1px;
}

.search-item-path {
  display: block;
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown-empty {
  padding: 16px 12px;
  font-size: 13px;
  color: #999;
  text-align: center;
}

/* ====== 长按弹出菜单（首页导图卡片） ====== */
.longpress-menu {
  position: fixed;
  z-index: 30000;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
  min-width: 130px;
  animation: menuFadeIn 0.12s ease;
}

.longpress-menu.hidden {
  display: none;
}

.longpress-menu-item {
  padding: 11px 22px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.12s;
  white-space: nowrap;
}

.longpress-menu-item:hover {
  background: #F0F5FF;
  color: #309EFF;
}

.longpress-menu-item:active {
  background: #E0EBFF;
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* ====== 古风模态对话框 ====== */
.gufeng-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: gufengFadeIn 0.2s ease;
}

@keyframes gufengFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.gufeng-modal-dialog {
  background: linear-gradient(180deg, #F5E6CC 0%, #E8D5B0 40%, #DCC7A0 100%);
  border: 2px solid #C8A84E;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.4);
  min-width: 320px;
  max-width: 420px;
  padding: 28px 32px 24px;
  animation: gufengPopIn 0.25s ease;
}

@keyframes gufengPopIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

.gufeng-modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #C8A84E;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 2px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(200,168,78,0.3);
  padding-bottom: 10px;
}

.gufeng-modal-message {
  font-size: 14px;
  color: #5C3D2E;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
  white-space: pre-wrap;
}

.gufeng-modal-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #C8A84E;
  border-radius: 8px;
  background: rgba(255,255,255,0.7);
  color: #5C3D2E;
  font-size: 14px;
  margin-bottom: 20px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gufeng-modal-input:focus {
  border-color: #B8963E;
  box-shadow: 0 0 0 3px rgba(200,168,78,0.2);
}

.gufeng-modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.gufeng-modal-btn {
  padding: 8px 28px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s;
  letter-spacing: 1px;
}

.gufeng-modal-btn-cancel {
  background: rgba(255,255,255,0.5);
  border-color: #B8A080;
  color: #8B7355;
}

.gufeng-modal-btn-cancel:hover {
  background: rgba(255,255,255,0.75);
  border-color: #A08060;
}

.gufeng-modal-btn-confirm {
  background: linear-gradient(180deg, #D4B060 0%, #C8A84E 100%);
  border-color: #A08830;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.gufeng-modal-btn-confirm:hover {
  background: linear-gradient(180deg, #DEC470 0%, #D0B058 100%);
  border-color: #B09840;
}

/* ====== MD 导入编辑器（古风风格） ====== */
.md-import-editor-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: gufengFadeIn 0.2s ease;
}

.md-import-editor-dialog {
  background: linear-gradient(180deg, #F5E6CC 0%, #E8D5B0 40%, #DCC7A0 100%);
  border: 2px solid #C8A84E;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.4);
  width: 80vw;
  height: 70vh;
  min-width: 400px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  box-sizing: border-box;
  animation: gufengPopIn 0.25s ease;
}

.md-import-editor-title {
  font-size: 18px;
  font-weight: bold;
  color: #C8A84E;
  text-align: center;
  letter-spacing: 2px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(200,168,78,0.3);
  padding-bottom: 10px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.md-import-editor-textarea {
  flex: 1;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #C8A84E;
  border-radius: 8px;
  background: rgba(255,255,255,0.7);
  color: #5C3D2E;
  font-size: 14px;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  line-height: 1.8;
  resize: none;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.md-import-editor-textarea:focus {
  border-color: #B8963E;
  box-shadow: 0 0 0 3px rgba(200,168,78,0.2);
}

.md-import-editor-textarea::placeholder {
  color: #B8A080;
  font-style: italic;
}

.md-import-editor-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
  flex-shrink: 0;
}

.md-import-editor-btn {
  padding: 10px 32px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s;
  letter-spacing: 2px;
}

.md-import-editor-btn-cancel {
  background: rgba(255,255,255,0.5);
  border-color: #B8A080;
  color: #8B7355;
}

.md-import-editor-btn-cancel:hover {
  background: rgba(255,255,255,0.75);
  border-color: #A08060;
}

.md-import-editor-btn-confirm {
  background: linear-gradient(180deg, #D4B060 0%, #C8A84E 100%);
  border-color: #A08830;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.md-import-editor-btn-confirm:hover {
  background: linear-gradient(180deg, #DEC470 0%, #D0B058 100%);
  border-color: #B09840;
}

/* ====== 文件夹选择列表（古风对话框内，移动导图/文件夹） ====== */
.folder-picker-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
  border: 1px solid rgba(200,168,78,0.3);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  padding: 6px 0;
}

.folder-picker-item {
  padding: 9px 14px;
  font-size: 14px;
  color: #5C3D2E;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
  -webkit-user-select: none;
  border-bottom: 1px solid rgba(200,168,78,0.12);
}

.folder-picker-item:last-child {
  border-bottom: none;
}

.folder-picker-item:hover {
  background: rgba(200,168,78,0.15);
}

.folder-picker-item.selected {
  background: rgba(200,168,78,0.22);
  color: #3D2A16;
  font-weight: 500;
}

.folder-picker-item.selected::before {
  content: '☑️ ';
  margin-right: 4px;
}

.expand-arrow {
  display: inline-block;
  width: 16px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  color: #C8A84E;
  font-size: 12px;
  flex-shrink: 0;
}
.expand-arrow:hover {
  color: #A08830;
}

.expand-arrow-placeholder {
  display: inline-block;
  width: 16px;
  flex-shrink: 0;
}

.folder-picker-children {
  /* 由 JS 控制 display:none/block */;
}

/* ====== 导入格式选择对话框（古风风格） ====== */
.import-format-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: gufengFadeIn 0.2s ease;
}

.import-format-dialog {
  background: linear-gradient(180deg, #F5E6CC 0%, #E8D5B0 40%, #DCC7A0 100%);
  border: 2px solid #C8A84E;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.4);
  padding: 28px 32px 24px;
  animation: gufengPopIn 0.25s ease;
  min-width: 400px;
  max-width: 500px;
}

.import-format-title {
  font-size: 18px;
  font-weight: bold;
  color: #C8A84E;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 2px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(200,168,78,0.3);
  padding-bottom: 10px;
}

.import-format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.import-format-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(200, 168, 78, 0.35);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.import-format-card:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: #C8A84E;
  box-shadow: 0 4px 16px rgba(200, 168, 78, 0.25);
  transform: translateY(-2px);
}

.import-format-card:active {
  transform: scale(0.96);
}

.import-format-icon {
  font-size: 28px;
  line-height: 1;
}

.import-format-name {
  font-size: 13px;
  font-weight: 600;
  color: #5C3D2E;
}

.import-format-ext {
  font-size: 11px;
  color: #B8963E;
  font-family: monospace;
}

.import-format-cancel-btn {
  display: block;
  margin: 0 auto;
  padding: 8px 36px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #B8A080;
  background: rgba(255,255,255,0.5);
  color: #8B7355;
  letter-spacing: 1px;
  transition: all 0.15s;
}

.import-format-cancel-btn:hover {
  background: rgba(255,255,255,0.75);
  border-color: #A08060;
}
