 /* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 浅色主题 */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #fafafa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #e8e8e8;
    --accent-color: #0066cc;
    --accent-hover: #0052a3;
    --code-bg: #f4f4f4;
    --link-color: #0066cc;
    --link-hover: #0052a3;
    --sidebar-width: 280px;
    --outline-width: 280px; /* 右侧大纲面板宽度，供加载条等布局复用 */
    --header-height: 64px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* 正文标题颜色：与主题一致且带层级提醒 */
    --heading-h1-color: var(--text-primary);
    --heading-h1-border: var(--accent-color);
    --heading-h2-color: #0066cc;
    --heading-h3-color: #004080;
    --heading-h4-color: var(--text-primary);
}

/* 深色主题 */
body.theme-dark {
    --bg-primary: #1e1e1e;
    --bg-secondary: #252525;
    --bg-tertiary: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --border-color: #3a3a3a;
    --accent-color: #4a9eff;
    --accent-hover: #6bb3ff;
    --code-bg: #2d2d2d;
    --link-color: #4a9eff;
    --link-hover: #6bb3ff;
    /* 深色主题下正文标题颜色 */
    --heading-h1-color: var(--text-primary);
    --heading-h1-border: var(--accent-color);
    --heading-h2-color: #4a9eff;
    --heading-h3-color: #6bb3ff;
    --heading-h4-color: var(--text-primary);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    pointer-events: auto;
}

/* 顶部导航栏 */
.header {
    height: var(--header-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky; /* 也作为 header-breadcrumb 的定位上下文 */
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
    min-width: 0;    /* 允许收缩 */
}


.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Logo 不收缩 */
    margin-left: 16px; /* 水平右移，使其更接近红框位置 */
}

.header-logo a {
    display: block;
    line-height: 0; /* 去除链接底部空隙 */
}

.header-logo img {
    height: 52px; /* 保持较大 Logo，同时控制导航高度 */
    display: block;
    filter: none;
    opacity: 1;
}

.header .title {
    display: none; /* 顶部标题隐藏，名称只在左侧大纲中显示 */
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s;
}

.title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0; /* 右侧控件不收缩 */
}

.search-container {
    position: relative;
}

#searchInput {
    width: 200px;
    padding: 6px 12px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    outline: none;
    transition: all 0.2s;
    height: 32px;
    line-height: 20px;
}

#searchInput:focus {
    background-color: var(--bg-primary);
    border-color: rgba(0, 102, 204, 0.2);
    color: var(--text-primary);
}

body.theme-dark #searchInput {
    border-color: rgba(255, 255, 255, 0.04);
}

body.theme-dark #searchInput:focus {
    border-color: rgba(74, 158, 255, 0.25);
}

#searchInput::placeholder {
    color: var(--text-tertiary);
    opacity: 0.6;
}

/* 下拉菜单样式 - 与Wiki风格一致 */
.dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* dropdown-toggle 样式已在下方统一定义 */

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
    opacity: 0.6;
    margin-left: 2px;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown.active .dropdown-toggle {
    background-color: var(--bg-tertiary);
    border-color: rgba(0, 0, 0, 0.03);
    color: var(--accent-color);
}

body.theme-dark .dropdown.active .dropdown-toggle {
    border-color: rgba(255, 255, 255, 0.04);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background-color: var(--bg-primary);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    min-width: 120px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
    padding: 4px 0;
}

body.theme-dark .dropdown-menu {
    border-color: rgba(255, 255, 255, 0.04);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 6px 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    border-radius: 0;
    margin: 0;
}

.dropdown-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
}

.dropdown-item.active {
    background-color: var(--accent-color);
    color: #ffffff;
    font-weight: 500;
}

.dropdown-item.active:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
}

/* 统一的头部按钮样式 - 简洁、专业、适合长时间阅读 */
.header-btn,
.dropdown-toggle {
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    background-color: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    line-height: 20px;
    white-space: nowrap;
}

/* 确保「主题」「PDF」始终在搜索结果层之上，避免被遮挡无法点击 */
.header-btn {
    position: relative;
    z-index: 1002;
}

/* 主题按钮仅显示太阳/月亮图标 */
.header-btn-icon {
    padding: 6px 10px;
    min-width: 36px;
}
.header-btn-icon .theme-icon {
    display: block;
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

.header-btn:hover,
.dropdown-toggle:hover {
    background-color: var(--bg-tertiary);
    border-color: rgba(0, 0, 0, 0.03);
    color: var(--accent-color);
}

.header-btn:active,
.dropdown-toggle:active {
    background-color: var(--bg-secondary);
    border-color: rgba(0, 0, 0, 0.03);
}

body.theme-dark .header-btn:hover,
body.theme-dark .dropdown-toggle:hover {
    border-color: rgba(255, 255, 255, 0.04);
}

body.theme-dark .header-btn:active,
body.theme-dark .dropdown-toggle:active {
    border-color: rgba(255, 255, 255, 0.04);
}

/* 下拉按钮特殊样式 - 确保文字和箭头正确显示 */
.dropdown-toggle {
    gap: 4px;
    justify-content: space-between;
    min-width: 60px;
}

.dropdown-toggle span {
    display: inline-block;
    flex-shrink: 0;
}

/* 搜索结果下拉框 - 宽度为右侧边栏的两倍，动态调整高度 */
.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    width: 560px;
    min-width: 560px;
    max-width: 560px;
    background-color: var(--bg-primary);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    max-height: 600px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    padding: 8px 0;
    /* 根据内容动态调整高度，但不超过最大高度 */
    height: auto;
    box-sizing: border-box;
}

body.theme-dark .search-results {
    border-color: rgba(255, 255, 255, 0.04);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 搜索结果项样式 */
.search-results .search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    word-break: break-word;
}

.search-results .search-result-item:last-child {
    border-bottom: none;
}

.search-results .search-result-item:hover {
    background-color: var(--bg-tertiary);
}

.search-results .search-result-item.active {
    background-color: var(--bg-secondary);
}

body.theme-dark .search-results .search-result-item {
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

.search-results.active {
    display: block;
}

/* 搜索结果标题和摘要样式 */

.search-result-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.search-result-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-item mark {
    background-color: #ffd700;
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* 主布局：明确可点击，避免在单独窗口/外部浏览器中被误遮挡 */
.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: transform 0.3s;
    pointer-events: auto;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.toc {
    padding: 0 20px 24px 20px;
}

.toc-title {
    padding: 24px 28px 16px 28px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.6;
    min-height: 60px; /* 确保有足够高度适应多行文本 */
    display: flex;
    align-items: center; /* 垂直居中 */
}

.toc-item {
    margin-bottom: 8px;
}

.toc-link {
    display: block;
    padding: 8px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.toc-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
}

.toc-link.active {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
}

/* 目录层级 */
.toc-level-1 {
    font-weight: 600;
    font-size: 15px;
    position: relative;
    cursor: pointer;
}

.toc-level-1::before {
    content: '▸';
    display: inline-block;
    margin-right: 6px;
    font-size: 12px;
    transform: translateY(-1px);
    transition: transform 0.2s;
}

.toc-level-1.expanded::before {
    transform: rotate(90deg) translateY(-1px);
}

.toc-level-2 {
    padding-left: 20px;
    font-size: 14px;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow: visible;
}

.toc-level-3 {
    padding-left: 40px;
    font-size: 13px;
    color: var(--text-secondary);
}

.toc-children {
    margin-top: 4px;
}

.toc-children.collapsed {
    display: none;
}

/* 主内容区 */
.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px 48px;
    background-color: var(--bg-primary);
    min-width: 0; /* 允许收缩 */
    min-height: 200px; /* 防止被挤压成 0 高度 */
    pointer-events: auto;
}

/* 顶部快捷导航条（位于 Header 内，右移与正文左侧对齐） */
.header-breadcrumb {
    position: absolute;
    left: calc(var(--sidebar-width) + 64px); /* 再向右微调，使其与正文 H1 左边缘对齐 */
    top: auto;
    bottom: 6px;              /* 使快捷导航底部贴近 Header 底部红线 */
    transform: none;
    display: flex;
    align-items: center;
    pointer-events: auto;
}

.sticky-heading-bar {
    padding: 0;
    margin: 0;
    background-color: transparent;
}

.sticky-heading-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0 8px;          /* 与 Logo 保持适中间距 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-heading-path::before {
    content: "本页位置：";
    margin-right: 4px;
    font-weight: 500;
    color: var(--text-tertiary);
}

.sticky-heading-segment {
    padding: 2px 8px;
    border-radius: 999px;  /* 胶囊标签，区别于正文 */
    cursor: pointer;
    background-color: var(--bg-primary);
    transition: background-color 0.15s, color 0.15s;
}

.sticky-heading-segment.current {
    background-color: var(--accent-color);
    color: #ffffff;
}

.sticky-heading-separator {
    opacity: 0.6;
    -webkit-user-select: none;
    user-select: none;
}

.loading {
    /* 全局唯一的加载组件：固定在正文上方一条位置，不随内容高度变化 */
    position: fixed;
    top: calc(var(--header-height) + 12px); /* 紧贴 Header 下方，略留空隙 */
    left: 50%;                              /* 视口水平中心 */
    transform: translateX(-50%);            /* 向左偏移自身一半，确保整体居中 */
    display: flex;
    align-items: flex-start;                /* 垂直方向贴近顶部 */
    justify-content: center;
    padding: 8px 24px 0 24px;
    color: var(--text-secondary);
    background: transparent; /* 如需略微蒙层，可改为 rgba(255,255,255,0.6) */
    z-index: 2000;
    pointer-events: none; /* 只做视觉提示，不阻断点击 */
}

.loading-card {
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 24px;
    min-width: 420px;
    max-width: 720px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.loading-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.10);
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-color), #2dd4bf);
    transition: width 140ms ease;
}

.loading-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.theme-dark .loading-bar {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.markdown-body {
    max-width: 920px;
    margin: 0 auto;
    min-height: 1em;
    display: block;
    color: var(--text-primary);
}

/* Markdown样式 */
/* 正文标题：使用变量统一配色，H1 下划线、H2/H3 用 accent 系做层级提醒 */
.markdown-body h1 {
    font-size: 32px;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--heading-h1-border);
    color: var(--heading-h1-color);
}

.markdown-body h2 {
    font-size: 24px;
    margin: 25px 0 15px;
    color: var(--heading-h2-color);
}

.markdown-body h3 {
    font-size: 20px;
    margin: 20px 0 12px;
    color: var(--heading-h3-color);
}

.markdown-body h4 {
    font-size: 18px;
    margin: 15px 0 10px;
    color: var(--heading-h4-color);
}

.markdown-body p {
    margin: 12px 0;
    line-height: 1.8;
}

.markdown-body ul,
.markdown-body ol {
    margin: 12px 0;
    padding-left: 30px;
}

.markdown-body li {
    margin: 6px 0;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.markdown-body table th,
.markdown-body table td {
    padding: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.markdown-body table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
}

.markdown-body code {
    background-color: var(--code-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-body pre {
    background-color: var(--code-bg);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 20px 0;
}

.markdown-body pre code {
    background: none;
    padding: 0;
}

.markdown-body a {
    color: var(--link-color);
    text-decoration: none;
}

.markdown-body a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.markdown-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px auto; /* 统一在正文中水平居中显示图片 */
}

.markdown-body blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 16px;
    margin: 20px 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* 高亮搜索结果 */
.markdown-body .search-highlight {
    background-color: #ffd700;
    color: #000;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 600;
}

/* 右侧本页大纲 */
.outline-panel {
    width: var(--outline-width);
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    padding: 20px 20px 24px 20px;
    overflow-y: auto;
    display: none; /* 小屏默认隐藏，由JS在桌面端显示 */
    flex-shrink: 0; /* 右侧面板不收缩 */
    pointer-events: auto;
}

.outline-header {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.outline-body {
    font-size: 13px;
    line-height: 1.6;
}

.outline-item {
    margin-bottom: 8px;
}

.outline-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 4px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.outline-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
}

.outline-level-2 {
    padding-left: 8px;
    margin-top: 4px;
}

.outline-level-3 {
    padding-left: 20px;
    font-size: 12px;
    margin-top: 2px;
}

.outline-link.active {
    color: var(--accent-color);
    font-weight: 600;
    background-color: var(--bg-tertiary);
}

/* 本页搜索结果区域 */
#pageSearchSection {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.page-search-nav {
    margin-top: 8px;
}

.page-search-link {
    display: block;
    font-size: 12px;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.page-search-link:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.page-search-link:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.page-search-link mark {
    background-color: #ffd700;
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* 清除搜索按钮 */
.clear-search-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    line-height: 1;
}

.clear-search-btn:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* 隐藏滚动条但保留滚动功能（侧边栏 / 正文 / 右侧大纲 / 搜索结果） */
.sidebar,
.content,
.outline-panel,
.search-results {
    scrollbar-width: none; /* Firefox */
}

.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar,
.outline-panel::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.clear-search-btn:active {
    transform: scale(0.95);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        z-index: 200;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }

    .outline-panel {
        display: none !important;
    }

    .sidebar.hidden {
        transform: translateX(-100%);
    }

    #searchInput {
        width: 150px;
    }

    .content {
        padding: 20px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* 有新版本提示浮层 */
.version-notify-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: version-notify-fade 0.2s ease;
}
.version-notify-box {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 24px 32px 20px 32px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 90%;
}
.version-notify-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}
.version-notify-meta {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}
.version-notify-meta div + div {
    margin-top: 4px;
}
.version-notify-tip {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}
.version-notify-tip .kbd {
    display: inline-block;
    padding: 1px 4px;
    margin: 0 1px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    font-size: 12px;
}
.version-notify-actions {
    display: flex;
    justify-content: center;
}
.version-notify-box .btn-refresh {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}
.version-notify-box .btn-refresh:hover {
    background: var(--accent-hover);
}
@keyframes version-notify-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 右下角版本信息徽标：显示 Wiki 内容版本与样式版本 */
.version-info-badge {
    position: fixed;
    right: 16px;
    bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: transparent;
    color: rgba(0, 0, 0, 0.6);
    font-size: 11px;
    line-height: 1.4;
    z-index: 9999;
    pointer-events: none;
    box-shadow: none;
    max-width: 360px;
    box-sizing: border-box;
    text-align: left;
    white-space: normal;
}

body.theme-light .version-info-badge {
    background: transparent;
}

body.theme-dark .version-info-badge {
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
}

/* 右下角产品微信群悬浮入口（每个产品可配不同二维码） */
.wechat-float {
    position: fixed;
    right: 24px;
    bottom: 55px; /* 再向上移动，贴近右下角但不压住版本信息 */
    display: none; /* 默认隐藏，由配置决定是否展示 */
    align-items: center;
    justify-content: center;
    z-index: 9998;
    pointer-events: auto;
}

.wechat-btn {
    width: 80px;
    height: 80px;
    border-radius: 0;
    border: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.wechat-btn:hover {
    transform: translateY(-1px);
    box-shadow: none;
    background-color: transparent;
}

.wechat-icon {
    width: 60px;
    height: 60px;
    color: rgba(0, 0, 0, 0.75); /* 浅色主题下为深灰轮廓 */
}

body.theme-dark .wechat-icon {
    color: rgba(255, 255, 255, 0.85); /* 深色主题下为浅灰轮廓 */
}

.wechat-icon path,
.wechat-icon circle {
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
}

.wechat-popover {
    position: absolute;
    right: 0;
    bottom: 52px;
    transform: translateY(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.wechat-popover-inner {
    min-width: 220px;
    padding: 12px 14px 10px 14px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    text-align: center;
}

.wechat-popover-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #222222;
}

.wechat-popover-hint {
    font-size: 12px;
    color: #666666;
    line-height: 1.2;
    margin-bottom: 4px;
}

.wechat-popover img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
}

.wechat-float:hover .wechat-popover {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
