:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-sidebar: #f1f3f4;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --accent-blue: #1a73e8;
    --accent-blue-hover: #1b66c9;
    --border-color: #dadce0;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 24px;
    --border-radius-pill: 32px;
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    --shadow-md: 0 2px 6px 2px rgba(60,64,67,0.15);
    --font-family: 'Roboto', 'Google Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    height: 100vh;
    overflow: hidden;
    line-height: 1.5;
}

.app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Typography & Icons */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

button {
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    background: none;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    padding: 16px;
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.icon-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.icon-button:hover {
    background-color: rgba(60,64,67,0.08);
    color: var(--text-primary);
}

.logo {
    display: flex;
    align-items: center;
    margin-left: 12px;
    color: var(--text-primary);
}

.logo-icon {
    color: var(--accent-blue);
    margin-right: 8px;
    font-size: 28px;
}

.logo h2 {
    font-size: 18px;
    font-weight: 500;
}

.new-chat-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--border-radius-lg);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(60,64,67,0.1);
    transition: var(--transition);
    margin-bottom: 32px;
}

.new-chat-btn:hover {
    box-shadow: 0 1px 3px rgba(60,64,67,0.2);
    background-color: var(--bg-secondary);
}

.recent-chats {
    flex-grow: 1;
    overflow-y: auto;
}

.recent-chats h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 12px;
}

.recent-chats ul {
    list-style: none;
}

.recent-chats li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-chats li:hover {
    background-color: rgba(60,64,67,0.08);
}

.recent-chats li .material-symbols-outlined {
    font-size: 18px;
    color: var(--text-secondary);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
}

.version-log {
    margin-top: auto;
    margin-bottom: 16px;
    padding: 12px;
    background-color: rgba(60,64,67,0.03);
    border-radius: var(--border-radius-md);
}

.version-log h3 {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.version-log ul {
    list-style: none;
}

.version-log li {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
}

.version-log li:last-child {
    margin-bottom: 0;
}

.version-badge {
    display: inline-block;
    background-color: #e8f0fe;
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
    width: fit-content;
}

.help-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius-md);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--bg-primary);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.model-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    transition: var(--transition);
}

.model-selector:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.user-profile .material-symbols-outlined {
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Chat Area */
.chat-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 80px 24px 120px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-width: 800px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.welcome-icon {
    width: 64px;
    height: 64px;
    background-color: #e8f0fe;
    color: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.welcome-icon .material-symbols-outlined {
    font-size: 36px;
}

.welcome-screen h1 {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 12px;
    background: linear-gradient(74deg, #4285f4 0%, #9b72cb 9%, #d96570 20%, #d96570 24%, #9b72cb 35%, #4285f4 44%, #9b72cb 50%, #d96570 56%, #fbbc04 75%, #34a853 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-screen p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.suggestion-chips {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.suggestion-chip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    max-width: 220px;
    text-align: left;
    transition: var(--transition);
}

.suggestion-chip:hover {
    background-color: var(--bg-secondary);
    border-color: #bdc1c6;
}

.suggestion-chip .material-symbols-outlined {
    color: var(--accent-blue);
}

.chip-text {
    display: flex;
    flex-direction: column;
}

.chip-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 14px;
}

.chip-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Messages */
.messages-area {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 24px;
}

.message {
    display: flex;
    gap: 16px;
    max-width: 100%;
    animation: fadeIn 0.3s ease-out;
}

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

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar.user {
    background-color: #f1f3f4;
    color: var(--text-secondary);
}

.avatar.bot {
    background-color: #e8f0fe;
    color: var(--accent-blue);
}

.message-content {
    background-color: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    font-size: 15px;
    line-height: 1.6;
}

.message.user .message-content {
    background-color: var(--bg-sidebar);
    border-bottom-right-radius: 4px;
}

.message.bot .message-content {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.message-content p {
    margin-bottom: 8px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Input Area */
.input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 24px 24px 24px;
    background: linear-gradient(to top, var(--bg-primary) 80%, transparent);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 8px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid transparent;
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: var(--bg-primary);
}

.add-file-btn {
    margin-bottom: 4px;
}

textarea {
    flex-grow: 1;
    border: none;
    background: none;
    padding: 12px 8px;
    font-family: var(--font-family);
    font-size: 16px;
    color: var(--text-primary);
    resize: none;
    max-height: 200px;
    outline: none;
    line-height: 1.5;
}

textarea::placeholder {
    color: var(--text-secondary);
}

.input-actions {
    display: flex;
    margin-bottom: 4px;
}

.send-btn {
    color: #c4c7c5;
}

.send-btn.active {
    color: var(--accent-blue);
    background-color: #e8f0fe;
}

.disclaimer {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 12px;
    max-width: 800px;
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #bdc1c6;
}
