/* 全局变量 */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #45a049;
    --accent-color: #2196F3;
    --background-color: #f8f9fa;
    --text-color: #333;
    --text-light: #666;
    --border-radius: 12px;
    --box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

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

body {
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* 布局容器 */
.main-container {
    display: flex;
    gap: 20px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏 */
.navbar {
    background: white;
    padding: 1rem 2rem;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    gap: 1rem;
}

/* 聊天区域 */
.chat-section {
    flex: 1;
    min-width: 400px;
}

.chat-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    font-weight: bold;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin: 10px 0;
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.user-message {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.ai-message {
    background: white;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 输入区域 */
.input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#user-input {
    flex: 1;
    min-height: 60px;
    max-height: 150px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    resize: vertical;
    transition: var(--transition);
}

#user-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 按钮样式 */
.button {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-button {
    background: var(--primary-color);
    color: white;
}

.primary-button:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.secondary-button {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.secondary-button:hover {
    background: rgba(76, 175, 80, 0.1);
}

/* 上传区域 */
.upload-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(76, 175, 80, 0.05);
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .chat-section {
        min-width: 100%;
    }
    
    .button {
        padding: 10px 20px;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 2% auto;
    padding: 25px;
    width: 90%;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    animation: slideIn 0.3s ease;
}

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

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 5px 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
} 