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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 应用容器 */
.app-container {
    width: 100%;
    height: 100vh;
    display: flex;
    background: white;
}

/* 侧边栏样式 */
.sidebar {
    width: 260px;
    background: #202123;
    color: white;
    padding: 10px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #4d4d4f;
}

.new-chat-btn {
    width: 100%;
    padding: 12px;
    background: #343541;
    color: white;
    border: 1px solid #565869;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.new-chat-btn:hover {
    background: #40414f;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 12px;
    margin: 4px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.conversation-item:hover {
    background: #343541;
}

.conversation-item.active {
    background: #343541;
}

.conversation-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.delete-conversation {
    opacity: 0;
    transition: opacity 0.2s;
    color: #8e8ea0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.conversation-item:hover .delete-conversation {
    opacity: 1;
}

.delete-conversation:hover {
    color: #ff4444;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #343541;
}

/* 聊天容器 */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    background: #343541;
    position: relative;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #4d4d4f;
    text-align: center;
    background: #343541;
}

.chat-header h1 {
    font-size: 1.5rem;
    color: #d1d5db;
}

.chat-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.action-button {
    padding: 8px 16px;
    background: #40414f;
    color: #d1d5db;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.action-button:hover {
    background: #4d4d4f;
}

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

.message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 4px 0;
}

.user-message {
    align-items: flex-end;
}

.user-message .message-content {
    background: #343541;
    color: #d1d5db;
    border: 1px solid #565869;
}

.grok-message {
    align-items: flex-start;
}

.grok-message .message-content {
    background: #444654;
    color: #d1d5db;
}

.chat-input {
    padding: 20px;
    background: #343541;
    border-top: 1px solid #4d4d4f;
}

textarea {
    width: 100%;
    padding: 12px;
    background: #40414f;
    color: #d1d5db;
    border: 1px solid #565869;
    border-radius: 8px;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 10px;
}

textarea::placeholder {
    color: #8e8ea0;
}

button {
    padding: 8px 16px;
    background: #40414f;
    color: #d1d5db;
    border: 1px solid #565869;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

button:hover {
    background: #4d4d4f;
}

/* 密码验证界面 */
.password-screen {
    background: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.password-container {
    background: #343541;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.password-container h2 {
    margin-bottom: 1rem;
    color: #d1d5db;
}

.password-container input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background: #40414f;
    border: 1px solid #565869;
    border-radius: 6px;
    color: #d1d5db;
    font-size: 1rem;
}

.error-message {
    color: #ff4444;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(64, 65, 79, 0.9);
    color: #d1d5db;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

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

::-webkit-scrollbar-track {
    background: #2a2b32;
}

::-webkit-scrollbar-thumb {
    background: #565869;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6e7081;
} 
