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

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #F4F6F9;
    color: #333;
    min-height: 100vh;
}

/* 主容器 - 左右布局 */
.container {
    width: 100%;
    height: 100vh;
    background: #F4F6F9;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    margin: 0;
    display: flex;
    flex-direction: row;
}

/* 弹出窗口模式 */
.popup-mode .container {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

/* 左侧边栏 */
.sidebar {
    width: 220px;
    background: #F4F6F9;
    color: #333;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
}

/* Logo区域 */
.logo-section {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.logo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 20px;
}

.logo-icon {
    width: 80%;
    height: auto;
    max-height: 42px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    object-fit: contain;
    content: url('icons/logo.png'); /* 默认使用浅色logo */
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.logo-subtitle {
    font-size: 12px;
    opacity: 0.7;
    color: #666;
}

/* 快捷操作区域 */
.quick-actions-sidebar {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.action-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
    flex: 1;
}

/* 版本信息样式 */
.version-info {
    padding: 16px;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
    text-align: center;
}

.version-text {
    font-size: 12px;
    color: #666;
    margin: 0;
    font-weight: 500;
}

.sidebar-action-btn {
    background: white;
    border: 1px solid #e9ecef;
    color: #333;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-action-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateX(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sidebar-action-btn:active {
    transform: translateX(2px);
}

.action-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.action-text {
    flex: 1;
}

/* 使用说明按钮样式 */
.help-action-btn {
    margin-top: auto;
    border-top: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
    background: #f8f9fa;
}

.help-action-btn:hover {
    background: #e9ecef;
    border-color: #007bff;
    transform: translateX(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 公告按钮样式 */
.announcement-btn {
    text-decoration: none;
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #333;
}

.announcement-btn:hover {
    background: #e9ecef;
    border-color: #007bff;
    color: #007bff;
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.announcement-btn:active {
    transform: none;
}

/* 帮助按钮区域 */
.help-section {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.help-btn-sidebar {
    background: white;
    border: 1px solid #e9ecef;
    color: #333;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.help-btn-sidebar:hover {
    background: #f8f9fa;
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.help-icon {
    font-size: 16px;
}

.help-text {
    flex: 1;
}

/* 底部小图标区域 */
.bottom-icons-section {
    padding: 12px 20px;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
}

.bottom-icons-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    align-items: center;
}

.bottom-icon-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    font-size: 14px;
    opacity: 0.7;
}

.bottom-icon-btn:hover {
    background: rgba(156, 163, 175, 0.1);
    color: #6b7280;
    opacity: 1;
    transform: none;
}

.bottom-icon-btn:active {
    transform: none;
    background: rgba(156, 163, 175, 0.15);
}

.bottom-icon {
    font-size: 14px;
    line-height: 1;
}

/* 右侧主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin: 12px;
    min-height: 0;
}

/* 顶部工具栏 */
.top-toolbar {
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    margin: 0;
    box-shadow: none;
}

.toolbar-left {
    display: flex;
    align-items: center;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* 内容区域 */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 24px;
    padding-bottom: 60px;
    position: relative;
    min-height: 0;
    height: calc(100vh - 24px - 24px - 60px);
}

/* 无结果时的居中布局 */
.content-area.no-result {
    justify-content: flex-start;
    align-items: stretch;
}

/* 有结果时的布局 */
.content-area.has-result {
    justify-content: flex-start;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 搜索区域 */
.search-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 24px;
    border: none;
    transition: all 0.3s ease;
}

/* 无结果时搜索区域布局 */
.content-area.no-result .search-section {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 有结果时搜索区域布局 */
.content-area.has-result .search-section {
    position: static;
    margin-bottom: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 无结果时result-section隐藏 */
.content-area.no-result .result-section {
    display: none;
}

/* 有结果时result-section占据主要空间 */
.content-area.has-result .result-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    margin-bottom: 20px;
    min-height: 0;
    align-items: center;
    justify-content: flex-start;
}

/* 无结果时selector-row在顶部 */
.content-area.no-result .selector-row {
    flex-shrink: 0;
    margin-bottom: 0;
}

/* 输入区域居中包装器 */
.input-center-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* 无结果时input-center-wrapper垂直居中 */
.content-area.no-result .input-center-wrapper {
    flex: 1;
    justify-content: center;
}

/* 有结果时隐藏input-center-wrapper */
.content-area.has-result .input-center-wrapper {
    display: block;
    flex: none;
    justify-content: flex-end;
    margin-top: auto;
}

/* 输入区域头部 */
.input-header {
    padding: 0 0 16px 0;
    text-align: center;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

/* 有结果时隐藏输入头部 */
.content-area.has-result .input-header {
    display: none;
}

/* 无结果时显示输入头部 */
.content-area.no-result .input-header {
    display: block;
}

.input-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.input-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.selector-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.selector-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 50%;
}

.model-selector,
.knowledge-base-selector,
.parameter-rule-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-selector label,
.knowledge-base-selector label,
.parameter-rule-selector label {
    display: none;
}

.model-select,
.knowledge-base-select,
.parameter-rule-select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 13px;
    background: white;
    color: #495057;
    transition: all 0.3s ease;
    min-width: 120px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

.model-select:focus,
.knowledge-base-select:focus,
.parameter-rule-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.model-select:hover,
.knowledge-base-select:hover,
.parameter-rule-select:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.model-select option,
.knowledge-base-select option,
.parameter-rule-select option {
    padding: 8px;
    font-size: 13px;
}

.selector-divider {
    color: #6c757d;
    font-size: 14px;
    font-weight: 300;
    margin: 0 4px;
}

.selector-right {
    display: flex;
    align-items: center;
}

.settings-button {
    background: #f8f9fa;
    border: 1px solid #ced4da;
    color: #495057;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.settings-button:hover {
    background: #e9ecef;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.settings-button:active {
    transform: translateY(0);
}

.settings-icon {
    font-size: 14px;
}

/* 新的输入区域设计 */
.input-container {
    position: relative;
    width: 800px;
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-container:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.question-input {
    width: 100%;
    padding: 16px 60px 16px 16px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 80px;
    background: transparent;
    outline: none;
    transition: all 0.3s ease;
}

.question-input:focus {
    outline: none;
}

.question-input::placeholder {
    color: #6c757d;
    opacity: 0.8;
}

/* 字符计数显示 */
.character-count {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-size: 12px;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
    transition: color 0.3s ease;
}

.character-count.warning {
    color: #ffc107;
}

.character-count.danger {
    color: #dc3545;
}

/* 提问按钮 */
.ask-button {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 10;
}

.ask-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.ask-button.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ask-button.active:active {
    transform: translateY(0);
}

.ask-button .button-text {
    display: none;
}

.ask-button .loading-spinner {
    display: none;
    animation: spin 1s linear infinite;
}

.ask-button.loading .loading-spinner {
    display: block;
}

.ask-button.loading .send-icon {
    display: none;
}

.send-icon {
    font-size: 18px;
    line-height: 1;
}

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

/* 结果区域 */
.result-section {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    align-items: center;
    justify-content: flex-start;
}

.result-container {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
    min-height: 400px;
    max-height: calc(100vh - 300px);
    width: 812px;
    max-width: 100%;
    margin: 0 auto;
    /* 减少布局抖动 */
    contain: layout style paint;
    will-change: scroll-position;
    /* 平滑滚动 */
    scroll-behavior: smooth;
    
    /* 自定义滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

/* Webkit浏览器的滚动条样式 */
.result-container::-webkit-scrollbar {
    width: 8px;
}

.result-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.result-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
    border: 1px solid transparent;
    background-clip: content-box;
}

.result-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
    background-clip: content-box;
}

.result-container::-webkit-scrollbar-thumb:active {
    background: #6b7280;
    background-clip: content-box;
}

.result-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 2px solid #f8f9fa;
    width: 100%;
    max-width: 760px;
    margin-left: 40px;
    text-align: left;
}

.result-text {
    line-height: 1.6;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 770px;
    /* 减少重排 */
    contain: layout style;
    /* 预分配空间 */
    min-height: 100px;
    margin-left: 30px;
    /* 平滑过渡 */
    transition: all 0.2s ease-out;
}

.result-text h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 20px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.result-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin: 16px 0 8px 0;
}

.result-text strong {
    font-weight: 600;
    color: #333;
}

.result-text em {
    font-style: italic;
    color: #6c757d;
}

.result-text code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e83e8c;
    border: 1px solid #e9ecef;
}

.result-text pre {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #e9ecef;
    margin: 16px 0;
}

/* 纯文本的pre标签样式 - 不显示背景和边框 */
.result-text pre.plain-text-pre {
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    margin: 0;
    overflow-x: visible;
}

.result-text pre code {
    background: none;
    padding: 0;
    border: none;
    color: #333;
}

.result-text blockquote {
    /* padding-left: 16px; */
    margin: 16px 0;
    color: #444;
}

.result-text hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 20px 0;
}

.result-text li {
    margin: 4px 0;
}

.result-text a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.result-text a:hover {
    border-bottom-color: #007bff;
}

.result-text p {
    margin: 12px 0;
    white-space: pre-line; /* 保持换行符 */
    line-height: 1.6; /* 改善换行后的行间距 */
}

/* 结果操作区域 */
.result-actions {
    border-top: 1px solid #e9ecef;
    padding-top: 16px;
    flex-shrink: 0;
    width: 100%;
    max-width: 800px;
}

.action-icons-row {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    align-items: center;
    padding-left: 10px;
}

.action-icon-btn {
    background: transparent !important;
    border: none;
    color: #9ca3af;
    padding: 6px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    font-size: 14px;
    opacity: 0.7;
}

.action-icon-btn:hover {
    background: #F8F8FA !important;
    color: #6b7280;
    opacity: 1;
    transform: none;
}

.action-icon-btn:active {
    transform: none;
    background: #F8F8FA !important;
}

.action-icon-btn.like-btn:hover {
    background: #F8F8FA !important;
    color: #28a745;
}

.action-icon-btn.dislike-btn:hover {
    background: #F8F8FA !important;
    color: #dc3545;
}

.action-icon-btn.export-btn:hover {
    background: #F8F8FA !important;
    color: #17a2b8;
}

.action-icon-btn.copy-btn:hover {
    background: #F8F8FA !important;
    color: #ffc107;
}

.action-icon-btn.clear-btn:hover {
    background: #F8F8FA !important;
    color: #dc3545;
}

.action-icon-btn.active {
    transform: none;
}

.action-icon-btn.like-btn.active {
    background: transparent !important;
    color: #28a745;
    opacity: 1;
}

.action-icon-btn.dislike-btn.active {
    background: transparent !important;
    color: #dc3545;
    opacity: 1;
}
/* 添加SVG图标的激活状态样式 */
.action-icon-btn.like-btn.active .action-icon-svg {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg) brightness(118%) contrast(119%) !important;
}

.action-icon-btn.dislike-btn.active .action-icon-svg {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%) !important;
}
/* 找到这些样式并修改 */
.action-icon-btn.like-btn.active {
    background: transparent !important;
    color: #28a745; /* 绿色 */
    opacity: 1;
}

.action-icon-btn.dislike-btn.active {
    background: transparent !important;
    color: #dc3545; /* 红色 */
    opacity: 1;
}

/* 深色模式下的样式也需要修改 */
@media (prefers-color-scheme: dark) {
    .action-icon-btn.like-btn.active {
        background: transparent !important;
        color: #28a745;
        opacity: 1;
    }
    
    .action-icon-btn.dislike-btn.active {
        background: transparent !important;
        color: #dc3545;
        opacity: 1;
    }
}
.action-icon {
    font-size: 14px;
    line-height: 1;
}

.action-icon-svg {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(40%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0.4) contrast(1);
    transition: all 0.2s ease;
}

.action-icon-btn:hover .action-icon-svg {
    filter: brightness(0) saturate(100%) invert(30%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0.3) contrast(1);
}

.action-icon-btn.like-btn:hover .action-icon-svg {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg) brightness(118%) contrast(119%);
}

.action-icon-btn.dislike-btn:hover .action-icon-svg {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
}

.action-icon-btn.export-btn:hover .action-icon-svg {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(180deg) brightness(118%) contrast(119%);
}

.action-icon-btn.copy-btn:hover .action-icon-svg {
    filter: brightness(0) saturate(100%) invert(83%) sepia(31%) saturate(638%) hue-rotate(359deg) brightness(103%) contrast(107%);
}

.action-icon-btn.clear-btn:hover .action-icon-svg {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
}

.action-icon-btn.active .action-icon {
    animation: none;
}

/* 底部版本信息 */
.footer {
    background: white;
    border-radius: 0;
    border: none;
    border-top: 1px solid #e9ecef;
    padding: 16px 24px;
    text-align: center;
    flex-shrink: 0;
    margin: 0;
    box-shadow: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.version {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

/* 回到顶部按钮 */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #007bff;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    z-index: 1000;
}

.back-to-top-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.back-to-top-btn:active {
    transform: translateY(0);
}

.back-to-top-icon {
    font-size: 20px;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .popup-mode .container {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        padding: 12px;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo-section {
        padding: 0;
        border-bottom: none;
        flex: 1;
    }
    
    .logo-content {
        flex-direction: row;
        text-align: left;
        gap: 12px;
    }
    
    .logo-icon {
        width: 40px;
        height: 28px;
        margin-bottom: 0;
    }
    
    .logo-title {
        font-size: 16px;
    }
    
    .logo-subtitle {
        font-size: 10px;
    }
    
    .quick-actions-sidebar {
        padding: 0;
        flex: none;
    }
    
    .action-buttons-vertical {
        flex-direction: row;
        gap: 4px;
        padding: 0;
    }
    
    .sidebar-action-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }
    
    .action-text {
        display: none;
    }
    
    .help-section {
        padding: 0;
        border-top: none;
        flex: none;
    }
    
    .help-btn-sidebar {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }
    
    .help-text {
        display: none;
    }
    
    .bottom-icons-section {
        padding: 10px 16px;
    }
    
    .bottom-icons-row {
        gap: 4px;
    }
    
    .bottom-icon-btn {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
        padding: 4px;
    }
    
    .main-content {
        flex: 1;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .selector-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .search-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .result-container {
        padding: 16px;
    }
    
    .action-icons-row {
        gap: 8px;
        padding-left: 5px;
    }
    
    .action-icon-btn {
        min-width: 24px;
        height: 24px;
        font-size: 12px;
        padding: 4px;
        background: transparent !important;
    }
    
    .action-icon-svg {
        width: 14px;
        height: 14px;
    }
    
    .action-icon-btn:hover {
        background: #F8F8FA !important;
        color: #6b7280;
        opacity: 1;
    }
    
    .action-icon-btn.like-btn:hover {
        background: #F8F8FA !important;
        color: #28a745;
    }
    
    .action-icon-btn.dislike-btn:hover {
        background: #F8F8FA !important;
        color: #dc3545;
    }
    
    .action-icon-btn.export-btn:hover {
        background: #F8F8FA !important;
        color: #17a2b8;
    }
    
    .action-icon-btn.copy-btn:hover {
        background: #F8F8FA !important;
        color: #ffc107;
    }
    
    .action-icon-btn.clear-btn:hover {
        background: #F8F8FA !important;
        color: #dc3545;
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 8px;
    }
    
    .logo-content {
        gap: 8px;
    }
    
    .logo-icon {
        width: 32px;
        height: 22px;
    }
    
    .logo-title {
        font-size: 14px;
    }
    
    .logo-subtitle {
        font-size: 9px;
    }
    
    .sidebar-action-btn {
        padding: 6px 8px;
        font-size: 11px;
        gap: 4px;
    }
    
    .help-btn-sidebar {
        padding: 6px 8px;
        font-size: 11px;
        gap: 4px;
    }
    
    .bottom-icons-section {
        padding: 8px 12px;
    }
    
    .bottom-icons-row {
        gap: 3px;
    }
    
    .bottom-icon-btn {
        min-width: 24px;
        height: 24px;
        font-size: 11px;
        padding: 3px;
    }
    
    .content-area {
        padding: 12px;
    }
    
    .search-section {
        padding: 12px;
    }
    
    .result-container {
        padding: 12px;
    }
    
    .top-toolbar {
        padding: 12px 16px;
    }
    
    .page-title {
        font-size: 16px;
    }
    
    .footer {
        padding: 12px 16px;
    }
    
    .action-icons-row {
        gap: 6px;
        padding-left: 5px;
    }
    
    .action-icon-btn {
        min-width: 20px;
        height: 20px;
        font-size: 11px;
        padding: 3px;
        background: transparent !important;
    }
    
    .action-icon-svg {
        width: 12px;
        height: 12px;
    }
    
    .action-icon-btn:hover {
        background: #F8F8FA !important;
        color: #6b7280;
        opacity: 1;
    }
    
    .action-icon-btn.like-btn:hover {
        background: rgba(40, 167, 69, 0.08) !important;
        color: #28a745;
    }
    
    .action-icon-btn.dislike-btn:hover {
        background: rgba(220, 53, 69, 0.08) !important;
        color: #dc3545;
    }
    
    .action-icon-btn.export-btn:hover {
        background: #F8F8FA !important;
        color: #17a2b8;
    }
    
    .action-icon-btn.copy-btn:hover {
        background: #F8F8FA !important;
        color: #ffc107;
    }
    
    .action-icon-btn.clear-btn:hover {
        background: #F8F8FA !important;
        color: #dc3545;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

/* 对话框样式保持不变 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.dialog-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dialog-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dialog-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #e9ecef;
    color: #333;
}

.dialog-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.history-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.clear-btn, .export-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.clear-btn {
    background: #dc3545;
    display: none !important;
}

.clear-btn:hover {
    background: #c82333;
}

.export-btn {
    background: #28a745;
}

.export-btn:hover {
    background: #218838;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

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

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

.history-time {
    font-size: 12px;
    color: #6c757d;
}

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

.history-action-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.copy-btn {
    background: #28a745;
}

.copy-btn:hover {
    background: #218838;
}

.delete-history-btn {
    background: #dc3545;
}

.delete-history-btn:hover {
    background: #c82333;
}

.history-question {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.history-answer {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    position: relative;
}

.history-answer.expanded {
    max-height: none;
}

.expand-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 0;
    margin-top: 8px;
    text-decoration: underline;
}

.expand-btn:hover {
    color: #0056b3;
}

.history-meta {
    margin-top: 12px;
    font-size: 12px;
    color: #6c757d;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.empty-history {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-history-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-history-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.empty-history-subtext {
    font-size: 14px;
    opacity: 0.8;
}

.history-full-content {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.history-full-question {
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
}

.history-full-answer {
    color: #6c757d;
    line-height: 1.6;
}

.history-model, .history-knowledge-base, .history-url {
    display: inline-block;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
} 

/* 问题显示区域 */
.question-display {
    border-radius: 8px;
    padding: 10px 0px 10px 0px;
    width: fit-content; /* 根据内容动态调整宽度 */
    max-width: 800px; /* 最大宽度限制 */
    min-width: 200px; /* 最小宽度限制 */
    display: inline-block; /* 让容器大小适应内容 */
}

/* 问题头部区域 */
.question-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 6px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar-img {
    width: 70%;
    height: 70%;
    object-fit: cover;
    border-radius: 50%;
}

.question-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.question-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.question-time {
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

.question-content {
    margin-left: 44px; /* 与头像对齐 */
}

.question-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.question-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap; /* 保持换行和空格 */
    display: inline; /* 让文本内容决定宽度 */
}

/* AI助手显示区域 */
.ai-display {
    border-radius: 8px;
    padding: 10px 0px;
    width: fit-content;
    max-width: 800px;
    min-width: 200px;
    display: inline-block;
}

.ai-header {
    display: flex;
    align-items: flex-start;
}

.ai-avatar {
    width: 32px;
    height: 32px;
    background: #2196F3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
}
.ai-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ai-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.ai-time {
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

/* 表格样式 */
.table-container {
    margin: 20px 0;
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
    min-width: 400px;
}

.result-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.result-table th:last-child {
    border-right: none;
}

.result-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    vertical-align: top;
    word-wrap: break-word;
    max-width: 200px;
    white-space: pre-line; /* 保持换行符 */
    line-height: 1.4; /* 改善换行后的行间距 */
}

.result-table td:last-child {
    border-right: none;
}

.result-table tr:last-child td {
    border-bottom: none;
}

.result-table tr:hover {
    background-color: #f8f9fa;
}

.result-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.result-table tbody tr:nth-child(even):hover {
    background-color: #f1f3f4;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .table-container {
        margin: 16px 0;
    }
    
    .result-table {
        font-size: 13px;
        min-width: 300px;
    }
    
    .result-table th,
    .result-table td {
        padding: 8px 12px;
        max-width: 150px;
    }
    
    /* 移动端问题显示区域优化 */
    .question-display {
        max-width: 100%; /* 在移动端允许占满宽度 */
        min-width: 150px; /* 调整最小宽度 */
        padding: 8px 12px; /* 减少内边距 */
    }
    
    .question-text {
        font-size: 13px; /* 稍微减小字体 */
    }
    
    /* 移动端头像优化 */
    .user-avatar,
    .ai-avatar {
        width: 28px;
        height: 28px;
    }
    
    .avatar-img {
        width: 70%;
        height: 70%;
        object-fit: cover;
        border-radius: 50%;
    }
}

@media (max-width: 480px) {
    .result-table {
        font-size: 12px;
        min-width: 250px;
    }
    
    .result-table th,
    .result-table td {
        padding: 6px 8px;
        max-width: 120px;
    }
    
    /* 小屏幕问题显示区域进一步优化 */
    .question-display {
        min-width: 120px;
        padding: 6px 10px;
    }
    
    .question-text {
        font-size: 12px;
    }
    
    /* 小屏幕头像优化 */
    .user-avatar,
    .ai-avatar {
        width: 24px;
        height: 24px;
    }
    
    .avatar-img {
        width: 70%;
        height: 70%;
        object-fit: cover;
        border-radius: 50%;
    }
} 

/* 多轮对话容器样式 */
.conversation-container {
    margin-bottom: 30px;
}

.conversation-container:last-child {
    margin-bottom: 0;
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .container {
        background: #1a202c;
    }
    
    .popup-mode .container {
        background: #1a202c;
    }
    
    /* 侧边栏深色模式 */
    .sidebar {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .logo-section {
        border-bottom-color: #4a5568;
    }
    
    .logo-icon {
        content: url('icons/logo_dark.png'); /* 深色模式下使用深色logo */
    }
    
    .logo-title {
        color: #e2e8f0;
    }
    
    .logo-subtitle {
        color: #a0aec0;
    }
    
    .version-info {
        border-top-color: #4a5568;
    }
    
    .version-text {
        color: #a0aec0;
    }
    
    .sidebar-action-btn {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .sidebar-action-btn:hover {
        background: #2d3748;
        border-color: #667eea;
    }
    
    .help-action-btn {
        border-top-color: #4a5568;
        background: #2d3748;
    }
    
    .help-action-btn:hover {
        background: #4a5568;
        border-color: #667eea;
        transform: translateX(4px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
    
    /* 公告按钮深色模式样式 */
    .announcement-btn {
        background: #2d3748;
        border-color: #4a5568;
        color: #f6e05e;
    }
    
    .announcement-btn:hover {
        background: #4a5568;
        border-color: #f6e05e;
        color: #f6e05e;
        transform: none;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        text-decoration: none;
    }
    
    .announcement-btn:active {
        transform: none;
    }
    
    .help-section {
        border-top-color: #4a5568;
    }
    
    .help-btn-sidebar {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .help-btn-sidebar:hover {
        background: #2d3748;
        border-color: #667eea;
    }
    
    .bottom-icons-section {
        border-top-color: #4a5568;
    }
    
    .bottom-icon-btn {
        color: #a0aec0;
    }
    
    .bottom-icon-btn:hover {
        background: rgba(160, 174, 192, 0.1);
        color: #e2e8f0;
    }
    
    .bottom-icon-btn:active {
        background: rgba(160, 174, 192, 0.15);
    }
    
    /* 主内容区域深色模式 */
    .main-content {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .top-toolbar {
        border-bottom-color: #4a5568;
    }
    
    .page-title {
        color: #e2e8f0;
    }
    
    .content-area {
        background: transparent;
    }
    
    /* 输入区域深色模式 */
    .input-title {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .input-subtitle {
        color: #a0aec0;
    }
    
    .model-select,
    .knowledge-base-select,
    .parameter-rule-select {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .model-select:focus,
    .knowledge-base-select:focus,
    .parameter-rule-select:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
    }
    
    .model-select:hover,
    .knowledge-base-select:hover,
    .parameter-rule-select:hover {
        border-color: #667eea;
        background-color: #2d3748;
    }
    
    .model-select option,
    .knowledge-base-select option,
    .parameter-rule-select option {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .selector-divider {
        color: #a0aec0;
    }
    
    .settings-button {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .settings-button:hover {
        background: #2d3748;
        border-color: #667eea;
        color: #667eea;
    }
    
    /* 输入容器深色模式 */
    .input-container {
        background: #4a5568;
        border-color: #718096;
    }
    
    .input-container:focus-within {
        border-color: #667eea;
        box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
    }
    
    .question-input {
        background: transparent;
        color: #e2e8f0;
    }
    
    .question-input::placeholder {
        color: #a0aec0;
    }
    
    .ask-button {
        background: #718096;
        color: #a0aec0;
    }
    
    .ask-button.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    /* 结果区域深色模式 */
    .result-title {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }
    
    .result-text {
        color: #e2e8f0;
        background: none !important;
    }
    
    .result-text h3 {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }
    
    .result-text h4 {
        color: #a0aec0;
    }
    
    .result-text strong {
        color: #e2e8f0;
    }
    
    .result-text em {
        color: #a0aec0;
    }
    
    .result-text code {
        background: #2d3748;
        color: #90cdf4;
        border-color: #4a5568;
    }
    
    .result-text pre {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .result-text pre code {
        background: none;
        color: #e2e8f0;
    }
    
    .result-text blockquote {
        color: #a0aec0;
    }
    
    .result-text hr {
        border-top-color: #4a5568;
    }
    
    .result-text a {
        color: #90cdf4;
    }
    
    .result-text a:hover {
        border-bottom-color: #90cdf4;
    }
    
    /* 结果操作区域深色模式 */
    .result-actions {
        border-top-color: #4a5568;
    }
    
    .action-icon-btn {
        color: #a0aec0;
    }
    
    .action-icon-btn:hover {
        background: #4a5568 !important;
        color: #e2e8f0;
    }
    
    .action-icon-btn.like-btn.active {
        background: transparent !important;
        color: #4CAF50;
        opacity: 1;
    }
    
    .action-icon-btn.dislike-btn.active {
        background: transparent !important;
        color: #dc3545;
        opacity: 1;
    }
    
    /* 深色模式下的SVG激活状态 */
    .action-icon-btn.like-btn.active .action-icon-svg {
        filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(56deg) brightness(118%) contrast(119%) !important;
    }
    
    .action-icon-btn.dislike-btn.active .action-icon-svg {
        filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%) !important;
    }
    
    .action-icon-btn.export-btn:hover {
        background: #4a5568 !important;
        color: #90cdf4;
    }
    
    .action-icon-btn.copy-btn:hover {
        background: #4a5568 !important;
        color: #f6e05e;
    }
    
    .action-icon-btn.clear-btn:hover {
        background: #4a5568 !important;
        color: #fc8181;
    }
    
    .action-icon-btn.like-btn.active {
        background: rgba(40, 167, 69, 0.3);
        color: #68d391;
    }
    
    .action-icon-btn.dislike-btn.active {
        background: rgba(220, 53, 69, 0.3);
        color: #fc8181;
    }
    
    /* SVG图标深色模式 */
    .action-icon-svg {
        filter: brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0.7) contrast(1);
    }
    
    .action-icon-btn:hover .action-icon-svg {
        filter: brightness(0) saturate(100%) invert(90%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0.9) contrast(1);
    }
    
    .action-icon-btn.like-btn:hover .action-icon-svg {
        filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg) brightness(118%) contrast(119%);
    }
    
    .action-icon-btn.dislike-btn:hover .action-icon-svg {
        filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
    }
    
    .action-icon-btn.export-btn:hover .action-icon-svg {
        filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(180deg) brightness(118%) contrast(119%);
    }
    
    .action-icon-btn.copy-btn:hover .action-icon-svg {
        filter: brightness(0) saturate(100%) invert(83%) sepia(31%) saturate(638%) hue-rotate(359deg) brightness(103%) contrast(107%);
    }
    
    .action-icon-btn.clear-btn:hover .action-icon-svg {
        filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
    }
    
    /* 底部版本信息深色模式 */
    .footer {
        background: #2d3748;
        border-top-color: #4a5568;
    }
    
    .version {
        color: #a0aec0;
    }
    
    /* 回到顶部按钮深色模式 */
    .back-to-top-btn {
        background: #667eea;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    .back-to-top-btn:hover {
        background: #5a6fd8;
        box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    }
    
    /* 滚动条深色模式 */
    .result-container::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .result-container::-webkit-scrollbar-thumb {
        background: #4a5568;
    }
    
    .result-container::-webkit-scrollbar-thumb:hover {
        background: #718096;
    }
    
    .result-container::-webkit-scrollbar-thumb:active {
        background: #a0aec0;
    }
    
    /* 对话框深色模式 */
    .dialog-container {
        background: #2d3748;
    }
    
    .dialog-header {
        background: #4a5568;
        border-bottom-color: #718096;
    }
    
    .dialog-header h3 {
        color: #e2e8f0;
    }
    
    .close-btn {
        color: #a0aec0;
    }
    
    .close-btn:hover {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .dialog-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .clear-btn, .export-btn {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .clear-btn {
        background: #e53e3e;
    }
    
    .clear-btn:hover {
        background: #c53030;
    }
    
    .export-btn {
        background: #38a169;
    }
    
    .export-btn:hover {
        background: #2f855a;
    }
    
    .history-item {
        background: #4a5568;
        border-color: #718096;
    }
    
    .history-item:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .history-time {
        color: #a0aec0;
    }
    
    .history-action-btn {
        background: #667eea;
        color: white;
    }
    
    .copy-btn {
        background: #38a169;
    }
    
    .copy-btn:hover {
        background: #2f855a;
    }
    
    .delete-history-btn {
        background: #e53e3e;
    }
    
    .delete-history-btn:hover {
        background: #c53030;
    }
    
    .history-question {
        color: #e2e8f0;
    }
    
    .history-answer {
        color: #a0aec0;
    }
    
    .expand-btn {
        color: #90cdf4;
    }
    
    .expand-btn:hover {
        color: #63b3ed;
    }
    
    .history-meta {
        color: #a0aec0;
    }
    
    .empty-history {
        color: #a0aec0;
    }
    
    .empty-history-text {
        color: #e2e8f0;
    }
    
    .empty-history-subtext {
        color: #a0aec0;
    }
    
    .history-full-content {
        background: #4a5568;
        border-color: #718096;
    }
    
    .history-full-question {
        color: #e2e8f0;
    }
    
    .history-full-answer {
        color: #a0aec0;
    }
    
    .history-model, .history-knowledge-base, .history-url {
        background: #2d3748;
        color: #a0aec0;
    }
    
    /* 问题显示区域深色模式 */
    .question-name {
        color: #e2e8f0;
    }
    
    .question-time {
        color: #a0aec0;
    }
    
    .question-label {
        color: #a0aec0;
    }
    
    .question-text {
        color: #e2e8f0;
    }
    
    .ai-name {
        color: #e2e8f0;
    }
    
    .ai-time {
        color: #a0aec0;
    }
    
    /* 表格深色模式 */
    .result-table {
        background: #4a5568;
    }
    
    .result-table th {
        background: #2d3748;
        color: #e2e8f0;
        border-bottom-color: #718096;
        border-right-color: #718096;
    }
    
    .result-table td {
        border-bottom-color: #718096;
        border-right-color: #718096;
        color: #e2e8f0;
    }
    
    .result-table tr:hover {
        background-color: #2d3748;
    }
    
    .result-table tbody tr:nth-child(even) {
        background-color: #3a4556;
    }
    
    .result-table tbody tr:nth-child(even):hover {
        background-color: #2d3748;
    }
    .cankao-list{
        color: #fff !important;
    }
} 
/* 问题复制按钮样式 */
.question-content {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.copy-question-btn {
    background: transparent;
    border: none;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.6;
}

.copy-question-btn:hover {
    background: #f8f9fa;
    opacity: 1;
    transform: scale(1.1);
}

.copy-question-btn:active {
    transform: scale(0.95);
}

.copy-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.copy-question-btn:hover .copy-icon {
    opacity: 1;
}