/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.logo i {
    color: #667eea;
    font-size: 24px;
}

.new-chat-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.new-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex: 1;
    height: calc(100vh - 60px); /* 减去头部高度 */
    overflow: hidden;
}

/* 侧边栏样式 */
.sidebar {
    width: 300px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
}

/* 删除重复的.session-list定义 */
.session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.session-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.session-item.active {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.session-time {
    font-size: 12px;
    color: #718096;
    flex: 1;
}

.session-delete {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.session-delete:hover {
    color: #e53e3e;
    background: rgba(229, 62, 62, 0.1);
}

.session-message {
    font-size: 14px;
    color: #2d3748;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.session-model {
    font-size: 12px;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

/* 聊天区域 */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 100%;
    min-height: 0; /* 重要：允许flex容器收缩 */
}

/* 欢迎界面 */
.welcome-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.welcome-content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}

.welcome-content i {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 20px;
}

.welcome-content h2 {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 24px;
    line-height: 1.4;
}

.welcome-new-chat-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.welcome-new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* 聊天界面 */
.chat-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    max-height: calc(100vh - 200px); /* 确保有最大高度限制 */
}

.message {
    display: flex;
    max-width: 80%;
    animation: fadeInUp 0.3s ease;
    min-width: 0; /* 允许消息框收缩 */
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.assistant {
    align-self: flex-start;
    margin-left: 0;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 12px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.message-content {
    background: white;
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    max-width: 100%; /* 限制最大宽度 */
    min-width: 0; /* 允许内容框收缩 */
    overflow-wrap: break-word; /* 确保长单词换行 */
    word-break: break-word; /* 处理长单词和URL */
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.message-text {
    line-height: 1.5;
    word-wrap: break-word;
    /* 移除最大高度和滚动条，让消息自然扩展 */
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.message-text pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
    position: relative;
}

.message-text code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* 代码块包装器样式 */
.code-block-wrapper {
    position: relative;
    margin: 8px 0;
}

.code-block-wrapper pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0;
    position: relative;
}

/* 代码块复制按钮样式 */
.copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 10;
}

.code-block-wrapper:hover .copy-code-btn {
    opacity: 1;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.copy-code-btn.copied {
    background: #48bb78;
}

.copy-code-btn.copied:hover {
    background: #38a169;
}

/* 移除整体消息的复制按钮 */
.copy-btn {
    display: none;
}

.message-time {
    font-size: 11px;
    color: #a0aec0;
    margin-top: 4px;
    text-align: right;
}

.message.user .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* 输入区域 */
.input-area {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
}

.input-container {
    max-width: 800px;
    margin: 0 auto;
}

#messageInput {
    width: 100%;
    min-height: 80px;
    max-height: 200px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    resize: vertical;
    background: white;
    transition: all 0.3s ease;
    color: #2d3748;
}

#messageInput::placeholder {
    color: #a0aec0;
    opacity: 1;
}

#messageInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#messageInput:focus::placeholder {
    color: #cbd5e0;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.char-count {
    font-size: 12px;
    color: #718096;
}

.send-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.send-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 模型选择弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.model-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    font-size: 20px;
    color: #2d3748;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #2d3748;
    background: rgba(0, 0, 0, 0.05);
}

.modal-content {
    padding: 24px;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.model-item {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.model-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.model-item.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.model-name {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.model-desc {
    font-size: 14px;
    color: #718096;
    line-height: 1.4;
}

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

.cancel-btn, .confirm-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #4a5568;
}

.cancel-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.confirm-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
}

.confirm-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 加载指示器 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.loading-spinner {
    background: white;
    padding: 24px 32px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: #2d3748;
}

.loading-spinner i {
    font-size: 20px;
    color: #667eea;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* 优化滚动条样式 */
.messages-container::-webkit-scrollbar,
.session-list::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track,
.session-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb,
.session-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.messages-container::-webkit-scrollbar-thumb:hover,
.session-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 确保滚动区域平滑滚动 */
.messages-container,
.session-list {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .model-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        position: absolute;
        z-index: 100;
        height: 100%;
    }
    
    .header {
        padding: 8px 16px;
    }
    
    .logo span {
        display: none;
    }
}

/* Markdown 渲染样式 */
.message-text {
    line-height: 1.6;
    word-wrap: break-word;
}

/* 标题样式 */
.message-text h1,
.message-text h2,
.message-text h3,
.message-text h4,
.message-text h5,
.message-text h6 {
    margin: 16px 0 8px 0;
    font-weight: 600;
    line-height: 1.25;
}

.message-text h1 {
    font-size: 1.5em;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
}

.message-text h2 {
    font-size: 1.3em;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
}

.message-text h3 { font-size: 1.2em; }
.message-text h4 { font-size: 1.1em; }
.message-text h5 { font-size: 1em; }
.message-text h6 { font-size: 0.9em; color: #6a737d; }

/* 段落和换行 */
.message-text p {
    margin: 8px 0;
}

.message-text br {
    content: '';
    display: block;
    margin: 4px 0;
}

/* 列表样式 */
.message-text ul,
.message-text ol {
    margin: 8px 0;
    padding-left: 24px;
}

.message-text li {
    margin: 4px 0;
}

.message-text ul {
    list-style-type: disc;
}

.message-text ol {
    list-style-type: decimal;
}

/* 代码块样式 */
.message-text pre {
    background-color: #f6f8fa;
    color: #24292e;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.45;
    position: relative;
    margin: 16px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message-text code {
    background-color: rgba(175, 184, 193, 0.2);
    border-radius: 3px;
    font-size: 85%;
    margin: 0;
    padding: 0.2em 0.4em;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
}

/* 代码块包装器 */
.code-block-wrapper {
    position: relative;
    margin: 16px 0;
}

/* 复制按钮样式 */
.copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #d0d7de;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: #24292e;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.copy-code-btn:hover {
    background: #f6f8fa;
    border-color: #afb8c1;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.copy-code-btn.copied {
    background: #2ea44f;
    color: white;
    border-color: #2ea44f;
}

.copy-code-btn i {
    margin-right: 4px;
}

/* 语法高亮样式 */
.hljs {
    background: transparent !important;
    padding: 0 !important;
}

.hljs-keyword {
    color: #d73a49;
}

.hljs-string {
    color: #032f62;
}

.hljs-number {
    color: #005cc5;
}

.hljs-comment {
    color: #6a737d;
    font-style: italic;
}

.hljs-function {
    color: #6f42c1;
}

.hljs-variable {
    color: #e36209;
}

.hljs-params {
    color: #24292e;
}

.hljs-built_in {
    color: #005cc5;
}

.hljs-class {
    color: #6f42c1;
}

.hljs-title {
    color: #6f42c1;
}

.hljs-attr {
    color: #005cc5;
}

.hljs-tag {
    color: #22863a;
}

.hljs-name {
    color: #22863a;
}

.hljs-attribute {
    color: #6f42c1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message-text pre {
        padding: 12px;
        font-size: 13px;
        margin: 12px 0;
    }
    
    .copy-code-btn {
        padding: 3px 6px;
        font-size: 11px;
        top: 6px;
        right: 6px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        position: absolute;
        z-index: 100;
        height: 100%;
    }
    
    .header {
        padding: 8px 16px;
    }
    
    .logo span {
        display: none;
    }
}

/* Markdown 渲染样式 */
.message-text {
    line-height: 1.6;
    word-wrap: break-word;
}

/* 标题样式 */
.message-text h1,
.message-text h2,
.message-text h3,
.message-text h4,
.message-text h5,
.message-text h6 {
    margin: 16px 0 8px 0;
    font-weight: 600;
    line-height: 1.25;
}

.message-text h1 {
    font-size: 1.5em;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
}

.message-text h2 {
    font-size: 1.3em;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
}

.message-text h3 { font-size: 1.2em; }
.message-text h4 { font-size: 1.1em; }
.message-text h5 { font-size: 1em; }
.message-text h6 { font-size: 0.9em; color: #6a737d; }

/* 段落和换行 */
.message-text p {
    margin: 8px 0;
}

.message-text br {
    content: '';
    display: block;
    margin: 4px 0;
}

/* 列表样式 */
.message-text ul,
.message-text ol {
    margin: 8px 0;
    padding-left: 24px;
}

.message-text li {
    margin: 4px 0;
}

.message-text ul {
    list-style-type: disc;
}

.message-text ol {
    list-style-type: decimal;
}

/* 代码块样式 */
.message-text pre {
    background: #f6f8fa;
    color: #24292e;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
    position: relative;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
    font-size: 0.9em;
    line-height: 1.4;
    border: 1px solid #e1e4e8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message-text code {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
    font-size: 0.9em;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.message-text pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    border: none;
}

/* 代码块复制按钮 */
.code-block-wrapper {
    position: relative;
}

.code-block-wrapper pre {
    margin-top: 32px; /* 为复制按钮留出空间 */
}

.copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: #586069;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.copy-code-btn:hover {
    background: #f6f8fa;
    border-color: #d1d5da;
    color: #24292e;
}

.copy-code-btn.copied {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

/* 语法高亮颜色 */
.message-text pre .keyword { color: #d73a49; }
.message-text pre .string { color: #032f62; }
.message-text pre .number { color: #005cc5; }
.message-text pre .comment { color: #6a737d; font-style: italic; }
.message-text pre .function { color: #6f42c1; }
.message-text pre .class { color: #22863a; }
.message-text pre .operator { color: #d73a49; }

.message-text code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
}

.message-text pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* 引用样式 */
.message-text blockquote {
    margin: 16px 0;
    padding: 8px 16px;
    border-left: 4px solid #667eea;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 0 8px 8px 0;
    color: #4a5568;
}

.message-text blockquote p {
    margin: 0;
}

/* 表格样式 */
.message-text table {
    border-collapse: collapse;
    margin: 16px 0;
    width: 100%;
}

.message-text th,
.message-text td {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    text-align: left;
}

.message-text th {
    background: #f7fafc;
    font-weight: 600;
}

.message-text tr:nth-child(even) {
    background: #f7fafc;
}

/* 链接样式 */
.message-text a {
    color: #667eea;
    text-decoration: none;
}

.message-text a:hover {
    text-decoration: underline;
}

/* 强调样式 */
.message-text strong {
    font-weight: 600;
}

.message-text em {
    font-style: italic;
}

/* 分割线 */
.message-text hr {
    height: 1px;
    background: #e2e8f0;
    border: none;
    margin: 24px 0;
}

/* 流式指示器 */
.streaming-indicator {
    color: #718096;
    font-style: italic;
}

.streaming-indicator i {
    margin-right: 8px;
    color: #667eea;
}

/* 用户消息的特殊样式 */
.message.user .message-text h1,
.message.user .message-text h2,
.message.user .message-text h3,
.message.user .message-text h4,
.message.user .message-text h5,
.message.user .message-text h6 {
    color: rgba(255, 255, 255, 0.9);
}

.message.user .message-text p {
    color: rgba(255, 255, 255, 0.9);
}

.message.user .message-text code {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.message.user .message-text a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}