/* 删除相关样式 */
.ai-chat-history-item.deleting {
    opacity: 0.5;
    pointer-events: none;
}

.ai-chat-history-empty-hint {
    font-size: 12px;
    color: #adb5bd;
    margin-top: 5px;
}

/* 确认删除对话框样式 */
.ai-chat-confirm-delete {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    margin: 20px auto;
}

.ai-chat-confirm-delete h4 {
    color: #dc3545;
    margin-top: 0;
    margin-bottom: 15px;
}

.ai-chat-confirm-delete p {
    color: #6c757d;
    margin-bottom: 20px;
}

.ai-chat-confirm-delete .but-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.ai-chat-confirm-delete .but-cancel {
    background: #6c757d;
    color: white;
}

.ai-chat-confirm-delete .but-delete {
    background: #dc3545;
    color: white;
}

/* 删除成功提示 */
.ai-chat-toast.success {
    background: #28a745;
    color: white;
}

.ai-chat-toast.error {
    background: #dc3545;
    color: white;
}

/* 消息加载状态 */
.ai-chat-loading-messages,
.ai-chat-no-messages,
.ai-chat-error-messages {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

/* 历史项激活状态修复 */
.ai-chat-history-item.active {
    background-color: rgba(110, 45, 239, 0.1) !important;
    border-color: #6e2def !important;
}

/* 确保只有一个项目被选中 */
.ai-chat-history-list .ai-chat-history-item.active ~ .ai-chat-history-item.active {
    background-color: transparent !important;
    border-color: transparent !important;
}

/* AI客服Pro样式 - 基础样式 */
#ai-chat-container {
    position: fixed;
    bottom: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    font-size: 14px;
    transition: all 0.3s ease;
}

#ai-chat-container.ai-chat-position-right {
    right: 20px;
}

#ai-chat-container.ai-chat-position-left {
    left: 20px;
}

#ai-chat-container.ai-chat-hidden {
    display: none;
}

/* 聊天窗口样式 */
.ai-chat-wrapper {
    width: 350px;
    max-width: 100%;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    height: 500px;
    max-height: 80vh;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* 聊天头部样式 */
.ai-chat-header {
    padding: 15px;
    background-color: #6e2def;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.ai-chat-ai-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-chat-ai-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.6);
}

.ai-chat-ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-chat-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-chat-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ai-chat-actions button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ai-chat-actions button:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.ai-chat-actions svg {
    width: 16px;
    height: 16px;
}

/* 历史对话侧边栏 */
.ai-chat-history-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    width: 300px;
    height: 100%;
    background: white;
    border-right: 1px solid #e9ecef;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.ai-chat-wrapper.ai-chat-history-open .ai-chat-history-sidebar {
    transform: translateX(0);
}

.ai-chat-wrapper.ai-chat-history-open .ai-chat-body,
.ai-chat-wrapper.ai-chat-history-open .ai-chat-footer {
    margin-left: 300px;
    width: calc(100% - 300px);
}

.ai-chat-history-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-history-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #495057;
}

.ai-chat-history-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.ai-chat-history-close:hover {
    background-color: rgba(0,0,0,0.05);
}

.ai-chat-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.ai-chat-history-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6c757d;
    text-align: center;
}

.ai-chat-loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6e2def;
    border-radius: 50%;
    animation: ai-chat-spin 1s linear infinite;
    margin-bottom: 10px;
}

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

.ai-chat-history-item {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.ai-chat-history-item:hover {
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

.ai-chat-history-item.active {
    background-color: rgba(110, 45, 239, 0.1);
    border-color: #6e2def;
}

.ai-chat-history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.ai-chat-history-name {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
    flex: 1;
    margin-right: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-chat-history-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ai-chat-history-item:hover .ai-chat-history-actions {
    opacity: 1;
}

.ai-chat-history-action-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.ai-chat-history-action-btn:hover {
    color: #6e2def;
    background-color: rgba(0,0,0,0.05);
}

.ai-chat-history-meta {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
}

.ai-chat-history-time {
    color: #adb5bd;
}

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

/* 聊天主体样式 */
.ai-chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.ai-chat-welcome-message {
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    transition: opacity 0.3s ease;
}

.ai-chat-welcome-content p {
    margin-top: 0;
    color: #495057;
    text-align: center;
    font-size: 14px;
}

.ai-chat-quick-questions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.ai-chat-quick-question {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 18px;
    padding: 8px 15px;
    font-size: 13px;
    color: #6e2def;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.ai-chat-quick-question:hover {
    background-color: #f1f6ff;
    border-color: #6e2def;
}

.ai-chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    scroll-behavior: smooth;
}

/* 消息样式 */
.ai-chat-message {
    margin-bottom: 15px;
    max-width: 80%;
    animation: ai-chat-fade-in 0.3s ease;
}

@keyframes ai-chat-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chat-message-user {
    margin-left: auto;
}

.ai-chat-message-ai {
    margin-right: auto;
}

.ai-chat-message-nickname {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    font-weight: 500;
}

.ai-chat-message-content {
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.ai-chat-message-user .ai-chat-message-content {
    background-color: #6e2def;
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-chat-message-ai .ai-chat-message-content {
    background-color: #f1f3f5;
    color: #212529;
    border-bottom-left-radius: 4px;
}

.ai-chat-message-time {
    display: block;
    font-size: 11px;
    color: #adb5bd;
    margin-top: 4px;
    text-align: right;
}

.ai-chat-message-ai .ai-chat-message-time {
    text-align: left;
}

/* 输入指示器 */
.ai-chat-typing-indicator {
    display: none;
    padding: 10px 15px;
    align-items: center;
    gap: 8px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.ai-chat-typing-dots {
    display: flex;
    gap: 4px;
}

.ai-chat-typing-dots span {
    width: 8px;
    height: 8px;
    background-color: #adb5bd;
    border-radius: 50%;
    animation: ai-chat-bounce 1.4s infinite ease-in-out;
}

.ai-chat-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-chat-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes ai-chat-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
}

.ai-chat-typing-text {
    font-size: 12px;
    color: #6e2def;
    font-weight: 500;
}

/* 聊天底部样式 */
.ai-chat-footer {
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.ai-chat-input-container {
    padding: 10px;
}

.ai-chat-input-box {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 24px;
    padding: 5px 5px 5px 15px;
    transition: border-color 0.2s;
}

.ai-chat-input-box:focus-within {
    border-color: #6e2def;
    box-shadow: 0 0 0 2px rgba(110, 45, 239, 0.1);
}

.ai-chat-message-input {
    flex: 1;
    border: none;
    padding: 8px 0;
    resize: none;
    max-height: 120px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    background: transparent;
    line-height: 1.4;
}

.ai-chat-message-input::placeholder {
    color: #adb5bd;
}

.ai-chat-send-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #6e2def;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-chat-send-button:not(:disabled) {
    opacity: 1;
}

.ai-chat-send-button:not(:disabled):hover {
    background-color: #5c24d6;
    transform: scale(1.05);
}

.ai-chat-send-button svg {
    width: 20px;
    height: 20px;
}

/* 人工客服按钮样式 */
.ai-chat-transfer-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 20px);
    margin: 0 auto 10px;
    padding: 10px 15px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.ai-chat-transfer-button:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.4);
}

.ai-chat-transfer-button:active {
    transform: translateY(0);
}

.ai-chat-transfer-button::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%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 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z'/%3E%3C/svg%3E");
    background-size: contain;
}

/* 客服响应样式 */
.ai-chat-agent-response {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #ff6b6b;
}

.ai-chat-agent-response h4 {
    color: #6e2def;
    margin-top: 0;
    margin-bottom: 10px;
}

.ai-chat-agent-image {
    margin-top: 10px;
    text-align: center;
}

.ai-chat-agent-image img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #ff6b6b;
}

/* 人工客服回复中的邮箱链接样式 */
.ai-chat-agent-response a[href^="mailto:"] {
    color: #FF6B6B;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed #FF6B6B;
    transition: all 0.2s ease;
}

.ai-chat-agent-response a[href^="mailto:"]:hover {
    color: #E74C3C;
    border-bottom-color: #E74C3C;
}

/* 搜索结果显示样式 */
.ai-chat-search-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-chat-search-results li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.ai-chat-search-results li:last-child {
    border-bottom: none;
}

.ai-chat-search-results a {
    color: #6e2def;
    text-decoration: none;
    font-weight: 500;
}

.ai-chat-search-results a:hover {
    text-decoration: underline;
}

.ai-chat-search-results small {
    display: block;
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
}

/* 登录提示样式 */
.ai-chat-login-prompt {
    border: 1px solid #e3f2fd;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    padding: 20px;
    margin: 10px 0;
}

.ai-chat-prompt-header h4 {
    color: #1976d2;
    margin: 0 0 15px 0;
    font-size: 18px;
    text-align: center;
}

.ai-chat-prompt-content {
    color: #555;
}

.ai-chat-benefits {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #2196f3;
}

.ai-chat-benefits ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ai-chat-benefits li {
    margin: 8px 0;
    color: #666;
}

.ai-chat-auth-actions {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.ai-chat-guest-alternative {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

/* 游客专用样式 */
.ai-chat-guest-suggestion {
    margin-top: 10px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

.ai-chat-guest-suggestion a, 
.ai-chat-guest-suggestion button {
    display: inline-block;
    padding: 3px 8px;
    margin: 0 5px;
    background: #6e2def;
    color: white;
    border-radius: 3px;
    text-decoration: none;
}

.ai-chat-guest-suggestion span {
    color: #666;
    font-size: 0.9em;
}

/* 错误状态样式 */
.ai-chat-error-box {
    background: #fff8f8;
    border-left: 3px solid #dc3232;
    padding: 10px;
    margin: 5px 0;
}

.ai-chat-transfer-loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* AI头像点击效果 */
.ai-chat-transfer-trigger {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.ai-chat-transfer-trigger:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* 自定义命令样式 */
.ai-chat-help-message {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ai-chat-commands-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 15px 0;
}

@media (min-width: 768px) {
    .ai-chat-commands-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ai-chat-commands-section h5 {
    color: #6e2def;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
}

.ai-chat-commands-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-chat-commands-section li {
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
    font-size: 13px;
}

.ai-chat-commands-section li:last-child {
    border-bottom: none;
}

.ai-chat-commands-section code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #6e2def;
}

/* 历史对话帮助样式 */
.ai-chat-history-help {
    margin-top: 15px;
    padding: 10px;
    background: #fff3e0;
    border-radius: 6px;
    border-left: 4px solid #ff9800;
}

.ai-chat-history-help h5 {
    color: #f57c00;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 14px;
}

.ai-chat-history-help ul {
    margin: 8px 0;
    padding-left: 20px;
    font-size: 13px;
}

.ai-chat-history-help li {
    margin: 4px 0;
    color: #666;
}

/* 历史对话信息样式 */
.ai-chat-history-info {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ai-chat-history-info h4 {
    color: #6e2def;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.ai-chat-history-stats {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row strong {
    color: #6e2def;
}

.ai-chat-recent-sessions {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-chat-recent-sessions li {
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 8px;
    background: white;
    transition: all 0.2s ease;
}

.ai-chat-recent-sessions li:hover {
    border-color: #6e2def;
    box-shadow: 0 2px 4px rgba(110, 45, 239, 0.1);
}

.session-name {
    font-weight: 500;
    color: #495057;
    margin-bottom: 5px;
    font-size: 14px;
}

.session-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
}

/* 用户信息样式 */
.ai-chat-user-info {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ai-chat-user-info h4 {
    color: #6e2def;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.ai-chat-user-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-chat-user-info li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}

.ai-chat-user-info li:last-child {
    border-bottom: none;
}

.ai-chat-user-info strong {
    color: #495057;
    display: inline-block;
    width: 80px;
}

/* 文件上传样式 */
.ai-chat-upload-container {
    max-width: 300px;
}

.ai-chat-upload-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ai-chat-upload-icon {
    font-size: 24px;
    color: #6e2def;
}

.ai-chat-upload-filename {
    flex: 1;
    font-weight: 500;
    color: #495057;
    font-size: 13px;
    word-break: break-all;
}

.ai-chat-upload-size {
    font-size: 12px;
    color: #6c757d;
}

.ai-chat-upload-progress {
    background: #f1f3f5;
    border-radius: 4px;
    overflow: hidden;
    height: 6px;
    position: relative;
}

.ai-chat-upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6e2def, #2196F3);
    transition: width 0.3s ease;
}

.ai-chat-upload-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    color: #6c757d;
    white-space: nowrap;
}

.ai-chat-upload-complete {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4caf50;
    font-size: 13px;
}

.ai-chat-upload-complete .dashicons-yes-alt {
    color: #4caf50;
    font-size: 16px;
}

.ai-chat-upload-error {
    margin-top: 8px;
    padding: 8px;
    background: #ffebee;
    border-radius: 4px;
    color: #d32f2f;
    font-size: 12px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #ai-chat-container {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }
    
    .ai-chat-wrapper {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    #ai-chat-container.ai-chat-position-right,
    #ai-chat-container.ai-chat-position-left {
        right: 0;
        left: 0;
        bottom: 0;
    }
    
    .ai-chat-history-sidebar {
        width: 280px;
    }
    
    .ai-chat-wrapper.ai-chat-history-open .ai-chat-body,
    .ai-chat-wrapper.ai-chat-history-open .ai-chat-footer {
        margin-left: 280px;
        width: calc(100% - 280px);
    }
    
    
    
    .ai-chat-message {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .ai-chat-header {
        padding: 12px;
    }
    
    .ai-chat-title h3 {
        font-size: 15px;
    }
    
    .ai-chat-history-sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .ai-chat-wrapper.ai-chat-history-open .ai-chat-history-sidebar {
        transform: translateX(0);
    }
    
    .ai-chat-wrapper.ai-chat-history-open .ai-chat-body,
    .ai-chat-wrapper.ai-chat-history-open .ai-chat-footer {
        margin-left: 0;
        width: 100%;
        display: none;
    }
    
    .ai-chat-message {
        max-width: 90%;
    }
    
    .ai-chat-message-content {
        padding: 8px 12px;
        font-size: 13px;
    }
        
}

/* 黑暗模式支持 */
@media (prefers-color-scheme: dark) {
    .ai-chat-wrapper {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }
    
    .ai-chat-header {
        background-color: #2d2d2d;
        color: #ffffff;
    }
    
    .ai-chat-body {
        background-color: #1e1e1e;
    }
    
    .ai-chat-welcome-message {
        background-color: #2d2d2d;
        border-bottom-color: #3d3d3d;
    }
    
    .ai-chat-welcome-content p {
        color: #b0b0b0;
    }
    
    .ai-chat-quick-question {
        background-color: #2d2d2d;
        border-color: #3d3d3d;
        color: #bb86fc;
    }
    
    .ai-chat-quick-question:hover {
        background-color: #3d3d3d;
        border-color: #bb86fc;
    }
    
    .ai-chat-message-ai .ai-chat-message-content {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    
    .ai-chat-footer {
        background-color: #2d2d2d;
        border-top-color: #3d3d3d;
    }
    
    .ai-chat-input-box {
        background: #2d2d2d;
        border-color: #3d3d3d;
    }
    
    .ai-chat-message-input {
        color: #e0e0e0;
        background: transparent;
    }
    
    .ai-chat-message-input::placeholder {
        color: #8a8a8a;
    }
    
    .ai-chat-history-sidebar {
        background: #1e1e1e;
        border-right-color: #3d3d3d;
    }
    
    .ai-chat-history-header {
        background-color: #2d2d2d;
        border-bottom-color: #3d3d3d;
    }
    
    .ai-chat-history-header h4 {
        color: #e0e0e0;
    }
    
    .ai-chat-history-close {
        color: #b0b0b0;
    }
    
    .ai-chat-history-item:hover {
        background-color: #2d2d2d;
        border-color: #3d3d3d;
    }
    
    .ai-chat-history-item.active {
        background-color: rgba(187, 134, 252, 0.1);
        border-color: #bb86fc;
    }
    
    .ai-chat-history-name {
        color: #e0e0e0;
    }
    
    .ai-chat-history-action-btn {
        color: #b0b0b0;
    }
    
    .ai-chat-history-action-btn:hover {
        color: #bb86fc;
        background-color: rgba(255,255,255,0.1);
    }
    
    .ai-chat-history-meta {
        color: #8a8a8a;
    }
    
    .ai-chat-history-time {
        color: #6c6c6c;
    }
    
    .ai-chat-history-empty {
        color: #8a8a8a;
    }
    
    .ai-chat-typing-indicator {
        background-color: #2d2d2d;
        border-top-color: #3d3d3d;
    }
    
    .ai-chat-typing-dots span {
        background-color: #8a8a8a;
    }
    
    .ai-chat-agent-response {
        background: #2d2d2d;
    }
    
    .ai-chat-help-message {
        background: #2d2d2d;
        border-color: #3d3d3d;
    }
    
    .ai-chat-commands-section li {
        border-bottom-color: #3d3d3d;
    }
    
    .ai-chat-commands-section code {
        background: #3d3d3d;
        color: #bb86fc;
    }
    
    .ai-chat-search-results a {
        color: #bb86fc;
    }
    
    .ai-chat-search-results small {
        color: #8a8a8a;
    }
}