@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap');

:dir(rtl) {
    font-family: var(--font-vazirmatn);
}

:root {
    --bg: #FAF9F5;
    --bg-secondary: #f9fafb;
    --text: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --card: #ffffff;
    --card-hover: #f3f4f6;
    --sidebar-bg: #f9fafb;
    --sidebar-text: #374151;
    --sidebar-active: #e5e7eb;
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        --foblax-bg-card: #fff;
}

html.dark {
    --bg: #000000;
    --bg-secondary: #111118;
    --text: #ffffff;
    --text-secondary: #71717A;
    --border: rgb(255 255 255 / 11%);
    --card: #111118;
    --card-hover: #1A1A2E;
    --sidebar-bg: #0A0A0F;
    --sidebar-text: #A1A1AA;
    --sidebar-active: #1A1A2E;
    --input-bg: #111118;
    --input-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);

        --foblax-bg-card: #222325 !important;
}

/* * {
    background: var(--bg) !important;
    color: var(--text);
} */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html,
body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg) !important;
    color: var(--text);
}

.file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f8f9fa;
    border: 1px solid #e8e8ec;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
    align-self: flex-end;
    animation: fadeIn 0.3s ease;
}

.file-loading {
    font-size: 11px;
}


.app {
    width: 100%;
    height: calc(100vh - 0px);
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.session-item .edit-session {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
}

.session-item:hover .edit-session {
    opacity: 1;
}

.session-item .edit-session:hover {
    color: var(--primary);
}

.rename-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--primary);
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    width: 100%;
    outline: none;
    padding: 2px 0;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0px;
    flex-shrink: 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.logo-icon img {
    width: 28px;
}

.logo-text {
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.3px;
    color: var(--text);
}

.logo-text span {
    font-weight: 300;
    color: #6b6f7a;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    padding: 0px 15px;
}

.upgrade-badge {
    background: #f0f1f5;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: #0b0c10;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
}

.upgrade-badge i {
    color: #f97316;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #e4e6ed;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #1d1f27;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.avatar:hover {
    background: #d0d2da;
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid #ecedf2;
    padding: 8px 0;
    min-width: 200px;
    display: none;
    z-index: 100;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #3d414d;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'Inter', sans-serif;
}

.dropdown-item:hover {
    background: #f5f6fa;
}

.dropdown-item i {
    width: 18px;
    color: #6b6f7a;
}

.dropdown-divider {
    height: 1px;
    background: #ecedf2;
    margin: 4px 0;
}

.main-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow-y: auto;
    padding-right: 8px;
    border: solid 1px var(--border);
    border-top: none;
    border-bottom: none;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #d0d2da;
    border-radius: 4px;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text);
    transition: all 0.1s;
    cursor: pointer;
    text-decoration: none;
}

.nav-item i {
    width: 20px;
    font-size: 16px;
    color: var(--text);
}

.nav-item.active {
    background: var(--foblax-bg-card);
    color: var(--text);
    font-weight: 600;
}

.nav-item.active i {
    color: var(--text);
}

.nav-item:hover:not(.active) {
    background: var(--bg-secondary);
}

.separator {
    height: 1px;
    background: #ecedf2;
    margin: 6px 0;
}

.workspace-label {
    font-size: 13px;
    font-weight: 600;
    color: #8b8f9a;
    letter-spacing: 0.3px;
    padding: 4px 14px 8px;
    text-transform: uppercase;
}

.workspace-item {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    color: #3d414d;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.workspace-item:hover {
    background: #f8f9fc;
}

.workspace-item i {
    width: 20px;
    color: #6b6f7a;
    font-size: 14px;
}

.workspace-item.active {
    background: #f0f1f5;
    font-weight: 500;
}

.recent-label {
    font-size: 13px;
    font-weight: 600;
    color: #8b8f9a;
    padding: 10px 14px 4px;
    letter-spacing: 0.3px;
}

.recent-item {
    padding: 13px 14px;
    font-size: 14px;
    color: var(--text);
    border-radius: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-item:hover {
    background: var(--bg-secondary);
}

.recent-item .recent-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-item .delete-session {
    opacity: 0;
    transition: opacity 0.2s;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
}

.recent-item:hover .delete-session {
    opacity: 1;
}

.upgrade-card {
    margin-top: 12px;
    background: var(--bg-secondary);
    border-radius: 2px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    bottom: 0;
    position: absolute;
    width: 240px;
}

.upgrade-card h4 {
    font-size: 16px;
    font-weight: 700;
}

.upgrade-card p {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
}

.upgrade-btn {
    background: #0b0c10;
    color: white;
    border: none;
    padding: 10px 0;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    transition: opacity 0.2s;
}

.upgrade-btn:hover {
    opacity: 0.9;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-height: 0;
    overflow: auto;
}

.welcome {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.welcome h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.welcome p {
    color: var(--sidebar-text);
    font-size: 15px;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;

    box-sizing: content-box;
    padding-top: 0px;
    padding-left: calc((100% - 840px) / 2);
    padding-right: calc((100% - 840px) / 2);
    flex-shrink: 0;
    flex-grow: 1;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #d0d2da;
    border-radius: 4px;
}

.msg {
    display: flex;
    gap: 10px;
    /* max-width: 85%; */
    animation: slideIn 0.3s ease;
    position: relative;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg.bot {

    flex-direction: column;
}

.msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.msg.user .msg-avatar {
    background: #0b0c10;
    color: white;
}

.msg.bot .msg-avatar {
    background: #f0f1f5;
    border: 1px solid #ecedf2;
}

.msg-content {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.7;
    word-break: break-word;
    min-width: 0;
}

.msg.user .msg-content {
    background: var(--input-border);
    color: white;
    border-bottom-right-radius: 4px;
    white-space: break-spaces;
}

.msg.bot .msg-content {
    background: transparent;
    border: 1px solid transparent;
    border-bottom-left-radius: 4px;
    color: var(--text);
    line-height: 35px;
}

.msg-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    opacity: 1;
    transition: opacity 0.2s;
}

.msg:hover .msg-actions {
    opacity: 1;
}

.msg-act-btn {
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 10px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    color: #6b6f7a;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}



.msg.bot .msg-content p {
    margin: 4px 0;
}

.msg.bot .msg-content pre {
    background: #0d1117;
    padding: 16px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 10px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    direction: ltr;
    text-align: left;
}

.msg.bot .msg-content pre code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    background: transparent;
    padding: 0;
}

.msg.bot .msg-content code {
    background: var(--border);
    padding: 7px 21px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.msg.bot .msg-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 12px;
}

.msg.bot .msg-content th,
.msg.bot .msg-content td {
    border: 1px solid rgba(0, 0, 0, 0.1);
}



.msg.bot .msg-content ul,
.msg.bot .msg-content ol {
    margin: 6px 0;
    padding-right: 20px;
}

.msg.bot .msg-content blockquote {
    border-right: 3px solid #f97316;
    padding-right: 14px;
    margin: 8px 0;
    color: var(--sidebar-text);
}

.msg.bot .msg-content h1,
.msg.bot .msg-content h2,
.msg.bot .msg-content h3,
.msg.bot .msg-content h4 {
    margin: 8px 0 4px;
    font-weight: 700;
}

.msg.bot .msg-content a {
    color: #97b8ff;
}

.msg.bot .msg-content img {
    max-width: 100%;
    border-radius: 8px;
}

.code-block-wrapper {
    position: relative;
    margin: 12px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #0d1117;
}

.code-block-wrapper pre {
    margin: 0;
    border: none;
    border-radius: 0;
    padding-top: 36px;
}

.code-lang-label {

    background: rgba(0, 0, 0, 0.04);
    color: #6b6f7a;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 0 0 6px 6px;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

.code-copy-btn {

    z-index: 5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c9d1d9;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.cursor .msg-content::after {
    content: '▊';
    animation: blink 1s infinite;
    color: #f97316;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1
    }

    51%,
    100% {
        opacity: 0
    }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8b8f9a;
    text-align: center;
    padding: 20px 0;
    flex: 1;
}

.empty-state .icon {
    font-size: 48px;
    opacity: 0.2;
    margin-bottom: 12px;
}

.chat-input-block {
      background: var(--bg-secondary);
    border-radius: 30px;
    padding: 16px 20px 14px;
    border: 1px solid var(--border);
    transition: 0.15s;
    box-shadow: 0 2px 8px var(--shadow);
    flex-shrink: 0;
    width: 98%;
}

.input-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prompt-textarea {
    width: 100%;
    border: none;
    background: transparent;
    resize: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 450;
    line-height: 1.5;
    color: var(--text);
    outline: none;
    min-height: 56px;
    max-height: 120px;
    padding: 4px 0;
}

.prompt-textarea::placeholder {
    color: #8b8f9a;
    font-weight: 400;
    font-size: 15px;
}

.bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.chip-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    padding: 5px 14px 5px 12px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    box-shadow: 0 1px 4px var(--shadow);
    border: 1px solid var(--bg);
    cursor: pointer;
    transition: all 0.15s;
}

.chip:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.chip i {
    font-size: 13px;
    color: var(--sidebar-text);
}

.chip.primary {
    background: #0b0c10;
    color: white;
    border: none;
    padding: 5px 18px 5px 16px;
}

.chip.primary i {
    color: white;
}

.action-icon {
    width: 34px;
    height: 34px;
    background: #000000;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000000;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s;
}

.action-icon:hover {
    background: #0b0c10;
    color: white;
    border-color: #0b0c10;
}

.action-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    flex-shrink: 0;
}

.feature-card {
    background: var(--bg-secondary);
    border-radius: 28px;
    padding: 18px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.feature-card:hover {
    background: var(--bg);
    transform: translateY(-2px);
}

.feature-card .icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.feature-card h4 {
    font-weight: 600;
    font-size: 16px;
}

.feature-card p {
    color: var(--sidebar-text);
    font-size: 13px;
    line-height: 1.3;
}

.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #8b8f9a;
    flex-shrink: 0;
}

.footer-meta .left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-meta .right {
    display: flex;
    gap: 16px;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.footer-meta i {
    margin-right: 4px;
}

.scroll-to-bottom {
    position: absolute;
    bottom: 141px;
    right: 20px;
    background: #000000;
    border: 1px solid #ecedf2;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: none;
    align-items: center;
    color: #fff;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
    z-index: 10;
}

.scroll-to-bottom:hover {
    background: #f0f1f5;
    transform: scale(1.05);
}

.scroll-to-bottom.show {
    display: flex;
}

[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

[dir="rtl"] {
    direction: rtl;
    text-align: right;
    font-family: "Vazirmatn", sans-serif;
    font-size: 1rem;
}

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(16px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@media (max-width: 700px) {
    .app {
        padding: 16px;
        height: calc(100vh - 0px);
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}

select {
    background: white;
    border: 1px solid #ecedf2;
    border-radius: 40px;
    padding: 5px 14px 5px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #1d1f27;
    outline: none;
    cursor: pointer;
}

select:focus {
    border-color: #0b0c10;
}

.recent-item.active {
    background: var(--bg-secondary);
    border-left: 2px solid var(--primary);
}

.tools-bar {
    display: none;
    padding: 8px 0;
    border-top: 1px solid #e8e8ec;
    margin-top: 8px;
}

.tools-bar.show {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tool-item {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #e8e8ec;
    background: white;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    color: #666;
}

.tool-item:hover,
.tool-item.selected {
    background: #f0f1f5;
    border-color: #0b0c10;
    color: #0b0c10;
}

.tool-indicator {
    display: none;
    padding: 6px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    font-size: 11px;
    color: #16a34a;
    align-items: center;
    gap: 6px;
}

.tool-indicator.show {
    display: inline-flex;
}

.tool-progress {
    display: none;
    margin: 20px auto;
    width: 100%;
    max-width: 400px;
    background: var(--bg);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 1px solid #e8e8ec;
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

.tool-progress.show {
    display: block;
}

.progress-bar {
    height: 4px;
    background: #e8e8ec;
    border-radius: 2px;
    margin: 12px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #0b0c10;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressPulse 2s infinite;
}

@keyframes progressPulse {

    0%,
    100% {
        width: 30%;
    }

    50% {
        width: 90%;
    }
}

.tool-result {
    display: none;
    margin: 12px 0;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e8e8ec;
    border-radius: 14px;
    text-align: center;
}

.tool-result.show {
    display: block;
}

.tool-result .download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0b0c10;
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
}

.tool-result .download-btn:hover {
    opacity: 0.9;
}

.chip.active {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #16a34a !important;
}


#modelDropdownBtn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

#selectedModelName {
    font-weight: 600;
    color: var(--text);
}

#modelDropdown {
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 50px var(--shadow);
    overflow: hidden;
        width: 252px;
}
.upgrade-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--input-bg);
    align-items: center;
    justify-content: center;
}

.upgrade-popup-card {
    background: var(--card);
    border-radius: 20px;
    padding: 36px 32px;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 60px var(--shadow);
}

.upgrade-popup-icon-wrap {
    width: 56px;
    height: 56px;
        background: transparent;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.upgrade-popup-icon {
    font-size: 24px;
   color: var(--sidebar-text);
}

.upgrade-popup-title {
    font-size: 18px;
    font-weight: 700;
       color: var(--text);
    margin-bottom: 6px;
}

.upgrade-popup-desc {
       color: var(--sidebar-text);
    font-size: 13px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.upgrade-popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.upgrade-popup-btn-cancel {
      padding: 10px 24px;
    border-radius: 12px;
    border: 1px solid #e91d7d57;
    background: #ff04041a;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.upgrade-popup-btn-upgrade {
    padding: 10px 24px;
    border-radius: 12px;
    border: none;
   background: var(--bg);
        color: var(--text);
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

.model-selector {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.model-selector-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    border: 2px solid #e8e8ec;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.model-selector-icon {
    font-size: 18px;
}

.model-selector-name {
    font-weight: 600;
    color: #1a1a1a;
}

.model-selector-arrow {
    margin-left: auto;
    color: #999;
    font-size: 11px;
}

.model-dropdown {
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    border-radius: 16px;
    border: 1px solid #e8e8ec;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.model-tier-label {
    padding: 10px 16px;
    font-size: 10px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.model-tier-premium {
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.model-tier-upgrade {
    font-size: 9px;
    color: #e07b4c;
    cursor: pointer;
    font-weight: 600;
}

.model-option {
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.model-option-premium {
    justify-content: space-between;
}

.model-option-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.model-option-icon {
    font-size: 16px;
    color: #999;
    width: 20px;
    text-align: center;
}

.model-option-icon-locked {
    color: #bbb;
}

.model-option-name {
    font-weight: 600;
    font-size: 13px;
  color: var(--text);
}

.model-option-desc {
    font-size: 11px;
        color: var(--sidebar-text);
    margin-top: 1px;
}

.model-upgrade-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    background: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    transition: all 0.2s;
}



.logo-area.t-g {
    padding: 15px 8px 2px 10px;
}

a {
    text-decoration: none;
}


body.bg-white .bg-white\/\[0\.02\] {
    background-color: rgb(255 234 226 / 34%) !important;
}

body.bg-white .border-white\/5,
body.bg-white .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.06) !important;
}

body.bg-white .logo-dark {
    display: none !important;
}

body.bg-white .logo-light {
    display: block !important;
}

body:not(.bg-white) .logo-light {
    display: none !important;
}

body:not(.bg-white) .logo-dark {
    display: block !important;
}

body.bg-white .bg-\[\#0A0A0F\] {
    background-color: #f5f5f5 !important;
    color: #F86624 !important;
}

body.bg-white .text-zinc-500,
body.bg-white .text-zinc-400 {
    color: #555 !important;
}

.bg-blue-500-20 {
    background: #237138 !important;
}

.bg-green-500-10 {
    background: #0451ff !important;
}

.bg-orange-500-10 {
    background: #b75806;
}

body.bg-white .text-zinc-600 {
    color: #777 !important;
}

body.bg-white .text-white {
    color: #555 !important;
}



html,
body,
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none;
}

.md-code-block-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1px 14px;
    background: #1a1a2e;
    border-bottom: 1px solid #252540;
    font-family: 'Segoe UI', system-ui, sans-serif;
    user-select: none;
}

.msg.bot .msg-content hr {
    border-color: var(--border);
}

.md-code-block-banner-lite {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.banner-lang {
    font-size: 11px;
    font-weight: 600;
    color: #8888a0;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.banner-lang i {
    font-size: 10px;
    opacity: 0.5;
}

.banner-copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 5px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    color: #8888a0;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}

.banner-copy-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

.banner-copy-btn.copied {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border-color: rgba(16, 185, 129, 0.2);
}

.banner-copy-btn span {
    font-size: 10px;
}

.chip.active {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #16a34a !important;
}

.center {
    text-align: center;
    width: 100%;
}



.msg.bot .msg-content table {
    border-collapse: collapse;
    width: 100%;
}

.msg.bot .msg-content td,
th {
    border: solid 1px var(--border);
    padding: 0px 8px;
}


.msg.bot .msg-content th {
    padding-top: 0px;
    padding-bottom: 0px;
    /* text-align: left; */
    background-color: var(--border);
    border: solid 1px var(--border);
}

.data-tool{
      display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--input-border);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    line-height: 26px;
}

.tools-bar.show:before{
     content: "";
       position: absolute;
    bottom: -9px;
    left: 5px;
    width: 20px;
    height: 10px;
    background: #333333;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.user-card {
       background: var(--bg-secondary);
    border-radius: 2px;
    padding: 9px 1px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    bottom: 0;
    position: absolute;
    width: 240px;
    border-top: solid 1px var(--border);
}