.message-action-info {
    position: relative;
    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: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-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;
    bottom: 100%;
    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;
}
.message-action-info:hover .tooltip {
    visibility: visible;
    opacity: 1;
}
.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: 50px;
    --input-box-base-height: 50px;
    --input-actions-height: 40px;
    --input-area-total-height: 180px;
    --background: #1e1e1e;
    --text: #e0e0e0;
    --toolbar-bg: #252526;
    --toolbar-border: #333;
    --chat-bg: #1e1e1e;
    --message-user-bg: #3b82f6;
    --message-user-text: #ffffff;
    --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: linear-gradient(135deg, #3b82f6, #2563eb);
    --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: #000;
    --sidebar-text: #fff;
    --sidebar-hover: #333;
    --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: #f4f4f4;
    --toolbar-border: #e0e0e0;
    --chat-bg: #ffffff;
    --message-user-bg: #2563eb;
    --message-user-text: #ffffff;
    --ai-avatar-bg: #2563eb;
    --article-collection-bg: #2563eb;
    --article-collection-text: #ffffff;
    --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: linear-gradient(135deg, #2563eb, #1d4ed8);
    --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: #f4f4f4;
    --sidebar-text: #333333;
    --sidebar-hover: #ccc;
    --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-avatar {
    width: 36px;
    height: 36px;
    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; /* 确保没有默认边框 */
}

.user-avatar:hover {
    background-color: var(--user-avatar-hover-bg);
}

.user-avatar svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.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;
}
.sidebar-main-items {
    scrollbar-width: thin;
    scrollbar-color: #555 var(--toolbar-bg);
}
.sidebar-main-items::-webkit-scrollbar { width: 8px; height: 8px; }
.sidebar-main-items::-webkit-scrollbar-track { background: var(--toolbar-bg); }
.sidebar-main-items::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }
.sidebar-main-items::-webkit-scrollbar-thumb:hover { background: #777; }
.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); border-bottom: 1px solid var(--toolbar-border); 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; font-weight: bold; }
.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; max-width: 100%; box-sizing: border-box; }
.message-actions { margin-top: 10px; display: flex; gap: 8px; }
.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-button:hover { background-color: var(--message-action-button-hover-bg); color: var(--message-action-button-hover-text); }
.message-action-button svg { width: 14px; height: 14px; margin-right: 5px; fill: currentColor; }
.message.user { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; margin-bottom: 15px; }
.message.user .content { background: var(--message-user-bg); color: var(--message-user-text); padding: 12px 16px; border-radius: 8px; 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; background: linear-gradient(to top, var(--message-user-bg) 0%, transparent 100%); 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 { display: inline-block; padding: 8px 16px; background: var(--article-collection-bg); color: var(--article-collection-text); border-radius: 18px; cursor: pointer; margin-top: 12px; 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 { transform: scale(1.03); background: var(--article-collection-hover); box-shadow: 0 3px 6px rgba(0,0,0,0.15); }
.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; background: var(--input-container-bg); border-radius: 18px; position: relative; transition: box-shadow 0.2s ease; display: flex; flex-direction: column; padding: 8px 12px; box-sizing: border-box; border: 1px solid var(--toolbar-border); }
.input-container:focus-within { box-shadow: 0 0 0 2px var(--focus-outline-color); }
.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: 'Consolas', 'Courier New', monospace; 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; transition: transform 0.2s; margin-left: 8px; flex-shrink: 0; background: var(--send-button-bg); }
.send-button:hover { transform: scale(1.05); }
.send-button svg { width: 18px; height: 18px; fill: none; stroke: var(--send-button-icon); 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, .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-image-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; }
.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; margin-top: 15px; 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; } .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); }
/* 加载文章推荐的占位符样式 */
.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; }
/* 为历史对话列表的滚动条添加样式 */
#chatHistoryList::-webkit-scrollbar { width: 8px; height: 8px; } #chatHistoryList::-webkit-scrollbar-track { background: var(--toolbar-bg); } #chatHistoryList::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; } #chatHistoryList::-webkit-scrollbar-thumb:hover { background: #777; }

.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: var(--code-toolbar-item-hover-bg); color: var(--code-toolbar-item-hover-text); font-weight: 500; }

.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, .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: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: none;
    padding: 0;
    margin: 0;
    background-color: transparent;
}

.user-avatar {
    width: 40px;
    height: 40px;
    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;
}

.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; /* 与AI回复内容拉开距离 */
    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; } /* 循环回到左边 */
}


.message-action-button svg {
    width: 14px;
    height: 14px;
    margin-right: 5px;
    fill: currentColor;
}


.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; /* 移除 input 默认边框 */
    outline: none; /* 移除聚焦边框 */
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}
.share-link-input::-webkit-scrollbar { /* Chrome, Safari, Opera */
    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; /* 距离底部30px */
    right: 30px; /* 距离右侧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; /* 包含padding和border在宽度内 */
}

.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; /* 最多显示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; /* 使用 !important 提高优先级 */
    transform: translateY(15px) !important; /* 使用 !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; /* 增大字体，使用!important确保优先级 */
    line-height: 1.5;
    /* resize: vertical; */ /* 移除手动拖拽把手 */
    resize: none; /* 禁用用户拖拽调整大小 */
    min-height: 38px; /* 根据实际字体和行高调整，使其默认显示一行内容 */
    max-height: 100px; /* 最大高度 */
    margin-bottom: 20px; /* 文本框下边距 */
    box-sizing: border-box; /* 包含padding和border在宽度内 */
    overflow: hidden; /* 默认隐藏滚动条，由JS控制显示 */
    /* 移除之前为滚动条设置的样式，因为我们将由JS控制 */
    /* scrollbar-width: thin; */
    /* scrollbar-color: #555 var(--toolbar-bg); */
}

/* Webkit 浏览器滚动条样式 */
.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); /* 为整个 wrapper 添加边框 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* 为整个 wrapper 添加阴影 */
    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;
    /* 移除这里的 border: 1px solid #696969; 因为已经在上面添加了 var(--toolbar-border) */
}

.deep-research-wrapper.show {
    opacity: 1;
    transform: translateY(0);
}

.deep-research-left-panel {
    flex-shrink: 0;
    width: 250px;
    padding: 20px; /* 将 padding-right 移动到这里，并增加顶部/底部/左侧内边距 */
    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; /* 匹配 .deep-research-wrapper 的圆角 */
    border-bottom-left-radius: 12px; /* 匹配 .deep-research-wrapper 的圆角 */
}

.deep-research-right-panel {
    flex-grow: 1;
    padding: 20px; /* 将 padding-left 移动到这里，并增加顶部/底部/右侧内边距 */
    height: 400px; /* 保持你之前调整的高度 */
    /* 或者设置为 min-height: 400px; height: auto; 来实现高度自适应 */
    overflow-y: auto;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: #555 var(--toolbar-bg);

    /* 核心修改：设置背景色并匹配父容器的圆角 */
    background-color: var(--background); /* 或者 var(--chat-bg)，比左侧内容区深 */
    border-top-right-radius: 12px; /* 匹配 .deep-research-wrapper 的圆角 */
    border-bottom-right-radius: 12px; /* 匹配 .deep-research-wrapper 的圆角 */
}
/* Webkit 滚动条 */
.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;  /* 统一到一个适中的尺寸，比您截图中 h3 的 1em 略大一点点，保留轻微的强调感，但远小于 h1/h2 的原始尺寸 */
    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;
}
/* 其他 Markdown 元素也可以类似添加样式 */
.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 {
    /* 继承并覆盖 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;
}

/* Markdown 样式继承自 AI 消息，这里可以做细微调整 */
.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);   /* 使用CSS变量，确保主题切换时颜色正确 */
}

#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%;
}

/* 让 a 标签按钮和 button 标签按钮看起来完全一样 */
#gotoSaleBtn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}