/* 聊天界面专用样式 */

/* 防止页面缩放和左右滑动 */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: pan-y;
    background: #232323;
}

/* 导航栏全宽覆盖 */
.navbar {
    max-width: 1000px !important; /* 限制最大宽度为1000px */
    width: 100%;
    margin: 0 auto; /* 居中显示 */
    padding-left: 20px; /* 左边距 */
    padding-right: 20px; /* 右边距 */
    box-sizing: border-box; /* 确保padding包含在width内 */
}

/* 导航栏布局 - 三栏布局 */
.nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-direction: row !important;
    width: 100%;
    max-width: 100% !important; /* 覆盖styles.css中的max-width */
    gap: 1rem;
    position: relative; /* 为绝对定位的中间区域提供参考 */
    padding: 0; /* 移除padding，由.navbar统一控制边距 */
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 0 0 auto;
    min-width: 80px;
    z-index: 2; /* 确保在中间区域之上 */
}

.nav-center {
    position: absolute; /* 使用绝对定位实现真正居中 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* 允许点击穿透到下层 */
    z-index: 1;
}

/* 已废弃：信息栏已移到对话区顶部 */

.current-ec-name {
    font-size: 1.3rem;
    color: #ffaa00a8;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 700px;
    pointer-events: auto; /* 恢复点击事件 */
}

.nav-title {
    text-align: left;
    flex-shrink: 0;
    margin: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 80px;
    z-index: 2; /* 确保在中间区域之上 */
}

/* 帮助按钮 */
.help-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.help-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 汉堡菜单按钮 */
.sidebar-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.sidebar-toggle-btn:hover .hamburger-icon span {
    background: #ffd700;
}

/* 预测豆显示 */
.beans-display {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #bcbcbc 0%, #6a6a6a 100%);
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.beans-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.beans-display i {
    font-size: 16px;
}

#beans-count {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #fdd055;
}

/* 移动端也强制一行显示 */
@media (max-width: 768px) {
    .navbar {
        max-width: 100% !important;
        width: 100%;
        padding-left: 15px; /* 移动端左边距 */
        padding-right: 15px; /* 移动端右边距 */
    }
    
    .nav-container {
        flex-direction: row !important;
        gap: 1rem !important;
        padding: 0;
        max-width: 100% !important;
        position: relative; /* 确保绝对定位的子元素相对于此定位 */
    }
    
    .nav-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-title {
        font-size: 1.2rem;
    }
}

/* 聊天主布局 */
.chat-main {
    display: flex;
    position: relative;
    justify-content: center;
}

/* 添加背景装饰 */
.chat-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* 移除左侧边栏样式 */

/* EC选择器 */
.ec-selector {
    border-bottom: 1px solid rgba(224, 230, 237, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    max-height: 1000px;
    overflow-y: auto;
}

.ec-selector-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(77, 123, 126, 0.358);
    border-radius: 12px;
}

.ec-selector-header:hover {
    background: rgba(126, 111, 77, 0.358);
}

.ec-selector h3 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#ec-toggle-icon {
    color: #ffffff;
    transition: transform 0.3s ease;
}

.ec-list {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(74, 82, 90, 0.8);
    backdrop-filter: blur(5px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0 20px 20px 20px;
}

.ec-list.expanded {
    max-height: 800px;
    overflow-y: auto;
}

.ec-list.collapsed {
    max-height: 0;
    overflow: hidden;
    border: none;
    margin-bottom: 0;
}

.ec-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.ec-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.ec-item:hover::before {
    left: 100%;
}

.ec-item:last-child {
    border-bottom: none;
}

.ec-item:hover {
    background: linear-gradient(135deg, rgba(204, 207, 209, 0.3) 0%, rgba(163, 165, 167, 0.3) 100%);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.ec-item.active {
    background: rgba(75, 75, 75, 0.95);
    color: white;
    box-shadow: 0 3px 10px rgba(186, 191, 194, 0.4);
}

.ec-item-info {
    flex: 1;
}

.ec-item-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.ec-item-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.ec-item.active .ec-item-meta {
    color: rgba(255, 255, 255, 0.8);
}

/* 移除状态显示相关样式 */

.btn-regenerate {
    background: #ff9800;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.btn-regenerate:hover {
    opacity: 1;
    background: #f57c00;
    transform: scale(1.1);
}

.ec-item.active .btn-regenerate {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.ec-item.active .btn-regenerate:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ec-item-status {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #4caf50;
    color: white;
}

/* EC信息卡片 */
.ec-info-card {
    margin: 20px;
    padding: 20px;
    background: rgba(70, 70, 71, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.ec-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.ec-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e6ed;
}

.ec-info-header h4 {
    margin: 0;
    color: #c7ccd1;
    font-size: 16px;
}

.ec-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: #4caf50;
    color: white;
}

.ec-basic-info {
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.info-item .label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.ec-analysis-summary h5 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 14px;
}

.no-analysis {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: 12px;
}

.session-stats {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
}

/* RAG状态面板样式已删除 */

/* 聊天区域 */
.chat-area {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    background: rgba(54, 54, 54, 0);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    z-index: 5;
    position: relative; /* 确保中央按钮相对于此定位 */
    color: #ffffff;
    margin: 20px auto; /* 居中显示 */
    min-height: 500px; /* 确保有足够高度 */
}

/* 聊天头部 */
.chat-header {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(44, 44, 44, 0.804) 0%, rgba(82, 82, 82, 0.792) 100%);
    justify-content: space-between;
    align-items: center;
    position: relative;
    border-radius: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.304);
}

.chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(228, 228, 228, 0.3), transparent);
}

.chat-title h3 {
    margin: 0 0 5px 0;
    color: #ffffff;
    font-size: 20px;
}

.chat-title p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* 选中用户信息样式 */
.selected-user-info {
    margin-top: 8px;
}

.user-info-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-basic-info {
    flex-shrink: 0;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: #d0d3d5;
}

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

.chat-actions button {
    padding: 6px 6px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(155, 128, 73, 0.148);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.chat-actions button:hover {
    background: rgba(245, 23, 23, 0.2);
    transform: translateY(-1px);
}

/* 清除重建按钮特殊样式 */
#clear-rebuild {
    background: rgba(29, 150, 243, 0.523) !important;
    color: white !important;
    border: 1px solid rgba(125, 29, 243, 0.6) !important;
}

#clear-rebuild:hover {
    background: rgba(29, 150, 243, 0.45) !important;
    transform: translateY(-1px);
    border: 1px solid rgba(100, 29, 243, 0.6) !important;
}

.user-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.detail-item .label {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* 对话数和上次对话时间强制一行 */
.detail-item:nth-child(3),
.detail-item:nth-child(4) {
    white-space: nowrap;
}

.detail-item span:last-child {
    color: #fbb77b;
}

/* 运期信息基础样式 - 浅红色 */
#user-period-info {
    color: #ffb3b3; /* 浅红色 */
}

/* 未选择运期的特殊样式 */
#user-period-info[data-status="unselected"] {
    color: #ff6b6b !important;
}



/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    padding: 5px 10px;
    padding-bottom: 150px; /* 为固定在底部的输入框和ICP留出空间 */
    overflow-y: auto;
    position: relative;
    margin-top: 5px;
    border-radius: 15px;
    min-height: 400px;
}

.welcome-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
}

/* 中央创建对话按钮 - 相对于chat-area定位 */
.create-chat-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* 提高z-index确保在最上层 */
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    width: auto;
    height: auto;
    pointer-events: auto; /* 允许整个区域响应点击 */
}

.create-chat-text {
    font-size: 1.75rem;
    font-weight: 600;
    color: #dddddd; /* 白色文字 */
    position: relative;
    padding: 0;
    background: transparent;
    border: none;
    animation: glowPulseWhite 2s ease-in-out infinite;
    transition: all 0.3s ease;
    pointer-events: auto;
    letter-spacing: 8px;
}

.create-chat-center:hover .create-chat-text {
    color: #d6d6d6;
}

/* 白色光晕脉动动画 */
@keyframes glowPulseWhite {
    0%, 100% {
        text-shadow: 0 0 3px rgba(255, 255, 255, 0.5),
                     0 0 8px rgba(255, 255, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 3px rgba(255, 255, 255, 0.9),
                     0 0 6px rgba(255, 255, 255, 0.6),
                     0 0 9px rgba(255, 255, 255, 0.4);
    }
}

.welcome-content {
    max-width: 400px;
}

.welcome-content i {
    color: #3498db;
    margin-bottom: 20px;
}

.welcome-content h3 {
    color: #ffffff;
    margin-bottom: 10px;
}

.welcome-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    line-height: 1.6;
}

.features {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.feature-item i {
    font-size: 24px;
    color: #3498db;
    margin-bottom: 8px;
}

/* 移除装饰元素样式 */


/* 消息样式 */
.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}



.message.user {
    align-items: flex-end;
}

/* 头像行容器 */
.message-header {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 4px;
}

.message.user .message-header {
    justify-content: flex-end;
}

/* 查询上下文注释（运期/合盘信息） */
.query-context-annotation {
    margin-left: 8px;
    padding: 2px 10px;
    background: rgba(74, 144, 226, 0.15);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 12px;
    font-size: 11px;
    color: rgba(43, 223, 255, 0.9);
    white-space: nowrap;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(28, 28, 28, 0.272);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(173, 126, 22, 0.5);
    background: rgb(41, 41, 41);
}

.message-avatar::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 150%;
    height: 150%;
    opacity: 0;
}

.message:hover .message-avatar::before {
    opacity: 1;
}



.message.user .message-avatar {
    background:  #2b261ee1;
    box-shadow: 0 2px 5px rgba(32, 32, 32, 0.35);
}

.message-content {
    width: 100%;
    margin-top: 8px;
}

.message-bubble {
    padding: 6px 8px;
    border-radius: 12px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;

}

.message.user .message-bubble {
    background: linear-gradient(135deg, #254056a9 0%, #3b336598 100%);
    color: white;
}

.message-meta {
    margin-top: 5px;
    font-size: 11px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.message.user .message-meta {
    justify-content: flex-end;
}

/* RAG指示器样式已删除 */

/* AI正在思考动画 */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 12px;
}

.typing-indicator span:first-child {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: typingDotBounce 1.4s infinite ease-in-out;
}

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

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

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* 三个点跳动动画 */
@keyframes typingDotBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}



/* 聊天输入区域 */
.chat-input-area {
    padding: 15px 20px 20px 20px;
    position: fixed;
    bottom: 32px; /* ICP两行高度约38px + 间距10px */
    left: 0;
    right: 0;
    background: rgba(35, 35, 35, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* ICP备案信息 - 固定在底部 */
.chat-icp {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    text-align: center;
    padding: 3px 0;
    margin: 0;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(35, 35, 35, 0.98);
    z-index: 99;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-icp .icp-line {
    line-height: 1;
    margin: 3px 0;
}

/* 浮动合盘信息显示 */
.hepan-floating-info {
    position: absolute;
    bottom: calc(100% - 100px);
    left: -30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: transparent;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #b3c7d5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 10;
    animation: fadeInUp 0.3s ease;
}

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

.hepan-floating-info .hepan-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.btn-clear-hepan {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgb(100, 118, 125);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.btn-clear-hepan:hover {
    background: rgb(100, 118, 125);
    transform: scale(1.1);
}

.btn-clear-hepan span {
    line-height: 1;
}

#chat-input {
    flex: 1;
    height: 42px;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    background: rgba(50, 50, 52, 0.8);
    color: #ffffff;
}

#chat-input:focus {
    border-color: #3498db;
    background: rgba(50, 50, 52, 1);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

#chat-input:disabled {
    background: rgba(50, 50, 52, 0.3);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.08);
}

#chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#chat-input:disabled::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.send-button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #09334f 0%, #743f9ab4 100%);
    box-shadow: 0 2px 8px rgba(27, 27, 27, 0.8);
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    padding: 0;
}

/* 创建对话模式 - 浅蓝色带向上箭头 */
.send-button.create-mode {
    background: linear-gradient(135deg, black 0%, rgb(189, 189, 189) 100%);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.5);
}

.send-button.create-mode:hover:not(:disabled) {
    background: linear-gradient(135deg, black 0%, rgb(185, 185, 185) 100%);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.7);
}

.send-button.create-mode i {
    font-size: 18px;
}

/* 发送消息模式 - 渐变色 */
.send-button.send-mode {
    background: linear-gradient(135deg, #09334f 0%, #743f9ab4 100%);
}

.send-button.send-mode:hover:not(:disabled) {
    background: linear-gradient(135deg, #09334f 0%, #743f9ab4 100%);
}

.send-button:active:not(:disabled) {
    transform: scale(0.95);
}

.send-button:disabled {
    background: rgba(100, 100, 100, 0.5);
    cursor: not-allowed;
    transform: none;
}

.send-button i {
    font-size: 16px;
    line-height: 1;
}

/* 预测豆计数显示 */
.beans-count {
    font-size: 10px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #5dade2;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    margin: 0;
    padding: 0;
}

.input-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 导航栏增强 */
.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 返回按钮美化 */
#back-to-dashboard {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
}

#back-to-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#back-to-dashboard:hover::before {
    left: 100%;
}

#back-to-dashboard:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* 命例选择按钮区域 */
.ec-selector-buttons {
    padding: 5px 10px;
    background: rgba(67, 67, 67, 0);
    align-items: center;
    gap: 10px;
}

.ec-groups-scroll + .ec-buttons-scroll {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* 分组容器样式 */
.ec-groups-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(76, 175, 80, 0.3) transparent;
}

.ec-groups-scroll::-webkit-scrollbar {
    height: 6px;
}

.ec-groups-scroll::-webkit-scrollbar-track {
    background: rgba(76, 175, 80, 0.1);
    border-radius: 3px;
}

.ec-groups-scroll::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.3);
    border-radius: 3px;
}

.ec-groups-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 175, 80, 0.5);
}

.ec-groups-container {
    display: flex;
    gap: 8px;
    padding: 5px 5px;
    min-width: max-content;
}

.ec-group-button {
    padding: 6px 12px;
    background: rgba(76, 175, 80, 0);
    color: #ffffff;
    border: 1px solid rgba(76, 175, 80, 0.5);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ec-group-button:hover {
    background: rgba(76, 167, 175, 0.5);
    border-color: rgba(76, 153, 175, 0.7);
    transform: translateY(-1px);
}

.ec-group-button.active {
    background: rgba(76, 175, 80, 0.5);
    border-color: rgba(76, 175, 80, 0.7);
}

.ec-group-button .group-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.ec-buttons-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.ec-buttons-scroll::-webkit-scrollbar {
    height: 6px;
}

.ec-buttons-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.ec-buttons-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.ec-buttons-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ec-buttons-container {
    display: flex;
    gap: 10px;
    padding: 5px 5px;
    min-width: max-content;
}

.ec-button {
    padding: 4px 5px;
    background: rgba(98, 98, 99, 0.8);
    color: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.ec-button:hover {
    background: rgba(62, 82, 145, 0.781);
}

.ec-button.active {
    background: rgba(62, 82, 145, 0.781);
}

.ec-button.active:hover {
    background: rgba(62, 82, 145, 0.781);
}

/* 移动端优化 */
@media (max-width: 430px) {
    .chat-main {
        height: 100vh;
        margin: 0;
        padding: 0;
    }

    .chat-area {
        margin: 10px;
        border-radius: 15px;
        max-width: none;
        width: calc(100% - 20px);
    }
    
    /* 超小屏幕中央创建对话按钮样式调整 */
    .create-chat-text {
        font-size: 0.84rem; /* 1.2 * 0.7 = 0.84 */
        letter-spacing: 3px;
    }

    .chat-header {
        padding: 8px 15px;
    }

    .chat-title h3 {
        font-size: 16px;
    }

    .chat-title p {
        font-size: 12px;
    }

    .user-name {
        font-size: 15px;
    }

    .user-details {
        gap: 10px;
    }

    .detail-item {
        font-size: 0.7rem;
    }

    .chat-actions button {
        font-size: 13px;
        padding: 4px 4px;
    }

    .chat-messages {
        padding: 10px;
        font-size: 13px;
    }

    .message-content {
        font-size: 13px;
        line-height: 1.5;
    }
    
    /* 移动端typing indicator */
    .typing-indicator {
        padding: 12px 15px;
        margin: 8px 0;
    }
    
    .typing-indicator span:first-child {
        font-size: 0.85rem;
    }
    
    .typing-dots span {
        width: 7px;
        height: 7px;
    }

    .ec-selector-buttons {
        padding: 5px 5px;
    }

    .ec-button {
        font-size: 13px;
        padding: 6px 12px;
    }

    .chat-input-area {
        padding: 12px 15px 20px 15px;
    }

    #chat-input {
        font-size: 1rem; /* 1rem = 16px，防止iOS自动缩放的最小值 */
        padding: 6px 12px;
    }

    .welcome-content h3 {
        font-size: 15px;
    }

    .welcome-content p {
        font-size: 13px;
    }

    .feature-item {
        padding: 10px;
    }

    .feature-item span {
        font-size: 12px;
    }

    /* 移动端优化完成 */
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .chat-sidebar {
        width: 300px;
    }
    
    .chat-messages {
        padding: 5px 10px;
        padding-bottom: 150px; /* 为固定在底部的输入框和ICP留出空间 */
    }
    
    .chat-input-area {
        padding: 10px 15px 20px 15px;
    }
}

@media (max-width: 768px) {
    .chat-main {
        height: 90vh;
    }
    
    .chat-sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #e0e6ed;
    }
    
    .ec-info-card {
        display: none !important;
    }
    
    /* RAG状态面板样式已删除 */
    
    .chat-header {
        padding: 8px 10px;
    }
    
    .welcome-content {
        padding: 10px;
    }
    
    .features {
        flex-direction: column;
        gap: 5px;
    }
    
    .feature-item {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .message-content {
        max-width: 100%;
        width: 100%;
    }
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar,
.ec-list::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.ec-list::-webkit-scrollbar-track {
    background: #ffffff00;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb,
.ec-list::-webkit-scrollbar-thumb {
    background: #c1c1c127;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.ec-list::-webkit-scrollbar-thumb:hover {
    background: #9fc9f47d;
}

/* AI报告更新指示器样式 */
.ai-report-update-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    margin: 1rem 0;
    background: linear-gradient(135deg, #dadadb7b 0%, #90909188 100%);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: fadeIn 0.5s ease-in-out;
}

.ai-report-update-indicator .update-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

.ai-report-update-indicator .fa-sync-alt {
    font-size: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 输入框禁用状态样式 */
.chat-input-area textarea:disabled {
    background-color: #252525;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.chat-input-area .send-button:disabled {
    background: #252525;
    border: 1px solid rgba(255, 182, 137, 0.5);
    cursor: not-allowed;
    opacity: 0.6;
}

.chat-input-area .send-button:disabled:hover {
    background-color: #252525;
    transform: none;
}

/* 运期选择弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

.modal-content {
    border-radius: 15px;
    max-width: 600px;
    width: 95%;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 25px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #bdc3c7;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.modal-body {
    padding: 25px;
}

.period-description {
    background: rgba(46, 46, 46, 0.6);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(182, 195, 203, 0.3);
    color: #ecf0f1;
    text-align: center;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.period-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.period-option {
    background: rgba(40, 48, 48, 0.701);
    border: 1px solid rgba(182, 195, 203, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
}

.period-option:hover {
    border-color: rgba(186, 200, 209, 0.1);
    transform: translateY(-1px);
}

.period-option.lifetime {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.3);
}

.period-option.lifetime:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.5);
}

.period-option.selected {
    border-color: rgba(46, 196, 204, 0.3);
}

.period-option.lifetime.selected {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.7);
}

@media (max-width: 768px) {
    .modal-content {
        width: calc(100% - 20px);
    }
    
    .modal-header, .modal-body {
        padding: 20px 20px;
    }
    
    .period-option {
        padding: 10px 10px;
        font-size: 13px;
    }
}

/* 合盘对象选择样式 */
.hepan-description {
    margin-bottom: 5px;
    padding: 5px;
    color: rgba(190, 163, 139, 0.9);
    font-size: 12px;
}


.hepan-relation-types {
    margin-bottom: 15px;
}

.hepan-relation-types h4 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
}

.relation-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(46, 196, 204, 0.4);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: rgba(46, 196, 204, 0.8);
    cursor: pointer;
}

.checkbox-item span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.checkbox-item input[type="checkbox"]:checked + span {
    color: rgba(46, 196, 204, 0.9);
    font-weight: 500;
}

.hepan-ec-selection {
    margin-bottom: 5px;
}

.hepan-ec-selection h4 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
    font-size: 16px;
    font-weight: 600;
}

.hepan-ec-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
}

.hepan-ec-option {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.hepan-ec-name {
    flex: 0 0 auto;
    text-align: left;
    font-weight: 500;
}

.hepan-ec-status {
    flex: 0 0 auto;
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.hepan-ec-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(46, 196, 204, 0.4);
    transform: translateY(-2px);
}

.hepan-ec-option.selected {
    background: rgba(46, 196, 204, 0.2);
    border-color: rgba(46, 196, 204, 0.6);
    color: rgba(46, 196, 204, 0.9);
    font-weight: 500;
}

.hepan-ec-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.selected-hepan-objects {
    margin-bottom: 25px;
}

.selected-hepan-objects h4 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.selected-objects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-object-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 15px;
    background: rgba(46, 196, 204, 0.15);
    border: 1px solid rgba(46, 196, 204, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.selected-object-name {
    font-weight: 500;
    color: rgba(46, 196, 204, 0.9);
}

.remove-object-btn {
    background: rgba(255, 89, 94, 0.8);
    border: none;
    border-radius: 4px;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.remove-object-btn:hover {
    background: rgba(255, 89, 94, 1);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;

    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 80%;
    align-self: center;
    justify-self: center;
    text-align: center;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hepan-ec-options {
        grid-template-columns: 1fr;
        max-height: 150px;
    }
    
    .hepan-ec-option {
        padding: 6px 8px;
        gap: 8px;
    }
    
    .hepan-ec-name {
        font-size: 0.9em;
    }
    
    .hepan-ec-status {
        font-size: 0.7em;
    }
    
    .modal-actions {
        opacity: 1;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* ========== 登录/注册界面样式 ========== */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #101010 0%, #3d3d3d 50%, #1a1a1a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 99999;
    overflow-y: auto;
    padding: 60px 20px 40px;
    box-sizing: border-box;
}

/* 欢迎文字 */
.auth-welcome {
    text-align: center;
    margin-bottom: auto;
    margin-top: 10vh;
    animation: fadeInDown 0.8s ease-out;
}

.welcome-title {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 15px 0;
    letter-spacing: 8px;
    text-shadow: 0 2px 20px rgba(255, 255, 255, 0.3);
}

.welcome-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    letter-spacing: 4px;
}

/* 表单容器 */
.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
    animation: fadeInUp 0.8s ease-out;
}

/* 表单模态框样式 */
.auth-modal {
    border: 1px solid rgba(255, 255, 255, 0);
}

/* 备案号 */
.auth-icp {
    text-align: center;
    margin-top: 30px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
}

/* 动画 */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .welcome-title {
        font-size: 2.5rem;
        letter-spacing: 6px;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
        letter-spacing: 3px;
    }
    
    .auth-welcome {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .auth-overlay {
        padding: 15px;
    }
    
    .welcome-title {
        font-size: 2rem;
        letter-spacing: 4px;
    }
    
    .welcome-subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    .auth-welcome {
        margin-bottom: 20px;
    }
}

/* ========== 侧边栏样式 ========== */
.ec-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
    transition: all 0.3s ease;
}

.ec-sidebar.active {
    pointer-events: auto;
}

.ec-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.ec-sidebar.active .ec-sidebar-overlay {
    opacity: 1;
}

.ec-sidebar-content {
    position: absolute;
    top: 0;
    left: -250px;
    min-width: 200px;
    max-width: 250px;
    height: 100%;
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.ec-sidebar.active .ec-sidebar-content {
    left: 0;
}

/* 侧边栏头部 */
.ec-sidebar-header {
    padding: 15px 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
}

/* 用户信息区域 */
/* 侧边栏用户信息区域 - 头像和用户名水平排列 */
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    margin-right: 10px;
}

/* 移除旧的 wrapper 样式（HTML中已删除） */

/* 用户头像 */
.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.user-avatar span {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
}

/* 用户名 - 在头像右侧显示 */
.user-name {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 底部退出当前账号按钮 */
.btn-logout-bottom {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: rgba(244, 67, 54, 0.15);
    border: 1.5px solid rgba(244, 67, 54, 0.4);
    border-radius: 8px;
    color: #ff7961;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-bottom: 30px;
}

.btn-logout-bottom:hover {
    background: rgba(244, 67, 54, 0.25);
    border-color: rgba(244, 67, 54, 0.6);
    color: #ff5252;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
    transform: translateY(-1px);
}

.sidebar-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
    margin-top: 15px;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #eee1e1;
}

/* 新增命例按钮 */
.ec-sidebar-actions {
    padding: 5px;
}

.btn-add-ec {
    width: 100%;
    padding: 5px 10px;
    background:  #1a1818;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.btn-add-ec:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(11, 12, 13, 0.4);
}

.btn-add-ec .add-icon {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

/* 娱乐命例金黄色按钮 */
.btn-entertainment-gold {
    background: rgba(218, 165, 32, 0.15) !important;
    border-color: rgba(218, 165, 32, 0.3) !important;
}

.btn-entertainment-gold:hover {
    background: rgba(218, 165, 32, 0.25) !important;
    border-color: rgba(218, 165, 32, 0.5) !important;
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.3) !important;
}

/* EC列表区域 */
.ec-list-section {
    flex: 1;
    overflow-y: auto;
    padding: 5px 5px;
}

.ec-list-container-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ec-item-sidebar {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    overflow: hidden;
}

/* 娱乐命例专用样式 - 金黄色 */
.ec-item-sidebar.entertainment {
    background: rgba(218, 165, 32, 0.1);  /* 金黄色背景，保持原透明度 */
    border: 1px solid rgba(218, 165, 32, 0.3);
}

.ec-item-sidebar.entertainment:hover {
    background: rgba(218, 165, 32, 0.15);
    border-color: rgba(218, 165, 32, 0.5);
}

.ec-item-sidebar.entertainment.active {
    background: rgba(218, 165, 32, 0.2);
    border-color: rgba(218, 165, 32, 0.6);
}

.ec-item-sidebar:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(66, 133, 244, 0.5);
}

.ec-item-sidebar.active {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.3) 0%, rgba(52, 168, 83, 0.3) 100%);
    border-color: rgba(66, 133, 244, 0.6);
}

.ec-item-content {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.ec-item-name {
    font-size: 0.8rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.ec-item-meta {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 10px;
}

.ec-item-sidebar.active .ec-item-meta {
    color: rgba(255, 255, 255, 0.8);
}

/* 侧边栏底部按钮 */
.ec-sidebar-footer {
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.btn-hepan-sidebar {
    width: 100%;
    padding: 12px 16px;
    background: #383838;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-hepan-sidebar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 10, 10, 0.4);
}

.btn-hepan-sidebar i {
    font-size: 1rem;
}

.btn-back-professional {
    width: 100%;
    padding: 12px 16px;
    background: #383838;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back-professional:hover {
    transform: translateX(2px);
}

.ec-item-delete {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    background: #ff4444;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ec-item-delete:hover {
    background: #c22e2e;
    transform: scale(1.1);
}

.ec-item-delete:active {
    transform: scale(0.95);
}

/* 滚动条样式 */
.ec-list-section::-webkit-scrollbar {
    width: 6px;
}

.ec-list-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.ec-list-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.ec-list-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========== 大的圆形创建对话按钮 ========== */
.build-cognitive-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.btn-build-cognitive-large {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0);
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    margin-top: 100px;
}

.btn-build-cognitive-large:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(66, 133, 244, 0.6);
}

.btn-build-cognitive-large .plus-icon {
    font-size: 3rem;
    color: #ffffff;
    font-weight: 200;
    line-height: 1;
}

.btn-build-cognitive-large .button-text {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 600;
}

/* ========== 用户信息栏（贴在对话区顶部） ========== */
.user-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 3px;
    background: rgba(28, 28, 30, 0);
    font-size: 0.85rem;
    color: rgba(230, 230, 230, 0.8);
    gap: 15px;
    white-space: nowrap;
    overflow: hidden;
    height: 40px;
    min-height: 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: nowrap;
}

.user-info-bar .info-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.user-info-bar .info-label {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.user-info-bar .info-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .ec-sidebar-content {
        max-width: 200px;
        left: -85%;
    }
    
    /* 移动端用户信息适配 */
    .user-avatar {
        width: 45px;
        height: 45px;
    }
    
    .user-avatar span {
        font-size: 1.2rem;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .btn-logout-bottom {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .user-info-bar {
        font-size: 0.75rem;
        padding: 3px 3px;
        gap: 10px;
        height: 36px;
        min-height: 36px;
        white-space: nowrap;
        overflow: hidden;
        flex-wrap: nowrap;
    }
    
    .nav-left {
        min-width: 60px;
    }
    
    .nav-actions {
        min-width: 60px;
    }
    
    /* 移动端帮助按钮 */
    .help-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
    
    .nav-center {
        /* 保持绝对定位居中，不使用flex */
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .current-ec-name {
        font-size: 1rem;
    }
    
    /* 移动端中央创建对话按钮样式调整 */
    .create-chat-text {
        font-size: 1.26rem; /* 1.8 * 0.7 = 1.26 */
        letter-spacing: 6px;
    }
    
    .chat-input-area {
        padding: 12px 15px 20px 15px;
    }
    
    .chat-icp {
        font-size: 0.65rem;
    }
    
    #chat-input {
        font-size: 16px;
        padding: 0 16px;
        border-radius: 23px;
    }
    
    .send-button {
        width: 46px;
        height: 46px;
    }
    
    .send-button i {
        font-size: 14px;
    }
    
    .beans-count {
        font-size: 9px;
    }
    
    .hepan-floating-info {
        font-size: 0.8rem;
        padding: 8px 12px;
        right: 15px;
    }
    
    .btn-clear-hepan {
        width: 20px;
        height: 20px;
        font-size: 16px;
    }

    .nav-left {
        gap: 10px;
    }

    .nav-title {
        font-size: 1.2rem;
    }

    .nav-actions {
        gap: 5px;
    }

    .nav-actions .btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .ec-sidebar-content {
        left: -90%;
    }
    
    /* 小屏幕用户信息适配 */
    .ec-sidebar-header {
        padding: 12px 8px;
    }

    .sidebar-close-btn {
        margin-top: 7px;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .user-avatar span {
        font-size: 1.1rem;
    }
    
    .user-name {
        font-size: 0.8rem;
    }
    
    .btn-logout-bottom {
        padding: 10px;
        font-size: 0.7rem;
    }
    
    .sidebar-user-info {
        gap: 10px;
        margin-right: 5px;
    }

    .nav-left {
        min-width: 50px;
        gap: 8px;
    }
    
    .nav-actions {
        min-width: 50px;
    }
    
    /* 小屏幕帮助按钮 */
    .help-btn {
        width: 26px;
        height: 26px;
        font-size: 0.9rem;
    }
    
    .current-ec-name {
        font-size: 1.1rem;
    }
    
    /* 小屏幕中央创建对话按钮样式调整 */
    .create-chat-text {
        font-size: 1.05rem; /* 1.5 * 0.7 = 1.05 */
        letter-spacing: 4px;
    }
    
    .user-info-bar {
        font-size: 0.7rem;
        padding: 3px 3px;
        gap: 8px;
        height: 32px;
        min-height: 32px;
        white-space: nowrap;
        overflow: hidden;
        flex-wrap: nowrap;
    }
    
    .user-info-bar .info-separator {
        font-size: 0.65rem;
    }
    
    .user-info-bar .info-label {
        display: none; /* 在小屏幕上隐藏标签，节省空间 */
    }
    
    .chat-input-area {
        padding: 10px 12px 20px 12px;
    }
    
    .chat-icp {
        font-size: 0.6rem;
    }
    
    #chat-input {
        font-size: 16px;
        padding: 10px 14px;
        border-radius: 21px;
    }
    
    .send-button {
        width: 42px;
        height: 42px;
    }
    
    .send-button i {
        font-size: 13px;
    }
    
    .beans-count {
        font-size: 8px;
    }
    
    .hepan-floating-info {
        font-size: 0.75rem;
        padding: 5px 50px;
        right: 30px;

    }
    
    .btn-clear-hepan {
        width: 18px;
        height: 18px;
        font-size: 14px;
    }
    
    .ec-sidebar-footer {
        padding: 8px 8px;
    }
    
    .btn-hepan-sidebar,
    .btn-back-professional {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .nav-actions .btn {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .hamburger-icon {
        width: 20px;
    }

    .hamburger-icon span {
        height: 2px;
    }
}

/* 新增命例弹窗样式 */
#add-ec-modal .modal-content {
    background: rgba(31, 31, 31, 0.95);
    backdrop-filter: blur(20px);
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* 统一输入框宽度 */
#add-ec-modal .form-field input[type="text"],
#add-ec-modal .form-field input[type="datetime-local"] {
    max-width: 400px;
    box-sizing: border-box;
}

#add-ec-modal .modal-header {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(33, 150, 243, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 16px 16px 0 0;
}

#add-ec-modal .modal-header h3 {
    color: #ffe8be;
    font-size: 1.2rem;
    margin: 0;
}

#add-ec-modal .modal-close {
    color: #b8ffe0;
    font-size: 2rem;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#add-ec-modal .modal-close:hover {
    transform: scale(1.1);
}

#add-ec-modal .form-field input,
#add-ec-modal .form-field select {
    transition: border-color 0.3s, box-shadow 0.3s;
}

#add-ec-modal .form-field input:focus,
#add-ec-modal .form-field select:focus {
    border-color: #2d2e2e;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    outline: none;
}

#add-ec-modal .gender-option.active,
#add-ec-modal .calendar-option.active {
    background:  #075769b9;
    border-color: #2d2e2e !important;
    color: #fff !important;
}

#add-ec-modal .modal-actions .btn {
    cursor: pointer;
    transition: all 0.3s;
    border: 1.5px solid #4c4e4e;
}

#add-ec-modal .modal-actions .btn-primary {
    background:  #273428b9;
    color: white;
}

#add-ec-modal .modal-actions .btn-primary:hover {
    background:  #273428b9;
}

#add-ec-modal .modal-actions .btn-secondary {
    background: rgba(179, 179, 179, 0.13);
    color: #eaf7e1;
}

#add-ec-modal .modal-actions .btn-secondary:hover {
    background: rgba(179, 179, 179, 0.25);
}

#add-ec-modal .modal-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 下拉选项背景颜色 */
#add-ec-modal select option,
#add-ec-modal select optgroup {
    background: rgba(45, 45, 45, 0.95);
    color: #F5F6FA;
}

#add-ec-modal select option:hover {
    background: rgba(76, 175, 80, 0.2);
}

/* 移动端适配 */
@media (max-width: 768px) {
    #add-ec-modal .modal-content {
        max-width: 85vw;
    }
    
    #add-ec-modal .modal-body {
        max-height: 70vh;
        overflow-y: auto;
    }
    
    /* 移动端输入框宽度调整 */
    #add-ec-modal .form-field input[type="text"],
    #add-ec-modal .form-field input[type="datetime-local"] {
        max-width: 100%;
    }
}

/* ========== 帮助弹窗样式 ========== */
.help-modal-content {
    background: rgba(31, 31, 31, 0.98);
    backdrop-filter: blur(20px);
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.help-modal-body {
    padding: 16px 20px; /* 缩小20%: 20→16, 25→20 */
}

.help-section {
    margin-bottom: 20px; /* 缩小20%: 25→20 */
}

.help-section h4 {
    color: #ffd700;
    font-size: 0.8rem; /* 缩小20%: 1rem→0.8rem */
    margin-bottom: 10px; /* 缩小20%: 12→10 */
    font-weight: 600;
}

.help-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-section li {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.72rem; /* 缩小20%: 0.9rem→0.72rem */
    line-height: 1.5;
    margin-bottom: 8px; /* 缩小20%: 10→8 */
    padding-left: 16px; /* 缩小20%: 20→16 */
    position: relative;
}

.help-section li::before {
    content: '•';
    position: absolute;
    left: 4px; /* 缩小20%: 5→4 */
    color: rgba(255, 255, 255, 0.5);
}

.help-section li strong {
    color: #ffffff;
    font-weight: 600;
}

.help-examples {
    display: flex;
    flex-direction: column;
    gap: 10px; /* 缩小20%: 12→10 */
    margin-top: 8px; /* 缩小20%: 10→8 */
}

.example-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 12px; /* 缩小20%: 12→10, 15→12 */
    border-radius: 6px; /* 缩小20%: 8→6 */
    border-left: 2px solid rgba(255, 215, 0, 0.5); /* 缩小20%: 3→2 */
}

.example-label {
    display: inline-block;
    color: #ffd700;
    font-weight: 600;
    font-size: 0.68rem; /* 缩小20%: 0.85rem→0.68rem */
    margin-bottom: 4px; /* 缩小20%: 5→4 */
}

.example-text {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.72rem; /* 缩小20%: 0.9rem→0.72rem */
    line-height: 1.4;
    margin-top: 4px; /* 缩小20%: 5→4 */
}

.help-tip {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px; /* 缩小20%: 8→6 */
    padding: 12px; /* 缩小20%: 15→12 */
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.72rem; /* 缩小20%: 0.9rem→0.72rem */
    line-height: 1.5;
    margin-top: 16px; /* 缩小20%: 20→16 */
}

.help-tip strong {
    color: #ffd700;
}

/* 移动端帮助弹窗适配 */
@media (max-width: 768px) {
    .help-modal-content {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .help-modal-body {
        padding: 12px 16px; /* 缩小20%: 15→12, 20→16 */
    }
    
    .help-section h4 {
        font-size: 0.76rem; /* 缩小20%: 0.95rem→0.76rem */
    }
    
    .help-section li {
        font-size: 0.68rem; /* 缩小20%: 0.85rem→0.68rem */
    }
    
    .example-text {
        font-size: 0.68rem; /* 缩小20%: 0.85rem→0.68rem */
    }
    
    .help-tip {
        font-size: 0.68rem; /* 缩小20%: 0.85rem→0.68rem */
        padding: 10px; /* 缩小20%: 12→10 */
    }
}

/* 小屏幕适配 */
@media (max-width: 480px) {
    #add-ec-modal .form-field input[type="text"],
    #add-ec-modal .form-field input[type="datetime-local"] {
        max-width: 100%;
        font-size: 0.85rem;
    }
}