/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

.font-geist-mono {
    font-family: 'Geist Mono', monospace;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 聊天消息样式 */
.message {
    display: flex;
    padding: 1rem 0;
    gap: 1rem;
    animation: fadeIn 0.3s ease;
}

.message-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.message-content {
    flex: 1;
    line-height: 1.5;
    word-break: break-word;
}

.user-message .message-avatar {
    background-color: #f3f4f6;
    color: white;
}

.bot-message .message-avatar {
    background-color: #EDF6FF;
}

.message-bubble {
    max-width: 80%;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
}

.bot-message .message-bubble {
    background-color: #EDF6FF;
}

.user-message .message-bubble {
    background-color: #f3f4f6;
}

.message-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 0.5rem;
    object-fit: cover;
}

/* 助手图标样式 */
.assistant-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f8f8f8;
    margin-bottom: 0.75rem;
}

.assistant-icon.active {
    background-color: #ffffff;
    border: 1px solid #FFFFFF;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.assistant-icon:hover:not(.active) {
    background-color: #f0f0f0;
}

/* 卡片悬停效果 */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 拖放相关样式 */
.dragging {
    opacity: 0.5;
}

.drag-over {
    border: 2px dashed #0064FA;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #f3f4f6;
    border-radius: 12px;
}

.typing-indicator span {
    width: 4px;
    height: 4px;
    margin: 0 1px;
    background-color: #9ca3af;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite ease-in-out;
}

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

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

/* 代码块样式 */
pre {
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Geist Mono', monospace;
    font-size: 0.875rem;
    position: relative;
}

pre code {
    font-family: 'Geist Mono', monospace;
}

/* 表格样式 */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
}

table, th, td {
    border: 1px solid #e5e5e5;
}

th, td {
    padding: 0.5rem;
    text-align: left;
}

th {
    background-color: #f8f8f8;
}

/* 多模型分割区域 */
.model-split {
    border-right: 1px solid #e5e5e5;
    height: 100%;
}

.model-split:last-child {
    border-right: none;
}

/* 响应式调整 */
@media (max-width: 640px) {
    #sidebar {
        width: 60px;
    }
    
    .assistant-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
}
