:root {
    --background-color: #F8F9FA; --container-bg: #FFFFFF; --sidebar-bg: #ECEFF1;
    --primary-text: #202124; --secondary-text: #5F6368; --accent-color: #1A73E8;
    --accent-hover: #1765CC; --border-color: #DADCE0; --user-bubble-bg: #D3E3FD;
    --assistant-bubble-bg: #F1F3F4; --archive-btn-bg: #e8f0fe; --delete-btn-color: #D93025;
}
* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; background-color: var(--background-color); color: var(--primary-text); }
.main-container { display: flex; height: 100vh; padding-bottom: 100px; }
.sidebar { width: 260px; background-color: var(--sidebar-bg); padding: 15px; padding-bottom: 100px; display: flex; flex-direction: column; border-right: 1px solid var(--border-color); }
.sidebar-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: 12px; font-size: 1rem; border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; background-color: var(--container-bg); color: var(--primary-text); transition: background-color 0.2s; }
.new-chat-btn { margin-bottom: 10px; }
.archive-chat-btn { font-size: 0.9rem; background-color: var(--archive-btn-bg); border-color: #1A73E8; color: #1A73E8; margin-bottom: 20px;}
.sidebar-btn:hover { background-color: #f1f1f1; }
.archive-chat-btn:hover { background-color: #dce9fc; }
.chat-history { flex-grow: 1; overflow-y: auto; }
.chat-history h3 { font-size: 0.9rem; color: var(--secondary-text); margin: 0 0 10px 0; padding: 0 10px; }
.chat-history ul { list-style: none; padding: 0; margin: 0; }
.history-item { display: flex; align-items: center; justify-content: space-between; padding: 10px; margin-bottom: 5px; border-radius: 6px; cursor: pointer; transition: background-color 0.2s; }
.history-item::before { content: none !important; }
.history-item:hover { background-color: #e0e0e0; }
.history-item.active { background-color: var(--user-bubble-bg); font-weight: bold; }
.history-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-grow: 1; padding-right: 10px; }
.delete-btn { display: none; padding: 4px; border: none; background: transparent; cursor: pointer; flex-shrink: 0; }
.history-item:hover .delete-btn { display: block; }
.delete-btn svg { width: 18px; height: 18px; color: var(--secondary-text); transition: color 0.2s; }
.delete-btn:hover svg { color: var(--delete-btn-color); }
.no-history { text-align: center; color: var(--secondary-text); font-size: 0.9rem; padding: 20px; }
.sidebar-footer { margin-top: auto; padding-top: 15px; border-top: 1px solid var(--border-color); text-align: center; }
.footer-link { display: block; text-decoration: none; color: var(--secondary-text); font-size: 0.85rem; padding: 8px 0; border-radius: 6px; transition: background-color 0.2s, color 0.2s; }
.footer-link:hover { background-color: #e0e0e0; color: var(--primary-text); }
.premium-link { font-weight: bold; color: var(--accent-color); margin-bottom: 10px; }
.social-icons { display: flex; justify-content: center; gap: 15px; margin-bottom: 10px; }
.social-icons a { color: var(--secondary-text); transition: color 0.2s; }
.social-icons a:hover { color: var(--primary-text); }
.social-icons svg { width: 22px; height: 22px; }
.chat-view { flex-grow: 1; display: flex; flex-direction: column; background-color: var(--container-bg); }
.chat-window { flex-grow: 1; padding: 20px; overflow-y: auto; }
.message-wrapper { display: flex; margin-bottom: 20px; align-items: flex-end; }
.avatar { width: 40px; height: 40px; border-radius: 10px; background-color: #FF4500; color: #FFD700; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.2rem; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); margin-right: 12px; flex-shrink: 0; }
.message { max-width: 80%; padding: 12px 18px; border-radius: 18px; line-height: 1.5; word-wrap: break-word; }
.user { justify-content: flex-end; }
.assistant { justify-content: flex-start; }
.user .message { background-color: var(--user-bubble-bg); color: var(--primary-text); border-bottom-right-radius: 4px; }
.assistant .message { background-color: var(--assistant-bubble-bg); color: var(--primary-text); border-bottom-left-radius: 4px; white-space: pre-wrap; }
.assistant .message a { color: var(--accent-color); font-weight: bold; text-decoration: none; }
.assistant .message a:hover { text-decoration: underline; }
.input-area-wrapper { padding: 1.5rem; border-top: 1px solid var(--border-color); }
.input-area { display: flex; max-width: 700px; margin: 0 auto; background-color: var(--assistant-bubble-bg); border-radius: 24px; padding: 5px; }
textarea { flex-grow: 1; border: none; background: transparent; padding: 10px; font-size: 1rem; resize: none; overflow-y: hidden; max-height: 150px; outline: none; }
button { padding: 10px 15px; margin: 3px; font-size: 1rem; color: white; background-color: var(--accent-color); border: none; border-radius: 18px; cursor: pointer; transition: background-color 0.2s; }
button:hover:not(:disabled) { background-color: var(--accent-hover); }
button:disabled { background-color: #90baf9; cursor: not-allowed; }
@media (max-width: 768px) { .sidebar { display: none; } }
