/* 基础样式 */
body {
    background: linear-gradient(120deg, #f5f5f7, #eaf1f8);
    margin: 0;
    padding: 0;
    color: #333;
}

/* 容器样式 */
#deepseek-chat-container {
    display: flex;
    height: 80vh;
    max-width: 80%;
    margin: 20px auto;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 5px #5cb85c;
    background-color: #ffffff;
}

/* 历史对话框样式 */
#deepseek-chat-history {
    width: 220px;
    max-width: 220px;
    background: linear-gradient(180deg, #ffffff, #f9fbfd);
    border-right: 1px solid #e0e0e0;
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

#deepseek-chat-history ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

#deepseek-chat-history li {
    padding: 8px 5px;
    cursor: pointer;
    list-style: none !important;
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#deepseek-chat-history li:hover {
    background: #f0f8ff;
    transform: scale(1.02);
}

#deepseek-chat-history li.active {
    background: #0073aa;
    color: #fff;
}

#deepseek-chat-history li .deepseek-chat-title {
    font-weight: 600;
}

/* 新对话按钮 */
#deepseek-new-chat {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #4caf50, #2e7d32);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

#deepseek-new-chat:hover {
    background: linear-gradient(90deg, #388e3c, #1b5e20);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* 主对话框 */
#deepseek-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 消息框 */
#deepseek-chat-messages {
    flex: 1;
    padding: 20px;
    padding-bottom: 60px;
    overflow-y: auto;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    position: relative;
    scroll-behavior: smooth;
}

/* 消息气泡 */
.message-bubble {
    padding: 5px 15px;
    border-radius: 16px;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    max-width: 80%; /* 限制消息气泡宽度，避免过宽 */
}

/* 最后一个消息气泡额外处理 */
.message-bubble:last-child {
    margin-bottom: 20px;
}

.message-bubble.user {
    background: linear-gradient(90deg, #0073aa, #005177);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 8px;
}

.message-bubble.bot {
    background: #f9fbfd;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 8px;
}

/* 代码块样式 */
.message-bubble pre {
    background: #2d2d2d;
    color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
    max-width: 100%;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 代码块中的代码标签 */
.message-bubble pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
}

/* 表格样式 */
.message-bubble table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: #ffffff;
    border: 1px solid #ddd;
    font-size: 14px;
}

/* 表头 */
.message-bubble table th {
    background: #f5f5f5;
    font-weight: bold;
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

/* 表格内容 */
.message-bubble table td {
    padding: 8px;
    border: 1px solid #ddd;
}

/* 响应式表格防止溢出 */
.message-bubble table {
    overflow-x: auto;
    white-space: nowrap;
    max-width: 100%;
}

/* 代码行高亮 */
.message-bubble pre .hljs {
    background: #2d2d2d !important;
    color: #ffffff !important;
}

/* 对话框里面的图片 */
.message-bubble.bot img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    display: block;
}
/* 消息气泡 结束 */

/* 输入框和发送按钮 */
#deepseek-chat-input-container {
    display: flex;
    position: relative;
    min-height: 100px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    align-items: center;
    gap: 12px;
}

#deepseek-chat-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    background: #fff;
}

#deepseek-chat-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 4px rgba(0, 115, 170, 0.3);
}

/* 发送按钮 */
#deepseek-chat-send {
    padding: 14px 24px;
    background: linear-gradient(90deg, #ff9800, #f57c00);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

#deepseek-chat-send:hover {
    background: linear-gradient(90deg, #f57c00, #e65100);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* 删除按钮样式 */
.deepseek-delete-log {
    background-color: #ff4d4d;
    float: right;
    color: white;
    border: none;
    padding: 2px 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.deepseek-delete-log:hover {
    background-color: #e60000;
}

/* 登录提示样式 */
.deepseek-login-prompt {
    text-align: center;
    font-size: 18px;
    color: #0073aa;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    transition: all 0.3s ease;
    width: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

#deepseek-chat-messages {
    white-space: pre-wrap; 
    word-wrap: break-word;
}

#deepseek-thinking-message {
    color: #888;
    font-style: italic;
}

/* 自定义提示词板块样式 */
#deepseek-custom-prompts {
    padding: 15px;
    margin-top: 15px;
    border-radius: 8px;
    text-align: center;
}

#deepseek-custom-prompts .deepseek-prompt {
    display: inline-block;
    background: #4a90e2;
    color: #fff;
    padding: 8px 16px;
    margin: 6px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#deepseek-custom-prompts .deepseek-prompt:hover {
    background: #357ab8;
    transform: translateY(-2px);
}

/* ai对话框语音朗读按钮 */
.ai-tts-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 25px;
    background-color: #267ad1;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease, transform 0.1s ease;
    position: relative;
    bottom: 2.2px;
}

.ai-tts-play:hover {
    background-color: #1a5a9e;
    transform: scale(1.1);
}

.ai-tts-play:active {
    transform: scale(0.95);
}

/* 复制普通内容按钮 */
.bot-copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 25px;
    margin-left: 10px;
    background-color: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    position: relative;
    bottom: 2.3px;
}

.bot-copy-button:hover {
    background-color: #357abd;
    transform: scale(1.1);
}

.bot-copy-button:active {
    transform: scale(0.95);
}

/* 点击后的状态 */
.bot-copy-button.clicked {
    width: 80px;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #357abd;
}

/*气泡样式 */
.tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none; /* 防止影响鼠标事件 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* 语音、复制普通内容、气泡按钮end */

/* pre复制按钮样式 */
.pre-copy-button {
    display: inline-block;
    background: linear-gradient(90deg, #0073aa, #005177);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    margin-top: 2px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    min-width: 80px;
    text-align: center;
}

.pre-copy-button:hover {
    background: linear-gradient(90deg, #005177, #003d5a);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.pre-copy-button:active {
    transform: translateX(-50%) scale(0.98);
}
/* 复制按钮样式 */

/* 底部选项栏容器样式 */
#deepseek-options-bar {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    padding: 8px 0;
    flex-wrap: wrap; /* 防止小屏幕溢出 */
}

/* 单个选项通用样式 */
.deepseek-option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    padding: 6px 12px;
    background: linear-gradient(90deg, #ffffff, #f9fbfd);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.deepseek-option-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* 前台接口选择样式 */
.deepseek-interface-select {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    padding: 4px 12px;
    background: linear-gradient(90deg, #ffffff, #f9fbfd);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    flex-wrap: wrap; /* 防止宽度不够时溢出 */
}

.deepseek-interface-select:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.deepseek-interface-select label {
    margin-right: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.025em;
}

.deepseek-interface-select select {
    padding: 2px 1px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-width: 120px; /* 确保下拉菜单有足够宽度 */
}

.deepseek-interface-select select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 4px rgba(0, 115, 170, 0.3);
    outline: none;
}

/* 联网搜索开关样式 */
.deepseek-search-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    padding: 6px 12px;
    background: linear-gradient(90deg, #ffffff, #f9fbfd);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3sease, transform 0.2sease;
}

.deepseek-search-toggle .switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.deepseek-search-toggle .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.deepseek-search-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: background-color 0.4s ease;
    border-radius: 20px;
}

.deepseek-search-toggle .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: transform 0.4s ease;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.deepseek-search-toggle input:checked + .slider {
    background-color: #4caf50;
}

.deepseek-search-toggle input:checked + .slider:before {
    transform: translateX(20px);
}

.deepseek-search-toggle span {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.025em;
}

/* 教程链接样式 */
.deepseek-tutorial-link a {
    font-size: 13px;
    font-weight: 500;
    color: #0073aa;
    text-decoration: none !important;
    letter-spacing: 0.025em;
    transition: color 0.3s ease;
}

.deepseek-tutorial-link a:hover {
    color: #005177;
    text-decoration: none !important;
}
/* 底部状态栏样式结束 */

/* 智能体应用标题 */
.deepseek-agent-title {
    display: block;
    background: linear-gradient(135deg, #4CAF50, #2E8B57);
    color: white;
    padding: 2px 25px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    margin: 10px auto;
    width: 160px;
    box-sizing: border-box; /* 确保padding不影响宽度 */
}

.deepseek-agent-title:hover {
    background: linear-gradient(135deg, #45a049, #1e7b50);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}
/* 智能体应用标题 */

/* 智能体应用列表样式 */
.agent-list {
    padding: 15px;
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
    gap: 15px;
    justify-content: flex-start;
}

.agent-item {
    width: calc(32%); /* 一行3个 */
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #ffffff, #f5f5f5);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.agent-item:hover {
    background: linear-gradient(180deg, #f9f9f9, #ececec);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.agent-icon {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    border-radius: 50%;
    object-fit: cover;
}

.agent-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* 防止溢出 */
    margin-left: 10px;
}

.agent-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: left;
    white-space: nowrap; /* 单行显示 */
    overflow: hidden;
    text-overflow: ellipsis; /* 超出部分显示省略号 */
}

.agent-description {
    font-size: 12px;
    color: #666;
    margin: 4px 0 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制两行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 智能体应用响应式：手机端一行一个 */
@media (max-width: 768px) {
    .agent-list {
        padding: 10px;
        display: flex;
        flex-direction: column; /* 一行一个 */
        gap: 8px;
    }

    .agent-item {
        width: 100%;
        padding: 12px;
    }

    .agent-icon {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }

    .agent-name {
        font-size: 15px;
    }

    .agent-description {
        font-size: 13px;
    }

    .opening-questions {
        padding: 10px;
        gap: 6px;
    }

    .opening-question {
        max-width: 100%; /* 手机端每行一个 */
        padding: 8px 14px;
        font-size: 13px;
    }
}
/* 智能体应用列表样式 */

/* 智能体应用对话页面 */
.agent-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    top: 0;
    z-index: 10;
    box-sizing: border-box;
    align-self: center;
}

.agent-header .agent-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.agent-header .agent-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
/* 智能体应用对话页面 */

/* 开场问题提示和列表样式 */
.message-bubble.bot.prompt-hint {
    font-style: italic;
    color: #666;
    margin-top: 10px;
}

.opening-questions {
    margin-top: 15px;
    padding: 12px;
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
    gap: 8px;
    justify-content: flex-start; /* 左对齐 */
}

.opening-question {
    padding: 10px 16px;
    background: linear-gradient(90deg, #4a90e2, #357ab8);
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap; /* 防止换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 超出部分显示省略号 */
    max-width: calc(33.33% - 8px); /* 每行最多3个，减去间距 */
}

.opening-question:hover {
    background: linear-gradient(90deg, #357ab8, #2a5d8c);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 响应式手机端每行一个 */
@media (max-width: 768px) {
    .opening-questions {
        padding: 10px;
        gap: 6px;
    }

    .opening-question {
        max-width: 100%;
        padding: 8px 14px;
        font-size: 13px;
    }
}
/* 开场问题提示和列表样式 */

/* 未登录提示遮罩层 */
.deepseek-login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    color: #ff0000;
    cursor: not-allowed;
    z-index: 999;
}

/* 自定义错误提示框样式 */
.custom-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px 25px;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 250px;
    max-width: 90%;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

/* 成功提示框 */
.custom-notification.success {
    background: linear-gradient(90deg, #4caf50, #2e7d32);
}

/* 错误提示框 */
.custom-notification.error {
    background: linear-gradient(90deg, #ff4d4d, #e60000);
}

/* 关闭按钮 */
.close-notification {
    margin-left: 15px;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close-notification:hover {
    opacity: 1;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 淡出动画 */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
}

/* 自定义提示框响应式调整 */
@media (max-width: 768px) {
    .custom-notification {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 200px;
        max-width: 80%;
    }

    .close-notification {
        margin-left: 10px;
        font-size: 18px;
    }
}
/* 自定义错误提示框样式 */

/* 智能体应用清除对话样式 */
#clear-conversation-container {
    text-align: center;
    padding: 10px 0;
    margin-left: 20px;
    margin-right: 20px;
}

#clear-conversation-button {
    background: #666;
    color: #fff;
    border: none;
    padding: 2px 5px;
    border-radius: 4px;
    cursor: pointer;
    width: 100px;
    text-align: center;
}

#clear-conversation-button:hover {
    background: #cc0000;
}

.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.confirmation-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 90%;
    width: 350px;
}

.dialog-content {
    text-align: center;
}

.dialog-content p {
    margin-bottom: 20px;
    color: #333;
    font-size: 16px;
}

.dialog-content .confirm-clear,
.dialog-content .cancel-clear {
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.dialog-content .confirm-clear {
    background: #0073aa;
    color: #fff;
}

.dialog-content .confirm-clear:hover {
    background: #005a87;
}

.dialog-content .cancel-clear {
    background: #ccc;
    color: #333;
}

.dialog-content .cancel-clear:hover {
    background: #999;
}
/* 清除对话样式 */

/* 自定义入口标题样式 */
.deepseek-custom-entry-title {
    display: block;
    background: linear-gradient(135deg, #4CAF50, #2E8B57);
    color: white;
    padding: 2px 25px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    margin: 10px auto;
    width: 160px;
    box-sizing: border-box; /* 确保padding不影响宽度 */
    text-decoration: none !important;
}

.deepseek-custom-entry-title:hover {
    background: linear-gradient(135deg, #45a049, #1e7b50);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

/* 推理过程样式 */
.reasoning-content {
    margin-bottom: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f8ff, #e6f0fa);
    border-radius: 12px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.6;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.reasoning-content strong {
    color: #2980b9;
    font-weight: 600;
}

.reasoning-content:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 最终回答样式 */
.final-content {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.final-content strong {
    color: #27ae60;
    font-weight: 600;
}

/* 上传文件板块整体样式 */
.deepseek-option-item.upload-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: linear-gradient(90deg, #ffffff, #f9fbfd); /* 与选项栏一致 */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    flex-shrink: 0; /* 防止被压缩 */
}

.deepseek-option-item.upload-section:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* 上传文件按钮样式 */
#deepseek-upload-file-btn {
    padding: 3px 10px;
    background: linear-gradient(90deg, #4a90e2, #357abd);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap; /* 防止换行 */
    min-width: 80px;
}

#deepseek-upload-file-btn:hover {
    background: linear-gradient(90deg, #357abd, #2a5d8c);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#deepseek-upload-file-btn:active {
    transform: scale(0.98);
}

/* 文件上传输入框*/
#deepseek-file-input {
    display: none;
}

/* 已上传文件列表容器 */
#uploaded-files-list {
    display: none;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 2px 6px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    max-width: 300px;
    min-width: 100px;
    height: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    align-items: center;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; /* Firefox细滚动条 */
    scrollbar-color: #888 #f0f0f0; /* Firefox滚动条颜色 */
}

/* 显示文件列表时应用样式 */
#uploaded-files-list.visible {
    display: flex; /* 上传后显示 */
}

/* 自定义滚动条样式（Chrome、Safari） */
#uploaded-files-list::-webkit-scrollbar {
    height: 8px;
}

#uploaded-files-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

#uploaded-files-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#uploaded-files-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 单个已上传文件项 */
#uploaded-files-list div {
    display: flex;
    align-items: center;
    padding: 2px 6px;
    font-size: 12px;
    color: #333;
    background: #f0f0f0;
    border-radius: 4px;
    white-space: nowrap; /* 防止换行 */
    margin-right: 4px;
}

/* 文件名样式 */
#uploaded-files-list div span {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis; /* 超出部分显示省略号 */
}

/* 删除按钮样式 */
#uploaded-files-list div button {
    background: linear-gradient(90deg, #ff4d4d, #e60000);
    color: #fff;
    border: none;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-left: 6px;
    white-space: nowrap; /* 防止换行 */
}

#uploaded-files-list div button:hover {
    background: linear-gradient(90deg, #e60000, #cc0000);
    transform: translateY(-1px);
}

/* 文件上传板块响应式 */
@media (max-width: 768px) {
    .deepseek-option-item.upload-section {
        flex-direction: row; /* 保持水平排列 */
        align-items: center;
        gap: 8px;
        padding: 6px 10px;
    }

    #deepseek-upload-file-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 70px;
    }

    #uploaded-files-list {
        max-width: 260px; /* 手机端缩小最大宽度 */
        height: 35px;
        padding: 2px 4px;
        min-width: 100px;
    }

    #uploaded-files-list div {
        padding: 2px 4px;
        font-size: 11px;
        margin-right: 2px;
    }

    #uploaded-files-list div button {
        padding: 2px 4px;
        font-size: 10px;
    }
}

/* 智能体文件上传板块整体样式 */
.agent-upload-section {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
    padding: 4px 12px;
    background: linear-gradient(90deg, #ffffff, #f9fbfd);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.agent-upload-section:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* 智能体文件上传按钮样式 */
#deepseek-agent-upload-btn {
    padding: 6px 12px;
    background: linear-gradient(90deg, #4a90e2, #357abd);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    min-width: 80px;
    line-height: 1; /* 确保行高不影响对齐 */
}

#deepseek-agent-upload-btn:hover {
    background: linear-gradient(90deg, #357abd, #2a5d8c);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#deepseek-agent-upload-btn:active {
    transform: scale(0.98);
}

/* 智能体文件上传输入框 */
#deepseek-agent-file-input {
    display: none;
}

/* 已上传文件显示样式 */
#agent-uploaded-file {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 1px 12px;
    background: #f0f0f0; /* 浅灰背景 */
    border-radius: 4px;
    max-width: 300px;
}

#agent-uploaded-file.visible {
    display: flex; /* 上传后显示为flex布局 */
}

/* 文件名样式 */
#agent-uploaded-file .file-name {
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 超出显示省略号 */
    flex-grow: 1;
}

/* 删除按钮样式 */
#agent-uploaded-file .remove-file-btn {
    background: linear-gradient(90deg, #ff4d4d, #e60000);
    color: #fff;
    border: none;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

#agent-uploaded-file .remove-file-btn:hover {
    background: linear-gradient(90deg, #e60000, #cc0000);
    transform: translateY(-1px);
}

/* 智能体文件响应式 */
@media (max-width: 768px) {
    .agent-upload-section {
        gap: 8px;
        padding: 6px 10px;
        margin-left: 10px;
    }

    #deepseek-agent-upload-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 70px;
    }

    #agent-uploaded-file {
        max-width: 200px;
        padding: 1px 10px;
    }

    #agent-uploaded-file .file-name {
        font-size: 12px;
    }

    #agent-uploaded-file .remove-file-btn {
        padding: 2px 4px;
        font-size: 10px;
    }
}

/* 视频生成图片预览 */
#qwen-video-image-preview {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

#uploaded-image-container img {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-width: 200px;
    max-height: 200px;
}

#remove-uploaded-image {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 1px 10px;
    border-radius: 4px;
    cursor: pointer;
}

#remove-uploaded-image:hover {
    background-color: #cc0000;
}

/* 视频消息时调整宽度 */
.message-bubble.bot.video-message {
    width: 60%;
    max-width: 80%;
}

.video-preview {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 公告样式 */
#deepseek-announcement {
    border-radius: 10px;
    padding: 5px 20px;
    margin: 15px auto;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #181818;
    font-size: 15px;
    line-height: 1.6;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

#deepseek-announcement a {
    color: #e68a00;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

#deepseek-announcement a:hover {
    color: #cc7a00;
    text-decoration: underline;
}

#deepseek-announcement p {
    margin: 0;
    padding: 0;
}
/* 公告样式end */ 

/* 其他响应式优化 */
@media (max-width: 768px) {
    .message-bubble.bot {
        max-width: 100%;
    }

    #deepseek-chat-container {
        flex-direction: column-reverse; /* 历史对话框放在下方 */
        height: 100vh;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }

    #deepseek-chat-history {
        width: 100%;
        max-width: 100%;
        border-right: none;
        border-top: 1px solid #e0e0e0;
        max-height: 40vh; /* 限制历史对话框高度 */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #deepseek-chat-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0; /* 允许内部滚动 */
    }

    #deepseek-chat-messages {
        flex: 1;
        padding: 15px;
        min-height: 0; /* Flex元素溢出问题 */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #deepseek-chat-input-container {
        padding: 10px;
    }

    #deepseek-options-bar {
        gap: 10px;
        padding: 6px 0;
    }

    .deepseek-option-item,
    .deepseek-interface-select {
        padding: 5px 10px;
        height: 35px;
    }

    .deepseek-interface-select label,
    .deepseek-search-toggle span,
    .deepseek-tutorial-link a {
        font-size: 12px;
    }

    .deepseek-interface-select select {
        padding: 1px 1px;
        min-width: 100px; /* 手机端缩小宽度 */
    }

    #deepseek-agent-title {
        text-align: center;
        width: 90%;
        max-width: 160px;
        box-sizing: border-box;
    }

    .deepseek-custom-entry-title {
        text-align: center;
        width: 90%;
        max-width: 160px;
        box-sizing: border-box;
    }

    .reasoning-content, .final-content {
        padding: 10px 12px;
        font-size: 14px;
        margin-bottom: 8px;
    } 

    .ai-tts-play {
        width: 28px;
        height: 20px;
        font-size: 13px;
        margin-left: 5px;
    }

    .bot-copy-button {
        width: 28px;
        height: 20px;
        font-size: 13px;
        margin-left: 5px;
        position: relative;
        bottom: 2px;
    }

    .tooltip {
        display: none;
    }

    .message-bubble.bot.video-message {
        width: 100%;
    }

    #uploaded-image-container img {
        max-width: 100px;
        max-height: 100px;
    } 

    #deepseek-announcement {
        max-width: 98%;
        padding: 10px 15px;
        font-size: 14px;
        margin: 10px auto;
    }               
}