/* Color Palette System */
:root {
    --bg-app: #090d16;
    --bg-sidebar: #0f1524;
    --bg-panel: rgba(20, 27, 45, 0.6);
    --bg-thought: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(74, 144, 226, 0.4);
    --accent-blue: #4a90e2;
    --accent-indigo: #6c5ce7;
    --text-primary: #f1f3f9;
    --text-secondary: #a0aec0;
    --text-muted: #64748b;
    --card-hover: rgba(255, 255, 255, 0.05);

    --font-header: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body,
html {
    height: 100%;
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow: hidden;
}

/* Custom Text Selection Highlight */
::selection {
    background: rgba(74, 144, 226, 0.3);
    /* Soft translucent blue */
    color: #ffffff;
}

/* App Wrapper Layout */
.app-container {
    display: flex;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
}

/* Sidebar Navigation Drawer */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow: hidden;
}

.sidebar.collapsed {
    transform: translateX(-100%);
    width: 0;
    border-right: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.6);
}

.logo h2 {
    font-family: var(--font-header);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.icon-btn:hover {
    background-color: var(--card-hover);
    color: var(--text-primary);
}

.new-chat-btn {
    margin: 10px 20px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), rgba(108, 92, 231, 0.15));
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 24px;
    color: var(--text-primary);
    font-family: var(--font-header);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s, transform 0.1s, border-color 0.2s;
}

.new-chat-btn:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.25), rgba(108, 92, 231, 0.25));
    border-color: rgba(74, 144, 226, 0.5);
    transform: translateY(-1px);
}

.sessions-list-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px 10px;
}

.section-title {
    font-family: var(--font-header);
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-left: 10px;
}

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.session-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.session-item:hover {
    background-color: var(--card-hover);
}

.session-item.active {
    background-color: rgba(74, 144, 226, 0.12);
    border-left: 3px solid var(--accent-blue);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.session-icon {
    font-size: 16px;
}

.session-title-text {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.session-item.active .session-title-text {
    color: var(--text-primary);
    font-weight: 500;
}

.delete-session-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.session-item:hover .delete-session-btn {
    opacity: 0.5;
}

.session-item:hover .delete-session-btn:hover {
    opacity: 1;
    background-color: rgba(255, 77, 77, 0.15);
    transform: scale(1.1);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-glass);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 16px;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    transition: color 0.2s, background-color 0.2s;
}

.logout-btn:hover {
    color: #ff5252;
    background-color: rgba(255, 82, 82, 0.15);
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.google-login-container {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

/* Main Workspace panel */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-app);
    position: relative;
    overflow: hidden;
}

/* Navbar */
.navbar {
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background-color: rgba(10, 15, 30, 0.2);
    backdrop-filter: blur(0.1px);
    border-bottom: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-title {
    font-family: var(--font-header);
    font-weight: 500;
    font-size: 16px;
    flex-grow: 1;
}

.model-badge {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Chat Log Scroll Area */
.chat-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 76px 20px 20px 20px;
    /* 56px navbar height + 20px padding */
}

.chat-history {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Welcoming screen container */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-grow: 1;
    margin-top: 10vh;
    max-width: 600px;
    width: 100%;
}

.welcome-logo {
    font-size: 48px;
    margin-bottom: 20px;
    animation: bounce 2s infinite alternate;
}

.welcome-screen h1 {
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 32px;
    margin-bottom: 10px;
    background: linear-gradient(to right, #ffffff, #a0aec0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.quick-prompts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.prompt-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
    backdrop-filter: blur(10px);
}

.prompt-card:hover {
    transform: translateY(-2px);
    border-color: rgba(74, 144, 226, 0.3);
    background-color: var(--card-hover);
}

.prompt-card h3 {
    font-family: var(--font-header);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.prompt-card p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Chat Message Styling */
.message-row {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.message-bubble {
    padding: 16px 20px;
    border-radius: 16px;
    max-width: 90%;
    line-height: 1.6;
    font-size: 15px;
    word-break: break-word;
}

/* User Messages style */
.message-row.user {
    align-items: flex-end;
}

.message-row.user .message-bubble {
    background-color: rgba(74, 144, 226, 0.15);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-top-right-radius: 4px;
    color: var(--text-primary);
    padding: 8px 14px;
    width: fit-content;
    max-width: 80%;
    margin-left: auto;
}

/* Model Messages style */
.message-row.model {
    align-items: flex-start;
}

.message-row.model .message-bubble {
    background-color: transparent;
    padding: 10px 0;
    max-width: 100%;
}

.message-bubble a[target="_blank"] {
    text-decoration: none;
    color: var(--accent-blue);
}

.message-bubble a[target="_blank"]:hover {
    text-decoration: underline;
}

.message-bubble a[target="_blank"]::after {
    content: "";
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    margin-left: 4px;
    background-color: currentColor;
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    vertical-align: baseline;
    opacity: 0.8;
}

/* Collapsible Thought Box (AI Reasoning Box) */
.thought-box {
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background-color: var(--bg-thought);
    overflow: hidden;
    width: 100%;
}

.thought-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.02);
    user-select: none;
    transition: background-color 0.2s;
}

.thought-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.thought-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.thought-icon {
    font-size: 14px;
}

.caret-icon {
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.thought-box.collapsed .caret-icon {
    transform: rotate(-90deg);
}

.thought-content {
    padding: 12px 16px;
    font-size: 13.5px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-glass);
    max-height: 250px;
    overflow-y: auto;
    line-height: 1.5;
}

.thought-box.collapsed .thought-content {
    display: none;
}

/* Markdown Rendering Inside Answers */
.model-text {
    color: var(--text-primary);
}

.model-text p {
    margin-bottom: 12px;
}

.model-text p:last-child {
    margin-bottom: 0;
}

.model-text strong {
    font-weight: 600;
}

.model-text h1,
.model-text h2,
.model-text h3 {
    font-family: var(--font-header);
    color: var(--text-primary);
    margin: 1.5em 0 0.5em 0;
    font-weight: 600;
}

.model-text h1 {
    font-size: 24px;
    letter-spacing: -0.5px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 8px;
}

.model-text h2 {
    font-size: 20px;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.model-text h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-blue);
}

.model-text ul,
.model-text ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.model-text li {
    margin-bottom: 6px;
}


/* Table Style inside Markdown answers */
.model-text table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: separate;
    border-spacing: 0;
    margin: 16px 0;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
}

.model-text th {
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--accent-blue);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-focus);
}

.model-text td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.model-text tr:last-child td {
    border-bottom: none;
}

.model-text a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    transition: text-decoration 0.2s;
}

.model-text a:hover {
    text-decoration: underline;
}

/* Telemetry Badge section */
.message-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.telemetry-tag {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

/* Floating Prompt Input Panel */
.input-container-wrapper {
    width: 100%;
    max-width: 800px;
    align-self: center;
    padding: 10px 20px 2px 20px;
    /* reduced bottom padding */
}

.input-panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 10px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(16px);
    transition: border-color 0.2s, flex-direction 0.2s;
}

.input-panel.multi-line {
    flex-direction: column;
    align-items: flex-end;
}


.input-panel:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 24px rgba(74, 144, 226, 0.15);
}

.prompt-input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    resize: none;
    outline: none;
    max-height: 180px;
    height: 31px;
    box-sizing: border-box;
    width: 100%;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 0;
    padding: 4px 0;
    /* Add slight symmetrical padding instead of bottom margin */
    overflow-y: hidden;
    /* Hide empty scrollbar track */
}

.input-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.helper-badge {
    background-color: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.2);
    color: var(--accent-blue);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.send-btn {
    background-color: var(--text-muted);
    border: none;
    width: 36px;
    height: 36px;
    margin: -2px 0;
    border-radius: 50%;
    color: var(--bg-app);
    cursor: pointer;
    display: none;
    /* Hide when input is empty */
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
}

.send-btn svg {
    transform: translateX(1px);
}

.send-btn.active {
    display: flex;
    /* Show when active */
    background-color: var(--text-primary);
}

.send-btn.active:hover {
    transform: scale(1.05);
    background-color: white;
}

/* Model Select Dropdown Styles */
.model-select-container {
    position: relative;
    display: inline-block;
}

.model-select-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    padding: 0 12px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s, border-color 0.2s;
    outline: none;
    box-sizing: border-box;
}

.model-select-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.model-dropdown-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 6px;
    width: max-content;
    min-width: 180px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 9999;
    backdrop-filter: blur(12px);
}

.model-dropdown-menu.show {
    display: flex;
}

.dropdown-item {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: var(--card-hover);
}

.dropdown-item.active {
    background-color: rgba(74, 144, 226, 0.12);
    border-left: 3px solid var(--accent-blue);
    padding-left: 9px;
}

.dropdown-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-item-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.terms-text {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}

/* Animations */
@keyframes bounce {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-5px);
    }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Response Actions Row */
.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.action-btn:hover {
    background-color: var(--card-hover);
    color: var(--text-secondary);
}

.action-btn.active {
    color: var(--accent-blue);
    background-color: rgba(74, 144, 226, 0.15);
}

.action-latency,
.action-time {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 12.5px;
    padding: 0 4px;
    user-select: none;
}

/* Grounding Sources (Google Search Sources Chips) */
.grounding-sources {
    margin-top: 14px;
    margin-bottom: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.grounding-sources-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.grounding-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.grounding-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--card-bg, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 12.5px;
    max-width: 260px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.grounding-chip:hover {
    background: var(--card-hover, rgba(255, 255, 255, 0.08));
    border-color: var(--accent-blue, #4a90e2);
    transform: translateY(-1px);
}

.grounding-favicon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

.grounding-chip-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.grounding-chip-domain {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Hourglass Loader Styles */
.loader-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 8px;
    margin-bottom: 8px;
}

.rotating-hourglass {
    display: inline-block;
    font-size: 18px;
    animation: spin-hourglass 1.2s infinite ease-in-out;
    color: var(--text-secondary);
}

@keyframes spin-hourglass {
    0% {
        transform: rotate(0deg);
    }

    40% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(180deg);
    }
}

/* Responsive Hide-Show sidebar rules */
@media (max-width: 768px) {

    .sidebar,
    .sidebar.collapsed {
        position: absolute;
        height: 100%;
        width: 280px;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Mobile Scaling Optimizations */
    .chat-container {
        padding: 66px 12px 12px 12px;
    }

    .navbar {
        padding: 0 12px;
    }

    .input-container-wrapper {
        padding: 8px 12px 2px 12px;
    }

    .message-bubble {
        max-width: 100%;
        padding: 12px 16px;
    }

    .welcome-screen h1 {
        font-size: 26px;
    }

    .welcome-screen p {
        font-size: 14px;
        margin-bottom: 24px;
    }
}

/* Sidebar Interaction Lock State during generation */
.sidebar.locked .session-item {
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.new-chat-btn.disabled,
.model-select-btn.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

/* Login Modal Overlay */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: rgba(10, 15, 30, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    /* Allow scrolling on small screens */
}

.login-split-container {
    display: flex;
    flex-direction: row;
    gap: 60px;
    align-items: center;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.bio-section {
    flex: 1;
    color: var(--text-primary);
}

.bio-section h1 {
    font-size: 3.2rem;
    font-family: var(--font-header);
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ffffff, #a0aec0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.bio-section h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-weight: 500;
}

.bio-section p {
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

@media (max-width: 480px) {
    .login-modal-overlay {
        align-items: flex-start;
        padding-top: 40px;
    }
}

/* Easter Egg Confetti */
.confetti {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background-color: #f00;
    pointer-events: none;
    z-index: 9999;
    animation: explode 1s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1) rotate(var(--rot));
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .login-modal-overlay {
        align-items: flex-start;
        padding: 20px 15px;
    }

    .login-split-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 10px 0;
    }

    .bio-section h1 {
        font-size: 2.2rem;
        margin-bottom: 5px;
    }

    .bio-section h2 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .bio-section p {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .bio-section .tech-stack-badges {
        justify-content: center !important;
        margin-bottom: 15px !important;
    }
}

.login-card {
    background: #121829;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 40px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.login-logo {
    font-size: 44px;
}

.login-card h2 {
    font-family: var(--font-header);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.login-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.google-modal-btn {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.demo-auth-container {
    margin-top: 16px;
    width: 100%;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
}

.demo-login-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.login-status-msg {
    font-size: 13px;
    color: #ff6b6b;
}

/* About Modal Styles */
.about-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    margin-bottom: 8px;
}

.about-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.about-card {
    max-width: 320px;
    background: rgba(18, 24, 41, 0.90);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-stack-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tech-stack-badges .badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-primary);
}

.author-link {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-blue);
    transition: all 0.2s;
    padding-bottom: 1px;
}

.author-link:hover {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background-color: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: center;
}

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