* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* 侧边栏样式 */
.sidebar {
    width: 260px;
    height: 100%;
    background-color: #fff;
    border-right: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow-y: auto;
    position: relative;
    z-index: 10;
}

/* Logo 部分 */
.logo-container {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    margin-bottom: 6px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.logo-text {
    font-size: 22px;
    font-weight: bold;
    color: #1a73e8;
}

/* 新建对话按钮 */
.new-chat-btn {
    margin: 6px 15px;
    padding: 8px 16px;
    background-color: #f0f7ff;
    color: #1a73e8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.new-chat-btn:hover {
    background-color: #e4f0fe;
}

.icon-plus {
    margin-right: 6px;
    font-size: 16px;
    font-weight: bold;
}

/* 历史对话部分 */
.history-container {
    flex: 1;
    padding: 10px;
}

.history-title {
    font-size: 15px;
    font-weight: normal;
    color: #666;
    margin-bottom: 10px;
    padding-left: 5px;
}

.chat-history-list {
    display: flex;
    flex-direction: column;
}

.chat-history-item {
    padding: 7px 12px;
    margin-bottom: 3px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 13px;
}

.chat-history-item:hover {
    background-color: #f5f5f5;
}

.chat-history-item.active {
    background-color: #e4f0fe;
    color: #1a73e8;
}

.chat-history-item.active .chat-icon {
    color: #1a73e8;
}

.chat-icon {
    margin-right: 8px;
    color: #666;
    font-size: 16px;
}

.see-all-btn {
    padding: 7px 12px;
    margin-top: 3px;
    display: flex;
    align-items: center;
    color: #666;
    cursor: pointer;
    font-size: 13px;
}

.dots-icon {
    margin-right: 8px;
    font-size: 16px;
}

/* 模式切换按钮 */
.mode-switcher {
    padding: 10px;
    margin: 8px 15px 12px;
    background-color: #f5f5f5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-top: auto;
}

.mode-icon {
    width: 30px;
    height: 30px;
    background-color: #1a73e8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 12px;
    font-size: 14px;
}

.mode-text {
    font-size: 13px;
}

.current-mode {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    background-color: #f9f9f9;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

/* 聊天容器 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 消息显示区域 */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: white;
    position: relative;
}

/* 消息样式 */
.message {
    display: flex;
    flex-direction: column;
    max-width: calc(50% - 20px);
    margin-bottom: 12px;
}

.user-message {
    align-self: flex-end;
}

.ai-message {
    align-self: flex-start;
}

/* 发送者样式 */
.message-sender-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    min-height: 24px;
}

.user-message .message-sender-wrapper {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.message-sender {
    font-size: 12px;
    color: #999;
}

/* 消息内容包装器 */
.message-wrapper {
    display: flex;
    align-items: flex-start;
}

.user-message .message-wrapper {
    justify-content: flex-end;
    margin-right: 28px;
}

.ai-message .message-wrapper {
    margin-left: 28px;
}

/* 头像样式 */
.message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #e1e1e1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    flex-shrink: 0;
}

.ai-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* 消息气泡样式 */
.message-content {
    padding: 8px 12px;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    background-color: #f5f5f5;
    border-radius: 4px 12px 12px 12px;
    max-width: 100%;
}

.user-message .message-content {
    background-color: #e4f0fe;
    border-radius: 12px 4px 12px 12px;
}

/* 消息文本样式 */
.message-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    display: block;
}

/* 输入区域 */
.input-container {
    padding: 15px;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.input-wrapper {
    display: flex;
    position: relative;
    background-color: #f5f5f5;
    border-radius: 6px;
    padding: 4px;
}

.message-input {
    flex: 1;
    border: none;
    border-radius: 4px;
    padding: 8px 40px 8px 12px;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    max-height: 120px;
    overflow-y: auto;
    background-color: transparent;
    /* 移除滚动条样式 */
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    min-height: 40px;
}

/* 移除 Webkit 浏览器的滚动条 */
.message-input::-webkit-scrollbar {
    display: none;
}

.message-input:focus {
    border-color: transparent;
}

/* 发送按钮样式 */
.send-button {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
    border: none;
    background-color: #1a73e8;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
}

.send-button:hover {
    background-color: #1557b0;
}

/* 底部操作按钮样式 */
.input-options {
    display: flex;
    margin-top: 10px;
    gap: 15px;
    padding: 0 4px;
}

.option-item {
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
}

.option-item:hover {
    color: #1a73e8;
}

/* 技能按钮图标样式 */
.skill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.skill-icon svg {
    width: 100%;
    height: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* 菜单按钮样式 */
    .menu-toggle {
        position: fixed;
        top: 15px;
        left: 15px;
        width: 36px;
        height: 36px;
        border-radius: 6px;
        background-color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        z-index: 101;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}

/* 常用技能区域 */
.skills-container {
    display: flex;
    gap: 8px;
    padding: 0 4px 12px;
    flex-wrap: wrap;
    align-items: center;
}

.skills-label {
    font-size: 13px;
    color: #666;
    font-weight: 450;
    margin-right: 12px;
    white-space: nowrap;
}

.skill-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: #666;
}

.skill-button:hover {
    background-color: #f5f5f5;
    border-color: #c2e7ff;
    color: #1a73e8;
}

.skill-button:hover .skill-icon {
    color: #1a73e8;
}

/* 不同技能按钮的图标颜色 */
.skill-order .skill-icon {
    color: #4caf50;  /* 绿色 */
}

.skill-pricing .skill-icon {
    color: #2196f3;  /* 蓝色 */
}

.skill-tracking .skill-icon {
    color: #ff9800;  /* 橙色 */
}

.skill-faq .skill-icon {
    color: #9c27b0;  /* 紫色 */
}

.skill-document .skill-icon {
    color: #f44336;  /* 红色 */
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay[style*="display: block"] {
    display: flex !important;
}

.feedback-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.feedback-modal-title {
    font-size: 18px;
    color: #333;
    padding: 20px;
    font-weight: 500;
}

.feedback-modal-content {
    padding: 0 20px 20px;
}

.feedback-modal-input {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.feedback-modal-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.feedback-modal-input::placeholder {
    color: #999;
    font-family: inherit;
}

.feedback-modal-buttons {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.feedback-modal-button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    border: none;
}

.feedback-modal-button.cancel {
    background: #f5f5f5;
    color: #333;
}

.feedback-modal-button.cancel:hover {
    background: #e8e8e8;
}

.feedback-modal-button.submit {
    background: #1a73e8;
    color: #fff;
}

.feedback-modal-button.submit:hover {
    background: #1557b0;
}

/* 输入框内的技能标签样式 */
.input-skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    margin-right: 5px;
    background-color: #f0f7ff;
    border-radius: 4px;
    color: #1a73e8;
    font-size: 13px;
    white-space: nowrap;
    vertical-align: middle;
    border: 1px solid #c2e7ff;
    user-select: none;
    cursor: default;
}

.input-skill-tag .skill-tag-icon {
    font-size: 14px;
}

.skill-tag-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.skill-tag-icon-wrapper svg {
    width: 100%;
    height: 100%;
}

/* 技能标签图标颜色 - 与按钮保持一致 */
.input-skill-tag.skill-order .skill-tag-icon-wrapper svg path,
.input-skill-tag.skill-order .skill-tag-icon {
    fill: #4caf50;
    color: #4caf50;  /* 绿色 */
}

.input-skill-tag.skill-pricing .skill-tag-icon-wrapper svg path,
.input-skill-tag.skill-pricing .skill-tag-icon {
    fill: #2196f3;
    color: #2196f3;  /* 蓝色 */
}

.input-skill-tag.skill-tracking .skill-tag-icon-wrapper svg path,
.input-skill-tag.skill-tracking .skill-tag-icon {
    fill: #ff9800;
    color: #ff9800;  /* 橙色 */
}

.input-skill-tag.skill-faq .skill-tag-icon-wrapper svg path,
.input-skill-tag.skill-faq .skill-tag-icon {
    fill: #9c27b0;
    color: #9c27b0;  /* 紫色 */
}

.input-skill-tag.skill-document .skill-tag-icon-wrapper svg path,
.input-skill-tag.skill-document .skill-tag-icon {
    fill: #f44336;
    color: #f44336;  /* 红色 */
}

.input-skill-tag.selected {
    background-color: #e4f0fe;
    box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.5);
}

/* 思考状态样式 */
.thinking {
    color: #666;
    font-style: italic;
}

.thinking::after {
    content: '...';
    animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* 思考状态样式 */
.thinking-message {
    margin-left: 28px;
}

.thinking-text {
    display: inline-block;
    padding: 8px 12px;
    background-color: #f5f5f5;
    border-radius: 8px;
    color: #666;
    font-style: italic;
    position: relative;
}

.thinking-text::after {
    content: '';
    animation: ellipsisDot 1.5s infinite;
}

@keyframes ellipsisDot {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
    100% { content: '.'; }
}