body {
    background-color: #e0f7fa;
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 0;
}

.chat-section {
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 1800px;
    width: 95%;
    margin: 2rem auto;
}

.chat-box {
    display: flex;
    flex-direction: column;
    height: 80vh;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.chat-box:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.chat-log {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    padding: 20px;
    background-color: rgba(249, 249, 249, 0.7);
    border-radius: 10px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    transform: translateZ(0);
    will-change: transform;
}

.input-area {
    display: flex;
    padding: 15px;
    background-color: rgba(241, 241, 241, 0.8);
    width: 100%;
    border-radius: 0 0 10px 10px;
}

#user-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

#user-input:focus {
    background-color: #ffffff;
    box-shadow: 0 0 5px rgba(76, 132, 255, 0.3);
}

#send-button, #upload-button {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.9), rgba(46, 204, 113, 0.9));
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#send-button:hover, #upload-button:hover {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.95), rgba(39, 174, 96, 0.95));
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* 消息样式 */
.chat-log p {
    margin: 0.5rem 0;
    line-height: 1.5;
}

/* 加载动画样式 */
.loading {
    display: inline-block;
    animation: blink 1s infinite; /* 添加闪烁效果 */
}

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

.footer {
    background-color: #003366; /* 深蓝色背景 */
    color: white; /* 页脚文字颜色 */
    text-align: center; /* 文字居中 */
    padding: 1rem; /* 内边距 */
    position: relative; /* 使其在页面底部 */
    bottom: 0; /* 固定在底部 */
    width: 100%; /* 宽度为100% */
    border-top: 1px solid #004d40; /* 上边框 */
}

.footer-content p {
    margin: 0; /* 去掉默认边距 */
    line-height: 1.5; /* 行高 */
}

.chat-section p {
    font-size: 1.1rem; /* 字体大小 */
    color: #333; /* 字体颜色 */
    margin-bottom: 1rem; /* 下边距 */
}

/* 添加渐入特效 */
.hero-section h1 {
    opacity: 0; /* 初始透明度 */
    animation: fadeIn 2s forwards; /* 动画效果 */
}

@keyframes fadeIn {
    to {
        opacity: 1; /* 最终透明度 */
    }
}

/* 添加渐入特效 */
.hero-section p {
    opacity: 0; /* 初始透明度 */
    animation: fadeIn 2s forwards; /* 动画效果 */
    animation-delay: 0.5s; /* 延迟动画开始 */
}

/* AI平台卡片样式 */
.ai-platforms {
    padding: 40px 20px;
    background-color: #f8f9fa;
}

.ai-platforms h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.ai-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    min-height: 450px;
    display: flex;
    flex-direction: column;
}

.ai-card:hover {
    transform: translateY(-5px);
}

.ai-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.ai-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.ai-card ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    color: #666;
}

.ai-card li {
    margin: 8px 0;
}

.ai-link {
    display: block;
    width: 100%;
    padding: 12px 0;
    background: linear-gradient(to right, #3498db, #2ecc71);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: center;
}

.ai-link:hover {
    background: linear-gradient(to right, #2980b9, #27ae60);
    transform: translateY(-2px);
}

.ai-card .ai-link {
    margin-top: 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ai-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-card {
        margin: 0 10px;
    }
}

.access-info {
    background-color: #fff3e0;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.access-note {
    color: #e65100;
    font-weight: bold;
    margin-bottom: 10px;
}

.access-info ul {
    margin-bottom: 0;
}

.access-info li {
    color: #795548;
    font-size: 0.9em;
}

/* Deepseek卡片特殊样式 */
.success-info {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.success-info .success {
    color: #2e7d32;
}

.success-info li {
    color: #1b5e20;
}

/* 聊天控制按钮 */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chat-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.control-button {
    background-color: #f0f0f0;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.control-button:hover {
    background-color: #e0e0e0;
}

.control-button.active {
    background-color: #4c84ff;
    color: white;
}

/* 修改消息样式 - 增加间距和透明背景 */
.user-message, .ai-message {
    margin: 0.8rem 0;
    padding: 12px 18px;
    border-radius: 10px;
    line-height: 1.6;
    max-width: 85%;
    position: relative;
    margin-left: 15px;
    word-break: break-word;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

/* 用户消息样式 - 强制右对齐版本 */
.user-message {
    background-color: rgba(76, 132, 255, 0.15);
    border-left: 4px solid rgba(76, 132, 255, 0.7);
    color: #333;
    position: relative;
    margin-bottom: 30px;
    align-self: flex-end;
    margin-right: 15px;
    margin-left: 0;
    text-align: left;
    max-width: 92%; /* 增加宽度 */
    min-width: 100px;
    width: auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-message::before {
    content: "我";
    position: absolute;
    top: -22px;
    left: auto;
    right: 0;
    font-size: 12px;
    color: #4c84ff;
    font-weight: bold;
}

/* AI消息样式 - 同样自适应 */
.ai-message {
    background-color: rgba(52, 199, 89, 0.1);
    border-left: 4px solid rgba(52, 199, 89, 0.7);
    margin-top: 30px;
    margin-bottom: 30px;
    position: relative;
    max-width: 92%; /* 增加宽度 */
    width: auto;
    display: inline-block;
    min-width: 100px;
    align-self: flex-start;
    margin-left: 15px;
    margin-right: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-message::before {
    content: var(--ai-name, "DeepSeek");
    position: absolute;
    top: -22px;
    left: 0;
    font-size: 12px;
    color: #34c759;
    font-weight: bold;
}

/* 代码块样式优化 */
.ai-message pre {
    background-color: rgba(38, 50, 56, 0.95);
    color: #eeffff;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    border-left: 3px solid #607d8b;
    transform: translateZ(0);
    will-change: transform;
}

/* 内联代码样式优化 */
.ai-message code {
    background-color: rgba(45, 52, 64, 0.85);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #ffffff;
    font-size: 0.9em;
    transform: translateZ(0);
    will-change: transform;
}

/* 系统消息样式透明化 */
.system-message {
    text-align: center;
    padding: 8px 15px;
    margin: 10px auto 15px auto;
    background-color: rgba(255, 246, 176, 0.85);
    border-radius: 18px;
    color: #664500;
    font-size: 14px;
    font-weight: 500;
    max-width: 96%; /* 增加宽度，与思考过程一致 */
    border: 1px solid rgba(255, 204, 0, 0.3);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
    animation: systemMessageAppear 0.5s ease-out;
}

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

/* 文字换行控制 */
.message-content {
    word-break: break-word;
    white-space: pre-wrap;
}

/* 添加消息动画 */
@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message, .ai-message {
    animation: messageAppear 0.3s ease-out;
    animation-fill-mode: both;
}

/* 模型选择器样式 */
.model-selector-container {
    display: flex;
    align-items: center;
}

.model-selector-container label {
    margin-right: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
}

#model-selector {
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 0.9rem;
    cursor: pointer;
    width: auto;
    min-width: 150px;
}

/* 介绍文本高亮效果 */
@keyframes highlight-pulse {
    0% { color: #333; background-color: transparent; }
    50% { color: #007BFF; background-color: rgba(0, 123, 255, 0.1); }
    100% { color: #333; background-color: transparent; }
}

.intro-text-highlight {
    animation: highlight-pulse 1.5s ease;
    border-radius: 8px;
    padding: 5px;
}

/* 思考过程样式 - 内嵌到消息中顶部 */
.thinking-process {
    background-color: #f0f8ff;
    border-left: 3px solid #4682B4;
    margin: 0 0 1rem 0;
    padding: 1rem 1.2rem;
    border-radius: 6px;
    position: relative;
    width: 96%; /* 增加宽度 */
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.thinking-process:after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 15px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #f0f8ff;
}

.thinking-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #4169E1;
    display: flex;
    align-items: center;
}

.thinking-header:before {
    content: "💭";
    margin-right: 8px;
    font-size: 1.1em;
}

.thinking-content {
    font-size: 0.9rem;
    white-space: pre-wrap;
    color: #444;
    line-height: 1.5;
    border-top: 1px dotted #ccc;
    padding-top: 8px;
    margin-top: 5px;
} 