.message-action-info,
.message-action-button {
    background-color: transparent;
    color: var(--message-action-button-text);
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
}

.message-action-info {
    position: relative; /* 用于Tooltip定位 */
}

.message-action-info:hover,
.message-action-button:hover {
    background-color: var(--message-action-button-hover-bg);
    color: var(--message-action-button-hover-text);
}

.message-action-info svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.message-action-button svg {
    width: 14px;
    height: 14px;
    margin-right: 5px;
    fill: currentColor;
}
#economyModeToggleBtn {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: 10px; /* 与主题按钮保持间距 */
    padding: 0;
    display: flex;
    align-items: center;
}

#economyModeToggleBtn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text); /* 默认描边颜色 */
    fill: var(--text);   /* 默认填充颜色 */
    opacity: 0.7;
    transition: opacity 0.2s, fill 0.2s, background-color 0.2s;
}

#economyModeToggleBtn:hover svg {
    opacity: 1;
}

#economyModeToggleBtn.active svg {
    opacity: 1;
    fill: var(--message-user-bg);
    stroke: var(--message-user-bg);
}

#economyModeToggleBtn .tooltip,
.message-action-info .tooltip {
    visibility: hidden;
    background-color: var(--code-toolbar-main-bg);
    color: var(--code-toolbar-item-text);
    text-align: center;
    border-radius: 4px;
    padding: 5px 10px;
    position: absolute;
    z-index: 10;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 2px 4px var(--code-toolbar-item-shadow);
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none; /* 确保不影响点击 */
}

/* Tooltip 定位差异 */
#economyModeToggleBtn .tooltip {
    bottom: 150%; /* 在图标上方 */
}
.message-action-info .tooltip {
    bottom: 100%;
}

/* Tooltip 悬停显示 */
#economyModeToggleBtn:hover .tooltip,
.message-action-info:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

[data-economy-mode="true"] {
    --background: #1a211e;
    --text: #c0c5c2;
    --toolbar-bg: #1a211e;
    --toolbar-border: #2c3a34;
    --chat-bg: #1a211e;
    --message-user-bg: #2a9d8f;
    --ai-avatar-bg: #2a9d8f;
    --input-container-bg: #242f2a;
    --sidebar-bg: var(--background);
    --sidebar-hover: #242f2a;
    --code-bg: #202925;
    --feature-button-bg: #3a4c44;
    --feature-button-hover-bg: #4a5d54;
    --focus-outline-color: var(--message-user-bg);
}


[data-theme="light"][data-economy-mode="true"] {
    --background: #fdf6e3;
    --text: #586e75;
    --toolbar-bg: var(--background);
    --toolbar-border: #e8dbb8;
    --chat-bg: #fdf6e3;
    --message-user-bg: #268bd2; /* 用户消息气泡 - 一种柔和的蓝色 */
    --ai-avatar-bg: #268bd2;
    --input-container-bg: #f5ead0;
    --sidebar-bg: var(--background);
    --sidebar-hover: #f5ead0;
    --code-bg: #f5efde;
    --feature-button-bg: #e8dbb8;
    --feature-button-hover-bg: #d8cbb0;
    --focus-outline-color: var(--message-user-bg);
}

.input-area:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.input-container.disabled {
    box-shadow: none;
}

:root {
    --sidebar-width: 200px;
    --sidebar-width-collapsed: 0px;
    --toolbar-height: 43px;
    --input-box-base-height: 50px;
    --input-actions-height: 40px;
    --input-area-total-height: 180px;
    --background: #1e1e1e;
    --text: #FFFFFF;
    --toolbar-bg: #1e1e1e;
    --toolbar-border: #333;
    --chat-bg: #1e1e1e;
    --message-user-bg: #3b82f6;
    --message-user-text: #ffffff;
    --message-user-bubble-bg: rgba(255, 255, 255, 0.1);
    --ai-avatar-bg: #3b82f6;
    --article-collection-bg: #3b82f6;
    --article-collection-text: #ffffff;
    --article-collection-hover: #2563eb;
    --article-list-bg: #252526;
    --article-list-shadow: rgba(0, 0, 0, 0.5);
    --article-card-bg: transparent;
    --article-card-hover: #333;
    --article-card-border: #444;
    --input-bg: #1e1e1e;
    --input-container-bg: #333;
    --input-text: #e0e0e0;
    --send-button-bg: var(--message-user-bg);
    --send-button-icon: #ffffff;
    --close-btn: #999;
    --close-btn-hover: #fff;
    --source-text: #777;
    --summary-text: #ccc;
    --date-text: #999;
    --reading-card-text: #3b82f6;
    --sidebar-bg: var(--background);
    --sidebar-text: #fff;
    --sidebar-hover: #252526;
    --focus-outline-color: var(--message-user-bg);
    --code-bg: #2d2d2d;
    --table-border-color: #555;
    --input-prefix-text: #a0a0a0;
    --feature-button-bg: #4a4a4a;
    --feature-button-text: #e0e0e0;
    --feature-button-hover-bg: #5a5a5a;
    --feature-button-active-bg: var(--message-user-bg);
    --feature-button-active-text: #ffffff;
    --message-action-button-text: #b0b0b0;
    --message-action-button-hover-bg: #4a4a4a;
    --message-action-button-hover-text: #e0e0e0;
    --code-toolbar-main-bg: #1f2937;
    --code-toolbar-item-bg: #374151;
    --code-toolbar-item-hover-bg: #4b5563;
    --code-toolbar-item-text: #d1d5db;
    --code-toolbar-item-hover-text: #ffffff;
    --code-toolbar-item-active-bg: var(--message-user-bg);
    --code-toolbar-item-shadow: rgba(0, 0, 0, 0.3);
    --code-language-tag-bg: var(--code-toolbar-item-bg);
    --code-language-tag-text: var(--code-toolbar-item-text);
    --code-toolbar-icon-fill: var(--code-toolbar-item-text);
    --code-toolbar-success-bg: #16a34a;
    --code-toolbar-success-icon-fill: #ffffff;
    --search-button-icon: #ffffff;
    --search-card-bg: var(--article-list-bg);
    --search-card-shadow: var(--article-list-shadow);
    --search-loading-bg: var(--input-container-bg);
    --view-all-button-bg: var(--article-collection-bg);
    --view-all-button-hover: var(--article-collection-hover);
    --user-avatar-bg: #555;
    --user-avatar-text: #ffffff;
    --user-avatar-hover-bg: #777;
    --user-dropdown-bg: #2d2d2d;
    --user-dropdown-item-text: #e0e0e0;
    --user-dropdown-item-hover-bg: #3c3c3c;
    --user-dropdown-item-hover-text: #ffffff;
    --user-dropdown-shadow: rgba(0, 0, 0, 0.4);
    --input-suggestion-text: #6e6e6e;
}
[data-theme="light"] {
    --background: #ffffff;
    --text: #333333;
    --toolbar-bg: var(--background);
    --toolbar-border: #e0e0e0;
    --chat-bg: #ffffff;
    --message-user-bg: #2563eb;
    --message-user-text: #000000;
    --ai-avatar-bg: #2563eb;
    --article-collection-bg: #2563eb;
    --article-collection-text: #ffffff;
    --message-user-bubble-bg: #E9E9EB;
    --article-collection-hover: #1d4ed8;
    --article-list-bg: #f4f4f4;
    --article-list-shadow: rgba(0, 0, 0, 0.1);
    --article-card-bg: transparent;
    --article-card-hover: #e8ecef;
    --article-card-border: #e0e0e0;
    --input-bg: transparent;
    --input-container-bg: #e8ecef;
    --input-text: #333333;
    --send-button-bg: var(--message-user-bg);
    --send-button-icon: #ffffff;
    --close-btn: #666;
    --close-btn-hover: #000;
    --source-text: #666;
    --summary-text: #555;
    --date-text: #888;
    --reading-card-text: #2563eb;
    --sidebar-bg: var(--background);
    --sidebar-text: #333333;
    --sidebar-hover: #f0f0f0;
    --focus-outline-color: var(--message-user-bg);
    --code-bg: #f3f4f6;
    --table-border-color: #ddd;
    --input-prefix-text: #777777;
    --feature-button-bg: #e0e0e0;
    --feature-button-text: #333333;
    --feature-button-hover-bg: #d0d0d0;
    --feature-button-active-bg: var(--message-user-bg);
    --feature-button-active-text: #ffffff;
    --message-action-button-text: #777777;
    --message-action-button-hover-bg: #e0e0e0;
    --message-action-button-hover-text: #333333;
    --code-toolbar-main-bg: #e5e7eb;
    --code-toolbar-item-bg: #d1d5db;
    --code-toolbar-item-hover-bg: #9ca3af;
    --code-toolbar-item-text: #374151;
    --code-toolbar-item-hover-text: #1f2937;
    --code-toolbar-item-active-bg: var(--message-user-bg);
    --code-toolbar-item-shadow: rgba(0, 0, 0, 0.1);
    --code-language-tag-bg: var(--code-toolbar-item-bg);
    --code-language-tag-text: var(--code-toolbar-item-text);
    --code-toolbar-icon-fill: var(--code-toolbar-item-text);
    --code-toolbar-success-bg: #16a34a;
    --code-toolbar-success-icon-fill: #ffffff;
    --search-button-icon: #ffffff;
    --search-card-bg: var(--article-list-bg);
    --search-card-shadow: var(--article-list-shadow);
    --search-loading-bg: var(--input-container-bg);
    --view-all-button-bg: var(--article-collection-bg);
    --view-all-button-hover: var(--article-collection-hover);
    --prism-comment: #6A737D;
    --prism-string: #032f62;
    --prism-keyword: #d73a49;
    --prism-function: #6f42c1;
    --prism-punctuation: #586069;
    --prism-operator: #d73a49;
    --prism-number-boolean: #005cc5;
    --prism-class-name: #6f42c1;
    --prism-general-text: #24292e;

    --user-avatar-bg: #ccc;
    --user-avatar-text: #333333;
    --user-avatar-hover-bg: #b0b0b0;
    --user-dropdown-bg: #f9f9f9;
    --user-dropdown-item-text: #333333;
    --user-dropdown-item-hover-bg: #e8ecef;
    --user-dropdown-item-hover-text: #1a1a1a;
    --user-dropdown-shadow: rgba(0, 0, 0, 0.15);
    --input-suggestion-text: #b0b0b0;
}


.user-profile-container {
    position: relative;
    margin-left: auto; /* 将用户头像推到最右边 */
    display: flex;
    align-items: center;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px); /* 在头像下方留10px间距 */
    right: 0;
    background-color: var(--user-dropdown-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--user-dropdown-shadow);
    padding: 8px 0;
    min-width: 150px;
    display: none;
    flex-direction: column;
    z-index: 1002; /* 确保在其他元素之上 */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.user-dropdown-menu.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.user-dropdown-item {
    padding: 10px 15px;
    color: var(--user-dropdown-item-text);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap; /* 防止内容换行 */
}

.user-dropdown-item:hover {
    background-color: var(--user-dropdown-item-hover-bg);
    color: var(--user-dropdown-item-hover-text);
}
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: var(--background);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
}
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: var(--toolbar-bg); } ::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #777; }
.main-content, .article-list, .input-area, .sidebar, .search-results-card { scrollbar-width: thin; scrollbar-color: #555 var(--toolbar-bg); }
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--toolbar-border);
    flex-shrink: 0;
    transition: width 0.3s ease, padding 0.3s ease, transform 0.3s ease;
    position: fixed;
    top: var(--toolbar-height);
    left: 0;
    height: calc(100vh - var(--toolbar-height));
    overflow-x: hidden;
    z-index: 999;
}
.sidebar-main-items {
    flex-grow: 1;
    overflow-y: auto;
    padding-top: 20px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #555 var(--toolbar-bg);
}
.sidebar-footer-elements {
    flex-shrink: 0;
    padding-bottom: 15px;
    margin-top: auto;
}
.sidebar-upgrade-section {
    padding: 0px 17px 10px 17px;
}
.sidebar-upgrade-button {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--sidebar-text);
    background-color: rgba(128, 128, 128, 0.08);
    transition: background-color 0.2s;
    border: 1px solid var(--toolbar-border);
}
.sidebar-upgrade-button:hover {
    background-color: var(--sidebar-hover);
}
.sidebar-upgrade-button .upgrade-icon {
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--message-user-bg);
}
.sidebar-upgrade-button .upgrade-icon svg {
    fill: currentColor;
}
.sidebar-upgrade-button .upgrade-text {
    display: flex;
    flex-direction: column;
}
.sidebar-upgrade-button .upgrade-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--sidebar-text);
    line-height: 1.3;
}
.sidebar-upgrade-button .upgrade-subtitle {
    font-size: 11px;
    color: var(--summary-text);
    line-height: 1.3;
}
.sidebar-icp {
    padding: 8px 17px 5px 17px;
    text-align: center;
    font-size: 11px;
    color: var(--source-text);
}
.sidebar-icp a {
    color: inherit;
    text-decoration: none;
}
.sidebar-icp a:hover {
    text-decoration: underline;
}
.sidebar.collapsed .sidebar-footer-elements {
    padding: 10px 0;
    overflow: hidden;
}
.sidebar.collapsed .sidebar-upgrade-button {
    justify-content: center;
}
.sidebar.collapsed .sidebar-upgrade-button .upgrade-text {
    display: none;
}
.sidebar.collapsed .sidebar-upgrade-button .upgrade-icon {
    margin-right: 0;
}
.sidebar.collapsed .sidebar-icp {
    font-size: 0;
    padding: 5px 0;
}
.sidebar.collapsed { width: var(--sidebar-width-collapsed); padding: 20px 0; overflow: hidden; border-right: none; transform: translateX(-100%); }
.sidebar-item { padding: 10px 17px; cursor: pointer; transition: background 0.2s, border-left-color 0.2s; font-size: 14px; font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid transparent; }
.sidebar-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.sidebar-item-link:hover .sidebar-item {
    background: var(--sidebar-hover);
    border-left-color: var(--message-user-bg);
}
.sidebar-item:hover { background: var(--sidebar-hover); border-left-color: var(--message-user-bg); }
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    margin-top: var(--toolbar-height);
    height: calc(100vh - var(--toolbar-height));
    overflow-y: auto;
    background: var(--chat-bg);
    padding-bottom: 20px;
    box-sizing: border-box;
    transition: margin-left 0.3s ease;
}
.main-content.collapsed { margin-left: var(--sidebar-width-collapsed); }
.toolbar {
    display: flex; align-items: center; padding: 0 15px; background: var(--toolbar-bg); position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; height: var(--toolbar-height); box-sizing: border-box;
}
.toolbar .tools { display: flex; align-items: center; flex-shrink: 0; }
.toolbar .tools svg { width: 20px; height: 20px; margin-right: 15px; cursor: pointer; opacity: 0.7; stroke: var(--text); }
.toolbar .tools svg:hover { opacity: 1; }
.theme-toggle { background: transparent; border: none; cursor: pointer; margin-left: 10px; padding: 0; display: flex; align-items: center; }
.theme-toggle svg { width: 20px; height: 20px; stroke: var(--text); opacity: 0.7; }
.theme-toggle svg:hover { opacity: 1; }
.toolbar-reading-indicator { position: absolute; left: 50%; transform: translateX(-50%); color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; padding: 0 10px; display: none; opacity: 0; transition: opacity 0.3s ease-in-out; }
.toolbar-reading-indicator.visible { opacity: 1; }
.message { display: flex; align-items: flex-start; margin: 20px 0; opacity: 0; transform: translateY(15px); transition: opacity 0.4s ease-out, transform 0.4s ease-out; }
.message.show { opacity: 1; transform: translateY(0); }

.message.ai .avatar {
    width: 32px;
    height: 32px;
    background: var(--ai-avatar-bg);
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.message.ai .message-content-wrapper { display: flex; flex-direction: column; flex-grow: 1; max-width: calc(100% - 44px); min-width: 0; }
.message.ai .content {
    line-height: 1.6;
    font-size: 17px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    max-width: 100%;
    box-sizing: border-box;
}
.message-actions { margin-top: 10px; display: flex; gap: 8px; }
.message.user { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; margin-bottom: 15px; }
.message.user .content { background: var(--message-user-bubble-bg); color: var(--message-user-text); padding: 12px 16px; border-radius: 20px; border-bottom-right-radius: 5px; max-width: 85%; line-height: 1.6; font-size: 17px; position: relative; max-height: 4.8em; overflow: hidden; transition: max-height 0.3s ease-out; word-wrap: break-word; overflow-wrap: break-word; white-space: pre-wrap; }
.message.user .content.expanded { max-height: none; overflow: visible; }
.message.user .content:not(.expanded)::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2.5em; pointer-events: none; }
.message.user .expand-collapse-container { text-align: right; margin-top: 5px; width: 100%; }
.message.user .expand-collapse-button { background-color: rgba(0, 0, 0, 0.2); color: var(--message-user-text); border: none; border-radius: 4px; padding: 4px 8px; font-size: 12px; cursor: pointer; transition: background-color 0.2s ease; display: inline-flex; align-items: center; gap: 4px; }
.message.user .expand-collapse-button:hover { background-color: rgba(0, 0, 0, 0.3); }
.message.user .expand-collapse-button svg { width: 12px; height: 12px; fill: currentColor; }

.article-collection,
.view-all-from-preview-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--article-collection-bg);
    color: var(--article-collection-text);
    border-radius: 18px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    font-size: 13px;
    font-weight: 500;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}
.article-collection:hover,
.view-all-from-preview-btn:hover {
    transform: scale(1.03);
    background: var(--article-collection-hover);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}
.article-collection { margin-top: 12px; }
.view-all-from-preview-btn { margin-top: 15px; }
.article-list { position: fixed; top: 0; right: 0; width: 400px; height: 100%; background: var(--article-list-bg); transform: translateX(100%); transition: transform 0.3s ease-in-out; padding: 20px; overflow-y: auto; box-shadow: -5px 0 15px var(--article-list-shadow); z-index: 1001; box-sizing: border-box; }
.article-list.open { transform: translateX(0%); }
.article-list-header { font-size: 18px; color: var(--text); margin-bottom: 30px; padding-bottom: 15px; border-bottom: 1px solid var(--article-card-border); text-align: center; }
.close-btn { position: absolute; top: 15px; right: 20px; background: transparent; border: none; color: var(--close-btn); cursor: pointer; font-size: 24px; line-height: 1; padding: 5px; }
.close-btn:hover { color: var(--close-btn-hover); }
.article-card { background: var(--article-card-bg); padding: 15px; cursor: pointer; transition: background 0.2s; border-bottom: 1px solid var(--article-card-border); }
.article-card:last-child { border-bottom: none; }
.article-card:hover { background: var(--article-card-hover); }
.article-card .title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.article-card .date { font-size: 12px; color: var(--date-text); margin-bottom: 10px; }
.article-card .summary { font-size: 14px; color: var(--summary-text); line-height: 1.5; }
.article-card .source { font-size: 12px; color: var(--source-text); margin-top: 8px; display: flex; align-items: center; }
.article-card .source img { width: 16px; height: 16px; border-radius: 50%; margin-right: 5px; }
.section-title { font-size: 16px; font-weight: 600; margin: 20px 0 10px; color: var(--text); }
.input-box { position: fixed; bottom: 0; left: var(--sidebar-width); right: 0; background: var(--input-bg); z-index: 900; transition: left 0.3s ease; box-sizing: border-box; padding: 10px 0; }
.input-box.collapsed { left: var(--sidebar-width-collapsed); }
.input-container {
    max-width: 770px;
    margin: 0 auto;
    border-radius: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    box-sizing: border-box;

    /* 注入原 PRO MAX 样式 */
    background-color: #202123;
    border: 1px solid rgba(90, 150, 255, 0.4);
    box-shadow: 0 0 10px -2px rgba(106, 17, 203, 0.5);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
[data-theme="light"] .input-container {
    background-color: #f7f9fc;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.input-container:focus-within {
    border-color: rgba(90, 150, 255, 0.7);
    box-shadow: 0 0 8px rgba(37, 117, 252, 0.8);
}
[data-theme="light"] .input-container:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}
.input-top-row { display: flex; align-items: center; width: 100%; min-height: var(--input-box-base-height); }
.input-prefix { font-size: 14px; color: var(--input-prefix-text); margin-right: 8px; white-space: nowrap; font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; display: none; }
.input-area {
    flex: 1;
    padding: 10px 0px;
    background: transparent;
    border: none;
    color: var(--input-text);
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    box-sizing: border-box;
    overflow-y: auto;
    font-family: "Inter", "Söhne", "ui-sans-serif", "system-ui", "-apple-system", "Segoe UI", "Roboto", "Ubuntu", "Cantarell", "Noto Sans", "sans-serif", "Helvetica Neue", "Arial", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    min-height: calc(var(--input-box-base-height) - 20px);
    max-height: 120px;
}
.input-area:focus { outline: none; }
.send-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
    flex-shrink: 0;

    /* 注入原 PRO MAX 的渐变色和阴影 */
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    box-shadow: 0 2px 5px rgba(106, 17, 203, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.send-button:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 8px rgba(106, 17, 203, 0.7);
}
.send-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #ffffff; /* 确保图标始终是白色的 */
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.input-bottom-actions { display: flex; align-items: center; padding-top: 8px; gap: 8px; height: var(--input-actions-height); overflow-x: auto; }
.text-search-button, .feature-button { padding: 6px 12px; border: none; border-radius: 16px; background-color: var(--feature-button-bg); color: var(--feature-button-text); font-size: 13px; cursor: pointer; transition: background-color 0.2s, color 0.2s; white-space: nowrap; font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
.text-search-button:hover, .feature-button:hover { background-color: var(--feature-button-hover-bg); }
.feature-button.active { background-color: var(--feature-button-active-bg); color: var(--feature-button-active-text); }
.search-loading { display: flex; align-items: center; margin-top: 8px; font-size: 0.9em; color: var(--summary-text); opacity: 0; transition: opacity 0.3s ease-in; }
.search-loading.show-loading { opacity: 1; }
.search-loading .spinner { width: 18px; height: 18px; border: 2px solid var(--input-text); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.search-results-card { background: var(--search-card-bg); padding: 15px; border-radius: 8px; max-height: 300px; overflow-y: auto; box-shadow: 0 4px 6px var(--search-card-shadow); margin-top: 10px; opacity: 0; transform: scale(0.98); transition: opacity 0.3s ease-in-out 0.1s, transform 0.3s ease-in-out 0.1s; }
.search-results-card.show-card { opacity: 1; transform: scale(1); }
.search-result-item { display: flex; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--article-card-border); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item img { width: 40px; height: 40px; border-radius: 4px; margin-right: 10px; flex-shrink: 0; }
.search-result-item .content { flex: 1; }
.search-result-item .title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.search-result-item .summary { font-size: 12px; color: var(--summary-text); line-height: 1.4; }
.view-all-button { display: inline-block; padding: 8px 16px; background: var(--view-all-button-bg); color: #fff; border-radius: 18px; cursor: pointer; margin-top: 10px; transition: transform 0.2s, background 0.2s; font-size: 14px; text-align: center; }
.view-all-button:hover { transform: scale(1.05); background: var(--view-all-button-hover); }
button:focus-visible, .sidebar-item:focus-visible, .article-card:focus-visible, .article-collection:focus-visible, .close-btn:focus-visible, .text-search-button:focus-visible, .feature-button:focus-visible, .view-all-button:focus-visible, .message-action-button:focus-visible, .message-action-info:focus-visible { outline: 2px solid var(--focus-outline-color); outline-offset: 2px; }
.theme-toggle:focus-visible svg { outline: 2px solid var(--focus-outline-color); outline-offset: 1px; }
.message.ai .content { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; }
.message.ai .content h1, .message.ai .content h2, .message.ai .content h3, .message.ai .content h4, .message.ai .content h5, .message.ai .content h6 { margin-top: 1em; margin-bottom: 0.5em; font-weight: 600; color: var(--text); } .message.ai .content h1 { font-size: 1.8em; } .message.ai .content h2 { font-size: 1.5em; } .message.ai .content h3 { font-size: 1.3em; }
.message.ai .content p { margin-bottom: 1em; } .message.ai .content ul, .message.ai .content ol { margin-bottom: 1em; padding-left: 2em; } .message.ai .content li { margin-bottom: 0.3em; } .message.ai .content a { color: var(--message-user-bg); text-decoration: none; } .message.ai .content a:hover { text-decoration: underline; } .message.ai .content blockquote { border-left: 4px solid var(--toolbar-border); padding-left: 1em; margin-left: 0; margin-bottom: 1em; color: var(--summary-text); } .message.ai .content hr { border: 0; border-top: 1px solid var(--toolbar-border); margin: 1.5em 0; }
.message.ai .content pre[class*="language-"] { background: var(--code-bg) !important; border-radius: 8px; padding: 1em; padding-top: 3.2em; overflow: auto; font-size: 0.875em; margin-bottom: 1em; position: relative; box-shadow: 0 4px 6px -1px var(--code-toolbar-item-shadow), 0 2px 4px -1px var(--code-toolbar-item-shadow); max-width: 100%; box-sizing: border-box; }
.message.ai .content code[class*="language-"], .message.ai .content pre[class*="language-"] code { font-family: 'Consolas', 'Courier New', monospace !important; color: inherit; line-height: 1.5; }
.message.ai .content p code, .message.ai .content li code { background-color: var(--input-container-bg); padding: 0.2em 0.4em; margin: 0; font-size: 85%; border-radius: 3px; font-family: 'Consolas', 'Courier New', monospace; }
.message.ai .content div.code-toolbar > .toolbar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 0.5em 0.75em; background: var(--code-toolbar-main-bg); border-bottom: 1px solid var(--toolbar-border); border-top-left-radius: 8px; border-top-right-radius: 8px; box-sizing: border-box; opacity: 1 !important; pointer-events: none; height: auto; }
.message.ai .content div.code-toolbar > .toolbar .toolbar-item { display: flex; align-items: center; pointer-events: all; }
.message.ai .content div.code-toolbar > .toolbar .toolbar-item:not(:first-child) { margin-left: 0.5em; }
.message.ai .content div.code-toolbar > .toolbar .toolbar-item > button, .message.ai .content div.code-toolbar > .toolbar .toolbar-item > a, .message.ai .content div.code-toolbar > .toolbar .toolbar-item > span { background: var(--code-toolbar-item-bg); color: var(--code-toolbar-item-text); font-size: 0.75em; padding: 0.3em 0.6em; border-radius: 4px; cursor: pointer; border: none; box-shadow: 0 1px 2px 0 var(--code-toolbar-item-shadow); display: inline-flex; align-items: center; transition: background-color 0.2s, color 0.2s, transform 0.1s, box-shadow 0.2s; font-weight: 500; white-space: nowrap; text-decoration: none; }
.message.ai .content div.code-toolbar > .toolbar .toolbar-item > button:hover, .message.ai .content div.code-toolbar > .toolbar .toolbar-item > a:hover, .message.ai .content div.code-toolbar > .toolbar .toolbar-item > span:hover { background: var(--code-toolbar-item-hover-bg); color: var(--code-toolbar-item-hover-text); box-shadow: 0 2px 4px 0 var(--code-toolbar-item-shadow); }
.message.ai .content div.code-toolbar > .toolbar .toolbar-item > button:active, .message.ai .content div.code-toolbar > .toolbar .toolbar-item > a:active { background: var(--code-toolbar-item-active-bg); color: #fff; transform: translateY(0px); box-shadow: inset 0 1px 2px 0 rgba(0,0,0,0.2); }

.message.ai .content div.code-toolbar > .toolbar .toolbar-item > span.language-name { background: var(--code-language-tag-bg); color: var(--code-language-tag-text); font-weight: 600; text-transform: uppercase; cursor: default; }
.message.ai .content div.code-toolbar > .toolbar .toolbar-item > span.language-name:hover { background: var(--code-language-tag-bg); color: var(--code-language-tag-text); box-shadow: 0 1px 2px 0 var(--code-toolbar-item-shadow); }
.message.ai .content div.code-toolbar > .toolbar .toolbar-item > button.copy-to-clipboard-button svg { width: 0.9em; height: 0.9em; margin-right: 0.4em; fill: var(--code-toolbar-icon-fill); transition: fill 0.2s; }
.message.ai .content div.code-toolbar > .toolbar .toolbar-item > button.copy-to-clipboard-button:hover svg { fill: var(--code-toolbar-item-hover-text); }
.message.ai .content div.code-toolbar > .toolbar .toolbar-item > button.copy-to-clipboard-button[data-copy-state="copy"]:hover svg { fill: var(--code-toolbar-item-hover-text); }
.message.ai .content div.code-toolbar > .toolbar .toolbar-item > button.copy-to-clipboard-button[data-copy-state="copied"] { background-color: var(--code-toolbar-success-bg) !important; color: var(--code-toolbar-success-icon-fill) !important; }
.message.ai .content div.code-toolbar > .toolbar .toolbar-item > button.copy-to-clipboard-button[data-copy-state="copied"] svg { fill: var(--code-toolbar-success-icon-fill) !important; }
[data-theme="light"] .message.ai .content pre[class*="language-"] { border: 1px solid var(--table-border-color); }
[data-theme="light"] .message.ai .content pre[class*="language-"] code { color: var(--prism-general-text) !important; }
[data-theme="light"] .message.ai .content .token.comment, [data-theme="light"] .message.ai .content .token.prolog, [data-theme="light"] .message.ai .content .token.doctype, [data-theme="light"] .message.ai .content .token.cdata { color: var(--prism-comment) !important; }
[data-theme="light"] .message.ai .content .token.string, [data-theme="light"] .message.ai .content .token.char, [data-theme="light"] .message.ai .content .token.attr-value, [data-theme="light"] .message.ai .content .token.url .token.content { color: var(--prism-string) !important; }
[data-theme="light"] .message.ai .content .token.punctuation { color: var(--prism-punctuation) !important; }
[data-theme="light"] .message.ai .content .token.operator, [data-theme="light"] .message.ai .content .token.entity, [data-theme="light"] .message.ai .content .token.url { color: var(--prism-operator) !important; }
[data-theme="light"] .message.ai .content .token.keyword, [data-theme="light"] .message.ai .content .token.selector, [data-theme="light"] .message.ai .content .token.atrule .token.rule { color: var(--prism-keyword) !important; }
[data-theme="light"] .message.ai .content .token.tag .token.tag > .token.punctuation:first-child, [data-theme="light"] .message.ai .content .token.tag .token.tag > .token.punctuation:last-child { color: var(--prism-punctuation) !important; }
[data-theme="light"] .message.ai .content .token.tag .token.tag > .token.class-name { color: var(--prism-keyword) !important; }
[data-theme="light"] .message.ai .content .token.tag .token.attr-name { color: var(--prism-function) !important; }
[data-theme="light"] .message.ai .content .token.function, [data-theme="light"] .message.ai .content .token.method { color: var(--prism-function) !important; }
[data-theme="light"] .message.ai .content .token.boolean, [data-theme="light"] .message.ai .content .token.number, [data-theme="light"] .message.ai .content .token.constant, [data-theme="light"] .message.ai .content .token.symbol, [data-theme="light"] .message.ai .content .token.deleted { color: var(--prism-number-boolean) !important; }
[data-theme="light"] .message.ai .content .token.class-name, [data-theme="light"] .message.ai .content .token.maybe-class-name { color: var(--prism-class-name) !important; }
.message.ai .content table { border-collapse: collapse; width: auto; margin-bottom: 1em; font-size: 0.95em; border: 1px solid var(--table-border-color); } .message.ai .content th, .message.ai .content td { border: 1px solid var(--table-border-color); padding: 8px 12px; text-align: left; } .message.ai .content th { background-color: var(--input-container-bg); font-weight: 600; }

.ai-thinking-loader { padding: 10px 0; font-style: italic; color: var(--summary-text); display: flex; align-items: center; min-height: 20px; } .ai-thinking-loader .spinner { width: 16px; height: 16px; border: 2px solid var(--summary-text); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; margin-right: 10px; flex-shrink: 0; }
.upload-file-button { width: 36px; height: 36px; border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color 0.2s, transform 0.2s; margin-left: 8px; flex-shrink: 0; background-color: var(--feature-button-bg); color: var(--feature-button-text); } .upload-image-button:hover { background-color: var(--feature-button-hover-bg); /* 悬停颜色 */ transform: scale(1.05); } .upload-image-button svg { width: 18px; /* 图标大小调整 */ height: 18px; fill: currentColor; }
.message.user .user-image-display { max-width: 60%; margin-bottom: 8px; flex-shrink: 0; /* 防止被压缩 */ align-self: flex-end; }
.message.user .user-image-display img { width: 100%; height: auto; border-radius: 12px; display: block; }
.image-preview-container { display: flex; gap: 8px; padding: 8px 0; flex-wrap: wrap; border-top: 1px solid var(--toolbar-border); margin-top: 8px; }
.image-preview-item { position: relative; width: 60px; /* 预览图大小 */ height: 60px; border-radius: 4px; overflow: hidden; /* 确保图片在圆角内 */ border: 1px solid var(--toolbar-border); flex-shrink: 0; /* 防止被压缩 */ }
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; /* 保持图片比例并填充 */ }
.image-preview-item .delete-image-btn { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; background-color: rgba(0, 0, 0, 0.6); color: white; border: none; border-radius: 50%; font-size: 12px; line-height: 18px; text-align: center; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; opacity: 0; /* 默认隐藏 */ transition: opacity 0.2s; z-index: 10; /* 确保在图片之上 */ } .image-preview-item:hover .delete-image-btn { opacity: 1; /* 悬停时显示删除按钮 */ } .image-preview-item .delete-image-btn svg { width: 10px; height: 10px; }
.article-preview-container-in-chat { margin-top: 15px; border: 1px solid var(--toolbar-border); border-radius: 8px; padding: 15px; background-color: var(--input-container-bg); /* 复用输入框容器背景色或自定义 */ }
.article-preview-container-in-chat .section-title { font-size: 15px; /* 稍微小一点的标题 */ margin-top: 0; margin-bottom: 12px; color: var(--text); }
.article-preview-item-in-chat { padding: 10px 0; border-bottom: 1px solid var(--article-card-border); cursor: default; /* 预览项本身不可直接点击阅读，而是通过父容器的按钮 */ } .article-preview-item-in-chat:last-child { border-bottom: none; padding-bottom: 0; } .article-preview-item-in-chat .title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 4px; /* 多行省略 */ display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; } .article-preview-item-in-chat .source { font-size: 11px; color: var(--source-text); margin-top: 5px; display: flex; align-items: center; } .article-preview-item-in-chat .source img { width: 14px; height: 14px; border-radius: 50%; margin-right: 5px; }

.loading-articles-placeholder { display: flex; align-items: center; margin-top: 15px; padding: 10px; font-size: 14px; color: var(--summary-text); } .loading-articles-placeholder .spinner { width: 18px; height: 18px; border: 2px solid var(--summary-text); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; margin-right: 10px; }
.sidebar-item#newChatButton { /* 突出显示新对话按钮 */ font-weight: 600; color: var(--message-user-bg); /* 使用主色调 */ border-left-color: var(--message-user-bg); /* 突出显示左侧边框 */ display: flex; /* 让图标和文字水平对齐 */ align-items: center; padding-left: 17px; /* 保持与现有项的对齐 */ padding-right: 17px; }
.sidebar-item#newChatButton:hover { background: var(--sidebar-hover); border-left-color: var(--message-user-bg); }
.sidebar-item#newChatButton svg { margin-right: 8px; /* 图标与文字的间距 */ fill: currentColor; /* 使SVG颜色继承父元素文字颜色 */ }
.sidebar.collapsed .sidebar-item#newChatButton { justify-content: center; /* 图标居中 */ padding: 10px 0; /* 调整内边距 */ } .sidebar.collapsed .sidebar-item#newChatButton svg { margin-right: 0; } .sidebar.collapsed .sidebar-item#newChatButton:not(svg) { font-size: 0; line-height: 0; }

#chatHistoryList { flex-grow: 1; overflow-y: auto; padding-top: 10px; padding-bottom: 10px; }

.chat-history-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 17px; cursor: pointer; transition: background 0.2s, border-left-color 0.2s; font-size: 14px; font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid transparent; }
.chat-history-item-title { flex-grow: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-history-delete-btn { background: none; border: none; color: var(--source-text); cursor: pointer; font-size: 16px; line-height: 1; margin-left: 10px; padding: 2px 4px; border-radius: 4px; opacity: 0; transition: opacity 0.2s, color 0.2s, background-color 0.2s; flex-shrink: 0; }
.chat-history-item:hover .chat-history-delete-btn { opacity: 1; }
.chat-history-delete-btn:hover { color: var(--prism-keyword); background-color: rgba(255, 0, 0, 0.1); }

.sidebar.collapsed .chat-history-delete-btn { display: none; }
.chat-history-item:hover { background: var(--sidebar-hover); border-left-color: var(--message-user-bg); }

.chat-history-item.active { background: var(--sidebar-hover); border-left-color: var(--message-user-bg); font-weight: 600; }
.sidebar.collapsed .chat-history-item { font-size: 0; line-height: 0; padding: 10px 0; text-align: center; }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); justify-content: center; align-items: center; z-index: 2000; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.show { display: flex; opacity: 1; }

.modal-content { background-color: var(--background); color: var(--text); border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); width: 90%; max-width: 400px; transform: translateY(-20px); transition: transform 0.3s ease; opacity: 0; display: flex; flex-direction: column; }
.modal-overlay.show .modal-content { transform: translateY(0); opacity: 1; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--toolbar-border); }
.modal-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.modal-close-btn { background: transparent; border: none; font-size: 24px; color: var(--close-btn); cursor: pointer; line-height: 1; padding: 0 5px; transition: color 0.2s; }
.modal-close-btn:hover { color: var(--close-btn-hover); }
.modal-body { padding: 20px; font-size: 14px; line-height: 1.6; }
.modal-body p { margin-bottom: 10px; }
.modal-dialog-title-placeholder { font-weight: 600; color: var(--message-user-bg); /* 使用主色调突出显示 */ }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 20px; border-top: 1px solid var(--toolbar-border); }
.modal-cancel-btn, .modal-confirm-btn { padding: 8px 15px; border-radius: 6px; cursor: pointer; font-size: 14px; transition: background-color 0.2s, color 0.2s; border: none; }
.modal-cancel-btn { background-color: var(--feature-button-bg); color: var(--feature-button-text); }
.modal-cancel-btn:hover { background-color: var(--feature-button-hover-bg); }
.modal-confirm-btn { background-color: var(--message-user-bg); color: var(--message-user-text); }
.modal-confirm-btn:hover { background-color: var(--article-collection-hover); }
.model-selector-container { position: relative; z-index: 10100; display: flex; align-items: center; padding: 6px 12px; border-radius: 16px; background-color: var(--feature-button-bg); color: var(--feature-button-text); font-size: 13px; cursor: pointer; transition: background-color 0.2s, color 0.2s; white-space: nowrap; font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; margin-right: 8px; /* 与发送按钮的间距 */ flex-shrink: 0; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.model-selector-container:hover { background-color: var(--feature-button-hover-bg); }
.model-selector-container .selected-model-text { margin-right: 4px; /* 文本和箭头的间距 */ }
.model-selector-container .dropdown-arrow { transition: transform 0.2s; transform: rotate(0deg); /* 默认向下 */ }
.model-selector-container.open .dropdown-arrow { transform: rotate(180deg); /* 展开时向上 */ }
/* 下拉菜单 */
.model-dropdown-menu { position: fixed; background-color: var(--toolbar-bg); border-radius: 8px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); padding: 5px 0; display: none; z-index: 2000; min-width: max-content; transform-origin: bottom center; transform: scaleY(0); opacity: 0; transition: transform 0.2s ease-out, opacity 0.2s ease-out, background-color 0.2s; /* 增加背景色过渡 */ border: 1px solid var(--toolbar-border); overflow: hidden; }
.model-selector-container.open .model-dropdown-menu { display: block; transform: scaleY(1); opacity: 1; }
.model-dropdown-item { padding: 10px 15px; cursor: pointer; color: var(--text); transition: background-color 0.2s, color 0.2s; white-space: nowrap; font-size: 14px; font-weight: 400; display: block; text-align: left; }
.model-dropdown-item:hover { background-color: var(--sidebar-hover); color: var(--text); }
.model-dropdown-item.active {
    background-color: transparent;
    color: var(--code-toolbar-item-hover-text);
    font-weight: 500;
}

.text-search-button, .feature-button, .model-selector-container { flex-shrink: 0; }
/* 无问/N1模型欢迎界面特有样式 */
.model-welcome-message { text-align: center; margin-top: auto; margin-bottom: auto; padding-top: 80px; padding-bottom: 50px; width: 100%; }
.model-welcome-message .welcome-title { font-size: 2.5em; /* 更大的字体 */ font-weight: 700; color: var(--text); margin-bottom: 20px; }
.model-welcome-buttons-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; padding: 20px; max-width: 800px; margin: 0 auto; }
.model-prompt-button { background-color: var(--feature-button-bg); color: var(--feature-button-text); padding: 12px 25px; border-radius: 20px; /* 圆角按钮 */ border: 1px solid var(--toolbar-border); /* 细边框 */ font-size: 15px; cursor: pointer; transition: background-color 0.2s, transform 0.2s; white-space: nowrap; /* 不换行 */ box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.model-prompt-button:hover { background-color: var(--feature-button-hover-bg); transform: translateY(-2px); /* 轻微上浮效果 */ box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.chat-box { padding: 20px; padding-bottom: 40px; max-width: 770px; margin: 0 auto; width: 100%; }

.modal-content.category-modal { max-width: 500px; /* 领域选择模态框可以窄一些 */ }
.category-list { display: flex; flex-wrap: wrap; gap: 12px; /* 按钮之间的间距 */ justify-content: center; /* 按钮居中 */ padding: 15px 20px; /* 调整内边距 */ }
.category-list .category-button { background-color: var(--feature-button-bg); /* 复用 feature-button 的背景 */ color: var(--feature-button-text); /* 复用 feature-button 的文本色 */ padding: 10px 20px; border-radius: 20px; /* 圆角按钮 */ border: 1px solid var(--toolbar-border); /* 细边框 */ font-size: 15px; cursor: pointer; transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s; white-space: nowrap; box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 轻微阴影 */ }
.category-list .category-button:hover { background-color: var(--feature-button-hover-bg); transform: translateY(-2px); /* 轻微上浮效果 */ box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
/* 文章列表展示模态框内容样式 */
.modal-content.article-display-modal { max-width: 800px; /* 文章列表模态框可以宽一些 */ height: 90%; /* 让文章列表占据更多屏幕空间 */ display: flex; flex-direction: column; }
.article-display-modal .modal-header { flex-shrink: 0; /* 防止头部收缩 */ }
.article-display-modal .modal-body { flex-grow: 1; /* 让内容区填充剩余空间 */ overflow-y: auto; /* 内容区内部滚动 */ padding: 15px 20px; display: flex; flex-direction: column; /* 内部元素垂直排列 */ }
.article-list-container { flex-grow: 1; /* 让文章列表容器填充可用空间 */ }

.article-display-modal .article-card { padding: 15px 0; /* 调整卡片内边距，取消左右内边距 */ border-bottom: 1px solid var(--article-card-border); cursor: pointer; /* 可点击 */ transition: background 0.2s; }
.article-display-modal .article-card:last-child { border-bottom: none; }
.article-display-modal .article-card:hover { background: var(--article-card-hover); }
.article-display-modal .article-card .title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 2; /* 标题最多显示2行 */ -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.article-display-modal .article-card .date { font-size: 12px; color: var(--date-text); margin-bottom: 8px; }
.article-display-modal .article-card .summary { font-size: 14px; color: var(--summary-text); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; /* 摘要最多显示3行 */ -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.article-display-modal .article-card .source { font-size: 12px; color: var(--source-text); margin-top: 8px; display: flex; align-items: center; }
.article-display-modal .article-card .source img { width: 16px; height: 16px; border-radius: 50%; margin-right: 5px; }
/* 加载更多按钮 */
.load-more-btn { display: block; /* 占据整行 */ width: fit-content; /* 内容适应宽度 */ margin: 20px auto 0; /* 居中显示，顶部有间距 */ padding: 10px 25px; background-color: var(--article-collection-bg); color: var(--article-collection-text); border: none; border-radius: 20px; font-size: 14px; cursor: pointer; transition: background-color 0.2s, transform 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.load-more-btn:hover { background-color: var(--article-collection-hover); transform: translateY(-1px); }
.load-more-btn:disabled { background-color: var(--feature-button-hover-bg); /* 禁用状态的背景 */ color: var(--summary-text); /* 禁用状态的文字颜色 */ cursor: not-allowed; transform: none; box-shadow: none; }
/* 模态框底部分页信息 */
.article-display-footer { display: flex; justify-content: center; align-items: center; font-size: 13px; color: var(--summary-text); padding: 10px 20px; border-top: 1px solid var(--toolbar-border); /* 与页眉分隔线一致 */ flex-shrink: 0; }
.article-display-footer .current-page-info span { font-weight: 600; color: var(--text); }
/* 滚动条样式（用于模态框内容区） */
.modal-body.article-list-content::-webkit-scrollbar { width: 8px; height: 8px; } .modal-body.article-list-content::-webkit-scrollbar-track { background: var(--toolbar-bg); border-radius: 10px; } .modal-body.article-list-content::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; } .modal-body.article-list-content::-webkit-scrollbar-thumb:hover { background: #777; }

.articles-loading-indicator { display: flex; align-items: center; justify-content: center; padding: 20px; font-size: 16px; color: var(--summary-text); text-align: center; }
.articles-loading-indicator .spinner { width: 24px; height: 24px; border: 3px solid var(--summary-text); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; margin-right: 15px; }

.no-articles-message { text-align: center; color: var(--summary-text); font-size: 15px; padding: 20px; }
#user-avatar-image {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 50%;
    border: none;
    padding: 0;
    margin: 0;
    background-color: transparent;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--user-avatar-bg);
    color: var(--user-avatar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border: none;
    overflow: hidden; /* 确保图片超出部分被裁剪成圆形 */
    margin-right: 20px;
}
.user-avatar:hover {
    background-color: var(--user-avatar-hover-bg);
}
.user-avatar svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.privilege-tag {
    /* 基础显示和排版 */
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 10px;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    cursor: default;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 普通用户样式 */
.privilege-tag-default {
    background-color: var(--feature-button-bg); /* 复用按钮背景色 */
    color: var(--summary-text); /* 灰色文字 */
    border: 1px solid var(--toolbar-border); /* 边框 */
}

/* 无问AI会员样式 */
.privilege-tag-member {
    background-color: var(--article-collection-bg); /* 使用蓝色系作为会员色 */
    color: var(--article-collection-text); /* 白色文字 */
    border: 1px solid var(--article-collection-bg); /* 与背景同色边框 */
    /* 可以添加轻微的动画或阴影来强调 */
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.3); /* 蓝色阴影 */
}

.privilege-tag-member:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(59, 130, 246, 0.4);
}



.privilege-tag-pro {
    /* 突出显示，可以使用渐变、金色或更鲜明的颜色 */
    background: linear-gradient(90deg, #FFD700, #FFA500); /* 金色渐变 */
    color: #333333; /* 深色文字以对比金色背景 */
    border: 1px solid #FFD700; /* 金色边框 */
    font-weight: 700; /* 更粗的字体 */
    /* 增加阴影以体现尊贵 */
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.5); /* 金色阴影 */
}

.privilege-tag-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(255, 215, 0, 0.6);
}

/* 确保user-profile-container的flex布局能正确排列它们 */
.user-profile-container {
    position: relative;
    margin-left: auto; /* 将用户头像和特权标签推到最右边 */
    display: flex; /* 使用flex布局 */
    align-items: center; /* 垂直居中对齐 */
    /* 可能需要调整与其他元素的间距 */
}

.modal-content.billing-modal-content {
    max-width: 650px; /* 适当放宽宽度以容纳表格 */
}

.billing-intro {
    text-align: center;
    margin-bottom: 20px;
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
}

.billing-table-container {
    overflow-x: auto; /* 当表格内容过宽时允许水平滚动 */
    margin-bottom: 20px;
    border: 1px solid var(--toolbar-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.billing-table-container table {
    width: 100%;
    border-collapse: collapse;
    min-width: 550px; /* 确保在小屏幕下也有最小宽度 */
}

.billing-table-container th,
.billing-table-container td {
    border: 1px solid var(--table-border-color);
    padding: 12px 15px;
    text-align: center;
    font-size: 14px;
    color: var(--text);
    vertical-align: middle;
}

.billing-table-container thead th {
    background-color: var(--input-container-bg);
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.billing-table-container tbody tr:nth-child(even) {
    background-color: var(--code-bg); /* 交替行颜色 */
}

.billing-table-container tbody td {
    background-color: var(--background); /* 默认背景，被行颜色覆盖 */
}
[data-theme="light"] .billing-table-container tbody tr:nth-child(even) {
    background-color: #f8f8f8; /* 亮色主题下的交替行颜色 */
}

.billing-table-container tbody td.highlight-member {
    color: var(--message-user-bg); /* 会员积分使用主色调 */
    font-weight: 600;
}

.billing-table-container tbody td.highlight-free {
    color: var(--prism-keyword); /* 免费积分使用警告色或突出色 */
    font-weight: 600;
}

.billing-table-container tbody td.not-available {
    color: var(--summary-text);
    font-style: italic;
    background-color: var(--feature-button-hover-bg);
}

.billing-note {
    font-size: 13px;
    color: var(--source-text);
    text-align: center;
    line-height: 1.5;
    margin-top: 10px;
}

.modal-footer .modal-confirm-btn {
    background-color: var(--article-collection-bg);
    color: var(--article-collection-text);
}

.modal-footer .modal-confirm-btn:hover {
    background-color: var(--article-collection-hover);
}


.modal-content.my-rights-modal-content {
    max-width: 480px;
    max-height: 520px;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.my-rights-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    align-items: stretch;
}

.user-summary-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border-radius: 10px;
    background-color: var(--input-container-bg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    z-index: 1;
}

.user-summary-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    transition: background 0.3s ease;
    z-index: -1;
    opacity: 0.2;
}

.user-summary-section.is-member::before {
    background: var(--article-collection-bg);
}

.user-summary-section.is-pro::before {
    background: linear-gradient(90deg, #FFD700, #FFA500);
}


.user-avatar-in-modal {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid var(--message-user-bg);
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--background);
}

.user-details-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.nickname-and-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.nickname-in-modal {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text);
    margin-right: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.member-status-tag {
    padding: 5px 12px;
    border-radius: 18px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: none;
    text-transform: uppercase;
    flex-shrink: 0;
}

.member-status-tag.status-default {
    background-color: var(--feature-button-bg);
    color: var(--summary-text);
    border: 1px solid var(--toolbar-border);
}

.member-status-tag.status-member {
    background-color: var(--article-collection-bg);
    color: var(--article-collection-text);
    border: 1px solid var(--article-collection-bg);
}

.member-status-tag.status-pro {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    color: #333333;
    border: 1px solid #FFD700;
}

.personal-signature {
    font-size: 0.95em;
    color: var(--summary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}


.balance-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 10px;
}

.balance-section h4 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--toolbar-border);
}

.balance-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: var(--input-container-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.balance-item-row .label {
    font-size: 1em;
    color: var(--summary-text);
    font-weight: 500;
}

.balance-item-row .value {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text);
}

.balance-item-row .value.member-points-value {
    color: var(--message-user-bg);
}

.balance-item-row .value.free-points-value {
    color: var(--prism-keyword);
}

.membership-status-section {
    text-align: center;
    margin-top: 10px;
    padding: 0 10px;
}

.membership-text {
    font-size: 1em;
    color: var(--text);
    line-height: 1.4;
    font-weight: 500;
    padding: 8px 12px;
    background-color: var(--input-container-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
}

.membership-text.expired {
    color: var(--prism-keyword);
    font-weight: 600;
}

.membership-text.active-member {
    color: var(--message-user-bg);
    font-weight: 600;
}

.usage-stats-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 10px;
}

.usage-stats-section h4 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    margin-bottom: 0;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--toolbar-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.stats-item {
    background-color: var(--input-container-bg);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    min-height: 50px;
}

.stats-item span:first-child {
    font-size: 0.85em;
    color: var(--summary-text);
    margin-bottom: 4px;
}

.stats-item span:last-child {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text);
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--toolbar-border);
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

@media (max-width: 500px) {
    .modal-content.my-rights-modal-content {
        max-width: 95%;
    }
    .my-rights-body {
        padding: 15px;
    }
    .user-summary-section {
        padding: 15px 10px;
    }
    .nickname-in-modal {
        font-size: 1.3em;
    }
    .member-status-tag {
        font-size: 0.8em;
    }
    .personal-signature {
        font-size: 0.9em;
    }
    .balance-section h4,
    .usage-stats-section h4 {
        font-size: 1em;
        margin-bottom: 10px;
    }
    .balance-item-row {
        font-size: 0.95em;
        padding: 6px 10px;
    }
    .balance-item-row .value {
        font-size: 1.1em;
    }
    .membership-text {
        font-size: 0.95em;
        padding: 6px 10px;
    }
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }
    .stats-item {
        font-size: 0.9em;
        padding: 8px;
    }
    .stats-item span:first-child {
        font-size: 0.8em;
    }
    .stats-item span:last-child {
        font-size: 1em;
    }
    .modal-footer {
        padding: 10px 15px;
    }
}


.modal-content.invite-modal-content {
    max-width: 450px;
}

.invite-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.invite-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    background-color: var(--input-container-bg);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.invite-label {
    font-size: 15px;
    color: var(--summary-text);
    white-space: nowrap;
    margin-right: 10px;
}

.invite-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.invite-value.invite-price {
    color: var(--message-user-bg);
}

.invite-link-container {
    display: flex;
    align-items: center;
    width: 90%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    gap: 1px;
}

.invite-link-display {
    flex-grow: 1;
    padding: 10px 15px;
    font-size: 14px;
    color: var(--input-text);
    background-color: var(--input-container-bg);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-right: 1px solid var(--toolbar-border);
}
.invite-link-display::-webkit-scrollbar {
    display: none;
}


.copy-invite-link-btn {
    background-color: var(--message-user-bg);
    color: var(--message-user-text);
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.copy-invite-link-btn:hover {
    background-color: var(--article-collection-hover);
    transform: none;
}

.copy-invite-link-btn svg {
    fill: currentColor;
    width: 16px;
    height: 16px;
}

.invite-note {
    font-size: 13px;
    color: var(--source-text);
    text-align: center;
    margin-top: 10px;
}

.invite-price-note {
    font-weight: 600;
    color: var(--message-user-bg);
}

.modal-footer #inviteShareBtn {
    background-color: var(--article-collection-bg);
    color: var(--article-collection-text);
    transition: background-color 0.2s;
}

.modal-footer #inviteShareBtn:hover {
    background-color: var(--article-collection-hover);
}
.model-intro-text {
    font-size: 0.95em;
    color: var(--summary-text);
    margin-top: 10px;
    margin-bottom: 20px;
    line-height: 1.6;
    max-width: 600px;
    text-align: center;
    padding: 0 20px;
}
.model-welcome-message .message-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.follow-up-questions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding-top: 8px;
    border-top: 1px dashed var(--toolbar-border);
    justify-content: flex-start;
}

.follow-up-questions-container .feature-button {
    background-color: var(--input-container-bg);
    color: var(--text);
    border: 1px solid var(--toolbar-border);
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.follow-up-questions-container .feature-button:hover {
    background-color: var(--feature-button-hover-bg);
    transform: translateY(-1px);
}

.follow-up-loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    padding: 0;
    height: 8px;
    width: 80%;
    max-width: 200px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--input-container-bg);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    background-color: var(--toolbar-border);
}

.follow-up-loading-indicator.show {
    opacity: 1;
}

.follow-up-loading-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
    var(--toolbar-border) 0%,
    var(--summary-text) 50%,
    var(--toolbar-border) 100%
    );
    background-size: 200% 100%;
    animation: gradient-breathe 2s infinite ease-in-out;
}

@keyframes gradient-breathe {
    0% { background-position: -100% 0; }
    50% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.modal-content.share-modal-content {
    max-width: 550px;
}

.share-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.share-link-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.share-link-section .share-label {
    font-size: 15px;
    color: var(--summary-text);
    margin-bottom: 5px;
}

.share-link-container {
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--toolbar-border);
}

.share-link-input {
    flex-grow: 1;
    padding: 10px 15px;
    font-size: 14px;
    color: var(--input-text);
    background-color: var(--input-container-bg);
    border: none;
    outline: none;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.share-link-input::-webkit-scrollbar {
    display: none;
}

.copy-share-link-btn {
    background-color: var(--message-user-bg);
    color: var(--message-user-text);
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.copy-share-link-btn:hover {
    background-color: var(--article-collection-hover);
    transform: none;
}

.copy-share-link-btn svg {
    fill: currentColor;
    width: 16px;
    height: 16px;
}

.generate-share-link-btn {
    padding: 8px 20px;
    background-color: var(--article-collection-bg);
    color: var(--article-collection-text);
    border: none;
    border-radius: 18px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.generate-share-link-btn:hover {
    background-color: var(--article-collection-hover);
    transform: translateY(-1px);
}
.generate-share-link-btn:disabled {
    background-color: var(--feature-button-hover-bg);
    color: var(--summary-text);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.share-records-section {
    width: 100%;
    margin-top: 15px;
    border-top: 1px dashed var(--toolbar-border);
    padding-top: 20px;
}

.share-records-section .privacy-note {
    font-size: 13px;
    color: var(--source-text);
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.5;
}

.share-records-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.share-records-list::-webkit-scrollbar {
    width: 8px;
}
.share-records-list::-webkit-scrollbar-track {
    background: var(--toolbar-bg);
}
.share-records-list::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}
.share-records-list::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.share-record-item {
    display: flex;
    align-items: center;
    background-color: var(--input-container-bg);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    justify-content: space-between;
}

.share-record-item .record-link {
    flex-grow: 1;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
    text-decoration: none;
}

.share-record-delete-btn {
    background: none;
    border: none;
    color: var(--source-text);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
    flex-shrink: 0;
}

.share-record-delete-btn:hover {
    color: var(--prism-keyword);
    background-color: rgba(255, 0, 0, 0.1);
}

.no-records-message {
    text-align: center;
    color: var(--summary-text);
    font-size: 14px;
    padding: 10px;
}

.upgrade-floating-card {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--input-container-bg);
    color: var(--text);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    border: 1px solid var(--toolbar-border);
    max-width: 320px;
    box-sizing: border-box;
}

.upgrade-floating-card.show {
    opacity: 1;
    transform: translateY(0);
}

.upgrade-floating-card .card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}

.upgrade-floating-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--message-user-bg);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upgrade-floating-card .card-subtitle {
    font-size: 12px;
    color: var(--summary-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upgrade-floating-card .upgrade-button {
    background-color: var(--message-user-bg);
    color: var(--message-user-text);
    border: none;
    border-radius: 18px;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.upgrade-floating-card .upgrade-button:hover {
    background-color: var(--article-collection-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .upgrade-floating-card {
        bottom: calc(var(--input-area-total-height) + 20px);
        right: 20px;
        left: 20px;
        max-width: unset;
    }
}

.close-floating-card-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--close-btn);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.close-floating-card-btn:hover {
    color: var(--close-btn-hover);
    background-color: rgba(128, 128, 128, 0.1);
}

.research-confirmation-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

.research-confirmation-wrapper {
    background-color: var(--input-container-bg);
    border-radius: 12px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--toolbar-border);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0 !important;
    transform: translateY(15px) !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
}

.research-confirmation-wrapper.show {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}

.research-confirm-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text) !important;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
}

.research-topic-input {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid var(--toolbar-border);
    border-radius: 8px;
    background-color: var(--background);
    color: var(--text);
    font-size: 1.05em !important;
    line-height: 1.5;
    resize: none;
    min-height: 38px;
    max-height: 100px;
    margin-bottom: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.research-topic-input::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.research-topic-input::-webkit-scrollbar-track {
    background: var(--toolbar-bg);
    border-radius: 4px;
}
.research-topic-input::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}
.research-topic-input::-webkit-scrollbar-thumb:hover {
    background: #777;
}


.research-topic-input:focus {
    outline: 2px solid var(--focus-outline-color);
    border-color: transparent;
}

.start-research-btn {
    display: block;
    width: fit-content;
    margin: 0 auto 15px;
    padding: 10px 25px;
    background-color: var(--article-collection-bg);
    color: var(--article-collection-text);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.start-research-btn:hover {
    background-color: var(--article-collection-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.research-hint-text {
    font-size: 12px;
    color: var(--summary-text) !important;
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
}


.deep-research-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    border: none;
    box-shadow: none;
    padding: 0;
}

.deep-research-wrapper {
    border-radius: 12px;
    border: 1px solid var(--toolbar-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 0;
    max-width: 900px;
    width: 90%;
    display: flex;
    min-height: 450px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.deep-research-wrapper.show {
    opacity: 1;
    transform: translateY(0);
}

.deep-research-left-panel {
    flex-shrink: 0;
    width: 250px;
    padding: 20px;
    border-right: 1px solid var(--toolbar-border);
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    background-color: var(--code-bg);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.deep-research-right-panel {
    flex-grow: 1;
    padding: 20px;
    height: 400px;
    overflow-y: auto;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: #555 var(--toolbar-bg);
    background-color: var(--background);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}
.deep-research-right-panel::-webkit-scrollbar {
    width: 8px;
}
.deep-research-right-panel::-webkit-scrollbar-track {
    background: var(--toolbar-bg);
    border-radius: 4px;
}
.deep-research-right-panel::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}
.deep-research-right-panel::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.research-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 15px;
    color: var(--text);
}

.research-status-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.research-duration {
    font-size: 0.9em;
    color: var(--summary-text);
    margin: 0;
}

.research-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.research-step-item {
    display: flex;
    align-items: center;
    font-size: 0.95em;
    color: var(--summary-text);
    transition: color 0.2s;
    font-weight: 500;
}

.research-step-item.active {
    color: var(--text);
    font-weight: 600;
}

.research-step-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.research-step-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.research-step-icon.pending svg {
    color: var(--summary-text);
}
.research-step-icon.active .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--message-user-bg);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.research-step-icon.completed svg {
    color: #16a34a;
}

.research-stream-content h1,
.research-stream-content h2,
.research-stream-content h3 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.2em;
    margin-bottom: 0.6em;
    border-bottom: none;
    padding-bottom: 0;
}
.research-stream-content p {
    font-size: 0.88em;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 0.8em;
}
.research-stream-content ul, .research-stream-content ol {
    margin-bottom: 0.8em;
    padding-left: 1.8em;
    color: var(--text);
}
.research-stream-content li {
    font-size: 0.88em;
    margin-bottom: 0.3em;
    color: var(--text);
}
.research-stream-content a {
    color: var(--message-user-bg);
    text-decoration: none;
}
.research-stream-content a:hover {
    text-decoration: underline;
}
.research-stream-content code {
    background-color: var(--input-container-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.8em;
}

.research-report-display {
    width: 100%;
    margin-top: 20px;
    background-color: var(--input-container-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--toolbar-border);
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.research-report-display.show {
    opacity: 1;
    transform: translateY(0);
}

.report-header-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--toolbar-border);
    background-color: var(--code-toolbar-main-bg);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.report-header-toolbar .report-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--code-toolbar-item-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-header-toolbar .report-title svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.report-action-buttons {
    display: flex;
    gap: 10px;
}

.report-action-buttons .message-action-button {
    background: var(--code-toolbar-item-bg);
    color: var(--code-toolbar-item-text);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.report-action-buttons .message-action-button:hover {
    background-color: var(--code-toolbar-item-hover-bg);
    color: var(--code-toolbar-item-hover-text);
}

.report-content-body {
    padding: 20px;
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--text);
    overflow-y: auto;
    max-height: 600px;
    scrollbar-width: thin;
    scrollbar-color: #555 var(--toolbar-bg);
}

.report-content-body::-webkit-scrollbar {
    width: 8px;
}
.report-content-body::-webkit-scrollbar-track {
    background: var(--toolbar-bg);
    border-radius: 4px;
}
.report-content-body::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}
.report-content-body::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.report-content-body h1, .report-content-body h2, .report-content-body h3, .report-content-body h4, .report-content-body h5, .report-content-body h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: var(--text);
}
.report-content-body h1 { font-size: 1.8em; } .report-content-body h2 { font-size: 1.5em; } .report-content-body h3 { font-size: 1.3em; }
.report-content-body p { margin-bottom: 1em; }
.report-content-body ul, .report-content-body ol { margin-bottom: 1em; padding-left: 2em; }
.report-content-body li { margin-bottom: 0.3em; }
.report-content-body a { color: var(--message-user-bg); text-decoration: none; }
.report-content-body a:hover { text-decoration: underline; }
.report-content-body pre[class*="language-"] {
    background: var(--code-bg) !important;
    border-radius: 8px;
    padding: 1em;
    overflow: auto;
    font-size: 0.875em;
    margin-bottom: 1em;
    box-shadow: 0 4px 6px -1px var(--code-toolbar-item-shadow), 0 2px 4px -1px var(--code-toolbar-item-shadow);
    max-width: 100%;
    box-sizing: border-box;
}
.report-content-body code[class*="language-"], .report-content-body pre[class*="language-"] code {
    font-family: 'Consolas', 'Courier New', monospace !important;
    color: inherit;
    line-height: 1.5;
}
.report-content-body p code, .report-content-body li code {
    background-color: var(--input-container-bg);
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
}
.report-content-body table { border-collapse: collapse; width: auto; margin-bottom: 1em; font-size: 0.95em; border: 1px solid var(--table-border-color); }
.report-content-body th, .report-content-body td { border: 1px solid var(--table-border-color); padding: 8px 12px; text-align: left; }
.report-content-body th { background-color: var(--input-container-bg); font-weight: 600; }

@media (max-width: 768px) {
    .research-report-display {
        padding: 15px;
    }
    .report-header-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .report-action-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    .report-content-body {
        padding: 15px;
    }
}


@media (max-width: 768px) {
    .deep-research-wrapper {
        flex-direction: column;
        padding: 15px;
        min-height: unset;
    }
    .deep-research-left-panel {
        width: 100%;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--toolbar-border);
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    .deep-research-right-panel {
        padding-left: 0;
        height: 300px;
    }
}

#notificationBody {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

#notificationBody h4 {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

#notificationBody p {
    margin-bottom: 12px;
}

#notificationBody .notification-meta {
    text-align: right;
    font-size: 13px;
    color: var(--summary-text);
    margin-top: 20px;
    border-top: 1px solid var(--toolbar-border);
    padding-top: 10px;
}

#promoBody {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 25px;
}

.promo-icon {
    margin-bottom: 15px;
}

.promo-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.promo-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--summary-text);
    max-width: 90%;
}

#gotoSaleBtn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.model-welcome-message .avatar {
    display: none;
}

.drag-drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background);
    z-index: 9998;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.drag-drop-overlay.visible {
    display: flex;
    opacity: 0.95;
}

.drag-drop-overlay .drag-drop-content {
    text-align: center;
    color: var(--text);
    padding: 40px;
    border: 2px dashed var(--message-user-bg);
    border-radius: 12px;
    background-color: var(--input-container-bg);
}

.drag-drop-overlay .drag-drop-content svg {
    color: var(--message-user-bg);
    margin-bottom: 15px;
}

.drag-drop-overlay .drag-drop-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    color: var(--text);
}

.drag-drop-overlay .drag-drop-content p {
    margin: 0 0 20px 0;
    font-size: 1em;
    color: var(--summary-text);
}

.supported-files-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--source-text);
    font-size: 13px;
}

.file-type-tag {
    background-color: var(--feature-button-bg);
    color: var(--feature-button-text);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--toolbar-border);
    font-weight: 500;
}
.model-selector-container.disabled {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

#disclaimers_modal {
    display: none;
    z-index: 9999;
}

#disclaimers_modal.show {
    display: flex;
}

#disclaimers_modal .modal-content {
    pointer-events: auto;
}

#disclaimers_body {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #555 var(--toolbar-bg);
}

#disclaimers_body::-webkit-scrollbar {
    width: 8px;
}

#disclaimers_body::-webkit-scrollbar-track {
    background: var(--toolbar-bg);
    border-radius: 4px;
}

#disclaimers_body::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

#disclaimers_body::-webkit-scrollbar-thumb:hover {
    background: #777;
}

#disclaimers_body h4 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text);
    margin-top: 25px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--toolbar-border);
}

#disclaimers_footer {
    justify-content: center;
}
.economy-plan-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background-color: var(--message-user-bg);
    color: var(--message-user-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.economy-plan-button:hover {
    background-color: var(--article-collection-hover);
    transform: translateY(-1px);
}

.economy-plan-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.model-dropdown-menu {
    padding: 10px;
    min-width: 260px;
}

.model-dropdown-header {
    font-size: 14px;
    font-weight: 500;
    color: var(--summary-text);
    padding: 5px 15px 10px 15px;
}

.model-dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
}

.model-item-text {
    display: flex;
    flex-direction: column;
}

.model-item-desc {
    font-size: 13px;
    color: var(--summary-text);
    margin-bottom: 2px;
}

.model-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.checkmark-icon {
    display: none;
    color: var(--text);
    flex-shrink: 0;
    margin-left: 15px;
}


.model-dropdown-item.active .checkmark-icon {
    display: block;
}

.model-dropdown-item.active {
    background-color: transparent !important;
}
.ambassador-button {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px; /* 稍微减小内边距，因为有边框 */
    margin-right: 12px;
    background: transparent;
    border: 1px solid #4cc9f0; /* 科技蓝边框 */
    border-radius: 6px;
    color: #4cc9f0; /* 字体颜色与边框一致 */
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ambassador-button:hover {
    background: rgba(76, 201, 240, 0.1);
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.4);
    text-shadow: 0 0 5px rgba(76, 201, 240, 0.6);
}

.ambassador-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ambassador-icon {
    margin-right: 6px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .ambassador-button {
        padding: 4px 8px;
        font-size: 12px;
    }
    .ambassador-icon {
        width: 14px;
        height: 14px;
    }
}

#double11Body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 25px;
}

#double11Body .promo-icon {
    margin-bottom: 0;
    margin-right: 10px;
    flex-shrink: 0;
}

#double11Body .promo-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

#double11Body .promo-icon + .promo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

#double11Body .promo-text {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--summary-text);
    max-width: 90%;
}

.scroll-to-bottom-btn {
    position: absolute;
    bottom: calc(var(--input-box-base-height) + 10px);
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--message-user-bg);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scroll-to-bottom-btn.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: scale(1);
}

.scroll-to-bottom-btn:hover {
    background: var(--article-collection-hover);
    transform: scale(1.1);
}

.scroll-to-bottom-btn svg {
    width: 20px;
    height: 20px;
}

#mainContent {
    position: relative;
}

.privilege-tag-pro-max {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #ffffff;
    border: 1px solid transparent;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(106, 17, 203, 0.5);
    position: relative;
    overflow: hidden;
}

.privilege-tag-pro-max::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-30deg);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    40% {
        left: 200%;
    }
    100% {
        left: 200%;
    }
}

.input-container-pro-max {
    background-color: #202123;
    border: 1px solid transparent;
    border-image-source: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border-image-slice: 1;
    box-shadow: 0 0 10px -2px rgba(106, 17, 203, 0.5);
    transition: box-shadow 0.3s ease;
}

.input-container-pro-max {
    border: 1px solid rgba(90, 150, 255, 0.4);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.welcome-title-pro-max {
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #c9d1d9;
    animation: pro-glow-animation 4s ease-in-out infinite;
}

@keyframes pro-glow-animation {
    0%, 100% {
        text-shadow: 0 0 8px rgba(106, 17, 203, 0.5), 0 0 10px rgba(106, 17, 203, 0.5);
    }
    50% {
        text-shadow: 0 0 16px rgba(37, 117, 252, 0.8), 0 0 20px rgba(37, 117, 252, 0.8);
    }
}

@keyframes pro-welcome-animation {
    0% {
        background-position: 0% 50%;
        text-shadow: 0 0 8px rgba(159, 120, 255, 0.6);
    }
    50% {
        background-position: 100% 50%;
        text-shadow: 0 0 16px rgba(90, 156, 255, 0.8);
    }
    100% {
        background-position: 0% 50%;
        text-shadow: 0 0 8px rgba(159, 120, 255, 0.6);
    }
}

.input-container-pro-max:focus-within {
    border-color: rgba(90, 150, 255, 0.7);
    box-shadow: 0 0 8px rgba(37, 117, 252, 0.5);
}

.send-button-pro-max {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    box-shadow: 0 2px 5px rgba(106, 17, 203, 0.4);
}

.send-button-pro-max:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 8px rgba(106, 17, 203, 0.5);
}

.upload-file-button {
    background-color: var(--feature-button-bg);
    color: var(--feature-button-text);
    transition: background-color 0.2s, transform 0.2s;
}

.upload-file-button:hover {
    background-color: var(--feature-button-hover-bg);
    transform: scale(1.05);
}

.model-dropdown-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: transparent !important;
}

.model-dropdown-item .upgrade-link {
    display: none;
    color: var(--message-user-bg);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-left: 15px;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: rgba(59, 130, 246, 0.1);
    transition: background-color 0.2s;
}

.model-dropdown-item .upgrade-link:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

.model-dropdown-item.disabled .upgrade-link {
    display: inline-block;
}

.tools-selector-container {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding-right: 25px;
}

.tools-selector-container .dropdown-arrow {
    position: absolute;
    right: 8px;
    transition: transform 0.2s;
}

.tools-selector-container.open .dropdown-arrow {
    transform: rotate(180deg);
}

.tools-dropdown-menu {
    position: fixed;
    bottom: 100%;
    left: 0;
    background-color: var(--user-dropdown-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--user-dropdown-shadow);
    padding: 8px 0;
    min-width: 120px;
    z-index: 10100000;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.tools-selector-container.open .tools-dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.tools-dropdown-item {
    padding: 10px 15px;
    color: var(--user-dropdown-item-text);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.tools-dropdown-item:hover {
    background-color: var(--user-dropdown-item-hover-bg);
    color: var(--user-dropdown-item-hover-text);
}

[data-theme="light"] .welcome-title-pro-max {
    background: linear-gradient(90deg, #6a11cb, #2575fc, #3f87a6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: pro-light-welcome-animation 5s linear infinite;
    text-shadow: none;
}

@keyframes pro-light-welcome-animation {
    to {
        background-position: 200% center;
    }
}

[data-theme="light"] .input-container-pro-max {
    background-color: #f7f9fc;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .input-container-pro-max:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

.user-text-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    position: relative;
}

.user-copy-btn {
    opacity: 0;
    background: transparent;
    border: none;
    color: var(--source-text);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-text-wrapper:hover .user-copy-btn {
    opacity: 1;
}

.user-copy-btn:hover {
    background-color: var(--sidebar-hover);
    color: var(--text);
    transform: scale(1.1);
}

.user-copy-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.next-level-modal-content {
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid rgba(255, 215, 0, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.05);
    border-radius: 16px;
    max-width: 380px;
    overflow: hidden;
    padding: 0;
    color: #fff;
    position: relative;
}

.vibrant-glow::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(62, 130, 247, 0.2) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}
.vibrant-glow::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.modal-header.no-border {
    border-bottom: none;
    padding: 10px;
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
}

.nl-body-layout {
    padding: 30px 25px 20px 25px;
    position: relative;
    z-index: 1;
}

.nl-top-banner {
    text-align: center;
    margin-bottom: 20px;
}

.nl-badge {
    display: inline-block;
    background: linear-gradient(90deg, #FFD700, #FDB931);
    color: #000;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nl-name {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.nl-slogan {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
}

.nl-price-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.price-wrapper {
    display: flex;
    align-items: baseline;
    color: #FFD700;
}

.price-wrapper .currency { font-size: 16px; font-weight: 600; margin-right: 2px; }
.price-wrapper .amount { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.price-wrapper .period { font-size: 13px; color: rgba(255, 255, 255, 0.5); margin-left: 4px; }

.price-tag {
    background: rgba(255, 77, 79, 0.15);
    color: #ff4d4f;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 77, 79, 0.3);
}

.nl-benefits-section {
    margin-bottom: 10px;
}

.benefits-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
    text-align: left;
    padding-left: 5px;
}

.nl-benefits-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nl-benefit-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nl-benefit-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 215, 0, 0.2);
    transform: translateX(2px);
}

.benefit-icon-wrapper {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
}

.benefit-icon-wrapper svg {
    fill: #000;
    width: 10px;
    height: 10px;
}

.benefit-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
}

.b-name { color: #e0e0e0; }
.b-count { color: #FFD700; font-weight: 600; }

.nl-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 25px 25px 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0,0,0,0.2);
}

.footer-tips {
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
}

.footer-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.ghost-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: none;
    font-size: 13px;
    padding: 8px 12px;
    cursor: pointer;
    transition: color 0.2s;
}

.ghost-btn:hover {
    color: #fff;
    text-decoration: underline;
    background: transparent;
}

.pulse-btn {
    background: linear-gradient(90deg, #FFD700 0%, #FF8C00 100%);
    color: #000;
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    flex-grow: 1;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: pulse-glow 2s infinite;
}

.pulse-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.6);
    background: linear-gradient(90deg, #ffe033 0%, #ff9d00 100%);
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

#closeNextLevelModalBtn {
    color: rgba(255, 255, 255, 0.3);
    font-size: 24px;
}
#closeNextLevelModalBtn:hover {
    color: #fff;
}

.next-level-card {
    background: linear-gradient(135deg, #1e2129 0%, #000000 100%) !important;
    border: 1px solid rgba(255, 215, 0, 0.5) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.1) !important;
}

.next-level-card .card-title {
    color: #FFD700 !important;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.next-level-card .card-price-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: #ffffff;
}

.next-level-card .card-price {
    font-size: 18px;
    font-weight: 800;
    color: #fff !important;
}

.next-level-card .card-duration {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6) !important;
}

.next-level-btn {
    background: linear-gradient(90deg, #FFD700, #FDB931) !important;
    color: #333 !important;
    font-weight: 800 !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3) !important;
    animation: btn-glow 3s infinite alternate;
}

.next-level-btn:hover {
    background: linear-gradient(90deg, #FDB931, #FFD700) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.5) !important;
}

@keyframes btn-glow {
    from { box-shadow: 0 4px 10px rgba(255, 215, 0, 0.2); }
    to { box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5); }
}

.footer-support-tips {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(255, 215, 0, 0.3);
}

.highlight-text {
    color: #FFD700;
    font-weight: bold;
    font-size: 13px;
}

.message.ai .content div.code-toolbar {
    position: relative !important;
    margin: 1.5em 0;
    background: #1e1e1e !important;
    border: 1px solid #333;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.message.ai .content pre[class*="language-"] {
    position: relative;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 3.5em 1.2em 1.2em 1.2em !important;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Consolas', monospace !important;
    line-height: 1.6;
    tab-size: 4;
}

.message.ai .content div.code-toolbar > .toolbar {
    position: absolute !important;
    top: 2px !important;
    right: 15px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    z-index: 20;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message.ai .content div.code-toolbar > .toolbar .toolbar-item > span {
    color: #6e7681;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    background: transparent !important;
    box-shadow: none !important;
    padding: 4px;
    margin: 0;
    pointer-events: none;
    cursor: default;
}

.message.ai .content div.code-toolbar > .toolbar .toolbar-item > button {
    color: #b0b0b0;
    font-size: 12px;
    font-weight: 500;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.message.ai .content div.code-toolbar > .toolbar .toolbar-item > button::before {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'%3E%3C/path%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'%3E%3C/path%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.message.ai .content div.code-toolbar > .toolbar .toolbar-item > button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08) !important;
}

.message.ai .content pre[class*="language-"]::-webkit-scrollbar {
    height: 6px;
    background: transparent;
}
.message.ai .content pre[class*="language-"]::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
.message.ai .content pre[class*="language-"]::-webkit-scrollbar-corner {
    background: transparent;
}

[data-theme="light"] .message.ai .content div.code-toolbar {
    background: #f6f8fa !important;
    border: 1px solid #d0d7de;
}
[data-theme="light"] .message.ai .content pre[class*="language-"] {
    color: #24292e !important;
}
[data-theme="light"] .message.ai .content div.code-toolbar > .toolbar .toolbar-item > span {
    color: #8c959f;
}
[data-theme="light"] .message.ai .content div.code-toolbar > .toolbar .toolbar-item > button {
    color: #656d76;
}
[data-theme="light"] .message.ai .content div.code-toolbar > .toolbar .toolbar-item > button:hover {
    color: #24292e;
    background: rgba(0, 0, 0, 0.05) !important;
}

.message.ai .content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5em 0;
    background-color: transparent;
    border: 1px solid #333;
    border-radius: 8px;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.message.ai .content thead th {
    background-color: #252526;
    color: #e0e0e0;
    font-weight: 600;
    text-align: left;
    padding: 10px 15px;
    border-bottom: 1px solid #333;
    white-space: nowrap;
}

.message.ai .content tbody td {
    padding: 10px 15px;
    color: #cccccc;
    border-bottom: 1px solid #333;
    border-right: 1px solid transparent;
    line-height: 1.6;
    background-color: #1e1e1e;
    min-width: 100px;
}

.message.ai .content tbody tr:last-child td {
    border-bottom: none;
}

.message.ai .content tbody tr:hover td {
    background-color: #2a2d2e;
    transition: background-color 0.2s;
}

.message.ai .content table::-webkit-scrollbar {
    height: 6px;
}
.message.ai .content table::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
.message.ai .content table::-webkit-scrollbar-track {
    background: transparent;
}

[data-theme="light"] .message.ai .content table {
    border: 1px solid #d0d7de;
}

[data-theme="light"] .message.ai .content thead th {
    background-color: #f6f8fa;
    color: #24292e;
    border-bottom: 1px solid #d0d7de;
}

[data-theme="light"] .message.ai .content tbody td {
    color: #24292e;
    background-color: #ffffff;
    border-bottom: 1px solid #d0d7de;
}

[data-theme="light"] .message.ai .content tbody tr:hover td {
    background-color: #f6f8fa;
}

[data-theme="light"] .message.ai .content table::-webkit-scrollbar-thumb {
    background: #ccc;
}

.expert-plan-button {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    margin-right: 12px;
    background: transparent;
    border: 1px solid #FFD700;
    border-radius: 6px;
    color: #FFD700;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.expert-plan-button:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.6);
    transform: translateY(-1px);
}

.expert-plan-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .expert-plan-button {
        padding: 4px 8px;
        font-size: 12px;
    }
    .expert-plan-button svg {
        width: 12px;
        height: 12px;
        margin-right: 4px !important;
    }
}

.api-button {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    margin-right: 12px;
    background: transparent;
    border: 1px solid #d946ef;
    border-radius: 6px;
    color: #d946ef;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.api-button:hover {
    background: rgba(217, 70, 239, 0.1);
    box-shadow: 0 0 10px rgba(217, 70, 239, 0.4);
    text-shadow: 0 0 5px rgba(217, 70, 239, 0.6);
    transform: translateY(-1px);
}

.api-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .api-button {
        padding: 4px 8px;
        font-size: 12px;
    }
}

.message.ai .content div.code-toolbar > .toolbar {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    right: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 8px 12px !important;
    box-sizing: border-box;
    background: transparent !important;
    pointer-events: none;
    z-index: 20;
}

.message.ai .content div.code-toolbar > .toolbar .toolbar-item {
    display: flex;
    align-items: center;
    pointer-events: auto;
    margin: 0 !important;
}

.message.ai .content div.code-toolbar > .toolbar .toolbar-item:not(:has(button)) {
    margin-left: 10px !important;
    margin-right: auto !important;
    order: 1 !important;
}

.message.ai .content div.code-toolbar > .toolbar .toolbar-item:has(.copy-to-clipboard-button) {
    order: 2 !important;
    margin-left: 0 !important;
}

.message.ai .content div.code-toolbar > .toolbar .toolbar-item:has(.download-code-btn) {
    order: 3 !important;
    margin-left: 10px !important;
}

.message.ai .content div.code-toolbar > .toolbar .toolbar-item > span {
    font-family: 'Consolas', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #858585;
    text-transform: uppercase;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0;
    cursor: default;
}

.message.ai .content div.code-toolbar > .toolbar button {
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    color: #b0b0b0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.message.ai .content div.code-toolbar > .toolbar button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

button.download-code-btn::before {
    display: none !important;
    content: none !important;
}


:root {
    --code-panel-width: 600px;
}

.code-side-panel {
    position: fixed;
    top: var(--toolbar-height);
    right: 0;
    width: var(--code-panel-width);
    height: calc(100vh - var(--toolbar-height));
    background: var(--code-bg);
    border-left: 1px solid var(--toolbar-border);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 998;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
}

.code-side-panel.open {
    transform: translateX(0);
}

/* --- 拖拽手柄样式 --- */
.panel-resizer {
    position: absolute;
    left: -3px; /* 稍微往外延展一点，方便鼠标抓取 */
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: ew-resize; /* 左右拖拽的鼠标指针 */
    z-index: 10;
}
.panel-resizer:hover {
    background-color: var(--message-user-bg);
    opacity: 0.5;
}

/* 主内容适应（如果您希望聊天记录也被推过去） */
.main-content {
    /* 同时保留左侧菜单和右侧面板的平滑过渡 */
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.input-box {
    /* 同时保留左侧菜单和右侧面板的平滑过渡 */
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 保持主内容被推挤的类不变 */
.main-content.right-open,
.main-content.right-open-doc {
    margin-right: var(--code-panel-width) !important;
}

.input-box.right-open,
.input-box.right-open-doc {
    right: var(--code-panel-width) !important;
}
.main-content.right-open { margin-right: var(--code-panel-width); }
.input-box.right-open { right: var(--code-panel-width); }

/* --- 强制覆盖 Prism Toolbar 插件在右侧面板的样式 (解决多余按钮和嵌套框) --- */
.code-side-panel .code-toolbar > .toolbar {
    display: none !important; /* 隐藏自动生成的复制按钮/语言标识等 */
}
.code-side-panel .code-toolbar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
}

/* 调整代码块在面板中的排版，左侧留出 3.8em 给行号 */
.code-side-panel pre[class*="language-"] {
    margin: 0 !important;
    padding: 15px 15px 15px 3.8em !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 100%;
    border-radius: 0 !important;
}

/* 行号颜色的微调，使其在暗色主题下更协调 */
.code-side-panel .line-numbers-rows {
    border-right: 1px solid var(--toolbar-border) !important;
    padding-right: 10px !important;
}
.code-side-panel .line-numbers-rows > span:before {
    color: #6e7681;
}

/* --- 用户消息气泡增强：展开/收起样式 --- */
.user-bubble-box {
    position: relative;
    background: var(--message-user-bubble-bg);
    color: var(--message-user-text);
    padding: 12px 16px;
    border-radius: 20px;
    border-bottom-right-radius: 5px;
    max-width: 85%;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-size: 15px;
    line-height: 1.6;
}

.user-bubble-text {
    max-height: 120px; /* 默认显示约 5 行 */
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.user-bubble-text.expanded {
    max-height: 5000px; /* 展开后容纳超长文本 */
}

/* 底部的渐变遮罩层 */
.user-bubble-fade-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    /* 渐变色：从透明到气泡背景色 */
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--message-user-bubble-bg) 80%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 20px;
    transition: opacity 0.3s ease;
}

/* 展开后隐藏遮罩层 */
.user-bubble-text.expanded + .user-bubble-fade-mask {
    opacity: 0;
    pointer-events: none;
}

.user-bubble-expand-btn {
    background: rgba(0, 0, 0, 0.2);
    color: var(--message-user-text);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.user-bubble-expand-btn:hover { background: rgba(0, 0, 0, 0.4); }

/* 收起按钮（默认隐藏，展开后显示在末尾） */
.user-bubble-collapse-btn {
    display: none;
    background: rgba(0, 0, 0, 0.15);
    color: var(--message-user-text);
    border: none;
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 10px;
    float: right;
}

.user-bubble-text.expanded ~ .user-bubble-collapse-btn {
    display: block;
}

/* 闪烁的 Thinking 文本动画 */
.thinking-blink-text {
    font-size: 15px;
    font-weight: 600;
    font-family: 'Consolas', monospace;
    background: linear-gradient(90deg, var(--message-user-bg) 0%, #fff 50%, var(--message-user-bg) 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: blink-wave 1.5s linear infinite;
    letter-spacing: 1px;
}

@keyframes blink-wave {
    to { background-position: 200% center; }
}

.ai-normal-loader {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-style: italic;
    font-size: 14px;
    padding: 10px 0;
    opacity: 0.8;
}

.ai-normal-loader .sparkle-icon {
    width: 20px;
    height: 20px;
    color: #3b82f6; /* 科技蓝 */
    animation: spin-slow 3s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-normal-loader .sparkle-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

@keyframes spin-slow {
    100% { transform: rotate(360deg); }
}

.thinking-blink-text {
    font-size: 15px;
    font-weight: 600;
    font-family: 'Consolas', monospace;
    background: linear-gradient(90deg, var(--summary-text) 0%, #ffffff 50%, var(--summary-text) 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: blink-wave 1.5s linear infinite;
    letter-spacing: 0.5px;
}

@keyframes blink-wave {
    to { background-position: 200% center; }
}

#panelDocPreview {
    display: none; /* 默认隐藏 */
    width: 100%;
    height: 100%;
    background-color: #f3f4f6; /* 外部浅灰背景 */
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 模拟一张 A4 白纸 */
.doc-paper-sheet {
    background-color: #ffffff;
    color: #333333;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 4px;
    font-family: 'Microsoft YaHei', 'SimSun', sans-serif;
    line-height: 1.6;
    font-size: 14px;
    min-height: 842px;
}

/* 适配显示模式切换 */
.code-panel-body.show-doc pre,
.code-panel-body.show-doc #panelHtmlIframe {
    display: none !important;
}
.code-panel-body.show-doc #panelDocPreview {
    display: block !important;
}

/* 优化 Word 转换后的排版 */
.doc-paper-sheet h1 { font-size: 24px; text-align: center; margin-bottom: 20px; border-bottom: none; }
.doc-paper-sheet h2 { font-size: 20px; margin-top: 20px; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.doc-paper-sheet h3 { font-size: 16px; margin-top: 15px; }
.doc-paper-sheet p { margin-bottom: 10px; }
.doc-paper-sheet img { max-width: 100%; height: auto; }

/* 优化 Excel 转换后的表格样式 */
.doc-paper-sheet table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 13px;
}
.doc-paper-sheet table, .doc-paper-sheet th, .doc-paper-sheet td {
    border: 1px solid #d0d7de;
}
.doc-paper-sheet th, .doc-paper-sheet td {
    padding: 8px;
    text-align: left;
}
.doc-paper-sheet th {
    background-color: #f6f8fa;
    font-weight: 600;
}

.sidebar-action-group {
    padding: 10px 10px 0 10px;
}

.sidebar-action-btn {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    margin-bottom: 4px;
}

.sidebar-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-action-btn svg {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-section-title {
    padding: 20px 22px 8px 22px;
    font-size: 13px;
    color: var(--summary-text);
    font-weight: 600;
}

/* 适配侧边栏收起时的状态 */
.sidebar.collapsed .sidebar-action-group {
    padding: 10px 0;
}
.sidebar.collapsed .sidebar-action-btn {
    justify-content: center;
    padding: 12px 0;
}
.sidebar.collapsed .sidebar-action-btn span {
    display: none;
}
.sidebar.collapsed .sidebar-action-btn svg {
    margin-right: 0;
}
.sidebar.collapsed .sidebar-section-title {
    display: none;
}

.chat-history-item {
    border-left: none !important;
    border-radius: 8px;
    margin: 2px 10px;
    padding: 10px 12px;
}
.chat-history-item.active {
    background: rgba(255, 255, 255, 0.08) !important;
}

.search-chat-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10500; /* 极高层级 */
    display: none;
    justify-content: center;
    align-items: flex-start; /* 靠上对齐 */
    padding-top: 10vh;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.search-chat-overlay.show {
    display: flex;
    opacity: 1;
}

.search-chat-container {
    width: 90%;
    max-width: 600px;
    background: #252526; /* 深灰底色 */
    border: 1px solid var(--toolbar-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.98) translateY(-10px);
    transition: transform 0.2s ease;
}

.search-chat-overlay.show .search-chat-container {
    transform: scale(1) translateY(0);
}

.search-chat-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--toolbar-border);
}

#searchChatInput {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 16px;
    outline: none;
}

#searchChatInput::placeholder {
    color: var(--summary-text);
}

.search-chat-close {
    background: transparent;
    border: none;
    color: var(--summary-text);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}
.search-chat-close:hover { color: var(--text); background: rgba(255,255,255,0.1); }

.search-chat-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 10px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text);
    font-size: 14px;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.search-result-item svg {
    margin-right: 15px;
    width: 18px;
    height: 18px;
    color: var(--summary-text);
}

/* 亮色模式适配 */
[data-theme="light"] .search-chat-container { background: #ffffff; }
[data-theme="light"] .search-result-item:hover,
[data-theme="light"] .sidebar-action-btn:hover { background: rgba(0, 0, 0, 0.05); }
[data-theme="light"] .chat-history-item.active { background: rgba(0, 0, 0, 0.05) !important; }


[data-theme="light"] {
    /* 强制重置主聊天框和右侧面板的代码字体颜色为深灰色 */
    --prism-general-text: #24292e;
}

[data-theme="light"] .message.ai .content pre[class*="language-"] code,
[data-theme="light"] #codeSidePanel pre[class*="language-"] code {
    color: var(--prism-general-text) !important;
}

[data-theme="light"] .token.comment,
[data-theme="light"] .token.prolog,
[data-theme="light"] .token.doctype,
[data-theme="light"] .token.cdata {
    color: #6A737D !important; /* 注释颜色 */
}

[data-theme="light"] .token.punctuation {
    color: #586069 !important; /* 标点符号 */
}

[data-theme="light"] .token.namespace {
    opacity: .7;
}

[data-theme="light"] .token.property,
[data-theme="light"] .token.tag,
[data-theme="light"] .token.boolean,
[data-theme="light"] .token.number,
[data-theme="light"] .token.constant,
[data-theme="light"] .token.symbol,
[data-theme="light"] .token.deleted {
    color: #005cc5 !important; /* 数字、布尔值等 */
}

[data-theme="light"] .token.selector,
[data-theme="light"] .token.attr-name,
[data-theme="light"] .token.string,
[data-theme="light"] .token.char,
[data-theme="light"] .token.builtin,
[data-theme="light"] .token.inserted {
    color: #032f62 !important; /* 字符串、属性名 */
}

[data-theme="light"] .token.operator,
[data-theme="light"] .token.entity,
[data-theme="light"] .token.url,
[data-theme="light"] .language-css .token.string,
[data-theme="light"] .style .token.string {
    color: #d73a49 !important; /* 运算符（如 -m, -cpb）、URL */
}

[data-theme="light"] .token.atrule,
[data-theme="light"] .token.attr-value,
[data-theme="light"] .token.keyword {
    color: #d73a49 !important; /* 关键字 */
}

[data-theme="light"] .token.function,
[data-theme="light"] .token.class-name {
    color: #6f42c1 !important; /* 函数、类名 */
}

[data-theme="light"] .token.regex,
[data-theme="light"] .token.important,
[data-theme="light"] .token.variable {
    color: #e36209 !important;
}

/* 3. 修复右侧代码面板（Code Side Panel）在亮色模式下的背景和边框 */
[data-theme="light"] #codeSidePanel {
    background-color: #f6f8fa !important;
    border-left-color: #d0d7de !important;
}

[data-theme="light"] #codeSidePanel .code-panel-header {
    background-color: #ffffff !important;
    border-bottom-color: #d0d7de !important;
}

[data-theme="light"] #codeSidePanel .lang-badge,
[data-theme="light"] #codeSidePanel .panel-action-btn,
[data-theme="light"] #codeSidePanel .panel-filename-input {
    color: #24292e !important;
}

[data-theme="light"] #codeSidePanel .panel-action-btn {
    border-color: #d0d7de !important;
}

[data-theme="light"] #codeSidePanel .panel-action-btn:hover {
    background-color: rgba(0,0,0,0.05) !important;
}

/* 行号的边线颜色和字体颜色适配 */
[data-theme="light"] #codeSidePanel .line-numbers-rows {
    border-right-color: #d0d7de !important;
}
[data-theme="light"] #codeSidePanel .line-numbers-rows > span:before {
    color: #8c959f !important;
}

.add-tools-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 10px;
    z-index: 100;
}

.add-tools-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-tools-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.add-tools-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 8px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-tools-container.open .add-tools-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.add-tools-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-tools-item:hover {
    background-color: var(--message-user-bg);
    color: #fff;
}

.add-tools-divider {
    height: 1px;
    background-color: rgba(255,255,255,0.1);
    margin: 4px 0;
}

/* 亮色模式适配 */
[data-theme="light"] .add-tools-btn {
    background-color: rgba(0, 0, 0, 0.05);
    color: #333;
}
[data-theme="light"] .add-tools-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .add-tools-dropdown {
    background-color: #fff;
    border-color: #e0e0e0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .add-tools-item { color: #333; }
[data-theme="light"] .add-tools-divider { background-color: rgba(0,0,0,0.05); }

.deep-research-welcome-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 5vh;
}

.dr-welcome-title {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.dr-welcome-subtitle {
    font-size: 1.1em;
    color: var(--summary-text);
    margin-bottom: 40px;
}

.dr-recommend-container {
    width: 100%;
    max-width: 700px;
}

.dr-recommend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 10px;
}

.dr-recommend-title {
    font-size: 14px;
    color: var(--summary-text);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dr-refresh-btn {
    background: transparent;
    border: none;
    color: var(--message-user-bg);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}

.dr-refresh-btn:hover { opacity: 0.8; }

.dr-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.dr-topic-item {
    background: var(--input-container-bg);
    border: 1px solid var(--toolbar-border);
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.dr-topic-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--message-user-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
[data-theme="light"] .dr-topic-item:hover { background: #fff; }

.dr-topic-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}


.promax-exclusive-welcome {
    margin-top: 8vh;
}

.promax-welcome-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

/* N1 PRO 炫光主标题 */
.cyber-glitch {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    position: relative;
    /* 渐变紫蓝赛博配色 */
    background: linear-gradient(90deg, #b026ff, #2563eb, #00f0ff);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.cyber-subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    color: #a0aab5;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 状态指示条 */
.promax-status-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 25px;
    border-radius: 50px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.status-item {
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: #c9d1d9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}
.status-dot.green { color: #16a34a; background: #16a34a; animation: pulse 2s infinite; }
.status-dot.blue { color: #2563eb; background: #2563eb; animation: pulse 2s infinite 0.6s; }
.status-dot.purple { color: #9333ea; background: #9333ea; animation: pulse 2s infinite 1.2s; }

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* 引导语 */
.promax-intro-text {
    font-size: 15px;
    line-height: 1.8;
    color: #b0b8c1;
    text-align: center;
    max-width: 650px;
    margin: 0 auto 40px auto;
}
.promax-intro-text strong {
    color: #fff;
    font-weight: 600;
}

/* N1 PRO 专属按钮样式 */
.promax-buttons {
    gap: 15px;
}
.model-prompt-button.promax-btn {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: #e0e6ed;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    padding: 12px 20px;
}
.model-prompt-button.promax-btn:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* 亮色模式兼容 */
[data-theme="light"] .cyber-glitch { background: linear-gradient(90deg, #7c3aed, #2563eb, #0ea5e9); -webkit-background-clip: text; }
[data-theme="light"] .cyber-subtitle { color: #57606a; }
[data-theme="light"] .promax-status-bar { background: #f6f8fa; border-color: #d0d7de; box-shadow: none; }
[data-theme="light"] .status-item { color: #24292f; }
[data-theme="light"] .promax-intro-text { color: #57606a; }
[data-theme="light"] .promax-intro-text strong { color: #111; }
[data-theme="light"] .model-prompt-button.promax-btn { background: #ffffff; border-color: #d0d7de; color: #24292f; }
[data-theme="light"] .model-prompt-button.promax-btn:hover { background: #f3f4f6; border-color: #0969da; }

.message.user .user-image-display {
    max-width: 85%;
    margin-bottom: 8px;
    flex-shrink: 0;
    align-self: flex-end;
    display: flex;
    justify-content: flex-end;
}

.message.user .user-file-card {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px 10px 12px;
    background: #252526;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.message.user .user-file-card:hover {
    background: #2d2d2d;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.message.user .user-file-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.message.user .user-file-icon-box svg {
    width: 22px;
    height: 22px;
}

.message.user .user-file-info-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.message.user .user-file-name-txt {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
    line-height: 1;
}

.message.user .user-file-category-txt {
    font-size: 12px;
    font-weight: 500;
    color: #8b949e;
    line-height: 1;
}

[data-theme="light"] .message.user .user-file-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .message.user .user-file-card:hover {
    background: #f9f9f9;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .message.user .user-file-name-txt { color: #1f2328; }
[data-theme="light"] .message.user .user-file-category-txt { color: #656d76; }

.modal-content.share-modal-content {
    max-width: 600px; /* 加宽一点以容纳更多信息 */
    background: #202123;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-body {
    padding: 25px;
    align-items: stretch; /* 让子元素占满宽度 */
}

/* 顶部生成链接区域 */
.share-link-section {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
}

.share-link-container {
    border-color: rgba(255, 255, 255, 0.1);
    background: #1a1a1a;
}

.share-link-input {
    background: transparent;
    color: #e0e0e0;
}

/* 历史分享记录列表区域 */
.share-records-section {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.share-records-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px; /* 增加可视高度 */
    padding-right: 8px;
}

/* 单个分享卡片 */
.share-record-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2a2b2f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.share-record-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.share-record-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0; /* 防止子元素撑破 flex */
    margin-right: 15px;
}

.share-record-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-record-meta {
    font-size: 12px;
    color: #8b949e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-record-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.share-action-btn.copy {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}
.share-action-btn.copy:hover {
    background: #3b82f6;
    color: #fff;
}

.share-action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.share-action-btn.delete:hover {
    background: #ef4444;
    color: #fff;
}

/* 亮色模式适配 */
[data-theme="light"] .modal-content.share-modal-content { background: #ffffff; border-color: #d0d7de; }
[data-theme="light"] .share-link-section { background: #f6f8fa; border-color: #d0d7de; }
[data-theme="light"] .share-link-container { background: #ffffff; border-color: #d0d7de; }
[data-theme="light"] .share-link-input { color: #24292f; }
[data-theme="light"] .share-record-card { background: #ffffff; border-color: #d0d7de; }
[data-theme="light"] .share-record-card:hover { border-color: #0969da; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
[data-theme="light"] .share-record-title { color: #1f2328; }


#promoModal .modal-content,
#double11Modal .modal-content {
    background: linear-gradient(180deg, #1e2025 0%, #15161a 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.1);
    overflow: hidden;
    padding: 0;
}

/* 顶部绚丽的 Header 区域 */
#promoBody, #double11Body {
    padding: 40px 30px 30px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

#promoBody::before, #double11Body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 150px;
    background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.promo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    color: #fff !important; /* 强制覆盖原有的内联颜色 */
    transform: rotate(-5deg);
}

.promo-icon svg {
    width: 35px !important;
    height: 35px !important;
}

.promo-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.promo-text {
    font-size: 15px;
    color: #9ca3af;
    line-height: 1.6;
    max-width: 90%;
}

/* 底部按钮区的高级感 */
#promoModal .modal-footer,
#double11Modal .modal-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 30px;
    justify-content: center;
}

#gotoSaleBtn, #gotoDouble11Btn {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.2s;
}

#gotoSaleBtn:hover, #gotoDouble11Btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    filter: brightness(1.1);
}

#laterPromoBtn, #laterDouble11Btn {
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    border: none;
}

#laterPromoBtn:hover, #laterDouble11Btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

/* 亮色模式适配 */
[data-theme="light"] #promoModal .modal-content,
[data-theme="light"] #double11Modal .modal-content {
    background: #ffffff;
    border-color: #e5e7eb;
}
[data-theme="light"] #promoBody::before { background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.1) 0%, transparent 70%); }
[data-theme="light"] .promo-title { color: #111827; }
[data-theme="light"] .promo-text { color: #4b5563; }
[data-theme="light"] #promoModal .modal-footer { background: #f9fafb; border-top-color: #e5e7eb; }


.message.ai .content pre[class*="language-"],
.message.ai .content code[class*="language-"],
#codeSidePanel pre[class*="language-"],
#codeSidePanel code[class*="language-"] {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    word-wrap: break-word !important;
    tab-size: 4 !important;
}

.token.operator {
    background: transparent !important;
}