/* ============================================================
   BlockList 博客插件 · 通用样式
   ============================================================ */

/* ---- 鼠标发光跟随 ---- */
.fx-cursor {
  position: fixed; top: 0; left: 0; width: 300px; height: 300px;
  margin: -150px 0 0 -150px; border-radius: 50%; pointer-events: none;
  z-index: 1; background: radial-gradient(circle, rgba(167,139,250,0.16), transparent 60%);
  mix-blend-mode: screen; /* 使用 transform 定位，不走 will-change 在低端机上卡 */
}
@media (prefers-reduced-motion: reduce) { .fx-cursor { display: none; } }

/* ---- 点击星光 ---- */
.fx-burst { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.fx-spark {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, #fff, #a78bfa);
  animation: fxSparkFly 0.7s ease-out forwards;
}
@keyframes fxSparkFly {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

/* ---- 3D 倾斜 ---- */
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform 0.2s ease; }
.tilt:hover { transition: transform 0.08s ease; }

/* ---- 打字机 ---- */
.type-caret {
  display: inline-block; width: 2px; height: 1em; vertical-align: -0.15em;
  background: currentColor; margin-left: 2px; animation: typeBlink 0.8s step-end infinite;
}
@keyframes typeBlink { 50% { opacity: 0; } }

/* ---- 插件小组件（侧栏/页脚通用） ---- */
.plg-widget { margin-top: 18px; }
.plg-widget h3 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.plg-widget h3::before { content: ''; width: 4px; height: 15px; border-radius: 2px; background: linear-gradient(#a78bfa,#6366f1); }
.widget:nth-child(2) .plg-note { color: rgba(255,255,255,0.55); font-size: 13px; line-height: 1.8; }

/* 目录 TOC */
.plg-toc { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; }
.plg-toc li { margin-bottom: 4px; }
.plg-toc a {
  display: block; padding: 6px 10px; border-radius: 8px; font-size: 13px;
  color: rgba(255,255,255,0.72); text-decoration: none; border-left: 2px solid transparent;
  transition: all 0.2s;
}
.plg-toc a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.plg-toc a.on { color: #fff; border-left-color: #a78bfa; background: rgba(167,139,250,0.12); }
.plg-toc::-webkit-scrollbar { width: 5px; }
.plg-toc::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* 相关文章 / 随机列表 */
.plg-list { list-style: none; padding: 0; margin: 0; }
.plg-list li { padding: 7px 0; border-bottom: 1px dashed rgba(255,255,255,0.08); }
.plg-list li:last-child { border-bottom: none; }
.plg-list a { color: rgba(255,255,255,0.78); text-decoration: none; font-size: 13px; line-height: 1.5; transition: color 0.2s; }
.plg-list a:hover { color: #a78bfa; }
.plg-list .meta { display: block; font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; }

/* 信息统计网格 */
.plg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plg-cell { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 12px; text-align: center; }
.plg-cell .num { font-size: 20px; font-weight: 700; color: #fff; }
.plg-cell .lbl { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.plg-clock { text-align: center; font-size: 26px; font-weight: 700; color: #fff; letter-spacing: 1px; }
.plg-clock .date { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 4px; }

/* 右键菜单 */
.plg-menu {
  position: fixed; z-index: 10000; min-width: 170px; padding: 6px;
  background: rgba(20,20,30,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; opacity: 0; transform: scale(0.95);
  transform-origin: top left; transition: all 0.15s ease; pointer-events: none;
}
.plg-menu.show { opacity: 1; transform: scale(1); pointer-events: auto; }
.plg-menu .mi {
  padding: 9px 12px; font-size: 13px; color: rgba(255,255,255,0.85); border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.plg-menu .mi:hover { background: rgba(167,139,250,0.18); color: #fff; }
.plg-menu .mi.danger:hover { background: rgba(244,63,94,0.18); }

/* 阅读时间徽标 */
.plg-readtime {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.06);
  border-radius: 20px; padding: 3px 10px; margin-right: 6px;
}

/* 页脚统计行 */
.plg-footer-stats { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.55); }
.plg-footer-stats span { display: inline-flex; align-items: center; gap: 4px; }
