/* Layout grid: Header | Explorer/Chat/Log | Footer */
#app {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    /* Canvas mode uses a full-width stage; Explorer floats as a window. */
    grid-template-columns: 1fr;
    transition: grid-template-columns 0.3s var(--ease-smooth);
}

@media (min-width: 768px) {
    .input-pill:focus-within {
        border-color: var(--accent-blue);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--accent-blue);
        background: var(--glass-bg-2);
    }
}

@media (max-width: 768px) {
    #app {
        grid-template-columns: 1fr;
    }
    #center-panel, footer, header {
        grid-column: 1 / 2;
    }
}

body.side-nav-collapsed #app {
    grid-template-columns: 68px 1fr;
}

@media (max-width: 768px) {
    body.side-nav-collapsed #app {
        grid-template-columns: 1fr;
    }
}

/* Sidebar explorer is now a floating AisinWindow. 
   Grid-based sidebar logic removed to avoid conflicts with floating window state. */
body.theme-light #app {
    background: radial-gradient(circle at 20% 30%, rgb(191, 219, 254) 0%, transparent 40%), radial-gradient(circle at 80% 70%, rgb(209, 250, 229) 0%, transparent 40%), radial-gradient(circle at 50% 50%, #ebebeb40 0%, #dbdbdb00 100%);
}

/* Center split (Preview | Chat) */
#center-panel {
    grid-row: 2 / 3;
    grid-column: 2 / 3;
    display: flex;
    justify-content: center;
    background: transparent;
    position: relative;
    min-width: 0;
    min-height: 0; /* allow children to size/scroll within the grid */
    height: 100%;
    gap: 10px;
    z-index: 1;
}

/* --- Modal (Preview popup) --- */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 2000;
}

.modal.open {
    display: block;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 10%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.modal-dialog {
    position: absolute;
    inset: 5vh 5vw;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 26px 80px rgba(0,0,0,0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-weight: 700;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-height: 0;
    padding: 10px 20px;
    background: rgba(0,0,0,0.10);
}

.modal-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
}
#cancel-confirm-modal .modal-dialog {
    max-width: 400px;
    max-height: 200px;
    margin: auto;
    text-align: center;
}
#cancel-confirm-btn {
    background-color: rgb(236 108 108 / 30%);
    border: 1px solid rgb(236 108 108 / 30%);
}
#cancel-confirm-btn:hover {
    background-color: rgb(236 108 108 / 50%);
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}



/* Header */
header {
    grid-column: 1 / 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 56px;

    background: linear-gradient(180deg, rgba(18,20,28,0.72) 0%, rgba(18,20,28,0.50) 100%);
    box-shadow:0 2px 8px -2px rgba(0,0,0,.16);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 10;
}


body.theme-light header {
    background: var(--glass-bg);
}

header h1 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 10px;
}
.header-subtitle {
    color: var(--text-dim);
    font-weight: 500;
}
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;

    background: linear-gradient(180deg, rgba(47, 129, 255, 0.14) 0%, rgba(47, 129, 255, 0.06) 100%);
    color: var(--text-primary);
    font-weight: 800;
    border: 1px solid rgba(47, 129, 255, 0.28);
    box-shadow: 0 0 0 3px rgba(47, 129, 255, 0.08);
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-blue-2);
    box-shadow: 0 0 14px rgba(61, 214, 255, 0.55);
    animation: livePulse 2.5s infinite ease-in-out;
}

@keyframes livePulse {
    0% { transform: scale(0.85); opacity: 0.6; box-shadow: 0 0 0 0 rgba(61, 214, 255, 0.4); }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 12px 4px rgba(61, 214, 255, 0.2); }
    100% { transform: scale(0.85); opacity: 0.6; box-shadow: 0 0 0 0 rgba(61, 214, 255, 0.4); }
}

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

.icon-btn {
    background: rgba(255,255,255,0.02);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 11px;
    cursor: url(https://www.lovart.ai/assets/pointer-hand-mini.png) 0 0, auto;
    /*backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);*/
}
.icon-btn:active {
    cursor: url(https://www.lovart.ai/assets/pointer-active-mini.png) 0 0,auto
}

/* icon-only header buttons */
.icon-btn.icon-only {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.icon-btn.icon-only .icon {
    width: 16px;
    height: 16px;
    display: block;
}
.icon-btn.auth-btn {
    width: auto;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: none;
    padding: 3px;
    border-radius: 1rem;
}

body:not(.theme-light) .icon-btn.icon-only .light-icon {
    display: none;
}
body.theme-light .icon-btn.icon-only .dark-icon {
    display: none;
}

.icon-btn:hover {
    color: var(--text-primary);
    border-color: rgba(47, 129, 255, 0.28);
    box-shadow: 0 0 0 3px rgba(47, 129, 255, 0.10);
    background: rgba(255,255,255,0.03);
}


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Resizers */
.resizer {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: col-resize;
    z-index: 40;
}

body.resizing, body.resizing * {
    cursor: col-resize !important;
    transition: none !important;
    user-select: none !important;
}

.resizer-vertical {
    /* subtle grab handle */
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.03), transparent);
}
.resizer-vertical:hover {
    background: linear-gradient(to right, #63636357, rgb(131 131 131 / 50%), transparent);
}

#logs-resizer {
    left: -0px; /* straddle the border */
}

/* Preview (VSCode-ish) */
.preview {
    flex: 1;
    min-height: 0;
    background: transparent;
    border-top: none;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.preview-header {
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    font-size: 11px;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
body.theme-light .preview-header {
    border-bottom: 1px solid var(--border-color);
}

.preview-tabs {
    display: flex;
    align-items: stretch;
    gap: 1px;
}

.preview-tabs .tab {
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    height: 34px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 11px;
    cursor: url(https://www.lovart.ai/assets/pointer-hand-mini.png) 0 0, auto;
    border-right: 1px solid var(--border-color);

    font-weight: 800;
    letter-spacing: 0.08em;
}
.preview-tabs .tab:active {
    cursor: url(https://www.lovart.ai/assets/pointer-active-mini.png) 0 0,auto
}

.preview-tabs .tab.active {
    background: rgba(255,255,255,0.03);
}

.preview-tabs .tab-close {
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
}

.preview-tabs .tab:hover .tab-close { opacity: 1; }

.preview-title {
    font-weight: 800;
    letter-spacing: 0.08em;
}

.preview-editor {
    flex: 1;
    overflow: auto;
}

.preview-path {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 12px;
    flex: 1;
    text-align: right;
}

.preview-content {
    margin: 0;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
    overflow: visible; /* parent handles scroll */
    min-height: 100%;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Footer input */
footer {
    grid-row: 3 / 4;
    grid-column: 1 / 2;
    padding: 0 16px 16px 16px;
    display: flex;
    flex-direction: column;
    z-index: 20;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.input-container {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-toolbar {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    padding: 0 10px;
    box-sizing: border-box;
}

.input-toolbar-left, .input-toolbar-right {
    display: flex;
    align-items: center;
}

.input-toolbar-left {
    flex: 1;
}

.input-toolbar-right {
    gap: 20px;
    flex-shrink: 0;
}

.input-secondary-controls {
    display: flex;
    align-items: center;
    flex: 1;
}

#input-more-options-btn {
    display: none;
}

.mode-toggle-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    border-left: 1px solid var(--glass-border);
    padding-left: 12px;
    padding-right: 12px;
    height: 24px;
}

#design-mode-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 60px;
    cursor: pointer;
    user-select: none;
}

.model-select-wrap {
    margin-left: auto;
}

@media (max-width: 768px) {
    .input-toolbar {
        padding: 4px 10px;
    }

    #input-more-options-btn {
        display: flex;
        border-radius: 50%;
        background: var(--glass-bg-2);
        margin-left: 8px;
    }

    .input-secondary-controls {
        display: none;
        position: absolute;
        bottom: calc(100% + 12px);
        left: 10px;
        right: 10px;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg-color);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid var(--glass-border-strong);
        border-radius: 20px;
        padding: 16px;
        gap: 16px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.3);
        z-index: 100;
        animation: menuAppear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        transform-origin: bottom left;
    }

    .input-secondary-controls.open {
        display: flex;
        width: max-content;
    }

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

    .input-secondary-controls > * {
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
        border: none !important;
        padding: 0 !important;
    }

    .mode-toggle-group {
        height: auto;
        padding: 10px 0 !important;
        justify-content: space-between;
        border-top: 1px solid var(--glass-border);
        border-bottom: 1px solid var(--glass-border);
        align-items: baseline;
        justify-content: flex-start;
    }

    #design-mode-label {
        display: block;
        font-size: 13px;
    }

    #language-select {
        height: 40px;
        background-color: var(--glass-bg-2);
        border-radius: 12px !important;
        padding: 0 12px !important;
    }

    .model-select-wrap {
        margin: 0;
    }

    #model-select .combo-trigger {
        height: 44px;
        border-radius: 12px !important;
        padding: 0 12px !important;
    }

    /* Adjust model select popover for the new menu */
    #model-select .combo-popover {
        position: fixed !important;
        left: 20px !important;
        right: 20px !important;
        width: auto !important;
        bottom: 80px !important;
        top: auto !important;
    }
}

.input-pill {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-strong);
    border-radius: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* overflow: hidden; Removed to allow popups to overflow */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

/* Ensure model select popover opens upwards in the footer */
#model-select .combo-popover {
    top: auto;
    bottom: 100%;
    margin-bottom: 10px;
    max-height: 300px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
    transform-origin: bottom left;
}

/* Ensure model price tooltip opens upwards in the footer */
#model-price-tooltip {
    top: auto;
    bottom: 100%;
    margin-bottom: 10px;
    box-shadow: 0 -18px 60px rgba(0,0,0,0.55);
}

#model-price-tooltip::before {
    top: auto;
    bottom: -6px;
    border-top: none;
    border-left: none;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.input-inner-wrapper {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    padding: 8px 12px 8px 8px;
    gap: 4px;
}

#user-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
    padding: 10px 12px;
    min-height: 44px;
    /* Expanded max-height for better UX with multi-line input */
    max-height: 300px;
    resize: none;
    font-family: inherit;
    /* Ensure smooth textarea auto-resize UX */
    overflow-y: auto;
    box-sizing: border-box;
    width: 100%;
    display: block;
    height: auto;
}

#user-input::placeholder {
    color: var(--text-dim);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.send-btn.stop .send-icon {
    display: none;
}

.send-btn.stop .stop-icon {
    display: block !important;
}

.send-btn.stop {
    background: #ef4444;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.send-btn:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    cursor: not-allowed;
}

body.theme-light .send-btn:disabled {
    background: rgba(0, 0, 0, 0.05);
}

.send-btn .icon {
    width: 20px;
    height: 20px;
    transform: translateX(1px);
}

.input-hint {
    color: var(--text-dim);
    font-size: 11px;
    text-align: center;
    opacity: 0.6;
}

.prompt-char {
    color: var(--accent);
    font-weight: 900;
    margin-right: 10px;
    user-select: none;
}

textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    resize: none;
    /* Keep generic textarea rules from clamping the chat input.
       The chat input uses #user-input { max-height: 300px } and JS auto-resize.
       Using 'none' here avoids a fixed cap that can make the footer appear not to expand. */
    max-height: none;
    min-height: 24px;
    height: auto;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    line-height: 1.5;
    padding: 0;
    overflow-y: auto;
}

textarea:focus { outline: none; }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border: 3px solid transparent;
    background-clip: content-box;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--text-dim); }

body.theme-light ::-webkit-scrollbar-track { background: transparent; }
body.theme-light #messages::-webkit-scrollbar-thumb,
body.theme-light #logs::-webkit-scrollbar-thumb,
body.theme-light .explorer-body::-webkit-scrollbar-thumb,
body.theme-light .preview-editor::-webkit-scrollbar-thumb {
    background: rgba(104, 104, 104, 0.44);
    border: 2px solid transparent;
    background-clip: content-box;
}
body.theme-light #messages::-webkit-scrollbar-thumb:hover,
body.theme-light #logs::-webkit-scrollbar-thumb:hover,
body.theme-light .explorer-body::-webkit-scrollbar-thumb:hover,
body.theme-light .preview-editor::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-dim);
    background-clip: unset;
}

/* Drawer backdrop (mobile only) */
.drawer-backdrop {
    display: none;
}

@media (max-width: 768px) {
    .drawer-backdrop {
        position: fixed;
        inset: 40px 0 120px 0;
        background: rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(2px);
        z-index: 25;
        display: none;
        top: 0;
        bottom: 0;
    }

    body.panel-explorer-open .drawer-backdrop,
    body.panel-logs-open .drawer-backdrop {
        display: block;
    }
}

    /* --- COMMAND GROUP (Unified Ball Container) --- */
    .command-group {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: 10px;
    }

    .command-group > .minimized {
        position: static !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        border-radius: 50% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.2) !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255,255,255,0.15) !important;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), all 0.3s ease;
        z-index: 100 !important;
        transform: none !important;
        visibility: visible !important;
    }

    .command-group > .minimized.active {
        border-color: var(--accent-blue-2) !important;
        box-shadow: 0 0 12px var(--accent-blue-2), inset 0 2px 4px rgba(255,255,255,0.2) !important;
    }

    .command-group > .minimized:active {
        transform: scale(0.9);
    }

    /* Hide children when minimized in command-group */
    .command-group > .minimized:not(.mobile-fullscreen) .acc-header,
    .command-group > .minimized:not(.mobile-fullscreen) .acc-body, 
    .command-group > .minimized:not(.mobile-fullscreen) .scc-header,
    .command-group > .minimized:not(.mobile-fullscreen) .scc-body,
    .command-group > .minimized:not(.mobile-fullscreen) .apw-header,
    .command-group > .minimized:not(.mobile-fullscreen) .ide-layout,
    .command-group > .minimized:not(.mobile-fullscreen) .explorer-header-window,
    .command-group > .minimized:not(.mobile-fullscreen) .explorer-content,
    .command-group > .minimized:not(.mobile-fullscreen) .aw-header,
    .command-group > .minimized:not(.mobile-fullscreen) .aw-body,
    .command-group > .minimized:not(.mobile-fullscreen) .aw-resize-handle {
        display: none !important;
    }

@media (max-width: 768px) {
    #command-group {
        margin-left: 6px;
    }

    /* Fullscreen state when clicked in mobile */
    .mobile-fullscreen {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0 !important;
        z-index: 10000 !important;
        cursor: default;
        display: flex !important;
        flex-direction: column !important;
        background: var(--bg-color) !important;
        animation: sphereExpand 0.25s cubic-bezier(0.23, 1, 0.32, 1) forwards !important;
        will-change: transform, opacity;
    }

    @keyframes sphereExpand {
        from { transform: scale(0.6); opacity: 0; }
        to { transform: scale(1); opacity: 1; }
    }

    /* Show children when in fullscreen */
    .mobile-fullscreen .acc-header,
    .mobile-fullscreen .acc-body, 
    .mobile-fullscreen .scc-header,
    .mobile-fullscreen .scc-body,
    .mobile-fullscreen .apw-header,
    .mobile-fullscreen .ide-layout,
    .mobile-fullscreen .explorer-header-window,
    .mobile-fullscreen .explorer-content,
    .mobile-fullscreen .aw-header,
    .mobile-fullscreen .aw-body {
        display: flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .mobile-fullscreen::before {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    #app {
        grid-template-columns: 240px 1fr;
        grid-template-rows: auto 1fr auto;
    }

    #log-panel {
        grid-row: 3 / 4;
        grid-column: 1 / 4;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }

    footer {
        grid-row: 4 / 5;
        grid-column: 1 / 4;
    }

    /* Keep status readable on tighter footer */
    .request-status {
        padding: 6px 10px;
    }
    .request-status .rs-text { font-size: 11px; }
}

@media (max-width: 768px) {
    .site-name {
        display: none;
    }
    .auth-username {
        display: none;
    }
    #explorer-toggle, #logs-toggle {
        display: none;
    }
    #app {
        padding: 0;
        gap: 0;
    }
    header, #chat-container, footer {
        border-radius: 0 !important;
        border: none !important;
    }
    #chat-container {
        background: unset !important;
    }
    #center-panel {
        grid-column: 1 / 4;
    }
    /* Side panel explorer - disabled in favor of sphere mode on mobile to prevent flickering */
    #explorer:not(.mobile-fullscreen) {
        display: none;
    }
    body.panel-explorer-open #explorer {
        display: flex !important;
        position: fixed !important;
        z-index: 30;
        width: min(92vw, 850px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.45);
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(0);
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        transition: transform 0.3s ease;
    }
    body.panel-logs-open #log-panel { transform: translateX(0); }
    #chat-container {
        grid-row: 1 / 3;
        grid-column: 1 / 2;
        border-right: none;
        padding: 0 10px;
        border-radius: unset;
    }
    footer {
        grid-row: 3 / 4;
        grid-column: 1 / 4;
        padding: 12px;
        height: auto;
        min-height: auto;
        padding: 0;
    }
    #input-hint {
        display: none;
    }
    .input-pill {
        border-bottom-right-radius: unset;
        border-bottom-left-radius: unset;
    }
}

.glass-card {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
body.theme-light .glass-card {
    background: linear-gradient(136deg, rgb(255 255 255 / 92%) 0px, rgb(255 255 255 / 0%) 97%, rgb(255 255 255 / 90%) 100%) !important;
}
.delay-1 {
    animation-delay: 0.2s !important;
}
.delay-2 {
    animation-delay: 0.4s !important;
}
.delay-3 {
    animation-delay: 0.6s !important;
}
.delay-4 {
    animation-delay: 0.8s !important;
}
.delay-5 {
    animation-delay: 1.0s !important;
}
.fade-in {
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

