* {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    body {
        font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
        background: linear-gradient(to bottom, #8fc2ff, #ffffff);
        background-repeat: no-repeat;
        min-height: 100vh;
        padding-bottom: 80px;
    }
    
    /* AI对话容器 - 全宽自适应布局 */
    .ai-chat-container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        /* 反馈#54：底部内边距归零，使容器内容底边=输入区上沿（容器底边原本就对齐输入区上沿） */
        padding: 25px 50px 0;
        /* 140=顶栏60+输入区80，+60=底部导航栏：容器底=输入区上沿（页脚悬浮区上边沿），不再穿到页脚下 */
        height: calc(100vh - 200px);
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    /* 平板适配 */
    @media (max-width: 1024px) {
        .ai-chat-container {
            padding: 20px 40px;
        }
    }

    /* 移动端适配 */
    @media (max-width: 768px) {
        .ai-chat-container {
            padding: 15px 20px;
        }
    }

    /* 超小屏幕适配 */
    @media (max-width: 375px) {
        .ai-chat-container {
            padding: 10px 15px;
        }
    }
    
    /* 欢迎区域 */
    .welcome-section {
        text-align: center;
        padding: 30px 20px;
        margin-bottom: 20px;
    }
    
    .welcome-avatar {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        margin-bottom: 15px;
        border: 3px solid #fff;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    
    .welcome-title {
        font-size: 20px;
        color: #333;
        margin-bottom: 10px;
        font-weight: bold;
    }
    
    .welcome-subtitle {
        font-size: 14px;
        color: #666;
    }
    
    /* 快捷问题区域 */
    .quick-questions {
        background: rgba(255,255,255,0.9);
        border-radius: 15px;
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
    
    .quick-questions-title {
        font-size: 14px;
        color: #999;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .quick-question-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .quick-question-item {
        background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
        color: #fff;
        padding: 10px 20px;
        border-radius: 20px;
        font-size: 13px;
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
        box-shadow: 0 2px 8px rgba(116, 185, 255, 0.35);
    }

    .quick-question-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(116, 185, 255, 0.45);
    }

    /* 右侧问题提示栏：仅宽屏显示（默认隐藏） */
    .side-questions {
        display: none;
    }

    @media (min-width: 1200px) {
        /* 宽屏双栏：左问答占 2/3，右问题提示占 1/3，输入区在容器外保持全宽 */
        .ai-chat-container {
            flex-direction: row;
            align-items: stretch;
            gap: 20px;
        }

        /* 右侧栏已承担问题引导，宽屏隐藏顶部欢迎区与快捷问题，避免重复 */
        .welcome-section,
        .quick-questions {
            display: none;
        }

        /* 反馈#51：右侧问题栏收窄到约1/4屏宽（左:右 = 3:1）；
           加容器前缀提高特异性：源码后面的基础 .chat-messages { flex: 1 } 会覆盖同特异性的比例 */
        .ai-chat-container .chat-messages {
            flex: 3 1 0;
            min-width: 0;
        }

        .ai-chat-container .side-questions {
            display: flex;
            flex: 1 1 0;
            min-width: 0;
            flex-direction: column;
            background: rgba(255,255,255,0.92);
            border-radius: 15px;
            /* 反馈#54：底部内边距归零，末尾问题框下边缘精确贴住输入区上沿 */
            padding: 20px 16px 0;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            overflow-y: auto;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .side-questions::-webkit-scrollbar {
            display: none;
        }

        .side-questions-title {
            font-size: 14px;
            color: #999;
            margin-bottom: 12px;
            text-align: center;
            flex-shrink: 0;
        }

        .side-question-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            /* 反馈#54：撑满整栏高度并均分布局，消除列表下方空白，使下边缘对齐输入区上沿 */
            flex: 1;
            justify-content: space-between;
        }

        .side-question-item {
            display: flex;
            align-items: baseline;
            gap: 8px;
            /* 反馈#53：恢复整栏对齐，所有问题框左右边缘对齐更整齐 */
            width: 100%;
            box-sizing: border-box;
            text-align: left;
            background: #f0f7ff;
            color: #333;
            padding: 10px 14px;
            border-radius: 10px;
            font-size: 13px;
            line-height: 1.5;
            cursor: pointer;
            transition: all 0.25s ease;
            border: 1px solid #dceaff;
        }

        .side-question-item .side-question-no {
            color: #007aff;
            font-weight: 700;
            flex-shrink: 0;
        }

        .side-question-item:hover {
            background: linear-gradient(135deg, #007aff 0%, #00c6ff 100%);
            color: #fff;
            border-color: transparent;
            transform: translateX(3px);
            box-shadow: 0 3px 10px rgba(0, 122, 255, 0.3);
        }

        .side-question-item:hover .side-question-no {
            color: #fff;
        }
    }
    
    /* 聊天记录区域 - 隐藏滚动条但保留滚动功能 */
    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 15px 0 25px 0;
        display: none;
        scrollbar-width: none;  /* Firefox */
        -ms-overflow-style: none;  /* IE 10+ */
        margin-bottom: 15px;
    }

    .chat-messages::-webkit-scrollbar {
        display: none;  /* Chrome, Safari, Edge */
    }

    .chat-messages.active {
        display: block;
    }

    /* 移动端适配 - 调整聊天记录区域 */
    @media (max-width: 768px) {
        .chat-messages {
            padding: 10px 0;
        }
    }



    .message {
        display: flex;
        margin-bottom: 30px;
        padding: 0;
        animation: fadeIn 0.3s ease;
        width: 100%;
        box-sizing: border-box;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .message.user {
        flex-direction: row-reverse;
        justify-content: flex-start;
    }

    .message.ai {
        justify-content: space-between;
    }

    .message-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        margin: 1.8px 15px 0;
        flex-shrink: 0;
        /* 头像中心对齐气泡第一行文字中心：上padding 8.3 + 行框27/2 - 头像半高20 = 1.8 */
        align-self: flex-start;
    }

    .message-content {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: none;
        padding: 8.3px 20px;
        border-radius: 18px;
        font-size: 15px;
        line-height: 1.8;
        word-wrap: break-word;
        white-space: pre-wrap;
    }

    .message.ai .message-content {
        background: #fff;
        color: #333;
        border-bottom-left-radius: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        word-break: normal;
        overflow-wrap: break-word;
        text-wrap: pretty;
        margin-right: auto;
        /* 全宽布局：占满头像右侧全部剩余宽度，长回复不设上限 */
        flex: 1 1 auto;
    }

    .message.user .message-content {
        background: linear-gradient(135deg, #007aff 0%, #00c6ff 100%);
        color: #fff;
        border-bottom-right-radius: 4px;
        /* 全宽布局：自然宽度贴右，长消息可伸展占满剩余宽度（无上限） */
        flex: 0 1 auto;
        width: auto;
    }

    /* 平板适配 */
    @media (max-width: 1024px) {
    }

    /* 移动端适配 - 调整消息内容宽度 */
    @media (max-width: 768px) {
        .message-content {
            padding: 7.9px 16px;
            font-size: 15px;
        }
    }

    @media (max-width: 375px) {
        .message-content {
            padding: 7.8px 14px;
            font-size: 14px;
        }
    }
    
    /* 优化API自带序号的显示样式 */
    .message.ai .message-content {
        line-height: 1.8;
    }

    /* 让API返回的序号数字更醒目 */
    .message.ai .message-content {
        counter-reset: api-list-counter;
    }

    /* 使用CSS为以数字开头的行添加样式 */
    .message.ai .message-content p,
    .message.ai .message-content div {
        position: relative;
    }

    .message.ai .message-content p {
        margin: 12px 0;
        line-height: 1.8;
    }

    .message.ai .message-content strong,
    .message.ai .message-content b {
        color: #007aff;
        font-weight: 600;
    }

    /* AI消息内容段落间距优化 */
    .message.ai .message-content br {
        display: block;
        content: "";
        margin: 5px 0;
    }

    /* 确保AI消息内容中的HTML正确显示 */
    .message.ai .message-content div {
        margin: 8px 0;
    }
    
    /* 图片容器 */
    .image-container {
        margin: 10px 0;
        border-radius: 8px;
        overflow: hidden;
        background: #f5f5f5;
        min-height: 100px;
    }
    
    /* 图片加载占位符 */
    .image-loading {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 30px 20px;
        color: #999;
        font-size: 13px;
    }
    
    .loading-spinner {
        width: 30px;
        height: 30px;
        border: 3px solid #e0e0e0;
        border-top-color: #007aff;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-bottom: 10px;
    }
    
    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    
    /* 图片加载失败 */
    .image-error {
        color: #c62828;
        font-size: 13px;
    }
    
    /* 消息中的图片样式 - 移动端和PC端兼容 */
    .message-image {
        margin: 15px 0;
        text-align: center;
        border-radius: 0;
        overflow: visible;
    }

    .message-image img {
        max-width: 100%;
        max-height: 400px;
        border-radius: 0 !important;
        box-shadow: none !important;
        transition: transform 0.3s ease;
        display: block;
        margin: 0 auto;
        /* 关键：禁用微信webview对图片的长按识别与选中，避免拦截点击放大事件 */
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    .message-image img:hover {
        transform: scale(1.02);
    }

    /* 视频播放器样式 */
    .message-video {
        margin: 15px 0;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        background: #000;
    }

    .message-video video {
        max-width: 100%;
        width: 100%;
        display: block;
        border-radius: 8px;
    }

    /* 反馈#199：PC 端竖版视频限制在一屏高度内完整显示（留出顶部栏与输入区） */
    @media (min-width: 769px) {
        .message-video video {
            max-height: calc(100vh - 180px);
            object-fit: contain;
            background: #000;
        }
        .message-video video:fullscreen,
        .message-video video:-webkit-full-screen {
            max-height: 100vh;
            background: #000;
        }
    }

    .message-video .video-caption {
        padding: 10px;
        background: #f8f9fa;
        font-size: 14px;
        color: #666;
        text-align: center;
    }

    /* 移动端视频适配 */
    @media (max-width: 768px) {
        .message-video {
            margin: 10px 0;
        }
    }

    /* 视频加载占位符样式 - 流式输出期间显示 */
    .video-loading-placeholder {
        margin: 15px 0;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        width: 100%;
        max-width: 640px;
        aspect-ratio: 16 / 9;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .video-loading-placeholder .video-loading-spinner {
        width: 60px;
        height: 60px;
        position: relative;
    }

    .video-loading-placeholder .video-loading-spinner::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        border: 4px solid rgba(0, 122, 255, 0.2);
        border-top-color: #007aff;
        animation: videoSpinner 1s linear infinite;
    }

    .video-loading-placeholder .video-loading-spinner::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 0;
        height: 0;
        border-left: 14px solid #007aff;
        border-top: 9px solid transparent;
        border-bottom: 9px solid transparent;
        margin-left: 2px;
    }

    @keyframes videoSpinner {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    .video-loading-placeholder .video-loading-text {
        color: #fff;
        font-size: 16px;
        font-weight: 500;
        text-align: center;
        margin-top: 20px;
    }

    .video-loading-placeholder .video-loading-subtext {
        color: rgba(255,255,255,0.6);
        font-size: 13px;
        margin-top: 8px;
        text-align: center;
        max-width: 80%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .image-error {
        color: #c62828;
        font-size: 13px;
        padding: 10px;
        text-align: center;
    }

    /* 引用标记样式 - 隐藏不需要的引用内容 */
    .reference-tag,
    .reference,
    [class*="reference"] {
        display: none !important;
    }

    /* 移动端适配 - 统一移动端和PC端样式 */
    @media (max-width: 768px) {
        .ai-chat-container {
            padding: 6px 12px;
            /* 同桌面：补上底部导航 60px，容器底=输入区上沿 */
            height: calc(100vh - 190px);
        }

        .message {
            margin-bottom: 25px;
            padding: 0 8px;
            width: 100%;
        }

        .message.user {
            /* 黄金分割优化：移动端也保持头像在右侧 */
            flex-direction: row-reverse;
            justify-content: flex-start;
        }

        .message.ai {
            justify-content: flex-start;
        }

        .message-avatar {
            width: 36px;
            height: 36px;
            /* row-reverse 后头像在气泡右侧，间距改到左边 */
            /* 头像中心对齐第一行文字中心：上padding 7.9 + 行框25.5/2 - 半高18 = 2.65 */
            margin: 2.65px 0 0 8px;
        }

        /* 反馈#82：小智头像在左、气泡在右，补右间距与用户头像左侧间距对称 */
        .message.ai .message-avatar {
            margin-right: 8px;
        }

        .message-image {
            margin: 10px 0;
        }

        .message-image img {
            max-height: 250px;
        }

        .message-content {
            max-width: none;
            flex: 1 1 auto;
            width: auto;
            min-width: 0;
            padding: 7.9px 14px;
            font-size: 15px;
            line-height: 1.7;
            border-radius: 9px;
        }

        .message.ai .message-content {
            margin-right: auto;
        }

        .message.user .message-content {
            /* 全宽布局：自然宽度贴右，无上限 */
            margin-left: 0;
        }

        .welcome-section {
            padding: 15px 20px;
        }

        .welcome-avatar {
            width: 70px;
            height: 70px;
        }

        .welcome-title {
            font-size: 18px;
        }

        .quick-questions {
            padding: 15px;
        }

        .quick-question-item {
            padding: 8px 15px;
            font-size: 12px;
        }
    }

    /* 超小屏幕适配 */
    @media (max-width: 375px) {
        .message-content {
            max-width: none;
            flex: 1 1 auto;
            width: auto;
            min-width: 0;
            padding: 10px 12px;
            font-size: 14px;
            border-radius: 9px;
        }

        .message-avatar {
            width: 32px;
            height: 32px;
            /* row-reverse 后头像在气泡右侧，间距改到左边 */
            /* 头像中心对齐第一行文字中心：上padding 7.8 + 行框25.2/2 - 半高16 = 4.4 */
            margin: 4.4px 0 0 6px;
        }

        /* 反馈#82：同上，小屏断点补小智头像右间距 */
        .message.ai .message-avatar {
            margin-right: 6px;
        }

        .message.user .message-content {
            /* 全宽布局：自然宽度贴右，无上限 */
            margin-left: 0;
        }
    }
    
    /* 聊天图片样式 */
    .chat-image {
        max-width: 100%;
        max-height: 300px;
        border-radius: 8px;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        transition: transform 0.3s ease, opacity 0.3s ease;
        display: block;
    }
    
    .chat-image:hover {
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    /* 输入区域 */
    .input-section {
        position: fixed;
        bottom: 60px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 10px 15px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        z-index: 100;
    }

    .input-container {
        max-width: 800px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* 输入框包装器 - 参考火山引擎后台设计 */
    .input-wrapper {
        flex: 1;
        position: relative;
        display: flex;
        flex-direction: column;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 0;
        background: #fff;
        transition: border-color 0.3s, box-shadow 0.3s;
        min-height: 48px;
    }

    .input-wrapper:focus-within {
        border-color: #007aff;
        box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.12);
    }

    /* 输入框顶部区域 - 用于显示已上传图片 */
    .input-top-area {
        display: flex;
        align-items: center;
        padding: 8px 12px 0;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* 已上传图片预览 - 输入框内样式 */
    .uploaded-image-preview-inline {
        display: flex;
        align-items: center;
        gap: 5px;
        position: relative;
    }

    .uploaded-image-thumb-inline {
        width: 60px;
        height: 60px;
        border-radius: 8px;
        object-fit: cover;
        border: 1px solid #e0e0e0;
    }

    .remove-image-btn-inline {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.5);
        border: none;
        color: #fff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        padding: 0;
        position: absolute;
        top: -6px;
        right: -6px;
        transition: all 0.2s;
    }

    .remove-image-btn-inline:hover {
        background: rgba(0, 0, 0, 0.7);
        transform: scale(1.1);
    }

    /* 输入框主体区域 */
    .input-main-area {
        display: flex;
        align-items: center;
        padding: 8px 12px;
        gap: 8px;
    }

    .chat-input {
        flex: 1;
        border: none;
        padding: 0;
        padding-right: 96px; /* 为语音按钮+发送按钮留出空间：36+8+36+8+8=96 */
        font-size: 14px;
        outline: none;
        background: transparent;
        min-height: 24px;
        resize: none;
        line-height: 1.5;
        width: 100%;
        box-sizing: border-box;
    }

    /* 图片上传按钮 - 输入框内样式 */
    .upload-btn-inline {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        background: #fff;
        border: 1px solid #ddd;
        color: #666;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
        flex-shrink: 0;
    }

    .upload-btn-inline:hover {
        background: #f5f5f5;
        border-color: #ccc;
        color: #007aff;
    }

    .upload-btn-inline input[type="file"] {
        display: none;
    }

    /* 清空对话按钮 - 输入框内样式 */
    .clear-chat-btn-inline {
        height: 32px;
        padding: 4px 8px;
        border-radius: 6px;
        background: #fff;
        border: 1px solid #ddd;
        color: #666;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
        font-size: 12px;
        white-space: nowrap;
        line-height: 1.3;
        gap: 3px;
        flex-shrink: 0;
        width: auto;
        min-width: fit-content;
        text-align: center;
        position: relative;
        z-index: 5;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        touch-action: manipulation;
    }

    .clear-chat-btn-inline:hover {
        background: #f5f5f5;
        border-color: #ccc;
        color: #007aff;
    }

    /* 反馈#99：历史对话顶部提示条（查看历史时显示在聊天区上方） */
    .history-banner {
        display: none;
        align-items: center;
        gap: 8px;
        margin: 0 16px 8px;
        padding: 8px 14px;
        background: rgba(0, 122, 255, 0.08);
        border: 1px solid rgba(0, 122, 255, 0.2);
        border-radius: 10px;
        font-size: 13px;
        color: #007aff;
        flex-shrink: 0;
    }

    .history-banner .fa-history {
        font-size: 13px;
    }

    .history-clear-btn {
        margin-left: auto;
        border: none;
        background: rgba(0, 122, 255, 0.12);
        color: #007aff;
        padding: 4px 12px;
        border-radius: 6px;
        font-size: 12px;
        cursor: pointer;
        white-space: nowrap;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }

    .history-clear-btn:active {
        background: rgba(0, 122, 255, 0.22);
    }

    /* 自定义确认弹窗 - 替代confirm()，兼容移动端 */
    .custom-confirm-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: confirmFadeIn 0.2s ease;
    }

    @keyframes confirmFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .custom-confirm-box {
        background: #fff;
        border-radius: 16px;
        padding: 28px 24px 20px;
        width: calc(100% - 60px);
        max-width: 320px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        animation: confirmSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        text-align: center;
    }

    @keyframes confirmSlideIn {
        from { opacity: 0; transform: scale(0.85) translateY(10px); }
        to { opacity: 1; transform: scale(1) translateY(0); }
    }

    .custom-confirm-message {
        font-size: 16px;
        color: #333;
        line-height: 1.6;
        margin-bottom: 24px;
        font-weight: 500;
    }

    .custom-confirm-buttons {
        display: flex;
        gap: 12px;
    }

    .custom-confirm-btn {
        flex: 1;
        padding: 12px 0;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        border: none;
        transition: all 0.2s;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .custom-confirm-cancel {
        background: #f0f0f0;
        color: #666;
    }

    .custom-confirm-cancel:hover {
        background: #e0e0e0;
    }

    .custom-confirm-ok {
        background: #8fc2ff;
        color: #fff;
    }

    .custom-confirm-ok:hover {
        opacity: 0.9;
    }

    /* 输入框底部工具栏 */
    .input-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 4px 12px 8px;
        border-top: 1px solid #f0f0f0;
        margin-top: 4px;
    }

    .toolbar-left {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-wrap: wrap;
        flex: 1;
        min-width: 0;
        overflow: visible;
    }

    .toolbar-right {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        color: #999;
    }

    .char-count {
        font-size: 12px;
        color: #999;
    }

    /* TTS语音播报按钮 */
    .tts-toggle-btn {
        background: none;
        border: none;
        padding: 6px 6px;
        height: 32px;
        cursor: pointer;
        color: #999;
        font-size: 12px;
        border-radius: 4px;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 2px;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: 32px;
        justify-content: center;
    }

    .tts-toggle-btn:hover {
        background: #f0f0f0;
        color: #666;
    }

    .tts-toggle-btn.active {
        color: #007AFF;
        background: #e6f2ff;
    }

    .tts-toggle-btn.active i {
        color: #007AFF;
    }

    /* TTS暂停状态 - 使用橙色区分 */
    .tts-toggle-btn.paused {
        color: #ff9500;
        background: #fff8e6;
    }

    .tts-toggle-btn.paused i {
        color: #ff9500;
    }

    .tts-toggle-btn #ttsSpeedLabel {
        font-size: 11px;
        min-width: 28px;
    }

    /* TTS状态显示 */
    .tts-status {
        font-size: 11px;
        color: #007aff;
        margin-left: 8px;
        padding: 2px 8px;
        background: rgba(0, 122, 255, 0.1);
        border-radius: 10px;
        animation: ttsStatusPulse 1.5s infinite;
        white-space: nowrap;
    }

    @keyframes ttsStatusPulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.6; }
    }

    .tts-status.playing {
        color: #4CAF50;
        background: rgba(76, 175, 80, 0.1);
    }

    .tts-status.error {
        color: #f44336;
        background: rgba(244, 67, 54, 0.1);
        animation: none;
    }

    /* 消息中的用户上传图片 */
    .user-uploaded-image {
        max-width: 200px;
        max-height: 150px;
        border-radius: 8px;
        margin-top: 8px;
        display: block;
    }

    /* 粘贴提示 */
    .paste-hint {
        font-size: 11px;
        color: #bbb;
        margin-left: 4px;
    }

    /* 移动端适配 - 输入框 */
    @media (max-width: 768px) {
        .input-wrapper {
            border-radius: 7px;
            min-height: 44px;
        }

        .input-top-area {
            padding: 6px 10px 0;
        }

        .uploaded-image-thumb-inline {
            width: 50px;
            height: 50px;
        }

        .input-main-area {
            padding: 6px 10px;
        }

        .chat-input {
            font-size: 16px; /* 防止iOS缩放 */
        }

        .input-toolbar {
            padding: 4px 10px 6px;
        }

        .toolbar-left {
            gap: 2px;
            flex: 1;
            min-width: 0;
        }

        .upload-btn-inline {
            width: 32px;
            height: 32px;
        }

        .clear-chat-btn-inline {
            padding: 0 6px;
            font-size: 11px;
            max-width: none;
            height: 32px;
            position: relative;
            z-index: 5;
            -webkit-tap-highlight-color: rgba(0,0,0,0.1);
            touch-action: manipulation;
        }

        .tts-toggle-btn {
            padding: 4px 4px;
            font-size: 11px;
            min-width: 28px;
            height: 32px;
        }

        .tts-toggle-btn #ttsSpeedLabel {
            font-size: 10px;
            min-width: 22px;
        }

        .char-count {
            font-size: 11px;
            display: inline-block;   /* 移动端也显示字数统计 */
        }

        .send-btn, .stop-btn {
            width: 40px;
            height: 40px;
        }

        /* 移动端 - 输入框内按钮调整 */
        .voice-btn-inside {
            right: 48px;           /* 移动端稍微紧凑一点 */
            width: 34px;
            height: 34px;
            font-size: 14px;
        }

        .send-btn-inside {
            right: 6px;
            width: 34px;
            height: 34px;
            font-size: 14px;
        }

        .stop-btn-inside {
            right: 6px;
            width: 34px;
            height: 34px;
            font-size: 14px;
        }

        .chat-input {
            font-size: 16px; /* 防止iOS缩放 */
            padding-right: 92px;   /* 移动端调整：34+8+34+8+8=92 */
        }
    }

    /* 超小屏幕适配 */
    @media (max-width: 375px) {
        .input-wrapper {
            min-height: 40px;
        }

        .uploaded-image-thumb-inline {
            width: 44px;
            height: 44px;
        }

        .chat-input {
            font-size: 15px;
        }

        .upload-btn-inline {
            width: 28px;
            height: 28px;
        }

        .clear-chat-btn-inline {
            height: 28px;
        }

        .tts-toggle-btn {
            height: 28px;
        }
    }

    .send-btn {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
        border: none;
        color: #fff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
        box-shadow: 0 2px 8px rgba(116, 185, 255, 0.35);
    }

    .send-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(116, 185, 255, 0.45);
    }
    
    .send-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }
    
    /* 终止按钮样式 - 蓝色系 */
    .stop-btn {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
        border: none;
        color: #fff;
        cursor: pointer;
        display: none;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
        box-shadow: 0 2px 8px rgba(116, 185, 255, 0.35);
        flex-shrink: 0;
    }

    .stop-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(116, 185, 255, 0.45);
    }
    
    /* 加载动画 */
    .loading {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 12px 16px;
        background: #fff;
        border-radius: 18px;
        border-bottom-left-radius: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .loading-dot {
        width: 8px;
        height: 8px;
        background: #007aff;
        border-radius: 50%;
        animation: bounce 1.4s infinite ease-in-out both;
    }
    
    .loading-dot:nth-child(1) { animation-delay: -0.32s; }
    .loading-dot:nth-child(2) { animation-delay: -0.16s; }
    
    @keyframes bounce {
        0%, 80%, 100% { transform: scale(0); }
        40% { transform: scale(1); }
    }
    
    /* 返回按钮：品牌蓝玻璃拟态（参考玻璃按钮设计，磨砂质感+微动效） */
    /* 横向胶囊造型：扁宽比例（#15/#17）；#20 左缘对齐顶栏 padding 15px；
       #23 改挂 top-bar 内 absolute+top:50%+translateY(-50%)，与标题永远自动垂直居中（不再手调坐标猜行高）；
       #27 高度 28px→24px，与标题文字（16px 字号标准行高）等高 */
    .back-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 15px;
        width: 48px;
        height: 24px;
        background: linear-gradient(160deg, rgba(0,122,255,0.14), rgba(0,122,255,0.05) 50%, rgba(0,198,255,0.10));
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1.5px solid rgba(0,122,255,0.30);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 14px rgba(0,122,255,0.18), inset 0 1px 1px rgba(255,255,255,0.7);
        z-index: 1000;
        text-decoration: none;
        color: #007aff;
        overflow: hidden;
        /* 反馈#28：回弹曲线统一（原 ease 生硬）；hover 不再整体位移（会引发边缘悬浮抖动），改为中心均匀缩放 */
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease, color 0.22s ease;
    }

    /* 顶部玻璃高光 */
    .back-btn::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0) 55%);
        border-radius: inherit;
        pointer-events: none;
    }

    .back-btn:hover {
        /* 反馈#28：原地轻微放大（中心缩放不改变按钮占位，鼠标不会脱出导致悬浮抖动），配合阴影上浮感 */
        transform: translateY(-50%) scale(1.06);
        border-color: rgba(0,122,255,0.55);
        color: #0062d6;
        box-shadow: 0 8px 20px rgba(0,122,255,0.28), inset 0 1px 1px rgba(255,255,255,0.85);
    }

    /* 设计感箭头（反馈#20）：经典 iOS/Apple HIG 圆角线形长箭头（SVG 绘制，笔画均匀、端点圆角） */
    .back-btn svg {
        position: relative;
        display: block;
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* 回弹曲线：悬停时箭头轻点左滑再弹回，呼应"返回" */
    }

    .back-btn:hover svg {
        transform: translateX(-3px);
    }

    .back-btn:active svg {
        transform: translateX(-5px);
    }

    .back-btn:active {
        /* 反馈#28：按下回缩同样保持中心缩放，不叠加位移 */
        transform: translateY(-50%) scale(0.95);
    }

    /* 顶部栏 */
    .top-bar {
        position: relative; /* 反馈#23：作为返回按钮的定位基准，按钮随顶栏自动垂直居中 */
        display: flex;
        align-items: center;
        padding: 10px 15px;
        background: transparent;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: #007AFF;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 10px;
        overflow: hidden;
    }
    
    .avatar img {
        width: 100%;
        border-radius: 50%;
    }
    
    .phone {
        font-size: 16px;
        font-weight: bold;
        color: white;
    }
    
    .menu {
        margin-left: auto;
        display: flex;
        align-items: center;
        color: white;
        /* 一段渐变铺满整个 .menu 盒宽：从"隆信小智"左缘连续过渡到"✦ AI 生成"右缘 */
        background-image: linear-gradient(90deg, #007aff 0%, #00c6ff 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
    
    /* 顶栏标题：文字透明，透出 .menu 父级横跨渐变的左段 */
    #topbar-title {
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 1px;
        -webkit-text-fill-color: transparent;
    }
    
    /* 输入框包装器 */
    .chat-input-wrapper {
        position: relative;
        width: 100%;
    }
    
    /* 输入框内的语音按钮 */
    .voice-btn-inside {
        position: absolute;
        right: 52px;              /* 向左移动，为发送按钮腾出空间 */
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #8fc2ff;
        border: none;
        color: #fff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
        font-size: 16px;
        outline: none;
        -webkit-appearance: none;
        appearance: none;
        box-shadow: 0 2px 8px rgba(143, 194, 255, 0.3);
    }
    
    .voice-btn-inside:focus {
        outline: none;
        box-shadow: 0 2px 12px rgba(143, 194, 255, 0.5);
    }
    
    .voice-btn-inside:hover {
        background: #7ab8ff;
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 4px 16px rgba(143, 194, 255, 0.4);
    }
    
    .voice-btn-inside.recording {
        background: #28a745;
        color: #fff;
    }

    /* 输入框内的发送按钮 */
    .send-btn-inside {
        position: absolute;
        right: 8px;               /* 紧贴右边 */
        top: 50%;
        transform: translateY(-50%);
        width: 36px;               /* 与语音按钮同尺寸 */
        height: 36px;
        border-radius: 50%;
        background: #8fc2ff;
        border: none;
        color: #fff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
        font-size: 16px;
        outline: none;
        -webkit-appearance: none;
        appearance: none;
        box-shadow: 0 2px 8px rgba(143, 194, 255, 0.3);
    }

    .send-btn-inside:focus {
        outline: none;
        box-shadow: 0 2px 12px rgba(143, 194, 255, 0.5);
    }

    .send-btn-inside:hover {
        transform: translateY(-50%) scale(1.08);
        box-shadow: 0 4px 16px rgba(143, 194, 255, 0.4);
    }

    .send-btn-inside:active {
        transform: translateY(-50%) scale(0.95);
    }

    /* 输入框内的终止按钮 - 与发送按钮同位置切换 */
    .stop-btn-inside {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #8fc2ff;
        border: none;
        color: #fff;
        cursor: pointer;
        display: none;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
        font-size: 16px;
        outline: none;
        -webkit-appearance: none;
        appearance: none;
        box-shadow: 0 2px 8px rgba(143, 194, 255, 0.35);
    }

    .stop-btn-inside:hover {
        transform: translateY(-50%) scale(1.08);
        box-shadow: 0 4px 16px rgba(143, 194, 255, 0.45);
    }

    .stop-btn-inside:active {
        transform: translateY(-50%) scale(0.95);
    }

    /* 语音弹窗样式 - 位于输入框下方（更靠近底部），宽度贴合屏幕 */
    .voice-popup {
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 20px);
        max-width: 400px;
        background: rgba(0,0,0,0.95);
        border-radius: 20px;
        padding: 20px 15px;
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        z-index: 10000;
        box-shadow: 0 4px 25px rgba(0,0,0,0.5);
        animation: popupFadeInUp 0.2s ease;
    }
    
    @keyframes popupFadeInUp {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .voice-popup.active {
        display: flex;
    }
    
    /* 音频波形 - 蓝色渐变，更细腻，内发光效果 */
    .voice-waveform {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        height: 50px;
        padding: 5px 0;
    }
    
    .wave-bar {
        width: 3px;
        min-height: 3px;
        background: linear-gradient(to top, #1976D2, #42A5F5);
        border-radius: 1.5px;
        transition: height 0.05s ease;
        height: 3px;
        box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.3);
    }
    
    .wave-bar.active {
        background: linear-gradient(to top, #2196F3, #64B5F6);
        box-shadow: 
            inset 0 0 6px rgba(255, 255, 255, 0.5),
            0 0 10px rgba(33, 150, 243, 0.8),
            0 0 20px rgba(33, 150, 243, 0.4);
    }
    
    /* 左右按钮 - 图片样式：贴合屏幕两侧，弧形下垂 */
    .voice-actions {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        width: 100%;
        padding: 15px 0 0 0;
        gap: 0;
    }
    
    .voice-action-left, .voice-action-right {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        color: rgba(255,255,255,0.6);
        font-size: 14px;
        transition: all 0.3s ease;
        cursor: pointer;
        padding: 15px 0;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.15);
        flex: 1;
        max-width: 45%;
    }
    
    /* 左侧按钮：贴合左侧，左下角弧形下垂 */
    .voice-action-left {
        border-radius: 0 30px 0 50%;
        margin-left: 0;
        transform-origin: bottom left;
        transform: scale(0.95);
        opacity: 0.6;
    }
    
    /* 右侧按钮：贴合右侧，右下角弧形下垂 */
    .voice-action-right {
        border-radius: 30px 0 50% 0;
        margin-right: 0;
        transform-origin: bottom right;
        transform: scale(0.95);
        opacity: 0.6;
    }
    
    .voice-action-left span, .voice-action-right span {
        transform: none;
    }
    
    /* 按钮激活状态 - 滑动时高亮 */
    .voice-action-left.active, .voice-action-right.active {
        color: #fff;
        background: rgba(33, 150, 243, 0.5);
        border-color: rgba(33, 150, 243, 0.8);
        box-shadow: 
            inset 0 0 30px rgba(33, 150, 243, 0.3),
            0 0 30px rgba(33, 150, 243, 0.5),
            0 0 60px rgba(33, 150, 243, 0.3);
        transform: scale(1.05);
        opacity: 1;
    }
    
    .voice-action-left i, .voice-action-right i {
        font-size: 20px;
        transform: none;
        transition: all 0.2s ease;
    }
    
    .voice-action-left.active i, .voice-action-right.active i {
        transform: scale(1.2);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
    
    /* 按钮文字激活状态 */
    .voice-action-left.active span, .voice-action-right.active span {
        font-weight: 600;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    }
    
    /* 提示文字 */
    .voice-hint {
        color: rgba(255,255,255,0.8);
        font-size: 14px;
        font-weight: 500;
        margin-top: 5px;
    }
    
    /* 输入区域 - 语音输入时上移 */
    .input-section {
        transition: bottom 0.3s ease;
    }
    
    .input-section.voice-active {
        transition: all 0.3s ease;
    }
    
    /* 隐藏输入框滚动条 */
    .chat-input {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .chat-input::-webkit-scrollbar {
        display: none;
    }

    /* 机型选择器 - PC端工具栏内嵌模式 */
    .model-selector-inline {
        display: inline-flex;
        align-items: center;
        position: relative;
        margin-left: 16px;         /* 增加左边距，与TTS按钮保持距离 */
        vertical-align: middle;
        z-index: 10;
        flex-shrink: 0;
    }

    .my-model-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 14px;
        height: 32px;
        background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
        color: #fff;
        border: none;
        border-radius: 18px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;  /* 确保显示手型光标 */
        box-shadow:
            0 3px 12px rgba(116, 185, 255, 0.35),
            0 2px 5px rgba(9, 132, 227, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        outline: none;
        position: relative;
        overflow: visible;
        letter-spacing: 0.3px;
        white-space: nowrap;
        pointer-events: auto;  /* 确保可以接收点击事件 */
    }

    .my-model-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;              /* 修复：从0开始，不向左延伸 */
        width: 100%;
        height: 100%;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.35),
            transparent
        );
        transition: left 0.5s;
        pointer-events: none; /* 关键修复：伪元素不接收点击事件 */
        z-index: -1;          /* 确保在按钮内容之下 */
    }

    .my-model-btn:hover::before {
        left: 100%;
    }

    .my-model-btn:hover {
        transform: translateY(-2px) scale(1.02);
        box-shadow:
            0 5px 16px rgba(116, 185, 255, 0.45),
            0 3px 8px rgba(9, 132, 227, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }

    .my-model-btn:active {
        transform: translateY(0) scale(0.98);
        box-shadow:
            0 2px 8px rgba(116, 185, 255, 0.3),
            0 1px 3px rgba(9, 132, 227, 0.2);
    }

    .my-model-btn.active {
        background: linear-gradient(135deg, #0984e3 0%, #74b9ff 100%);
        animation: pulse-glow-blue 2s ease-in-out infinite;
    }

    .my-model-btn.active .btn-arrow {
        transform: rotate(180deg);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .btn-arrow {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 10px;
        opacity: 0.9;
    }

    @keyframes pulse-glow-blue {
        0%, 100% {
            box-shadow:
                0 3px 12px rgba(116, 185, 255, 0.35),
                0 2px 5px rgba(9, 132, 227, 0.25);
        }
        50% {
            box-shadow:
                0 3px 16px rgba(116, 185, 255, 0.5),
                0 2px 8px rgba(9, 132, 227, 0.38);
        }
    }

    /* 下拉选择器样式 - 工具栏内模式（右对齐） */
    .model-dropdown {
        position: absolute;
        bottom: calc(100% + 8px);
        right: 0;
        left: auto;
        min-width: 280px;
        max-width: 360px;
        background: #fff;
        border-radius: 14px;
        box-shadow:
            0 -8px 32px rgba(0, 0, 0, 0.15),
            0 -4px 12px rgba(0, 0, 0, 0.1),
            0 0 0 1px rgba(0, 0, 0, 0.06);
        z-index: 10000;
        max-height: 260px;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;  /* Firefox - 隐藏滚动条 */
        -ms-overflow-style: none;  /* IE 10+ - 隐藏滚动条 */
    }

    /* Chrome/Safari/Edge - 隐藏滚动条 */
    .model-dropdown::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    /* 下拉弹窗动画和模糊效果 */
    .model-dropdown.show {
        animation: dropdown-appear-right 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    @keyframes dropdown-appear-right {
        from {
            opacity: 0;
            transform: translateX(20px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateX(0) scale(1);
        }
    }

    @keyframes dropdown-appear {
        from {
            opacity: 0;
            transform: translateY(15px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .dropdown-header {
        padding: 14px 18px;
        font-size: 13px;
        color: #888;
        font-weight: 600;
        border-bottom: 1px solid #f0f0f0;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        background: linear-gradient(to right, #fafafa, #fff);
        border-radius: 16px 16px 0 0;
    }

    .dropdown-header-link {
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dropdown-header-link:hover {
        color: #0984e3;
        background: linear-gradient(to right, #e3f2fd, #fff);
    }

    .dropdown-header-link:active {
        opacity: 0.7;
    }

    .dropdown-list {
        padding: 8px;
    }

    .dropdown-item {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 12px 16px;
        margin: 4px 0;
        border-radius: 12px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        color: #444;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        border: 2px solid transparent;
        position: relative;
        gap: 8px;
    }

    .dropdown-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(0, 122, 255, 0.08),
            transparent
        );
        transition: left 0.3s;
        pointer-events: none;
        z-index: -1;
    }

    .dropdown-item:hover::before {
        left: 100%;
    }

    .dropdown-item:hover {
        background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
        color: #0984e3;
        border-color: rgba(9, 132, 227, 0.2);
        transform: translateX(4px);
    }

    .dropdown-item.selected {
        background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
        color: #fff;
        border-color: transparent;
        box-shadow: 0 4px 12px rgba(116, 185, 255, 0.35);
        font-weight: 600;
    }

    .dropdown-item.selected:hover {
        background: linear-gradient(135deg, #0984e3 0%, #74b9ff 100%);
        color: #fff;
        transform: translateX(4px);
        box-shadow: 0 6px 16px rgba(116, 185, 255, 0.45);
    }

    .dropdown-item .check-icon {
        display: none;  /* 隐藏√符号，选中项只需蓝色背景条 */
    }

    .dropdown-item:not(.selected) .check-icon {
        display: none;
    }

    /* 机型名称 */
    .dropdown-item .model-name {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* 功率标签 - 在机型下拉项中显示 */
    .model-power-tag {
        display: inline-flex;
        align-items: center;
        padding: 1px 6px;
        border: 1px solid rgba(116, 185, 255, 0.4);
        border-radius: 8px;
        font-size: 10px;
        font-weight: 600;
        color: #fff;
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* 选中项的功率标签样式 - 白色 */
    .dropdown-item.selected .model-power-tag {
        border-color: rgba(255, 255, 255, 0.4);
        color: #fff;
    }

    /* 未选中项的功率标签 - 深色文字 */
    .dropdown-item:not(.selected) .model-power-tag {
        color: #636e72;
        border-color: rgba(99, 110, 114, 0.3);
    }

    /* 类型标签 - 在机型下拉项中显示 */
    .model-type-tag {
        display: inline-flex;
        align-items: center;
        padding: 1px 6px;
        border: 1px solid rgba(116, 185, 255, 0.4);
        border-radius: 8px;
        font-size: 10px;
        font-weight: 600;
        color: #fff;
        flex-shrink: 0;
        white-space: nowrap;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 选中项的类型标签样式 - 白色 */
    .dropdown-item.selected .model-type-tag {
        border-color: rgba(255, 255, 255, 0.4);
        color: #fff;
    }

    /* 未选中项的类型标签 - 深色文字 */
    .dropdown-item:not(.selected) .model-type-tag {
        color: #636e72;
        border-color: rgba(99, 110, 114, 0.3);
    }

    /* 用户层级标签 - 在机型下拉项中显示 */
    .model-level-tag {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        margin-left: auto;
        padding: 2px 8px;
        border: 1px solid rgba(116, 185, 255, 0.4);
        border-radius: 10px;
        font-size: 10px;
        font-weight: 600;
        color: #fff;
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* 选中项的层级标签样式 - 白色 */
    .dropdown-item.selected .model-level-tag {
        border-color: rgba(255, 255, 255, 0.4);
        color: #fff;
    }

    /* 未选中项的层级标签 - 深色文字 */
    .dropdown-item:not(.selected) .model-level-tag {
        color: #636e72;
        border-color: rgba(99, 110, 114, 0.3);
    }

    /* 移动端适配 - 机型选择器（工具栏内模式 - 与PC端一致） */
    @media (max-width: 768px) {
        .model-selector-inline {
            display: inline-flex;
            margin-left: 12px;       /* 移动端也增加间距 */
            vertical-align: middle;
            z-index: 10;
            flex-shrink: 0;
        }

        .my-model-btn {
            padding: 4px 10px;
            font-size: 10px;
            height: 32px;
            border-radius: 14px;
            gap: 4px;
            box-shadow:
                0 2px 6px rgba(116, 185, 255, 0.3),
                0 1px 3px rgba(9, 132, 227, 0.2);
        }

        .my-model-btn i {
            font-size: 9px;
        }

        .model-dropdown {
            right: 0;
            left: auto;
            min-width: 220px;
            max-width: calc(100vw - 20px);
            bottom: calc(100% + 4px);
            border-radius: 12px;
            max-height: 200px;
        }

        .dropdown-header {
            padding: 8px 12px;
            font-size: 9px;
            border-radius: 12px 12px 0 0;
        }

        .dropdown-item {
            padding: 8px 10px;
            font-size: 10px;
            margin: 2px 0;
            border-radius: 8px;
            gap: 5px;
            flex-wrap: nowrap;
            overflow: visible;
        }

        .dropdown-item .model-name {
            flex-shrink: 0;
            font-size: 10px;
        }

        .dropdown-item .check-icon {
            width: 16px;
            height: 16px;
            font-size: 9px;
        }

        /* 移动端功率标签 */
        .model-power-tag {
            padding: 1px 4px;
            font-size: 8px;
        }

        /* 移动端类型标签 */
        .model-type-tag {
            padding: 1px 4px;
            font-size: 8px;
            max-width: 80px;
        }

        /* 移动端用户层级标签 */
        .model-level-tag {
            padding: 1px 5px;
            font-size: 8px;
        }
    }

    /* 超小屏幕适配 */
    @media (max-width: 375px) {
        .my-model-btn {
            padding: 5px 16px;
            font-size: 12px;
            height: 28px;
            border-radius: 18px;
        }

        .model-dropdown {
            max-width: calc(100vw - 20px);
            min-width: 220px;
        }
    }

    /* 反馈#85："以上内容由AI生成"标识行下边缘直接对齐到气泡下边缘
       （transform视觉下移抵消气泡padding-bottom：桌面8.3px / ≤768px 7.9px / ≤375px 10px，不影响正文与标识行的原有间距） */
    .ai-disclaimer-row {
        transform: translateY(8.3px);
    }

    @media (max-width: 768px) {
        .ai-disclaimer-row {
            transform: translateY(7.9px);
        }
    }

    @media (max-width: 375px) {
        .ai-disclaimer-row {
            transform: translateY(10px);
        }
    }

    .message-feedback {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        /* 已并入"以上内容由 AI 生成"标识行，不再额外占行高 */
        margin-top: 0;
        padding-top: 0;
    }

    .feedback-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        /* 尺寸与 12px 文字行框（17px）齐平：按钮不撑高标识行，行高完全由文字决定 */
        width: 17px;
        height: 17px;
        border: none;
        border-radius: 4px;
        background: transparent;
        color: #999;
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 10px;
        padding: 0;
    }

    .feedback-btn:hover {
        background: #f0f0f0;
        color: #666;
    }

    .feedback-btn.liked {
        color: #007aff;
        background: rgba(0, 122, 255, 0.1);
    }

    .feedback-btn.disliked {
        color: #e74c3c;
        background: rgba(231, 76, 60, 0.1);
    }

    .feedback-btn:disabled {
        cursor: default;
        opacity: 0.5;
    }

    .feedback-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: feedbackOverlayIn 0.2s ease;
    }

    @keyframes feedbackOverlayIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .feedback-modal {
        background: #fff;
        border-radius: 16px;
        width: 90%;
        max-width: 420px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        animation: feedbackModalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        overflow: hidden;
    }

    @keyframes feedbackModalIn {
        from { opacity: 0; transform: scale(0.9) translateY(20px); }
        to { opacity: 1; transform: scale(1) translateY(0); }
    }

    .feedback-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #f0f0f0;
    }

    .feedback-modal-title {
        font-size: 16px;
        font-weight: 600;
        color: #333;
    }

    .feedback-modal-close {
        width: 28px;
        height: 28px;
        border: none;
        border-radius: 50%;
        background: #f0f0f0;
        color: #666;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        transition: all 0.2s;
    }

    .feedback-modal-close:hover {
        background: #e0e0e0;
        color: #333;
    }

    .feedback-modal-body {
        padding: 20px;
    }

    .feedback-modal-textarea {
        width: 100%;
        min-height: 120px;
        border: 1px solid #e0e0e0;
        border-radius: 10px;
        padding: 12px;
        font-size: 14px;
        line-height: 1.6;
        resize: vertical;
        outline: none;
        transition: border-color 0.3s, box-shadow 0.3s;
        font-family: inherit;
        box-sizing: border-box;
    }

    .feedback-modal-textarea:focus {
        border-color: #007aff;
        box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
    }

    .feedback-modal-textarea::placeholder {
        color: #bbb;
    }

    .feedback-modal-footer {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        padding: 0 20px 20px;
    }

    .feedback-modal-cancel {
        padding: 8px 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        color: #666;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.2s;
    }

    .feedback-modal-cancel:hover {
        background: #f5f5f5;
        border-color: #ccc;
    }

    .feedback-modal-submit {
        padding: 8px 20px;
        border: none;
        border-radius: 8px;
        background: linear-gradient(135deg, #007aff 0%, #00c6ff 100%);
        color: #fff;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.2s;
    }

    .feedback-modal-submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
    }

    .feedback-modal-submit:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    .feedback-toast {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0, 0, 0, 0.8);
        color: #fff;
        padding: 12px 24px;
        border-radius: 8px;
        font-size: 14px;
        z-index: 100000;
        animation: feedbackToastIn 0.3s ease;
        pointer-events: none;
    }

    @keyframes feedbackToastIn {
        from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
        to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    }

    @media (max-width: 768px) {
        /* .feedback-btn 移动端不再放大（32px 会撑高标识行），统一适应文字高度 */

        .feedback-modal {
            width: 92%;
            max-width: 380px;
        }
    }