@charset "utf-8";
/* ==========================================================================
   微光软件站 · 自定义样式层（配合 Tailwind 使用）
   说明：只放 Tailwind 无法直接表达的部分（滚动条、分类树折叠、正文排版等）
   主题：通过 html.dark 切换，颜色统一走 CSS 变量（--c-*）
   ========================================================================== */

/* ===================== 主题变量 ===================== */
/* 浅色（html 上没有 .dark 时生效） */
:root {
  --c-bg-main:      #f2f4f7;
  --c-bg-card:      #ffffff;
  --c-bg-hover:     #eceff3;
  --c-text-main:    #1f2937;
  --c-text-muted:   #6b7280;
  --c-border:       #e2e6ec;
  --c-scroll:       #c7ccd4;
  --c-scroll-h:     #aab1bb;
  --c-elev:         #f7f9fb;
  --c-input-bg:     #ffffff;
  --c-code-bg:      #f1f3f6;
  --c-pre-bg:       #f6f8fa;
  --c-quote-bg:     #f6f8fa;
  --c-cover-bg:     #e8ecf1;
  --c-cover-ph-a:   #e3e9f0;
  --c-cover-ph-b:   #d3dbe5;
  --c-cover-ph-t:   rgba(31, 41, 55, .22);
  --c-modal-mask:   rgba(15, 23, 42, .45);
  --c-shadow:       rgba(15, 23, 42, .10);
  --c-shadow-strong:rgba(15, 23, 42, .18);
  --c-border-soft:  rgba(15, 23, 42, .08);
  --c-card-trans:   rgba(255, 255, 255, .88);
  --c-side-trans:   rgba(255, 255, 255, .97);
  --c-toast-bg:     #ffffff;
  --c-toast-border: #dde2e9;
  --c-thumb-a:      #eef1f5;
  --c-thumb-b:      #e2e7ee;
  --c-particle-op:  .42;
}
/* 深色 */
html.dark {
  --c-bg-main:      #121212;
  --c-bg-card:      #1e1e1e;
  --c-bg-hover:     #2a2a2a;
  --c-text-main:    #e5e7eb;
  --c-text-muted:   #9ca3af;
  --c-border:       #2f2f2f;
  --c-scroll:       #333333;
  --c-scroll-h:     #555555;
  --c-elev:         #121212;
  --c-input-bg:     #121212;
  --c-code-bg:      #2a2a2a;
  --c-pre-bg:       #111111;
  --c-quote-bg:     #1a1a1a;
  --c-cover-bg:     #1f2937;
  --c-cover-ph-a:   #1f2937;
  --c-cover-ph-b:   #111827;
  --c-cover-ph-t:   rgba(255, 255, 255, .25);
  --c-modal-mask:   rgba(0, 0, 0, .75);
  --c-shadow:       rgba(0, 0, 0, .45);
  --c-shadow-strong:rgba(0, 0, 0, .60);
  --c-border-soft:  rgba(255, 255, 255, .07);
  /* 面板色：半透明，粒子能透出来（越透 → 露出越多底层 #121212 → 视觉上也更暗） */
  --c-card-trans:   rgba(26, 26, 26, .50);
  /* 左侧栏恒等于右侧栏，不会再有偏差 */
  --c-side-trans:   var(--c-card-trans);
  --c-toast-bg:     #1e1e1e;
  --c-toast-border: #333333;
  --c-thumb-a:      #23252b;
  --c-thumb-b:      #15161a;
  --c-particle-op:  1;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-scroll); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-scroll-h); }

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

* { -webkit-tap-highlight-color: transparent; }

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
       "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; }

/* ==========================================================================
   浅色模式：修正模板里写死的 Tailwind 原子类
   （模板中大量使用 text-white / border-[#2f2f2f] 等固定色，这里统一覆盖）
   ========================================================================== */
html:not(.dark) .text-white { color: var(--c-text-main); }
html:not(.dark) .hover\:text-white:hover { color: var(--c-text-main); }
html:not(.dark) .group:hover .group-hover\:text-white { color: var(--c-text-main); }
html:not(.dark) .border-\[\#2f2f2f\] { border-color: var(--c-border); }
html:not(.dark) .bg-\[\#15161a\] { background-color: var(--c-elev); }
html:not(.dark) .border-white\/5 { border-color: var(--c-border-soft); }
/* 封面/大图上的白色文字不受影响（它们在 .hero-card__* 里用独立类） */

/* ---------- 左侧导航项 ---------- */
.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem;
  border-radius: .5rem;
  color: var(--c-text-muted);
  transition: background-color .18s ease, color .18s ease;
  text-align: left;
  width: 100%;
}
.nav-item:hover { background: var(--c-bg-hover); color: var(--c-text-main); }
.nav-item.is-active { background: rgba(234, 179, 8, .12); color: #eab308; font-weight: 500; }
.nav-item i { width: 1rem; text-align: center; font-size: .875rem; }

/* ---------- 分类树折叠 ---------- */
.cat-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  margin-left: .75rem;
  border-left: 1px solid var(--c-border);
  padding-left: .5rem;
}
.cat-group.cat-open > .cat-children { max-height: 1200px; }
.cat-group.cat-open > .cat-toggle i.cat-caret { transform: rotate(90deg); }
i.cat-caret { transition: transform .25s ease; }

/* ---------- 筛选标签 ---------- */
.chip {
  padding: .375rem 1rem;
  border-radius: 9999px;
  background: var(--c-bg-card);
  color: var(--c-text-muted);
  font-size: .75rem;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
  display: inline-block;
}
.chip:hover { color: var(--c-text-main); }
.chip.is-active { background: #eab308; color: #000; font-weight: 500; }

/* ---------- 软件卡片封面 ---------- */
.cover-box { position: relative; overflow: hidden; background: var(--c-cover-bg); }
.cover-box img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.soft-card:hover .cover-box img { transform: scale(1.05); }
.cover-ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c-cover-ph-a) 0%, var(--c-cover-ph-b) 100%);
  color: var(--c-cover-ph-t);
}

/* ---------- 下载按钮 ---------- */
.dl-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem; border-radius: .5rem; font-size: .8125rem; font-weight: 500;
  background: var(--c-bg-hover); color: var(--c-text-main);
  transition: all .18s ease; border: none; cursor: pointer;
}
.dl-btn:hover { background: #eab308; color: #000; }
.dl-btn.is-primary { background: #eab308; color: #000; }
.dl-btn.is-primary:hover { background: #facc15; }
.dl-btn[disabled] { opacity: .45; cursor: not-allowed; }
.dl-btn[disabled]:hover { background: var(--c-bg-hover); color: var(--c-text-main); }

/* ---------- 下载线路按钮：每条线路默认就带淡彩色 ----------
   原来只有 hover 才变黄，看不出哪条是哪条；现在按线路给淡彩底 + 同色系深文字，
   hover 时同色系再深一档（不再变黄）。深色模式用同色系半透明版本。 */
.dl-btn--direct, .dl-btn--thunder, .dl-btn--quark, .dl-btn--baidu {
  border: 1px solid transparent;
  font-weight: 500;
}
.dl-btn--direct  { background: #e3f8ec; color: #12683f; border-color: #bff0d4; }
.dl-btn--thunder { background: #e2efff; color: #1a5bb0; border-color: #c8e0fb; }
.dl-btn--quark   { background: #efe8ff; color: #5a41c0; border-color: #ddd2ff; }
.dl-btn--baidu   { background: #e0f6f6; color: #0e6f6f; border-color: #c2ebeb; }

.dl-btn--direct:hover  { background: #cdf3de; color: #0d5533; }
.dl-btn--thunder:hover { background: #cbe3fd; color: #154a91; }
.dl-btn--quark:hover   { background: #ded2ff; color: #4a34a3; }
.dl-btn--baidu:hover   { background: #c9efef; color: #0a5a5a; }

html.dark .dl-btn--direct  { background: rgba(34, 197, 94, .18);  color: #7fe0aa; border-color: rgba(34, 197, 94, .34); }
html.dark .dl-btn--thunder { background: rgba(59, 130, 246, .18); color: #93c0f8; border-color: rgba(59, 130, 246, .34); }
html.dark .dl-btn--quark   { background: rgba(139, 92, 246, .20); color: #bda6fb; border-color: rgba(139, 92, 246, .36); }
html.dark .dl-btn--baidu   { background: rgba(20, 184, 166, .18); color: #7fded4; border-color: rgba(20, 184, 166, .34); }

html.dark .dl-btn--direct:hover  { background: rgba(34, 197, 94, .30);  color: #a5f0c6; }
html.dark .dl-btn--thunder:hover { background: rgba(59, 130, 246, .30); color: #b6d5fb; }
html.dark .dl-btn--quark:hover   { background: rgba(139, 92, 246, .32); color: #d6c7ff; }
html.dark .dl-btn--baidu:hover   { background: rgba(20, 184, 166, .30); color: #a5ece5; }

.share-link { color: var(--c-text-muted); cursor: pointer; transition: color .18s ease; }
.share-link:hover { color: #eab308; }

/* ---------- 文章正文排版 ---------- */
.article-body { color: var(--c-text-main); font-size: .875rem; line-height: 1.85; word-break: break-word; }

/* 留言板说明文字（message.html 的 .msg-intro）：整体居中，
   但列表项文字仍左对齐，否则居中后每行参差不齐不好读 */
.article-body.msg-intro ul,
.article-body.msg-intro ol {
  display: inline-block;
  text-align: left;
  margin: .75rem 0;
  padding-left: 1.25rem;
}
.article-body img { max-width: 100%; height: auto; border-radius: .5rem; margin: .75rem 0; }
.article-body p { margin: .75rem 0; }
.article-body h1, .article-body h2, .article-body h3, .article-body h4 {
  color: var(--c-text-main); font-weight: 700; margin: 1.25rem 0 .625rem; line-height: 1.4;
}
.article-body h1 { font-size: 1.25rem; }
.article-body h2 { font-size: 1.125rem; }
.article-body h3 { font-size: 1rem; }
.article-body a { color: #eab308; text-decoration: underline; }
.article-body ul, .article-body ol { margin: .75rem 0; padding-left: 1.5rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin: .3rem 0; }
.article-body blockquote {
  border-left: 3px solid #eab308; background: var(--c-quote-bg);
  padding: .625rem 1rem; margin: .75rem 0; color: var(--c-text-muted); border-radius: 0 .5rem .5rem 0;
}
.article-body table { width: 100%; border-collapse: collapse; margin: .75rem 0; font-size: .8125rem; }
.article-body th, .article-body td { border: 1px solid var(--c-border); padding: .5rem .75rem; text-align: left; }
.article-body th { background: var(--c-bg-card); color: var(--c-text-main); }
.article-body pre { background: var(--c-pre-bg); padding: .75rem; border-radius: .5rem; overflow-x: auto; }
.article-body code { background: var(--c-code-bg); padding: .125rem .375rem; border-radius: .25rem; font-size: .8125rem; }

/* ---------- 分页 ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; }
.pager a, .pager span {
  min-width: 2.25rem; height: 2.25rem; padding: 0 .625rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-bg-card); border-radius: .5rem; font-size: .8125rem; color: var(--c-text-muted);
  transition: all .18s ease;
}
.pager a:hover { background: var(--c-bg-hover); color: var(--c-text-main); }
.pager .thisclass { background: #eab308; color: #000; font-weight: 600; }

/* ---------- 面包屑 ---------- */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; font-size: .75rem; color: var(--c-text-muted); }
.crumb a { color: var(--c-text-muted); }
.crumb a:hover { color: #eab308; }

/* ---------- 表单控件 ---------- */
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--c-input-bg); border: 1px solid var(--c-border); border-radius: .5rem;
  padding: .625rem .875rem; font-size: .875rem; color: var(--c-text-main); outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(234,179,8,.6); box-shadow: 0 0 0 3px rgba(234,179,8,.12);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--c-text-muted); opacity: .75; }
.form-label { display: block; font-size: .8125rem; color: var(--c-text-muted); margin-bottom: .375rem; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: #eab308; color: #000; font-weight: 600; font-size: .875rem;
  padding: .625rem 1.25rem; border-radius: .5rem; border: none; cursor: pointer;
  transition: background-color .18s ease;
}
.btn-primary:hover { background: #facc15; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--c-bg-hover); color: var(--c-text-main); font-size: .875rem;
  padding: .625rem 1.25rem; border-radius: .5rem; border: none; cursor: pointer;
  transition: background-color .18s ease;
}
.btn-ghost:hover { filter: brightness(.94); }

/* ---------- 提示气泡 ---------- */
#toastBox { position: fixed; top: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast-item {
  background: var(--c-toast-bg); color: var(--c-text-main);
  border: 1px solid var(--c-toast-border); border-left: 3px solid #eab308;
  padding: .625rem 1rem; border-radius: .5rem; font-size: .8125rem;
  box-shadow: 0 8px 24px var(--c-shadow); animation: toastIn .25s ease;
}
.toast-item.is-error { border-left-color: #ef4444; }
.toast-item.is-ok { border-left-color: #22c55e; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: var(--c-modal-mask); backdrop-filter: blur(3px);
  z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-mask[hidden] { display: none; }
.modal-card {
  background: var(--c-bg-card); border: 1px solid var(--c-border); border-radius: 1rem; padding: 1.5rem;
  max-width: 26rem; width: 100%; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 50px var(--c-shadow-strong);
}

/* ---------- 返回顶部 ---------- */
/* ---------- 返回顶部浮窗（常显，不限滚动距离） ---------- */
#backToTop {
  position: fixed; right: 1.75rem; bottom: 1.75rem; z-index: 8000;
  width: 2.75rem; height: 2.75rem; border-radius: 9999px; border: none; cursor: pointer;
  background: #eab308; color: #000; display: flex; align-items: center; justify-content: center;
  transition: background-color .2s ease, transform .2s ease;
  box-shadow: 0 8px 22px var(--c-shadow);
}
#backToTop:hover { background: #facc15; transform: translateY(-2px); }

/* ---------- 响应式：窄屏收起两侧栏 ---------- */
/* 平板 / 小笔记本：右栏先收起来（太挤） */
@media (max-width: 1400px) and (min-width: 1025px) { #rightAside { display: none; } }

@media (max-width: 1024px) {
  #leftAside {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 8500;
    border-radius: 0; transform: translateX(-100%); transition: transform .28s ease;
    max-height: 100vh; width: 78vw; max-width: 280px;
  }
  #leftAside.is-open { transform: none; }
  #sideMask { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 8400; }
  #sideMask[hidden] { display: none; }
  #sideToggle { display: flex !important; }
  .shell { padding: .5rem !important; gap: .5rem !important; height: auto !important; overflow: visible !important; }
  .shell > main { overflow: visible !important; height: auto !important; }

  /* ---------- 手机版：三栏改上下堆叠 ---------- */
  /* 左栏已经是抽屉（脱离文档流），主内容占满，右栏移到页面底部
     —— 手机上不再把「最新发布 / 站点信息 / 友情链接」整块丢掉 */
  .shell { flex-direction: column; }
  #rightAside {
    display: flex !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 1rem;
  }

  /* iOS 聚焦输入框时若字号小于 16px 会强制放大整页，这里统一放大 */
  input, textarea, select { font-size: 16px !important; }

  /* 触屏：加大可点区域 */
  .nav-item { min-height: 2.5rem; }
  .chip { padding: .5rem 1rem; }
  .dl-btn, .btn-primary, .btn-ghost { min-height: 2.5rem; }
  #backToTop { right: 1rem; bottom: 1rem; width: 3rem; height: 3rem; }

  /* 正文与卡片在窄屏收紧一点，避免一行字太少 */
  .article-body { font-size: .875rem; }
  #leftAside, #rightAside, main .bg-bgCard { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- 小屏手机（≤640px） ---------- */
@media (max-width: 640px) {
  .shell { padding: .375rem !important; gap: .375rem !important; }
  .sec-head h2 { font-size: .875rem; }
  /* 顶部工具栏：搜索框优先，图标簇不换行 */
  header form input { padding-left: 2.25rem; }
}

/* ==========================================================================
   粒子背景（移植自旧版 wgbh.cn 首页 #particleCanvas）
   ========================================================================== */
#particleCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: var(--c-particle-op);
}

/* 开启粒子背景时，让面板半透明以便粒子透出
   blur 收小到 2px：6px 会把粒子糊成一团，反而看不见颗粒感 */
body.has-particles #leftAside,
body.has-particles #rightAside,
body.has-particles .bg-bgCard {
  background-color: var(--c-card-trans);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
body.has-particles #leftAside { background-color: var(--c-side-trans); }

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  #particleCanvas { display: none; }
}

/* 深色专属粒子页（工具详情页）：浅色模式把画布藏起来，
   particles.js 会随之停止绘制，页面回到常规浅灰底 */
html:not(.dark) canvas[data-mode="dark"] { display: none; }

/* ==========================================================================
   蓝色渐变页（留言板 · 仅浅色模式）
   —— 深色模式下留言板与详情页统一使用首页的中性深底 + 粒子
   ========================================================================== */
body.page-blue {
  background: linear-gradient(160deg, #0d0d1a 0%, #1a1a3e 40%, #16213e 100%) fixed;
}
/* 浅色主题下换成同色系浅蓝，保持“蓝色页”的身份 */
html:not(.dark) body.page-blue {
  background: linear-gradient(160deg, #eef3ff 0%, #dbe6ff 42%, #e6f0ff 100%) fixed;
}
/* 深色模式：去掉蓝色渐变，跟首页保持一致 */
html.dark body.page-blue { background: var(--c-bg-main); }
body.page-blue #particleCanvas { opacity: 1; }
html:not(.dark) body.page-blue #particleCanvas { opacity: .5; }

/* ==========================================================================
   深色模式下把「中栏内容区」也做成面板（详情页 / 留言板）
   --------------------------------------------------------------------------
   原本中栏没有面板背景，卡片之间露出的是 body 的 #121212，比右侧栏的
   rgba(30,30,30,.82) 暗一大截，三个栏目看起来是三种黑。这里让中栏用
   和右侧栏完全相同的面板色；卡片也沿用 body.has-particles 的
   var(--c-card-trans)，与右侧栏卡片完全一致。
   ========================================================================== */
html.dark body.page-panel main {
  background-color: var(--c-card-trans);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ==========================================================================
   首页三大推荐位（大图卡片）
   ========================================================================== */
.hero-card {
  position: relative;
  display: block;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border-soft);
  box-shadow: 0 10px 30px var(--c-shadow);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.hero-card:hover {
  transform: translateY(-6px);
  border-color: rgba(234, 179, 8, .45);
  box-shadow: 0 20px 46px var(--c-shadow-strong), 0 0 0 1px rgba(234, 179, 8, .18);
}
.hero-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--c-elev);
}
.hero-card__media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .55s cubic-bezier(.2, .8, .3, 1);
}
.hero-card:hover .hero-card__media img { transform: scale(1.06); }
/* 图片上的渐变遮罩与文字始终用深色方案，保证任何主题下都清晰 */
.hero-card__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,12,.94) 0%, rgba(10,10,12,.55) 42%, rgba(10,10,12,.06) 72%, transparent 100%);
}
.hero-card__badge {
  position: absolute; top: .875rem; left: .875rem; z-index: 2;
  background: rgba(234,179,8,.92); color: #000;
  font-size: .6875rem; font-weight: 700;
  padding: .2rem .55rem; border-radius: .375rem;
  letter-spacing: .02em;
}
.hero-card__body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1.125rem 1.25rem;
}
.hero-card__title {
  font-size: 1.25rem; font-weight: 800; color: #fff; line-height: 1.25;
  margin-bottom: .3rem; text-shadow: 0 2px 12px rgba(0,0,0,.6);
}
.hero-card__desc {
  font-size: .75rem; color: rgba(255,255,255,.80); line-height: 1.5;
  margin-bottom: .7rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-card__cta {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .75rem; font-weight: 600; color: #000;
  background: #eab308; padding: .4rem .85rem; border-radius: .5rem;
  transition: background-color .2s ease;
}
.hero-card:hover .hero-card__cta { background: #facc15; }
.hero-card__cta i { font-size: .625rem; }

/* 推荐位按窄屏自适应：宽屏三列，中屏两列，小屏单列 */
@media (max-width: 1280px) and (min-width: 641px) {
  .hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ---------- 工具卡片（小图/无图时的品牌底色） ---------- */
.tool-thumb {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c-thumb-a) 0%, var(--c-thumb-b) 100%);
}
.tool-thumb i { font-size: 1.75rem; color: rgba(234,179,8,.55); }

/* ---------- 区块标题 ---------- */
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .875rem;
}
.sec-head h2 {
  font-size: .9375rem; font-weight: 700; color: var(--c-text-main);
  display: flex; align-items: center; gap: .5rem;
}
.sec-head .sec-line {
  flex: 1; height: 1px; margin: 0 .875rem;
  background: linear-gradient(to right, rgba(234,179,8,.35), transparent);
}
.sec-head a { font-size: .6875rem; color: var(--c-text-muted); transition: color .2s ease; }
.sec-head a:hover { color: #eab308; }

/* ---------- 主题切换按钮 ---------- */
#themeToggle {
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px; border: none; cursor: pointer;
  background: transparent; color: var(--c-text-muted);
  transition: background-color .18s ease, color .18s ease;
}
#themeToggle:hover { background: var(--c-bg-hover); color: var(--c-text-main); }
#themeToggle i { font-size: .875rem; }

/* ==========================================================================
   内容区淡彩卡片（参考「终极导航」的 12 色轮换）—— 仅浅色模式生效
   --------------------------------------------------------------------------
   参考站的做法是给卡片叠 12 个半透明色（如 #dcdffd8f / #c4fd3a3b），
   在白底上显出很淡的彩色。这里已按白底合成为「不透明」版本。
   参考站自己也是浅色页面上彩色、深色模式统一用深灰卡片，本站沿用同样思路：
   深色模式下淡彩规则完全不匹配，卡片保持原来的深色样式。

   使用方式：给内容块挂 .tint-1 ~ .tint-12（由 comm/foot.html 的脚本
   按 DOM 顺序自动轮换挂载），卡内文字/边框/按钮会自动转成深色系。
   不想被上色的块加 data-no-tint 即可跳过。
   ========================================================================== */
.tint-1  { --tint-bg:#ebedfe; --tint-bg-h:#e1e4fb; --tint-bd:#d3d7f6; }
.tint-2  { --tint-bg:#faecec; --tint-bg-h:#f6dfdf; --tint-bd:#f0d4d4; }
.tint-3  { --tint-bg:#f1ffd2; --tint-bg-h:#e9fcc1; --tint-bd:#ddefae; }
.tint-4  { --tint-bg:#fdf5e6; --tint-bg-h:#f9edd6; --tint-bd:#f2e3c7; }
.tint-5  { --tint-bg:#e2f8f7; --tint-bg-h:#d4f3f1; --tint-bd:#c4eae7; }
.tint-6  { --tint-bg:#e7f0fa; --tint-bg-h:#dae9f7; --tint-bd:#cadef2; }
.tint-7  { --tint-bg:#e0fdf1; --tint-bg-h:#d1f9e6; --tint-bd:#c0efda; }
.tint-8  { --tint-bg:#ddf9fa; --tint-bg-h:#cef4f6; --tint-bd:#beecee; }
.tint-9  { --tint-bg:#fddcd5; --tint-bg-h:#fbccc3; --tint-bd:#f5bdb1; }
.tint-10 { --tint-bg:#f3eaf9; --tint-bg-h:#ecdef5; --tint-bd:#e1ceef; }
.tint-11 { --tint-bg:#feecf1; --tint-bg-h:#fbe0e8; --tint-bd:#f6d0dd; }
.tint-12 { --tint-bg:#fcf1d0; --tint-bg-h:#f9e9be; --tint-bd:#f1dfa7; }

/* 底色与描边（!important 是为了压过 Tailwind 的 bg-bgCard / border-* 工具类）
   —— 整个淡彩系统只在浅色模式生效，深色模式保持原来的深色卡片 */
html:not(.dark) [class*="tint-"] {
  background-color: var(--tint-bg) !important;
  border-color: var(--tint-bd) !important;
}
html:not(.dark) [class*="tint-"]:hover { background-color: var(--tint-bg-h) !important; }

/* 嵌套在淡彩卡片里的卡片：改成半透明白，做出「彩色纸上垫一张白卡」的层次 */
html:not(.dark) [class*="tint-"] [class*="tint-"] {
  background-color: rgba(255, 255, 255, .58) !important;
}
html:not(.dark) [class*="tint-"] [class*="tint-"]:hover { background-color: rgba(255, 255, 255, .82) !important; }

/* ---------- 卡内文字统一转深色 ---------- */
html:not(.dark) [class*="tint-"] .text-white,
html:not(.dark) [class*="tint-"] .text-textMain,
html:not(.dark) [class*="tint-"] h1, html:not(.dark) [class*="tint-"] h2, html:not(.dark) [class*="tint-"] h3,
html:not(.dark) [class*="tint-"] h4, html:not(.dark) [class*="tint-"] h5, html:not(.dark) [class*="tint-"] h6,
html:not(.dark) [class*="tint-"] strong, html:not(.dark) [class*="tint-"] b, html:not(.dark) [class*="tint-"] .notice-text {
  color: #2b323c !important;
}
html:not(.dark) [class*="tint-"] .text-textMuted,
html:not(.dark) [class*="tint-"] .text-muted,
html:not(.dark) [class*="tint-"] small {
  color: #5d6775 !important;
}
html:not(.dark) [class*="tint-"] .hover\:text-white:hover,
html:not(.dark) [class*="tint-"] .group:hover .group-hover\:text-white {
  color: #111827 !important;
}
/* 金黄在淡彩底上对比不足，压深一档 */
html:not(.dark) [class*="tint-"] .text-primary { color: #a8790b !important; }

/* ---------- 卡内固定深色边框 / 深色小块 ---------- */
html:not(.dark) [class*="tint-"] .border-\[\#2f2f2f\],
html:not(.dark) [class*="tint-"] .border-white\/5 {
  border-color: var(--tint-bd) !important;
}
html:not(.dark) [class*="tint-"] .bg-\[\#15161a\],
html:not(.dark) [class*="tint-"] .bg-bgHover {
  background-color: rgba(255, 255, 255, .62) !important;
}
html:not(.dark) [class*="tint-"] .hover\:bg-bgHover:hover {
  background-color: rgba(255, 255, 255, .85) !important;
}

/* ---------- 卡内按钮 / 标签 / 输入框：浅色玻璃质感 ---------- */
html:not(.dark) [class*="tint-"] .dl-btn:not(.is-primary),
html:not(.dark) [class*="tint-"] .btn-ghost,
html:not(.dark) [class*="tint-"] .chip {
  background-color: rgba(255, 255, 255, .7) !important;
  color: #3a4250 !important;
}
html:not(.dark) [class*="tint-"] .btn-ghost,
html:not(.dark) [class*="tint-"] .dl-btn:not(.is-primary),
html:not(.dark) [class*="tint-"] .chip {
  border: 1px solid var(--tint-bd);
}
html:not(.dark) [class*="tint-"] .dl-btn:not(.is-primary):hover,
html:not(.dark) [class*="tint-"] .btn-ghost:hover,
html:not(.dark) [class*="tint-"] .chip:hover {
  background-color: rgba(255, 255, 255, .95) !important;
  color: #111827 !important;
}
html:not(.dark) [class*="tint-"] .chip.is-active { background: #eab308 !important; color: #000 !important; border-color: #eab308; }
/* 金色主按钮保持品牌色 */
html:not(.dark) [class*="tint-"] .dl-btn.is-primary,
html:not(.dark) [class*="tint-"] .btn-primary { border: none; }

html:not(.dark) [class*="tint-"] input,
html:not(.dark) [class*="tint-"] textarea,
html:not(.dark) [class*="tint-"] select {
  background-color: rgba(255, 255, 255, .78) !important;
  color: #2b323c !important;
  border-color: var(--tint-bd) !important;
}
html:not(.dark) [class*="tint-"] input::placeholder,
html:not(.dark) [class*="tint-"] textarea::placeholder { color: #8b95a3 !important; }

/* ---------- 封面占位与缩略图在淡彩底上要更轻 ---------- */
html:not(.dark) [class*="tint-"] .cover-box { background: #eef2f7 !important; }
html:not(.dark) [class*="tint-"] .cover-ph {
  background: linear-gradient(135deg, #f5f8fc 0%, #e7edf5 100%) !important;
  color: rgba(43, 50, 60, .2) !important;
}
html:not(.dark) [class*="tint-"] .tool-thumb {
  background: linear-gradient(135deg, #f7f9fc 0%, #e9eef5 100%) !important;
  color: #9aa5b1 !important;
}
html:not(.dark) [class*="tint-"] .tool-thumb i { color: rgba(168, 121, 11, .45) !important; }

/* 分隔线的金色渐变在淡彩底上稍微收一点 */
html:not(.dark) [class*="tint-"] .sec-head .sec-line {
  background: linear-gradient(to right, rgba(168, 121, 11, .3), transparent);
}

/* ---------- 首页公告条：右下角浮窗 ----------
   深色模式保留金色调深底；浅色模式由 .tint-12 提供淡黄底，
   这里只需把深色渐变关掉，否则背景图会盖住淡彩底色。 */
#siteNotice {
  position: fixed;
  right: 1.5rem;
  bottom: 6rem;                 /* 让开右下角的返回顶部按钮（按钮高 2.75rem + 底距 1.75rem） */
  z-index: 7600;                /* 低于返回顶部(8000)、左侧抽屉(8500) */
  width: 340px;
  max-width: calc(100vw - 2rem);
  max-height: 62vh;
  overflow-y: auto;
  border: 1px solid rgba(234, 179, 8, .35);
  background: linear-gradient(100deg, rgba(234, 179, 8, .14) 0%, rgba(30, 30, 30, .92) 46%, rgba(30, 30, 30, .92) 100%);
  box-shadow: 0 14px 40px var(--c-shadow-strong);
  animation: noticeIn .3s ease;
}
@keyframes noticeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
html:not(.dark) #siteNotice { background-image: none; }
/* 手机：贴底通栏，仍然让开返回顶部按钮 */
@media (max-width: 640px) {
  #siteNotice {
    right: .75rem; left: .75rem; bottom: 5.5rem;
    width: auto; max-width: none; max-height: 55vh;
  }
}

