:root {
    --bg-color: #131314;
    /* Deep dark background */
    --sidebar-bg: #1E1F20;
    /* Slightly lighter for sidebar if expanded, though Gemini often uses same bg */
    --surface-color: #1E1F20;
    --text-primary: #E3E3E3;
    --text-secondary: #C4C7C5;
    --accent-color: #A8C7FA;
    --input-bg: #1E1F20;
    --input-hover: #2A2B2D;
    --btn-hover: #2A2B2D;
    /* 333639 approximate */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: #0E0E0F;
    /* Slightly darker or same as bg */
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    transition: width 0.3s ease;
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.sidebar.collapsed .sidebar-header {
    align-items: center;
}

.menu-btn {
    align-self: flex-start;
    margin-left: 4px;
}

.sidebar.collapsed .menu-btn {
    align-self: center;
    margin-left: 0;
}

.new-chat-btn {
    background-color: #1A1A1C;
    border: 1px solid #333;
    /* Very subtle border */
    color: #8E918F;
    /* Muted text */
    padding: 10px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    width: fit-content;
}

.new-chat-btn:hover {
    background-color: #2D2E30;
    color: var(--text-primary);
}

.sidebar.collapsed .new-chat-btn {
    padding: 10px;
    border-radius: 50%;
    margin: 0 auto;
}

.sidebar.collapsed .new-chat-btn .btn-text,
.sidebar.collapsed .new-chat-btn .material-icons-outlined {
    /* Handle specific icons if needed, but flex gap handles basic hiding logic via overflow usually or js */
}

/* Hiding text in collapsed mode */
.sidebar.collapsed .text,
.sidebar.collapsed .btn-text,
.sidebar.collapsed .section-label {
    display: none;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    margin-top: 10px;
}

.recent-section .section-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: block;
    padding-left: 12px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 20px;
    cursor: pointer;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-item:hover {
    background-color: var(--btn-hover);
}

.sidebar.collapsed .recent-item {
    justify-content: center;
    padding: 10px 0;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 20px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
}

.footer-btn:hover {
    background-color: var(--btn-hover);
}

.sidebar.collapsed .footer-btn {
    justify-content: center;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--bg-color);
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    height: 64px;
}

.model-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
}

.model-selector:hover {
    background-color: var(--btn-hover);
    color: var(--text-primary);
}

.user-profile .avatar {
    width: 32px;
    height: 32px;
    background-color: #7C4DFF;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
}

/* Chat Area */
.chat-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 20px;
    /* Space for input area overlay if needed, but input is flex sibling */
    /* If input is inside layout flow, we don't need padding. If fixed, we do */
}

/* Scrollbar styling */
.chat-area::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.chat-area::-webkit-scrollbar-thumb,
.sidebar-content::-webkit-scrollbar-thumb {
    background-color: #333;
    border-radius: 4px;
}

.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    justify-content: center;
    /* Center vertically in the available space */
    width: 100%;
    max-width: 900px;
    height: 100%;
    /* Take full height of chat area */
    padding: 0 20px;
    margin-bottom: 40px;
    /* Push it up a bit from input */
}

.greeting-wrapper {
    width: 100%;
    text-align: left;
    margin-bottom: 60px;
}

.greeting-text {
    font-size: 3.5rem;
    font-weight: 500;
    line-height: 1.2;
    background: linear-gradient(90deg, #4285F4, #9B72CB, #D96570);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.suggestion-cards {
    display: flex;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    /* Firefox */
}

.suggestion-cards::-webkit-scrollbar {
    display: none;
}

/* Chrome/Safari/Opera */

.card {
    background-color: var(--surface-color);
    padding: 16px;
    border-radius: 12px;
    width: 200px;
    height: 180px;
    /* Fixed height for uniformity */
    flex-shrink: 0;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    background-color: var(--input-hover);
}

.card .material-icons-outlined {
    background-color: #000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    align-self: flex-start;
    /* Align icon to left */
}

.card p {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
    margin-top: auto;
    /* Push text to bottom if needed, or just let it flow */
}

/* Input Area */
.input-area-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px 24px;
    background-color: var(--bg-color);
}

.input-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.input-box {
    width: 100%;
    background-color: var(--input-bg);
    border-radius: 32px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    border: 1px solid transparent;
    /* Prepare for focus border */
}

.input-box:focus-within {
    background-color: var(--input-hover);
    /* border-color: #555;*/
    /* Optional focus border */
}

#prompt-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    max-height: 150px;
    padding: 10px 0;
    line-height: 1.5;
    outline: none;
}

.icon-btn,
.send-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    /* Touch target */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover,
.send-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.disclaimer {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
}