MediaWiki:Common.css:修订间差异

来自心灵终结资料站
跳转到导航 跳转到搜索
无编辑摘要
标签手工回退
Lyx讨论 | 贡献
无编辑摘要
 
(未显示同一用户的97个中间版本)
第1行: 第1行:
/* --- 盟军发电厂示例卡片样式开始 --- */
/* ============================================================
.allied-powerplant-box {
  📦 整体说明
     width: 100%;
  本 CSS 用于 MediaWiki 全局暗色美化,适用于 Vector、Vector 2022、Monobook 等皮肤。
     background-color: #f8f9fa;
  目标:暗色背景 + 高对比度/醒目字体,提升阅读与编辑体验。
     border: 1px solid #a2a9b1;
  包含:全局样式 | 标题与链接 | 表格与代码 | 信息框 | 侧边栏 | 顶部导航 | 编辑器 | 滚动条等。
     padding: 0;
  ============================================================ */
     border-spacing: 0;
 
/* ============================================================
  区块 1:全局重置 & 基础颜色
  ============================================================ */
html,
body {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}
 
/* ============================================================
  区块 2:标题样式(更亮、更醒目)
  ============================================================ */
h1,
h2,
h3,
h4,
h5,
h6,
.firstHeading,
.mw-headline,
.personaltitle,
#firstHeading,
#siteSub,
#contentSub {
    color: #f0f6fc !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}
 
h2,
h3,
h4,
h5,
h6 {
    border-bottom-color: #30363d !important;
}
 
/* ============================================================
  区块 3:链接颜色与交互(亮蓝 + 悬停加强)
  ============================================================ */
a,
a:visited,
a:active,
.mw-body a,
.mw-body a:visited,
#mw-panel a,
#mw-panel a:visited,
.vector-menu a,
.vector-menu a:visited {
    color: #58a6ff !important;
    text-decoration: none;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}
 
a:hover,
a:focus,
.mw-body a:hover,
.vector-menu a:hover {
    color: #79c0ff !important;
    text-shadow: 0 0 6px rgba(88, 166, 255, 0.3) !important;
    text-decoration: underline !important;
}
 
a:visited {
     color: #a5b4fc !important;
}
 
/* ============================================================
  区块 4:页面主体区域
  ============================================================ */
.mw-body,
#content,
#mw-content-text,
.ve-init-mw-desktopArticleTarget-targetContainer {
     background-color: #161b22 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
     border: 1px solid #30363d !important;
     box-shadow: 0 0 0 1px #30363d !important;
}
 
.mw-body p,
#content p {
    color: #e6edf3 !important;
    line-height: 1.7;
}
 
/* ============================================================
  区块 5:表格样式(暗色背景 + 亮色文字)
  ============================================================ */
table,
.wikitable,
.mw-datatable {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
     border-color: #30363d !important;
}
 
table th,
.wikitable th,
.mw-datatable th {
    background-color: #21262d !important;
    color: #f0f6fc !important;
    border-color: #30363d !important;
    font-weight: 600;
}
 
table td,
.wikitable td,
.mw-datatable td {
    border-color: #30363d !important;
    color: #e6edf3 !important;
}
}


.allied-powerplant-box th.header-title {
table tr:nth-child(even),
     background-color: #eaecf0;
.wikitable tr:nth-child(even),
    color: #000;
.mw-datatable tr:nth-child(even) {
    font-weight: bold;
     background-color: #161b22 !important;
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid #a2a9b1;
    font-size: 1.2em;
}
}


.allied-powerplant-box td.content-cell {
table tr:nth-child(odd),
    padding: 15px;
.wikitable tr:nth-child(odd),
     background-color: #ffffff;
.mw-datatable tr:nth-child(odd) {
     background-color: #0d1117 !important;
}
}


.allied-powerplant-box td.background-cell {
table tr:hover,
     padding: 15px;
.wikitable tr:hover,
     background-color: #f8f9fa;
.mw-datatable tr:hover {
     background-color: #1c2333 !important;
     transition: background 0.1s ease;
}
}


/* 数据区内部弹性布局 */
/* ============================================================
.pp-flex-container {
  区块 6:代码块 & 预格式化
     display: flex;
  ============================================================ */
     justify-content: space-between;
pre,
     align-items: flex-start;
.mw-code,
     flex-wrap: wrap;
.mw-json,
     gap: 20px;
.mw-highlight,
.hljs,
code,
tt,
kbd,
samp,
.plainlinks pre {
     background-color: #0d1117 !important;
     color: #f0f6fc !important;
    border-color: #30363d !important;
    border-radius: 6px;
     font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
     font-size: 0.92em;
     padding: 0.2em 0.5em;
}
}


.pp-flex-column {
code,
     flex: 1;
tt,
kbd {
    background-color: #21262d !important;
    color: #ffd700 !important;
    padding: 0.15em 0.4em;
     border-radius: 4px;
}
}


.pp-icon-area {
pre code,
     flex: 0 0 auto;
.mw-code code {
     text-align: right;
    background-color: transparent !important;
     color: #e6edf3 !important;
     padding: 0;
}
}


/* 中间图片外框 */
/* ============================================================
.pp-image-frame {
  区块 7:信息框 / 消息盒子(警告、错误、成功)
     text-align: center;
  ============================================================ */
     padding: 15px;
.messagebox,
     background-color: #f8f9fa;
.infobox,
     border: 1px solid #3366cc;
.ambox,
     margin: 10px 0;
.toc,
.mw-notification,
#mw-indicators,
.warningbox,
.errorbox,
.successbox {
     background-color: #161b22 !important;
     border-color: #30363d !important;
     color: #e6edf3 !important;
     border-radius: 6px;
     box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
}


.pp-image-frame img {
.warningbox {
     max-width: 100%;
    border-color: #daa520 !important;
     height: auto;
     background-color: #2a1f0e !important;
}
.warningbox,
.warningbox * {
     color: #ffd966 !important;
}
}


.pp-image-caption {
.errorbox {
     color: #666;
     border-color: #dc3545 !important;
     margin-top: 5px;
     background-color: #2c141a !important;
     display: block;
}
.errorbox,
.errorbox * {
     color: #f8a5b0 !important;
}
}
/* --- 盟军发电厂示例卡片样式结束 --- */


.successbox {
    border-color: #28a745 !important;
    background-color: #0f2b1a !important;
}
.successbox,
.successbox * {
    color: #7ee08c !important;
}


/* ============================================================
  区块 8:侧边栏(紧凑 + 大字 + 高行距 + 黑金边框)
  ============================================================ */


/* 8.1 侧边栏整体 */
#mw-panel {
    background: #0d1117 !important;
    border-right: 1px solid #21262d !important;
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 1em !important;
    width: auto !important;
    min-width: 160px !important;
    max-width: 210px !important;
    margin-top: 0 !important;
}


/* ====================================================
/* 8.2 左上角 Logo */
    MediaWiki 现代干练风格 (低圆角、表格强化)
#p-logo {
     修复:链接悬浮无双下划线,统一为单底边效果
     display: block !important;
     适用版本:1.35+ / 1.39+ (Vector 2022 及旧版兼容)
     padding: 0.5em 0 0.3em 0.8em !important;
  ==================================================== */
    margin: 0 !important;
    border-bottom: 1px solid #21262d !important;
}


/* ---------- 基础排版 ---------- */
#p-logo a {
body {
    background-size: 128px !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-position: center center !important;
  font-size: 16px;
    background-repeat: no-repeat !important;
  line-height: 1.65;
    display: block !important;
  color: #1e293b;
    width: 10em !important;
  background-color: #f1f5f9;
    height: 160px !important;
    text-decoration: none !important;
}
}


/* ---------- 内容主容器 ---------- */
/* 8.3 板块容器 */
.mw-body {
#mw-panel .portal {
  background-color: #ffffff;
    margin-bottom: 0 !important;
  border-radius: 4px;
    padding: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    position: relative !important;
  padding: 2rem 2.5rem;
  margin-top: 0.5rem;
  border: 1px solid #d1d9e6;
}
}


/* ---------- 标题与层级 ---------- */
/* 8.4 板块标题 */
h1, h2, h3, h4, h5, h6 {
#mw-panel .portal h3,
  font-weight: 600;
#mw-panel .portal .vector-menu-heading {
  letter-spacing: -0.01em;
    color: #f0f6fc !important;
  line-height: 1.3;
    font-weight: 600 !important;
  color: #0f172a;
    font-size: 0.85em !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid #21262d !important;
    padding: 0.5em 0 0.35em 0.6em !important;
    margin: 0 !important;
    background: transparent !important;
    opacity: 0.8 !important;
    white-space: nowrap !important;
}
}


h1 {
/* 8.5 链接列表容器 */
  font-size: 2.2rem;
#mw-panel .portal .vector-menu-content,
  border-bottom: 3px solid #cbd5e1;
#mw-panel .portal .body {
  padding-bottom: 0.4rem;
    background: transparent !important;
  margin-bottom: 1.2rem;
    padding: 0 !important;
    margin: 0 !important;
}
}


h2 {
#mw-panel .portal .vector-menu-content ul,
  font-size: 1.7rem;
#mw-panel .portal .body ul {
  border-bottom: 2px solid #d1d9e6;
    list-style: none !important;
  padding-bottom: 0.3rem;
    margin: 0 !important;
  margin-top: 2rem;
    padding: 0 !important;
}
}


h3 {
#mw-panel .portal .vector-menu-content ul li,
  font-size: 1.3rem;
#mw-panel .portal .body ul li {
  font-weight: 600;
    margin: 0 !important;
    padding: 0 !important;
}
}


/* ====================================================
/* 8.6 链接默认状态(黑金风格:底部金边) */
  链接样式 — 修复双下划线问题
#mw-panel .portal .vector-menu-content ul li a,
  ==================================================== */
#mw-panel .portal .body ul li a {
    display: block !important;
    padding: 0.35em 0.6em 0.35em 0.8em !important;
    color: #c9d1d9 !important;
    font-size: 1em !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    border-left: 2px solid transparent !important;
    background: transparent !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.6 !important;
    /* 底部金边装饰(来自后续终极版) */
    border-bottom: 1px solid rgba(255, 215, 0, 0.15) !important;
    background-image: linear-gradient(to right, rgba(255, 215, 0, 0.08), transparent 80%) !important;
    background-repeat: no-repeat !important;
    background-position: bottom left !important;
    background-size: 100% 1px !important;
}


/* 基础链接:默认无下划线,仅保留细底边作为预备 */
/* 8.7 链接悬浮状态 */
a {
#mw-panel .portal .vector-menu-content ul li a:hover,
  color: #1e4f8a;
#mw-panel .portal .body ul li a:hover {
  text-decoration: none;           /* 去掉所有文字装饰下划线 */
    color: #f0f6fc !important;
  border-bottom: 1px solid transparent;
    background: rgba(255, 255, 255, 0.05) !important;
  transition: border-color 0.15s ease, color 0.15s ease;
    border-left-color: #fbcb3e !important;
    border-bottom-color: rgba(255, 215, 0, 0.45) !important;
    background-image: linear-gradient(to right, rgba(255, 215, 0, 0.15), transparent 90%) !important;
}
}


/* 悬浮时:仅显示一条清晰的底边,无文字下划线 */
/* 8.8 最后一个链接无边框 */
a:hover {
#mw-panel .portal .body ul li:last-child a,
  color: #0b2b4a;
#mw-panel .portal .vector-menu-content ul li:last-child a {
  border-bottom-color: #1e4f8a;   /* 仅底边变色,无 text-decoration */
    border-bottom: none !important;
  text-decoration: none;           /* 强制确保无文字下划线 */
    background-image: none !important;
}
}


/* 已访问链接保持同样风格 */
/* 8.9 板块分隔线 */
a:visited {
#mw-panel .portal:not(:last-child)::after {
  color: #1e4f8a;
    content: '' !important;
    display: block !important;
    height: 1px !important;
    background: #21262d !important;
    margin: 0.1em 0.8em !important;
}
}


/* ---------- 外部链接 (去掉MediaWiki默认背景图标,保留自定义上标) ---------- */
/* 8.10 移除折叠按钮 */
.mw-body a.external {
#mw-panel .portal .vector-menu-heading .mw-collapsible-text {
  background: none;
    display: none !important;
  padding-right: 0;
}
}
.mw-body a.external:after {
 
  content: "↗";
/* 8.11 "工具"区域微调 */
  font-size: 0.7em;
#p-tb .portal .vector-menu-content ul li a,
  margin-left: 0.2em;
#p-tb .portal .body ul li a {
  opacity: 0.6;
    padding: 0.25em 0.6em 0.25em 0.8em !important;
  border-bottom: none;            /* 避免图标带下划线 */
    font-size: 0.9em !important;
    line-height: 1.5 !important;
}
}


/* 外部链接悬浮时,图标不带下划线 */
/* 8.12 侧边栏滚动条 */
.mw-body a.external:hover:after {
#mw-panel {
  border-bottom: none;
    scrollbar-width: thin;
    scrollbar-color: #21262d #0d1117;
}
#mw-panel::-webkit-scrollbar {
    width: 4px;
}
#mw-panel::-webkit-scrollbar-track {
    background: #0d1117;
}
#mw-panel::-webkit-scrollbar-thumb {
    background: #21262d;
    border-radius: 4px;
}
#mw-panel::-webkit-scrollbar-thumb:hover {
    background: #30363d;
}
}


/* ---------- 编辑区内的链接 (如编辑段落的[编辑]按钮) ---------- */
/* 8.13 修复头部与侧边栏之间的空隙 */
.mw-editsection a {
#mw-head-base {
  background: #e9edf2;
    background: transparent !important;
  padding: 0.15rem 0.7rem;
}
  border-radius: 2px;
#mw-page-base {
  color: #1e293b;
    background: transparent !important;
  border: 1px solid #cbd5e1;
}
  transition: all 0.1s;
#mw-panel > div:empty,
  text-decoration: none;         /* 确保无下划线 */
#mw-panel > .empty,
#mw-panel > .portal:empty {
    display: none !important;
}
}


.mw-editsection a:hover {
/* ============================================================
  background: #1e4f8a;
  区块 9:搜索框
  color: white;
  ============================================================ */
  border-color: #1e4f8a;
#searchInput,
  border-bottom-color: #1e4f8a;  /* 保持与边框一致 */
#searchQuery,
  text-decoration: none;
.vector-search-box-input,
#simpleSearch input {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
    border-radius: 6px;
}
}


/* ---------- 导航与页签 ---------- */
#searchInput:focus,
.vector-page-tabs .mw-list-item a {
#searchQuery:focus,
  border-radius: 2px 2px 0 0;
.vector-search-box-input:focus {
  padding: 0.6rem 1.2rem;
    border-color: #58a6ff !important;
  font-weight: 500;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.25) !important;
  color: #475569;
    outline: none;
  transition: background 0.15s;
  text-decoration: none;          /* 导航链接无下划线 */
  border-bottom: none;           /* 导航链接不用底边,用背景区分 */
}
}


.vector-page-tabs .mw-list-item a:hover {
#searchButton,
  background: #e9edf2;
#mw-searchButton {
  color: #0f172a;
    background-color: #21262d !important;
  border-bottom: none;
    color: #e6edf3 !important;
  text-decoration: none;
    border-color: #30363d !important;
}
#searchButton:hover,
#mw-searchButton:hover {
    background-color: #30363d !important;
}
}


.vector-page-tabs .mw-list-item.selected a {
/* ============================================================
  background: #ffffff;
  区块 10:分类与底部
  color: #1e4f8a;
  ============================================================ */
  border-bottom: 3px solid #1e4f8a;
#catlinks,
  font-weight: 600;
#footer,
  text-decoration: none;
#footer-info,
#footer-places,
#footer-icons {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    color: #8b949e !important;
}
}


/* ---------- 表格美化 ---------- */
#catlinks a,
.wikitable {
#footer a {
  border-collapse: collapse;
    color: #58a6ff !important;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  width: 100%;
  background: white;
  border: 1px solid #d1d9e6;
  font-size: 0.95rem;
}
}


.wikitable th {
#catlinks a:hover,
  background: #e9edf2;
#footer a:hover {
  color: #0f172a;
    color: #79c0ff !important;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  text-align: left;
  letter-spacing: 0.02em;
}
}


.wikitable td {
/* ============================================================
  padding: 0.65rem 1rem;
  区块 11:编辑框(经典文本编辑区域)
  border: 1px solid #d1d9e6;
  ============================================================ */
  background-color: #ffffff;
#wpTextbox1,
.mw-editform #wpTextbox1,
textarea.mw-editfont-monospace,
#editpage-textarea {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border: 1px solid #30363d !important;
    border-radius: 6px !important;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    padding: 12px !important;
    caret-color: #58a6ff !important;
    box-shadow: inset 0 0 0 1px #30363d !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
}


.wikitable tr:nth-child(even) td {
#wpTextbox1:focus,
  background-color: #f8fafc;
.mw-editform #wpTextbox1:focus,
#editpage-textarea:focus {
    border-color: #58a6ff !important;
    box-shadow: inset 0 0 0 1px #58a6ff, 0 0 0 3px rgba(88, 166, 255, 0.15) !important;
    outline: none !important;
}
}


.wikitable tr:hover td {
/* ============================================================
  background-color: #eef2f7;
  区块 12:编辑摘要/注释输入框
  ============================================================ */
#wpSummary,
.mw-summary,
#wpMinoredit + label,
input.mw-edit-summary {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border: 1px solid #30363d !important;
    border-radius: 4px !important;
    padding: 6px 10px !important;
}
}


.wikitable thead th {
#wpSummary:focus,
  border-bottom-width: 2px;
.mw-summary:focus {
  border-bottom-color: #94a3b8;
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15) !important;
    outline: none !important;
}
}


.wikitable .sortheader {
/* ============================================================
  cursor: pointer;
  区块 13:WikiEditor 工具栏
  ============================================================ */
.wikiEditor-toolbar,
.wikiEditor-ui-toolbar,
.wikiEditor-ui {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    color: #e6edf3 !important;
    border-radius: 6px 6px 0 0 !important;
}
}
.wikitable .sortheader:hover {
 
  background: #d1d9e6;
.wikiEditor-ui-toolbar .section-main {
    background-color: transparent !important;
}
}


/* ---------- 表格内链接 (保持风格统一) ---------- */
.wikiEditor-ui-toolbar .group {
.wikitable a {
    border-color: #30363d !important;
  border-bottom: 1px solid transparent;
}
}
.wikitable a:hover {
 
  border-bottom-color: #1e4f8a;
.wikiEditor-ui-toolbar .group-label {
    color: #b1bac4 !important;
}
}


/* ---------- 信息框 ---------- */
.wikiEditor-ui-toolbar .tool,
.infobox {
.wikiEditor-ui-toolbar .tool-select {
  background: #f8fafc;
    background-color: #0d1117 !important;
  border: 1px solid #cbd5e1;
    border-color: #30363d !important;
  border-radius: 2px;
    color: #e6edf3 !important;
  padding: 1rem 1.2rem;
    border-radius: 3px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  float: right;
  clear: right;
  margin: 0 0 1rem 1.5rem;
  max-width: 320px;
  width: 100%;
}
}


.infobox th, .infobox td {
.wikiEditor-ui-toolbar .tool:hover,
  padding: 0.4rem 0.6rem;
.wikiEditor-ui-toolbar .tool-select:hover {
  border: none;
    background-color: #21262d !important;
  border-bottom: 1px solid #e2e8f0;
    border-color: #58a6ff !important;
}
}


.infobox tr:last-child th,
.wikiEditor-ui-toolbar .tool.active,
.infobox tr:last-child td {
.wikiEditor-ui-toolbar .tool-select.active {
  border-bottom: none;
    background-color: #1f6feb !important;
    border-color: #58a6ff !important;
    color: #ffffff !important;
}
}


.infobox .infobox-header {
.wikiEditor-ui-toolbar .menu {
  font-weight: 700;
    background-color: #161b22 !important;
  font-size: 1.2rem;
    border-color: #30363d !important;
  text-align: center;
    color: #e6edf3 !important;
  background: #e2e8f0;
  border-radius: 2px;
  padding: 0.3rem 0.5rem;
}
}


/* ---------- 引用 ---------- */
.wikiEditor-ui-toolbar .menu .menu-item {
ol.references {
    color: #e6edf3 !important;
  font-size: 0.9rem;
  background: #f8fafc;
  padding: 0.8rem 1.5rem 0.8rem 2.5rem;
  border-left: 4px solid #94a3b8;
  border-radius: 0;
}
}


/* ---------- 消息框 ---------- */
.wikiEditor-ui-toolbar .menu .menu-item:hover {
.msgbox, .messagebox {
    background-color: #21262d !important;
  border-radius: 0;
    color: #f0f6fc !important;
  padding: 1rem 1.5rem;
  background: #f1f5f9;
  border-left: 6px solid #64748b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  margin: 1.2rem 0;
  border-top: 1px solid #d1d9e6;
  border-right: 1px solid #d1d9e6;
  border-bottom: 1px solid #d1d9e6;
}
}


.msgbox.warning, .messagebox.warning {
/* ============================================================
  border-left-color: #b45309;
  区块 14:编辑按钮(保存/预览/差异)
  background: #fffbeb;
  ============================================================ */
#editpage-copywarn,
#editpage-copywarn p,
.mw-editform .editCheckboxes,
.mw-editform .editHelp {
    color: #b1bac4 !important;
    background-color: transparent !important;
}
}


.msgbox.error, .messagebox.error {
#wpSave,
  border-left-color: #b91c1c;
#wpPreview,
  background: #fef2f2;
#wpDiff,
.mw-editform input[type="submit"] {
    background-color: #21262d !important;
    color: #f0f6fc !important;
    border: 1px solid #30363d !important;
    border-radius: 6px !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    transition: all 0.15s ease;
}
}


.msgbox.success, .messagebox.success {
#wpSave:hover,
  border-left-color: #15803d;
#wpPreview:hover,
  background: #f0fdf4;
#wpDiff:hover,
.mw-editform input[type="submit"]:hover {
    background-color: #30363d !important;
    border-color: #58a6ff !important;
    box-shadow: 0 0 12px rgba(88, 166, 255, 0.15) !important;
}
}


/* ---------- 代码块 ---------- */
/* ============================================================
pre, .mw-code {
  区块 15:其他输入框
  background: #f1f5f9;
  ============================================================ */
  border: 1px solid #cbd5e1;
textarea,
  border-radius: 2px;
input[type="text"],
  padding: 1rem 1.5rem;
input[type="search"],
  font-family: "JetBrains Mono", "Fira Code", monospace;
input[type="password"],
  font-size: 0.9rem;
input[type="email"],
  overflow-x: auto;
select {
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.02);
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border: 1px solid #30363d !important;
    border-radius: 4px;
}
}


/* ---------- 目录 ---------- */
textarea:focus,
#toc {
input[type="text"]:focus {
  background: #f8fafc;
    border-color: #58a6ff !important;
  border: 1px solid #cbd5e1;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
  border-radius: 2px;
  padding: 0.8rem 1.5rem;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
}


#toc ul {
/* ============================================================
  margin-left: 0.5rem;
  区块 16:特殊页面 & 差异对比
  ============================================================ */
.diff,
.diff td,
.diff th,
.diff-editfont-monospace,
.mw-diff-edit,
#mw-diff-ntitle1,
#mw-diff-ntitle2 {
    background-color: #161b22 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}
}


#toc li {
.diff td.diff-context {
  list-style: none;
    background-color: #0d1117 !important;
  padding: 0.15rem 0;
    color: #b1bac4 !important;
}
.diff td.diff-addedline {
    background-color: #1a3a2a !important;
    color: #a8f0c0 !important;
}
.diff td.diff-deletedline {
    background-color: #3a1a1a !important;
    color: #f0a8a8 !important;
}
}


.toctitle h2 {
/* ============================================================
  font-size: 1.1rem;
  区块 17:用户贡献 & 最近更改
  border-bottom: none;
  ============================================================ */
  margin: 0 0 0.5rem 0;
.mw-contributions-table,
  display: inline-block;
.mw-changeslist,
.mw-rcfilters-table {
    background-color: transparent !important;
    color: #e6edf3 !important;
}
}


/* ---------- 目录内链接 ---------- */
.mw-changeslist-line,
#toc a {
.mw-contributions-line {
  border-bottom: 1px solid transparent;
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    padding: 0.3em 0;
}
}
#toc a:hover {
 
  border-bottom-color: #1e4f8a;
.mw-rcfilters-ui-highlights {
    color: #f0f6fc !important;
}
}


/* ---------- 编辑按钮 ---------- */
/* ============================================================
.mw-editsection {
  区块 18:缩略图 / 图片说明
  font-size: 0.8rem;
  ============================================================ */
.thumbinner,
.thumbcaption,
.gallerybox,
.gallerytext,
.thumbimage {
    background-color: #161b22 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}
}


.mw-editsection a {
.thumbimage {
  background: #e9edf2;
    border: 1px solid #30363d !important;
  padding: 0.15rem 0.7rem;
  border-radius: 2px;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  transition: all 0.1s;
  text-decoration: none;
}
}


.mw-editsection a:hover {
/* ============================================================
  background: #1e4f8a;
  区块 19:引用 / 参考文献
  color: white;
  ============================================================ */
  border-color: #1e4f8a;
.reflist,
  text-decoration: none;
.references,
.mw-references-wrap {
    background-color: transparent !important;
    color: #e6edf3 !important;
}
.reflist a,
.references a {
    color: #58a6ff !important;
}
}


/* ---------- 响应式 ---------- */
/* ============================================================
@media (max-width: 768px) {
  区块 20:内部导航 (toc)
  .mw-body {
  ============================================================ */
     padding: 1rem 1.2rem;
#toc,
     border-radius: 2px;
.toc {
  }
     background-color: #161b22 !important;
 
     border: 1px solid #30363d !important;
  h1 { font-size: 1.8rem; }
    color: #e6edf3 !important;
  h2 { font-size: 1.4rem; }
    border-radius: 6px;
 
}
  .infobox {
#toc a,
     float: none;
.toc a {
    margin: 1rem auto;
     color: #58a6ff !important;
     max-width: 100%;
}
  }
#toc a:hover,
.toc a:hover {
     color: #79c0ff !important;
}
}


/* ---------- 滚动条 ---------- */
/* ============================================================
  区块 21:滚动条美化(全局)
  ============================================================ */
::-webkit-scrollbar {
::-webkit-scrollbar {
  width: 10px;
    width: 10px;
  height: 10px;
    height: 10px;
    background: #0d1117;
}
}
::-webkit-scrollbar-track {
::-webkit-scrollbar-track {
  background: #e2e8f0;
    background: #0d1117;
  border-radius: 0;
}
}
::-webkit-scrollbar-thumb {
::-webkit-scrollbar-thumb {
  background: #94a3b8;
    background: #30363d;
  border-radius: 0;
    border-radius: 8px;
  border: 1px solid #64748b;
}
}
::-webkit-scrollbar-thumb:hover {
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
    background: #484f58;
}
 
/* ============================================================
  区块 22:辅助类与杂项
  ============================================================ */
.mw-body-content {
    color: #e6edf3 !important;
}
 
::placeholder {
    color: #8b949e !important;
    opacity: 0.7;
}
 
::selection {
    background: #1f6feb !important;
    color: #ffffff !important;
}
 
img,
figure {
    background-color: #0d1117 !important;
    border: 1px solid #30363d;
    border-radius: 4px;
}
 
#mw-page-base,
#mw-head-base {
    background-color: #0d1117 !important;
}
 
.skin-minerva .mw-body,
.skin-minerva #content {
    background-color: #161b22 !important;
    color: #e6edf3 !important;
}
.skin-minerva a {
    color: #58a6ff !important;
}
 
/* ============================================================
  区块 23:顶部操作标签美化(页面/讨论 | 阅读/编辑/源代码/历史)
  (黑金主题 + 完美排版修复)
  ============================================================ */
 
/* 23.1 导航容器布局 */
#left-navigation,
#right-navigation,
#p-views,
#p-cactions,
.vector-menu-tabs,
.vector-menu-tabs ul,
.vector-menu-dropdown,
#left-navigation ul,
#right-navigation ul {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.4 !important;
}
 
/* 23.2 列表项重置 */
#left-navigation ul li,
#right-navigation ul li,
#p-views ul li,
#p-cactions ul li,
.vector-menu-tabs li,
.vector-menu-dropdown li {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    line-height: 1.4 !important;
}
 
/* 23.3 链接通用样式 */
#left-navigation ul li a,
#right-navigation ul li a,
#p-views ul li a,
#p-cactions ul li a,
.vector-menu-tabs li a,
.vector-menu-dropdown label,
.vector-menu-dropdown a,
#ca-more a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    text-shadow: none !important;
    margin: 0 2px !important;
    padding: 5px 12px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    line-height: 1.4 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transform: none !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    white-space: nowrap !important;
}
 
/* 23.4 移除所有伪元素(图标等) */
#left-navigation ul li a::before,
#left-navigation ul li a::after,
#right-navigation ul li a::before,
#right-navigation ul li a::after,
#p-views ul li a::before,
#p-views ul li a::after,
#p-cactions ul li a::before,
#p-cactions ul li a::after,
.vector-menu-tabs li a::before,
.vector-menu-tabs li a::after,
.vector-menu-dropdown label::before,
.vector-menu-dropdown label::after,
#ca-more a::before,
#ca-more a::after,
#ca-watch a::before,
#ca-watch a::after,
#ca-unwatch a::before,
#ca-unwatch a::after,
.mw-watchlink.icon a::before,
.mw-watchlink.icon a::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    transform: none !important;
    background: none !important;
}
 
/* 23.5 移除监视链接的图标背景 */
.mw-watchlink.icon a,
#ca-watch a,
#ca-unwatch a {
    background-image: none !important;
    text-indent: 0 !important;
}
 
/* 23.6 导航链接颜色(黑金主题) */
#left-navigation ul li a,
#right-navigation ul li a,
#p-views ul li a,
#p-cactions ul li a,
.vector-menu-tabs li a,
.vector-menu-dropdown a,
.vector-menu-dropdown label,
#ca-more a {
    color: #c9d1d9 !important;
}
 
#left-navigation ul li a:hover,
#right-navigation ul li a:hover,
#p-views ul li a:hover,
#p-cactions ul li a:hover,
.vector-menu-tabs li a:hover,
.vector-menu-dropdown a:hover,
.vector-menu-dropdown label:hover,
#ca-more a:hover {
    color: #ffd700 !important;
    background-color: rgba(255, 215, 0, 0.1) !important;
}
 
/* 23.7 当前选中标签 */
#left-navigation ul li.selected a,
#right-navigation ul li.selected a,
#p-views ul li.selected a,
#p-cactions ul li.selected a,
.vector-menu-tabs li.selected a {
    color: #ffd700 !important;
    border-bottom: 2px solid #ffd700 !important;
    font-weight: 700 !important;
}
 
/* 23.8 编辑/查看源代码特殊高亮 */
#ca-edit a,
#ca-viewsource a {
    color: #ffd700 !important;
    background-color: rgba(255, 215, 0, 0.08) !important;
    border-radius: 4px !important;
}
#ca-edit a:hover,
#ca-viewsource a:hover {
    color: #ffe066 !important;
    background-color: rgba(255, 215, 0, 0.2) !important;
}
 
/* 23.9 监视链接 */
#ca-watch a,
#ca-unwatch a {
    color: #c9d1d9 !important;
}
#ca-watch a:hover,
#ca-unwatch a:hover {
    color: #ffd700 !important;
}
 
/* 23.10 下拉菜单 */
#p-cactions .vector-menu-dropdown .menu li a,
.vector-menu-dropdown .menu li a {
    color: #c9d1d9 !important;
    background-color: transparent !important;
}
#p-cactions .vector-menu-dropdown .menu li a:hover,
.vector-menu-dropdown .menu li a:hover {
    color: #ffd700 !important;
    background-color: rgba(255, 215, 0, 0.1) !important;
}
 
/* 23.11 下拉指示器 */
.vector-menu-indicator,
#p-cactions .vector-menu-indicator {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    margin: 0 0 0 4px !important;
    padding: 0 !important;
    height: auto !important;
    line-height: 1 !important;
    transform: none !important;
    border: none !important;
    background: none !important;
    color: #c9d1d9 !important;
}
.vector-menu-dropdown:hover .vector-menu-indicator,
#p-cactions .vector-menu-dropdown:hover .vector-menu-indicator {
    color: #ffd700 !important;
}
 
/* 23.12 下拉菜单面板 */
#p-cactions .vector-menu-dropdown .menu,
.vector-menu-dropdown .menu {
    background-color: rgba(32, 32, 32, 0.98) !important;
    border: 1px solid rgba(255, 215, 0, 0.2) !important;
    border-radius: 6px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6) !important;
}
 
/* ============================================================
  区块 24:正文区彻底修复(移除导致过宽的 padding)
  ============================================================ */
 
/* 24.1 清除所有误加的背景、边框、阴影,恢复正常宽度 */
.mw-body .mw-parser-output,
.mw-parser-output,
#mw-content-text,
.mw-body-content {
    padding: 0 !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
    max-width: 100% !important;
    width: auto !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
 
/* 24.2 移除正文区外部多余容器的边框和背景 */
.mw-body .mw-parser-output > div,
.mw-body .mw-parser-output > table,
.mw-body .mw-parser-output > form {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
 
/* 24.3 强制正文区内部所有超链接恢复蓝色(不适用金色) */
.mw-parser-output a,
.mw-parser-output a:visited,
.mw-parser-output a:active,
.mw-parser-output a.external,
.mw-body .mw-parser-output a,
.mw-body .mw-content-ltr a,
#mw-content-text a {
    color: #58a6ff !important;
    text-decoration: none !important;
    background-color: transparent !important;
    background-image: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    display: inline !important;
    transform: none !important;
    transition: color 0.2s ease !important;
}
 
.mw-parser-output a:visited,
.mw-body .mw-parser-output a:visited {
    color: #a5b4fc !important;
}
 
.mw-parser-output a:hover,
.mw-body .mw-parser-output a:hover,
.mw-parser-output a.external:hover {
    color: #79c0ff !important;
    text-decoration: underline !important;
    text-shadow: none !important;
}
 
/* 24.4 保留列表和段落的正常缩进 */
.mw-parser-output h1,
.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4,
.mw-parser-output p {
    margin-left: 0 !important;
    padding-left: 0 !important;
}
 
.mw-parser-output ul,
.mw-parser-output ol {
    margin-left: 0 !important;
    padding-left: 1.6em !important;
}
 
.mw-parser-output ul li,
.mw-parser-output ol li {
    margin-bottom: 0.3em !important;
    padding-left: 0 !important;
    color: #d0d0d0 !important;
}
 
/* ============================================================
  区块 25:CodeMirror 编辑器暗色适配
  ============================================================ */
.CodeMirror,
.CodeMirror-scroll,
.CodeMirror-gutters {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}
 
.CodeMirror-gutters {
    background-color: #161b22 !important;
    border-right-color: #30363d !important;
}
 
.CodeMirror-linenumber {
    color: #8b949e !important;
}
 
.CodeMirror-cursor {
    border-left-color: #58a6ff !important;
}
 
.CodeMirror-selected {
    background-color: #1f6feb !important;
}
 
/* CodeMirror 语法高亮颜色(保持醒目) */
.cm-s-default .cm-keyword {
    color: #ff7b72 !important;
}
.cm-s-default .cm-atom {
    color: #79c0ff !important;
}
.cm-s-default .cm-number {
    color: #d2a8ff !important;
}
.cm-s-default .cm-def {
    color: #58a6ff !important;
}
.cm-s-default .cm-variable {
    color: #e6edf3 !important;
}
.cm-s-default .cm-variable-2 {
    color: #e6edf3 !important;
}
.cm-s-default .cm-variable-3 {
    color: #e6edf3 !important;
}
.cm-s-default .cm-property {
    color: #79c0ff !important;
}
.cm-s-default .cm-operator {
    color: #ff7b72 !important;
}
.cm-s-default .cm-comment {
    color: #8b949e !important;
    font-style: italic !important;
}
.cm-s-default .cm-string {
    color: #a5d6ff !important;
}
.cm-s-default .cm-string-2 {
    color: #a5d6ff !important;
}
.cm-s-default .cm-meta {
    color: #b1bac4 !important;
}
.cm-s-default .cm-qualifier {
    color: #58a6ff !important;
}
.cm-s-default .cm-builtin {
    color: #ff7b72 !important;
}
.cm-s-default .cm-bracket {
    color: #e6edf3 !important;
}
.cm-s-default .cm-tag {
    color: #ff7b72 !important;
}
.cm-s-default .cm-attribute {
    color: #79c0ff !important;
}
.cm-s-default .cm-hr {
    color: #8b949e !important;
}
.cm-s-default .cm-link {
    color: #58a6ff !important;
}
.cm-s-default .cm-error {
    color: #f85149 !important;
}
 
/* ============================================================
  区块 26:编辑器白色背景修复(统一边框为 #30363d)
  ============================================================ */
 
/* 26.1 编辑选项区域 */
.editOptions,
.mw-editform .editOptions {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    border: 1px solid #30363d !important;
}
 
/* 26.2 编辑器状态信息栏 */
.codeEditor-status-message,
.codeEditor-status-worker {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
    border: 1px solid #30363d !important;
}
 
/* 26.3 编辑器外部容器 - 移除所有白线 */
.codeEditor-editor,
.codeEditor-status {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    border: 1px solid #30363d !important;
}
 
/* ============================================================
  区块 27:Ace 编辑器适配
  ============================================================ */
 
/* 27.1 Ace 编辑器主体 - 移除多余边框 */
.ace_editor,
.ace_editor .ace_scroller,
.ace_editor .ace_content {
    background-color: #0d1117 !important;
    border: none !important;
}
 
/* 27.2 Ace 编辑器文字颜色 */
.ace_editor .ace_text-layer,
.ace_editor .ace_line,
.ace_editor .ace_line * {
    color: #e6edf3 !important;
}
 
/* 27.3 Ace 行号区 */
.ace_gutter,
.ace_editor .ace_gutter {
    background-color: #161b22 !important;
    color: #8b949e !important;
    border-right: 1px solid #30363d !important;
}
 
/* 27.4 Ace 光标 */
.ace_cursor,
.ace_editor .ace_cursor {
    color: #58a6ff !important;
    border-left-color: #58a6ff !important;
}
 
/* 27.5 Ace 选中高亮 - 修复框选看不见的问题 */
.ace_selection,
.ace_editor .ace_selection,
.ace_editor .ace_selection div {
    background-color: #1f6feb !important;
    color: #ffffff !important;
}
 
.ace_editor .ace_selected-word,
.ace_editor .ace_selected-word div {
    background-color: #1f6feb !important;
    color: #ffffff !important;
}
 
/* 27.6 Ace 当前行高亮 */
.ace_active-line,
.ace_editor .ace_active-line {
    background-color: #1c2333 !important;
}
 
/* 27.7 Ace 当前行号高亮 */
.ace_gutter-active-line,
.ace_editor .ace_gutter-active-line {
    background-color: #1c2333 !important;
}
 
/* 27.8 强制 Ace 选中的背景色 */
.ace_editor .ace_marker-layer .ace_selection {
    background-color: #1f6feb !important;
}
 
/* ============================================================
  区块 28:编辑页面底部区域修复
  ============================================================ */
 
/* 28.1 摘要输入框 */
#wpSummary,
.mw-summary,
input.mw-edit-summary {
    color: #e6edf3 !important;
    border: 1px solid #30363d !important;
}
 
#wpSummary:focus,
.mw-summary:focus {
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15) !important;
    outline: none !important;
}
 
/* 28.2 版权警告 */
#editpage-copywarn,
#editpage-copywarn p {
    color: #b1bac4 !important;
}
 
/* 28.3 保存/预览/差异 按钮 */
#wpSave,
#wpPreview,
#wpDiff {
    color: #f0f6fc !important;
    background-color: #21262d !important;
    border: 1px solid #30363d !important;
}
 
#wpSave:hover,
#wpPreview:hover,
#wpDiff:hover {
    background-color: #30363d !important;
    border-color: #58a6ff !important;
}
 
/* 28.4 页面底部 */
#footer,
#footer-info,
#footer-places,
#footer-icons {
    color: #8b949e !important;
}
 
#footer a,
#footer-places a {
    color: #58a6ff !important;
}
 
/* ============================================================
  区块 29:修复 Ace 编辑器白线问题(只禁用 height)
  ============================================================ */
.ace_content {
    height: auto !important;
}
 
/* ============================================================
  ★★★★★ 代码结束 ★★★★★
  ============================================================ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* --- 单位信息卡片样式 (全局生效) --- */
 
.mw-card-box {
    width: 100% !important;
    background-color: transparent !important; /* 去掉原来的浅灰背景,直接透出深色底 */
    border: 1px solid #444; /* 边框改为深灰色,更契合暗黑主题 */
    padding: 0;
    border-spacing: 0;
    border-collapse: collapse;
    table-layout: fixed;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3); /* 阴影加深 */
}
 
.mw-card-header {
    background-color: #1a1a1a; /* 深黑背景 */
    color: var(--theme-color, #0077FF); /* 标题文字使用主题色 */
    font-weight: bold;
    padding: 12px 18px;
    text-align: left;
    border-bottom: 3px solid var(--theme-color, #0077FF);
    font-size: 1.2em;
}
 
.mw-card-body {
    padding: 15px 18px;
    color: #ddd; /* 文字改为浅色,配合暗黑主题 */
}
 
.mw-card-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px 30px;
    box-sizing: border-box;
}
 
.mw-card-col {
    flex: 1;
    line-height: 1.7;
    min-width: 120px;
    word-break: break-word;
}
 
.mw-card-icon-box {
    flex: 0 0 auto;
    background-color: var(--theme-color, #0077FF);
    padding: 4px 8px;
    border-radius: 3px;
    display: flex;
    align-items: center;
}
 
.mw-card-divider {
    padding: 0;
    border-bottom: 1px solid #333; /* 暗色分割线 */
}
 
/* 核心修复:图片区 */
.mw-card-image-frame {
    text-align: center;
    padding: 15px;
    background-color: transparent !important; /* 去掉白色背景! */
    border: none; /* 去掉边框 */
    margin: 0;
}
 
.mw-card-image-frame img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}
 
.mw-card-caption {
    color: #888; /* 图片说明文字颜色调暗 */
    margin-top: 6px;
    display: block;
}
 
.mw-card-footer {
    padding: 15px 18px;
    line-height: 1.8;
    color: #ccc; /* 文字颜色 */
}
 
.mw-card-code {
    padding: 15px 18px;
}
 
.mw-card-code-divider {
    padding: 0;
    border-bottom: 1px solid #333;
    margin-bottom: 15px;
}
 
/* 修复代码块白底 */
.mw-card-code-block {
    white-space: pre-wrap !important;      /* 保留换行,自动换行 */
    word-break: break-word !important;    /* 长单词换行 */
    tab-size: 4 !important;                /* 制表符宽度 */
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important;
    font-size: 13px !important;
    line-height: 1.8 !important;          /* 增加行高,更舒适 */
    padding: 16px 20px !important;
    background-color: #0d1117 !important;
    border: 1px solid #30363d !important;
    border-radius: 6px !important;
    overflow-x: auto !important;
    max-height: 500px !important;          /* 内容太多时滚动 */
}.mw-card-code-block {
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
    background-color: #1e1e1e !important; /* 暗黑代码背景 */
    border: 1px solid #444 !important;
    color: #a9b7c6; /* 代码文字颜色 */
    padding: 10px;
}
}


/* ---------- 打印 ---------- */
/* 移动端优化 */
@media print {
@media screen and (max-width: 800px) {
  .mw-body {
    .mw-card-header {
    box-shadow: none;
        padding: 10px 12px;
    border: 1px solid #ccc;
        font-size: 1.1em;
     padding: 0.5rem;
     }
  }
    .mw-card-flex {
  .wikitable {
        flex-direction: column;
    box-shadow: none;
        gap: 10px;
    border: 1px solid #999;
     }
  }
     .mw-card-icon-box {
  .wikitable th {
        align-self: flex-end;
     background: #eee !important;
    }
  }
  a {
     border-bottom: 1px dotted #999 !important;
  }
  a:hover {
    border-bottom-color: #999 !important;
  }
}
}

2026年8月27日 (四) 23:19的最新版本

/* ============================================================
   📦 整体说明
   本 CSS 用于 MediaWiki 全局暗色美化,适用于 Vector、Vector 2022、Monobook 等皮肤。
   目标:暗色背景 + 高对比度/醒目字体,提升阅读与编辑体验。
   包含:全局样式 | 标题与链接 | 表格与代码 | 信息框 | 侧边栏 | 顶部导航 | 编辑器 | 滚动条等。
   ============================================================ */

/* ============================================================
   区块 1:全局重置 & 基础颜色
   ============================================================ */
html,
body {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================================
   区块 2:标题样式(更亮、更醒目)
   ============================================================ */
h1,
h2,
h3,
h4,
h5,
h6,
.firstHeading,
.mw-headline,
.personaltitle,
#firstHeading,
#siteSub,
#contentSub {
    color: #f0f6fc !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}

h2,
h3,
h4,
h5,
h6 {
    border-bottom-color: #30363d !important;
}

/* ============================================================
   区块 3:链接颜色与交互(亮蓝 + 悬停加强)
   ============================================================ */
a,
a:visited,
a:active,
.mw-body a,
.mw-body a:visited,
#mw-panel a,
#mw-panel a:visited,
.vector-menu a,
.vector-menu a:visited {
    color: #58a6ff !important;
    text-decoration: none;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

a:hover,
a:focus,
.mw-body a:hover,
.vector-menu a:hover {
    color: #79c0ff !important;
    text-shadow: 0 0 6px rgba(88, 166, 255, 0.3) !important;
    text-decoration: underline !important;
}

a:visited {
    color: #a5b4fc !important;
}

/* ============================================================
   区块 4:页面主体区域
   ============================================================ */
.mw-body,
#content,
#mw-content-text,
.ve-init-mw-desktopArticleTarget-targetContainer {
    background-color: #161b22 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
    border: 1px solid #30363d !important;
    box-shadow: 0 0 0 1px #30363d !important;
}

.mw-body p,
#content p {
    color: #e6edf3 !important;
    line-height: 1.7;
}

/* ============================================================
   区块 5:表格样式(暗色背景 + 亮色文字)
   ============================================================ */
table,
.wikitable,
.mw-datatable {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}

table th,
.wikitable th,
.mw-datatable th {
    background-color: #21262d !important;
    color: #f0f6fc !important;
    border-color: #30363d !important;
    font-weight: 600;
}

table td,
.wikitable td,
.mw-datatable td {
    border-color: #30363d !important;
    color: #e6edf3 !important;
}

table tr:nth-child(even),
.wikitable tr:nth-child(even),
.mw-datatable tr:nth-child(even) {
    background-color: #161b22 !important;
}

table tr:nth-child(odd),
.wikitable tr:nth-child(odd),
.mw-datatable tr:nth-child(odd) {
    background-color: #0d1117 !important;
}

table tr:hover,
.wikitable tr:hover,
.mw-datatable tr:hover {
    background-color: #1c2333 !important;
    transition: background 0.1s ease;
}

/* ============================================================
   区块 6:代码块 & 预格式化
   ============================================================ */
pre,
.mw-code,
.mw-json,
.mw-highlight,
.hljs,
code,
tt,
kbd,
samp,
.plainlinks pre {
    background-color: #0d1117 !important;
    color: #f0f6fc !important;
    border-color: #30363d !important;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.92em;
    padding: 0.2em 0.5em;
}

code,
tt,
kbd {
    background-color: #21262d !important;
    color: #ffd700 !important;
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

pre code,
.mw-code code {
    background-color: transparent !important;
    color: #e6edf3 !important;
    padding: 0;
}

/* ============================================================
   区块 7:信息框 / 消息盒子(警告、错误、成功)
   ============================================================ */
.messagebox,
.infobox,
.ambox,
.toc,
.mw-notification,
#mw-indicators,
.warningbox,
.errorbox,
.successbox {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    color: #e6edf3 !important;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.warningbox {
    border-color: #daa520 !important;
    background-color: #2a1f0e !important;
}
.warningbox,
.warningbox * {
    color: #ffd966 !important;
}

.errorbox {
    border-color: #dc3545 !important;
    background-color: #2c141a !important;
}
.errorbox,
.errorbox * {
    color: #f8a5b0 !important;
}

.successbox {
    border-color: #28a745 !important;
    background-color: #0f2b1a !important;
}
.successbox,
.successbox * {
    color: #7ee08c !important;
}

/* ============================================================
   区块 8:侧边栏(紧凑 + 大字 + 高行距 + 黑金边框)
   ============================================================ */

/* 8.1 侧边栏整体 */
#mw-panel {
    background: #0d1117 !important;
    border-right: 1px solid #21262d !important;
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 1em !important;
    width: auto !important;
    min-width: 160px !important;
    max-width: 210px !important;
    margin-top: 0 !important;
}

/* 8.2 左上角 Logo */
#p-logo {
    display: block !important;
    padding: 0.5em 0 0.3em 0.8em !important;
    margin: 0 !important;
    border-bottom: 1px solid #21262d !important;
}

#p-logo a {
    background-size: 128px !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    display: block !important;
    width: 10em !important;
    height: 160px !important;
    text-decoration: none !important;
}

/* 8.3 板块容器 */
#mw-panel .portal {
    margin-bottom: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

/* 8.4 板块标题 */
#mw-panel .portal h3,
#mw-panel .portal .vector-menu-heading {
    color: #f0f6fc !important;
    font-weight: 600 !important;
    font-size: 0.85em !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid #21262d !important;
    padding: 0.5em 0 0.35em 0.6em !important;
    margin: 0 !important;
    background: transparent !important;
    opacity: 0.8 !important;
    white-space: nowrap !important;
}

/* 8.5 链接列表容器 */
#mw-panel .portal .vector-menu-content,
#mw-panel .portal .body {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

#mw-panel .portal .vector-menu-content ul,
#mw-panel .portal .body ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#mw-panel .portal .vector-menu-content ul li,
#mw-panel .portal .body ul li {
    margin: 0 !important;
    padding: 0 !important;
}

/* 8.6 链接默认状态(黑金风格:底部金边) */
#mw-panel .portal .vector-menu-content ul li a,
#mw-panel .portal .body ul li a {
    display: block !important;
    padding: 0.35em 0.6em 0.35em 0.8em !important;
    color: #c9d1d9 !important;
    font-size: 1em !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    border-left: 2px solid transparent !important;
    background: transparent !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.6 !important;
    /* 底部金边装饰(来自后续终极版) */
    border-bottom: 1px solid rgba(255, 215, 0, 0.15) !important;
    background-image: linear-gradient(to right, rgba(255, 215, 0, 0.08), transparent 80%) !important;
    background-repeat: no-repeat !important;
    background-position: bottom left !important;
    background-size: 100% 1px !important;
}

/* 8.7 链接悬浮状态 */
#mw-panel .portal .vector-menu-content ul li a:hover,
#mw-panel .portal .body ul li a:hover {
    color: #f0f6fc !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-left-color: #fbcb3e !important;
    border-bottom-color: rgba(255, 215, 0, 0.45) !important;
    background-image: linear-gradient(to right, rgba(255, 215, 0, 0.15), transparent 90%) !important;
}

/* 8.8 最后一个链接无边框 */
#mw-panel .portal .body ul li:last-child a,
#mw-panel .portal .vector-menu-content ul li:last-child a {
    border-bottom: none !important;
    background-image: none !important;
}

/* 8.9 板块分隔线 */
#mw-panel .portal:not(:last-child)::after {
    content: '' !important;
    display: block !important;
    height: 1px !important;
    background: #21262d !important;
    margin: 0.1em 0.8em !important;
}

/* 8.10 移除折叠按钮 */
#mw-panel .portal .vector-menu-heading .mw-collapsible-text {
    display: none !important;
}

/* 8.11 "工具"区域微调 */
#p-tb .portal .vector-menu-content ul li a,
#p-tb .portal .body ul li a {
    padding: 0.25em 0.6em 0.25em 0.8em !important;
    font-size: 0.9em !important;
    line-height: 1.5 !important;
}

/* 8.12 侧边栏滚动条 */
#mw-panel {
    scrollbar-width: thin;
    scrollbar-color: #21262d #0d1117;
}
#mw-panel::-webkit-scrollbar {
    width: 4px;
}
#mw-panel::-webkit-scrollbar-track {
    background: #0d1117;
}
#mw-panel::-webkit-scrollbar-thumb {
    background: #21262d;
    border-radius: 4px;
}
#mw-panel::-webkit-scrollbar-thumb:hover {
    background: #30363d;
}

/* 8.13 修复头部与侧边栏之间的空隙 */
#mw-head-base {
    background: transparent !important;
}
#mw-page-base {
    background: transparent !important;
}
#mw-panel > div:empty,
#mw-panel > .empty,
#mw-panel > .portal:empty {
    display: none !important;
}

/* ============================================================
   区块 9:搜索框
   ============================================================ */
#searchInput,
#searchQuery,
.vector-search-box-input,
#simpleSearch input {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
    border-radius: 6px;
}

#searchInput:focus,
#searchQuery:focus,
.vector-search-box-input:focus {
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.25) !important;
    outline: none;
}

#searchButton,
#mw-searchButton {
    background-color: #21262d !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}
#searchButton:hover,
#mw-searchButton:hover {
    background-color: #30363d !important;
}

/* ============================================================
   区块 10:分类与底部
   ============================================================ */
#catlinks,
#footer,
#footer-info,
#footer-places,
#footer-icons {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    color: #8b949e !important;
}

#catlinks a,
#footer a {
    color: #58a6ff !important;
}

#catlinks a:hover,
#footer a:hover {
    color: #79c0ff !important;
}

/* ============================================================
   区块 11:编辑框(经典文本编辑区域)
   ============================================================ */
#wpTextbox1,
.mw-editform #wpTextbox1,
textarea.mw-editfont-monospace,
#editpage-textarea {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border: 1px solid #30363d !important;
    border-radius: 6px !important;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    padding: 12px !important;
    caret-color: #58a6ff !important;
    box-shadow: inset 0 0 0 1px #30363d !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#wpTextbox1:focus,
.mw-editform #wpTextbox1:focus,
#editpage-textarea:focus {
    border-color: #58a6ff !important;
    box-shadow: inset 0 0 0 1px #58a6ff, 0 0 0 3px rgba(88, 166, 255, 0.15) !important;
    outline: none !important;
}

/* ============================================================
   区块 12:编辑摘要/注释输入框
   ============================================================ */
#wpSummary,
.mw-summary,
#wpMinoredit + label,
input.mw-edit-summary {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border: 1px solid #30363d !important;
    border-radius: 4px !important;
    padding: 6px 10px !important;
}

#wpSummary:focus,
.mw-summary:focus {
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15) !important;
    outline: none !important;
}

/* ============================================================
   区块 13:WikiEditor 工具栏
   ============================================================ */
.wikiEditor-toolbar,
.wikiEditor-ui-toolbar,
.wikiEditor-ui {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    color: #e6edf3 !important;
    border-radius: 6px 6px 0 0 !important;
}

.wikiEditor-ui-toolbar .section-main {
    background-color: transparent !important;
}

.wikiEditor-ui-toolbar .group {
    border-color: #30363d !important;
}

.wikiEditor-ui-toolbar .group-label {
    color: #b1bac4 !important;
}

.wikiEditor-ui-toolbar .tool,
.wikiEditor-ui-toolbar .tool-select {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    color: #e6edf3 !important;
    border-radius: 3px !important;
}

.wikiEditor-ui-toolbar .tool:hover,
.wikiEditor-ui-toolbar .tool-select:hover {
    background-color: #21262d !important;
    border-color: #58a6ff !important;
}

.wikiEditor-ui-toolbar .tool.active,
.wikiEditor-ui-toolbar .tool-select.active {
    background-color: #1f6feb !important;
    border-color: #58a6ff !important;
    color: #ffffff !important;
}

.wikiEditor-ui-toolbar .menu {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    color: #e6edf3 !important;
}

.wikiEditor-ui-toolbar .menu .menu-item {
    color: #e6edf3 !important;
}

.wikiEditor-ui-toolbar .menu .menu-item:hover {
    background-color: #21262d !important;
    color: #f0f6fc !important;
}

/* ============================================================
   区块 14:编辑按钮(保存/预览/差异)
   ============================================================ */
#editpage-copywarn,
#editpage-copywarn p,
.mw-editform .editCheckboxes,
.mw-editform .editHelp {
    color: #b1bac4 !important;
    background-color: transparent !important;
}

#wpSave,
#wpPreview,
#wpDiff,
.mw-editform input[type="submit"] {
    background-color: #21262d !important;
    color: #f0f6fc !important;
    border: 1px solid #30363d !important;
    border-radius: 6px !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    transition: all 0.15s ease;
}

#wpSave:hover,
#wpPreview:hover,
#wpDiff:hover,
.mw-editform input[type="submit"]:hover {
    background-color: #30363d !important;
    border-color: #58a6ff !important;
    box-shadow: 0 0 12px rgba(88, 166, 255, 0.15) !important;
}

/* ============================================================
   区块 15:其他输入框
   ============================================================ */
textarea,
input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
select {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border: 1px solid #30363d !important;
    border-radius: 4px;
}

textarea:focus,
input[type="text"]:focus {
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

/* ============================================================
   区块 16:特殊页面 & 差异对比
   ============================================================ */
.diff,
.diff td,
.diff th,
.diff-editfont-monospace,
.mw-diff-edit,
#mw-diff-ntitle1,
#mw-diff-ntitle2 {
    background-color: #161b22 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}

.diff td.diff-context {
    background-color: #0d1117 !important;
    color: #b1bac4 !important;
}
.diff td.diff-addedline {
    background-color: #1a3a2a !important;
    color: #a8f0c0 !important;
}
.diff td.diff-deletedline {
    background-color: #3a1a1a !important;
    color: #f0a8a8 !important;
}

/* ============================================================
   区块 17:用户贡献 & 最近更改
   ============================================================ */
.mw-contributions-table,
.mw-changeslist,
.mw-rcfilters-table {
    background-color: transparent !important;
    color: #e6edf3 !important;
}

.mw-changeslist-line,
.mw-contributions-line {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    padding: 0.3em 0;
}

.mw-rcfilters-ui-highlights {
    color: #f0f6fc !important;
}

/* ============================================================
   区块 18:缩略图 / 图片说明
   ============================================================ */
.thumbinner,
.thumbcaption,
.gallerybox,
.gallerytext,
.thumbimage {
    background-color: #161b22 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}

.thumbimage {
    border: 1px solid #30363d !important;
}

/* ============================================================
   区块 19:引用 / 参考文献
   ============================================================ */
.reflist,
.references,
.mw-references-wrap {
    background-color: transparent !important;
    color: #e6edf3 !important;
}
.reflist a,
.references a {
    color: #58a6ff !important;
}

/* ============================================================
   区块 20:内部导航 (toc)
   ============================================================ */
#toc,
.toc {
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
    color: #e6edf3 !important;
    border-radius: 6px;
}
#toc a,
.toc a {
    color: #58a6ff !important;
}
#toc a:hover,
.toc a:hover {
    color: #79c0ff !important;
}

/* ============================================================
   区块 21:滚动条美化(全局)
   ============================================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    background: #0d1117;
}
::-webkit-scrollbar-track {
    background: #0d1117;
}
::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* ============================================================
   区块 22:辅助类与杂项
   ============================================================ */
.mw-body-content {
    color: #e6edf3 !important;
}

::placeholder {
    color: #8b949e !important;
    opacity: 0.7;
}

::selection {
    background: #1f6feb !important;
    color: #ffffff !important;
}

img,
figure {
    background-color: #0d1117 !important;
    border: 1px solid #30363d;
    border-radius: 4px;
}

#mw-page-base,
#mw-head-base {
    background-color: #0d1117 !important;
}

.skin-minerva .mw-body,
.skin-minerva #content {
    background-color: #161b22 !important;
    color: #e6edf3 !important;
}
.skin-minerva a {
    color: #58a6ff !important;
}

/* ============================================================
   区块 23:顶部操作标签美化(页面/讨论 | 阅读/编辑/源代码/历史)
   (黑金主题 + 完美排版修复)
   ============================================================ */

/* 23.1 导航容器布局 */
#left-navigation,
#right-navigation,
#p-views,
#p-cactions,
.vector-menu-tabs,
.vector-menu-tabs ul,
.vector-menu-dropdown,
#left-navigation ul,
#right-navigation ul {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.4 !important;
}

/* 23.2 列表项重置 */
#left-navigation ul li,
#right-navigation ul li,
#p-views ul li,
#p-cactions ul li,
.vector-menu-tabs li,
.vector-menu-dropdown li {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    line-height: 1.4 !important;
}

/* 23.3 链接通用样式 */
#left-navigation ul li a,
#right-navigation ul li a,
#p-views ul li a,
#p-cactions ul li a,
.vector-menu-tabs li a,
.vector-menu-dropdown label,
.vector-menu-dropdown a,
#ca-more a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    text-shadow: none !important;
    margin: 0 2px !important;
    padding: 5px 12px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    line-height: 1.4 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transform: none !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    white-space: nowrap !important;
}

/* 23.4 移除所有伪元素(图标等) */
#left-navigation ul li a::before,
#left-navigation ul li a::after,
#right-navigation ul li a::before,
#right-navigation ul li a::after,
#p-views ul li a::before,
#p-views ul li a::after,
#p-cactions ul li a::before,
#p-cactions ul li a::after,
.vector-menu-tabs li a::before,
.vector-menu-tabs li a::after,
.vector-menu-dropdown label::before,
.vector-menu-dropdown label::after,
#ca-more a::before,
#ca-more a::after,
#ca-watch a::before,
#ca-watch a::after,
#ca-unwatch a::before,
#ca-unwatch a::after,
.mw-watchlink.icon a::before,
.mw-watchlink.icon a::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    transform: none !important;
    background: none !important;
}

/* 23.5 移除监视链接的图标背景 */
.mw-watchlink.icon a,
#ca-watch a,
#ca-unwatch a {
    background-image: none !important;
    text-indent: 0 !important;
}

/* 23.6 导航链接颜色(黑金主题) */
#left-navigation ul li a,
#right-navigation ul li a,
#p-views ul li a,
#p-cactions ul li a,
.vector-menu-tabs li a,
.vector-menu-dropdown a,
.vector-menu-dropdown label,
#ca-more a {
    color: #c9d1d9 !important;
}

#left-navigation ul li a:hover,
#right-navigation ul li a:hover,
#p-views ul li a:hover,
#p-cactions ul li a:hover,
.vector-menu-tabs li a:hover,
.vector-menu-dropdown a:hover,
.vector-menu-dropdown label:hover,
#ca-more a:hover {
    color: #ffd700 !important;
    background-color: rgba(255, 215, 0, 0.1) !important;
}

/* 23.7 当前选中标签 */
#left-navigation ul li.selected a,
#right-navigation ul li.selected a,
#p-views ul li.selected a,
#p-cactions ul li.selected a,
.vector-menu-tabs li.selected a {
    color: #ffd700 !important;
    border-bottom: 2px solid #ffd700 !important;
    font-weight: 700 !important;
}

/* 23.8 编辑/查看源代码特殊高亮 */
#ca-edit a,
#ca-viewsource a {
    color: #ffd700 !important;
    background-color: rgba(255, 215, 0, 0.08) !important;
    border-radius: 4px !important;
}
#ca-edit a:hover,
#ca-viewsource a:hover {
    color: #ffe066 !important;
    background-color: rgba(255, 215, 0, 0.2) !important;
}

/* 23.9 监视链接 */
#ca-watch a,
#ca-unwatch a {
    color: #c9d1d9 !important;
}
#ca-watch a:hover,
#ca-unwatch a:hover {
    color: #ffd700 !important;
}

/* 23.10 下拉菜单 */
#p-cactions .vector-menu-dropdown .menu li a,
.vector-menu-dropdown .menu li a {
    color: #c9d1d9 !important;
    background-color: transparent !important;
}
#p-cactions .vector-menu-dropdown .menu li a:hover,
.vector-menu-dropdown .menu li a:hover {
    color: #ffd700 !important;
    background-color: rgba(255, 215, 0, 0.1) !important;
}

/* 23.11 下拉指示器 */
.vector-menu-indicator,
#p-cactions .vector-menu-indicator {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    margin: 0 0 0 4px !important;
    padding: 0 !important;
    height: auto !important;
    line-height: 1 !important;
    transform: none !important;
    border: none !important;
    background: none !important;
    color: #c9d1d9 !important;
}
.vector-menu-dropdown:hover .vector-menu-indicator,
#p-cactions .vector-menu-dropdown:hover .vector-menu-indicator {
    color: #ffd700 !important;
}

/* 23.12 下拉菜单面板 */
#p-cactions .vector-menu-dropdown .menu,
.vector-menu-dropdown .menu {
    background-color: rgba(32, 32, 32, 0.98) !important;
    border: 1px solid rgba(255, 215, 0, 0.2) !important;
    border-radius: 6px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6) !important;
}

/* ============================================================
   区块 24:正文区彻底修复(移除导致过宽的 padding)
   ============================================================ */

/* 24.1 清除所有误加的背景、边框、阴影,恢复正常宽度 */
.mw-body .mw-parser-output,
.mw-parser-output,
#mw-content-text,
.mw-body-content {
    padding: 0 !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
    max-width: 100% !important;
    width: auto !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* 24.2 移除正文区外部多余容器的边框和背景 */
.mw-body .mw-parser-output > div,
.mw-body .mw-parser-output > table,
.mw-body .mw-parser-output > form {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 24.3 强制正文区内部所有超链接恢复蓝色(不适用金色) */
.mw-parser-output a,
.mw-parser-output a:visited,
.mw-parser-output a:active,
.mw-parser-output a.external,
.mw-body .mw-parser-output a,
.mw-body .mw-content-ltr a,
#mw-content-text a {
    color: #58a6ff !important;
    text-decoration: none !important;
    background-color: transparent !important;
    background-image: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    display: inline !important;
    transform: none !important;
    transition: color 0.2s ease !important;
}

.mw-parser-output a:visited,
.mw-body .mw-parser-output a:visited {
    color: #a5b4fc !important;
}

.mw-parser-output a:hover,
.mw-body .mw-parser-output a:hover,
.mw-parser-output a.external:hover {
    color: #79c0ff !important;
    text-decoration: underline !important;
    text-shadow: none !important;
}

/* 24.4 保留列表和段落的正常缩进 */
.mw-parser-output h1,
.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4,
.mw-parser-output p {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.mw-parser-output ul,
.mw-parser-output ol {
    margin-left: 0 !important;
    padding-left: 1.6em !important;
}

.mw-parser-output ul li,
.mw-parser-output ol li {
    margin-bottom: 0.3em !important;
    padding-left: 0 !important;
    color: #d0d0d0 !important;
}

/* ============================================================
   区块 25:CodeMirror 编辑器暗色适配
   ============================================================ */
.CodeMirror,
.CodeMirror-scroll,
.CodeMirror-gutters {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
}

.CodeMirror-gutters {
    background-color: #161b22 !important;
    border-right-color: #30363d !important;
}

.CodeMirror-linenumber {
    color: #8b949e !important;
}

.CodeMirror-cursor {
    border-left-color: #58a6ff !important;
}

.CodeMirror-selected {
    background-color: #1f6feb !important;
}

/* CodeMirror 语法高亮颜色(保持醒目) */
.cm-s-default .cm-keyword {
    color: #ff7b72 !important;
}
.cm-s-default .cm-atom {
    color: #79c0ff !important;
}
.cm-s-default .cm-number {
    color: #d2a8ff !important;
}
.cm-s-default .cm-def {
    color: #58a6ff !important;
}
.cm-s-default .cm-variable {
    color: #e6edf3 !important;
}
.cm-s-default .cm-variable-2 {
    color: #e6edf3 !important;
}
.cm-s-default .cm-variable-3 {
    color: #e6edf3 !important;
}
.cm-s-default .cm-property {
    color: #79c0ff !important;
}
.cm-s-default .cm-operator {
    color: #ff7b72 !important;
}
.cm-s-default .cm-comment {
    color: #8b949e !important;
    font-style: italic !important;
}
.cm-s-default .cm-string {
    color: #a5d6ff !important;
}
.cm-s-default .cm-string-2 {
    color: #a5d6ff !important;
}
.cm-s-default .cm-meta {
    color: #b1bac4 !important;
}
.cm-s-default .cm-qualifier {
    color: #58a6ff !important;
}
.cm-s-default .cm-builtin {
    color: #ff7b72 !important;
}
.cm-s-default .cm-bracket {
    color: #e6edf3 !important;
}
.cm-s-default .cm-tag {
    color: #ff7b72 !important;
}
.cm-s-default .cm-attribute {
    color: #79c0ff !important;
}
.cm-s-default .cm-hr {
    color: #8b949e !important;
}
.cm-s-default .cm-link {
    color: #58a6ff !important;
}
.cm-s-default .cm-error {
    color: #f85149 !important;
}

/* ============================================================
   区块 26:编辑器白色背景修复(统一边框为 #30363d)
   ============================================================ */

/* 26.1 编辑选项区域 */
.editOptions,
.mw-editform .editOptions {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    border: 1px solid #30363d !important;
}

/* 26.2 编辑器状态信息栏 */
.codeEditor-status-message,
.codeEditor-status-worker {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border-color: #30363d !important;
    border: 1px solid #30363d !important;
}

/* 26.3 编辑器外部容器 - 移除所有白线 */
.codeEditor-editor,
.codeEditor-status {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    border: 1px solid #30363d !important;
}

/* ============================================================
   区块 27:Ace 编辑器适配
   ============================================================ */

/* 27.1 Ace 编辑器主体 - 移除多余边框 */
.ace_editor,
.ace_editor .ace_scroller,
.ace_editor .ace_content {
    background-color: #0d1117 !important;
    border: none !important;
}

/* 27.2 Ace 编辑器文字颜色 */
.ace_editor .ace_text-layer,
.ace_editor .ace_line,
.ace_editor .ace_line * {
    color: #e6edf3 !important;
}

/* 27.3 Ace 行号区 */
.ace_gutter,
.ace_editor .ace_gutter {
    background-color: #161b22 !important;
    color: #8b949e !important;
    border-right: 1px solid #30363d !important;
}

/* 27.4 Ace 光标 */
.ace_cursor,
.ace_editor .ace_cursor {
    color: #58a6ff !important;
    border-left-color: #58a6ff !important;
}

/* 27.5 Ace 选中高亮 - 修复框选看不见的问题 */
.ace_selection,
.ace_editor .ace_selection,
.ace_editor .ace_selection div {
    background-color: #1f6feb !important;
    color: #ffffff !important;
}

.ace_editor .ace_selected-word,
.ace_editor .ace_selected-word div {
    background-color: #1f6feb !important;
    color: #ffffff !important;
}

/* 27.6 Ace 当前行高亮 */
.ace_active-line,
.ace_editor .ace_active-line {
    background-color: #1c2333 !important;
}

/* 27.7 Ace 当前行号高亮 */
.ace_gutter-active-line,
.ace_editor .ace_gutter-active-line {
    background-color: #1c2333 !important;
}

/* 27.8 强制 Ace 选中的背景色 */
.ace_editor .ace_marker-layer .ace_selection {
    background-color: #1f6feb !important;
}

/* ============================================================
   区块 28:编辑页面底部区域修复
   ============================================================ */

/* 28.1 摘要输入框 */
#wpSummary,
.mw-summary,
input.mw-edit-summary {
    color: #e6edf3 !important;
    border: 1px solid #30363d !important;
}

#wpSummary:focus,
.mw-summary:focus {
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15) !important;
    outline: none !important;
}

/* 28.2 版权警告 */
#editpage-copywarn,
#editpage-copywarn p {
    color: #b1bac4 !important;
}

/* 28.3 保存/预览/差异 按钮 */
#wpSave,
#wpPreview,
#wpDiff {
    color: #f0f6fc !important;
    background-color: #21262d !important;
    border: 1px solid #30363d !important;
}

#wpSave:hover,
#wpPreview:hover,
#wpDiff:hover {
    background-color: #30363d !important;
    border-color: #58a6ff !important;
}

/* 28.4 页面底部 */
#footer,
#footer-info,
#footer-places,
#footer-icons {
    color: #8b949e !important;
}

#footer a,
#footer-places a {
    color: #58a6ff !important;
}

/* ============================================================
   区块 29:修复 Ace 编辑器白线问题(只禁用 height)
   ============================================================ */
.ace_content {
    height: auto !important;
}

/* ============================================================
   ★★★★★ 代码结束 ★★★★★
   ============================================================ */

















/* --- 单位信息卡片样式 (全局生效) --- */

.mw-card-box {
    width: 100% !important;
    background-color: transparent !important; /* 去掉原来的浅灰背景,直接透出深色底 */
    border: 1px solid #444; /* 边框改为深灰色,更契合暗黑主题 */
    padding: 0;
    border-spacing: 0;
    border-collapse: collapse;
    table-layout: fixed;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3); /* 阴影加深 */
}

.mw-card-header {
    background-color: #1a1a1a; /* 深黑背景 */
    color: var(--theme-color, #0077FF); /* 标题文字使用主题色 */
    font-weight: bold;
    padding: 12px 18px;
    text-align: left;
    border-bottom: 3px solid var(--theme-color, #0077FF);
    font-size: 1.2em;
}

.mw-card-body {
    padding: 15px 18px;
    color: #ddd; /* 文字改为浅色,配合暗黑主题 */
}

.mw-card-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px 30px;
    box-sizing: border-box;
}

.mw-card-col {
    flex: 1;
    line-height: 1.7;
    min-width: 120px;
    word-break: break-word;
}

.mw-card-icon-box {
    flex: 0 0 auto;
    background-color: var(--theme-color, #0077FF);
    padding: 4px 8px;
    border-radius: 3px;
    display: flex;
    align-items: center;
}

.mw-card-divider {
    padding: 0;
    border-bottom: 1px solid #333; /* 暗色分割线 */
}

/* 核心修复:图片区 */
.mw-card-image-frame {
    text-align: center;
    padding: 15px;
    background-color: transparent !important; /* 去掉白色背景! */
    border: none; /* 去掉边框 */
    margin: 0;
}

.mw-card-image-frame img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

.mw-card-caption {
    color: #888; /* 图片说明文字颜色调暗 */
    margin-top: 6px;
    display: block;
}

.mw-card-footer {
    padding: 15px 18px;
    line-height: 1.8;
    color: #ccc; /* 文字颜色 */
}

.mw-card-code {
    padding: 15px 18px;
}

.mw-card-code-divider {
    padding: 0;
    border-bottom: 1px solid #333;
    margin-bottom: 15px;
}

/* 修复代码块白底 */
.mw-card-code-block {
    white-space: pre-wrap !important;      /* 保留换行,自动换行 */
    word-break: break-word !important;     /* 长单词换行 */
    tab-size: 4 !important;                /* 制表符宽度 */
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important;
    font-size: 13px !important;
    line-height: 1.8 !important;           /* 增加行高,更舒适 */
    padding: 16px 20px !important;
    background-color: #0d1117 !important;
    border: 1px solid #30363d !important;
    border-radius: 6px !important;
    overflow-x: auto !important;
    max-height: 500px !important;          /* 内容太多时滚动 */
}.mw-card-code-block {
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
    background-color: #1e1e1e !important; /* 暗黑代码背景 */
    border: 1px solid #444 !important;
    color: #a9b7c6; /* 代码文字颜色 */
    padding: 10px;
}

/* 移动端优化 */
@media screen and (max-width: 800px) {
    .mw-card-header {
        padding: 10px 12px;
        font-size: 1.1em;
    }
    .mw-card-flex {
        flex-direction: column;
        gap: 10px;
    }
    .mw-card-icon-box {
        align-self: flex-end;
    }
}