/* 自定义CSS */

.main_top_nav_7ree{
    height:61px;
}

.chat-container_7ree {
    height: calc(100vh - 80px);
}

.message_7ree {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp_7ree 0.3s forwards;
}

@keyframes fadeInUp_7ree {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-indicator_7ree {
    display: inline-block;
}

.typing-dot_7ree {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4f46e5;
    margin-right: 4px;
    opacity: 0;
}

.typing-dot_7ree:nth-child(1) {
    animation: typingAnimation_7ree 1.2s infinite;
}

.typing-dot_7ree:nth-child(2) {
    animation: typingAnimation_7ree 1.2s infinite 0.2s;
}

.typing-dot_7ree:nth-child(3) {
    animation: typingAnimation_7ree 1.2s infinite 0.4s;
    margin-right: 0;
}

@keyframes typingAnimation_7ree {
    0%, 60%, 100% {
        opacity: 0.4;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

.sidebar-item_7ree {
    transition: all 0.3s ease;
}




/* 用户消息样式 */
.message-container.user .message-content_7ree {
    background-color: #E0E7FF;
    color: #4338CA;
    border-radius: 0;
    border-top-left-radius: 0.8rem;
    border-bottom-left-radius: 0.8rem;
    border-bottom-right-radius: 0.8rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    white-space: pre-wrap;
    text-align: left;
    display: inline-block;
    max-width: 100%;
    margin-left: auto;
    border: 1px solid #e5e7eb;
}

/* AI消息样式 */
.message-container.ai .message-content_7ree {
    background-color: #ffffff;
    color: #1e1b4b;
    border-radius: 0;
    border-top-right-radius: 0.8rem;
    border-bottom-left-radius: 0.8rem;
    border-bottom-right-radius: 0.8rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: pre-wrap;
    text-align: left;
    display: inline-block;
    max-width: 100%;
    margin-right: auto;
    position: relative;
    border: 1px solid #e5e7eb;
}

.load_trans_7ree{
    position: relative;
    display: inline-block;
}

.load_trans_7ree::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    animation: loadTransGlow_7ree 1.5s ease-out 3 forwards;
}

@keyframes loadTransGlow_7ree {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
        display: block;
    }
    99% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
        display: block;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
        display: none;
    }
}


/* 输入框容器 */
.input-container_7ree {
    height: auto;
    display: flex;
    align-items: center;
}

/* 自定义滚动条 */
textarea::-webkit-scrollbar {
    width: 6px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

textarea::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 发送按钮样式 */
.send-button_7ree {
    position: absolute;
    right: 8px;
    top: CALC(50% - 3px);
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.send-button_7ree i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.send-button_7ree:hover {
    background-color: #4338ca;
    transform: translateY(-50%) scale(1.1);
}

/* 工具提示 */
.tooltip_7ree {
    display: inline-block;
}

.tooltip_7ree .tooltiptext_7ree {
    visibility: hidden;
    width: auto;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    right: -5px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    white-space: nowrap;
}

.tooltip_7ree:hover .tooltiptext_7ree {
    visibility: visible;
    opacity: 1;
}

/* 历史记录删除按钮 */
.history-delete-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-item_7ree:hover .history-delete-btn {
    opacity: 1;
}

/* 消息间距调整 */
.message_7ree {
    margin-bottom: 8px;
}

/* 状态标签 */
.status-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
}

.status-tag.ready {
    background-color: #ecfdf5;
    color: #065f46;
}

.status-tag.connected {
    background-color: #eff6ff;
    color: #1e40af;
}

/* 消息容器 */
.message-container {
    display: flex;
    width: 100%;
}

.message-container.user {
    justify-content: flex-end;
}

.message-container.ai {
    justify-content: flex-start;
}

/* 消息内容容器 */
.message-content-container {
    max-width: 90%;
    display: flex;
    flex-direction: column;
}

.message-content_7ree {
    padding: 0.75rem 1rem;
    border-radius: 1.125rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    white-space: pre-wrap;
    text-align: left;
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
}

.w-8.h-8.rounded-full.bg-indigo-100.text-indigo-600.flex.items-center.justify-center,
.w-8.h-8.rounded-full.bg-gray-200.text-gray-600.flex.items-center.justify-center {
    min-width: 32px;
    flex-shrink: 0;
}

/* 聊天容器背景样式 */
.chat-container_7ree {
    background-color: rgba(245, 248, 255, 0.95);
    background-image: url('bg_tech_pattern_7ree.svg');
    background-size: 400px 400px;
    background-position: center center;
    background-attachment: fixed;
    animation: bgMove_7ree 90s linear infinite;
}

@keyframes bgMove_7ree {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 -400px;
    }
}


.upload_progress_cycle_7ree {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }
  
  .upload_progress_cycle_7ree svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* 使进度从顶部开始 */
  }
  
  .upload_progress_circle_bg_7ree {
    fill: none;
    stroke: #eee;
    stroke-width: 8;
  }
  
  .upload_progress_circle_bar_7ree {
    fill: none;
    stroke: #4F46E5;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.3s ease;
  }
  
  #doc_porgress_7ree .upload_progress_circle_bar_7ree {
    stroke: #22C55E;
  }
  
  .upload_progress_txt_7ree {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: #4F46E5;
    background-color: rgba(255, 255, 255, 0.5);
  }
  
  #doc_porgress_7ree .upload_progress_txt_7ree {
    color: #22C55E;
  }
  

  .upload_progress_circle_bg_7ree {
  fill: none;
  stroke: #eee;
  stroke-width: 8;
}

.upload_progress_circle_bar_7ree {
  fill: none;
  stroke: #4F46E5;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.3s ease;
}

.upload_progress_txt_7ree {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: bold;
  color: #4F46E5;
}

.file_info_grid_7ree{
    display: none;
    align-items: center;
    gap: 12px;
    padding: 5px 12px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.file_info_grid_7ree .grid_icon_7ree{
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: #E0E7FF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4F46E5;
}

.file_info_grid_7ree .grid_info_7ree{
    flex: 1;
    min-width: 0;
}

.file_info_grid_7ree .grid_info_7ree .info_name_7ree{
    font-size: 14px;
    font-weight: 500;
    color: #1e1b4b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.file_info_grid_7ree .grid_info_7ree .info_size_7ree{
    font-size: 12px;
    color: #838da1;
}

.file_info_grid_7ree .grid_icon_del_7ree{
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file_info_grid_7ree .grid_icon_del_7ree:hover {
    background-color: #fee2e2;
    color: #ef4444;
}

.file_info_grid_7ree:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* 图片容器样式 */
.image-container_7ree {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 0.5rem;
}

/* 图片下载按钮样式 */
.image-download-btn_7ree {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.image-download-btn_7ree:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* 桌面端hover显示下载按钮 */
.image-container_7ree:hover .image-download-btn_7ree {
    opacity: 1;
}

/* 移动端点击后显示下载按钮 */
/* 图片错误处理样式 */
.image-error_7ree {
    filter: grayscale(20%);
    opacity: 0.8;
    border: 1px dashed #ccc;
    background-color: #f9f9f9;
}

.image-error_7ree:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* 失效图片容器样式调整 */
.image-container_7ree:has(.image-error_7ree) {
    position: relative;
}

.image-container_7ree:has(.image-error_7ree) .image-download-btn_7ree {
    display: none !important;
}

/* 兼容性版本：为不支持has()的浏览器 */
.image-container_7ree .image-download-btn_7ree[data-hidden-for-error="true"] {
    display: none !important;
}

@media (max-width: 768px) {
    .image-container_7ree .image-download-btn_7ree.opacity-100 {
        opacity: 1;
    }
}


#roleSelectionContainer_7ree {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

#roleSelectionContainer_7ree img {
    object-fit: cover;
}

#roleAvatarLeft_7ree, #roleAvatarRight_7ree {
    border: 2px solid transparent;
}

#roleAvatarLeft_7ree:hover, #roleAvatarRight_7ree:hover {
    border-color: #e5e7eb;
}

#roleAvatarCenter_7ree {
    border: 2px solid #c7d2fe;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AI消息头像下方用户名样式 */
.max-w-16 {
    max-width: 4rem;
}

/* 确保AI头像和用户名垂直居中对齐 */
.message_7ree.ai .flex > .flex.flex-col {
    align-items: center;
    min-width: fit-content;
}

/* AI用户名文本样式优化 */
.message_7ree.ai .flex.flex-col span {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 等待气泡的AI用户名样式 */
#typingIndicator_7ree .flex.flex-col span {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}/* 角
色选择样式 */
#roleSelectionContainer_7ree {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

#roleSelectionContainer_7ree img {
    object-fit: cover;
}

/* 角色选择布局调整 */
#roleAvatarLeft_7ree, #roleAvatarRight_7ree {
    border: 1px solid transparent;
}

#roleAvatarLeft_7ree:hover, #roleAvatarRight_7ree:hover {
    border-color: #e5e7eb;
}

#roleAvatarCenter_7ree {
    border: 2px solid #c7d2fe;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* 手机版用户名截断 */
.max-w-12 {
    max-width: 3rem;
}

/* 角色选择淡入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}