/* 深色主题CSS */
:root {
  --dark-bg-color: #1f1f1f;
  --dark-bg-color-light: #2a2a2a;
  --dark-bg-color-lighter: #333;
  --dark-border-color: #444;
  --dark-text-color: #e0e0e0;
  --dark-text-secondary: #aaa;
  --dark-card-bg: rgba(40, 40, 40, 0.6);
  --dark-user-message-bg: rgba(30, 144, 255, 0.2);
  --dark-assistant-message-bg: rgba(82, 196, 26, 0.15);
  --dark-input-bg: #333;
  --dark-shadow: rgba(0, 0, 0, 0.3);
  --dark-header-gradient: linear-gradient(to right, #1a1a1a, #2a2a2a);
  --dark-danger-bg: #5c0011;
  --dark-danger-border: #7e0016;
}

/* 全局深色主题应用 */
.dark-theme {
  background-color: var(--dark-bg-color);
  color: var(--dark-text-color);
}

/* 替换媒体查询为类选择器 */
/* 全局容器背景 */
.dark-theme.chat-container {
  background-color: var(--dark-bg-color) !important;
  color: var(--dark-text-color) !important;
}

/* 顶部标题栏 */
.dark-theme.chat-header {
  background: var(--dark-header-gradient) !important;
  border-bottom: 1px solid var(--dark-border-color) !important;
  box-shadow: 0 2px 5px var(--dark-shadow) !important;
}

.dark-theme .chat-header h4,
.dark-theme.chat-header h4 {
  color: var(--dark-text-color) !important;
}

.dark-theme .chat-header button, 
.dark-theme .chat-header .ant-btn-text,
.dark-theme.chat-header button, 
.dark-theme.chat-header .ant-btn-text {
  color: var(--dark-text-color) !important;
}

/* 分隔线 */
.dark-theme .ant-divider {
  border-color: var(--dark-border-color) !important;
}

/* 消息容器 */
.dark-theme.messages-container {
  background-color: var(--dark-bg-color) !important;
}

/* 空消息提示 */
.dark-theme .messages-container .ant-typography-secondary,
.dark-theme.messages-container .ant-typography-secondary {
  color: var(--dark-text-secondary) !important;
}

/* 用户消息样式 */
.dark-theme .user-message .message-content > div > div:nth-child(2) {
  background-color: var(--dark-user-message-bg) !important;
  box-shadow: 0 1px 2px var(--dark-shadow) !important;
}

/* AI助手消息样式 */
.dark-theme .ai-message .message-content > div > div:nth-child(2) {
  background-color: var(--dark-assistant-message-bg) !important;
  box-shadow: 0 1px 2px var(--dark-shadow) !important;
}

/* 消息文本 */
.dark-theme .message-content .ant-typography {
  color: var(--dark-text-color) !important;
}

/* 消息时间 */
.dark-theme .message-content .ant-typography-secondary {
  color: var(--dark-text-secondary) !important;
}

/* 引用卡片 */
.dark-theme .message-content .ant-card,
.dark-theme .input-container .ant-card {
  background-color: var(--dark-card-bg) !important;
  border-color: var(--dark-border-color) !important;
}

.dark-theme .message-content .ant-card .ant-typography,
.dark-theme .input-container .ant-card .ant-typography {
  color: var(--dark-text-color) !important;
}

.dark-theme .message-content .ant-card .ant-typography-secondary,
.dark-theme .input-container .ant-card .ant-typography-secondary {
  color: var(--dark-text-secondary) !important;
}

/* 输入区域 */
.dark-theme.input-container {
  background-color: var(--dark-bg-color-light) !important;
  border-top: 1px solid var(--dark-border-color) !important;
}

/* 集成输入框布局 */
.dark-theme .input-container > div:first-of-type {
  background-color: var(--dark-input-bg) !important;
  border: 1px solid var(--dark-border-color) !important;
}

/* 输入框 */
.dark-theme .input-container .ant-input,
.dark-theme.input-container .ant-input,
.dark-theme.ant-input,
.dark-theme .ant-input {
  background-color: transparent !important;
  color: var(--dark-text-color) !important;
  border-color: transparent !important;
}

/* 集成输入框内的文本区域 */
.dark-theme .input-container > div .ant-input {
  background-color: transparent !important;
}

/* 输入框占位符文本深色主题样式 */
.chat-input-dark::-moz-placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}
.chat-input-dark::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

.chat-input-dark:-ms-input-placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

.chat-input-dark::-ms-input-placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* 按钮样式 */
.dark-theme .input-container .ant-btn:not(.ant-btn-primary):not(.ant-btn-dangerous),
.dark-theme.input-container .ant-btn:not(.ant-btn-primary):not(.ant-btn-dangerous) {
  background-color: var(--dark-bg-color-lighter) !important;
  border-color: var(--dark-border-color) !important;
  color: var(--dark-text-color) !important;
}

/* 输入区域中的文本按钮 */
.dark-theme .input-container .ant-btn-text:not(.ant-btn-primary):not(.ant-btn-dangerous) {
  background-color: transparent !important;
  color: var(--dark-text-secondary) !important;
}

.dark-theme .input-container .ant-btn-text:hover:not(.ant-btn-primary):not(.ant-btn-dangerous) {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--dark-text-color) !important;
}

/* 停止按钮样式 */
.dark-theme .input-container .ant-btn-dangerous,
.dark-theme.input-container .ant-btn-dangerous {
  background-color: var(--dark-danger-bg) !important;
  border-color: var(--dark-danger-border) !important;
  color: var(--dark-text-color) !important;
}

/* 输入容器底部提示文本 */
.dark-theme .input-container .ant-typography-secondary,
.dark-theme.input-container .ant-typography-secondary {
  color: var(--dark-text-secondary) !important;
}

/* 模态框样式 */
.dark-theme.ant-modal .ant-modal-content,
.dark-theme.ant-modal .ant-modal-header,
.dark-theme .ant-modal-content,
.dark-theme .ant-modal-header {
  background-color: var(--dark-bg-color-light) !important;
  color: var(--dark-text-color) !important;
}

.dark-theme.ant-modal .ant-modal-title,
.dark-theme .ant-modal-title {
  color: var(--dark-text-color) !important;
}

.dark-theme.ant-modal .ant-modal-header,
.dark-theme .ant-modal-header {
  border-bottom: 1px solid var(--dark-border-color) !important;
}

.dark-theme.ant-modal .ant-modal-footer,
.dark-theme .ant-modal-footer {
  border-top: 1px solid var(--dark-border-color) !important;
  background-color: var(--dark-bg-color-lighter) !important;
}

/* 模态框按钮 */
.dark-theme.ant-modal .ant-modal-footer .ant-btn:not(.ant-btn-primary),
.dark-theme .ant-modal-footer .ant-btn:not(.ant-btn-primary) {
  background-color: var(--dark-bg-color-lighter) !important;
  border-color: var(--dark-border-color) !important;
  color: var(--dark-text-color) !important;
}

/* 选项卡 */
.dark-theme .ant-tabs-tab {
  color: var(--dark-text-secondary) !important;
}

.dark-theme .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
  color: #1890ff !important;
}

.dark-theme .ant-tabs-nav::before {
  border-bottom-color: var(--dark-border-color) !important;
}

/* 标签 */
.dark-theme .ant-tag {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* 剪贴板列表 */
.dark-theme .clipboard-item {
  border-color: var(--dark-border-color) !important;
  background-color: var(--dark-bg-color-lighter) !important;
}

.dark-theme .clipboard-item.selected {
  background-color: rgba(24, 144, 255, 0.2) !important;
  border-color: #1890ff !important;
}

/* 发送按钮优化 */
.send-button {
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

/* 引用详情框 */
.dark-theme .detail-item {
  background-color: var(--dark-bg-color-lighter) !important;
  border-color: var(--dark-border-color) !important;
}

.dark-theme .detail-item-content {
  background-color: var(--dark-input-bg) !important;
  border-color: var(--dark-border-color) !important;
  color: var(--dark-text-color) !important;
}

/* 通用文本 */
.dark-theme .ant-typography {
  color: var(--dark-text-color) !important;
}

.dark-theme .ant-typography-secondary {
  color: var(--dark-text-secondary) !important;
}

/* 解决模态框主体背景色问题 */
.dark-theme .ant-modal-body {
  background-color: var(--dark-bg-color-light) !important;
  color: var(--dark-text-color) !important;
}

/* =============== 补充一些其他深色主题样式 =============== */

/* 下拉菜单样式 */
.dark-theme .ant-dropdown-menu {
  background-color: var(--dark-bg-color-light) !important;
  box-shadow: 0 3px 6px var(--dark-shadow) !important;
  border: 1px solid var(--dark-border-color) !important;
}

.dark-theme .ant-dropdown-menu-item,
.dark-theme .ant-dropdown-menu-submenu-title {
  color: var(--dark-text-color) !important;
}

.dark-theme .ant-dropdown-menu-item:hover,
.dark-theme .ant-dropdown-menu-submenu-title:hover {
  background-color: var(--dark-bg-color-lighter) !important;
}

/* 弹出框样式 */
.dark-theme .ant-popover-inner {
  background-color: var(--dark-bg-color-light) !important;
  box-shadow: 0 3px 6px var(--dark-shadow) !important;
}

.dark-theme .ant-popover-title {
  color: var(--dark-text-color) !important;
  border-bottom-color: var(--dark-border-color) !important;
}

.dark-theme .ant-popover-inner-content {
  color: var(--dark-text-color) !important;
}

.dark-theme .ant-popover-arrow-content {
  background-color: var(--dark-bg-color-light) !important;
}

/* 提示框样式 */
.dark-theme .ant-tooltip-inner {
  background-color: var(--dark-bg-color-lighter) !important;
  box-shadow: 0 3px 6px var(--dark-shadow) !important;
}

/* 选择器样式 */
.dark-theme .ant-select-dropdown {
  background-color: var(--dark-bg-color-light) !important;
  box-shadow: 0 3px 6px var(--dark-shadow) !important;
  border: 1px solid var(--dark-border-color) !important;
}

.dark-theme .ant-select-item {
  color: var(--dark-text-color) !important;
}

.dark-theme .ant-select-item-option-active:not(.ant-select-item-option-disabled) {
  background-color: var(--dark-bg-color-lighter) !important;
}

.dark-theme .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
  background-color: rgba(24, 144, 255, 0.2) !important;
  color: var(--dark-text-color) !important;
}

/* 列表样式 */
.dark-theme .ant-list-item {
  border-bottom-color: var(--dark-border-color) !important;
}

/* 消息通知样式 */
.dark-theme .ant-message-notice-content {  /* 消息通知需要全局应用 */
  background-color: var(--dark-bg-color-light) !important;
  color: var(--dark-text-color) !important;
  box-shadow: 0 3px 6px var(--dark-shadow) !important;
}

/* 加载状态样式 */
.dark-theme .ant-spin-dot-item {
  background-color: #1890ff !important;
}

/* 按钮禁用状态 */
.dark-theme .ant-btn-dangerous[disabled],
.dark-theme .ant-btn-primary[disabled] {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.3) !important;
}

/* 控制发送按钮在深色模式下的颜色 */
.dark-theme .send-button.ant-btn-primary {
  background-color: #1890ff !important;
  border-color: #1890ff !important;
}

.dark-theme .send-button.ant-btn-default {
  background-color: var(--dark-bg-color-lighter) !important;
  border-color: var(--dark-border-color) !important;
  color: var(--dark-text-color) !important;
}

.dark-theme .send-button.ant-btn-dangerous {
  background-color: var(--dark-danger-bg) !important;
  border-color: var(--dark-danger-border) !important;
  color: white !important;
}

/* 页面全局背景和文字颜色 */
body.dark-theme {
  background-color: var(--dark-bg-color) !important;
  color: var(--dark-text-color) !important;
}

/* 设置antd组件全局样式 */
.dark-theme .ant-layout {
  background-color: var(--dark-bg-color) !important;
}

/* 添加chat-dark-theme.css的内容，支持抽屉组件 */

/* 深色模式下的抽屉样式 */
.dark-theme .ant-drawer-header {
  background-color: #1f1f1f;
  border-bottom: 1px solid #333;
}

.dark-theme .ant-drawer-title {
  color: #e0e0e0;
}

.dark-theme .ant-drawer-close {
  color: #e0e0e0;
}

.dark-theme .ant-drawer-close:hover {
  color: #fff;
}

.dark-theme .ant-drawer-content {
  background-color: #1f1f1f;
}

.dark-theme .ant-drawer-body {
  color: #e0e0e0;
}

.dark-theme .ant-divider {
  border-color: #333;
}

/* 历史记录列表项悬停样式 */
.dark-theme .history-item:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* 浅色模式下的历史记录列表项悬停样式 */
.history-item:hover {
  background-color: rgba(0, 0, 0, 0.025) !important;
}

/* 让按钮在深色模式下更加突出 */
.dark-theme .ant-btn-text {
  color: #e0e0e0;
}

.dark-theme .ant-btn-text:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* 深色模式下Tag的样式 */
.dark-theme .ant-tag {
  background-color: #333;
  border-color: #444;
}

/* 修改聊天历史抽屉的动作按钮样式 */
.history-item .ant-list-item-action {
  margin-left: 0;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.history-item:hover .ant-list-item-action {
  opacity: 1;
}

/* 深色模式下的导入/导出按钮 */
.dark-theme .ant-list-item-action .ant-btn-text {
  color: #aaa;
}

.dark-theme .ant-list-item-action .ant-btn-text:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

/* 确保抽屉标题和按钮在深色模式下可见 */
.dark-theme .ant-drawer-header {
  color: #e0e0e0;
}

.dark-theme .ant-drawer-extra .ant-btn-text {
  color: #e0e0e0;
}

.dark-theme .ant-drawer-extra .ant-btn-text:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

/* 消息数量标签样式 */
.dark-theme .ant-tag {
  background-color: #333;
  color: #e0e0e0;
}

/* 添加以下与markdown相关的深色主题样式 */
.dark-theme .ai-message .markdown-wrapper {
  background-color: transparent !important;
}

.dark-theme .markdown-wrapper pre {
  background-color: var(--dark-bg-color-lighter) !important;
  border: 1px solid var(--dark-border-color) !important;
}

.dark-theme .markdown-wrapper code:not(pre code) {
  background-color: rgba(110, 118, 129, 0.4) !important;
  color: #e0e0e0 !important;
}

.dark-theme .markdown-wrapper blockquote {
  background-color: rgba(40, 40, 40, 0.4) !important;
  border-left: 4px solid var(--dark-border-color) !important;
  color: var(--dark-text-secondary) !important;
}

.dark-theme .markdown-wrapper table {
  border-color: var(--dark-border-color) !important;
}

.dark-theme .markdown-wrapper table th,
.dark-theme .markdown-wrapper table td {
  border-color: var(--dark-border-color) !important;
}

.dark-theme .markdown-wrapper table tr {
  background-color: var(--dark-bg-color) !important;
}

.dark-theme .markdown-wrapper table tr:nth-child(2n) {
  background-color: var(--dark-bg-color-light) !important;
}

.dark-theme .markdown-wrapper a {
  color: #58a6ff !important;
}

.dark-theme .markdown-wrapper h1,
.dark-theme .markdown-wrapper h2,
.dark-theme .markdown-wrapper h3,
.dark-theme .markdown-wrapper h4,
.dark-theme .markdown-wrapper h5,
.dark-theme .markdown-wrapper h6 {
  color: var(--dark-text-color) !important;
}

.dark-theme .markdown-wrapper ul,
.dark-theme .markdown-wrapper ol {
  color: var(--dark-text-color) !important;
}

.dark-theme .markdown-wrapper p {
  color: var(--dark-text-color) !important;
}

/* 修复代码块语法高亮在深色模式下的问题 */
.dark-theme .markdown-wrapper pre > code {
  background-color: transparent !important;
  color: #e0e0e0 !important;
}

/* 确保小屏幕上的markdown内容正确显示 */
.markdown-small .markdown-wrapper pre,
.markdown-small .markdown-wrapper code {
  font-size: 12px !important;
}

.markdown-small .markdown-wrapper h1 {
  font-size: 18px !important;
}

.markdown-small .markdown-wrapper h2 {
  font-size: 16px !important;
}

.markdown-small .markdown-wrapper h3,
.markdown-small .markdown-wrapper h4 {
  font-size: 14px !important;
}

.markdown-small .markdown-wrapper p,
.markdown-small .markdown-wrapper li {
  font-size: 14px !important;
}

/* 深色模式下的标题装饰线颜色 */
.dark-theme .md-h1::before {
  background-color: #1890ff;
}

.dark-theme .md-h2::before {
  background-color: #52c41a;
}

.dark-theme .md-h3::before {
  background-color: #fa8c16;
}

/* 确保深色模式下markdown标题的可见度 */
.dark-theme .markdown-content .md-heading,
.dark-theme .markdown-wrapper .md-heading {
  color: var(--dark-text-color) !important;
  border-bottom-color: var(--dark-border-color) !important;
}

.dark-theme .markdown-content .md-h1,
.dark-theme .markdown-content .md-h2,
.dark-theme .markdown-wrapper .md-h1,
.dark-theme .markdown-wrapper .md-h2 {
  border-bottom: 1px solid var(--dark-border-color) !important;
}

/* 暗黑模式的系统消息和抽屉样式 */
.dark-theme .system-message .ant-card {
  background-color: rgba(30, 30, 30, 0.9) !important;
  border-color: #333 !important;
}

.dark-theme .system-message .ant-card .ant-card-body {
  color: #d9d9d9;
}

.dark-theme .ant-drawer-header {
  background-color: #1f1f1f;
  border-bottom: 1px solid #333;
}

.dark-theme .ant-drawer-content {
  background-color: #1f1f1f;
}

.dark-theme .ant-drawer-title {
  color: #d9d9d9;
}

.dark-theme .ant-drawer-body {
  color: #d9d9d9;
}

.dark-theme .ant-collapse {
  background-color: #262626;
  border-color: #333;
}

.dark-theme .ant-collapse-header {
  color: #d9d9d9 !important;
}

.dark-theme .ant-collapse-content {
  background-color: #1f1f1f;
  border-top-color: #333;
}

.dark-theme .ant-list-bordered {
  border-color: #333;
}

.dark-theme .ant-list-item {
  border-bottom-color: #333;
}

.dark-theme .ant-list-item-meta-title,
.dark-theme .ant-list-item-meta-description {
  color: #d9d9d9;
}

.dark-theme a {
  color: #1890ff;
}

.dark-theme a:hover {
  color: #40a9ff;
}

/* 提高搜索卡片的可点击性 */
.web-search-card {
  cursor: pointer;
  transition: all 0.3s;
}

.web-search-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 网络搜索卡片中的进度条样式 */
.ant-progress-text {
  color: inherit !important;
}

.dark-theme .ant-progress-text {
  color: #d9d9d9 !important;
}

/* 添加打字机效果样式 */
.typing-effect {
  display: inline-block;
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background-color: currentColor;
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}/* Markdown样式 */
.markdown-content {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  word-wrap: break-word;
  max-width: 100%;
}

/* 标题样式 */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.markdown-content h1 {
  font-size: 2em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #eaecef;
}

.markdown-content h2 {
  font-size: 1.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #eaecef;
}

.markdown-content h3 {
  font-size: 1.25em;
}

.markdown-content h4 {
  font-size: 1em;
}

/* 段落和列表样式 */
.markdown-content p,
.markdown-content ul,
.markdown-content ol {
  margin-top: 0;
  margin-bottom: 16px;
}

.markdown-content ul,
.markdown-content ol {
  padding-left: 2em;
}

.markdown-content li {
  margin-bottom: 4px;
}

.markdown-content li > p {
  margin-top: 16px;
}

/* 代码块样式 */
.markdown-content pre {
  padding: 16px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  border-radius: 6px;
  margin-bottom: 16px; /* 确保底部有足够的间距 */
}

.markdown-content code {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  border-radius: 3px;
}

.markdown-content pre > code {
  padding: 0;
  margin: 0;
  font-size: 100%;
  word-break: normal;
  white-space: pre;
  background: transparent;
  border: 0;
}

/* 引用样式 */
.markdown-content blockquote {
  padding: 0 1em;
  color: #6a737d;
  border-left: 0.25em solid #dfe2e5;
  margin: 0 0 16px 0;
}

.markdown-content blockquote > :first-child {
  margin-top: 0;
}

.markdown-content blockquote > :last-child {
  margin-bottom: 0;
}

/* 确保引用块底部有足够间距 */
.markdown-content blockquote:after {
  content: "";
  display: block;
  clear: both;
  margin-bottom: 16px;
}

/* 表格样式 */
.markdown-content table {
  display: block;
  width: 100%;
  overflow: auto;
  margin-top: 0;
  margin-bottom: 16px;
  border-spacing: 0;
  border-collapse: collapse;
}

.markdown-content table th {
  font-weight: 600;
}

.markdown-content table th,
.markdown-content table td {
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
}

.markdown-content table tr {
  background-color: #fff;
  border-top: 1px solid #c6cbd1;
}

.markdown-content table tr:nth-child(2n) {
  background-color: #f6f8fa;
}

/* 表格容器样式 */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 16px;
}

/* 链接样式 */
.markdown-content a {
  color: #0366d6;
  text-decoration: none;
}

.markdown-content a:hover {
  text-decoration: underline;
}

/* 图片样式 */
.markdown-content img {
  max-width: 100%;
  box-sizing: border-box;
}

/* 水平线样式 */
.markdown-content hr {
  height: 0.25em;
  padding: 0;
  margin: 24px 0;
  background-color: #e1e4e8;
  border: 0;
}

/* 深色模式样式 */
.dark-theme .markdown-content {
  color: #e0e0e0;
}

.dark-theme .markdown-content h1,
.dark-theme .markdown-content h2 {
  border-bottom-color: #444;
}

.dark-theme .markdown-content blockquote {
  color: #b0b0b0;
  border-left-color: #555;
}

.dark-theme .markdown-content code {
  background-color: rgba(110, 118, 129, 0.4);
}

.dark-theme .markdown-content pre {
  background-color: rgba(30, 30, 30, 0.6) !important;
  border: 1px solid #555;
}

.dark-theme .markdown-content hr {
  background-color: #444;
}

.dark-theme .markdown-content table th,
.dark-theme .markdown-content table td {
  border-color: #444;
}

.dark-theme .markdown-content table tr {
  background-color: #1f1f1f;
  border-top-color: #444;
}

.dark-theme .markdown-content table tr:nth-child(2n) {
  background-color: #2a2a2a;
}

.dark-theme .markdown-content a {
  color: #58a6ff;
}

/* 在小屏幕上的样式调整 */
@media (max-width: 768px) {
  .markdown-small pre {
    max-width: 100%;
    overflow-x: auto;
    font-size: 12px;
  }
  
  .markdown-small code {
    font-size: 12px;
  }
  
  .markdown-small table {
    font-size: 12px;
  }
  
  .markdown-small h1 {
    font-size: 18px;
  }
  
  .markdown-small h2 {
    font-size: 16px;
  }
  
  .markdown-small h3,
  .markdown-small h4 {
    font-size: 14px;
  }
  
  .markdown-small p,
  .markdown-small li {
    font-size: 14px;
  }
}

/* 确保换行和空白行正确显示 */
.line-break {
  display: block;
  height: 1em;
  margin-bottom: 1em;
  content: "";
}

/* 修复语法高亮样式问题 */
.dark-theme pre[class*="language-"],
.dark-theme code[class*="language-"] {
  text-shadow: none !important;
}

/* 确保图文混排正确对齐 */
.markdown-content p img {
  vertical-align: middle;
}

/* 修复列表项中的代码块样式 */
.markdown-content li > pre {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* 添加对标题样式的特殊处理 */
.md-heading {
  font-weight: 600;
  line-height: 1.25;
  margin-top: 24px;
  margin-bottom: 16px;
  display: block;
}

.md-h1 {
  font-size: 2em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #eaecef;
}

.md-h2 {
  font-size: 1.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #eaecef;
}

.md-h3 {
  font-size: 1.25em;
}

.md-h4 {
  font-size: 1em;
}

.md-h5 {
  font-size: 0.875em;
}

.md-h6 {
  font-size: 0.85em;
  color: #6a737d;
}

/* 深色模式下的标题样式 */
.dark-theme .md-h1,
.dark-theme .md-h2 {
  border-bottom-color: #444;
}

.dark-theme .md-h6 {
  color: #b0b0b0;
}

/* 空段落样式 */
.empty-p {
  min-height: 1em;
  line-height: 1.6;
}

/* 确保标题之间有足够的间距 */
.md-heading + .md-heading {
  margin-top: 1.5em;
}

/* 强制标题显示为块级元素，并添加清晰的视觉边界 */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6,
.md-h1, .md-h2, .md-h3, .md-h4, .md-h5, .md-h6 {
  display: block;
  width: 100%;
  clear: both;
  position: relative;
}

/* 为标题添加特殊标记以便于识别 */
.md-h1::before, 
.md-h2::before, 
.md-h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  background-color: #1890ff;
  position: absolute;
  left: -8px;
  top: 0;
  bottom: 0;
  border-radius: 2px;
}

.md-h1::before {
  background-color: #1890ff;
}

.md-h2::before {
  background-color: #52c41a;
}

.md-h3::before {
  background-color: #fa8c16;
}

/* 确保在小屏幕上标题也能正确显示 */
@media (max-width: 768px) {
  .md-h1::before, 
  .md-h2::before, 
  .md-h3::before {
    left: -4px;
    width: 2px;
  }
  
  .markdown-small .md-heading.md-h1 {
    font-size: 20px !important;
    line-height: 1.4;
  }
  
  .markdown-small .md-heading.md-h2 {
    font-size: 18px !important;
    line-height: 1.4;
  }
  
  .markdown-small .md-heading.md-h3 {
    font-size: 16px !important;
    line-height: 1.4;
  }
}

/* 思考标签样式 - 现代化设计 */
.thinking-control {
  margin-bottom: 18px;
}

.thinking-toggle {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  font-weight: 500;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-left: 3px solid #52c41a;
  position: relative;
  overflow: hidden;
}

.thinking-toggle:hover {
  background: rgba(82, 196, 26, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.thinking-toggle.active {
  background: rgba(82, 196, 26, 0.08);
  box-shadow: 0 2px 5px rgba(82, 196, 26, 0.25);
}

.thinking-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #999;
  transition: all 0.3s ease;
  position: relative;
}

.thinking-toggle.active .thinking-indicator {
  background: #52c41a;
  box-shadow: 0 0 0 3px rgba(82, 196, 26, 0.2);
}

.thinking-indicator::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 1px solid rgba(82, 196, 26, 0.5);
  opacity: 0;
  transition: all 0.3s ease;
}

.thinking-toggle.active .thinking-indicator::after {
  opacity: 1;
  animation: pulse 2s infinite;
}

.thinking-label {
  font-weight: 500;
  transition: color 0.3s ease;
}

.thinking-toggle.active .thinking-label {
  color: #52c41a;
}

.thinking-content {
  max-height: 300px;
  overflow-y: auto;
  margin: 15px 0;
  padding: 15px;
  background: linear-gradient(to bottom, rgba(82, 196, 26, 0.08), rgba(82, 196, 26, 0.02));
  border: 1px solid rgba(82, 196, 26, 0.15);
  border-radius: 6px;
  border-left: 3px solid #22c55e;
  font-size: 14px;
  position: relative;
  transition: all 0.3s ease;
  white-space: pre-wrap; /* 保留空白符并自动换行 */
  word-wrap: break-word; /* 长单词断行 */
  width: 100%; /* 确保占满容器宽度 */
  box-sizing: border-box; /* 确保padding不会增加宽度 */
  overflow-x: hidden; /* 防止水平滚动 */
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.thinking-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, #52c41a, rgba(82, 196, 26, 0.5));
  border-radius: 4px 4px 0 0;
}

.thinking-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.8), transparent);
  pointer-events: none;
  opacity: 0.5;
}

/* 思考内容在各页面中的统一样式 */
.thinking-content p, 
.thinking-content span {
  white-space: pre-wrap; /* 保留空白符并自动换行 */
  word-wrap: break-word; /* 长单词断行 */
  max-width: 100%; /* 确保不超出容器 */
}

/* 确保页面中的.thinking-content保持一致的宽度 */
.markdown-wrapper .thinking-content,
.stream-content-display .thinking-content,
.writing-content .thinking-content,
.methodology-content .thinking-content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.thinking-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(82, 196, 26, 0.2);
}

.thinking-title {
  font-weight: 600;
  color: #52c41a;
  font-size: 15px;
  position: relative;
  padding-left: 20px;
  animation: titleGlow 3s ease-in-out infinite;
}

.thinking-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2352c41a'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* 动画效果 */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 深色模式样式 */
.dark-theme .thinking-toggle {
  color: #c9c9c9;
  background-color: rgba(50, 50, 50, 0.4);
  border-left: 3px solid #52c41a;
}

.dark-theme .thinking-toggle:hover {
  background-color: rgba(50, 50, 50, 0.6);
}

.dark-theme .thinking-toggle.active {
  background-color: rgba(82, 196, 26, 0.15);
}

.dark-theme .thinking-content {
  background: linear-gradient(to bottom, rgba(40, 40, 40, 0.8), rgba(35, 35, 35, 0.9));
  border-color: rgba(82, 196, 26, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  scrollbar-width: thin;
  scrollbar-color: rgba(82, 196, 26, 0.5) rgba(40, 40, 40, 0.5);
}

.dark-theme .thinking-content::after {
  background: linear-gradient(to top, rgba(30, 30, 30, 0.8), transparent);
}

.dark-theme .thinking-title {
  color: #7ed321;
}

/* 在小屏幕上的样式调整 */
@media (max-width: 768px) {
  .thinking-toggle {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .thinking-content {
    padding: 12px;
    max-height: 300px;
    font-size: 13px;
  }
  
  .thinking-title {
    font-size: 14px;
  }
}

/* 进一步优化思考标签体验 */
.thinking-toggle::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(82, 196, 26, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: all 0.8s ease;
}

.thinking-toggle:hover::after {
  left: 100%;
}

.thinking-content {
  position: relative;
}

.thinking-content code {
  background-color: rgba(82, 196, 26, 0.1);
  border: 1px solid rgba(82, 196, 26, 0.2);
}

.thinking-content pre {
  border-left: 3px solid rgba(82, 196, 26, 0.5);
}

.thinking-content blockquote {
  border-left-color: #52c41a;
}

.thinking-content h1, 
.thinking-content h2, 
.thinking-content h3, 
.thinking-content h4, 
.thinking-content h5, 
.thinking-content h6 {
  color: #52c41a;
}

.thinking-content a {
  color: #52c41a;
  text-decoration: underline;
}

/* 思考内容的关键词高亮 */
.thinking-content strong {
  color: #52c41a;
  font-weight: 600;
}

.thinking-content em {
  color: #1890ff;
  font-style: italic;
}

/* 思考内容的列表样式 */
.thinking-content ul li::before {
  color: #52c41a;
}

.thinking-content ol li::marker {
  color: #52c41a;
}

/* 思考标题动画效果 */
@keyframes titleGlow {
  0%, 100% {
    text-shadow: 0 0 3px rgba(82, 196, 26, 0.2);
  }
  50% {
    text-shadow: 0 0 6px rgba(82, 196, 26, 0.4);
  }
}

/* 深色模式下的额外优化 */
.dark-theme .thinking-toggle::after {
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(82, 196, 26, 0.2) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

.dark-theme .thinking-content code {
  background-color: rgba(30, 30, 30, 0.9);
  border-color: rgba(82, 196, 26, 0.3);
}

.dark-theme .thinking-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(82, 196, 26, 0.5) rgba(40, 40, 40, 0.5);
}

.dark-theme .thinking-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.dark-theme .thinking-content::-webkit-scrollbar-track {
  background: rgba(40, 40, 40, 0.5);
  border-radius: 4px;
}

.dark-theme .thinking-content::-webkit-scrollbar-thumb {
  background-color: rgba(82, 196, 26, 0.5);
  border-radius: 4px;
}

/* 实时思考过程的样式 */
.thinking-toggle.processing {
  background: rgba(82, 196, 26, 0.05);
  border-left-color: #1890ff;
}

.thinking-toggle.processing .thinking-indicator {
  background: #1890ff;
  animation: pulse-thinking 1.5s infinite;
}

.thinking-processing-indicator {
  color: #1890ff;
  margin-left: 6px;
  font-size: 12px;
  position: relative;
  padding-left: 18px;
  animation: blink 1.5s infinite;
}

.thinking-processing-indicator::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231890ff'%3E%3Cpath d='M15 4V3H9v1H4v2h1v13c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6h1V4h-5zm2 15H7V6h10v13zM9 8h2v9H9V8zm4 0h2v9h-2V8z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  animation: spin 2s infinite linear;
}

.thinking-content.processing {
  background: linear-gradient(to bottom, rgba(24, 144, 255, 0.05), rgba(24, 144, 255, 0.02));
  border-color: rgba(24, 144, 255, 0.2);
}

.thinking-content.processing::before {
  background: linear-gradient(to right, #1890ff, rgba(24, 144, 255, 0.5));
  animation: progress 2s infinite;
}

.thinking-live-indicator {
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
  font-size: 12px;
  font-weight: normal;
  color: #1890ff;
  position: relative;
  padding-left: 20px;
}

.thinking-live-indicator::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231890ff'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  animation: pulse 1.5s infinite;
}

/* 实时思考内容的动画效果 */
@keyframes progress {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(100% + 200px) 0;
  }
}

@keyframes spin {
  0% {
    transform: translateY(-50%) rotate(0deg);
  }
  100% {
    transform: translateY(-50%) rotate(360deg);
  }
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes pulse-thinking {
  0% {
    box-shadow: 0 0 0 0 rgba(24, 144, 255, 0.6);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(24, 144, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(24, 144, 255, 0);
  }
}

/* 深色模式下的实时思考样式 */
.dark-theme .thinking-toggle.processing {
  background: rgba(40, 40, 40, 0.6);
  border-left-color: #1890ff;
}

.dark-theme .thinking-processing-indicator {
  color: #69b1ff;
}

.dark-theme .thinking-live-indicator {
  color: #69b1ff;
}

.dark-theme .thinking-content.processing {
  background: linear-gradient(to bottom, rgba(24, 144, 255, 0.1), rgba(40, 40, 40, 0.9));
  border-color: rgba(24, 144, 255, 0.3);
}

.dark-theme .thinking-content.processing pre {
  border-left-color: rgba(24, 144, 255, 0.5);
}

/* 自动滚动到最新内容的样式 */
.thinking-scroll-active {
  scroll-behavior: smooth;
}  /* 灵感中心样式 */
.inspiration-container {
  padding: 20px;
  height: 100%;
  overflow-y: auto;
  transition: all 0.3s ease;
}

.inspiration-container.dark {
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.inspiration-container.light {
  color: rgba(0, 0, 0, 0.85);
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e7f0 100%);
}

.inspiration-header {
  text-align: center;
  margin-bottom: 20px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
}

.header-controls {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.inspiration-title {
  margin-bottom: 0 !important;
}

.inspiration-subtitle {
  max-width: 600px;
  margin: 0 auto !important;
  opacity: 0.8;
}

.inspiration-content {
  margin-top: 20px;
}

.inspiration-card {
  height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.dark .inspiration-card {
  background: rgba(30, 30, 47, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.light .inspiration-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}

.settings-icon {
  margin-left: auto;
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0.6;
}

.settings-icon:hover {
  opacity: 1;
  transform: rotate(30deg);
  color: #1890ff;
}

.theme-selection,
.prompt-input {
  margin-bottom: 20px;
}

.theme-select,
.prompt-textarea {
  margin-top: 8px;
  width: 100%;
  border-radius: 8px;
}

.action-buttons {
  display: flex;
  justify-content: flex-end;
}

.submit-button {
  min-width: 120px;
  height: 40px;
  border-radius: 8px;
  font-size: 15px;
  background: linear-gradient(45deg, #1890ff, #52c41a);
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(24, 144, 255, 0.3);
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(24, 144, 255, 0.4);
}

.content-display {
  min-height: 300px;
  position: relative;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
}

.loading-text {
  margin-top: 16px;
  text-align: center;
}

.empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  opacity: 0.6;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: #1890ff;
}

.generated-content {
  padding: 10px 0;
}

.content-textarea {
  width: 100%;
  background: transparent !important;
  padding: 0 !important;
  resize: none;
  overflow: visible;
  line-height: 1.8;
  font-size: 15px;
}

.dark .content-textarea {
  color: rgba(255, 255, 255, 0.9);
}

.system-prompt-textarea {
  font-family: monospace;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .inspiration-input-col, 
  .inspiration-output-col {
    width: 100%;
  }
  
  .inspiration-card {
    margin-bottom: 16px;
  }
}

/* 页面标题工具区 */
.header-tools {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.ai-model-selector {
  margin-bottom: 16px;
}

.ai-model-selector .ant-btn-link {
  color: #1890ff;
}

.dark .ai-model-selector .ant-btn-link {
  color: #1890ff;
}

/* 模型选择器样式 */
.dark-theme .ant-modal-content,
.dark-theme .ant-modal-header {
  background-color: #1a1a2e;
  color: rgba(255, 255, 255, 0.85);
}

.dark-theme .ant-modal-title {
  color: rgba(255, 255, 255, 0.85);
}

.dark-theme .ant-modal-close {
  color: rgba(255, 255, 255, 0.45);
}

/* 紧凑模式的AI模型选择器 */
.ai-model-selector.compact .ant-btn-link {
  font-size: 14px;
  height: 32px;
  padding: 4px 8px;
}

.title-icon {
  margin-right: 12px;
  font-size: 28px;
  color: #1890ff;
} .stream-content-display {
  position: relative;
  min-height: 200px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.stream-content-display.dark-theme {
  background: #141414;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  color: #e0e0e0;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.dark-theme .loading-container {
  color: #e0e0e0;
}

.loading-content {
  margin-top: 16px;
}

.loading-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.dark-theme .loading-text {
  color: #e0e0e0;
}

.loading-desc {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.45);
}

.dark-theme .loading-desc {
  color: rgba(255, 255, 255, 0.65);
}

.empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.dark-theme .empty-content {
  color: #e0e0e0;
}

.empty-icon {
  font-size: 48px;
  color: #bfbfbf;
  margin-bottom: 16px;
}

.dark-theme .empty-icon {
  color: #555555;
}

.empty-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.dark-theme .empty-title {
  color: #e0e0e0;
}

.empty-desc {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.45);
}

.dark-theme .empty-desc {
  color: rgba(255, 255, 255, 0.65);
}

.generated-content {
  position: relative;
  padding: 20px;
}

.dark-theme .generated-content {
  color: #e0e0e0;
}

.content-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.dark-theme .content-header {
  border-bottom-color: #303030;
}

.content-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.action-button {
  color: rgba(0, 0, 0, 0.45);
  transition: all 0.3s ease;
}

.action-button:hover {
  color: #1890ff;
  background: rgba(24, 144, 255, 0.1);
}

.dark-theme .action-button {
  color: rgba(255, 255, 255, 0.45);
}

.dark-theme .action-button:hover {
  color: #1890ff;
  background: rgba(24, 144, 255, 0.2);
}

.generation-complete {
  font-size: 14px;
  color: #52c41a;
  margin-left: 8px;
}

.dark-theme .generation-complete {
  color: #73d13d;
}

.streaming-indicator {
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(24, 144, 255, 0.1);
  border-radius: 4px;
}

.dark-theme .streaming-indicator {
  background: rgba(24, 144, 255, 0.2);
}

.raw-content {
  margin-top: 8px;
}

.result-textarea {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 8px 12px;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  background: #fafafa;
}

.dark-theme .result-textarea {
  background: #141414;
  border-color: #434343;
  color: rgba(255, 255, 255, 0.85);
}

.formatted-content {
  font-size: 14px;
  line-height: 1.8;
  color: inherit;
}

.dark-theme .formatted-content {
  color: #e0e0e0;
}

.formatted-content p {
  margin-bottom: 16px;
}

.dark-theme .formatted-content p {
  color: #e0e0e0;
}

.formatted-content pre {
  background: #f5f5f5;
  padding: 16px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 16px 0;
  color: #333;
}

.dark-theme .formatted-content pre {
  background: #262626;
  color: #e0e0e0;
  border: 1px solid #404040;
}

.formatted-content code {
  font-family: monospace;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 3px;
  color: inherit;
}

.dark-theme .formatted-content code {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

.formatted-content h1,
.formatted-content h2,
.formatted-content h3,
.formatted-content h4,
.formatted-content h5,
.formatted-content h6 {
  color: inherit;
  margin-top: 24px;
  margin-bottom: 16px;
}

.dark-theme .formatted-content h1,
.dark-theme .formatted-content h2,
.dark-theme .formatted-content h3,
.dark-theme .formatted-content h4,
.dark-theme .formatted-content h5,
.dark-theme .formatted-content h6 {
  color: #f0f0f0;
}

.formatted-content ul,
.formatted-content ol {
  margin-bottom: 16px;
  padding-left: 20px;
}

.dark-theme .formatted-content ul,
.dark-theme .formatted-content ol {
  color: #e0e0e0;
}

.formatted-content li {
  margin-bottom: 4px;
}

.dark-theme .formatted-content li {
  color: #e0e0e0;
}

.formatted-content blockquote {
  border-left: 4px solid #1890ff;
  padding-left: 16px;
  margin: 16px 0;
  color: rgba(0, 0, 0, 0.65);
  font-style: italic;
}

.dark-theme .formatted-content blockquote {
  color: rgba(255, 255, 255, 0.75);
  border-left-color: #69c0ff;
}

.typing-effect {
  position: relative;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #1890ff;
  margin-left: 2px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes content-fade-in {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

.typing-effect {
  animation: text-fade-in 0.5s ease-in-out;
}

@keyframes text-fade-in {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* 暗色主题适配 */
.dark-theme .content-actions button {
  color: #e8e8e8;
}

.dark-theme .content-actions button:hover {
  color: #1890ff;
}

.dark-theme .typing-cursor {
  background: #1890ff;
}

/* Dark mode styles */
.dark .loading-text {
  color: rgba(255, 255, 255, 0.65);
}

.dark .empty-icon {
  opacity: 0.7;
}

.dark .typing-cursor {
  background-color: #177ddc;
}

.dark .result-textarea {
  background-color: rgba(255, 255, 255, 0.04);
}

.ai-tip-container {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: flex-end;
}

.dark-theme .ai-tip-container {
  border-top-color: #303030;
}

.ai-generated-tip {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}

.dark-theme .ai-generated-tip {
  background: rgba(255, 255, 255, 0.08);
}

.ai-icon {
  font-size: 14px;
  margin-right: 4px;
  color: rgba(0, 0, 0, 0.45);
}

.dark-theme .ai-icon {
  color: rgba(255, 255, 255, 0.45);
}

.ai-text {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
}

.dark-theme .ai-text {
  color: rgba(255, 255, 255, 0.45);
}

/* 思考内容在所有页面中的统一样式 */
.thinking-content {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  margin: 15px 0 !important;
  overflow-x: hidden !important;
  background-color: rgba(0, 0, 0, 0.03) !important;
  padding: 15px !important;
  border-radius: 8px !important;
  border-left: 4px solid #b3b3b3 !important;
}

/* 确保思考内容内部的文本元素正确换行 */
.thinking-content p,
.thinking-content span {
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  max-width: 100% !important;
}

/* 思考内容在不同页面中的特定样式 */
/* 聊天页面 */
.stream-content-display .thinking-content {
  background-color: rgba(0, 0, 0, 0.03) !important;
}

/* 灵感中心页面 */
.inspiration-container .markdown-wrapper .thinking-content {
  width: 100% !important;
  max-width: 100% !important;
  margin: 15px 0 !important;
}

/* AI决策分析页面 */
.methodology-container .result-content-area .thinking-content,
.methodology-container .markdown-wrapper .thinking-content {
  width: 100% !important;
  max-width: 100% !important;
  margin: 15px 0 !important;
}

/* AI批量生产中心页面 */
.result-card .markdown-wrapper .thinking-content,
.result-item .markdown-wrapper .thinking-content {
  width: 100% !important;
  max-width: 100% !important;
  margin: 15px 0 !important;
}

/* WritingContent页面 */
.writing-container .output-content .thinking-content {
  width: 100% !important;
  max-width: 100% !important;
  margin: 15px 0 !important;
}

/* 思考开关按钮通用样式 */
.thinking-toggle {
  display: flex !important;
  align-items: center !important;
  margin-bottom: 12px !important;
  -webkit-user-select: none !important;
     -moz-user-select: none !important;
          user-select: none !important;
  cursor: pointer !important;
  color: #666 !important;
}

/* 暗色模式下的样式调整 */
.dark-theme .thinking-content {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-left-color: #666 !important;
}

.dark-theme .thinking-toggle {
  color: #aaa !important;
} :root {
  --color-primary: #1890ff;
  --color-primary-hover: #40a9ff;
  --color-primary-active: #096dd9;
  --color-success: #52c41a;
  --color-warning: #faad14;
  --color-error: #f5222d;
  --color-info: #1890ff;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.04);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  --font-sans: 'Roboto', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

body.light-theme {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-elevated: rgba(255,255,255,0.95);
  --bg-glass: rgba(255,255,255,0.75);

  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;

  --border-primary: rgba(0,0,0,0.08);
  --border-secondary: rgba(0,0,0,0.05);
  --border-focus: rgba(24,144,255,0.4);

  --surface-card: rgba(255,255,255,0.9);
  --surface-hover: rgba(0,0,0,0.03);
  --surface-active: rgba(24,144,255,0.08);

  --message-user-bg: rgba(24,144,255,0.1);
  --message-ai-bg: rgba(82,196,26,0.08);
  --input-bg: #ffffff;
}

body.dark-theme {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-elevated: rgba(30,30,30,0.95);
  --bg-glass: rgba(18,18,28,0.7);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0f172a;

  --border-primary: rgba(255,255,255,0.1);
  --border-secondary: rgba(255,255,255,0.06);
  --border-focus: rgba(24,144,255,0.5);

  --surface-card: rgba(30,30,30,0.8);
  --surface-hover: rgba(255,255,255,0.05);
  --surface-active: rgba(24,144,255,0.15);

  --message-user-bg: rgba(24,144,255,0.2);
  --message-ai-bg: rgba(82,196,26,0.15);
  --input-bg: #1e293b;
}

/* AI仿写/改写页面样式 */

.copywriting-container {
  padding: var(--space-xl);
  height: 100%;
  overflow-y: auto;
  transition: all var(--transition-base);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.copywriting-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  position: relative;
}

.header-controls {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.copywriting-title {
  margin-bottom: 0 !important;
  color: var(--text-primary) !important;
}

.copywriting-subtitle {
  max-width: 600px;
  margin: 0 auto !important;
  color: var(--text-secondary);
}

.tabs-container {
  margin-top: var(--space-xl);
}

.feature-tabs {
  margin-bottom: var(--space-lg);
}

.feature-tabs .ant-tabs-nav {
  margin-bottom: var(--space-lg);
}

.copywriting-content {
  margin-top: var(--space-sm);
}

.copywriting-card {
  height: 100%;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  background: var(--surface-card);
  border: 1px solid var(--border-primary);
}

.copywriting-card:hover {
  box-shadow: var(--shadow-lg);
}

.card-title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-icon {
  margin-left: auto;
  cursor: pointer;
  transition: all var(--transition-fast);
  opacity: 0.6;
  color: var(--text-secondary);
}

.settings-icon:hover {
  opacity: 1;
  transform: rotate(30deg);
  color: var(--color-primary);
}

/* 角色选择相关样式 */

.character-selection {
  margin: var(--space-lg) 0;
}

.character-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
  max-height: 300px;
  overflow-y: auto;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.character-option {
  position: relative;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
  background: var(--surface-card);
}

.character-option:hover {
  background-color: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.character-option.active {
  border-color: var(--color-primary);
  background-color: var(--surface-active);
}

.character-option-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-md);
}

.character-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  transition: all var(--transition-fast);
  font-size: 24px;
}

.character-emoji {
  font-size: 28px;
  line-height: 1;
}

.character-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.character-name {
  font-weight: 600;
  margin-bottom: var(--space-xs);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  color: var(--text-primary);
}

.character-tag {
  margin: 0;
  font-size: 10px;
  padding: 0 6px;
  height: 18px;
  line-height: 18px;
}

.character-description {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.custom-character {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  border: 1px dashed var(--color-primary);
}

.custom-character-input {
  margin-top: var(--space-sm);
  width: 100%;
  border-radius: var(--radius-md);
}

.style-selection,
.requirement-input {
  margin: var(--space-lg) 0;
}

.style-select,
.style-input,
.requirement-textarea,
.content-textarea {
  margin-top: var(--space-sm);
  width: 100%;
  border-radius: var(--radius-md);
}

.action-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-lg);
}

.submit-button {
  min-width: 120px;
  height: 40px;
  border-radius: var(--radius-md);
  font-size: 15px;
  background: linear-gradient(45deg, #1677ff, #40a9ff);
  border: none;
  transition: all var(--transition-fast);
  box-shadow: 0 5px 15px rgba(24, 144, 255, 0.3);
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(24, 144, 255, 0.4);
}

.content-display {
  min-height: 300px;
  position: relative;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
}

.loading-text {
  margin-top: var(--space-lg);
  text-align: center;
  color: var(--text-secondary);
}

.empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  opacity: 0.6;
  text-align: center;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: var(--space-lg);
  color: var(--color-primary);
}

.generated-content {
  padding: var(--space-sm) 0;
}

/* 打字机效果相关样式 */

.typing-effect .typing-cursor {
  display: inline-block;
  width: 0.5em;
  height: 1.2em;
  background-color: var(--color-primary);
  margin-left: 2px;
  animation: cursor-blink 0.8s infinite;
  vertical-align: text-bottom;
}

@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.typing-effect {
  animation: text-fade-in 0.5s ease-in-out;
}

@keyframes text-fade-in {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

.raw-content-actions {
  margin: var(--space-sm) 0;
  text-align: right;
}

.result-textarea {
  width: 100%;
  background: transparent !important;
  padding: 0 !important;
  resize: none;
  overflow: visible;
  line-height: 1.8;
  font-size: 15px;
  color: var(--text-primary);
}

.system-prompt-textarea {
  font-family: var(--font-mono);
}

/* 响应式设计 */

@media (max-width: 768px) {
  .copywriting-container {
    padding: var(--space-lg);
  }

  .input-col,
  .output-col {
    width: 100%;
    margin-bottom: var(--space-lg);
  }

  .copywriting-card {
    margin-bottom: var(--space-lg);
  }

  .character-options {
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    max-height: 400px;
  }

  .character-option-content {
    gap: var(--space-sm);
  }

  .character-description {
    -webkit-line-clamp: 1;
  }
}

/* 页面标题工具区 */

.header-tools {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.ai-model-selector {
  display: flex;
  align-items: center;
}

.ai-model-selector .ant-btn-link {
  color: var(--text-primary);
}

/* 紧凑模式的AI模型选择器 */

.ai-model-selector.compact .ant-btn-link {
  height: 28px;
  padding: 0 var(--space-sm);
  font-size: 13px;
}

.title-icon {
  margin-right: 10px;
  color: var(--color-primary);
}

/* 深色主题统一文字颜色 */

.copywriting-container.dark {
  background: #1f1f1f;
  color: #e0e0e0;
}

.copywriting-container.dark .copywriting-title {
  color: rgba(255, 255, 255, 0.85) !important;
}

.copywriting-container.dark .copywriting-subtitle {
  color: rgba(255, 255, 255, 0.65) !important;
}

.copywriting-container.dark .ant-typography {
  color: #e0e0e0 !important;
}

.copywriting-container.dark .ant-typography-strong,
.copywriting-container.dark .ant-typography strong {
  color: rgba(255, 255, 255, 0.85) !important;
}

.copywriting-container.dark .ant-typography-secondary,
.copywriting-container.dark .ant-typography-secondary span {
  color: rgba(255, 255, 255, 0.65) !important;
}

.copywriting-container.dark .card-title {
  color: rgba(255, 255, 255, 0.85) !important;
}

.copywriting-container.dark .character-name {
  color: rgba(255, 255, 255, 0.85) !important;
}

.copywriting-container.dark .character-description {
  color: rgba(255, 255, 255, 0.65) !important;
}

.copywriting-container.dark .ant-tabs-tab {
  color: rgba(255, 255, 255, 0.65) !important;
}

.copywriting-container.dark .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: rgba(255, 255, 255, 0.85) !important;
}

.copywriting-container.dark .ant-card-head-title {
  color: rgba(255, 255, 255, 0.85) !important;
}

.copywriting-container.dark .ant-input,
.copywriting-container.dark .ant-input-textarea,
.copywriting-container.dark .ant-input-affix-wrapper {
  color: rgba(255, 255, 255, 0.85) !important;
}

.copywriting-container.dark .ant-input::-moz-placeholder, .copywriting-container.dark .ant-input-textarea::-moz-placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

.copywriting-container.dark .ant-input::placeholder,
.copywriting-container.dark .ant-input-textarea::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

.copywriting-container.dark .ant-select-selector {
  color: rgba(255, 255, 255, 0.85) !important;
}

.copywriting-container.dark .ant-select-selection-item {
  color: rgba(255, 255, 255, 0.85) !important;
}

.copywriting-container.dark .ant-empty-description {
  color: rgba(255, 255, 255, 0.45) !important;
}

.copywriting-container.dark .character-option {
  background: #262626;
  border-color: #303030;
}

.copywriting-container.dark .character-option:hover {
  background: #2a2a2a;
}

.copywriting-container.dark .character-option.active {
  background: #1e1e1e;
}

.copywriting-container.dark .custom-character {
  background: #262626;
  border-color: #303030;
}

.copywriting-container.dark .copywriting-card {
  background: #1e1e1e;
  border-color: #303030;
}

.copywriting-container.dark .character-options {
  background: #262626;
}

.copywriting-container.dark .ant-modal-content {
  background: #1f1f1f;
  color: #e0e0e0;
}

.copywriting-container.dark .ant-modal-header {
  background: #1f1f1f;
  color: rgba(255, 255, 255, 0.85);
}

.copywriting-container.dark .ant-modal-title {
  color: rgba(255, 255, 255, 0.85) !important;
}
/* 文本工具页面样式 */
.text-tools-container {
  padding: 20px;
  height: 100%;
  overflow-y: auto;
  transition: all 0.3s ease;
}

.text-tools-container.dark {
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.text-tools-container.light {
  color: rgba(0, 0, 0, 0.85);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.text-tools-header {
  text-align: center;
  margin-bottom: 20px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
}

.header-controls {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.text-tools-title {
  margin-bottom: 0 !important;
}

.text-tools-subtitle {
  max-width: 600px;
  margin: 0 auto !important;
  opacity: 0.8;
}

.text-tools-tabs {
  margin-bottom: 16px;
}

.text-tools-tabs .ant-tabs-nav {
  margin-bottom: 16px;
}

.dark .text-tools-tabs .ant-tabs-tab {
  color: rgba(255, 255, 255, 0.65);
}

.dark .text-tools-tabs .ant-tabs-tab-active {
  color: #1890ff;
}

.text-tools-content {
  margin-top: 8px;
}

.text-tools-card {
  height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.dark .text-tools-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.light .text-tools-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}

.settings-icon {
  margin-left: auto;
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0.6;
}

.settings-icon:hover {
  opacity: 1;
  transform: rotate(30deg);
  color: #1890ff;
}

.feature-desc {
  margin-bottom: 16px !important;
  opacity: 0.8;
}

.text-input-group,
.polish-input,
.summary-input,
.expand-input {
  margin-bottom: 16px;
}

.compare-textarea,
.polish-textarea,
.summary-textarea,
.expand-textarea {
  margin-top: 8px;
  width: 100%;
  border-radius: 8px;
}

.polish-options {
  margin-bottom: 16px;
}

.polish-select {
  margin-top: 8px;
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
}

.action-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.primary-button {
  min-width: 120px;
  height: 40px;
  border-radius: 8px;
  font-size: 15px;
  background: linear-gradient(45deg, #1677ff, #4096ff);
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(24, 144, 255, 0.3);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(24, 144, 255, 0.4);
}

.result-content {
  min-height: 300px;
  position: relative;
}

.result-card {
  height: 100%;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
}

.loading-text {
  margin-top: 16px;
  text-align: center;
}

.empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  opacity: 0.6;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: #1890ff;
}

.generated-content {
  padding: 10px 0;
}

/* 打字机效果相关样式 */
.typing-effect .typing-cursor {
  display: inline-block;
  width: 0.5em;
  height: 1.2em;
  background-color: #1890ff;
  margin-left: 2px;
  animation: cursor-blink 0.8s infinite;
  vertical-align: text-bottom;
}

@keyframes cursor-blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

.result-textarea {
  width: 100%;
  background: transparent !important;
  padding: 0 !important;
  resize: none;
  overflow: visible;
  line-height: 1.8;
  font-size: 15px;
}

.dark .result-textarea {
  color: rgba(255, 255, 255, 0.9);
}

.system-prompt-textarea {
  font-family: monospace;
}

.compare-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 响应式设计 */
@media (max-width: 991px) {
  .input-col, 
  .output-col {
    width: 100%;
  }
  
  .text-tools-card {
    margin-bottom: 16px;
  }
}

@media (min-width: 768px) {
  .compare-inputs {
    flex-direction: row;
  }
  
  .text-input-group {
    width: 50%;
    padding: 0 8px;
  }
  
  .text-input-group:first-child {
    padding-left: 0;
  }
  
  .text-input-group:last-child {
    padding-right: 0;
  }
}

/* Markdown渲染区域样式 */
.markdown-wrapper {
  padding: 10px;
  line-height: 1.8;
  font-size: 15px;
}

.dark .markdown-wrapper {
  color: rgba(255, 255, 255, 0.9);
}

.light .markdown-wrapper {
  color: rgba(0, 0, 0, 0.9);
}

.markdown-wrapper pre {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  padding: 12px;
  overflow-x: auto;
}

.dark .markdown-wrapper pre {
  background-color: rgba(255, 255, 255, 0.1);
}

.markdown-wrapper code {
  font-family: 'Source Code Pro', Consolas, Monaco, 'Andale Mono', monospace;
  font-size: 14px;
}

.markdown-wrapper blockquote {
  border-left: 4px solid #1890ff;
  padding-left: 16px;
  margin-left: 0;
  color: rgba(0, 0, 0, 0.7);
}

.dark .markdown-wrapper blockquote {
  color: rgba(255, 255, 255, 0.7);
}

.markdown-wrapper img {
  max-width: 100%;
  border-radius: 4px;
}

.markdown-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.markdown-wrapper th, 
.markdown-wrapper td {
  border: 1px solid #eee;
  padding: 8px 12px;
  text-align: left;
}

.dark .markdown-wrapper th, 
.dark .markdown-wrapper td {
  border-color: rgba(255, 255, 255, 0.2);
}

.markdown-wrapper th {
  background-color: rgba(0, 0, 0, 0.03);
  font-weight: 600;
}

.dark .markdown-wrapper th {
  background-color: rgba(255, 255, 255, 0.1);
}

.raw-content-actions {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
  padding-top: 8px;
}

.dark .raw-content-actions {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* 页面标题和工具区 */
.header-tools {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.ai-model-selector {
  margin-bottom: 16px;
}

.ai-model-selector.compact .ant-btn-link {
  font-size: 14px;
  height: 32px;
  padding: 4px 8px;
}

.ai-model-selector .ant-btn-link {
  color: #1890ff;
}

.dark .ai-model-selector .ant-btn-link {
  color: #1890ff;
}

.dark .modal-content {
  background-color: #1f1f1f;
  color: rgba(255, 255, 255, 0.85);
}

/* 模型选择器样式 */
.dark-theme .ant-modal-content,
.dark-theme .ant-modal-header {
  background-color: #1f1f1f;
  color: rgba(255, 255, 255, 0.85);
}

.dark-theme .ant-modal-title {
  color: rgba(255, 255, 255, 0.85);
}

.dark-theme .ant-modal-close {
  color: rgba(255, 255, 255, 0.45);
}

.title-icon {
  margin-right: 12px;
  font-size: 28px;
  color: #1677ff;
} /* 整体容器样式 */
.daily-tools-container {
  min-height: 100vh;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* 顶部导航样式 */
.daily-tools-nav {
  background: #fff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 32px;
}

.nav-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
  color: #222;
  gap: 8px;
  padding: 0;
  background: none;
  border-radius: 0;
}

.nav-logo:hover {
  color: var(--primary-color);
  transform: scale(1.02);
  background: var(--bg-secondary);
}

.nav-logo .anticon {
  font-size: 28px;
  background: linear-gradient(135deg, var(--primary-color), #36cfc9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s;
}

.nav-menu {
  display: flex;
  gap: 16px;
  background: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.nav-menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: #666;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  background: none;
}

.nav-menu-item:hover, .nav-menu-item.active {
  background: #f0f4ff;
  color: #1677ff;
}

.nav-menu-item .anticon {
  font-size: 18px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s;
}

.nav-menu-item:hover .anticon {
  transform: scale(1.1);
}

.nav-menu-item span {
  position: relative;
  z-index: 1;
}

/* 主要内容区域 */
.daily-tools-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* 工具卡片网格 */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
  animation: fadeIn 0.5s ease-out;
}

.tool-card {
  min-height: 80px;
  max-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 12px 12px 10px 16px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: var(--component-background);
  position: relative;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-color);
}

.tool-card.active {
  border-color: var(--primary-color);
  background: var(--primary-1);
}

.tool-card-icon {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 2px;
  margin-left: 0;
  transition: transform 0.2s, color 0.2s;
}

.tool-card:hover .tool-card-icon {
  color: #1677ff;
  transform: scale(1.12) rotate(-6deg);
}

.tool-card-title {
  margin-bottom: 2px;
  margin-top: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.tool-card-desc {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 工具详情页样式 */
.tool-detail {
  margin-top: 24px;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 24px;
  animation: slideUp 0.5s ease-out;
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.tool-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

.settings-icon {
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
  padding: 8px;
  border-radius: 8px;
}

.settings-icon:hover {
  color: var(--primary-color);
  background: var(--bg-secondary);
}

/* 表单区域样式 */
.form-section {
  width: 100%;
}

.input-section,
.output-section {
  background: var(--component-background);
  padding: 16px;
  border-radius: 12px;
  height: 100%;
  min-height: 400px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.input-section:hover,
.output-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 输入区域样式 */
.options-section {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-item .ant-typography {
  font-size: 13px;
  margin-bottom: 0;
}

/* 紧凑型选项样式 */
.compact-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

/* 修改Radio按钮组样式 */
.option-item .ant-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.option-item .ant-radio-button-wrapper {
  height: 28px;
  line-height: 26px;
  padding: 0 10px;
  font-size: 12px;
}

/* 修改Select下拉框样式 */
.option-item .ant-select {
  width: 100%;
}

.option-item .ant-select-selector {
  height: 32px !important;
}

.option-item .ant-select-selection-item {
  line-height: 30px !important;
  font-size: 13px;
}

/* 文本输入框样式 */
.option-item .ant-input,
.option-item .ant-input-textarea {
  font-size: 13px;
}

.option-item .ant-input {
  height: 32px;
  padding: 4px 8px;
}

/* 操作按钮样式 */
.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.action-buttons .ant-btn {
  height: 32px;
  font-size: 13px;
  padding: 4px 12px;
}

/* 输出区域样式 */
.output-section {
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
  padding: 16px;
  border-radius: 12px;
  background: var(--component-background);
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

/* 响应式布局优化 */
@media (max-width: 1200px) {
  .daily-tools-content {
    padding: 20px;
    max-width: 100%;
  }

  .input-section,
  .output-section {
    min-height: 350px;
  }
}

@media (max-width: 768px) {
  .daily-tools-content {
    padding: 16px;
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .tool-detail {
    padding: 16px;
    margin-top: 16px;
  }

  .compact-options {
    grid-template-columns: 1fr;
  }

  /* 移动端输入输出区域优化 */
  .input-section,
  .output-section {
    margin-bottom: 16px;
    min-height: 300px;
  }

  .input-section .ant-input,
  .input-section .ant-select,
  .input-section .ant-input-textarea {
    margin-bottom: 8px;
  }

  /* 移动端按钮优化 */
  .action-buttons {
    justify-content: center;
    margin-top: 16px;
  }

  .action-buttons .ant-btn {
    flex: 1;
    max-width: 200px;
  }

  /* 移动端选项优化 */
  .option-item {
    margin-bottom: 12px;
  }

  .option-item .ant-radio-group {
    width: 100%;
  }

  .option-item .ant-radio-button-wrapper {
    flex: 1;
    text-align: center;
  }

  /* Row组件在小屏幕下的间距优化 */
  .ant-row {
    margin-left: -8px !important;
    margin-right: -8px !important;
    width: calc(100% + 16px) !important;
  }

  .ant-col {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

@media (max-width: 480px) {
  .daily-tools-content {
    padding: 12px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-detail {
    padding: 12px;
  }

  .compact-options {
    gap: 8px;
  }

  /* 超小屏幕按钮组优化 */
  .option-item .ant-radio-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .option-item .ant-radio-button-wrapper {
    border-radius: 6px !important;
    margin: 0 !important;
  }

  /* 输出区域在小屏幕上的优化 */
  .output-section {
    min-height: 250px;
    max-height: 400px;
    font-size: 14px;
  }
}

/* 确保在平板设备上的良好显示 */
@media (min-width: 769px) and (max-width: 1024px) {
  .daily-tools-content {
    padding: 20px;
    max-width: 95%;
  }

  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .input-section,
  .output-section {
    min-height: 350px;
  }
}

/* 大屏幕优化 */
@media (min-width: 1400px) {
  .daily-tools-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
  }

  .tools-grid {
    gap: 32px;
  }

  .input-section,
  .output-section {
    min-height: 500px;
  }
}

/* 超大屏幕优化 */
@media (min-width: 1920px) {
  .daily-tools-content {
    max-width: 1600px;
    padding: 40px;
  }

  .input-section,
  .output-section {
    min-height: 600px;
    padding: 24px;
  }
}

/* 主题变量补充 */
.light {
  --bg-color: #f5f5f5;
  --bg-secondary: #fafafa;
  --component-background: #ffffff;
  --text-primary: #000000;
  --text-secondary: rgba(0, 0, 0, 0.45);
  --border-color: #f0f0f0;
  --primary-color: #1890ff;
  --primary-1: rgba(24, 144, 255, 0.1);
}

.dark {
  --bg-color: #141414;
  --bg-secondary: #1f1f1f;
  --component-background: #262626;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --border-color: #303030;
  --primary-color: #1890ff;
  --primary-1: rgba(24, 144, 255, 0.2);
}

/* 美化滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* 页面标题区域 */
.daily-tools-header {
  margin-bottom: 24px;
  padding: 16px 24px;
  background: var(--component-background);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.daily-tools-title {
  margin-bottom: 8px !important;
  display: flex;
  align-items: center;
  gap: 12px;
}

.daily-tools-subtitle {
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* 侧边栏样式 */
.daily-tools-sidebar {
  position: sticky;
  top: 24px;
}

.category-menu-card {
  margin-bottom: 16px;
  border-radius: 8px;
  background: var(--component-background);
}

.category-menu-title {
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-menu {
  border-right: none;
}

.category-submenu .ant-menu-item {
  height: 40px;
  line-height: 40px;
  border-radius: 4px;
}

/* 工具卡片样式 */
.daily-tools-card {
  border-radius: 8px;
  background: var(--component-background);
  height: 100%;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
}

/* 结果卡片样式 */
.result-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.result-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 4px;
  min-height: 200px;
}

/* 系统提示词模态框样式 */
.system-prompt-modal .ant-modal-body {
  padding: 24px;
}

.system-prompt-textarea {
  margin-top: 16px;
  border-radius: 4px;
  resize: none;
}

/* 动画效果优化 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-detail {
  animation: fadeIn 0.3s ease-out;
}

/* 动画效果 */
.ant-card,
.ant-menu-item,
.ant-btn {
  transition: all 0.3s ease;
}

.ant-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ant-menu-item:hover {
  transform: translateX(4px);
}

/* 暗色主题导航样式调整 */
.dark .nav-menu {
  background: rgba(255, 255, 255, 0.04);
}

.dark .nav-menu-item:hover,
.dark .nav-menu-item.active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dark .nav-logo .anticon {
  background: linear-gradient(135deg, var(--primary-color), #85a5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
} /* 写作内容页面样式 */
.writing-container {  
  padding: 0;  
  display: flex;  
  flex-direction: column;  
  min-height: 100%;  
  width: 100%;
  overflow-y: auto;
  background-color: #f5f5f5;
  height: 100%;
  position: relative;
}

.writing-container.dark {
  background-color: #1f1f1f;
  color: #e0e0e0;
}

.writing-container.light {
  background-color: #f5f5f5;
  color: #333;
}

.writing-header {
  margin-bottom: 0;
  padding: 16px 24px;
  background-color: #fff;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.writing-container.dark .writing-header {
  background-color: #141414;
  border-bottom-color: #303030;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.writing-title {
  margin: 0 !important;
  display: flex;
  align-items: center;
  font-size: 18px !important;
}

.title-icon {
  margin-right: 8px;
  font-size: 20px;
  color: #1890ff;
}

.writing-subtitle {
  margin-bottom: 0 !important;
  opacity: 0.7;
  font-size: 14px;
}

.writing-content {
  flex: 1;
  display: flex;
  overflow: visible;
  position: relative;
  height: auto;
  min-height: calc(100vh - 100px);
}

.writing-input-col, 
.writing-output-col {
  padding: 16px;
  height: auto;
  overflow-y: visible;
}

.writing-input-col {
  border-right: 1px solid #f0f0f0;
  width: 40%;
  max-width: 500px;
  min-width: 300px;
}

.writing-container.dark .writing-input-col {
  border-right-color: #303030;
}

.writing-output-col {
  flex: 1;
}

.writing-card {  
  height: auto;  
  box-shadow: none;
  border-radius: 8px;
  overflow: visible;  
  display: flex;  
  flex-direction: column;
  background-color: transparent;
  margin-bottom: 16px;
}

.writing-card .ant-card-head {
  padding: 12px 16px;
  background-color: #fff;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 8px 8px 0 0;
}

.writing-container.dark .writing-card .ant-card-head {
  background-color: #1e1e1e;
  border-bottom-color: #303030;
}

.card-title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
}

.settings-icon {
  margin-left: 8px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.6;
}

.settings-icon:hover {
  opacity: 1;
}

.writing-card .ant-card-body {
  padding: 16px;
  background-color: #fff;
  border-radius: 0 0 8px 8px;
}

.writing-container.dark .writing-card .ant-card-body {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

.writing-params {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.param-section {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid #f0f0f0;
}

.writing-container.dark .param-section {
  background-color: #262626;
  border-color: #303030;
}

.param-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.selected-option-name {
  font-size: 12px;
  opacity: 0.7;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.writing-grid-button {
  height: auto;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.3s;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  min-height: 64px;
}

.writing-grid-button .writing-button-icon {
  font-size: 18px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background-color: rgba(24, 144, 255, 0.1);
  color: #1890ff;
}

.writing-grid-button .writing-button-text {
  font-size: 12px;
  line-height: 1.2;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 修复按钮选中状态样式 */
.button-grid .ant-btn-primary {
  background-color: #1890ff;
  border-color: #1890ff;
  color: white;
  box-shadow: 0 2px 6px rgba(24, 144, 255, 0.2);
}

.button-grid .ant-btn-primary:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.button-grid .ant-btn-primary .writing-button-icon {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.writing-container.dark .button-grid .ant-btn-primary {
  background-color: #177ddc;
  border-color: #177ddc;
}

.writing-container.dark .button-grid .ant-btn-primary .writing-button-icon {
  background-color: rgba(255, 255, 255, 0.15);
}

.more-button {
  background-color: transparent;
  border: 1px dashed #d9d9d9;
  color: rgba(0, 0, 0, 0.45);
}

.expanded-options {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #f0f0f0;
}

.writing-container.dark .expanded-options {
  border-top-color: #303030;
}

.slider-container {
  padding: 0 8px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.ant-slider-mark-text {
  font-size: 10px;
}

.expanded-options .ant-select-dropdown {
  max-width: 400px !important;
  width: auto !important;
  min-width: 200px !important;
}

.expanded-options .ant-select {
  width: 100%;
}

.expanded-options .ant-select-item {
  padding: 8px 12px;
  border-radius: 4px;
}

.expanded-options .ant-select-item-option-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  white-space: normal;
  line-height: 1.3;
}

.expanded-options .ant-space {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.expanded-options .ant-space-item {
  margin-right: 8px;
  display: flex;
}

.expanded-options .ant-select-item-option-content .ant-space-item:last-child {
  flex: 1;
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
}

.expanded-options .ant-space-item:first-child {
  color: #1890ff;
  font-size: 16px;
}

.expanded-options .ant-space-item:not(:first-child) {
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.ant-slider-handle {
  border-color: #1890ff;
}

.ant-slider-track {
  background-color: #1890ff;
}

.prompt-input {
  margin-bottom: 16px;
}

.prompt-textarea {
  margin-top: 8px;
  border-radius: 8px;
  resize: none;
}

.action-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.submit-button {
  width: 100%;
}

.input-card .ant-card-body,
.output-card .ant-card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: auto;
}

.output-content {  
  flex: 1;
  padding: 16px;
  border-radius: 8px;
  background-color: #fafafa;
  min-height: 200px;
  overflow-wrap: break-word;
}

.writing-container.dark .output-content {
  background-color: #262626;
}

.char-counter {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  text-align: right;
  margin-top: 4px;
}

.writing-container.dark .char-counter {
  color: rgba(255, 255, 255, 0.45);
}

.ant-empty-image {
  opacity: 0.5;
}

.ant-empty-description {
  color: rgba(0, 0, 0, 0.45);
}

@media (max-width: 768px) {  
  .writing-container {    
    padding: 0;
    overflow-x: hidden;
  }
  
  .writing-content {    
    flex-direction: column;
    height: auto;
    min-height: auto;
  }
  
  .writing-input-col,
  .writing-output-col {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 8px;
    height: auto;
    overflow-y: visible;
  }
  
  .writing-input-col {
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .writing-container.dark .writing-input-col {
    border-bottom-color: #303030;
  }
  
  .writing-card {
    margin-bottom: 16px;
  }
  
  .header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .header-controls {
    width: 100%;
    justify-content: flex-end;
    display: flex;
  }
  
  .button-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
  
  .writing-grid-button {
    padding: 4px;
    min-height: 56px;
  }
  
  .writing-button-icon {
    font-size: 16px;
  }
  
  .more-button {
    min-height: 56px;
  }
  
  .output-content {
    min-height: 150px;
  }
  
  .expanded-options .ant-select-dropdown {
    max-width: 300px !important;
  }
  
  .expanded-options .ant-select-item {
    padding: 6px 8px;
  }
  
  .expanded-options .ant-space {
    flex-wrap: wrap;
  }
  
  .expanded-options .ant-space-item:nth-child(2) {
    flex: 1;
    min-width: 0;
    font-weight: 500;
  }
  
  .expanded-options .ant-space-item:last-child {
    width: 100%;
    margin-top: 4px !important;
    margin-left: 24px !important;
    font-size: 11px;
  }
  
  .writing-container.dark .expanded-options .ant-space-item:last-child {
    color: rgba(255, 255, 255, 0.45);
  }
}

.system-prompt-textarea {
  border-radius: 8px;
  resize: vertical;
  font-family: monospace;
}

.writing-container ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.writing-container ::-webkit-scrollbar-track {
  background: transparent;
}

.writing-container ::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.writing-container.dark ::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
}

.writing-container ::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.writing-container.dark ::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  text-align: center;
  padding: 24px;
}

.empty-content-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
  color: #1890ff;
}

.writing-container.dark .empty-content-icon {
  color: #177ddc;
}

.empty-content-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.writing-container.dark .empty-content-title {
  color: rgba(255, 255, 255, 0.85);
}

.empty-content-desc {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.45);
}

/* 深色主题下统一文字颜色 - 使用更强的选择器 */
.writing-container.dark,
.writing-container.dark .ant-typography,
.writing-container.dark .ant-typography p,
.writing-container.dark .ant-typography span {
  color: #e0e0e0 !important;
}

.writing-container.dark .ant-typography-strong,
.writing-container.dark .ant-typography strong {
  color: rgba(255, 255, 255, 0.85) !important;
}

.writing-container.dark .ant-typography-secondary,
.writing-container.dark .ant-typography-secondary span {
  color: rgba(255, 255, 255, 0.65) !important;
}

.writing-container.dark .selected-option-name {
  color: rgba(255, 255, 255, 0.65) !important;
}

.writing-container.dark .ant-card-head-title {
  color: rgba(255, 255, 255, 0.85) !important;
}

.writing-container.dark .ant-empty-description {
  color: rgba(255, 255, 255, 0.45) !important;
}

.writing-container.dark .char-counter {
  color: rgba(255, 255, 255, 0.45) !important;
}

.writing-container.dark .ant-slider-mark-text {
  color: rgba(255, 255, 255, 0.45) !important;
}

.writing-container.dark .ant-slider-mark-text-active {
  color: rgba(255, 255, 255, 0.65) !important;
}

.writing-container.dark .ant-input,
.writing-container.dark .ant-input-textarea,
.writing-container.dark .ant-input-affix-wrapper {
  color: rgba(255, 255, 255, 0.85) !important;
}

.writing-container.dark .ant-input::-moz-placeholder, .writing-container.dark .ant-input-textarea::-moz-placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

.writing-container.dark .ant-input::placeholder,
.writing-container.dark .ant-input-textarea::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

.writing-container.dark .ant-select-selector {
  color: rgba(255, 255, 255, 0.85) !important;
}

.writing-container.dark .ant-select-selection-item {
  color: rgba(255, 255, 255, 0.85) !important;
}

.writing-container.dark .writing-subtitle {
  color: rgba(255, 255, 255, 0.65) !important;
}

.writing-container.dark .param-header .ant-typography {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 防止样式超出布局 */
.writing-container {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

.writing-content {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

.writing-input-col,
.writing-output-col {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

.writing-container .writing-card {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

.writing-container .param-section {
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.writing-container .button-grid {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.writing-container .ant-btn {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.writing-container .ant-select {
  max-width: 100% !important;
}

.writing-container .writing-params {
  max-width: 100% !important;
}

.writing-container .ant-slider {
  max-width: 100% !important;
}

/* 流式内容显示区域 */
.writing-container .output-content {
  overflow-x: hidden !important;
  max-width: 100% !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

/* 确保所有子元素不会超出容器 */
.writing-container * {
  box-sizing: border-box !important;
}

.writing-container .writing-grid-button {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ant-select-dropdown {
  max-height: 400px;
} /* AI导航页面样式 */
.ai-navigation-container {
  background: linear-gradient(135deg, 
    var(--bg-color) 0%, 
    rgba(24, 144, 255, 0.05) 100%);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-navigation-header {
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(24, 144, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ai-navigation-title {
  background: linear-gradient(135deg, #1890ff 0%, #722ed1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-navigation-iframe-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 2px solid rgba(24, 144, 255, 0.1);
  transition: all 0.3s ease;
}

.ai-navigation-iframe-container:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
  border-color: rgba(24, 144, 255, 0.2);
  transform: translateY(-2px);
}

.ai-navigation-iframe {
  transition: opacity 0.3s ease;
}

.ai-navigation-loading {
  background: linear-gradient(45deg, 
    rgba(24, 144, 255, 0.1) 25%, 
    transparent 25%, 
    transparent 50%, 
    rgba(24, 144, 255, 0.1) 50%, 
    rgba(24, 144, 255, 0.1) 75%, 
    transparent 75%, 
    transparent);
  background-size: 20px 20px;
  animation: loading-stripe 1s linear infinite;
}

@keyframes loading-stripe {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 20px 20px;
  }
}

.ai-navigation-action-buttons .ant-btn {
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-navigation-action-buttons .ant-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ai-navigation-action-buttons .ant-btn-primary {
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  border: none;
}

.ai-navigation-action-buttons .ant-btn-primary:hover {
  background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
}

.ai-navigation-empty-state {
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  border: 2px dashed rgba(24, 144, 255, 0.3);
  transition: all 0.3s ease;
}

.ai-navigation-empty-state:hover {
  border-color: rgba(24, 144, 255, 0.5);
  background: rgba(255, 255, 255, 0.7);
}

.ai-navigation-global-icon {
  color: #1890ff;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 暗色主题适配 */
[data-theme="dark"] .ai-navigation-container {
  background: linear-gradient(135deg, 
    var(--bg-color) 0%, 
    rgba(24, 144, 255, 0.1) 100%);
}

[data-theme="dark"] .ai-navigation-header {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .ai-navigation-iframe-container {
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .ai-navigation-iframe-container:hover {
  border-color: rgba(24, 144, 255, 0.3);
}

[data-theme="dark"] .ai-navigation-empty-state {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .ai-navigation-empty-state:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(24, 144, 255, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .ai-navigation-header {
    padding: 12px;
  }
  
  .ai-navigation-action-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .ai-navigation-action-buttons .ant-btn {
    width: 100%;
  }
}

/* 加载动画增强 */
.ai-navigation-spinner {
  position: relative;
}

.ai-navigation-spinner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border: 3px solid rgba(24, 144, 255, 0.2);
  border-top: 3px solid #1890ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
} /* === Base Layout & Theme === */
.batch-production-container {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  background-color: #f5f7fa;
  overflow: hidden;
}

.batch-production-container.dark {
  background-color: #141414;
  color: rgba(255, 255, 255, 0.85);
}

.batch-production-container:not(.dark) {
    --bg-color: #f7f8fa;
    --sider-bg-color: #ffffff;
    --content-bg-color: #f7f8fa;
    --card-bg-color: #ffffff;
    --border-color: #e8e8e8;
    --text-color-primary: #333;
    --text-color-secondary: #888;
    --hover-bg-color: #f0f0f0;
}


/* === Page Header === */
.page-header {
  padding: 16px 24px;
  background-color: #f5f7fa;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title .anticon {
  font-size: 24px;
  color: #1890ff;
}

.page-title h3.ant-typography {
  margin: 0;
}

.mode-switcher {
  margin-left: auto;
}

/* 模式切换器样式优化 */
.mode-segmented {
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 2px;
}

.mode-segmented .ant-segmented-item {
  transition: all 0.3s;
  padding: 6px 12px;
}

.mode-segmented .ant-segmented-item-selected {
  background-color: #1890ff;
  color: white;
}

/* 暗色模式适配 */
.dark .page-header {
  background-color: #1f1f1f;
  border-bottom: 1px solid #303030;
}

.dark .page-title .anticon {
  color: #177ddc;
}

.dark .mode-segmented .ant-segmented-item-selected {
  background-color: #177ddc;
}

/* === Main Layout (Handles Scrolling) === */
.simple-mode-layout,
.advanced-mode-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

.advanced-mode-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
  gap: 20px;
  height: calc(100vh - 220px);
  max-height: calc(100vh - 220px);
}

.advanced-mode-layout .center-layout {
  flex: 1;
  overflow: auto;
  padding-right: 10px;
}

.advanced-mode-layout .main-content-area {
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: visible;
}

.advanced-mode-layout .workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
}

.advanced-mode-layout .input-card {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: visible;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.dark .advanced-mode-layout .input-card {
  background-color: #1f1f1f;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 强制覆盖 Ant Design Layout 背景 */
.batch-production-container.dark .ant-layout,
.batch-production-container.dark .ant-layout-sider,
.batch-production-container.dark .ant-layout-content {
  background-color: transparent !important;
}

.batch-production-container.dark .advanced-mode-layout {
  background-color: transparent !important;
}

.batch-production-container.dark .advanced-mode-layout .center-layout {
  background-color: transparent !important;
}

.batch-production-container.dark .advanced-mode-layout .main-content-area {
  background-color: transparent !important;
}

.batch-production-container.dark .workspace {
  background-color: transparent !important;
}

/* 强制覆盖卡片背景 */
.batch-production-container.dark .input-card.ant-card,
.batch-production-container.dark .input-card.ant-card .ant-card-body,
.batch-production-container.dark .input-card.ant-card .ant-card-head {
  background-color: #1e1e1e !important;
  border-color: #303030 !important;
  color: #e0e0e0 !important;
}

.batch-production-container.dark .result-card.ant-card,
.batch-production-container.dark .result-card.ant-card .ant-card-body,
.batch-production-container.dark .result-card.ant-card .ant-card-head {
  background-color: #1e1e1e !important;
  border-color: #303030 !important;
}

/* 确保卡片内的文字颜色正确 */
.batch-production-container.dark .input-card .ant-typography,
.batch-production-container.dark .input-card .ant-typography p,
.batch-production-container.dark .input-card .ant-typography span {
  color: rgba(255, 255, 255, 0.85) !important;
}

.batch-production-container.dark .input-card .ant-card-head-title {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 修复 param-section 区域白色背景 */
.batch-production-container.dark .param-section,
.batch-production-container.dark .param-section.main-input-section,
.batch-production-container.dark .param-section.content-type-section,
.batch-production-container.dark .param-section.style-type-section,
.batch-production-container.dark .param-section.word-count-section {
  background-color: #1e1e1e !important;
  border-color: #303030 !important;
}

.batch-production-container.dark .param-header strong,
.batch-production-container.dark .param-header .ant-typography {
  color: #e0e0e0 !important;
}

.batch-production-container.dark .selected-option-name {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* 修复 main-textarea-container 和 main-textarea */
.batch-production-container.dark .main-textarea-container {
  background-color: transparent !important;
}

.batch-production-container.dark .main-textarea,
.batch-production-container.dark textarea.main-textarea,
.batch-production-container.dark .main-textarea.ant-input,
.batch-production-container.dark .main-textarea.ant-input-outlined {
  background-color: #141414 !important;
  color: #ffffff !important;
  border-color: #404040 !important;
}

.batch-production-container.dark .main-textarea::-moz-placeholder {
  color: #8c8c8c !important;
}

.batch-production-container.dark .main-textarea::placeholder {
  color: #8c8c8c !important;
}

/* 修复输入框内的文字 */
.batch-production-container.dark .main-textarea-container .ant-input {
  background-color: #141414 !important;
  color: #ffffff !important;
  border-color: #404040 !important;
}

/* 自定义输入表单样式 */
.advanced-input-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  max-height: none;
}

.advanced-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.advanced-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.advanced-title h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.advanced-title .anticon {
  font-size: 18px;
  color: #1890ff;
}

.main-input-section {
  order: -1;
  margin-bottom: 20px;
}

.main-textarea-container {
  margin-bottom: 20px;
}

.main-textarea {
  width: 100%;
  border-radius: 8px;
  resize: vertical;
  font-size: 14px;
  transition: all 0.3s;
}

.custom-fields-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: visible;
}

.custom-field-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background-color: #f7f7f7;
  border-radius: 8px;
  border-left: 3px solid #1890ff;
  transition: all 0.3s;
}

.custom-field-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dark .custom-field-item {
  background-color: #242424;
  border-left: 3px solid #177ddc;
}

.field-input-container {
  margin-top: 12px;
}

.field-input-container .ant-input {
  border-radius: 6px;
}

.field-input-container .ant-input-textarea {
  border-radius: 6px;
}

.required-field {
  border-color: #ff4d4f;
}

.required-field:hover, .required-field:focus {
  border-color: #ff7875;
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

/* 高级设置侧边栏 */
.advanced-settings-sider {
  width: 320px !important;
  max-width: 320px !important;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  height: -moz-fit-content;
  height: fit-content;
  max-height: calc(100vh - 220px);
  margin-top: 0;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.advanced-settings-sider.collapsed {
  width: 50px !important;
  max-width: 50px !important;
}

.sider-trigger {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f7f7f7;
  border-top: 1px solid #e8e8e8;
  cursor: pointer;
  transition: all 0.3s;
}

.sider-trigger:hover {
  background-color: #f0f0f0;
}

.dark .sider-trigger {
  background-color: #303030;
  border-top: 1px solid #404040;
}

.dark .sider-trigger:hover {
  background-color: #404040;
}

.dark .advanced-settings-sider {
  background-color: #1f1f1f;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 重新调整侧边栏折叠/展开按钮位置 */
.advanced-settings-sider .ant-layout-sider-trigger {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background-color: #f7f7f7 !important;
  color: #888;
  border-top: 1px solid #e8e8e8;
  border-radius: 0 0 8px 8px;
}

.dark .advanced-settings-sider .ant-layout-sider-trigger {
  background-color: #303030 !important;
  color: #bbb;
  border-top: 1px solid #404040;
}

.advanced-settings-sider .ant-layout-sider-trigger:hover {
  background-color: #f0f0f0 !important;
  color: #666;
}

.dark .advanced-settings-sider .ant-layout-sider-trigger:hover {
  background-color: #404040 !important;
  color: #fff;
}

.advanced-settings-content {
  padding: 20px;
}

.advanced-settings-content .ant-typography {
  margin-bottom: 24px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.advanced-settings-content .ant-typography .anticon {
  color: #1890ff;
}

.advanced-settings-content .ant-form-item-label {
  font-weight: 500;
}

.advanced-settings-content .ant-input,
.advanced-settings-content .ant-select-selector {
  border-radius: 6px;
}

/* 输出结果区域样式 */
.output-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  overflow: visible;
}

.batch-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.batch-output-header .ant-typography {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.batch-output-header .anticon {
  color: #1890ff;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 20px;
  margin-bottom: 16px;
  overflow-y: visible;
  padding: 8px;
  width: 100%;
}

.result-card {
  height: 100%;
  transition: all 0.3s;
  border-radius: 8px;
  overflow: hidden;
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-card-completed {
  border-left: 4px solid #52c41a;
  animation: card-complete-animation 0.6s ease-out;
}

.result-card-pending {
  border-left: 4px solid #faad14;
}

.result-card.error {
  border-left: 4px solid #f5222d;
}

.result-card .ant-card-head {
  background-color: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 16px;
}

.result-card .ant-card-body {
  padding: 16px;
  max-height: 500px;
  overflow-y: auto;
}

.dark .result-card .ant-card-head {
  background-color: #242424;
  border-bottom: 1px solid #303030;
}

.result-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
  position: relative;
}

.result-title {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-status {
  display: flex;
  margin-right: 12px;
}

.result-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.results-list {
  overflow-y: visible;
  padding: 8px;
  width: 100%;
}

.results-list .ant-collapse {
  background: transparent;
  border: none;
}

.results-list .ant-collapse-item {
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
}

.results-list .ant-collapse-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.09);
}

.dark .results-list .ant-collapse-item {
  border: 1px solid #303030;
}

.results-list .ant-collapse-header {
  background-color: #fafafa;
  padding: 12px 16px !important;
}

.dark .results-list .ant-collapse-header {
  background-color: #242424;
}

.result-panel.completed {
  border-left: 4px solid #52c41a;
}

.result-panel.generating {
  border-left: 4px solid #1890ff;
}

.result-panel.error {
  border-left: 4px solid #f5222d;
}

.result-panel.pending {
  border-left: 4px solid #faad14;
}

.result-content {
  padding: 20px;
  overflow: auto;
  max-height: 400px;
  background-color: #fff;
}

.dark .result-content {
  background-color: #1f1f1f;
}

.result-panel-footer {
  padding: 12px 16px;
  background-color: #fafafa;
  border-top: 1px solid #f0f0f0;
}

.dark .result-panel-footer {
  background-color: #242424;
  border-top: 1px solid #303030;
}

.empty-results-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: #bfbfbf;
}

.empty-results {
  text-align: center;
}

.empty-results .anticon {
  font-size: 48px;
  margin-bottom: 16px;
  color: #d9d9d9;
}

.dark .empty-results .anticon {
  color: #434343;
}

/* 完成状态样式美化 */
.ant-tag.ant-tag-success {
  background-color: #f6ffed;
  border-color: #b7eb8f;
}

.dark .ant-tag.ant-tag-success {
  background-color: rgba(82, 196, 26, 0.2);
  border-color: #274916;
}

.ant-tag.ant-tag-processing {
  background-color: #e6f7ff;
  border-color: #91d5ff;
}

.dark .ant-tag.ant-tag-processing {
  background-color: rgba(24, 144, 255, 0.2);
  border-color: #153450;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .mode-switcher {
    margin-left: 0;
    width: 100%;
    margin-top: 10px;
  }
  
  .mode-segmented {
    width: 100%;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .advanced-mode-layout {
    flex-direction: column;
    height: auto;
    max-height: none;
    overflow-y: visible;
  }
  
  .advanced-settings-sider {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 20px;
    max-height: none;
  }
  
  .button-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .results-grid, .results-list {
    max-height: none;
  }
}

/* 提交按钮样式增强 */
.submit-button {
  min-width: 120px;
  height: 40px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.submit-button .anticon {
  font-size: 18px;
}

/* 写作类型和风格选择按钮组样式 */
.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.grid-button {
  height: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s;
}

.grid-button .anticon {
  font-size: 18px;
  margin-bottom: 6px;
}

/* 选中状态的按钮样式 */
.grid-button.ant-btn-primary {
  background-color: #1890ff;
  border-color: #1890ff;
  color: white;
}

/* 悬停效果 */
.grid-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.param-section {
  margin-bottom: 24px;
}

.param-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.selected-option-name {
  font-size: 13px;
}

@keyframes card-complete-animation {
  0% {
    box-shadow: 0 0 0 rgba(82, 196, 26, 0);
  }
  50% {
    box-shadow: 0 0 10px rgba(82, 196, 26, 0.5);
  }
  100% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
}

/* 新增 - 修复专业模式下的内容区域和输出区域重叠问题 */
.results-container {
  margin-top: 20px;
  padding-bottom: 30px;
  min-height: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* 简易模式样式优化 */
.simple-mode-layout {
  height: calc(100vh - 180px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.simple-mode-layout .workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.simple-mode-layout .input-card {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.simple-mode-layout .output-container {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 修复简易模式下的结果区域滚动 */
.simple-mode-layout .results-grid,
.simple-mode-layout .results-list {
  overflow-y: auto !important;
  max-height: calc(100vh - 380px); /* 增加显示区域高度 */
  padding-bottom: 30px; /* 添加底部填充 */
}

/* 网格视图样式 */
.simple-mode-layout .results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 20px;
}

/* 优化卡片高度和内容显示 */
.simple-mode-layout .result-card {
  height: calc((100vh - 400px) / 2); /* 增加卡片高度，减少顶部间距计算 */
  display: flex;
  flex-direction: column;
  min-height: 400px; /* 确保最小高度 */
}

.simple-mode-layout .result-card .ant-card-head {
  flex-shrink: 0;
}

.simple-mode-layout .result-card .ant-card-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  max-height: unset; /* 移除最大高度限制 */
}

.simple-mode-layout .result-card-content {
  height: 100%;
  overflow-y: auto;
}

/* 确保结果内容可滚动 */
.result-card-content {
  max-height: none; /* 移除最大高度限制 */
  overflow-y: auto;
  height: 100%;
}

.dark .simple-mode-layout .input-card {
  background-color: #1f1f1f;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 完全折叠状态 - 只显示折叠图标 */
.advanced-settings-sider.fully-collapsed {
  width: 50px !important;
  max-width: 50px !important;
}

.advanced-settings-sider.fully-collapsed .advanced-settings-content {
  display: none;
}

/* 简易模式输入区域折叠功能 */
.simple-mode-layout .input-card {
  transition: all 0.3s ease;
  overflow: hidden;
}

.simple-mode-layout .input-card.collapsed {
  padding: 12px;
  min-height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.simple-mode-layout .expand-input-button {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #1890ff;
}

.simple-mode-layout .collapse-input-button {
  position: absolute;
  right: 16px;
  top: 16px;
}

/* 调整AI生成提示标签位置 */
.result-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
  position: relative;
}

/* 确保简易模式卡片在折叠后有足够的空间 */
.simple-mode-layout.input-collapsed .results-grid, 
.simple-mode-layout.input-collapsed .results-list {
  max-height: calc(100vh - 200px); /* 增加显示区域高度 */
}

/* 简易模式折叠后调整容器高度 */
.simple-mode-layout .workspace {
  transition: all 0.3s ease;
}

/* 调整卡片内AI提示组件的位置 */
.result-card .ant-card-head .result-panel-header div[style*="display: flex"] {
  margin-left: 8px;
  margin-right: 8px;
}

/* 在卡片视图中调整按钮位置 */
.simple-mode-layout .collapse-input-button,
.simple-mode-layout .expand-input-button {
  z-index: 5;
}

/* 防止AI提示标签换行 */
.result-panel-header > div:not(.result-title):not(.result-status):not(.result-actions) {
  flex-shrink: 0;
  white-space: nowrap;
}

/* 给AI生成提示组件增加适当的间距 */
.result-panel-header > div[style*="display: flex"] {
  margin-right: auto;
  margin-left: 8px;
} 

/* ===== 专业模式下完整的深色主题适配 ===== */

/* 侧边栏背景 */
.dark .advanced-settings-sider {
  background-color: #1e1e1e !important;
}

/* 内容区域背景 */
.dark .advanced-settings-content {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

/* 标题文字 */
.dark .advanced-settings-content .ant-typography,
.dark .advanced-settings-content .ant-typography p,
.dark .advanced-settings-content .ant-typography span {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 标签 */
.dark .advanced-settings-content .ant-form-item-label {
  color: rgba(255, 255, 255, 0.85) !important;
}

.dark .advanced-settings-content .ant-form-item-label label {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 输入框 */
.dark .advanced-settings-content .ant-input,
.dark .advanced-settings-content .ant-input-affix-wrapper,
.dark .advanced-settings-content .ant-input-textarea {
  background-color: #262626 !important;
  color: rgba(255, 255, 255, 0.85) !important;
  border-color: #404040 !important;
}

.dark .advanced-settings-content .ant-input::-moz-placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

.dark .advanced-settings-content .ant-input::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* 选择器 */
.dark .advanced-settings-content .ant-select-selector {
  background-color: #262626 !important;
  color: rgba(255, 255, 255, 0.85) !important;
  border-color: #404040 !important;
}

.dark .advanced-settings-content .ant-select-selection-item {
  color: rgba(255, 255, 255, 0.85) !important;
}

.dark .advanced-settings-content .ant-select-selection-placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* 下拉菜单 */
.dark .ant-select-dropdown {
  background-color: #1f1f1f !important;
  border-color: #404040 !important;
}

.dark .ant-select-dropdown .ant-select-item {
  color: rgba(255, 255, 255, 0.85) !important;
}

.dark .ant-select-dropdown .ant-select-item-option-active {
  background-color: #2a2a2a !important;
}

.dark .ant-select-dropdown .ant-select-item-option-selected {
  background-color: #1e1e1e !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 数字输入框 */
.dark .advanced-settings-content .ant-input-number {
  background-color: #262626 !important;
  color: rgba(255, 255, 255, 0.85) !important;
  border-color: #404040 !important;
}

.dark .advanced-settings-content .ant-input-number-input {
  background-color: transparent !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 滑块 */
.dark .ant-slider-track {
  background-color: #177ddc !important;
}

.dark .ant-slider-rail {
  background-color: #404040 !important;
}

.dark .ant-slider-handle {
  border-color: #177ddc !important;
}

.dark .ant-slider-mark-text {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* 开关 */
.dark .ant-switch {
  background-color: #404040 !important;
}

.dark .ant-switch-checked {
  background-color: #177ddc !important;
}

/* 复选框 */
.dark .ant-checkbox-inner {
  background-color: #262626 !important;
  border-color: #404040 !important;
}

.dark .ant-checkbox-wrapper {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 单选框 */
.dark .ant-radio-inner {
  background-color: #262626 !important;
  border-color: #404040 !important;
}

.dark .ant-radio-wrapper {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 分割线 */
.dark .ant-divider {
  border-color: #303030 !important;
}

/* 标签 */
.dark .ant-tag {
  color: rgba(255, 255, 255, 0.85) !important;
  background-color: #262626 !important;
  border-color: #404040 !important;
}

/* 提示框 */
.dark .ant-popover-inner {
  background-color: #1f1f1f !important;
  border-color: #404040 !important;
}

.dark .ant-popover-title,
.dark .ant-popover-inner-content {
  color: rgba(255, 255, 255, 0.85) !important;
}

.dark .ant-popover-arrow {
  background-color: #1f1f1f !important;
}

/* 输出区域 */
.dark .output-container {
  background-color: #141414;
  color: #e0e0e0;
}

.dark .batch-output-header .ant-typography {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 输出卡片 */
.dark .result-card {
  background-color: #1e1e1e !important;
  border-color: #303030 !important;
}

.dark .result-card .ant-card-body {
  background-color: #1e1e1e;
  color: rgba(255, 255, 255, 0.85);
}

.dark .result-card .ant-card-head-title {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 空状态 */
.dark .ant-empty-description {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* 模态框 */
.dark .ant-modal-content {
  background-color: #1f1f1f !important;
  color: #e0e0e0;
}

.dark .ant-modal-header {
  background-color: #1f1f1f !important;
}

.dark .ant-modal-title {
  color: rgba(255, 255, 255, 0.85) !important;
}

.dark .ant-modal-footer {
  border-color: #303030 !important;
}

/* 表单错误提示 */
.dark .ant-form-item-explain-error {
  color: #ff4d4f !important;
}

/* 分割面板 */
.dark .center-layout,
.dark .main-content-area {
  background-color: #141414;
  color: #e0e0e0;
}

/* 工作区域 */
.dark .workspace {
  color: #e0e0e0;
}

/* 高级模式的输入表单 */
.dark .advanced-input-form {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

.dark .advanced-input-form .ant-form-item-label label {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Segmented 模式切换器 */
.dark .ant-segmented {
  background-color: #262626 !important;
  color: rgba(255, 255, 255, 0.65) !important;
}

.dark .ant-segmented-item-selected {
  background-color: #177ddc !important;
  color: #fff !important;
}

.dark .ant-segmented-item {
  color: rgba(255, 255, 255, 0.65) !important;
}

.dark .ant-segmented-item:hover {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* 滚动条 */
.dark .advanced-settings-content::-webkit-scrollbar,
.dark .center-layout::-webkit-scrollbar,
.dark .main-content-area::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.dark .advanced-settings-content::-webkit-scrollbar-track,
.dark .center-layout::-webkit-scrollbar-track,
.dark .main-content-area::-webkit-scrollbar-track {
  background: transparent;
}

.dark .advanced-settings-content::-webkit-scrollbar-thumb,
.dark .center-layout::-webkit-scrollbar-thumb,
.dark .main-content-area::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.dark .advanced-settings-content::-webkit-scrollbar-thumb:hover,
.dark .center-layout::-webkit-scrollbar-thumb:hover,
.dark .main-content-area::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}/* 方法论分析页面样式 */
.methodology-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.methodology-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-color);
}

.page-title {
  display: flex;
  align-items: center;
}

.page-icon {
  margin-right: 8px;
  font-size: 20px;
  color: var(--primary-color);
}

.page-actions {
  display: flex;
  gap: 8px;
}

.methodology-content {
  flex: 1;
  overflow: auto;
  padding: 16px;
}

.methodology-selection {
  height: 100%;
  overflow: auto;
  padding: 0 16px 160px 16px;
}

/* 标签页样式 */
.methodology-tabs .ant-tabs-nav {
  margin-bottom: 24px;
}

.methodology-tabs .ant-tabs-tab {
  padding: 8px 16px;
}

.methodology-tabs .ant-tabs-tab-active {
  font-weight: 500;
}

/* 方法论卡片样式 */
.methodology-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 16px;
  background-color: var(--bg-color);
}

.methodology-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.methodology-card.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-color-bg);
}

.methodology-card-actions {
  display: flex;
  align-items: center;
}

.favorite-button {
  opacity: 0.6;
  transition: opacity 0.2s;
}

.methodology-card:hover .favorite-button,
.methodology-card.selected .favorite-button {
  opacity: 1;
}

.right-arrow-icon {
  margin-left: 4px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.methodology-card:hover .right-arrow-icon {
  opacity: 0.6;
  transform: translateX(2px);
}

/* 表单样式 */
.methodology-form-card {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.methodology-form-container {
  height: 100%;
  overflow: auto;
}

.card-title {
  font-weight: 500;
}

.settings-icon {
  cursor: pointer;
  transition: color 0.3s;
}

.settings-icon:hover {
  color: var(--primary-color);
}

.methodology-description {
  background-color: var(--bg-secondary);
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.form-field-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--primary-color-light);
  color: var(--primary-color);
  margin-right: 8px;
}

.form-textarea,
.form-input {
  border-radius: 6px;
}

.form-textarea:focus,
.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color-light);
}

.submit-button {
  padding: 0 32px;
  height: 40px;
}

.submit-shortcut-tip {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* 预览卡片样式 */
.methodology-preview-card {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  height: 100%;
}

.methodology-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.methodology-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
}

.field-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-item {
  padding: 12px;
  border-radius: 6px;
  background-color: var(--bg-secondary);
}

/* 结果页样式 */
.analysis-result-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 16px;
}

.result-main-content {
  display: flex;
  flex: 1;
  gap: 16px;
  overflow: hidden;
}

.input-summary-panel {
  width: 300px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  overflow: auto;
}

.input-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 500;
}

.input-summary-body {
  padding: 16px;
}

.summary-item {
  margin-bottom: 16px;
}

.summary-item-label {
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.summary-item-value {
  white-space: pre-wrap;
  font-size: 14px;
}

.result-card-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.result-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-content-area {
  flex: 1;
  overflow: auto;
  padding: 0 16px 16px 16px;
}

.mobile-summary-bar {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-color);
}

.result-actions {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .methodology-page-header {
    padding: 8px 12px;
  }
  
  .methodology-content {
    padding: 8px;
  }
  
  .methodology-selection {
    padding: 0 8px 120px 8px;
  }
  
  .methodology-card {
    padding: 12px;
  }
  
  .scroll-hint {
    text-align: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-secondary);
  }
  
  .result-main-content {
    flex-direction: column;
  }
  
  .result-card {
    max-height: none;
  }
}

/* 方法论分析页面样式 */
.methodology-container {
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

.methodology-page-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-color);
}

.methodology-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -16px -16px -16px;
  padding: 0 16px 16px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 移动端额外底部空间 */
@media (max-width: 768px) {
  .methodology-content {
    padding-bottom: 100px !important;
}
}

.page-title {
  display: flex;
  align-items: center;
}

.page-icon {
  margin-right: 8px;
  font-size: 24px;
  color: var(--primary-color);
}

.page-actions {
  display: flex;
  gap: 8px;
}

.methodology-tabs-container {
  margin-top: 16px;
}

/* 方法论卡片样式优化 */
.methodology-card {
  transition: all 0.3s ease;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  height: 100%;
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.methodology-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.methodology-card.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-color-bg) !important;
  box-shadow: 0 0 0 2px var(--primary-color-light);
  transform: translateY(-5px);
}

.methodology-card .favorite-button {
  opacity: 0.5;
  transition: all 0.2s;
}

.methodology-card:hover .favorite-button {
  opacity: 1;
}

.methodology-card .right-arrow-icon {
  opacity: 0;
  transition: all 0.2s;
}

.methodology-card:hover .right-arrow-icon {
  opacity: 0.6;
}

.methodology-card-actions {
  display: flex;
  align-items: center;
}

/* 表单样式优化 */
.methodology-form-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.methodology-description {
  padding: 16px;
  border-radius: 10px;
  background-color: var(--primary-color-bg);
  margin-bottom: 24px;
  border: 1px solid var(--primary-color-light);
}

.form-textarea,
.form-input {
  border-radius: 8px;
  padding: 10px 12px;
}

/* 表单数字标记 */
.form-field-number {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50%;
  background-color: var(--primary-color-light);
  color: var(--primary-color);
  font-size: 13px;
  margin-right: 8px;
  font-weight: bold;
}

/* 提交按钮优化 */
.submit-button {
  height: 48px;
  font-size: 16px;
  font-weight: 500;
}

.submit-shortcut-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* 结果页面样式 */
.result-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.input-summary {
  padding: 18px;
  margin-bottom: 24px;
  border-radius: 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.input-summary-title {
  font-weight: 500;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  font-size: 16px;
}

.input-summary-title .anticon {
  margin-right: 8px;
  color: var(--primary-color);
}

.input-summary-field {
  display: flex;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
}

.input-summary-label {
  flex: 0 0 25%;
  font-weight: 500;
  color: var(--text-secondary);
  padding-right: 10px;
}

.input-summary-value {
  flex: 0 0 70%;
  color: var(--text-color);
}

/* 方法论说明卡片 */
.methodology-preview-card {
  height: 100%;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.methodology-info .methodology-badges {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.methodology-badge {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
}

.field-item {
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
}

/* 复制按钮增强 */
.copy-button {
  transition: all 0.2s;
  height: auto !important;
  padding: 8px !important;
}

.copy-button:active {
  transform: scale(0.95);
  background-color: rgba(0, 0, 0, 0.1);
}

/* 内容显示区增强 */
.methodology-content-display .ant-btn {
  transition: all 0.2s;
}

.methodology-content-display .ant-btn-text:active,
.methodology-content-display .ant-btn-text:hover {
  background-color: var(--primary-color-bg) !important;
  color: var(--primary-color) !important;
}

.copy-button-enhanced .action-buttons button {
  min-width: 36px !important;
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 5px !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .methodology-page-header {
    padding: 12px 16px;
  }
  
  .methodology-content {
    padding: 12px;
    padding-bottom: 100px !important;
  }
  
  .methodology-selection {
    padding-bottom: 80px;
  }
  
  .methodology-form-container {
    padding-bottom: 80px;
  }
  
  /* 移动端卡片滚动样式 */
  .mobile-card-scroller {
    display: flex;
    overflow-x: auto;
    padding: 4px 0;
    margin: 0 -12px;
    padding: 0 12px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  
  .mobile-card-scroller::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  
  .mobile-card-scroller > div {
    flex: 0 0 80%;
    max-width: 80%;
    padding-right: 12px;
    box-sizing: border-box;
    scroll-snap-align: start;
  }
  
  /* 滚动提示 */
  .scroll-hint {
    text-align: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-secondary);
  }
  
  /* 标签页优化 */
  .methodology-tabs .ant-tabs-tab {
    padding: 8px 12px;
    margin-right: 8px;
}

  /* 表单字段优化 */
  .methodology-form .form-field-number {
    width: 20px !important;
    height: 20px !important;
    font-size: 12px;
}

  /* 输入概要优化 */
  .input-summary {
    padding: 12px;
    margin-bottom: 16px;
  }
  
  .input-summary-title {
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  .input-summary-field {
    margin-bottom: 8px;
    font-size: 12px;
  }
  
  .input-summary-label {
    flex: 0 0 30%;
  }
  
  .input-summary-value {
    flex: 0 0 70%;
  }
  
  /* 按钮优化 */
  .submit-button {
    height: 40px;
    font-size: 14px;
  }
  
  .copy-button {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .methodology-content-display .action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
  }
  
  .methodology-content-display .action-buttons button {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .methodology-content-display .action-buttons button .anticon {
    font-size: 18px !important;
}

  /* 触摸区域增大 */
  .mobile-touch-target {
    position: relative;
}

  .mobile-touch-target::before {
    content: '';
    position: absolute;
    left: -10px;
    top: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1;
}

  /* 按钮按下效果 */
  .copy-button:active {
    transform: scale(0.9);
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.1s ease;
}

  /* 结果卡片按钮 */
  .result-card .ant-card-extra .copy-button {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }
  
  .result-card .ant-card-extra .copy-button .anticon {
    font-size: 16px !important;
}

  .result-card .ant-card-extra .copy-button:active {
    transform: scale(0.9);
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.1s ease;
}

  .result-card .ant-card-extra .copy-button::before {
    content: '';
    position: absolute;
    left: -8px;
    top: -8px;
    right: -8px;
    bottom: -8px;
  }
} 

/* --- 新增：分析结果页面样式 --- */

.analysis-result-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  gap: 16px;
  box-sizing: border-box;
}

.result-main-content {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 16px;
  flex-direction: row;
  height: 100%;
}

.input-summary-panel {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--sidebar-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  height: 100%;
}

.input-summary-header {
  padding: 12px 16px;
  font-weight: 500;
  font-size: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-color);
}

.input-summary-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.summary-item {
  margin-bottom: 16px;
}
.summary-item:last-child {
  margin-bottom: 0;
}

.summary-item-label {
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 6px;
  font-size: 14px;
}

.summary-item-value {
  color: var(--text-secondary);
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-card-wrapper {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.result-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.result-card .ant-card-head {
  flex-shrink: 0;
}

.result-card .ant-card-body {
  padding: 0 !important;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 16px;
}

.result-header .anticon {
  color: var(--primary-color);
}

.result-content-area {
  flex: 1;
  min-height: 0;
  padding: 12px 24px 24px 24px;
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.result-actions {
  flex-shrink: 0;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.mobile-summary-bar {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .analysis-result-container {
    padding: 12px;
    height: auto; /* Allow container to grow with content */
  }
  
  .result-main-content {
    flex-direction: column;
    flex: 1 1 auto;
    min-height: unset;
  }

  .result-card {
    flex: initial;
  }
  
  .result-card .ant-card-body {
    display: block;
    min-height: unset;
  }

  .result-content-area {
    padding: 12px;
    overflow-y: visible; /* Remove inner scroll */
    height: auto;
    flex: initial;
    min-height: unset;
  }
}

.summary-drawer .ant-drawer-body {
  padding: 0;
}

/* --- 新增：下拉框对齐修复 --- */
.content-length-selector {
  text-align: left !important;
}

.content-length-selector .ant-select {
  text-align: left !important;
}

.content-length-select .ant-select-selector {
  text-align: left !important;
}

.content-length-select .ant-select-selection-item {
  text-align: left !important;
  padding-right: 0 !important;
}

/* 额外的下拉框对齐修复 */
.ant-select-dropdown {
  text-align: left !important;
}

.ant-select-item {
  text-align: left !important;
}

/* 强制修复移动端滚动问题 */
@media (max-width: 768px) {
  /* 强制禁用所有可能影响滚动的容器样式 */
  .methodology-container,
  .methodology-content,
  .analysis-result-container,
  .result-main-content,
  .result-card,
  .result-card .ant-card-body,
  .result-content-area,
  .stream-content-display {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-y: visible !important;
    flex: none !important;
    display: block !important;
  }
  
  /* 强制页面可滚动 */
  html, body {
    overflow-y: auto !important;
  }
  
  /* 修复移动端下拉框 */
  .content-length-select {
    width: 100% !important;
  }
  
  .content-length-select .ant-select-selector,
  .content-length-select .ant-select-selection-item {
    text-align: left !important;
    justify-content: flex-start !important;
  }
} /* Web版本全局样式 - 复制自popup版本 */

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

html, body, #root {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
}

/* 暗色模式 */
body.dark {
  background: #141414;
  color: #fff;
}

/* 全局按钮尺寸统一 - 缩小默认尺寸 */
.ant-btn {
  height: 30px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  line-height: 28px !important;
}

.ant-btn-sm {
  height: 24px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  line-height: 22px !important;
}

.ant-btn-lg {
  height: 36px !important;
  padding: 0 16px !important;
  font-size: 14px !important;
  line-height: 34px !important;
}

/* 暗色模式选择器样式 */
.dark-select .ant-select-selector {
  background: #2a2a2a !important;
  border-color: #434343 !important;
}

.dark-select .ant-select-selection-item,
.dark-select .ant-select-selection-placeholder {
  color: #fff !important;
}

/* 暗色模式卡片 */
.dark-card {
  background: #1f1f1f !important;
  border-color: #434343 !important;
}

.dark-card .ant-card-body {
  color: #fff !important;
}

/* 玻璃态效果卡片 */
.glass-effect-card-content {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.dark .glass-effect-card-content {
  background: rgba(40, 40, 40, 0.85);
  border-color: rgba(60, 60, 60, 0.5);
}

/* 输入框样式 */
.ant-input,
.ant-input-affix-wrapper {
  border-radius: 6px !important;
}

/* 标签页样式 */
.ant-tabs-nav {
  margin-bottom: 0 !important;
}

/* 下拉菜单样式 */
.ant-dropdown-menu {
  border-radius: 8px !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}

/* 模态框样式 */
.ant-modal-content {
  border-radius: 12px !important;
  overflow: hidden;
}

/* 消息提示样式 */
.ant-message {
  font-size: 12px !important;
}

/* 工具提示样式 */
.ant-tooltip {
  font-size: 12px !important;
}

/* 加载动画 */
.ant-spin {
  font-size: 12px !important;
}

/* 空状态样式 */
.ant-empty-description {
  font-size: 12px !important;
  color: #999 !important;
}

/* 进度条样式 */
.ant-progress-text {
  font-size: 11px !important;
}

/* 滑块样式 */
.ant-slider-mark-text {
  font-size: 11px !important;
}

/* 开关样式 */
.ant-switch {
  font-size: 11px !important;
}

/* 标签样式 */
.ant-tag {
  font-size: 11px !important;
}

/* 徽章样式 */
.ant-badge-text {
  font-size: 10px !important;
}

/* 走马灯指示器 */
.ant-carousel .slick-dots li button {
  height: 6px !important;
  width: 6px !important;
  border-radius: 50% !important;
}

/* 折叠面板 */
.ant-collapse-header {
  padding: 12px 16px !important;
  font-size: 13px !important;
}

.ant-collapse-content-box {
  padding: 12px 16px !important;
  font-size: 13px !important;
}

/* 表格样式 */
.ant-table {
  font-size: 12px !important;
}

.ant-table-thead > tr > th {
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* 列表样式 */
.ant-list-item-meta-title {
  font-size: 13px !important;
}

.ant-list-item-meta-description {
  font-size: 11px !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

body.dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

body.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .ant-btn {
    height: 28px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }
  
  .ant-modal {
    max-width: calc(100vw - 32px) !important;
  }
}