/* ========== 灵动 Web 前端 UI 优化 ========== */
:root {
  --ld-brand: #10a37f;
  --ld-brand-light: #e8f7f2;
  --ld-brand-dark: #0d8a6a;
  --ld-surface: #ffffff;
  --ld-bg: #f4f6f8;
  --ld-border: #e5e9ef;
  --ld-text: #1f2937;
  --ld-muted: #6b7280;
  --ld-radius: 14px;
  --ld-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --ld-input-bottom: calc(var(--moy-copyright-height, 44px) + 10px);
}

/* ----- 底部 MOY 版权栏（保留彩虹动态效果） ----- */
#moy-copyright-bar.moy-copyright-bar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(64, 115, 250, 0.22) !important;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
  min-height: 40px !important;
  padding: 8px 16px !important;
}
#moy-copyright-bar .moy-copyright-line {
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  letter-spacing: 0.03em !important;
  color: #ff3366;
  -webkit-text-stroke: 0.4px rgba(0, 0, 0, 0.12);
  background: linear-gradient(
    90deg,
    #ff0040 0%,
    #ff6600 14%,
    #ffcc00 28%,
    #33ff66 42%,
    #00ccff 56%,
    #3366ff 70%,
    #9933ff 84%,
    #ff0040 100%
  ) !important;
  background-size: 300% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: moy-rainbow-flow 5s linear infinite, moy-neon-pulse 2.5s ease-in-out infinite alternate !important;
  filter: none !important;
  opacity: 1 !important;
}
@keyframes moy-rainbow-flow {
  0% { background-position: 0 50%; }
  100% { background-position: 300% 50%; }
}
@keyframes moy-neon-pulse {
  0% {
    filter: drop-shadow(0 0 2px rgba(255, 80, 120, 0.6)) drop-shadow(0 0 8px rgba(80, 180, 255, 0.4));
    opacity: 0.94;
  }
  100% {
    filter: drop-shadow(0 0 5px rgba(255, 220, 80, 0.9)) drop-shadow(0 0 12px rgba(200, 80, 255, 0.6));
    opacity: 1;
  }
}
.theme-dark #moy-copyright-bar.moy-copyright-bar,
body.theme-dark #moy-copyright-bar.moy-copyright-bar {
  background: rgba(17, 24, 39, 0.94) !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* ----- 备案信息（ICP / 公安） ----- */
.box-chat .chat-input .copyright,
.chat-input .copyright,
.module-search .search-input .copyright,
.module-mind .chat-input .copyright {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto !important;
  min-height: 0;
  padding: 7px 16px 8px !important;
  margin: 8px 0 0 !important;
  font-size: 11px !important;
  color: #94a3b8 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.02em;
  background: rgba(248, 250, 252, 0.92) !important;
  border-top: 1px solid #eef1f5 !important;
  border-radius: 0 0 12px 12px;
  opacity: 1;
}
.box-chat .chat-input .copyright > div,
.chat-input .copyright > div {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 12px;
  max-width: 100%;
}
.box-chat .chat-input .copyright a,
.chat-input .copyright a {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  margin-left: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  color: #94a3b8 !important;
  text-decoration: none !important;
  font-size: inherit !important;
  font-weight: 400 !important;
  white-space: nowrap;
  transition: color 0.15s ease;
  cursor: pointer;
}
.box-chat .chat-input .copyright a:empty,
.chat-input .copyright a:empty,
.box-chat .chat-input .copyright a:not([href]):not(:has(img)),
.chat-input .copyright a:not([href]):not(:has(img)) {
  display: none !important;
}
.box-chat .chat-input .copyright a.ld-beian-sep::before,
.chat-input .copyright a.ld-beian-sep::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 10px;
  margin-right: 12px;
  background: #d1d5db;
  vertical-align: middle;
  opacity: 0.9;
}
.box-chat .chat-input .copyright a img,
.chat-input .copyright a img {
  width: 13px !important;
  height: 13px !important;
  margin: 0 !important;
  position: static !important;
  top: auto !important;
  opacity: 0.92;
  flex-shrink: 0;
}
.box-chat .chat-input .copyright a:hover,
.chat-input .copyright a:hover {
  color: #64748b !important;
  background: none !important;
  text-decoration: none !important;
}
.theme-dark .box-chat .chat-input .copyright,
.theme-dark .chat-input .copyright,
body.theme-dark .box-chat .chat-input .copyright,
body.theme-dark .chat-input .copyright {
  color: rgba(255, 255, 255, 0.42) !important;
  background: rgba(15, 23, 42, 0.35) !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}
.theme-dark .box-chat .chat-input .copyright a,
.theme-dark .chat-input .copyright a,
body.theme-dark .box-chat .chat-input .copyright a,
body.theme-dark .chat-input .copyright a {
  color: rgba(255, 255, 255, 0.42) !important;
}
.theme-dark .box-chat .chat-input .copyright a.ld-beian-sep::before,
.theme-dark .chat-input .copyright a.ld-beian-sep::before,
body.theme-dark .box-chat .chat-input .copyright a.ld-beian-sep::before,
body.theme-dark .chat-input .copyright a.ld-beian-sep::before {
  background: rgba(255, 255, 255, 0.18);
}
.theme-dark .box-chat .chat-input .copyright a:hover,
.theme-dark .chat-input .copyright a:hover,
body.theme-dark .box-chat .chat-input .copyright a:hover,
body.theme-dark .chat-input .copyright a:hover {
  color: rgba(255, 255, 255, 0.62) !important;
}

/* ----- 对话 / 搜索 / 思维导图 输入框 ----- */
.box-chat .chat-input,
.module-mind .chat-input,
.module-search .search-input {
  z-index: 100 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}
body.moy-copyright-active .module-mind .chat-input {
  bottom: var(--ld-input-bottom) !important;
  padding-bottom: 8px !important;
}
.box-chat .chat-input .input,
.module-search .search-input .input,
.module-mind .chat-input .input,
.box-prompt .words-input {
  background: var(--ld-surface) !important;
  border: 1px solid var(--ld-border) !important;
  border-radius: var(--ld-radius) !important;
  box-shadow: var(--ld-shadow) !important;
  overflow: visible !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.box-chat .chat-input .input:focus-within,
.module-search .search-input .input:focus-within,
.module-mind .chat-input .input:focus-within,
.box-prompt .words-input:focus-within {
  border-color: rgba(16, 163, 127, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.12), var(--ld-shadow) !important;
}
.box-chat .chat-input .input .el-textarea__inner,
.module-search .search-input .input .el-textarea__inner,
.module-mind .chat-input .input .el-textarea__inner,
.box-prompt .words-input .el-textarea__inner,
.box-prompt .words-input textarea {
  min-height: 52px !important;
  max-height: 200px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: var(--ld-text) !important;
  opacity: 1 !important;
  visibility: visible !important;
  resize: none !important;
  padding: 10px 52px 52px 15px !important;
}
.box-chat .chat-input .input .el-textarea__inner::placeholder,
.module-search .search-input .input .el-textarea__inner::placeholder,
.module-mind .chat-input .input .el-textarea__inner::placeholder {
  color: #9ca3af !important;
}
.box-chat .chat-input .input .btn-send,
.box-chat .chat-input .btn-send,
.theme-light .box-chat .chat-input .input .btn-send,
.theme-light .box-chat .chat-input .btn-send,
.module-search .search-input .input .btn-send,
.module-mind .chat-input .input .btn-send {
  position: absolute !important;
  right: 8px !important;
  bottom: 8px !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--ld-brand) 0%, var(--ld-brand-dark) 100%) !important;
  color: #fff !important;
  font-size: 0 !important;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(16, 163, 127, 0.38) !important;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0;
  z-index: 5;
}
.box-chat .chat-input .input .btn-send [class*="el-icon"],
.box-chat .chat-input .btn-send [class*="el-icon"],
.box-chat .chat-input .input .btn-send .svg-icon,
.box-chat .chat-input .btn-send .svg-icon,
.box-chat .chat-input .input .btn-send svg,
.box-chat .chat-input .btn-send svg,
.module-search .search-input .input .btn-send [class*="el-icon"],
.module-mind .chat-input .input .btn-send [class*="el-icon"] {
  font-size: 18px !important;
  color: #fff !important;
  fill: currentColor !important;
  margin: 0 !important;
}
.box-chat .chat-input .input .btn-send:hover:not(:disabled),
.box-chat .chat-input .btn-send:hover:not(:disabled),
.theme-light .box-chat .chat-input .input .btn-send:hover:not(:disabled),
.theme-light .box-chat .chat-input .btn-send:hover:not(:disabled),
.module-search .search-input .input .btn-send:hover:not(:disabled),
.module-mind .chat-input .input .btn-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 163, 127, 0.45) !important;
  background: linear-gradient(135deg, #12b38a 0%, var(--ld-brand) 100%) !important;
  color: #fff !important;
}
.box-chat .chat-input .input .btn-send:active:not(:disabled),
.box-chat .chat-input .btn-send:active:not(:disabled),
.module-search .search-input .input .btn-send:active:not(:disabled),
.module-mind .chat-input .input .btn-send:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(16, 163, 127, 0.3) !important;
}
.box-chat .chat-input .input .btn-send:disabled,
.box-chat .chat-input .btn-send:disabled,
.module-search .search-input .input .btn-send:disabled,
.module-mind .chat-input .input .btn-send:disabled {
  opacity: 0.55;
  box-shadow: none !important;
}
.theme-dark .box-chat .chat-input .input .btn-send,
body.theme-dark .box-chat .chat-input .input .btn-send,
.theme-dark .box-chat .chat-input .btn-send,
body.theme-dark .box-chat .chat-input .btn-send,
.theme-dark .module-search .search-input .input .btn-send,
body.theme-dark .module-search .search-input .input .btn-send,
.theme-dark .module-mind .chat-input .input .btn-send,
body.theme-dark .module-mind .chat-input .input .btn-send {
  background: linear-gradient(135deg, var(--ld-brand) 0%, var(--ld-brand-dark) 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 10px rgba(16, 163, 127, 0.32) !important;
}
.theme-dark .box-chat .chat-input .input .btn-send:hover:not(:disabled),
body.theme-dark .box-chat .chat-input .input .btn-send:hover:not(:disabled),
.theme-dark .box-chat .chat-input .btn-send:hover:not(:disabled),
body.theme-dark .box-chat .chat-input .btn-send:hover:not(:disabled) {
  background: linear-gradient(135deg, #12b38a 0%, var(--ld-brand) 100%) !important;
  color: #fff !important;
}

/* 思维导图底部输入 */
.module-mind .chat-input {
  left: 0;
  right: 0;
  padding: 0 24px 12px !important;
}
.module-mind .chat-input .input {
  max-width: 920px;
  margin: 0 auto !important;
}

/* ----- 创建新会话按钮 ----- */
.module-chat .sub-sidebar .module-header .btn-group-add,
.sub-sidebar .btn-group-add,
.btn-create {
  background: linear-gradient(135deg, var(--ld-brand-light) 0%, #fff 100%) !important;
  border: 1px solid rgba(16, 163, 127, 0.35) !important;
  border-radius: 10px !important;
  color: var(--ld-brand-dark) !important;
  font-weight: 600 !important;
  height: 42px !important;
  box-shadow: 0 2px 8px rgba(16, 163, 127, 0.1);
  transition: all 0.2s !important;
  transform: none !important;
  justify-content: center !important;
  text-align: center !important;
}
.module-chat .sub-sidebar .module-header .btn-group-add .icon,
.sub-sidebar .btn-group-add .icon,
.btn-create .icon {
  display: none !important;
}
.module-chat .sub-sidebar .module-header .btn-group-add:hover,
.sub-sidebar .btn-group-add:hover,
.btn-create:hover {
  background: linear-gradient(135deg, var(--ld-brand) 0%, var(--ld-brand-dark) 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(16, 163, 127, 0.3);
}

/* ----- 用户消息气泡 ----- */
.theme-light .box-chat .chat-msg.style-chat .msg-list .row-user .msg-item .text {
  background: linear-gradient(135deg, #12b886 0%, #0d9668 100%) !important;
  color: #fff !important;
  border-radius: var(--ld-radius) !important;
  box-shadow: 0 2px 10px rgba(16, 163, 127, 0.25);
  padding: 12px 16px !important;
  line-height: 1.6 !important;
}
.theme-light .box-chat .chat-msg.style-chat .msg-list .row-ai .msg-item .text,
.theme-light .box-chat .chat-msg.style-chat .msg-list.welcome .msg-item .text {
  background: var(--ld-surface) !important;
  border: 1px solid var(--ld-border) !important;
  border-radius: var(--ld-radius) !important;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.05);
  color: var(--ld-text) !important;
}

/* ----- AI 频道标签（织梦者等） ----- */
.chat-ai-list {
  margin-top: 12px !important;
  margin-bottom: 6px !important;
}
.chat-ai-list .tab-list {
  background: var(--ld-surface) !important;
  border: 1px solid var(--ld-border) !important;
  border-radius: 999px !important;
  padding: 4px 6px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  height: auto !important;
  min-height: 40px !important;
  overflow: visible !important;
  align-items: center !important;
  gap: 4px !important;
}
.chat-ai-list .tab-list .tab-item {
  border-radius: 999px !important;
  border: none !important;
  padding: 8px 20px !important;
  height: auto !important;
  min-height: 32px !important;
  line-height: 1.35 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap !important;
}
.chat-ai-list .tab-list .tab-item:first-child,
.chat-ai-list .tab-list .tab-item:last-child {
  border-radius: 999px !important;
}
.chat-ai-list .tab-list .tab-item.active {
  background: linear-gradient(135deg, var(--ld-brand) 0%, var(--ld-brand-dark) 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(16, 163, 127, 0.3);
}

/* ----- 主区域布局：防止输入框被裁切 ----- */
body.moy-copyright-active .main-container .main-wrapper.box-chat,
body.moy-copyright-active .main-wrapper.box-chat {
  bottom: var(--moy-copyright-height, 44px) !important;
  box-sizing: border-box !important;
}
.main-container .main-wrapper.box-chat,
.main-wrapper.box-chat {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.main-wrapper.box-chat .chat-msg {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
}
.main-wrapper.box-chat .chat-msg .el-scrollbar {
  height: 100% !important;
}
.main-wrapper.box-chat .chat-msg .msg-list {
  padding-bottom: 28px !important;
}
.main-wrapper.box-chat .chat-input {
  flex-shrink: 0 !important;
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  background: linear-gradient(to top, rgba(244, 246, 248, 0.96) 55%, transparent 100%) !important;
  padding: 10px 20px 6px !important;
}
body.moy-copyright-active .main-wrapper.box-chat .chat-input {
  bottom: auto !important;
  padding-bottom: 6px !important;
}
.main-wrapper.box-chat .chat-input .input {
  margin-bottom: 6px !important;
  max-width: 820px;
}
.module-write .main-wrapper.box-chat .chat-input,
.module-cosplay .main-wrapper.box-chat .chat-input {
  background: linear-gradient(to top, #f4f6f8 0%, rgba(244, 246, 248, 0.85) 70%, transparent 100%) !important;
  border-top: 1px solid rgba(16, 163, 127, 0.08);
}
.module-draw .main-wrapper.box-chat .chat-msg .msg-list {
  padding-bottom: 40px !important;
}

/* 绘画模块底部：图片分类下拉向上展开，避免被页面底部遮挡 */
.module-draw .module-footer .el-select.cate {
  vertical-align: middle;
}
.patch-draw-cate-dropdown.el-select-dropdown {
  z-index: 5000 !important;
  margin-bottom: 8px !important;
}
.patch-draw-cate-dropdown.el-select-dropdown[x-placement^="top"] {
  margin-top: 0 !important;
  margin-bottom: 10px !important;
}
.patch-draw-cate-dropdown.el-popper[x-placement^="top"] .popper__arrow {
  bottom: -6px !important;
  top: auto !important;
  border-top-color: #fff !important;
  border-bottom-color: transparent !important;
}
.theme-dark .patch-draw-cate-dropdown.el-popper[x-placement^="top"] .popper__arrow {
  border-top-color: #262626 !important;
}

/* AI擂台：左右 AI 选择下拉向上展开 */
.patch-pk-ai-dropdown.el-select-dropdown {
  z-index: 5000 !important;
  margin-bottom: 8px !important;
}
.patch-pk-ai-dropdown.el-select-dropdown[x-placement^="top"] {
  margin-top: 0 !important;
  margin-bottom: 10px !important;
}
.patch-pk-ai-dropdown.el-popper[x-placement^="top"] .popper__arrow {
  bottom: -6px !important;
  top: auto !important;
  border-top-color: #fff !important;
  border-bottom-color: transparent !important;
}
.theme-dark .patch-pk-ai-dropdown.el-popper[x-placement^="top"] .popper__arrow {
  border-top-color: #262626 !important;
}

/* 思维导图模块 */
.module-mind {
  background: var(--ld-bg) !important;
  border-radius: 12px !important;
}
.module-mind .minder-tools {
  width: auto !important;
  max-width: calc(100% - 40px) !important;
  min-height: 44px !important;
  height: auto !important;
  background: var(--ld-surface) !important;
  border: 1px solid var(--ld-border) !important;
  box-shadow: var(--ld-shadow) !important;
  border-radius: 14px !important;
  padding: 8px 14px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  gap: 2px !important;
  justify-content: flex-start !important;
  align-items: center !important;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.module-mind .minder-tools::-webkit-scrollbar {
  height: 4px;
}
.module-mind .minder-tools::-webkit-scrollbar-thumb {
  background: rgba(16, 163, 127, 0.25);
  border-radius: 4px;
}
.module-mind .minder-tools > * {
  flex-shrink: 0 !important;
}
.module-mind .minder-tools .split {
  height: 20px !important;
  margin: 0 6px !important;
  align-self: center !important;
}
.module-mind .minder-tools .tools-item {
  display: inline-flex !important;
  align-items: center !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  min-height: 32px !important;
  height: auto !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  transition: background 0.15s;
}
.module-mind .minder-tools .tools-item:hover {
  background: var(--ld-brand-light) !important;
}
.module-mind .minder-tools .tools-item .el-select {
  display: inline-block !important;
}
.module-mind .minder-tools .tools-item[style*="transparent"] {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  background: transparent !important;
  padding: 2px 4px !important;
}
.module-mind .minder-tools .el-input--mini .el-input__inner {
  height: 28px !important;
  line-height: 28px !important;
  border-radius: 6px !important;
  border-color: var(--ld-border) !important;
}
.module-mind .minder-tools .tools-item .el-dropdown-link > div,
.module-mind .minder-tools .tools-item .el-dropdown-link {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 4px !important;
}
.module-mind .minder-tools .tools-item .el-dropdown-link a {
  font-size: 13px !important;
  color: var(--ld-text) !important;
  white-space: nowrap !important;
}
.module-mind .minder-editor-container {
  top: 56px !important;
}
.module-mind .minder-editor {
  top: 108px !important;
}

/* 搜索模块居中卡片 */
.module-search .search-input {
  background: var(--ld-surface);
  border-radius: 18px;
  border: 1px solid var(--ld-border);
  box-shadow: var(--ld-shadow);
  padding: 28px 24px 20px !important;
}
.module-search .search-input .model-list {
  background: var(--ld-brand-light) !important;
  border-color: rgba(16, 163, 127, 0.2) !important;
  border-radius: 10px !important;
}
.module-search .search-input .input {
  opacity: 1 !important;
}

@media (max-width: 768px) {
  .box-chat .chat-input .input,
  .module-search .search-input .input {
    width: 100% !important;
    margin: 0 !important;
  }
}

/* AI 润色按钮（发送按钮左侧的小胶囊，不贴边成条） */
.box-chat .chat-input .input.has-patch-polish,
.module-search .search-input .input.has-patch-polish,
.module-mind .chat-input .input.has-patch-polish,
.box-prompt .words-input.has-patch-polish {
  position: relative !important;
}
.has-patch-polish .el-textarea__inner,
.has-patch-polish textarea {
  padding-right: 108px !important;
}
.box-prompt .words-input.has-patch-polish textarea,
.box-prompt .words-input.has-patch-polish .el-textarea__inner {
  padding-right: 12px !important;
  padding-bottom: 92px !important;
}
.box-prompt .header.has-patch-polish-header ~ .words-input.has-patch-polish textarea,
.box-prompt .header.has-patch-polish-header ~ .words-input.has-patch-polish .el-textarea__inner,
.box-prompt .header.has-patch-polish-header ~ .words-cate ~ .words-input.has-patch-polish textarea,
.box-prompt .header.has-patch-polish-header ~ .words-cate ~ .words-input.has-patch-polish .el-textarea__inner {
  padding-right: 52px !important;
  padding-bottom: 52px !important;
}
.box-prompt .header.has-patch-polish-header,
.module-music .setting-item .header.has-patch-polish-header,
.module-video .setting-item .header.has-patch-polish-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.box-prompt .header.has-patch-polish-header > span:first-child,
.module-music .setting-item .header.has-patch-polish-header > span:first-child,
.module-video .setting-item .header.has-patch-polish-header > span:first-child {
  flex: 1;
  min-width: 0;
}
.box-prompt .header .patch-btn-polish,
.module-music .setting-item .header .patch-btn-polish,
.module-video .setting-item .header .patch-btn-polish {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}
.module-music .setting-row.has-patch-polish .el-textarea__inner,
.module-video .setting-row.has-patch-polish .el-textarea__inner {
  padding-right: 15px !important;
  padding-bottom: 5px !important;
}
.patch-btn-polish {
  position: absolute !important;
  right: 52px !important;
  bottom: 10px !important;
  z-index: 6;
  height: 32px;
  min-width: 0;
  padding: 0 10px;
  margin: 0;
  border: 1px solid rgba(16, 163, 127, 0.28) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: var(--ld-brand, #10a37f) !important;
  font: 600 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06) !important;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.patch-btn-polish:hover:not(:disabled) {
  background: var(--ld-brand-light, #e8f7f2) !important;
  border-color: rgba(16, 163, 127, 0.45) !important;
  color: var(--ld-brand-dark, #0d8a6a) !important;
  box-shadow: 0 2px 8px rgba(16, 163, 127, 0.12) !important;
}
.patch-btn-polish:disabled,
.patch-btn-polish.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none !important;
}
.patch-btn-polish.is-loading {
  pointer-events: none;
  opacity: 0.72;
}
.patch-polish-icon {
  font-size: 13px;
  line-height: 1;
}
.patch-polish-label {
  line-height: 1;
}
.patch-polish-tip {
  margin-top: 6px;
  font-size: 12px;
  color: #dc2626;
  line-height: 1.4;
}
.theme-dark .patch-btn-polish,
body.theme-dark .patch-btn-polish {
  background: rgba(38, 38, 38, 0.96) !important;
  border-color: rgba(16, 163, 127, 0.35) !important;
  color: #6ee7b7 !important;
}
.theme-dark .patch-btn-polish:hover:not(:disabled),
body.theme-dark .patch-btn-polish:hover:not(:disabled) {
  background: rgba(16, 163, 127, 0.14) !important;
  color: #34d399 !important;
}

/* 左侧栏用户头像：刷新后保持正常圆形显示 */
.sidebar-container .avatar {
  overflow: hidden !important;
  flex-shrink: 0 !important;
}
.sidebar-container .avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: inherit !important;
}

/* 左侧栏「提示词」菜单图标略放大，与其他入口视觉平衡 */
.sidebar-container .menu-list .menu-item.ld-prompt-menu-item .icon,
.sidebar-container .menu-list .menu-item.ld-prompt-menu-item .icon .svg-icon,
.sidebar-container .menu-list .menu-item.ld-prompt-menu-item .icon .ld-prompt-mod-icon {
  width: 32px !important;
  height: 32px !important;
  font-size: 32px !important;
}

/* 欢迎页示例问题：只保留一份列表，避免补丁与 Vue 重复渲染 */
.msg-list.welcome .text .tips:not(.patch-tips-grid) {
  display: none !important;
}
.msg-list.welcome .tips.patch-tips-grid ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.msg-list.welcome .tips.patch-tips-grid li {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f3f6f9;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.msg-list.welcome .tips.patch-tips-grid li:hover {
  background: #e8f7f2;
  color: #0f766e;
}

/* AI擂台：主区域避开版权栏 + 底部输入栏 */
body.moy-copyright-active .main-container:has(.module-pk) {
  bottom: calc(15px + var(--moy-copyright-height, 56px)) !important;
  box-sizing: border-box !important;
}
.module-pk {
  position: relative !important;
  height: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body.moy-copyright-active .module-pk {
  padding-bottom: 0 !important;
}
.module-pk.box-chat .chat-msg {
  position: absolute !important;
  top: 12px !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 124px !important;
  width: 100% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
.module-pk.box-chat .chat-msg .el-scrollbar {
  height: 100% !important;
}
.module-pk.box-chat .chat-msg .box-a,
.module-pk.box-chat .chat-msg .box-b {
  top: 0 !important;
  bottom: 0 !important;
}
.module-pk.box-chat .chat-input {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 10px !important;
  width: 100% !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 6px 20px 8px !important;
  box-sizing: border-box !important;
  background: linear-gradient(to top, rgba(247, 247, 248, 0.98) 75%, transparent) !important;
  border-top: 1px solid rgba(16, 163, 127, 0.1) !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
}
body.moy-copyright-active .module-pk.box-chat .chat-input {
  bottom: 10px !important;
}
.module-pk.box-chat .chat-input .select {
  flex: 0 0 160px !important;
  width: 160px !important;
  min-width: 130px !important;
  padding-bottom: 2px !important;
}
.module-pk.box-chat .chat-input .select p {
  margin: 0 0 5px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  letter-spacing: 0.03em !important;
  white-space: nowrap !important;
}
.module-pk.box-chat .chat-input .select .el-select {
  width: 100% !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
  border-radius: 10px !important;
}
.module-pk.box-chat .chat-input .select .el-select .el-input__inner {
  height: 38px !important;
  line-height: 38px !important;
  border-radius: 10px !important;
  border-color: rgba(16, 163, 127, 0.18) !important;
  background: #fff !important;
  font-size: 14px !important;
}
.module-pk.box-chat .chat-input .input {
  flex: 1 1 auto !important;
  max-width: 680px !important;
  min-width: 260px !important;
  margin: 20px 0 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.module-pk.box-chat .chat-input .input .el-textarea__inner,
.module-pk.box-chat .chat-input .input textarea {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 46px !important;
  max-height: 120px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(16, 163, 127, 0.18) !important;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06) !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  background: #fff !important;
  color: var(--ld-text) !important;
}
.theme-dark .module-pk.box-chat .chat-input {
  background: linear-gradient(to top, rgba(38, 38, 38, 0.98) 75%, transparent) !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}
.theme-dark .module-pk.box-chat .chat-input .select p {
  color: #94a3b8 !important;
}
.theme-dark .module-pk.box-chat .chat-input .select .el-input__inner,
.theme-dark .module-pk.box-chat .chat-input .input .el-textarea__inner,
.theme-dark .module-pk.box-chat .chat-input .input textarea {
  background: #262626 !important;
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
