/* DeepSeek UI 样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #1a1b1e;
    margin: 0;
    padding: 0;
    color: #fff;
    height: 100vh;
    overflow: hidden;
}

/* 应用容器 */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* 左侧边栏 */
.sidebar {
    width: 260px;
    background-color: #202123;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #2d2e30;
    overflow: hidden;
}

.logo {
    padding: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid #2d2e30;
}

.new-chat-btn {
    margin: 15px;
    padding: 12px 16px;
    background-color: #4b5563;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.new-chat-btn:hover {
    background-color: #5a6474;
}

/* 移除聊天历史相关样式 */
/* 添加空白区域填充 */
.sidebar::after {
    content: "";
    flex: 1;
    display: block;
}

/* 下载按钮 */
/* 移除下载按钮相关样式 */
.app-download {
    padding: 15px;
    border-top: 1px solid #2d2e30;
    margin-top: auto;
}

.download-btn {
    width: 100%;
    padding: 10px;
    background-color: transparent;
    color: #d1d5db;
    border: 1px solid #4b5563;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background-color: #2d2e30;
}

.new-badge {
    background-color: #4b5563;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

/* 用户信息 */
.user-profile {
    padding: 15px;
    border-top: 1px solid #2d2e30;
    display: flex;
    align-items: center;
}

.profile-icon {
    font-size: 14px;
    color: #d1d5db;
    cursor: pointer;
}

/* 主聊天区域 */
.main-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #343541;
    overflow: hidden;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.message {
    display: flex;
    margin-bottom: 20px;
    max-width: 80%;
}

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

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #5a67d8;
    margin-right: 12px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>');
}

.user-message .message-avatar {
    margin-right: 0;
    margin-left: 12px;
    background-color: #4b5563;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
}

.message-content {
    background-color: #444654;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.user-message .message-content {
    background-color: #5a67d8;
}

.message-content h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.message-content p {
    margin: 0;
}

/* 输入区域 */
.input-area {
    padding: 20px;
    border-top: 1px solid #444654;
}

.input-container {
    display: flex;
    position: relative;
    background-color: #40414f;
    border-radius: 8px;
    padding: 8px;
}

#userInput {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    padding: 8px 12px;
    outline: none;
}

#userInput::placeholder {
    color: #9ca3af;
}

.input-buttons {
    display: flex;
    align-items: center;
}

.attach-btn, .translate-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    padding: 6px 10px;
    margin-right: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.attach-btn:hover, .translate-btn:hover {
    background-color: #4b5563;
    color: #fff;
}

#sendButton {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #5a67d8;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="18" height="18"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

#sendButton:hover {
    background-color: #4c56b4;
}

/* 底部信息 */
.footer {
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    border-top: 1px solid #444654;
}

/* 验证码容器 */
.captcha-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2d2e30;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none; /* 默认隐藏验证码容器 */
}

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

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

::-webkit-scrollbar-thumb {
    background-color: #4b5563;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #5a6474;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
    }
    
    .main-chat {
        height: 60vh;
    }
}
/* 加载动画 */
.loader-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(64, 65, 79, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}

.loader {
    width: 24px;
    height: 24px;
    border: 3px solid #d1d5db;
    border-radius: 50%;
    border-top-color: #5a67d8;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误消息 */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    background-color: #ef4444;
    color: white;
    padding: 20px;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.message-content {
    background-color: #5a67d8;
}

.message-content h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.message-content p {
    margin: 0;
}

/* 输入区域 */
.input-area {
    padding: 20px;
    border-top: 1px solid #444654;
}

.input-container {
    display: flex;
    position: relative;
    background-color: #40414f;
    border-radius: 8px;
    padding: 8px;
}

#userInput {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    padding: 8px 12px;
    outline: none;
}

#userInput::placeholder {
    color: #9ca3af;
}

.input-buttons {
    display: flex;
    align-items: center;
}

.attach-btn, .translate-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    padding: 6px 10px;
    margin-right: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.attach-btn:hover, .translate-btn:hover {
    background-color: #4b5563;
    color: #fff;
}

#sendButton {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #5a67d8;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="18" height="18"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

#sendButton:hover {
    background-color: #4c56b4;
}

/* 底部信息 */
.footer {
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    border-top: 1px solid #444654;
}

/* 验证码容器 */
.captcha-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2d2e30;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

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

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

::-webkit-scrollbar-thumb {
    background-color: #4b5563;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #5a6474;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
    }
    
    .main-chat {
        height: 60vh;
    }
}
