
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    color-scheme: dark;
    --bg: #0b0d12;
    --sidebar: #0f1118;
    --panel: #141720;
    --panel-hover: #1b1f2b;
    --border: rgba(255,255,255,.08);
    --text: #f1f4fc;
    --muted: #8c93a5;
    --blue: #6588ff;
    --blue-bright: #82a0ff;
    --blue-soft: rgba(101,136,255,.13);
    --green: #5ddeae;
    --shadow: 0 20px 60px rgba(0,0,0,.24);
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

button, textarea, input {
    font: inherit;
}

button {
    color: inherit;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

button:not(:disabled) {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.app-shell {
    display: flex;
    width: 100%;
    height: 100dvh;
    min-height: 500px;
    overflow: hidden;
}

/* SIDEBAR */

.sidebar {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 268px;
    height: 100%;
    padding: 22px 15px 15px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 4px 29px;
}

.brand {
    display: flex;
    gap: 11px;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(130,160,255,.4);
    border-radius: 14px;
    background: linear-gradient(145deg, #7494ff, #3a56c9);
    box-shadow: 0 5px 24px rgba(80,109,255,.25);
    color: white;
    font-family: "Space Grotesk", sans-serif;
    font-size: 24px;
    font-weight: 700;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.7px;
}

.brand-caption {
    color: var(--muted);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.55px;
}

.new-chat-button {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(113,145,255,.23);
    border-radius: 12px;
    background: linear-gradient(110deg, rgba(90,121,245,.18), rgba(90,121,245,.06));
    text-align: left;
    transition: background .2s, border-color .2s, transform .2s;
}

.new-chat-button:hover {
    background: rgba(101,136,255,.2);
    border-color: rgba(113,145,255,.5);
    transform: translateY(-1px);
}

.new-chat-icon {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 8px;
    background: rgba(101,136,255,.18);
    color: var(--blue-bright);
    font-size: 20px;
}

.shortcut {
    margin-left: auto;
    color: var(--muted);
    font-size: 10px;
}

.sidebar-section {
    flex: 1;
    min-height: 0;
    margin-top: 34px;
    overflow: hidden;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 9px 14px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.section-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--blue);
}

.chat-history {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 100%;
    overflow-y: auto;
}

.history-empty {
    padding: 13px 9px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    text-align: left;
    transition: background .2s, color .2s;
}

.history-item:hover,
.history-item.active {
    background: var(--panel-hover);
    color: var(--text);
}

.history-item.active {
    border-color: var(--border);
}

.history-item-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-icon {
    color: var(--muted);
    font-size: 14px;
}

.delete-chat-button {
    flex-shrink: 0;
    width: 27px;
    height: 27px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    opacity: 0;
    font-size: 16px;
}

.history-item:hover .delete-chat-button,
.history-item:focus-within .delete-chat-button {
    opacity: 1;
}

.delete-chat-button:hover {
    background: rgba(255,100,100,.12);
    color: #ff8585;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.local-note {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 9px;
    padding: 12px 9px;
    border-radius: 10px;
    background: rgba(255,255,255,.025);
}

.status-indicator,
.online-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 12px rgba(93,222,174,.5);
}

.local-note strong {
    font-size: 12px;
    font-weight: 600;
}

.local-note p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.sidebar-action {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 11px 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    text-align: left;
    transition: background .2s, color .2s;
}

.sidebar-action:hover {
    background: var(--panel-hover);
    color: var(--text);
}

.action-icon {
    display: inline-grid;
    width: 20px;
    place-items: center;
    font-size: 17px;
}

/* MAIN AREA */

.main-area {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 53% 28%, rgba(57,78,150,.055), transparent 48%),
        var(--bg);
}

.topbar {
    position: relative;
    z-index: 5;
    display: flex;
    flex-shrink: 0;
    height: 70px;
    align-items: center;
    justify-content: space-between;
    padding: 0 29px;
    border-bottom: 1px solid var(--border);
    background: rgba(11,13,18,.7);
    backdrop-filter: blur(15px);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 13px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.model-label {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-family: "DM Sans", sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .7px;
}

.privacy-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}

.privacy-icon {
    color: var(--green);
    font-size: 16px;
}

.icon-button {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    transition: background .2s, color .2s;
}

.icon-button:hover {
    border-color: var(--border);
    background: var(--panel-hover);
    color: var(--text);
}

.mobile-menu,
.sidebar-close {
    display: none;
}

/* WELCOME SCREEN */

.welcome-screen {
    display: flex;
    flex: 1;
    min-height: 0;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 34px 28px 30px;
}

.welcome-content {
    width: 100%;
    max-width: 750px;
    margin: auto;
    text-align: center;
    animation: rise-in .55s ease both;
}

.welcome-emblem {
    position: relative;
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    margin: 0 auto 26px;
}

.emblem-core {
    z-index: 2;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid rgba(145,169,255,.75);
    border-radius: 18px;
    background: linear-gradient(145deg, #6c8cff, #344ec0);
    box-shadow: 0 0 38px rgba(91,120,255,.27);
    color: white;
    font-family: "Space Grotesk", sans-serif;
    font-size: 29px;
    font-weight: 700;
}

.emblem-orbit {
    position: absolute;
    width: 70px;
    height: 70px;
    border: 1px solid rgba(101,136,255,.25);
    border-radius: 23px;
    transform: rotate(25deg);
}

.orbit-two {
    width: 61px;
    height: 61px;
    border-color: rgba(101,136,255,.12);
    transform: rotate(55deg);
}

.eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--blue-bright);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.eyebrow-line {
    width: 23px;
    height: 1px;
    background: rgba(130,160,255,.45);
}

.welcome-content h1 {
    margin: 17px 0 14px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(39px, 5vw, 57px);
    font-weight: 600;
    line-height: 1.11;
    letter-spacing: -2.6px;
}

.welcome-content h1 span {
    color: var(--blue-bright);
}

.welcome-description {
    max-width: 470px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.suggestion-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 35px;
    text-align: left;
}

.suggestion-card {
    position: relative;
    display: flex;
    min-height: 132px;
    flex-direction: column;
    align-items: flex-start;
    padding: 17px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,.018);
    text-align: left;
    transition: border-color .2s, background .2s, transform .2s;
}

.suggestion-card:hover {
    transform: translateY(-3px);
    border-color: rgba(117,146,255,.35);
    background: rgba(101,136,255,.06);
}

.suggestion-icon {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 9px;
    font-size: 17px;
}

.icon-blue {
    background: rgba(101,136,255,.15);
    color: #91aaff;
}

.icon-purple {
    background: rgba(178,120,255,.14);
    color: #c6a2ff;
}

.icon-orange {
    background: rgba(255,170,90,.13);
    color: #ffbd81;
}

.icon-green {
    background: rgba(93,222,174,.12);
    color: #6de5b6;
}

.suggestion-title {
    font-size: 13px;
    font-weight: 600;
}

.suggestion-description {
    max-width: 240px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.suggestion-arrow {
    position: absolute;
    top: 18px;
    right: 17px;
    color: var(--muted);
    font-size: 15px;
    transition: color .2s, transform .2s;
}

.suggestion-card:hover .suggestion-arrow {
    transform: translate(2px, -2px);
    color: var(--blue-bright);
}

/* CHAT MESSAGES */

.conversation {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    padding: 36px 28px 24px;
}

.message-row {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    width: 100%;
    animation: rise-in .22s ease both;
}

.message-avatar {
    display: grid;
    width: 31px;
    height: 31px;
    flex-shrink: 0;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--blue-bright);
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.message-row.user .message-avatar {
    border-color: rgba(101,136,255,.28);
    background: var(--blue-soft);
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-author {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 30px;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 700;
}

.message-time {
    color: var(--muted);
    font-size: 10px;
    font-weight: 400;
}

.message-bubble {
    color: var(--text);
    font-size: 14px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.message-row.user .message-bubble {
    display: inline-block;
    max-width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(101,136,255,.16);
    border-radius: 4px 14px 14px 14px;
    background: rgba(101,136,255,.09);
}

.message-bubble p {
    margin: 0 0 12px;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.message-bubble ul,
.message-bubble ol {
    padding-left: 24px;
}

.message-bubble li {
    margin: 5px 0;
}

.message-bubble h1,
.message-bubble h2,
.message-bubble h3 {
    margin: 18px 0 8px;
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.4;
}

.message-bubble h1 {
    font-size: 23px;
}

.message-bubble h2 {
    font-size: 19px;
}

.message-bubble h3 {
    font-size: 16px;
}

.message-bubble blockquote {
    margin: 12px 0;
    padding: 3px 0 3px 14px;
    border-left: 3px solid var(--blue);
    color: var(--muted);
}

.message-bubble code {
    padding: 2px 5px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--panel);
    font-family: Consolas, monospace;
    font-size: .9em;
}

.message-bubble pre {
    overflow-x: auto;
    margin: 12px 0;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #090b10;
    line-height: 1.65;
}

.message-bubble pre code {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
}

.message-bubble a {
    color: var(--blue-bright);
    overflow-wrap: anywhere;
}

.message-image {
    display: block;
    width: auto;
    max-width: min(100%, 340px);
    max-height: 320px;
    margin: 8px 0 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    object-fit: contain;
}

.message-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.message-action-button {
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    transition: background .2s, color .2s;
}

.message-action-button:hover {
    border-color: var(--border);
    background: var(--panel);
    color: var(--text);
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue-bright);
    animation: typing-bounce 1.1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: .13s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: .26s;
}

.conversation-end {
    height: 15px;
}

/* COMPOSER */

.composer-area {
    position: relative;
    z-index: 5;
    flex-shrink: 0;
    padding: 12px 25px 16px;
    background: linear-gradient(to top, var(--bg) 76%, transparent);
}

.composer-wrap {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

.composer {
    display: flex;
    align-items: flex-end;
    gap: 11px;
    width: 100%;
    min-height: 69px;
    padding: 11px 12px;
    border: 1px solid rgba(140,155,195,.2);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 8px 34px rgba(0,0,0,.16);
    transition: border-color .2s, box-shadow .2s;
}

.composer:focus-within {
    border-color: rgba(101,136,255,.65);
    box-shadow: 0 0 0 3px rgba(101,136,255,.07);
}

.attach-button {
    display: grid;
    width: 37px;
    height: 37px;
    flex-shrink: 0;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    font-size: 25px;
    transition: background .2s, color .2s, border-color .2s;
}

.attach-button:hover {
    border-color: rgba(101,136,255,.4);
    background: var(--blue-soft);
    color: var(--blue-bright);
}

.composer-input-area {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
    padding: 2px 0;
}

.composer textarea {
    width: 100%;
    min-height: 26px;
    max-height: 170px;
    resize: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    line-height: 1.65;
}

.composer textarea::placeholder {
    color: var(--muted);
}

.composer textarea:focus-visible {
    outline: none;
}

.composer-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 9px;
}

.hint-key {
    display: grid;
    width: 15px;
    height: 15px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
}

.hint-separator {
    margin: 0 2px;
}

.send-button {
    display: grid;
    width: 39px;
    height: 39px;
    flex-shrink: 0;
    place-items: center;
    border: 1px solid rgba(130,160,255,.3);
    border-radius: 12px;
    background: linear-gradient(145deg, #7896ff, #4f6ee3);
    color: white;
    box-shadow: 0 3px 15px rgba(79,110,227,.2);
    transition: transform .2s, filter .2s, opacity .2s;
}

.send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.send-arrow {
    font-size: 23px;
    line-height: 1;
}

.composer-disclaimer {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

/* IMAGE ATTACHMENT PREVIEW */

.attachment-preview {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 10px;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--panel);
}

.preview-image-wrap {
    position: relative;
    width: 62px;
    height: 62px;
    flex-shrink: 0;
}

.preview-image-wrap img {
    width: 100%;
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 9px;
    object-fit: cover;
}

.remove-image-button {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--panel-hover);
    color: var(--text);
    font-size: 11px;
}

.remove-image-button:hover {
    background: #822e3b;
}

.preview-file-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.preview-file-info strong {
    font-size: 12px;
    font-weight: 600;
}

.preview-file-info span {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* LIGHT THEME */

body[data-theme="light"] {
    color-scheme: light;
    --bg: #f5f7fc;
    --sidebar: #ffffff;
    --panel: #ffffff;
    --panel-hover: #edf1f9;
    --border: rgba(31,44,75,.1);
    --text: #182034;
    --muted: #737d93;
    --blue: #4969e8;
    --blue-bright: #4969e8;
    --blue-soft: rgba(73,105,232,.1);
    --green: #159768;
    --shadow: 0 15px 45px rgba(24,36,70,.08);
}

body[data-theme="light"] .main-area {
    background: radial-gradient(ellipse at 53% 28%, rgba(75,112,230,.055), transparent 48%), var(--bg);
}

body[data-theme="light"] .topbar {
    background: rgba(245,247,252,.85);
}

body[data-theme="light"] .composer-area {
    background: linear-gradient(to top, var(--bg) 76%, transparent);
}

body[data-theme="light"] .suggestion-card {
    background: rgba(255,255,255,.8);
}

body[data-theme="light"] .suggestion-card:hover {
    background: #fff;
}

body[data-theme="light"] .message-bubble pre {
    background: #edf0f7;
}

body[data-theme="light"] .message-bubble code {
    background: #edf0f7;
}

body[data-theme="light"] .welcome-content h1 span {
    color: #4969e8;
}

/* SCROLLBARS */

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(130,145,180,.22) transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: rgba(130,145,180,.22);
}

/* ANIMATIONS */

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(9px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        opacity: .45;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-5px);
    }
}

/* RESPONSIVE LAYOUT */

@media (max-width: 900px) {
    .sidebar {
        width: 245px;
    }

    .topbar {
        padding: 0 20px;
    }

    .welcome-screen {
        padding-right: 22px;
        padding-left: 22px;
    }

    .composer-area {
        padding-right: 18px;
        padding-left: 18px;
    }
}

@media (max-width: 650px) {
    .app-shell {
        min-height: 440px;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(285px, 85vw);
        transform: translateX(-105%);
        transition: transform .25s ease;
        box-shadow: var(--shadow);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-close {
        display: grid;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 40;
        display: none;
        background: rgba(0,0,0,.53);
        backdrop-filter: blur(2px);
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
    }

    .mobile-menu {
        display: grid;
    }

    .topbar {
        height: 60px;
        padding: 0 13px;
    }

    .topbar-left {
        gap: 8px;
    }

    .page-title {
        gap: 7px;
        font-size: 15px;
    }

    .model-label {
        padding: 4px 5px;
        font-size: 8px;
    }

    .privacy-label {
        gap: 4px;
        font-size: 10px;
    }

    .welcome-screen {
        padding: 30px 15px 25px;
    }

    .welcome-emblem {
        margin-bottom: 21px;
        transform: scale(.9);
    }

    .welcome-content h1 {
        margin-top: 15px;
        font-size: clamp(38px, 10vw, 48px);
        letter-spacing: -1.8px;
    }

    .welcome-description {
        max-width: 350px;
        font-size: 12px;
    }

    .suggestion-grid {
        gap: 9px;
        margin-top: 25px;
    }

    .suggestion-card {
        min-height: 133px;
        padding: 12px;
    }

    .suggestion-title {
        font-size: 12px;
    }

    .suggestion-description {
        font-size: 10px;
    }

    .suggestion-arrow {
        top: 13px;
        right: 12px;
    }

    .composer-area {
        padding: 9px 10px 12px;
    }

    .composer {
        gap: 8px;
        min-height: 60px;
        padding: 9px;
        border-radius: 15px;
    }

    .attach-button {
        width: 34px;
        height: 36px;
    }

    .send-button {
        width: 36px;
        height: 36px;
    }

    .composer-hint {
        font-size: 8px;
    }

    .composer-disclaimer {
        font-size: 9px;
    }

    .messages {
        gap: 22px;
        padding: 23px 14px 18px;
    }

    .message-row {
        gap: 9px;
    }

    .message-avatar {
        width: 29px;
        height: 29px;
    }

    .message-bubble {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .privacy-label {
        font-size: 0;
    }

    .privacy-icon {
        font-size: 16px;
    }

    .eyebrow {
        gap: 6px;
        font-size: 8px;
        letter-spacing: 1.5px;
    }

    .eyebrow-line {
        width: 14px;
    }

    .suggestion-card {
        min-height: 140px;
    }

    .hint-separator,
    .hint-separator ~ span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
.history-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.history-open-button {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.history-open-button:hover {
    color: var(--text);
}

/* NavAI Creator Credit */
.creator-credit {
    margin: 12px 0 4px;
    text-align: center;
    color: #9aa3b2;
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: 0.2px;
}

.creator-credit strong {
    color: #d5b8ff;
    font-weight: 600;
}


/* NavAI custom phoenix brand icon */
.brand-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.sidebar-signature {
    margin-top: 10px;
    padding: 12px 9px 4px;
    color: var(--text-muted, #8b95a7);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    text-align: center;
}


/* NAVAI PREMIUM RESPONSIVE DESIGN V2 */
:root {
    --navai-cyan: #48e1ff;
    --navai-blue: #6b8cff;
    --navai-glow: rgba(56, 207, 255, .16);
}

/* Subtle depth and polished surfaces */
.app-shell {
    background-color: #090b12;
}

body:not([data-theme="light"]) .sidebar {
    background:
        radial-gradient(ellipse at 0% 0%, rgba(47, 111, 171, .13), transparent 55%),
        linear-gradient(180deg, #10141e 0%, #0b0e16 100%);
    border-right: 1px solid rgba(139, 164, 204, .14);
}

.sidebar-top {
    padding-bottom: 18px;
}

.brand {
    border-radius: 15px;
    transition: background .22s ease, transform .22s ease;
}

.brand:hover {
    background: rgba(91, 178, 255, .07);
}

.brand-icon {
    overflow: hidden;
    border: 1px solid rgba(72, 225, 255, .28);
    box-shadow: 0 0 22px rgba(30, 190, 255, .12);
}

.brand-name {
    letter-spacing: -.45px;
}

.sidebar-section {
    min-height: 0;
}

.section-heading {
    letter-spacing: 1.25px;
}

.sidebar-action,
.new-chat-button,
.icon-button,
.message-action-button,
.send-button {
    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.new-chat-button {
    border: 1px solid rgba(72, 225, 255, .2);
    box-shadow: inset 0 1px rgba(255,255,255,.035);
}

.new-chat-button:hover {
    border-color: rgba(72, 225, 255, .55);
    box-shadow: 0 0 22px rgba(37, 193, 255, .1);
    transform: translateY(-1px);
}

.sidebar-action {
    border: 1px solid transparent;
}

.sidebar-action:hover {
    border-color: rgba(120, 168, 230, .16);
    background: rgba(103, 154, 220, .09);
}

.sidebar-signature {
    border-top: 1px solid rgba(139, 164, 204, .12);
    letter-spacing: .65px;
}

/* Chat canvas */
body:not([data-theme="light"]) .main-area {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(36, 100, 168, .09), transparent 48%),
        #0b0d13;
}

.message-bubble {
    border-radius: 17px;
    line-height: 1.72;
    overflow-wrap: anywhere;
}

.message-row.user .message-bubble {
    border: 1px solid rgba(104, 148, 255, .19);
    box-shadow: 0 5px 20px rgba(0, 0, 0, .09);
}

.message-avatar {
    border: 1px solid rgba(113, 172, 255, .18);
}

.message-action-button:hover,
.icon-button:hover {
    box-shadow: 0 0 16px rgba(72, 225, 255, .09);
}

.message-bubble pre {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(129, 164, 214, .17);
    border-radius: 13px;
}

.message-bubble a {
    text-underline-offset: 3px;
}

/* Input area: refined glass panel */
.composer-area {
    background: linear-gradient(
        180deg,
        rgba(11, 13, 19, 0),
        rgba(11, 13, 19, .94) 22%
    );
}

.composer {
    border: 1px solid rgba(133, 159, 202, .22);
    border-radius: 22px;
    background: rgba(19, 23, 34, .92);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, .18),
        inset 0 1px rgba(255, 255, 255, .035);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.composer:focus-within {
    border-color: rgba(72, 225, 255, .55);
    box-shadow:
        0 0 0 3px rgba(72, 225, 255, .055),
        0 12px 38px rgba(0, 0, 0, .2);
}

.send-button {
    box-shadow: 0 4px 16px rgba(55, 174, 255, .16);
}

.send-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(55, 174, 255, .25);
}

.composer-disclaimer {
    opacity: .76;
}

/* Light theme remains readable */
body[data-theme="light"] .main-area {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(85, 163, 255, .07), transparent 50%),
        #f8faff;
}

body[data-theme="light"] .sidebar {
    background:
        radial-gradient(ellipse at 0% 0%, rgba(77, 157, 255, .08), transparent 55%),
        #ffffff;
}

body[data-theme="light"] .composer {
    background: rgba(255, 255, 255, .96);
    border-color: rgba(72, 105, 160, .22);
    box-shadow: 0 10px 34px rgba(36, 63, 107, .09);
}

body[data-theme="light"] .composer-area {
    background: linear-gradient(180deg, rgba(248, 250, 255, 0), #f8faff 28%);
}

body[data-theme="light"] .brand-icon {
    box-shadow: 0 3px 16px rgba(30, 130, 200, .12);
}

/* Laptop and tablet spacing */
@media (min-width: 901px) {
    .sidebar {
        box-shadow: 8px 0 30px rgba(0, 0, 0, .055);
    }

    .messages {
        scroll-padding-block: 24px;
    }

    .composer-wrap {
        padding-top: 12px;
    }
}

/* Mobile: compact, touch-friendly, no horizontal overflow */
@media (max-width: 650px) {
    .sidebar {
        box-shadow: 18px 0 48px rgba(0, 0, 0, .24);
    }

    .sidebar-action,
    .new-chat-button {
        min-height: 44px;
    }

    .brand {
        min-height: 44px;
    }

    .messages {
        padding-top: 14px;
        padding-bottom: 16px;
    }

    .message-bubble {
        max-width: 100%;
        border-radius: 16px;
        font-size: 15px;
        line-height: 1.68;
    }

    .composer-area {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }

    .composer {
        border-radius: 19px;
    }

    .composer textarea {
        font-size: 16px;
    }

    .send-button {
        min-width: 42px;
        min-height: 42px;
    }

    .message-bubble pre {
        max-width: 100%;
    }

    .sidebar-signature {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand,
    .new-chat-button,
    .sidebar-action,
    .icon-button,
    .message-action-button,
    .send-button {
        transition: none;
    }
}
/* Remove the temporary floating Study Mode button */
#navai-study-toggle {
    display: none !important;
}

/* ==========================================
   NavAI Premium Sidebar — visual enhancement
   ========================================== */

.sidebar {
    width: 276px;
    padding: 19px 13px 13px;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(81,105,230,.10), transparent 48%),
        #0b0d14;
    border-right: 1px solid rgba(142,158,255,.12);
    box-shadow: 8px 0 35px rgba(0,0,0,.12);
    transition: width .25s ease, background .25s ease;
}

.sidebar-top {
    margin: 0 3px 23px;
    min-height: 43px;
}

.brand {
    gap: 10px;
    transition: opacity .2s ease;
}

.brand:hover {
    opacity: .88;
}

.brand-icon {
    width: 39px;
    height: 39px;
    border-radius: 13px;
    box-shadow: 0 0 24px rgba(91,120,255,.24);
}

.brand-name {
    font-size: 22px;
    letter-spacing: -.8px;
}

.brand-caption {
    font-size: 8px;
    letter-spacing: 1.35px;
}

.new-chat-button {
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid rgba(120,145,255,.25);
    border-radius: 12px;
    background: linear-gradient(
        110deg,
        rgba(94,120,255,.17),
        rgba(124,82,255,.08)
    );
    box-shadow: inset 0 1px rgba(255,255,255,.035);
}

.new-chat-button:hover {
    border-color: rgba(132,154,255,.52);
    background: linear-gradient(
        110deg,
        rgba(94,120,255,.25),
        rgba(124,82,255,.13)
    );
    box-shadow: 0 5px 22px rgba(65,85,190,.12);
}

.new-chat-icon {
    width: 27px;
    height: 27px;
    border-radius: 9px;
}

.sidebar-section {
    margin-top: 27px;
}

.section-heading {
    margin: 0 10px 11px;
    font-size: 9px;
    letter-spacing: 1.5px;
}

.section-dot {
    box-shadow: 0 0 10px rgba(101,136,255,.6);
}

.chat-history {
    gap: 3px;
    padding-right: 2px;
}

.history-item {
    min-height: 39px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #a1a8bb;
    transition:
        background .18s ease,
        border-color .18s ease,
        color .18s ease;
}

.history-item:hover {
    background: rgba(255,255,255,.045);
    border-color: rgba(255,255,255,.045);
    color: #f0f2ff;
}

.history-item.active {
    background: linear-gradient(
        100deg,
        rgba(94,120,255,.15),
        rgba(94,120,255,.055)
    );
    border-color: rgba(112,139,255,.16);
    color: #f4f5ff;
}

.history-item-title {
    font-size: 12px;
}

.history-item-icon {
    color: #929dc6;
}

.delete-chat-button {
    border-radius: 8px;
}

.sidebar-bottom {
    gap: 4px;
    padding-top: 12px;
    border-top-color: rgba(255,255,255,.075);
}

.local-note {
    margin-bottom: 7px;
    padding: 12px 10px;
    border: 1px solid rgba(255,255,255,.045);
    border-radius: 12px;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,.035),
        rgba(255,255,255,.012)
    );
}

.status-indicator {
    box-shadow: 0 0 11px rgba(93,222,174,.4);
}

.sidebar-action {
    min-height: 39px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #a0a6b9;
}

.sidebar-action:hover {
    background: rgba(255,255,255,.055);
    border-color: rgba(255,255,255,.045);
    color: #f5f6ff;
}

.action-icon {
    color: #aab7ff;
}

.sidebar-signature {
    margin-top: 7px;
    padding: 12px 10px 3px;
    border-top: 1px solid rgba(255,255,255,.045);
    color: #8e96ae;
    letter-spacing: .2px;
}

.chat-history::-webkit-scrollbar {
    width: 4px;
}

.chat-history::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(140,155,220,.24);
}

.sidebar-overlay {
    backdrop-filter: blur(5px);
}

@media (max-width: 760px) {
    .sidebar {
        width: min(290px, 86vw);
        padding: 17px 12px 12px;
    }

    .sidebar-top {
        margin-bottom: 20px;
    }

    .new-chat-button {
        min-height: 45px;
    }

    .sidebar-action {
        min-height: 43px;
    }
}


/* =====================================
   NavAI — Obsidian Neon theme
   Cyan + Emerald + Deep Black
   ===================================== */

:root {
    --navai-neon: #38e8ff;
    --navai-neon-soft: rgba(56,232,255,.13);
    --navai-green: #55f5b0;
    --navai-bg: #080b10;
    --navai-panel: #0c1119;
    --navai-border: rgba(91,224,255,.16);
}

/* Global background and text */
body {
    background-color: var(--navai-bg);
    color: #edf8ff;
}

.sidebar {
    background:
        radial-gradient(ellipse at 0% 0%, rgba(0,205,255,.12), transparent 43%),
        radial-gradient(ellipse at 100% 100%, rgba(43,255,168,.055), transparent 42%),
        #080b10 !important;
    border-right: 1px solid var(--navai-border) !important;
    box-shadow: 8px 0 36px rgba(0,0,0,.24);
}

/* NavAI brand */
.brand-name {
    color: #f3fcff;
    text-shadow: 0 0 20px rgba(56,232,255,.16);
}

.brand-icon {
    border: 1px solid rgba(56,232,255,.4);
    box-shadow:
        0 0 12px rgba(56,232,255,.17),
        0 0 32px rgba(56,232,255,.09);
}

/* New Chat */
.new-chat-button {
    background: linear-gradient(
        110deg,
        rgba(56,232,255,.16),
        rgba(85,245,176,.075)
    ) !important;
    border: 1px solid rgba(56,232,255,.32) !important;
    color: #eaffff !important;
    box-shadow: inset 0 1px rgba(255,255,255,.055);
}

.new-chat-button:hover {
    background: linear-gradient(
        110deg,
        rgba(56,232,255,.25),
        rgba(85,245,176,.14)
    ) !important;
    border-color: rgba(56,232,255,.65) !important;
    box-shadow: 0 0 23px rgba(56,232,255,.12);
}

.new-chat-icon {
    background: rgba(56,232,255,.13);
    color: var(--navai-neon);
}

/* Sidebar headings */
.section-heading {
    color: #6e8c9b !important;
    letter-spacing: 1.8px;
}

.section-dot {
    background: var(--navai-green) !important;
    box-shadow: 0 0 9px rgba(85,245,176,.65);
}

/* Chat history */
.history-item {
    color: #9aabbc !important;
    border-color: transparent !important;
    transition: all .2s ease;
}

.history-item:hover {
    color: #effcff !important;
    background: rgba(56,232,255,.055) !important;
    border-color: rgba(56,232,255,.12) !important;
}

.history-item.active {
    color: #f1fdff !important;
    background: linear-gradient(
        100deg,
        rgba(56,232,255,.12),
        rgba(85,245,176,.045)
    ) !important;
    border-color: rgba(56,232,255,.22) !important;
    box-shadow: inset 2px 0 var(--navai-neon);
}

.history-item-icon,
.action-icon {
    color: var(--navai-neon) !important;
}

/* Sidebar actions */
.sidebar-action {
    color: #a3b3c2 !important;
    border-color: transparent !important;
}

.sidebar-action:hover {
    color: #f0fdff !important;
    background: rgba(56,232,255,.065) !important;
    border-color: rgba(56,232,255,.13) !important;
}

/* Bottom status card */
.local-note {
    background: linear-gradient(
        125deg,
        rgba(56,232,255,.075),
        rgba(85,245,176,.035)
    ) !important;
    border: 1px solid rgba(56,232,255,.13) !important;
    border-radius: 13px;
}

.status-indicator {
    background: var(--navai-green) !important;
    box-shadow: 0 0 10px rgba(85,245,176,.55);
}

.sidebar-bottom {
    border-top-color: rgba(56,232,255,.12) !important;
}

.sidebar-signature {
    color: #607989 !important;
    border-top-color: rgba(56,232,255,.09) !important;
}

/* Main chat area */
.chat-container,
.chat-main,
.main-content {
    background-color: var(--navai-bg);
}

textarea,
input {
    accent-color: var(--navai-neon);
}

::selection {
    color: #041015;
    background: rgba(56,232,255,.7);
}

/* Subtle scrollbar */
.chat-history::-webkit-scrollbar-thumb {
    background: rgba(56,232,255,.22);
}

.chat-history::-webkit-scrollbar-thumb:hover {
    background: rgba(56,232,255,.45);
}

/* Mobile */
@media (max-width: 760px) {
    .sidebar {
        box-shadow: 12px 0 40px rgba(0,0,0,.4);
    }
}



/* NAVAI PREMIUM TOOLS POPUP */
.composer-wrap {
    position: relative;
}

.navai-tools-menu {
    position: absolute;
    z-index: 100;
    left: 0;
    bottom: 92px;
    width: min(330px, calc(100vw - 48px));
    padding: 10px;
    border: 1px solid rgba(130, 160, 255, .23);
    border-radius: 19px;
    background: rgba(13, 17, 30, .97);
    box-shadow: 0 20px 65px rgba(0, 0, 0, .48),
                0 0 28px rgba(56, 232, 255, .07);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(9px) scale(.98);
    transform-origin: bottom left;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.navai-tools-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.navai-tools-heading {
    padding: 8px 10px 10px;
    color: #8793ac;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.navai-tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 59px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #edf3ff;
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}

button.navai-tool-item:hover {
    background: rgba(100, 125, 190, .13);
    border-color: rgba(120, 155, 255, .16);
}

.navai-tool-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    height: 38px;
    border: 1px solid rgba(100, 150, 255, .2);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(56, 232, 255, .12), rgba(130, 90, 255, .15));
    color: #70eaff;
    font-size: 22px;
}

.navai-tool-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.navai-tool-copy strong {
    color: #f0f4ff;
    font-size: 13px;
    font-weight: 650;
}

.navai-tool-copy small {
    color: #929db5;
    font-size: 11px;
    line-height: 1.4;
}

.navai-tool-status {
    padding: 4px 7px;
    border: 1px solid rgba(150, 160, 185, .22);
    border-radius: 7px;
    color: #a5aec1;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .6px;
}

.navai-tools-menu.study-enabled [data-tool="study"] {
    background: rgba(56, 232, 255, .08);
    border-color: rgba(56, 232, 255, .25);
}

.navai-tools-menu.study-enabled .navai-tool-status {
    color: #62f3b8;
    border-color: rgba(98, 243, 184, .35);
}

.navai-tool-disabled {
    opacity: .55;
    cursor: default;
}

.navai-mode-notice {
    position: absolute;
    left: 48px;
    bottom: 83px;
    z-index: 101;
    padding: 9px 13px;
    border: 1px solid rgba(56, 232, 255, .22);
    border-radius: 10px;
    background: #111a29;
    color: #a7f4ff;
    font-size: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .25);
    animation: navai-notice-in .2s ease-out;
}

@keyframes navai-notice-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
    .navai-tools-menu {
        bottom: 88px;
        width: min(310px, calc(100vw - 32px));
    }
}

/* NAVAI CENTERED WELCOME SCREEN */
.welcome-screen,
.welcome,
#hero,
.hero-section {
    text-align: center;
}

.welcome-screen h1,
.welcome h1,
#hero h1,
.hero-section h1,
.welcome-title,
.hero-title {
    font-size: clamp(42px, 6vw, 70px);
    line-height: 1.12;
    letter-spacing: -2.5px;
    font-weight: 750;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.welcome-screen,
.welcome,
#hero,
.hero-section {
    align-items: center;
    justify-content: center;
}

.composer-area {
    width: 100%;
}

.composer-wrap {
    max-width: 820px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.composer {
    width: 100%;
    min-height: 76px;
    border-radius: 22px;
}

.composer textarea {
    font-size: 16px;
    min-height: 30px;
}

.composer-disclaimer {
    text-align: center;
    margin-top: 12px;
}

@media (max-width: 600px) {
    .welcome-screen h1,
    .welcome h1,
    #hero h1,
    .hero-section h1,
    .welcome-title,
    .hero-title {
        font-size: clamp(36px, 10vw, 48px);
        letter-spacing: -1.5px;
    }

    .composer-area {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* NAVAI — REFERENCE-INSPIRED WELCOME DESIGN */
:root {
    --navai-reference-bg: #031326;
    --navai-reference-blue: #0879e8;
}

body {
    background: radial-gradient(ellipse at 50% 0%, #073768 0%, #031a32 48%, #020d1b 100%);
}

.main-area {
    background: transparent;
}

.topbar {
    background: rgba(3, 19, 38, .72);
    border-bottom: 1px solid rgba(35, 132, 235, .12);
}

.topbar::after {
    content: "Upgrade";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    height: 42px;
    margin: auto 24px auto auto;
    padding: 0 20px;
    border: 1px solid #087fe8;
    border-radius: 24px;
    background: linear-gradient(135deg, #0869c7, #03264a);
    color: #eef8ff;
    font-size: 14px;
    box-shadow: inset 0 0 14px rgba(31, 151, 255, .16);
}

.welcome-screen {
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(3, 24, 47, .15), rgba(2, 15, 29, .68));
}

.welcome-content {
    width: min(100%, 1000px);
    margin: auto;
    padding: 26px 20px 20px;
    text-align: center;
}

.welcome-content .eyebrow {
    display: none;
}

.navai-orb {
    position: relative;
    width: clamp(125px, 17vw, 225px);
    aspect-ratio: 1;
    margin: 0 auto 28px;
    overflow: hidden;
    border: 2px solid rgba(63, 183, 255, .95);
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,.95) 0 1%, transparent 4%),
        radial-gradient(ellipse at 72% 25%, rgba(26, 136, 255, .95), transparent 24%),
        radial-gradient(ellipse at 32% 78%, rgba(77, 39, 255, .92), transparent 31%),
        radial-gradient(circle at 50% 45%, #071e47 0%, #020a20 58%, #000714 100%);
    box-shadow: 0 0 14px #087ff0, 0 0 42px rgba(0, 119, 255, .36), inset -12px -12px 30px rgba(0, 125, 255, .32), inset 8px 4px 20px rgba(89, 222, 255, .32);
}

.navai-orb::before,
.navai-orb::after,
.navai-orb span {
    content: "";
    position: absolute;
    inset: 12% -18%;
    border: 2px solid rgba(87, 220, 255, .92);
    border-radius: 50%;
    transform: rotate(-34deg);
    box-shadow: 0 0 13px rgba(0, 153, 255, .65);
}

.navai-orb::after {
    inset: 25% -25%;
    border-color: rgba(139, 91, 255, .95);
    transform: rotate(42deg);
}

.navai-orb span {
    inset: -18% 28%;
    border-color: rgba(35, 143, 255, .85);
    transform: rotate(25deg);
}

.welcome-content h1 {
    margin: 0 auto 14px !important;
    color: #eaf4ff;
    font-size: clamp(35px, 4.2vw, 58px) !important;
    line-height: 1.12 !important;
    letter-spacing: -1.8px !important;
    font-weight: 800 !important;
    text-align: center;
}

.welcome-content h1 span {
    background: linear-gradient(90deg, #d8eaff, #69aaff, #258fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navai-reference-subtitle {
    margin: 0 auto 52px !important;
    color: #bdcddd;
    font-size: 14px;
    text-align: center;
}

.composer-area {
    background: transparent !important;
}

.composer {
    min-height: 170px !important;
    padding: 17px 18px !important;
    border: 1px solid #087fe8 !important;
    border-radius: 23px !important;
    background: linear-gradient(115deg, rgba(5, 39, 73, .97), rgba(4, 29, 54, .98)) !important;
    box-shadow: 0 0 24px rgba(0, 101, 220, .09), inset 0 0 30px rgba(13, 100, 183, .06) !important;
}

.composer:focus-within {
    border-color: #27a8ff !important;
    box-shadow: 0 0 0 2px rgba(22, 139, 255, .12), 0 0 28px rgba(0, 111, 255, .12) !important;
}

.composer textarea {
    font-size: 14px !important;
}

.navai-reference-prompts {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px auto 0;
}

.navai-reference-prompts button {
    padding: 11px 17px;
    border: 1px solid rgba(144, 184, 224, .3);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(17, 60, 100, .86), rgba(4, 28, 52, .95));
    color: #e5f1ff;
    font-size: 13px;
    cursor: pointer;
    transition: .2s ease;
}

.navai-reference-prompts button:hover {
    border-color: #198fff;
    background: #0b4173;
    transform: translateY(-2px);
}

.sidebar {
    background: rgba(2, 15, 29, .96);
    border-right: 1px solid rgba(21, 112, 201, .18);
}

@media (min-width: 900px) {
    .welcome-screen {
        min-height: 0;
    }

    .welcome-content {
        transform: translateY(-12px);
    }

    .composer-area {
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (max-width: 650px) {
    .topbar::after {
        min-width: 78px;
        height: 34px;
        margin-right: 12px;
        padding: 0 12px;
        font-size: 12px;
    }

    .navai-orb {
        margin-bottom: 20px;
    }

    .navai-reference-subtitle {
        margin-bottom: 24px !important;
    }

    .composer {
        min-height: 130px !important;
    }

    .navai-reference-prompts {
        gap: 8px;
    }

    .navai-reference-prompts button {
        padding: 9px 12px;
        font-size: 12px;
    }
}

/* NAVAI PREMIUM BLUE SIDEBAR */
.sidebar {
    position: relative;
    background:
        radial-gradient(ellipse at 15% 0%, rgba(0, 112, 220, .13), transparent 42%),
        linear-gradient(180deg, #03172b 0%, #041326 48%, #020d1b 100%) !important;
    border-right: 1px solid rgba(32, 133, 225, .2) !important;
    box-shadow: 8px 0 35px rgba(0, 0, 0, .12);
}

.sidebar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(0, 132, 255, .32),
        rgba(48, 190, 255, .08),
        transparent
    );
    pointer-events: none;
}

.sidebar-top,
.sidebar-bottom {
    position: relative;
    z-index: 1;
}

.brand {
    gap: 12px;
    padding: 18px 15px !important;
}

.brand-name,
.brand span {
    letter-spacing: -.3px;
}

.new-chat-button {
    min-height: 45px;
    margin: 8px 10px 18px !important;
    padding: 0 14px !important;
    border: 1px solid rgba(51, 149, 255, .3) !important;
    border-radius: 13px !important;
    background: linear-gradient(
        115deg,
        rgba(9, 94, 171, .27),
        rgba(5, 37, 68, .72)
    ) !important;
    color: #e7f4ff !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
    transition: background .2s ease, border-color .2s ease,
                transform .2s ease, box-shadow .2s ease;
}

.new-chat-button:hover {
    transform: translateY(-1px);
    border-color: rgba(44, 166, 255, .7) !important;
    background: linear-gradient(
        115deg,
        rgba(9, 116, 210, .4),
        rgba(5, 48, 87, .9)
    ) !important;
    box-shadow: 0 5px 22px rgba(0, 105, 220, .12);
}

.sidebar-section {
    padding: 8px 12px 5px !important;
}

.sidebar-section-title {
    padding: 8px 10px !important;
    color: #7893af !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 1.35px !important;
    text-transform: uppercase;
}

.chat-history {
    padding: 3px 7px 12px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(48, 132, 208, .28) transparent;
}

.history-item {
    margin: 4px 0 !important;
    border: 1px solid transparent !important;
    border-radius: 11px !important;
    background: transparent !important;
    transition: background .18s ease, border-color .18s ease;
}

.history-item:hover {
    border-color: rgba(46, 132, 210, .17) !important;
    background: rgba(15, 57, 91, .58) !important;
}

.history-item.active,
.history-item.selected {
    border-color: rgba(38, 139, 238, .24) !important;
    background: linear-gradient(
        90deg,
        rgba(7, 101, 183, .22),
        rgba(8, 42, 72, .42)
    ) !important;
}

.history-open-button {
    min-height: 39px;
    border-radius: 10px !important;
    color: #c1d2e5 !important;
}

.history-item:hover .history-open-button,
.history-item.active .history-open-button,
.history-item.selected .history-open-button {
    color: #f0f7ff !important;
}

.history-item-icon {
    color: #65baff !important;
}

.history-item-title {
    font-size: 12px !important;
}

.history-empty {
    padding: 16px 12px !important;
    border: 1px dashed rgba(91, 140, 183, .18);
    border-radius: 12px;
    color: #728ba5 !important;
    font-size: 12px !important;
    text-align: center;
}

.sidebar-bottom {
    padding: 12px !important;
    border-top: 1px solid rgba(45, 122, 190, .14);
    background: linear-gradient(
        180deg,
        rgba(3, 18, 34, .1),
        rgba(2, 12, 24, .72)
    );
}

.sidebar-action {
    min-height: 40px;
    margin: 3px 0 !important;
    padding: 0 11px !important;
    border: 1px solid transparent !important;
    border-radius: 11px !important;
    color: #a9bfd5 !important;
    transition: all .18s ease;
}

.sidebar-action:hover {
    border-color: rgba(51, 143, 223, .2) !important;
    background: rgba(11, 57, 93, .5) !important;
    color: #f0f8ff !important;
}

.local-note,
.sidebar-signature {
    color: #607b96 !important;
    font-size: 10px !important;
}

.sidebar-overlay {
    background: rgba(0, 5, 14, .7) !important;
    backdrop-filter: blur(5px);
}

@media (max-width: 760px) {
    .sidebar {
        box-shadow: 15px 0 45px rgba(0, 0, 0, .3);
    }
}

/* NavAI Image Generator */
#navai-imagegen-launcher {
  position: fixed; right: 24px; bottom: 108px; z-index: 900;
  padding: 12px 18px; border: 1px solid rgba(100,160,255,.4);
  border-radius: 999px; color: #f7fbff;
  background: linear-gradient(135deg,#245bdb,#7046d8);
  box-shadow: 0 8px 30px rgba(57,91,230,.3); cursor: pointer;
  font: inherit; font-weight: 600;
}
.navai-imagegen-panel {
  display: none; position: fixed; inset: 0; z-index: 1000;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(4,8,20,.78); backdrop-filter: blur(12px);
}
.navai-imagegen-panel.is-open { display: flex; }
.navai-imagegen-card {
  width: min(620px,100%); max-height: 90vh; overflow: auto;
  padding: 26px; border: 1px solid rgba(117,151,255,.25);
  border-radius: 24px; color: #eef3ff;
  background: #10172a; box-shadow: 0 25px 100px #0008;
}
.navai-imagegen-heading { display:flex; justify-content:space-between; gap:16px; }
.navai-imagegen-heading h2 { margin: 6px 0; }
.navai-imagegen-heading p { color:#aab6d0; margin-top:5px; }
.navai-imagegen-kicker { color:#83aaff; font-size:11px; letter-spacing:2px; }
#navai-imagegen-close {
  align-self:flex-start; border:0; border-radius:10px; padding:8px;
  color:#fff; background:#252e45; cursor:pointer;
}
.navai-imagegen-card label { display:block; margin:18px 0 8px; }
#navai-imagegen-prompt {
  box-sizing:border-box; width:100%; resize:vertical; padding:13px;
  border-radius:12px; border:1px solid #35425f; color:#fff;
  background:#0b1120; font:inherit;
}
.navai-imagegen-actions {
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:wrap; margin-top:14px;
}
#navai-imagegen-status { color:#aab6d0; font-size:13px; }
#navai-imagegen-generate,.navai-imagegen-download {
  display:inline-block; padding:11px 16px; border:0; border-radius:11px;
  color:#fff; text-decoration:none; background:#3867e8; cursor:pointer;
}
#navai-imagegen-generate:disabled { opacity:.6; cursor:wait; }
.navai-imagegen-result { margin-top:18px; }
.navai-imagegen-preview { display:block; width:100%; height:auto; border-radius:14px; }
.navai-imagegen-download { margin-top:12px; }
@media(max-width:600px) {
  #navai-imagegen-launcher { right:14px; bottom:100px; }
  .navai-imagegen-card { padding:18px; }
}


/* NAVAI MOBILE WIDTH FIX */
html, body { width: 100%; max-width: 100%; margin: 0; }
.app-shell { width: 100%; max-width: 100%; min-width: 0; }
.main-area { flex: 1 1 0%; min-width: 0; width: 0; max-width: 100%; }
@media (max-width: 650px) {
  .app-shell { width: 100%; min-width: 0; height: 100dvh; min-height: 0; overflow: hidden; }
  .main-area { width: 100%; min-width: 0; flex: 1 1 0%; }
  .topbar { min-width: 0; width: 100%; padding-left: 10px; padding-right: 10px; }
  .topbar-left, .topbar-right { min-width: 0; }
  .welcome-screen, .conversation, .composer-area { min-width: 0; max-width: 100%; }
  .welcome-content { min-width: 0; max-width: 100%; padding-left: 8px; padding-right: 8px; }
  .suggestion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .composer-wrap, .composer { min-width: 0; max-width: 100%; }
  .topbar::after { flex-shrink: 0; }
}


/* NAVAI MOBILE VIEWPORT POSITION FIX */
@media (max-width: 650px) {
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    .app-shell {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 100dvh !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .main-area {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        flex: none !important;
        overflow: hidden !important;
    }

    .topbar,
    .welcome-screen,
    .conversation,
    .composer-area {
        max-width: 100% !important;
        min-width: 0 !important;
    }
}
