/* AI助手插件样式 - 适配meteorpro主题 */

/* 强制深色模式输入框样式 - 最高优先级 */
html.dark textarea,
body.dark textarea,
.dark textarea,
body.dark-mode textarea,
html[data-theme="dark"] textarea,
html[data-bs-theme="dark"] textarea,
html.dark #ai-assistant-widget textarea,
body.dark #ai-assistant-widget textarea,
.dark #ai-assistant-widget textarea,
body.dark-mode #ai-assistant-widget textarea,
html[data-theme="dark"] #ai-assistant-widget textarea,
html[data-bs-theme="dark"] #ai-assistant-widget textarea,
#ai-assistant-widget textarea[style*="background-color: white"],
#ai-assistant-widget textarea[style*="background-color: #fff"],
#ai-assistant-widget textarea[style*="background-color: rgb(255, 255, 255)"] {
    background-color: #1f2937 !important;
    color: #f9fafb !important;
    border-color: #4b5563 !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

html.dark textarea::placeholder,
body.dark textarea::placeholder,
.dark textarea::placeholder,
body.dark-mode textarea::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-bs-theme="dark"] textarea::placeholder,
html.dark #ai-assistant-widget textarea::placeholder,
body.dark #ai-assistant-widget textarea::placeholder,
.dark #ai-assistant-widget textarea::placeholder,
body.dark-mode #ai-assistant-widget textarea::placeholder,
html[data-theme="dark"] #ai-assistant-widget textarea::placeholder,
html[data-bs-theme="dark"] #ai-assistant-widget textarea::placeholder {
    color: #9ca3af !important;
    opacity: 0.8 !important;
}

/* 基础变量 */
:root {
    --ai-primary-color: #6d28d9;
    --ai-secondary-color: #1b4ed8;
    --ai-success-color: #10b981;
    --ai-warning-color: #f59e0b;
    --ai-error-color: #ef4444;
    --ai-text-primary: #1f2937;
    --ai-text-secondary: #6b7280;
    --ai-bg-primary: #ffffff;
    --ai-bg-secondary: #f9fafb;
    --ai-bg-tertiary: #f3f4f6;
    --ai-border-color: #e5e7eb;
    --ai-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ai-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --ai-radius: 12px;
    --ai-radius-sm: 8px;
    --ai-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 深色模式变量 - 适配meteorpro主题的所有深色模式选择器 */
html.dark, body.dark, .dark body,
body.dark-mode, [data-theme="dark"], [data-theme="dark"] body,
html[data-bs-theme="dark"], html[data-bs-theme="dark"] body,
html.dark body, body.dark body, .dark body,
html[data-theme="dark"] body, html[data-bs-theme="dark"] body {
    --ai-text-primary: #f9fafb;
    --ai-text-secondary: #d1d5db;
    --ai-bg-primary: #1f2937;
    --ai-bg-secondary: #111827;
    --ai-bg-tertiary: #374151;
    --ai-border-color: #4b5563;
    --ai-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --ai-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* 主容器 */
.ai-assistant-widget {
    position: fixed;
    bottom: 200px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    align-items: flex-start;
    gap: 0;
}

/* 垂直侧边栏 - 移除背景和边框 */
.ai-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    transition: var(--ai-transition);
}

/* AI助手图标 - 简洁边框发光 */
.ai-assistant-toggle {
    width: 35px;
    height: 110px;
    background: transparent;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    position: relative;
    border: 1px solid #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* 浅色模式下的文字颜色 */
html:not(.dark) .ai-assistant-toggle,
body:not(.dark) .ai-assistant-toggle,
:not(.dark) .ai-assistant-toggle,
body:not(.dark-mode) .ai-assistant-toggle,
html:not([data-theme="dark"]) .ai-assistant-toggle,
html:not([data-bs-theme="dark"]) .ai-assistant-toggle {
    color: #1f2937;
}

/* 深色模式下的文字颜色 */
html.dark .ai-assistant-toggle,
body.dark .ai-assistant-toggle,
.dark .ai-assistant-toggle,
body.dark-mode .ai-assistant-toggle,
html[data-theme="dark"] .ai-assistant-toggle,
html[data-bs-theme="dark"] .ai-assistant-toggle {
    color: white;
}

.ai-assistant-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
}

.ai-icon-vertical {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-name-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.ai-text-line {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ai-text-line:first-child {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 3px;
}

/* 分隔线 */
.ai-separator {
    display: none;
}

/* 主题切换按钮 */
.ai-theme-toggle {
    display: none;
}

.ai-separator-line {
    display: none;
}

/* 聊天窗口 */
.ai-assistant-container {
    position: absolute;
    right: 80px;
    bottom: -60px;
    width: 700px;
    height: 75vh;
    background: var(--ai-bg-primary);
    border-radius: var(--ai-radius);
    box-shadow: var(--ai-shadow-lg);
    border: 1px solid var(--ai-border-color);
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: slideInLeft 0.3s ease-out;
    max-height: 750px;
    min-height: 600px;
}

/* 强制深色模式下的面板颜色 */
html.dark .ai-assistant-container,
body.dark .ai-assistant-container,
.dark .ai-assistant-container,
body.dark-mode .ai-assistant-container,
html[data-theme="dark"] .ai-assistant-container,
html[data-bs-theme="dark"] .ai-assistant-container,
.ai-assistant-widget.ai-dark-mode .ai-assistant-container {
    background: #1f2937 !important;
    border-color: #4b5563 !important;
}

/* 强制浅色模式下的面板颜色 */
html:not(.dark) .ai-assistant-container,
body:not(.dark) .ai-assistant-container,
:not(.dark) .ai-assistant-container,
body:not(.dark-mode) .ai-assistant-container,
html:not([data-theme="dark"]) .ai-assistant-container,
html:not([data-bs-theme="dark"]) .ai-assistant-container {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ai-assistant-container.active {
    display: flex;
}

/* 头部 */
.ai-assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(90deg, #FF6B6B, #FFB347);
    color: white;
    border-radius: var(--ai-radius) var(--ai-radius) 0 0;
    position: relative;
    overflow: hidden;
}

/* 强制深色模式下的头部 */
html.dark .ai-assistant-header,
body.dark .ai-assistant-header,
.dark .ai-assistant-header,
body.dark-mode .ai-assistant-header,
html[data-theme="dark"] .ai-assistant-header,
html[data-bs-theme="dark"] .ai-assistant-header,
.ai-assistant-widget.ai-dark-mode .ai-assistant-header {
    background: #2C313A !important;
}

/* 强制浅色模式下的头部 */
html:not(.dark) .ai-assistant-header,
body:not(.dark) .ai-assistant-header,
:not(.dark) .ai-assistant-header,
body:not(.dark-mode) .ai-assistant-header,
html:not([data-theme="dark"]) .ai-assistant-header,
html:not([data-bs-theme="dark"]) .ai-assistant-header {
    background: linear-gradient(90deg, #FF6B6B, #FFB347) !important;
}

.ai-assistant-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 头部样式 */
.ai-assistant-title {
    font-weight: 600;
    font-size: 16px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FF8C00;
    background: #2C313A;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 强制深色模式下的标题 */
html.dark .ai-assistant-title,
body.dark .ai-assistant-title,
.dark .ai-assistant-title,
body.dark-mode .ai-assistant-title,
html[data-theme="dark"] .ai-assistant-title,
html[data-bs-theme="dark"] .ai-assistant-title,
.ai-assistant-widget.ai-dark-mode .ai-assistant-title {
    color: #FF8C00 !important;
    background: #2C313A !important;
}

/* 强制浅色模式下的标题 */
html:not(.dark) .ai-assistant-title,
body:not(.dark) .ai-assistant-title,
:not(.dark) .ai-assistant-title,
body:not(.dark-mode) .ai-assistant-title,
html:not([data-theme="dark"]) .ai-assistant-title,
html:not([data-bs-theme="dark"]) .ai-assistant-title {
    color: #FF8C00 !important;
    background: #2C313A !important;
}

.ai-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 欢迎区域 */
.ai-welcome {
    padding: 20px;
    background: var(--ai-bg-secondary);
    border-bottom: 1px solid var(--ai-border-color);
}

/* 强制深色模式下的欢迎区域 */
html.dark .ai-welcome,
body.dark .ai-welcome,
.dark .ai-welcome,
body.dark-mode .ai-welcome,
html[data-theme="dark"] .ai-welcome,
html[data-bs-theme="dark"] .ai-welcome,
.ai-assistant-widget.ai-dark-mode .ai-welcome {
    background: #111827 !important;
    border-bottom-color: #4b5563 !important;
}

/* 强制浅色模式下的欢迎区域 */
html:not(.dark) .ai-welcome,
body:not(.dark) .ai-welcome,
:not(.dark) .ai-welcome,
body:not(.dark-mode) .ai-welcome,
html:not([data-theme="dark"]) .ai-welcome,
html:not([data-bs-theme="dark"]) .ai-welcome {
    background: #f9fafb !important;
    border-bottom-color: #e5e7eb !important;
}

.welcome-message {
    margin: 0 0 20px 0;
    color: var(--ai-text-primary);
    font-size: 15px;
    line-height: 1.7;
    text-align: center;
}

.section-title {
    margin: 0 0 16px 0;
    color: var(--ai-text-primary);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* 咨询建议区域 */
.ai-consultation-section {
    padding: 20px;
    border-bottom: 1px solid var(--ai-border-color);
    flex-shrink: 0;
    margin-bottom: 0;
}

.consultation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.consultation-card {
    position: relative;
    background: var(--ai-bg-tertiary);
    color: var(--ai-text-secondary);
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 13px;
    border: 1px solid var(--ai-border-color);
    transition: var(--ai-transition);
    cursor: pointer;
    text-align: center;
    line-height: 1.5;
    overflow: hidden;
}

/* 强制深色模式下的咨询卡片 */
html.dark .consultation-card,
body.dark .consultation-card,
.dark .consultation-card,
body.dark-mode .consultation-card,
html[data-theme="dark"] .consultation-card,
html[data-bs-theme="dark"] .consultation-card,
.ai-assistant-widget.ai-dark-mode .consultation-card {
    background: #374151 !important;
    color: #f9fafb !important;
    border-color: #4b5563 !important;
}

/* 强制浅色模式下的咨询卡片 */
html:not(.dark) .consultation-card,
body:not(.dark) .consultation-card,
:not(.dark) .consultation-card,
body:not(.dark-mode) .consultation-card,
html:not([data-theme="dark"]) .consultation-card,
html:not([data-bs-theme="dark"]) .consultation-card {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border-color: #e5e7eb !important;
}

.consultation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.3s ease;
}

.consultation-card:hover::before {
    left: 100%;
}

.consultation-card:hover {
    background: var(--ai-primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    border-color: var(--ai-primary-color);
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: var(--ai-transition);
    pointer-events: none;
}

.consultation-card:hover .card-border {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* 推荐工具区域 */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.tools-grid .tool-card:nth-child(5) {
    grid-column: 1 / 3;
}

.tool-card {
    position: relative;
    background: var(--ai-bg-tertiary);
    color: var(--ai-text-secondary);
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 13px;
    border: 1px solid var(--ai-border-color);
    transition: var(--ai-transition);
    cursor: pointer;
    text-align: center;
    line-height: 1.5;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

/* 强制深色模式下的工具卡片 */
html.dark .tool-card,
body.dark .tool-card,
.dark .tool-card,
body.dark-mode .tool-card,
html[data-theme="dark"] .tool-card,
html[data-bs-theme="dark"] .tool-card,
.ai-assistant-widget.ai-dark-mode .tool-card {
    background: #374151 !important;
    color: #f9fafb !important;
    border-color: #4b5563 !important;
}

/* 强制浅色模式下的工具卡片 */
html:not(.dark) .tool-card,
body:not(.dark) .tool-card,
:not(.dark) .tool-card,
body:not(.dark-mode) .tool-card,
html:not([data-theme="dark"]) .tool-card,
html:not([data-bs-theme="dark"]) .tool-card {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border-color: #e5e7eb !important;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.3s ease;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    background: var(--ai-primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    border-color: var(--ai-primary-color);
    text-decoration: none;
}

.tool-card:hover .card-border {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* 提示区域 */
.tips-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 一行提示样式 */
.tips-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.tip-item {
    color: var(--ai-text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.tip-separator {
    color: var(--ai-text-secondary);
    font-size: 13px;
    margin: 0 2px;
}

/* 强制深色模式下的提示项 */
html.dark .tip-item,
body.dark .tip-item,
.dark .tip-item,
body.dark-mode .tip-item,
html[data-theme="dark"] .tip-item,
html[data-bs-theme="dark"] .tip-item,
.ai-assistant-widget.ai-dark-mode .tip-item {
    color: #f9fafb !important;
}

html.dark .tip-separator,
body.dark .tip-separator,
.dark .tip-separator,
body.dark-mode .tip-separator,
html[data-theme="dark"] .tip-separator,
html[data-bs-theme="dark"] .tip-separator,
.ai-assistant-widget.ai-dark-mode .tip-separator {
    color: #f9fafb !important;
}

/* 强制浅色模式下的提示项 */
html:not(.dark) .tip-item,
body:not(.dark) .tip-item,
:not(.dark) .tip-item,
body:not(.dark-mode) .tip-item,
html:not([data-theme="dark"]) .tip-item,
html:not([data-bs-theme="dark"]) .tip-item {
    color: #6b7280 !important;
}

html:not(.dark) .tip-separator,
body:not(.dark) .tip-separator,
:not(.dark) .tip-separator,
body:not(.dark-mode) .tip-separator,
html:not([data-theme="dark"]) .tip-separator,
html:not([data-bs-theme="dark"]) .tip-separator {
    color: #6b7280 !important;
}

.tip-card {
    position: relative;
    background: var(--ai-bg-tertiary);
    color: var(--ai-text-secondary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid var(--ai-border-color);
    transition: var(--ai-transition);
    cursor: pointer;
    line-height: 1.4;
    overflow: hidden;
}

/* 强制深色模式下的提示卡片 */
html.dark .tip-card,
body.dark .tip-card,
.dark .tip-card,
body.dark-mode .tip-card,
html[data-theme="dark"] .tip-card,
html[data-bs-theme="dark"] .tip-card,
.ai-assistant-widget.ai-dark-mode .tip-card {
    background: #374151 !important;
    color: #f9fafb !important;
    border-color: #4b5563 !important;
}

/* 强制浅色模式下的提示卡片 */
html:not(.dark) .tip-card,
body:not(.dark) .tip-card,
:not(.dark) .tip-card,
body:not(.dark-mode) .tip-card,
html:not([data-theme="dark"]) .tip-card,
html:not([data-bs-theme="dark"]) .tip-card {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border-color: #e5e7eb !important;
}

.tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.3s ease;
}

.tip-card:hover::before {
    left: 100%;
}

.tip-card:hover {
    background: var(--ai-primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    border-color: var(--ai-primary-color);
}

.tip-card:hover .card-border {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* 工具提示 */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    backdrop-filter: blur(4px);
}

[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    margin-bottom: 1px;
    z-index: 1000;
}

/* 免责声明 */
.ai-disclaimer {
    margin-top: 6px;
    font-size: 10px;
    color: var(--ai-text-secondary);
    text-align: center;
    opacity: 0.5;
    line-height: 1.3;
}

/* 消息区域 */
.ai-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-height: 0;
}

.ai-messages::-webkit-scrollbar {
    display: none;
}

/* 图片结果区域 */
.ai-image-results {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-height: 300px;
}

.ai-image-results::-webkit-scrollbar {
    display: none;
}

.ai-message {
    display: flex;
    gap: 8px;
    animation: fadeInUp 0.3s ease-out;
}

.ai-message.user {
    flex-direction: row-reverse;
}

.ai-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    background: transparent;
}

.ai-message.user .ai-message-avatar {
    background: var(--ai-primary-color);
    color: white;
}

.ai-message.assistant .ai-message-avatar {
    background: transparent;
    color: var(--ai-text-primary);
}

.ai-message.assistant .ai-message-avatar svg {
    width: 32px;
    height: 32px;
    display: block;
}

.ai-message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--ai-radius-sm);
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    overflow: hidden;
}

.ai-message.user .ai-message-content {
    background: linear-gradient(135deg, var(--ai-primary-color), var(--ai-secondary-color));
    color: white;
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.3);
}

.ai-message.assistant .ai-message-content {
    background: var(--ai-bg-secondary);
    color: var(--ai-text-primary);
    border: 1px solid var(--ai-border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-message-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.ai-message-content:hover::before {
    opacity: 1;
}

/* 加载状态 */
.ai-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ai-text-secondary);
    font-size: 13px;
    padding: 8px 12px;
    background: var(--ai-bg-tertiary);
    border-radius: var(--ai-radius-sm);
    border: 1px solid var(--ai-border-color);
}

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

.ai-loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--ai-primary-color);
    border-radius: 50%;
    animation: loadingDots 1.4s infinite ease-in-out;
}

.ai-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-loading-dots span:nth-child(2) { animation-delay: -0.16s; }

/* 图片结果区域 */
.ai-image-result {
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease-out;
    background: var(--ai-bg-secondary);
    border-radius: var(--ai-radius-sm);
    border: 1px solid var(--ai-border-color);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-image-result img {
    width: 100%;
    border-radius: var(--ai-radius-sm) var(--ai-radius-sm) 0 0;
    transition: transform 0.3s ease;
}

.ai-image-result:hover img {
    transform: scale(1.02);
}

.ai-image-prompt {
    margin: 0;
    padding: 12px 16px;
    background: var(--ai-bg-tertiary);
    border-radius: 0 0 var(--ai-radius-sm) var(--ai-radius-sm);
    font-size: 13px;
    color: var(--ai-text-secondary);
    border-top: 1px solid var(--ai-border-color);
    font-style: italic;
}

/* 输入区域 */
.ai-input-area {
    padding: 20px;
    border-top: 1px solid var(--ai-border-color);
    background: var(--ai-bg-primary);
    flex-shrink: 0;
}

/* 强制深色模式下的输入区域 */
html.dark .ai-input-area,
body.dark .ai-input-area,
.dark .ai-input-area,
body.dark-mode .ai-input-area,
html[data-theme="dark"] .ai-input-area,
html[data-bs-theme="dark"] .ai-input-area,
.ai-assistant-widget.ai-dark-mode .ai-input-area {
    background: #1f2937 !important;
    border-top-color: #4b5563 !important;
}

/* 强制浅色模式下的输入区域 */
html:not(.dark) .ai-input-area,
body:not(.dark) .ai-input-area,
:not(.dark) .ai-input-area,
body:not(.dark-mode) .ai-input-area,
html:not([data-theme="dark"]) .ai-input-area,
html:not([data-bs-theme="dark"]) .ai-input-area {
    background: #ffffff !important;
    border-top-color: #e5e7eb !important;
}

.ai-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 8px;
}

.ai-input-wrapper textarea {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 12px 16px;
    border: 2px solid var(--ai-border-color);
    border-radius: 8px;
    background: var(--ai-bg-secondary);
    color: var(--ai-text-primary);
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    outline: none;
    transition: var(--ai-transition);
    font-family: inherit;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ai-input-wrapper textarea::-webkit-scrollbar {
    display: none;
}

/* 强制深色模式下的输入框 */
html.dark .ai-input-wrapper textarea,
body.dark .ai-input-wrapper textarea,
.dark .ai-input-wrapper textarea,
body.dark-mode .ai-input-wrapper textarea,
html[data-theme="dark"] .ai-input-wrapper textarea,
html[data-bs-theme="dark"] .ai-input-wrapper textarea,
.ai-assistant-widget.ai-dark-mode .ai-input-wrapper textarea {
    background: #111827 !important;
    color: #f9fafb !important;
    border-color: #4b5563 !important;
}

html.dark .ai-input-wrapper textarea::placeholder,
body.dark .ai-input-wrapper textarea::placeholder,
.dark .ai-input-wrapper textarea::placeholder,
body.dark-mode .ai-input-wrapper textarea::placeholder,
html[data-theme="dark"] .ai-input-wrapper textarea::placeholder,
html[data-bs-theme="dark"] .ai-input-wrapper textarea::placeholder,
.ai-assistant-widget.ai-dark-mode .ai-input-wrapper textarea::placeholder {
    color: #9ca3af !important;
}

/* 强制浅色模式下的输入框 */
html:not(.dark) .ai-input-wrapper textarea,
body:not(.dark) .ai-input-wrapper textarea,
:not(.dark) .ai-input-wrapper textarea,
body:not(.dark-mode) .ai-input-wrapper textarea,
html:not([data-theme="dark"]) .ai-input-wrapper textarea,
html:not([data-bs-theme="dark"]) .ai-input-wrapper textarea {
    background: #f9fafb !important;
    color: #1f2937 !important;
    border-color: #e5e7eb !important;
}

html:not(.dark) .ai-input-wrapper textarea::placeholder,
body:not(.dark) .ai-input-wrapper textarea::placeholder,
:not(.dark) .ai-input-wrapper textarea::placeholder,
body:not(.dark-mode) .ai-input-wrapper textarea::placeholder,
html:not([data-theme="dark"]) .ai-input-wrapper textarea::placeholder,
html:not([data-bs-theme="dark"]) .ai-input-wrapper textarea::placeholder {
    color: #6b7280 !important;
}

.ai-input-wrapper textarea:focus {
    border-color: var(--ai-primary-color);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
    transform: translateY(-1px);
}

.ai-send-btn {
    width: 44px;
    height: 44px;
    background: #f97316;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ai-transition);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.ai-send-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s;
}

.ai-send-btn:hover::before {
    left: 100%;
}

.ai-send-btn:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    background: #ea580c;
}

.ai-send-btn:active {
    transform: scale(0.95);
}

.ai-send-btn:disabled {
    background: var(--ai-text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 错误消息 */
.ai-error {
    background: linear-gradient(135deg, var(--ai-error-color), #dc2626);
    color: white;
    padding: 12px 16px;
    border-radius: var(--ai-radius-sm);
    font-size: 13px;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ai-assistant-widget {
        bottom: 180px;
        right: 15px;
    }
    
    .ai-sidebar {
        padding: 0;
        gap: 16px;
    }
    
    .ai-assistant-toggle {
        width: 30px;
        height: 100px;
        background: transparent;
        border: 1px solid #3b82f6;
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    }
    
    /* 浅色模式下的文字颜色 */
    html:not(.dark) .ai-assistant-toggle,
    body:not(.dark) .ai-assistant-toggle,
    :not(.dark) .ai-assistant-toggle,
    body:not(.dark-mode) .ai-assistant-toggle,
    html:not([data-theme="dark"]) .ai-assistant-toggle,
    html:not([data-bs-theme="dark"]) .ai-assistant-toggle {
        color: #1f2937;
    }
    
    /* 深色模式下的文字颜色 */
    html.dark .ai-assistant-toggle,
    body.dark .ai-assistant-toggle,
    .dark .ai-assistant-toggle,
    body.dark-mode .ai-assistant-toggle,
    html[data-theme="dark"] .ai-assistant-toggle,
    html[data-bs-theme="dark"] .ai-assistant-toggle {
        color: white;
    }
    
    .ai-assistant-toggle:hover {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
    }
    
    .ai-text-line {
        font-size: 11px;
        letter-spacing: 1.5px;
    }
    
    .ai-text-line:first-child {
        font-size: 13px;
        letter-spacing: 2px;
    }
    
    .ai-assistant-container {
        width: calc(100vw - 120px);
        height: calc(100vh - 80px);
        right: 70px;
        bottom: -40px;
    }
    
    /* 移动端布局调整 */
    .ai-unified-layout {
        flex-direction: column;
    }
    
    .ai-left-panel {
        width: 100%;
        height: 40%;
        border-right: none;
        border-bottom: 1px solid var(--ai-border-color);
    }
    
    .ai-right-panel {
        width: 100%;
        height: 60%;
    }
    
    .consultation-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .tools-grid .tool-card:nth-child(5) {
        grid-column: 1 / 3;
    }
}

@media (max-width: 480px) {
    .ai-assistant-widget {
        bottom: 160px;
        right: 10px;
    }
    
    .ai-sidebar {
        padding: 0;
        gap: 16px;
    }
    
    .ai-assistant-toggle {
        width: 25px;
        height: 90px;
        background: transparent;
        border: 1px solid #3b82f6;
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    }
    
    /* 浅色模式下的文字颜色 */
    html:not(.dark) .ai-assistant-toggle,
    body:not(.dark) .ai-assistant-toggle,
    :not(.dark) .ai-assistant-toggle,
    body:not(.dark-mode) .ai-assistant-toggle,
    html:not([data-theme="dark"]) .ai-assistant-toggle,
    html:not([data-bs-theme="dark"]) .ai-assistant-toggle {
        color: #1f2937;
    }
    
    /* 深色模式下的文字颜色 */
    html.dark .ai-assistant-toggle,
    body.dark .ai-assistant-toggle,
    .dark .ai-assistant-toggle,
    body.dark-mode .ai-assistant-toggle,
    html[data-theme="dark"] .ai-assistant-toggle,
    html[data-bs-theme="dark"] .ai-assistant-toggle {
        color: white;
    }
    
    .ai-assistant-toggle:hover {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
    }
    
    .ai-text-line {
        font-size: 10px;
        letter-spacing: 1px;
    }
    
    .ai-text-line:first-child {
        font-size: 12px;
        letter-spacing: 1.5px;
    }
    
    .ai-assistant-container {
        width: calc(100vw - 100px);
        height: calc(100vh - 60px);
        right: 60px;
        bottom: -30px;
    }
    
    /* 小屏幕布局调整 */
    .ai-unified-layout {
        flex-direction: column;
    }
    
    .ai-left-panel {
        width: 100%;
        height: 35%;
        border-right: none;
        border-bottom: 1px solid var(--ai-border-color);
    }
    
    .ai-right-panel {
        width: 100%;
        height: 65%;
    }
    
    .consultation-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .tools-grid .tool-card:nth-child(5) {
        grid-column: 1 / 3;
    }
    
    /* 调整内边距 */
    .ai-welcome-section,
    .ai-consultation-section,
    .ai-recommended-tools {
        padding: 15px;
    }
    
    .ai-messages {
        padding: 15px;
    }
    
    .ai-input-area {
        padding: 15px;
    }
} 

.ai-assistant-close {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--ai-transition);
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-assistant-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 导航栏 */
.ai-assistant-nav {
    display: flex;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-bottom: 1px solid var(--ai-border-color);
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* 强制深色模式下的导航栏 */
html.dark .ai-assistant-nav,
body.dark .ai-assistant-nav,
.dark .ai-assistant-nav,
body.dark-mode .ai-assistant-nav,
html[data-theme="dark"] .ai-assistant-nav,
html[data-bs-theme="dark"] .ai-assistant-nav,
.ai-assistant-widget.ai-dark-mode .ai-assistant-nav {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    border-bottom-color: #4b5563 !important;
}

/* 强制浅色模式下的导航栏 */
html:not(.dark) .ai-assistant-nav,
body:not(.dark) .ai-assistant-nav,
:not(.dark) .ai-assistant-nav,
body:not(.dark-mode) .ai-assistant-nav,
html:not([data-theme="dark"]) .ai-assistant-nav,
html:not([data-bs-theme="dark"]) .ai-assistant-nav {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    border-bottom-color: #e5e7eb !important;
}

.ai-nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

/* 强制深色模式下的导航按钮 */
html.dark .ai-nav-btn,
body.dark .ai-nav-btn,
.dark .ai-nav-btn,
body.dark-mode .ai-nav-btn,
html[data-theme="dark"] .ai-nav-btn,
html[data-bs-theme="dark"] .ai-nav-btn,
.ai-assistant-widget.ai-dark-mode .ai-nav-btn {
    color: rgba(255, 255, 255, 0.8) !important;
}

html.dark .ai-nav-btn:hover,
body.dark .ai-nav-btn:hover,
.dark .ai-nav-btn:hover,
body.dark-mode .ai-nav-btn:hover,
html[data-theme="dark"] .ai-nav-btn:hover,
html[data-bs-theme="dark"] .ai-nav-btn:hover,
.ai-assistant-widget.ai-dark-mode .ai-nav-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

html.dark .ai-nav-btn.active,
body.dark .ai-nav-btn.active,
.dark .ai-nav-btn.active,
body.dark-mode .ai-nav-btn.active,
html[data-theme="dark"] .ai-nav-btn.active,
html[data-bs-theme="dark"] .ai-nav-btn.active,
.ai-assistant-widget.ai-dark-mode .ai-nav-btn.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

/* 强制浅色模式下的导航按钮 */
html:not(.dark) .ai-nav-btn,
body:not(.dark) .ai-nav-btn,
:not(.dark) .ai-nav-btn,
body:not(.dark-mode) .ai-nav-btn,
html:not([data-theme="dark"]) .ai-nav-btn,
html:not([data-bs-theme="dark"]) .ai-nav-btn {
    color: rgba(255, 255, 255, 0.8) !important;
}

html:not(.dark) .ai-nav-btn:hover,
body:not(.dark) .ai-nav-btn:hover,
:not(.dark) .ai-nav-btn:hover,
body:not(.dark-mode) .ai-nav-btn:hover,
html:not([data-theme="dark"]) .ai-nav-btn:hover,
html:not([data-bs-theme="dark"]) .ai-nav-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

html:not(.dark) .ai-nav-btn.active,
body:not(.dark) .ai-nav-btn.active,
:not(.dark) .ai-nav-btn.active,
body:not(.dark-mode) .ai-nav-btn.active,
html:not([data-theme="dark"]) .ai-nav-btn.active,
html:not([data-bs-theme="dark"]) .ai-nav-btn.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

/* 导航按钮悬停效果 */
.ai-nav-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* 导航按钮激活状态 */
.ai-nav-btn.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* 导航按钮激活状态下的底部指示器 */
.ai-nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #ffffff;
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 导航按钮图标样式 */
.ai-nav-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.ai-nav-btn:hover svg {
    transform: scale(1.1);
}

.ai-nav-btn.active svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* 内容区域 */
.ai-assistant-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-mode-content {
    display: none;
    flex-direction: column;
    height: 100%;
}

.ai-mode-content.active {
    display: flex;
}

/* 图片按钮布局 */
.ai-image-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

/* 下载按钮样式 */
.ai-download-btn {
    width: 44px;
    height: 44px;
    background: #fbbf24;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ai-transition);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.ai-download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s;
}

.ai-download-btn:hover::before {
    left: 100%;
}

.ai-download-btn:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    background: #f59e0b;
}

.ai-download-btn:active {
    transform: scale(0.95);
}

/* 图片放大模态框 */
.ai-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.ai-image-modal.active {
    display: flex;
}

.ai-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.ai-modal-content {
    position: relative;
    background: var(--ai-bg-primary);
    border-radius: var(--ai-radius);
    box-shadow: var(--ai-shadow-lg);
    border: 1px solid var(--ai-border-color);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 强制深色模式下的模态框 */
html.dark .ai-modal-content,
body.dark .ai-modal-content,
.dark .ai-modal-content,
body.dark-mode .ai-modal-content,
html[data-theme="dark"] .ai-modal-content,
html[data-bs-theme="dark"] .ai-modal-content,
.ai-assistant-widget.ai-dark-mode .ai-modal-content {
    background: #1f2937 !important;
    border-color: #4b5563 !important;
}

/* 强制浅色模式下的模态框 */
html:not(.dark) .ai-modal-content,
body:not(.dark) .ai-modal-content,
:not(.dark) .ai-modal-content,
body:not(.dark-mode) .ai-modal-content,
html:not([data-theme="dark"]) .ai-modal-content,
html:not([data-bs-theme="dark"]) .ai-modal-content {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

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

/* 强制深色模式下的模态框头部 */
html.dark .ai-modal-header,
body.dark .ai-modal-header,
.dark .ai-modal-header,
body.dark-mode .ai-modal-header,
html[data-theme="dark"] .ai-modal-header,
html[data-bs-theme="dark"] .ai-modal-header,
.ai-assistant-widget.ai-dark-mode .ai-modal-header {
    background: #111827 !important;
    border-bottom-color: #4b5563 !important;
}

/* 强制浅色模式下的模态框头部 */
html:not(.dark) .ai-modal-header,
body:not(.dark) .ai-modal-header,
:not(.dark) .ai-modal-header,
body:not(.dark-mode) .ai-modal-header,
html:not([data-theme="dark"]) .ai-modal-header,
html:not([data-bs-theme="dark"]) .ai-modal-header {
    background: #f9fafb !important;
    border-bottom-color: #e5e7eb !important;
}

.ai-modal-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--ai-text-primary);
}

/* 强制深色模式下的模态框标题 */
html.dark .ai-modal-title,
body.dark .ai-modal-title,
.dark .ai-modal-title,
body.dark-mode .ai-modal-title,
html[data-theme="dark"] .ai-modal-title,
html[data-bs-theme="dark"] .ai-modal-title,
.ai-assistant-widget.ai-dark-mode .ai-modal-title {
    color: #f9fafb !important;
}

/* 强制浅色模式下的模态框标题 */
html:not(.dark) .ai-modal-title,
body:not(.dark) .ai-modal-title,
:not(.dark) .ai-modal-title,
body:not(.dark-mode) .ai-modal-title,
html:not([data-theme="dark"]) .ai-modal-title,
html:not([data-bs-theme="dark"]) .ai-modal-title {
    color: #1f2937 !important;
}

.ai-modal-close {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--ai-transition);
    background: none;
    border: none;
    color: var(--ai-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.ai-modal-close:hover {
    background: var(--ai-bg-tertiary);
    color: var(--ai-text-primary);
    transform: scale(1.1);
}

.ai-modal-body {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ai-modal-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--ai-radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ai-modal-footer {
    padding: 16px 20px;
    background: var(--ai-bg-secondary);
    border-top: 1px solid var(--ai-border-color);
    display: flex;
    justify-content: center;
}

/* 强制深色模式下的模态框底部 */
html.dark .ai-modal-footer,
body.dark .ai-modal-footer,
.dark .ai-modal-footer,
body.dark-mode .ai-modal-footer,
html[data-theme="dark"] .ai-modal-footer,
html[data-bs-theme="dark"] .ai-modal-footer,
.ai-assistant-widget.ai-dark-mode .ai-modal-footer {
    background: #111827 !important;
    border-top-color: #4b5563 !important;
}

/* 强制浅色模式下的模态框底部 */
html:not(.dark) .ai-modal-footer,
body:not(.dark) .ai-modal-footer,
:not(.dark) .ai-modal-footer,
body:not(.dark-mode) .ai-modal-footer,
html:not([data-theme="dark"]) .ai-modal-footer,
html:not([data-bs-theme="dark"]) .ai-modal-footer {
    background: #f9fafb !important;
    border-top-color: #e5e7eb !important;
}

.ai-modal-download-btn {
    background: #fbbf24;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--ai-transition);
}

.ai-modal-download-btn:hover {
    background: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.ai-modal-download-btn:active {
    transform: translateY(0);
}

/* 图片结果点击样式 */
.ai-image-result img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ai-image-result img:hover {
    transform: scale(1.02);
}

/* 消息中的链接样式 */
.ai-message-link {
    color: #3b82f6;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    word-break: break-all;
}

.ai-message-link:hover {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
    text-decoration: none;
}

/* 深色模式下的链接样式 */
html.dark .ai-message-link,
body.dark .ai-message-link,
body.dark-mode .ai-message-link,
[data-theme="dark"] .ai-message-link,
[data-bs-theme="dark"] .ai-message-link,
.ai-dark-mode .ai-message-link {
    color: #60a5fa !important;
}

html.dark .ai-message-link:hover,
body.dark .ai-message-link:hover,
body.dark-mode .ai-message-link:hover,
[data-theme="dark"] .ai-message-link:hover,
[data-bs-theme="dark"] .ai-message-link:hover,
.ai-dark-mode .ai-message-link:hover {
    color: #93c5fd !important;
    border-bottom-color: #93c5fd !important;
}

/* 消息中的图片样式 */
.ai-message-image {
    margin: 8px 0;
    text-align: center;
}

.ai-message-image img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--ai-border-color);
    background: var(--ai-bg-secondary);
}

.ai-message-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 深色模式下的图片样式 */
html.dark .ai-message-image img,
body.dark .ai-message-image img,
body.dark-mode .ai-message-image img,
[data-theme="dark"] .ai-message-image img,
[data-bs-theme="dark"] .ai-message-image img,
.ai-dark-mode .ai-message-image img {
    border-color: #4b5563 !important;
    background: #374151 !important;
}

/* 消息内容中的换行处理 */
.ai-message-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
}

/* 确保链接在消息中正确显示 */
.ai-message-content a {
    display: inline;
    word-break: break-all;
}

/* 图片加载状态 */
.ai-message-image img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ai-message-image img[src] {
    opacity: 1;
}

/* 图片加载失败时的样式 */
.ai-message-image img:not([src]),
.ai-message-image img[src=""] {
    display: none;
}

/* 图片错误提示样式 */
.ai-image-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 8px 12px;
    text-align: center;
    font-size: 12px;
    color: #dc2626;
    margin: 4px 0;
}

/* 深色模式下的图片错误提示 */
html.dark .ai-image-error,
body.dark .ai-image-error,
body.dark-mode .ai-image-error,
[data-theme="dark"] .ai-image-error,
[data-bs-theme="dark"] .ai-image-error,
.ai-dark-mode .ai-image-error {
    background: #7f1d1d !important;
    border-color: #dc2626 !important;
    color: #fca5a5 !important;
} 

/* 整体统一布局 */
.ai-unified-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* 左侧面板 - 介绍和功能区 */
.ai-left-panel {
    width: 50%;
    background: var(--ai-bg-secondary);
    border-right: 1px solid var(--ai-border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ai-left-panel::-webkit-scrollbar {
    display: none;
}

/* 强制深色模式下的左侧面板 */
html.dark .ai-left-panel,
body.dark .ai-left-panel,
.dark .ai-left-panel,
body.dark-mode .ai-left-panel,
html[data-theme="dark"] .ai-left-panel,
html[data-bs-theme="dark"] .ai-left-panel,
.ai-assistant-widget.ai-dark-mode .ai-left-panel {
    background: #111827 !important;
    border-right-color: #4b5563 !important;
}

/* 强制浅色模式下的左侧面板 */
html:not(.dark) .ai-left-panel,
body:not(.dark) .ai-left-panel,
:not(.dark) .ai-left-panel,
body:not(.dark-mode) .ai-left-panel,
html:not([data-theme="dark"]) .ai-left-panel,
html:not([data-bs-theme="dark"]) .ai-left-panel {
    background: #f9fafb !important;
    border-right-color: #e5e7eb !important;
}

/* 右侧面板 - 对话区 */
.ai-right-panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    background: var(--ai-bg-primary);
}

/* 强制深色模式下的右侧面板 */
html.dark .ai-right-panel,
body.dark .ai-right-panel,
.dark .ai-right-panel,
body.dark-mode .ai-right-panel,
html[data-theme="dark"] .ai-right-panel,
html[data-bs-theme="dark"] .ai-right-panel,
.ai-assistant-widget.ai-dark-mode .ai-right-panel {
    background: #1f2937 !important;
}

/* 强制浅色模式下的右侧面板 */
html:not(.dark) .ai-right-panel,
body:not(.dark) .ai-right-panel,
:not(.dark) .ai-right-panel,
body:not(.dark-mode) .ai-right-panel,
html:not([data-theme="dark"]) .ai-right-panel,
html:not([data-bs-theme="dark"]) .ai-right-panel {
    background: #ffffff !important;
}

/* 欢迎介绍区 */
.ai-welcome-section {
    padding: 24px 20px 20px 20px;
    border-bottom: 1px solid var(--ai-border-color);
    flex-shrink: 0;
}

/* 强制深色模式下的欢迎介绍区 */
html.dark .ai-welcome-section,
body.dark .ai-welcome-section,
.dark .ai-welcome-section,
body.dark-mode .ai-welcome-section,
html[data-theme="dark"] .ai-welcome-section,
html[data-bs-theme="dark"] .ai-welcome-section,
.ai-assistant-widget.ai-dark-mode .ai-welcome-section {
    border-bottom-color: #4b5563 !important;
}

/* 强制浅色模式下的欢迎介绍区 */
html:not(.dark) .ai-welcome-section,
body:not(.dark) .ai-welcome-section,
:not(.dark) .ai-welcome-section,
body:not(.dark-mode) .ai-welcome-section,
html:not([data-theme="dark"]) .ai-welcome-section,
html:not([data-bs-theme="dark"]) .ai-welcome-section {
    border-bottom-color: #e5e7eb !important;
}

/* 咨询建议区 */
.ai-consultation-section {
    padding: 20px;
    border-bottom: 1px solid var(--ai-border-color);
    flex-shrink: 0;
    margin-bottom: 0;
}

/* 强制深色模式下的咨询建议区 */
html.dark .ai-consultation-section,
body.dark .ai-consultation-section,
.dark .ai-consultation-section,
body.dark-mode .ai-consultation-section,
html[data-theme="dark"] .ai-consultation-section,
html[data-bs-theme="dark"] .ai-consultation-section,
.ai-assistant-widget.ai-dark-mode .ai-consultation-section {
    border-bottom-color: #4b5563 !important;
}

/* 强制浅色模式下的咨询建议区 */
html:not(.dark) .ai-consultation-section,
body:not(.dark) .ai-consultation-section,
:not(.dark) .ai-consultation-section,
body:not(.dark-mode) .ai-consultation-section,
html:not([data-theme="dark"]) .ai-consultation-section,
html:not([data-bs-theme="dark"]) .ai-consultation-section {
    border-bottom-color: #e5e7eb !important;
}

/* 推荐工具区 */
.ai-recommended-tools {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ai-recommended-tools::-webkit-scrollbar {
    display: none;
}

/* 强制深色模式下的推荐工具区 */
html.dark .ai-recommended-tools,
body.dark .ai-recommended-tools,
.dark .ai-recommended-tools,
body.dark-mode .ai-recommended-tools,
html[data-theme="dark"] .ai-recommended-tools,
html[data-bs-theme="dark"] .ai-recommended-tools,
.ai-assistant-widget.ai-dark-mode .ai-recommended-tools {
    background: #111827 !important;
}

/* 强制浅色模式下的推荐工具区 */
html:not(.dark) .ai-recommended-tools,
body:not(.dark) .ai-recommended-tools,
:not(.dark) .ai-recommended-tools,
body:not(.dark-mode) .ai-recommended-tools,
html:not([data-theme="dark"]) .ai-recommended-tools,
html:not([data-bs-theme="dark"]) .ai-recommended-tools {
    background: #f9fafb !important;
} 

/* 版权信息样式 */
.ai-copyright-container {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 11px;
    color: #FFD700 !important; /* 金色字体 */
    opacity: 0.8;
    pointer-events: auto;
    z-index: 1000;
}

.ai-copyright-container a {
    color: #FFD700 !important; /* 金色字体 */
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.ai-copyright-container a:hover {
    opacity: 1;
    text-decoration: underline;
    color: #FFA500 !important; /* 悬停时变为橙色 */
}

/* 深色模式下的版权信息 */
html.dark .ai-copyright-container,
body.dark .ai-copyright-container,
body.dark-mode .ai-copyright-container,
[data-theme="dark"] .ai-copyright-container,
[data-bs-theme="dark"] .ai-copyright-container,
.ai-dark-mode .ai-copyright-container {
    color: #FFD700 !important; /* 深色模式下也保持金色 */
}

/* 浅色模式下的版权信息 */
html:not(.dark) .ai-copyright-container,
body:not(.dark) .ai-copyright-container,
body:not(.dark-mode) .ai-copyright-container,
html:not([data-theme="dark"]) .ai-copyright-container,
html:not([data-bs-theme="dark"]) .ai-copyright-container {
    color: #FFD700 !important; /* 浅色模式下也保持金色 */
} 