MediaWiki:Common.css:修订间差异

来自心灵终结资料站
跳转到导航 跳转到搜索
无编辑摘要
Lyx讨论 | 贡献
无编辑摘要
第1行: 第1行:
/* ===== 全局变量与基础重置 ===== */
/* ====================================================
:root {
  媒体维基 (MediaWiki) 美化样式表
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  功能:基础美化 + 平滑悬停 (Hover) 效果
  --glass-bg: rgba(255, 255, 255, 0.15);
  适用:适用于现代皮肤 (如 Vector, Monobook 等)
  --glass-border: rgba(255, 255, 255, 0.25);
  注意:请将本样式放入 MediaWiki:Common.css 或您皮肤的 .css 文件中
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  ==================================================== */
  --text-primary: #2d3748;
  --text-light: #f7fafc;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}


/* ===== 全局动态背景 ===== */
/* ---------- 全局基础美化 ---------- */
body {
body {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-color: #f8f9fc;
  background-size: 400% 400%;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  animation: gradientShift 15s ease infinite;
    color: #202122;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  backdrop-filter: blur(2px);
}
}


@keyframes gradientShift {
/* 内容区域卡片化 */
  0% { background-position: 0% 50%; }
.mw-body {
  50% { background-position: 100% 50%; }
    background-color: #ffffff;
  100% { background-position: 0% 50%; }
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 1.5em 2em;
    margin-top: 0.5em;
    transition: box-shadow 0.2s ease;
}
}


/* ===== 主容器 - 毛玻璃卡片 ===== */
/* 一级标题装饰 */
#mw-content-wrapper,
.mw-body h1,
#mw-page-base,
.mw-body h2 {
#mw-head-base {
    border-bottom: 3px solid #e0e7ef;
  background: transparent !important;
    padding-bottom: 0.3em;
    font-weight: 600;
    letter-spacing: 0.3px;
}
}


#mw-content {
.mw-body h1 {
  background: var(--glass-bg);
    font-size: 2em;
  backdrop-filter: blur(20px) saturate(180%);
    color: #1e2a3a;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  margin: 2rem auto;
  padding: 2.5rem;
  max-width: 1200px;
  transition: var(--transition-smooth);
  animation: fadeSlideUp 0.8s ease-out;
}
}


#mw-content:hover {
.mw-body h2 {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    font-size: 1.6em;
  transform: translateY(-2px);
    color: #2a3a4e;
}
}


@keyframes fadeSlideUp {
/* ---------- 链接美化 ---------- */
  from { opacity: 0; transform: translateY(30px); }
a {
  to { opacity: 1; transform: translateY(0); }
    color: #2a6b9e;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease, border-bottom 0.2s ease;
    border-bottom: 1px solid transparent;
}
}


/* ===== 标题与文字 ===== */
/* ===== Hover 效果 1: 链接 ===== */
h1, h2, h3, h4, h5, h6 {
a:hover {
  color: white;
    color: #0f3b5c;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-shadow: 0 0 4px rgba(42, 107, 158, 0.15);
  letter-spacing: -0.02em;
    border-bottom-color: #2a6b9e;
  position: relative;
  display: inline-block;
}
}


h1:after, h2:after {
/* 外部链接专用 */
  content: '';
.mw-body a.external {
  position: absolute;
    background-image: none;
  bottom: -6px;
    padding-right: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 4px;
  animation: underlineGrow 0.6s ease-out;
}
}


@keyframes underlineGrow {
.mw-body a.external:hover {
  from { width: 0; opacity: 0; }
    background-image: none;
  to { width: 60px; opacity: 1; }
}
}


/* ===== 导航栏 - 玻璃态 ===== */
/* ---------- 导航栏 (Vector 皮肤适配) ---------- */
#mw-panel,
#mw-head {
#p-logo,
    background: linear-gradient(135deg, #ffffff 0%, #f2f5fa 100%);
#p-navigation,
    border-radius: 0 0 12px 12px;
#p-tb,
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
#p-personal {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  padding: 1rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-smooth);
}
}


#mw-panel:hover,
/* 导航标签 */
#p-logo:hover,
.vector-menu-tabs li {
#p-navigation:hover,
    background-color: transparent;
#p-tb:hover,
    border-radius: 8px 8px 0 0;
#p-personal:hover {
    transition: background 0.2s ease, transform 0.1s ease;
  transform: scale(1.01) translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
}


/* ===== 搜索框 - 发光效果 ===== */
/* ===== Hover 效果 2: 导航标签 ===== */
#searchInput {
.vector-menu-tabs li:hover {
  background: rgba(255, 255, 255, 0.15) !important;
    background-color: rgba(42, 107, 158, 0.08);
  backdrop-filter: blur(8px);
    transform: translateY(-2px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 50px !important;
  padding: 0.75rem 1.5rem !important;
  color: white !important;
  font-weight: 500;
  transition: var(--transition-smooth);
  width: 100%;
  max-width: 300px;
}
}


#searchInput::placeholder {
.vector-menu-tabs li a {
  color: rgba(255, 255, 255, 0.6);
    color: #2a3a4e;
  font-weight: 300;
    font-weight: 500;
    border-bottom: none;
}
}


#searchInput:focus {
.vector-menu-tabs li a:hover {
  background: rgba(255, 255, 255, 0.25) !important;
    border-bottom: none;
  border-color: #ffffff !important;
    color: #0f3b5c;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2), 0 0 30px rgba(102, 126, 234, 0.3);
  transform: scale(1.02);
  outline: none;
}
}


/* ===== 按钮 - 动态悬浮 ===== */
/* ---------- 按钮风格 (编辑、查看历史等) ---------- */
.mw-ui-button,
.mw-ui-button {
button,
    background-color: #f0f3f8;
input[type="submit"],
    border: 1px solid #c8d0db;
input[type="button"] {
    border-radius: 6px;
  background: var(--primary-gradient) !important;
    padding: 0.4em 1.2em;
  border: none !important;
    font-weight: 500;
  border-radius: 50px !important;
    color: #1e2a3a;
  padding: 0.6rem 1.8rem !important;
    transition: all 0.2s ease;
  color: white !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
}


.mw-ui-button:hover,
/* ===== Hover 效果 3: 按钮 ===== */
button:hover,
.mw-ui-button:hover {
input[type="submit"]:hover,
    background-color: #e3e9f2;
input[type="button"]:hover {
    border-color: #a0b3cc;
  transform: translateY(-3px) scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    transform: scale(1.02);
}
}


.mw-ui-button:active,
/* 主要按钮 (如 "保存页面") 加强 */
button:active {
.mw-ui-button.mw-ui-primary {
  transform: scale(0.96);
    background-color: #2a6b9e;
    border-color: #1e4f77;
    color: #ffffff;
}
}


/* 按钮涟漪效果 */
.mw-ui-button.mw-ui-primary:hover {
.mw-ui-button::after,
    background-color: #1e527a;
button::after {
    border-color: #123a57;
  content: '';
    box-shadow: 0 4px 14px rgba(42, 107, 158, 0.3);
  position: absolute;
    transform: scale(1.02);
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
}


.mw-ui-button:active::after,
/* ---------- 表格美化 ---------- */
button:active::after {
.wikitable {
  width: 300px;
    background-color: #ffffff;
  height: 300px;
    border: 1px solid #d8dfe8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
}


/* ===== 链接 - 动态下划线 ===== */
.wikitable th {
a {
    background-color: #e9eef4;
  color: #fff;
    color: #1a2633;
  text-decoration: none;
    font-weight: 600;
  font-weight: 500;
    padding: 0.6em 1em;
  position: relative;
  transition: var(--transition-smooth);
}
}


a:not(.mw-ui-button):not(.new):after {
.wikitable td {
  content: '';
    padding: 0.5em 1em;
  position: absolute;
    border-bottom: 1px solid #eef2f7;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.4s ease;
}
}


a:not(.mw-ui-button):not(.new):hover:after {
.wikitable tr {
  width: 100%;
    transition: background 0.15s ease;
}
}


a:not(.mw-ui-button):not(.new):hover {
/* ===== Hover 效果 4: 表格行 ===== */
  color: #fff;
.wikitable tr:hover {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    background-color: #f4f8fe;
}
}


/* ===== 表格 - 玻璃卡片风格 ===== */
/* ---------- 信息框 / 消息框 ---------- */
.wikitable,
.mw-message-box {
.mw-datatable {
    border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
    border-left-width: 6px;
  backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  -webkit-backdrop-filter: blur(12px);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
  border-radius: var(--radius-md);
    padding: 0.8em 1.5em;
  border: 1px solid var(--glass-border);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
}


.wikitable th,
/* ===== Hover 效果 5: 消息框 ===== */
.mw-datatable th {
.mw-message-box:hover {
  background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  color: white;
    transform: translateY(-2px);
  font-weight: 600;
  padding: 1rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
}


.wikitable td,
/* ---------- 目录 (TOC) 美化 ---------- */
.mw-datatable td {
.toc {
  padding: 0.75rem 1rem;
    background-color: #f7f9fc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border: 1px solid #e2e8f0;
  color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 0.8em 1.2em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.2s ease;
}
}


.wikitable tr:hover,
/* ===== Hover 效果 6: 目录 ===== */
.mw-datatable tr:hover {
.toc:hover {
  background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: var(--transition-smooth);
}
}


/* ===== 信息框/提示框 ===== */
.toc ul li {
.mw-message-box,
    padding: 0.2em 0;
.infobox {
    transition: padding-left 0.15s ease;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--glass-shadow);
  padding: 1.25rem !important;
  color: white;
  transition: var(--transition-smooth);
}
}


.mw-message-box:hover,
.toc ul li a {
.infobox:hover {
    border-bottom: none;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
}


/* ===== 侧边栏/目录 - 玻璃风格 ===== */
/* ===== Hover 效果 7: 目录条目 ===== */
#toc,
.toc ul li:hover {
.toc {
    padding-left: 6px;
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}
}


#toc:hover,
.toc ul li a:hover {
.toc:hover {
    color: #0f3b5c;
  transform: translateX(4px);
    text-shadow: 0 0 3px rgba(42, 107, 158, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
}


#toc .toctitle {
/* ---------- 侧边栏 (Portlet) 美化 ---------- */
  color: white;
.vector-menu .vector-menu-content ul li {
  font-weight: 600;
    border-radius: 6px;
    transition: background 0.15s ease, padding-left 0.15s ease;
    padding: 0.1em 0;
}
}


#toc ul {
/* ===== Hover 效果 8: 侧边栏菜单项 ===== */
  list-style: none;
.vector-menu .vector-menu-content ul li:hover {
  padding-left: 1rem;
    background: rgba(42, 107, 158, 0.06);
    padding-left: 6px;
}
}


#toc li {
.vector-menu .vector-menu-content ul li a {
  padding: 0.3rem 0;
    border-bottom: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #1e2a3a;
}
}


#toc a {
.vector-menu .vector-menu-content ul li a:hover {
  color: rgba(255, 255, 255, 0.85);
    color: #0f3b5c;
  transition: var(--transition-smooth);
    border-bottom: none;
}
}


#toc a:hover {
/* ---------- 编辑框 (文本区) ---------- */
  color: white;
.mw-editform textarea {
  padding-left: 0.5rem;
    border-radius: 10px;
    border: 1px solid #d0d9e5;
    padding: 0.8em;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.95em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.02);
}
}


/* ===== 编辑区 - 代码编辑器风格 ===== */
/* ===== Hover 效果 9: 编辑框 ===== */
textarea,
.mw-editform textarea:hover {
.mw-editform textarea {
    border-color: #a0b8d0;
  background: rgba(0, 0, 0, 0.3) !important;
    box-shadow: inset 0 2px 8px rgba(42, 107, 158, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--radius-sm) !important;
  color: #e2e8f0 !important;
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
  padding: 1.25rem !important;
  transition: var(--transition-smooth);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}
}


textarea:focus,
.mw-editform textarea:focus {
.mw-editform textarea:focus {
  border-color: rgba(255, 255, 255, 0.4) !important;
    border-color: #2a6b9e;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), inset 0 2px 10px rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(42, 107, 158, 0.12), inset 0 1px 4px rgba(0, 0, 0, 0.02);
  transform: scale(1.005);
    outline: none;
}
}


/* ===== 页脚 - 微光效果 ===== */
/* ---------- 缩略图 & 图片边框 ---------- */
#footer {
.thumbinner {
  background: rgba(0, 0, 0, 0.2);
    background-color: #fafcfe;
  backdrop-filter: blur(12px);
    border: 1px solid #e2e8f0;
  -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
  border-top: 1px solid var(--glass-border);
    padding: 6px;
  border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  padding: 1.5rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  transition: var(--transition-smooth);
}
}


#footer:hover {
/* ===== Hover 效果 10: 缩略图容器 ===== */
  background: rgba(0, 0, 0, 0.25);
.thumbinner:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    transform: scale(1.005);
}
}


#footer a {
.thumbinner .thumbcaption {
  color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    color: #2a3a4e;
    padding: 0.4em 0.2em 0.1em;
}
}


#footer a:hover {
/* ---------- 搜索框 ---------- */
  color: white;
#p-search input[type="search"] {
    border-radius: 20px;
    border: 1px solid #d0d9e5;
    padding: 0.4em 1em 0.4em 2.2em;
    background-color: #fafcfe;
    transition: all 0.25s ease;
    width: 200px;
    font-size: 0.95em;
}
}


/* ===== 滚动条 - 现代风格 ===== */
/* ===== Hover 效果 11: 搜索框 ===== */
::-webkit-scrollbar {
#p-search input[type="search"]:hover {
  width: 8px;
    border-color: #a0b8d0;
  height: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(42, 107, 158, 0.06);
    width: 220px;
}
}


::-webkit-scrollbar-track {
#p-search input[type="search"]:focus {
  background: rgba(255, 255, 255, 0.05);
    border-color: #2a6b9e;
  border-radius: 10px;
    box-shadow: 0 0 0 3px rgba(42, 107, 158, 0.12);
    width: 240px;
    outline: none;
}
}


::-webkit-scrollbar-thumb {
/* ---------- 页脚 ---------- */
  background: var(--primary-gradient);
#footer {
  border-radius: 10px;
    background: #f2f5fa;
  transition: var(--transition-smooth);
    border-radius: 12px 12px 0 0;
    padding: 1.2em 1.5em;
    margin-top: 2em;
    color: #3a4b5e;
    border-top: 1px solid #e2e8f0;
}
}


::-webkit-scrollbar-thumb:hover {
#footer a {
  transform: scale(1.1);
    color: #2a6b9e;
  background: linear-gradient(135deg, #764ba2, #667eea);
    border-bottom: none;
}
}


/* ===== 响应式微调 ===== */
#footer a:hover {
@media (max-width: 768px) {
     color: #0f3b5c;
  #mw-content {
     text-shadow: 0 0 4px rgba(42, 107, 158, 0.1);
     padding: 1rem;
     margin: 1rem;
    border-radius: var(--radius-md);
  }
 
  #searchInput {
    max-width: 100%;
  }
 
  h1:after, h2:after {
    width: 40px;
  }
}
}


/* ===== 动画:页面元素入场 ===== */
/* ---------- 小工具/杂项 ---------- */
.mw-body,
/* 使 "页面信息" 等标签更柔和 */
.mw-body-content {
.mw-indicators {
  animation: fadeSlideUp 0.6s ease-out both;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}
}


/* 为不同元素添加延迟,形成交错效果 */
.mw-indicators:hover {
#mw-content > *:nth-child(1) { animation-delay: 0.05s; }
    opacity: 1;
#mw-content > *:nth-child(2) { animation-delay: 0.10s; }
#mw-content > *:nth-child(3) { animation-delay: 0.15s; }
#mw-content > *:nth-child(4) { animation-delay: 0.20s; }
#mw-content > *:nth-child(5) { animation-delay: 0.25s; }
 
/* ===== 自定义卡片组件(可用于模板) ===== */
.modern-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}
}


.modern-card:hover {
/* 编辑摘要输入框 */
  transform: translateY(-6px) scale(1.005);
.mw-summary {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid #d0d9e5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
}


/* 微光脉冲动画 */
.mw-summary:hover {
@keyframes glowPulse {
    border-color: #a0b8d0;
  0%, 100% { opacity: 1; }
    box-shadow: inset 0 1px 6px rgba(42, 107, 158, 0.05);
  50% { opacity: 0.6; }
}
}


.glow-pulse {
/* 差异对比页面 (diff) */
  animation: glowPulse 3s ease-in-out infinite;
td.diff-context,
td.diff-deletedline,
td.diff-addedline {
    border-radius: 6px;
    transition: background 0.15s ease;
}
}


/* ===== 图片和缩略图 ===== */
td.diff-context:hover,
.thumbinner {
td.diff-deletedline:hover,
  background: var(--glass-bg) !important;
td.diff-addedline:hover {
  backdrop-filter: blur(12px);
    background: #f4f8fe;
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.5rem !important;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}
}


.thumbinner:hover {
/* ====================================================
  transform: scale(1.01) rotate(0.5deg);
  结束 —— 让您的 Wiki 更优雅、更具交互感!
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  ==================================================== */
}
 
/* ===== 分类标签 ===== */
#mw-pages,
#mw-category-media {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

2026年8月19日 (三) 02:34的版本

/* ====================================================
   媒体维基 (MediaWiki) 美化样式表
   功能:基础美化 + 平滑悬停 (Hover) 效果
   适用:适用于现代皮肤 (如 Vector, Monobook 等)
   注意:请将本样式放入 MediaWiki:Common.css 或您皮肤的 .css 文件中
   ==================================================== */

/* ---------- 全局基础美化 ---------- */
body {
    background-color: #f8f9fc;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #202122;
}

/* 内容区域卡片化 */
.mw-body {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 1.5em 2em;
    margin-top: 0.5em;
    transition: box-shadow 0.2s ease;
}

/* 一级标题装饰 */
.mw-body h1,
.mw-body h2 {
    border-bottom: 3px solid #e0e7ef;
    padding-bottom: 0.3em;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.mw-body h1 {
    font-size: 2em;
    color: #1e2a3a;
}

.mw-body h2 {
    font-size: 1.6em;
    color: #2a3a4e;
}

/* ---------- 链接美化 ---------- */
a {
    color: #2a6b9e;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease, border-bottom 0.2s ease;
    border-bottom: 1px solid transparent;
}

/* ===== Hover 效果 1: 链接 ===== */
a:hover {
    color: #0f3b5c;
    text-shadow: 0 0 4px rgba(42, 107, 158, 0.15);
    border-bottom-color: #2a6b9e;
}

/* 外部链接专用 */
.mw-body a.external {
    background-image: none;
    padding-right: 0;
}

.mw-body a.external:hover {
    background-image: none;
}

/* ---------- 导航栏 (Vector 皮肤适配) ---------- */
#mw-head {
    background: linear-gradient(135deg, #ffffff 0%, #f2f5fa 100%);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 导航标签 */
.vector-menu-tabs li {
    background-color: transparent;
    border-radius: 8px 8px 0 0;
    transition: background 0.2s ease, transform 0.1s ease;
}

/* ===== Hover 效果 2: 导航标签 ===== */
.vector-menu-tabs li:hover {
    background-color: rgba(42, 107, 158, 0.08);
    transform: translateY(-2px);
}

.vector-menu-tabs li a {
    color: #2a3a4e;
    font-weight: 500;
    border-bottom: none;
}

.vector-menu-tabs li a:hover {
    border-bottom: none;
    color: #0f3b5c;
}

/* ---------- 按钮风格 (编辑、查看历史等) ---------- */
.mw-ui-button {
    background-color: #f0f3f8;
    border: 1px solid #c8d0db;
    border-radius: 6px;
    padding: 0.4em 1.2em;
    font-weight: 500;
    color: #1e2a3a;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* ===== Hover 效果 3: 按钮 ===== */
.mw-ui-button:hover {
    background-color: #e3e9f2;
    border-color: #a0b3cc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transform: scale(1.02);
}

/* 主要按钮 (如 "保存页面") 加强 */
.mw-ui-button.mw-ui-primary {
    background-color: #2a6b9e;
    border-color: #1e4f77;
    color: #ffffff;
}

.mw-ui-button.mw-ui-primary:hover {
    background-color: #1e527a;
    border-color: #123a57;
    box-shadow: 0 4px 14px rgba(42, 107, 158, 0.3);
    transform: scale(1.02);
}

/* ---------- 表格美化 ---------- */
.wikitable {
    background-color: #ffffff;
    border: 1px solid #d8dfe8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.wikitable th {
    background-color: #e9eef4;
    color: #1a2633;
    font-weight: 600;
    padding: 0.6em 1em;
}

.wikitable td {
    padding: 0.5em 1em;
    border-bottom: 1px solid #eef2f7;
}

.wikitable tr {
    transition: background 0.15s ease;
}

/* ===== Hover 效果 4: 表格行 ===== */
.wikitable tr:hover {
    background-color: #f4f8fe;
}

/* ---------- 信息框 / 消息框 ---------- */
.mw-message-box {
    border-radius: 10px;
    border-left-width: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    padding: 0.8em 1.5em;
}

/* ===== Hover 效果 5: 消息框 ===== */
.mw-message-box:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

/* ---------- 目录 (TOC) 美化 ---------- */
.toc {
    background-color: #f7f9fc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8em 1.2em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.2s ease;
}

/* ===== Hover 效果 6: 目录 ===== */
.toc:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.toc ul li {
    padding: 0.2em 0;
    transition: padding-left 0.15s ease;
}

.toc ul li a {
    border-bottom: none;
}

/* ===== Hover 效果 7: 目录条目 ===== */
.toc ul li:hover {
    padding-left: 6px;
}

.toc ul li a:hover {
    color: #0f3b5c;
    text-shadow: 0 0 3px rgba(42, 107, 158, 0.12);
}

/* ---------- 侧边栏 (Portlet) 美化 ---------- */
.vector-menu .vector-menu-content ul li {
    border-radius: 6px;
    transition: background 0.15s ease, padding-left 0.15s ease;
    padding: 0.1em 0;
}

/* ===== Hover 效果 8: 侧边栏菜单项 ===== */
.vector-menu .vector-menu-content ul li:hover {
    background: rgba(42, 107, 158, 0.06);
    padding-left: 6px;
}

.vector-menu .vector-menu-content ul li a {
    border-bottom: none;
    color: #1e2a3a;
}

.vector-menu .vector-menu-content ul li a:hover {
    color: #0f3b5c;
    border-bottom: none;
}

/* ---------- 编辑框 (文本区) ---------- */
.mw-editform textarea {
    border-radius: 10px;
    border: 1px solid #d0d9e5;
    padding: 0.8em;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.95em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.02);
}

/* ===== Hover 效果 9: 编辑框 ===== */
.mw-editform textarea:hover {
    border-color: #a0b8d0;
    box-shadow: inset 0 2px 8px rgba(42, 107, 158, 0.06);
}

.mw-editform textarea:focus {
    border-color: #2a6b9e;
    box-shadow: 0 0 0 3px rgba(42, 107, 158, 0.12), inset 0 1px 4px rgba(0, 0, 0, 0.02);
    outline: none;
}

/* ---------- 缩略图 & 图片边框 ---------- */
.thumbinner {
    background-color: #fafcfe;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* ===== Hover 效果 10: 缩略图容器 ===== */
.thumbinner:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    transform: scale(1.005);
}

.thumbinner .thumbcaption {
    font-size: 0.9em;
    color: #2a3a4e;
    padding: 0.4em 0.2em 0.1em;
}

/* ---------- 搜索框 ---------- */
#p-search input[type="search"] {
    border-radius: 20px;
    border: 1px solid #d0d9e5;
    padding: 0.4em 1em 0.4em 2.2em;
    background-color: #fafcfe;
    transition: all 0.25s ease;
    width: 200px;
    font-size: 0.95em;
}

/* ===== Hover 效果 11: 搜索框 ===== */
#p-search input[type="search"]:hover {
    border-color: #a0b8d0;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(42, 107, 158, 0.06);
    width: 220px;
}

#p-search input[type="search"]:focus {
    border-color: #2a6b9e;
    box-shadow: 0 0 0 3px rgba(42, 107, 158, 0.12);
    width: 240px;
    outline: none;
}

/* ---------- 页脚 ---------- */
#footer {
    background: #f2f5fa;
    border-radius: 12px 12px 0 0;
    padding: 1.2em 1.5em;
    margin-top: 2em;
    color: #3a4b5e;
    border-top: 1px solid #e2e8f0;
}

#footer a {
    color: #2a6b9e;
    border-bottom: none;
}

#footer a:hover {
    color: #0f3b5c;
    text-shadow: 0 0 4px rgba(42, 107, 158, 0.1);
}

/* ---------- 小工具/杂项 ---------- */
/* 使 "页面信息" 等标签更柔和 */
.mw-indicators {
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.mw-indicators:hover {
    opacity: 1;
}

/* 编辑摘要输入框 */
.mw-summary {
    border-radius: 8px;
    border: 1px solid #d0d9e5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mw-summary:hover {
    border-color: #a0b8d0;
    box-shadow: inset 0 1px 6px rgba(42, 107, 158, 0.05);
}

/* 差异对比页面 (diff) */
td.diff-context,
td.diff-deletedline,
td.diff-addedline {
    border-radius: 6px;
    transition: background 0.15s ease;
}

td.diff-context:hover,
td.diff-deletedline:hover,
td.diff-addedline:hover {
    background: #f4f8fe;
}

/* ====================================================
   结束 —— 让您的 Wiki 更优雅、更具交互感!
   ==================================================== */