/* ============================================================
   Backrooms 个人站点 · Fandom 风格样式表
   ------------------------------------------------------------
   为 Lynne 定制
   设计目标：尽量还原 Backrooms Wiki（Fandom 暗色主题）的观感

   【怎么改？】
   - 颜色都写在最上面的 :root 里，改那里的数值就能全局换色
   - 每个组件（.blurimage / .blurquote ...）都有中文注释
   ============================================================ */

/* ---------- 1. 全局变量（想换配色就改这里） ---------- */
:root {
  /* 背景 */
  --bg-image: none;              /* 背景图，由页面内联样式覆盖 */
  --bg-image-opacity: 0.33;      /* 背景图透明度（Fandom 同款 33%） */

  /* 颜色 */
  --color-body-bg: #000000;      /* 页面底色 */
  --color-body-text: #e6e6e6;    /* 正文文字色 */
  --color-heading: #ffffff;      /* 标题色 */
  --color-link: #ffffff;         /* 链接色 */
  --color-link-hover: #ebba81;   /* 链接悬停色 */
  --color-border: #3a3a3a;       /* 边框色 */
  --color-quiet: #737373;        /* 次要文字（说明、caption） */
  --color-panel: #262626;        /* 面板底色（引用块等） */

  /* 字体 */
  --font-heading: 'Rubik', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Rubik', 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;

  /* 原 wiki 的主题变量 —— 供 .lightblock / .darkblock 使用。
     转换器会从每篇文章的源码里提取真实生效值，注入到页面里覆盖这里 */
  --theme-page-background-color--secondary: #262626;   /* 分段色块的背景 */
  --theme-page-text-color: #e6e6e6;
  --theme-accent-color: #bdbdbd;
  --theme-page-accent-mix-color: #5f5f5f;              /* 标题块的强调色 */

  /* 排版尺寸 */
  --content-width: 900px;        /* 正文最大宽度 */
}

/* ---------- 2. 基础重置 ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-body-bg);
  color: var(--color-body-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  /* 文字不透明度略降，贴合 Fandom 的柔和观感 */
  opacity: 0.98;
  min-height: 100vh;
}

/* ---------- 3. 全页背景图（{{Background}} 模板） ---------- */
/* 固定铺满、放在文字底下、降低透明度 */
.site-background {
  position: fixed;
  inset: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: var(--bg-image-opacity);
  z-index: -1;
  pointer-events: none;
}

/* ---------- 4. 页面容器 ---------- */
.site-wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 40px 24px 120px;
}

/* ---------- 5. 标题排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.4;
  margin: 1.8em 0 0.8em;
  font-weight: 600;
}

h1 {
  font-size: 2.1em;
  text-align: center;
  margin-top: 0.4em;
  /* 标题下方一条淡分割线，Fandom 常见做法 */
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--color-border);
}

/* 文章大标题（来自 {{DISPLAYTITLE}}），显示在生存难度框上方 */
.article-title {
  font-size: 1.95em;
  text-align: center;
  margin: 0.1em 0 1.1em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--color-border);
  letter-spacing: 0.04em;
}

h2 {
  font-size: 1.6em;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.25em;
}

h3 { font-size: 1.3em; }
h4 { font-size: 1.15em; }

/* ---------- 6. 正文与列表 ---------- */
p { margin: 1em 0; }

/* 文章正文里的条目大多是「*」开头的列表项 */
ul {
  margin: 1em 0;
  padding-left: 1.6em;
}

li { margin: 0.55em 0; }

/* 列表符号换成温和的小方块，比圆点更接近 Fandom 的中文排版观感 */
ul li::marker { color: var(--color-quiet); }

strong, b { color: #ffffff; font-weight: 600; }
em, i { font-style: italic; }

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5em 0;
}

/* ---------- 7. 链接 ---------- */
a {
  color: var(--color-link);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  transition: color .2s, border-color .2s;
}

a:hover {
  color: var(--color-link-hover);
  border-bottom-color: var(--color-link-hover);
}

/* 尚未迁移的站内链接（指向 Fandom 原文） */
a.external-link { border-bottom-style: dashed; }

/* ---------- 8. 生存难度框 ---------- */
/* 原模板是手写 HTML + 渐变文字，这里保留内联样式，
   只补上容器间距，保证还原度 */
.survival-class {
  margin: 1.5em 0 2.5em;
}

/* ---------- 9. Blurimage：右浮动配图 + 图注标签 ---------- */
/* 结构照 Fandom 原模板：inline-flex 纵向排列（图片在上、图注在下），
   整体右浮动，正文从左侧环绕 */
.blurimage {
  float: right;                              /* ← 居右 */
  display: inline-flex;
  flex-direction: column;
  max-width: 320px;                          /* 配图宽度上限 */
  margin: 0.4rem 0 1.2rem 1.4rem;            /* 左侧留白，文字不贴图 */
  text-align: left;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.6);   /* 整体投影（同原模板） */
}

.blurimage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  /* 四周渐隐：让图片像从黑暗里浮现，这是后室条目最标志性的观感 */
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%,
                      #000 48%, rgba(0,0,0,0.85) 68%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%,
              #000 48%, rgba(0,0,0,0.85) 68%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* 图注：图片正下方的「小标签」，宽度与图片相同、文字居中 */
.blurimage figcaption,
.blurimage .caption {
  display: block;
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 0.6rem 0.9rem;
  font-size: 90%;
  font-weight: bold;
  text-align: center;                        /* ← 居中 */
  color: #ffffff;
  letter-spacing: 0.03em;
  line-height: 1.5;
  text-shadow: 0 0 3px #000;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
}

/* 想在文章里放一张「独占一行的大图」时：
   转换器遇到 {{Blurimage|...|width=80%}} 会自动加 .wide */
.blurimage.wide {
  float: none;
  display: flex;
  max-width: 100%;
  width: 100%;
  margin: 1.8em 0;
  box-shadow: none;
}

.blurimage.wide img {
  max-width: 100%;
  margin: 0 auto;
}

.blurimage.wide figcaption {
  max-width: 100%;
}

/* 带边框 / 背景的容器里的图片：不要浮动，改块级居中 ——
   否则会跑出那个框（例如 Level ZH 999 的白框卡片） */
div[style*="border:"] > img,
div[style*="border:"] img.wiki-img,
div[style*="border: "] img.wiki-img {
  float: none;
  display: block;
  margin: 1em auto;
  max-width: 100%;
  box-shadow: none;
  -webkit-mask-image: none;
  mask-image: none;
}

/* ---------- 9.5 wiki-img：wikitext 里直接贴的图（[[File:xxx|400px]]） ---------- */
/* 和 Blurimage 观感统一：右浮动、带投影、边缘渐隐 */
.wiki-img {
  float: right;
  display: block;
  width: auto;
  height: auto;
  max-width: min(400px, 46%);
  margin: 0.4rem 0 1.2rem 1.4rem;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  -webkit-mask-image: radial-gradient(ellipse 82% 82% at 50% 50%,
                      #000 50%, rgba(0,0,0,0.85) 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 82% 82% at 50% 50%,
              #000 50%, rgba(0,0,0,0.85) 70%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* 横幅/大图（带 center 参数，或宽度 ≥600px）：不浮动，整行居中 */
.wiki-img.static {
  float: none;
  max-width: 100%;
  margin: 1.5em auto;
}

/* 放在 <center> 里的图片（例如带 #dedede 白框的那些）：
   不要浮动、不要外边距、不要渐隐 —— 让图片正好贴合外框 */
center .wiki-img {
  float: none;
  max-width: 100%;
  margin: 0;
  box-shadow: none;
  -webkit-mask-image: none;
  mask-image: none;
}

/* 注音（{{Ruby|汉字|读音}}） */
ruby { ruby-align: center; }
ruby rt {
  font-size: 0.55em;
  color: var(--color-quiet);
  letter-spacing: 0.05em;
}

/* ---------- 9.6 音频播放器（[[File:xxx.mp3]] 与 html5audio） ---------- */
/* 原来的写法在页面上要么是碎图图标、要么是个看不见的空白 div，
   现在统一成浏览器原生播放器，这里只负责把外观融进深色主题。
   播放器本身的颜色跟随系统配色，浅色主题下也不会太突兀 */
.wiki-audio {
  display: block;
  width: 100%;
  max-width: 420px;
  height: 34px;
  margin: 1.2em auto;
  border-radius: 8px;
  background: var(--color-panel);
  /* 播放器自带的白色底在深色页面上很跳，压暗一点 */
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.wiki-audio:hover,
.wiki-audio:focus-visible {
  opacity: 1;
}

/* 包着播放器的容器（源码里的 html5audio 可能带 float / clear） */
.wiki-audio-wrap {
  margin: 1em 0;
}

/* 浮动版（原站那种右浮动的小播放器）：不要把正文挤得太窄 */
.wiki-audio-wrap[style*="float"] .wiki-audio {
  margin: 0.4rem 0 1rem 1.2rem;
  max-width: 300px;
}

/* 折叠框里只有一个播放器时，别留一大块空白 */
.collapse-content > .wiki-audio:only-child {
  margin: 0.6em auto;
}

/* ---------- 9.7 背景音乐按钮（由 js/site.js 生成） ---------- */
/* 原站靠 autoplay 自动响，浏览器拦掉了；改成右下角一个浮动按钮，点了才播。
   多个按钮（同一页有多段背景音乐时）会在这个 dock 里竖着排 */
.bgm-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.bgm-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1;
  color: var(--color-body-text);
  background: rgba(38, 38, 38, 0.88);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.bgm-toggle:hover,
.bgm-toggle:focus-visible {
  color: var(--color-link-hover);
  border-color: var(--color-link-hover);
  background: rgba(38, 38, 38, 0.96);
  outline: none;
}

/* 播放中：音符轻轻跳一下，让人知道音乐真的在响 */
.bgm-toggle.playing {
  color: var(--color-link-hover);
  border-color: var(--color-link-hover);
}

.bgm-toggle.playing .bgm-icon {
  animation: bgm-pulse 1.6s ease-in-out infinite;
}

@keyframes bgm-pulse {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(-2px); opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  .bgm-toggle.playing .bgm-icon { animation: none; }
}

/* 手机上别挡住正文 */
@media (max-width: 600px) {
  .bgm-dock { right: 12px; bottom: 12px; }
  .bgm-toggle { padding: 8px 13px; font-size: 12px; }
}

/* ---------- 10. Blurquote：段落之间的分割横幅 ---------- */
/* 定位：分隔段落的「一条横幅」。高度完全由内容决定 ——
   一句话就细长，长句就高一些，不设固定最小高度 */
.blurquote {
  position: relative;
  margin: 1.8em 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.05em 1.6em;
  border-radius: 4px;
  overflow: hidden;
  /* 背景图由 HTML 内联 style 提供 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  clear: both;                        /* 不能被浮动的配图挤到旁边 */
  line-height: 1.75;
}

/* 图片上盖一层半透明黑 + 轻微模糊，让文字读得清即可 */
.blurquote::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(3.5px);
  backdrop-filter: blur(3.5px);
}

.blurquote .blurquote-text {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #ffffff;
  font-size: 0.98em;
  line-height: 1.75;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.75);
}

/* 小标题不「强制换行」，而是「避让」浮动配图：
   display:flow-root 会让标题盒子的宽度自动收缩到图片左缘，
   连下面那条分隔线也会一起在图片处结束（Fandom 上就是这个效果） */
h1, h2, h3, h4, h5, h6 {
  display: flow-root;
}

/* 这几类元素则必须换行起头，不能被浮图挤到旁边 */
.quote-container,
.collapse,
.categories,
.site-footer,
.center-text {
  clear: both;
}

/* ---------- 站点顶栏（首页/文章页顶部的那两行字） ---------- */
.site-header {
  text-align: center;
  margin: 0 0 2.4em;
  padding-bottom: 1.2em;
  border-bottom: 1px solid var(--color-border);
}

.site-header .site-name {
  font-family: var(--font-heading);
  font-size: 1.05em;
  letter-spacing: 0.42em;
  color: var(--color-heading);
}

.site-header .site-tagline {
  margin-top: 0.5em;
  font-size: 0.82em;
  letter-spacing: 0.2em;
  color: var(--color-quiet);
}

/* ---------- 11. Quote：透明底的引号引用 ---------- */
/* 结构照 Fandom 原模板：
   .quote-container > .quote-block > (左引号 + 内容 + 右引号) + .quote-source */
.quote-container {
  margin: 2.2em 0;
}

.quote-block {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5em;
  background: transparent;      /* ← 透明底，不要色块 */
}

/* 两侧的引号 */
.quote-mark-left,
.quote-mark-right {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: 1.7em;
  line-height: 1.05;
  color: var(--color-quiet);
  opacity: 0.85;
  user-select: none;
}

/* 引文正文 */
.quote-content {
  font-style: italic;
  color: #d8d8d8;
  line-height: 1.9;
  text-align: center;
}

/* 出处：右对齐，前面带破折号 */
.quote-source {
  margin-top: 0.9em;
  font-style: normal;
  font-size: 0.88em;
  color: var(--color-quiet);
  text-align: right;
  letter-spacing: 0.03em;
}

/* ---------- 12. 折叠框（{{LinkCollapse}}：作者与授权信息） ---------- */
.collapse {
  margin: 3em 0 1.5em;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.collapse > summary {
  cursor: pointer;
  padding: 0.85em 1.1em;
  background: #1a1a1a;
  color: #ffffff;
  list-style: none;
  user-select: none;
}

.collapse > summary::-webkit-details-marker { display: none; }

.collapse > summary:hover { background: #242424; }

.collapse[open] > summary { border-bottom: 1px solid var(--color-border); }

.collapse .collapse-body {
  padding: 1.2em 1.4em;
  font-size: 0.94em;
  line-height: 1.9;
}

/* ---------- 13.5 全屏页面背景图（原 wiki 用 position:fixed 的 div 实现） ---------- */
/* 铺满视口、压低亮度，免得抢戏 */
div[style*="z-index:-1"] img,
div[style*="z-index: -1"] img {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  object-fit: cover;
  margin: 0;
  opacity: 0.35;                     /* ← 亮度在这儿调（越小越暗） */
  -webkit-mask-image: none;
  mask-image: none;
  pointer-events: none;
}

/* ---------- 13.6 生存难度框里的横幅图 ---------- */
/* 原 wiki 用「绝对定位的 100px 高框 + 负边距图片」做横幅。
   这里只清掉图片自身的外边距和渐隐 —— 宽度保持原样（内联的 800px），
   一旦限制宽度，图片缩放比例变了就会错位 */
div[style*="position: absolute"] img,
div[style*="position:absolute"] img,
div[style*="margin:-10px"] img,
div[style*="margin: -10px"] img {
  margin: 0;
  max-width: none;
  -webkit-mask-image: none;
  mask-image: none;
}

/* ---------- 13.7 附录标题块（.titleblock / .titlebox） ---------- */
/* 定义照抄原 wiki 的 MediaWiki:Common.css/StyledBoxes.css */
.titleblock {
  background-color: var(--theme-page-background-color--secondary);
  color: #ffffff;
  padding: 0.5rem 1rem 0.1rem;
  margin: 1.5rem 0 0.5rem;
  box-shadow: 0 0.2rem 0.3rem rgba(0, 0, 0, 0.5);
  border: 2px solid var(--theme-page-accent-mix-color);
  clear: both;
}

/* 内层标题框：边框比外层细一点，做出「被包裹」的层次感 */
.titlebox {
  display: inline-block;
  position: relative;
  top: -0.55rem;
  background-color: var(--theme-page-accent-mix-color);
  padding: 0.2rem 0.85rem;
  border-width: 1px !important;      /* ← 比外层的 2px 细 */
  color: #ffffff;
  font-size: 0.95em;
}

/* 这两块里的文字统一白色（覆盖原文写死的 #000000） */
.titleblock,
.titleblock span,
.titlebox,
.titlebox span,
.titleblock center span,
.titleblock em,
.titlebox em {
  color: #ffffff !important;
}

/* 小屏幕隐藏（原 wiki 的 .mobile-hidden） */
@media (max-width: 640px) {
  .mobile-hidden { display: none !important; }
}

/* ---------- 13. lightblock：原 wiki 的分段色块 ---------- */
/* 定义抄自 Fandom 的 MediaWiki:Common.css/StyledBoxes.css ——
   它是有背景色、有内边距、带投影的「块」，不是透明容器 */
.lightblock {
  background-color: var(--theme-page-background-color--secondary);
  color: var(--theme-page-text-color);
  padding: 1rem;
  margin: 0.5rem 0 0.5rem 0.25rem;
  box-shadow: 0 0.2rem 0.3rem rgba(0, 0, 0, 0.25);
  clear: both;                 /* 不被浮动的配图挤到旁边 */
}

/* 深色块（.darkblock）也一并支持 */
.darkblock {
  background-color: var(--theme-accent-color);
  color: #ffffff;
  padding: 1rem;
  margin: 0.5rem 0 0.5rem 0.25rem;
  box-shadow: 0 0.2rem 0.3rem rgba(0, 0, 0, 0.25);
  clear: both;
}

/* 包裹 Blurquote 的辅助 div（原模板用）——让它透明，样式交给 .blurquote */
.blurquote-noperson,
.blurquote-noborder {
  display: contents;
}

/* ---------- 14. 居中大字（文章结尾的“似乎在无数年前……”） ---------- */
.center-text {
  text-align: center;
  margin: 2.5em 0;
}

/* ---------- 15. 分类标签栏 ---------- */
.categories {
  margin-top: 4em;
  padding-top: 1.5em;
  border-top: 1px solid var(--color-border);
  font-size: 0.85em;
  color: var(--color-quiet);
}

/* 文章之间的「其他条目」导航 */
/* ---------- 文章底部：上一篇 / 下一篇 ----------
   以前这里平铺全部条目的链接，读到结尾是一面墙。
   现在换成两个引导按钮，完整目录收进下面的 <details>。 */
.article-pn {
  clear: both;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8em;
  margin: 3.2em 0 0.9em;
  padding-top: 1.4em;
  border-top: 1px solid var(--color-border);
}

.pn-link {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  min-width: 0;
  padding: 0.8em 1.05em;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  border-bottom: 1px solid var(--color-border);
  transition: border-color .15s, background .15s;
}

.pn-link:hover {
  border-color: var(--color-link-hover);
  background: rgba(255, 255, 255, 0.04);
}

.pn-next { text-align: right; align-items: flex-end; }

.pn-empty {
  border-style: dashed;
  opacity: 0.3;
  pointer-events: none;
}

.pn-label {
  font-size: 0.72em;
  letter-spacing: 0.12em;
  color: var(--color-quiet);
}

.pn-title {
  max-width: 100%;
  font-family: var(--font-heading);
  font-size: 0.95em;
  color: var(--color-heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 折叠起来的完整目录 ---------- */
.article-index {
  margin: 0 0 1.6em;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.article-index > summary {
  cursor: pointer;
  padding: 0.62em 1em;
  font-size: 0.8em;
  letter-spacing: 0.1em;
  color: var(--color-quiet);
  list-style: none;
  transition: color .15s;
}

.article-index > summary::-webkit-details-marker { display: none; }
.article-index > summary::before { content: '▸ '; }
.article-index[open] > summary::before { content: '▾ '; }
.article-index > summary:hover { color: var(--color-link-hover); }

.article-index-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em;
  padding: 0.1em 1em 1.1em;
}

.article-index-body a {
  font-size: 0.78em;
  padding: 0.16em 0.62em;
  border: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-quiet);
  transition: color .15s, border-color .15s;
}

.article-index-body a:hover {
  color: var(--color-link-hover);
  border-color: var(--color-link-hover);
}

.categories a {
  display: inline-block;
  margin: 0.25em 0.5em 0.25em 0;
  padding: 0.15em 0.7em;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-body-text);
  font-size: 0.95em;
}

.categories a:hover {
  border-color: var(--color-link-hover);
  color: var(--color-link-hover);
}

/* ---------- 16. 页面底部导航（返回首页 / 上一篇下一篇） ---------- */
.site-footer {
  margin-top: 4em;
  padding-top: 1.5em;
  border-top: 1px solid var(--color-border);
  font-size: 0.9em;
  color: var(--color-quiet);
  text-align: center;
}

/* ---------- 17. 首页：文章卡片列表 ---------- */
.article-list {
  list-style: none;
  padding: 0;
  margin: 2em 0;
}

.article-card {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.2em 1.4em;
  margin: 1em 0;
  background: rgba(255,255,255,0.02);
  transition: border-color .2s, background .2s;
}

.article-card:hover {
  border-color: #5a5a5a;
  background: rgba(255,255,255,0.04);
}

.article-card .title {
  font-size: 1.15em;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.4em;
}

.article-card .summary {
  margin: 0;
  font-size: 0.92em;
  color: var(--color-quiet);
}

/* ============================================================
   浅色主题（body.theme-light）
   ------------------------------------------------------------
   有些条目在 Fandom 上用的是 light theme（白底黑字），
   转换器会自动检测并给 body 加上这个类，尽量还原它原本的观感。
   ============================================================ */
body.theme-light {
  --color-body-bg: #eaeaea;      /* 原版的浅色页面背景 */
  --color-body-text: #000000;
  --color-heading: #000000;
  --color-link: #2958DE;         /* 原版的蓝色链接 */
  --color-link-hover: #16409c;
  --color-border: #c8ccd1;
  --color-quiet: #555555;
  --color-panel: #DEDEDE;
  --bg-image-opacity: 0.5;       /* 浅底上背景图要明显一点 */

  background-color: var(--color-body-bg);
  color: var(--color-body-text);
  opacity: 1;
}

body.theme-light strong,
body.theme-light b { color: #000000; }

body.theme-light a { border-bottom-color: rgba(0, 0, 0, 0.25); }

/* 引用块的引文在浅色底上要压深一点才看得清 */
body.theme-light .quote-content { color: #3a3a3a; }

/* 折叠框换成浅色皮肤 */
body.theme-light .collapse > summary {
  background: #f1f2f4;
  color: #1b1b1b;
}
body.theme-light .collapse > summary:hover { background: #e6e9ee; }

/* 分类标签与导航 */
body.theme-light .categories a { color: #1b1b1b; }
body.theme-light .article-nav a { color: #1b1b1b; }

/* 图片投影在浅色底上要柔一点 */
body.theme-light .blurimage { box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.25); }
body.theme-light .wiki-img { box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3); }

/* ---------- 18. 移动端适配 ---------- */
@media (max-width: 640px) {
  body { font-size: 15px; line-height: 1.8; }
  .site-wrapper { padding: 24px 16px 80px; }
  h1 { font-size: 1.7em; }
  h2 { font-size: 1.35em; }
  .blurquote { padding: 2em 1.2em; min-height: 140px; }
  .blurquote .blurquote-text { font-size: 0.98em; }
  /* 手机屏幕窄，浮动的配图会挤扁文字，所以改成整行显示 */
  .blurimage {
    float: none;
    max-width: 100%;
    margin: 1.4em 0;
  }
  .blurimage img { max-height: none; }
}
