/* =========================================================
 * Fool Blog �?重设计版
 * 设计语言：glassmorphism + 暗黑模式 + 胶囊按钮 + Font Awesome
 * ========================================================= */

/* ---------- 自定义光标 ---------- */
body, html { cursor: url("/static/cursor-pointer.cur"), auto !important; }
a, a:hover, .tag, .article-item, .pg-num, .pg-edge, .share-btn, .cp-tab, .cp-presets button, .cp-custom, button, [onclick], .link-btn, .icon-btn, .reply-btn, .comment-like-btn, .comment-report-trigger, .toc-toggle-btn, .sub-btn, .btn, .pagination a, .nav-links > a, .btn-mini, .menu-toggle, .dark-toggle, #colorPickerToggle, #wpRefresh, .cp-slider-row, .color-picker-btn { cursor: url("/static/cursor-link.cur"), pointer !important; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="tel"], input[type="search"], input[type="date"], input[type="time"], input[type="datetime-local"], input:not([type]), textarea, select { cursor: url("/static/cursor-text.cur"), text !important; }
input[type="color"], .cp-color-input, .cp-hex-input { cursor: url("/static/cursor-cross.cur"), crosshair !important; }

/* ---------- 自定义滚动条 ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.4);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(156, 163, 175, 0.7);
}
html.dark ::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.25);
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(156, 163, 175, 0.5);
}

/* ---------- 鼠标雪花 ---------- */
.cursor-snow-canvas {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
}

/* ---------- 变量 ---------- */
:root {
  /* 主色调：靛蓝 */
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-rgb: 37, 99, 235;
  --primary-light-rgb: 59, 130, 246;

  /* 语义色 */
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --info: #0ea5e9;

  /* 表面 */
  --bg: #f0f2f5;
  --card: rgba(255,255,255,0.25);
  --card-solid: rgba(255,255,255,0.5);
  --card-border: rgba(0,0,0,0.06);
  --card-shadow: 0 2px 12px rgba(0,0,0,0.05);

  /* 侧栏 */
  --sidebar-bg: rgba(17,24,39,0.95);
  --sidebar-text: #9ca3af;
  --sidebar-active: #fff;
  --sidebar-active-bg: rgba(99,102,241,0.12);

  /* 文本 */
  --text: #1f2937;
  --text-secondary: #6b7280;

  /* 边框/输入 */
  --border: #e5e7eb;
  --input-bg: #fff;
  --input-border: #d1d5db;

  /* 代码 */
  --code-bg: #1e293b;
  --code-text: #e2e8f0;
  --inline-code-bg: #f1f5f9;
  --inline-code-text: #be185d;

  /* 间距 (space-*) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px;

  /* 圆角 */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);

  /* 字体 */
  --serif: 'Noto Serif SC', Georgia, 'Songti SC', serif;
  --sans: 'Inter', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

/* ---------- 阅读进度---------- */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 9999;
  background: linear-gradient(90deg, #ff6b6b, #ffa500, #ffd93d, #6bcb77, #4d96ff, #9b59b6, #ff6b6b);
  background-size: 200% 100%;
  transition: width 0.1s;
}

/* ---------- Hero 欢迎 --------- */
.hero-section {
  --hero-header-height: 64px;
  width: calc(100% + 96px);
  height: calc(100svh - var(--hero-header-height));
  min-height: 420px;
  margin-left: -25px;
  margin-top: -40px;
  position: relative; overflow: hidden;
}
.hero-content {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 clamp(20px, 6vw, 64px) var(--hero-header-height);
  margin: 0 auto;
}
.hero-content { position: relative; z-index: 2; }
.hero-icon {
  font-size: 56px; color: var(--primary); margin-bottom: 24px;
  animation: heroFloat 3s ease-in-out infinite;
}
.hero-title {
  font-size: clamp(40px, 8vw, 68px); font-weight: 900;
  color: var(--text); margin: 0 0 18px; line-height: 1.15;
}
.hero-subtitle {
  font-size: 22px; color: var(--text-secondary); margin: 0 0 14px; line-height: 1.6;
}
.hero-meta {
  font-size: 15px; color: var(--text-secondary); opacity: 0.7;
}
.hero-typed-prefix { color: var(--primary); margin-right: 4px; }
.hero-caret { display: inline-block; margin-left: 2px; color: var(--primary); animation: heroBlink 0.7s steps(1) infinite; }
@keyframes heroBlink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }
.hero-actions { margin: 36px 0 24px; display: flex; gap: 28px; align-items: center; flex-wrap: wrap; justify-content: center; }
.hero-link {
  font-size: 16px; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  border-bottom: 1px solid var(--text-secondary);
  padding: 2px 0 4px;
}
.hero-link:hover { text-decoration: none; color: var(--primary); border-bottom-color: var(--primary); }
.hero-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  color: var(--text-secondary);
  padding: 2px 0;
  border-bottom: 1px solid var(--border);
}
.hero-btn:hover { text-decoration: none; color: var(--primary); border-bottom-color: var(--primary); }
.hero-scroll-hint {
  position: absolute; bottom: clamp(18px, 4vh, 34px); left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  cursor: pointer; z-index: 10;
}
.hero-scroll-hint i {
  font-size: 28px; color: var(--text-secondary);
  display: inline-block;
  animation: heroBounce 2s infinite;
}
.hero-scroll-hint:hover i { color: var(--primary); }
@keyframes heroFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes heroBounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-icon, .hero-scroll-hint i { animation: none; }
  .auth-card.is-submitting { animation: none; }
  .auth-card.is-submitting::after { animation: none; }
  .auth-submit.is-loading::after { animation: none; }
  .auth-overlay { animation: none; }
  .auth-overlay-spinner { animation: none; }
  .ms-toast-burn { animation: none; }
}
.home-main-content {
  display: flex; flex-direction: column; gap: 24px;
}
@media (min-width: 960px) {
  .home-main-content { gap: 36px; }
}
html.dark .hero-icon { color: var(--primary-light); }
html.dark .hero-title { color: #f9fafb; }
html.dark .hero-scroll-hint {  border-color: rgba(255,255,255,0.1); color: #9ca3af; }

html.dark {
  --bg: #111827;
  --card: rgba(31,41,55,0.55);
  --card-solid: rgba(31,41,55,0.7);
  --card-border: rgba(255,255,255,0.06);
  --card-shadow: 0 2px 12px rgba(0,0,0,0.3);
  --sidebar-bg: rgba(17,24,39,0.98);
  --text: #f9fafb;
  --text-secondary: #9ca3af;
  --border: #374151;
  --input-bg: #1f2937;
  --input-border: #4b5563;
  --inline-code-bg: #334155;
  --inline-code-text: #f472b6;

  /* 暗色模式主色 */
  --primary: #60a5fa;
  --primary-light: #93c5fd;
  --primary-dark: #3b82f6;
  --primary-rgb: 96, 165, 250;
  --primary-light-rgb: 147, 197, 253;
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
}
img { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-light); }
button { font: inherit; cursor: pointer; border: none; background: none; }
hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ---------- 布局 ---------- */
.container { max-width: 1440px; margin: 0 auto; padding: 0 48px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  background: rgba(255,255,255,0.55);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky; top: 0; z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
}
html.dark .site-header {
  background: rgba(17,24,39,0.6);
  border-bottom-color: rgba(255,255,255,0.08);
}
.nav {
  display: flex; justify-content: space-between; align-items: center;
  height: auto; position: relative;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px;
  color: var(--text);
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand-icon {
  width: 32px; height: 32px; border-radius: var(--radius);
  object-fit: cover;
}
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links > a {
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: 20px;
  transition: all 0.15s;
}
.nav-links > a:hover { color: var(--text); background: var(--border); text-decoration: none; }
.nav-links > a.active { color: var(--primary); background: rgba(var(--primary-rgb), 0.08); }

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border: 1px solid var(--border); border-radius: 20px;
  color: var(--text-secondary) !important; font-size: 13px;
  background: var(--card-solid);
}
.user-chip:hover { border-color: var(--primary); color: var(--text) !important; text-decoration: none; }
.user-chip img, .avatar-fallback {
  width: 26px; height: 26px; border-radius: 50%;
  object-fit: cover; background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.link-btn { background: none; border: none; color: var(--text-secondary); padding: 0; font-size: 13px; }
.link-btn:hover { color: var(--text); }
.inline-form { display: inline-flex; gap: 8px; align-items: center; margin: 0; }

/* ---------- 用户下拉菜单 ---------- */
.user-dropdown {
  position: relative; display: inline-flex;
}
.user-dropdown .user-chip { cursor: pointer; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; right: 0;
  min-width: 160px; background: var(--card-solid);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.dropdown-menu::before {
  content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px;
}
.user-dropdown:hover .dropdown-menu,
.user-dropdown:focus-within .dropdown-menu { display: block; }
.user-dropdown:hover .user-chip { border-color: var(--primary); }
.dropdown-menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  transition: all 0.12s; text-decoration: none;
}
.dropdown-menu a:hover { background: var(--border); color: var(--text); }
.dropdown-menu hr { margin: 4px 0; border: none; border-top: 1px solid var(--border); }
.dropdown-menu .inline-form { width: 100%; }
.dropdown-btn {
  width: 100%; text-align: left; padding: 8px 12px;
  font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px;
  border-radius: 8px; border: none; background: transparent; color: var(--text-secondary);
  cursor: pointer; transition: all 0.12s;
}
.dropdown-btn:hover { background: var(--border); color: var(--text); }


.btn-mini {
  padding: 5px 14px; border-radius: 20px; font-size: 13px !important;
  border: 1px solid var(--border); background: var(--card-solid); color: var(--text-secondary) !important;
  transition: all 0.15s;
}
.btn-mini:hover { border-color: var(--primary); color: var(--primary) !important; text-decoration: none; }
.btn-mini.primary { background: var(--primary); border-color: var(--primary); color: #fff !important; }
.btn-mini.primary:hover { background: var(--primary-light); border-color: var(--primary-light); color: #fff !important; }

/* 工具按钮（暗黑切换、换壁纸�?*/
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 15px;
  transition: all 0.2s; flex-shrink: 0;
}
.icon-btn:hover { background: var(--border); color: var(--text); }

/* 移动端菜�?*/
.menu-toggle {
  display: none; width: 36px; height: 36px;
  align-items: center; justify-content: center;
  font-size: 20px; color: var(--text);
}
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  /* 移动端导航提高不透明度，避免内容透上来看不清 */
  .site-header { background: rgba(255,255,255,0.92); }
  html.dark .site-header { background: rgba(17,24,39,0.94); }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    flex-direction: column; padding: 0 24px; gap: 4px;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
  }
  /* 展开后允许滚动，避免内容超高被裁（原 500px 固定上限会截掉末尾项）。
     必须显式给 z-index：.nav-links 是 .site-header 内的绝对定位浮层，
     不给层级时会被页面中 z-index 更高的元素（回到顶部、卡片等）盖住底部，导致点不到。 */
  .nav-links.open {
    max-height: calc(100vh - 64px);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    opacity: 1; padding: 12px 24px;
    z-index: 110;
  }
  .nav-links > a { padding: 8px 12px; border-radius: var(--radius); width: 100%; }
  /* 展开时提升整个导航层级，保证浮层压在页面内容之上 */
  .site-header.nav-open { z-index: 200; }

  /* 移动端用户下拉：改为文档流内展开。
     桌面用的 position:absolute 会被 .nav-links 的 overflow 裁掉，
     且会浮在后续图标按钮之上，导致底部条目点不到。 */
  .user-dropdown { width: 100%; }
  .dropdown-menu {
    position: static; width: 100%; min-width: 0;
    margin: 4px 0 4px; padding: 5px;
    border-radius: 10px;
    box-shadow: none;
  }
  /* 去掉桌面端的悬停桥接块（static 定位下无意义） */
  .dropdown-menu::before { content: none; }
  .dropdown-menu a { padding: 8px 12px; }
  .dropdown-menu .link-btn.dropdown-btn { padding: 8px 12px; }
  .dropdown-menu hr { margin: 4px; }

  html.dark .nav-links {
    background: rgba(17,24,39,0.96);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
}

/* ---------- 主区 ---------- */
.content {
  width: 100%;
  padding: 32px 32px 16px;
  display: flex; flex-direction: column; gap: 24px;
  flex: 1;
  animation: pageFadeIn 0.4s ease;
}
@media (min-width: 960px) {
  .content { gap: 36px; padding: 40px 48px 16px; }
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  box-shadow: var(--card-shadow);
}
.card.narrow {
  min-width: 500px; margin: 60px auto; padding: 48px 56px;
}
.card h2 {
  font-size: 22px; font-weight: 700;
  margin: 0 0 20px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.card h3 {
  font-size: 16px; font-weight: 700;
  margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.auth-card {
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
  position: relative; overflow: hidden;
}
.auth-card.is-submitting {
  transform: translateY(-8px) scale(0.97);
  opacity: 0.6;
  box-shadow: 0 24px 56px rgba(15,23,42,0.15);
  pointer-events: none;
}
.auth-card.is-submitting::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: authSweep 0.8s ease-in-out infinite;
}
@keyframes authSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.auth-submit.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.auth-submit.is-loading::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  margin-left: -10px; margin-top: -10px;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.6s linear infinite;
}
@keyframes authSpin {
  to { transform: rotate(360deg); }
}

.qq-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: #12B7F5;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.qq-login-btn:hover {
  background: #0ea5db;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18,183,245,0.3);
  color: #fff;
}
.qq-login-btn:active {
  transform: translateY(0);
}

/* 全屏加载遮罩 */
.auth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.35);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  animation: overlayIn 0.3s ease;
}
.auth-overlay-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
}
.auth-overlay-text {
  color: #fff; font-size: 16px; font-weight: 500;
  letter-spacing: 0.3px;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 信息行（标签 + 公告�?---------- */
.info-row {
  display: flex; gap: 20px;
}
.info-half {
  flex: 1; min-width: 0;
  padding: 24px 28px;
}
@media (max-width: 720px) {
  .info-row { flex-direction: column; }
  .container { padding: 0 24px; }
  .hero-section { width: 100%; margin-left: 0; margin-top: -18px; }
  .hero-content { padding-bottom: 56px; }
  .content { padding: 18px 0 12px; gap: 16px; }
  .card { padding: 20px 18px; }
  .card.narrow {
    min-width: 0; width: 100%; margin: 24px auto; padding: 28px 20px;
  }
  .comment-item { padding: 14px 16px; gap: 12px; padding-left: calc(min(var(--depth, 0), 4) * 12px + 12px) !important; }
  .comment-avatar { width: 36px; height: 36px; }
  .comment-head { flex-wrap: wrap; gap: 6px; }
  .comment-head .muted { font-size: 12px; }
}

/* ---------- 公告文章 ---------- */
.announcement-article {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 14px; padding: 12px 14px;
  background: rgba(var(--primary-rgb), 0.04); border: 1px solid rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius); cursor: pointer;
  transition: all 0.15s;
}
.announcement-article:hover {
  background: rgba(var(--primary-rgb), 0.08); border-color: rgba(var(--primary-rgb), 0.2);
  text-decoration: none;
}
.announcement-article-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  line-height: 1.5;
}
.announcement-article:hover .announcement-article-title {
  color: var(--primary);
}
.announcement-article-meta {
  font-size: 12px; color: var(--text-secondary);
}
html.dark .announcement-article {
  background: rgba(var(--primary-light-rgb), 0.06); border-color: rgba(var(--primary-light-rgb), 0.12);
}
html.dark .announcement-article:hover {
  background: rgba(var(--primary-light-rgb), 0.1); border-color: rgba(var(--primary-light-rgb), 0.2);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--card);
  border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 52px 44px;
  position: relative; overflow: hidden;
  box-shadow: var(--card-shadow);
}
.hero::before {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.hero h1 {
  font-family: var(--serif); margin: 0 0 10px;
  font-size: 34px; font-weight: 700;
}
.hero .subtitle { margin: 0; color: var(--text-secondary); font-size: 16px; }
.announcement {
  margin-top: 20px; padding: 12px 16px;
  background: rgba(var(--primary-rgb), 0.06); border-left: 3px solid var(--primary);
  font-size: 14px; color: var(--text-secondary); border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- 文章列表 ---------- */
#top-articles > h2, #latest-articles > h2, .info-half > h2, .info-half > h3, .card.sidebar > h2 { display: flex; align-items: center; }
#top-articles > h2::before {
  content: ""; width: 4px; height: 20px; border-radius: 3px;
  background: #f0b600; margin-right: 12px; flex-shrink: 0;
}
#latest-articles > h2::before {
  content: ""; width: 4px; height: 20px; border-radius: 3px;
  background: var(--primary); margin-right: 12px; flex-shrink: 0;
}
.info-half > h2::before, .card.sidebar > h2::before, .info-half > h3::before {
  content: ""; width: 4px; height: 20px; border-radius: 3px;
  background: var(--primary); margin-right: 12px; flex-shrink: 0;
}
.info-half > h3 { display: flex; align-items: center; }
.article-list { list-style: none; padding: 0; margin: 0; }
.article-item {
  position: relative;
  padding: 22px 24px; margin-bottom: 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.06), rgba(var(--primary-rgb), 0.015));
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  cursor: pointer;
  display: flex; gap: 20px; align-items: center;
}
.article-item:hover { border-color: rgba(var(--primary-rgb), 0.35); }
.article-item-content { flex: 1; min-width: 0; }
.article-item-cover {
  width: 120px; height: 80px; flex-shrink: 0;
  border-radius: var(--radius); overflow: hidden;
  background: var(--border); position: relative;
}
@keyframes cover-placeholder { 0%{opacity:0.4} 50%{opacity:0.8} 100%{opacity:0.4} }
.article-item-cover::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: cover-placeholder 1.6s ease-in-out infinite;
}
.article-item-cover img {
  width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1;
  transition: transform 0.3s ease;
}
.article-item-cover:hover img {
  transform: scale(1.15);
}
@media (max-width: 600px) {
  .article-item {
    flex-direction: column; align-items: stretch; gap: 12px;
    padding: 18px 16px;
  }
  .home-greeting {
    flex-direction: column; align-items: flex-start; gap: 4px;
  }
  .article-item .summary { display: none; }
  .article-item .meta .m-hide { display: none; }
  .article-item-cover {
    width: 100%; height: 180px; order: 3;
  }
}
.article-item::after {
  content: ""; position: absolute; inset: 0;
  border-radius: var(--radius-lg); z-index: 1;
}
.article-item a { position: relative; z-index: 2; }
.article-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
html.dark .article-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
html.dark .article-item {
  background: linear-gradient(135deg, rgba(96,165,250,0.12), rgba(96,165,250,0.03));
  border-color: rgba(96,165,250,0.2);
}
html.dark .article-item:hover {
  border-color: rgba(96,165,250,0.4);
  box-shadow: 0 4px 16px rgba(96,165,250,0.1);
}
.article-item:last-child { margin-bottom: 0; }
.article-item .title {
  font-family: var(--serif); font-size: 20px; font-weight: 600;
  color: var(--text); display: inline-block;
  transition: color 0.15s;
}
.article-item .title:hover { color: var(--primary); text-decoration: none; }
.article-item .meta {
  color: var(--text-secondary); font-size: 13px; margin: 8px 0 6px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.article-item .meta .dot { margin: 0 2px; opacity: 0.4; }
.article-item .meta i.fa { margin-right: 3px; opacity: 0.7; }
/* 文章卡片作者 chip */
.article-item-author {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--text-secondary); font-weight: 500;
}
.article-item-author:hover { text-decoration: none; }
.article-item-author:hover .author-name { color: var(--primary); }
.article-item-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  flex-shrink: 0; line-height: 0;
}
.article-item-avatar-inner {
  width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 600;
}
.article-item-avatar-inner img { width: 100%; height: 100%; object-fit: cover; }
.article-item-author .author-name { font-size: 13px; transition: color 0.15s; }
.article-item .summary {
  color: var(--text-secondary); margin: 0; line-height: 1.75; font-size: 15px;
}
.article-item.pinned {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
  border-color: rgba(245, 158, 11, 0.2);
}
.article-item.pinned:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.1);
}
html.dark .article-item.pinned {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.04) 60%, rgba(0,0,0,0));
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.08);
}
html.dark .article-item.pinned:hover {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.15);
}
.pin-icon {
  color: #f59e0b; font-size: 0.85em; margin-right: 8px;
  transform: rotate(-35deg); display: inline-block;
  vertical-align: baseline;
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  font-size: 12px; padding: 3px 12px;
  background: rgba(var(--primary-rgb), 0.06); border: 1px solid transparent;
  color: var(--primary); border-radius: 20px;
  transition: all 0.15s;
}
.tag:hover { background: var(--primary); color: #fff; text-decoration: none; }
.tag .tag-count {
  display: inline-block; margin-left: 4px; font-size: 10px;
  background: rgba(var(--primary-rgb), 0.15); padding: 0 6px;
  border-radius: 10px; line-height: 1.6;
}
.tag:hover .tag-count { background: rgba(255,255,255,0.25); color: #fff; }
.tags-row { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tags-row .meta-stat { white-space: nowrap; font-size: 13px; color: var(--text-secondary); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 关于页作者卡�?---------- */
.about-author-card {
  display: flex; gap: 32px; align-items: flex-start;
}
.about-author-left {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 140px; text-align: center;
}
.avatar-wrap {
  /* inset 用百分比，自动按头像直径缩放，所有界面统一比例；
     值越小边框越贴头像，越大边框离头像越远 */
  --frame-inset: -16%;
  position: relative;
  display: inline-block;
  line-height: 0;
}
.avatar-wrap::after {
  content: '';
  position: absolute; inset: var(--frame-inset);
  background-image: var(--avatar-frame, none);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
}
/* 所有头像统一用 -24% 的比例边框，不再逐个界面写死 px */
.about-author-avatar {
  width: 80px; height: 80px; border-radius: 50%; overflow: hidden; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600;
}
.about-author-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.about-author-avatar { transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.about-author-avatar:hover { transform: rotate(360deg); }
.home-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.home-avatar:hover { transform: rotate(360deg); }
.about-author-name { font-size: 18px; font-weight: 600; color: var(--text); }
.about-author-role { font-size: 12px; color: var(--text-secondary); background: var(--hover); padding: 2px 10px; border-radius: 10px; }
.about-author-right { flex: 1; min-width: 0; }
.about-author-intro { font-size: 15px; line-height: 1.8; color: var(--text-secondary); white-space: pre-wrap; }
.tag-cloud.big .tag { font-size: 14px; padding: 6px 18px; }

/* ---------- 空状�?/ 分页 ---------- */
.empty { color: var(--text-secondary); text-align: center; padding: 32px 0; font-size: 15px; }
.pagination {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center; align-items: center;
}
.pg-num, .pg-edge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--card-solid);
  color: var(--text); font-size: 14px; font-weight: 500;
  transition: all 0.18s ease; cursor: pointer; user-select: none;
}
.pg-edge { color: var(--text-secondary); font-size: 16px; }
.pg-num:hover, .pg-edge:hover {
  border-color: var(--primary); color: var(--primary);
  background: rgba(var(--primary-rgb), 0.06); text-decoration: none;
  transform: translateY(-1px);
}
.pg-current {
  background: var(--primary); border-color: var(--primary); color: #fff;
  cursor: default; font-weight: 700; font-size: 15px;
  box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.45);
  transform: scale(1.08);
}
.pg-current:hover {
  color: #fff; border-color: var(--primary);
  background: var(--primary); transform: scale(1.08);
}
.pg-ellipsis {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 38px; color: var(--text-secondary);
  opacity: 0.5; letter-spacing: 1px;
}
.pg-jump {
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: 12px;
}
.pg-jump-label { color: var(--text-secondary); font-size: 13px; }
.pg-jump-box {
  display: inline-flex; align-items: center; height: 38px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pg-jump-box:focus-within {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}
.pg-jump input {
  width: 46px; height: 100%; padding: 0 6px; text-align: center;
  border: none; background: transparent; color: var(--text); font-size: 14px;
  -moz-appearance: textfield;
}
.pg-jump input:focus { outline: none; }
.pg-jump input::-webkit-outer-spin-button,
.pg-jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pg-jump button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 100%; border: none;
  border-left: 1px solid var(--border);
  background: transparent; color: var(--text-secondary);
  font-size: 16px; cursor: pointer; transition: all 0.15s;
}
.pg-jump button:hover { background: var(--primary); color: #fff; }
.pg-total { color: var(--text-secondary); font-size: 13px; margin-left: 12px; }
@media (max-width: 600px) {
  .pagination { gap: 5px; margin-top: 22px; }
  .pg-num, .pg-edge { min-width: 34px; height: 34px; padding: 0 9px; font-size: 13px; }
  .pg-jump, .pg-total { display: none; }
}

/* ---------- 文章详情 ---------- */
.article-detail {
  padding: 44px 56px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}
html.dark .article-detail {
  background: rgba(31,41,55,0.4);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
@media (max-width: 720px) { .article-detail { padding: 28px 20px; } }
.article-detail h1 {
  font-family: var(--serif); margin: 0 0 16px;
  font-size: 32px; font-weight: 700; line-height: 1.35;
}
.article-detail .article-cover {
  display: block;
  width: 100%;
  max-width: 860px;
  max-height: 440px;
  margin: 0 auto 28px;
  object-fit: cover;
  object-position: center center;
  border-radius: var(--radius-lg);
}
@media (max-width: 720px) {
  .article-detail .article-cover { max-height: 320px; margin-bottom: 20px; }
}
.sub-bar { margin-bottom: 16px; }
.sub-btn {
  background: transparent; border: 1px solid var(--primary); color: var(--primary);
  padding: 6px 16px; border-radius: 20px; font-size: 13px; cursor: pointer;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.sub-btn:hover { background: var(--primary); color: #fff; }
.sub-btn.subscribed { background: var(--primary); color: #fff; border-color: var(--primary); }
.sub-btn.subscribed:hover { background: #dc2626; border-color: #dc2626; }
.article-detail .meta {
  color: var(--text-secondary); font-size: 13px; margin-bottom: 24px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.article-detail .meta .dot { opacity: 0.4; }
.article-author {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--text);
  font-weight: 500;
}
.article-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.article-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* 文章布局：TOC 左侧固定 + 正文 */
.article-layout {
  display: flex; gap: 32px; width: 100%; position: relative;
}
.article-toc {
  width: 220px; flex-shrink: 0;
  position: sticky; top: 80px; align-self: flex-start;
  max-height: calc(100vh - 100px); overflow-y: auto;
  padding: 20px 16px;
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.article-toc::-webkit-scrollbar { width: 4px; }
.article-toc::-webkit-scrollbar-track { background: transparent; }
.article-toc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.toc-title {
  font-weight: 700; font-size: 14px; color: var(--text);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.article-toc ol { padding-left: 0; margin: 0; list-style: none; }
.article-toc li { padding: 4px 0; font-size: 13px; border-left: 2px solid transparent; padding-left: 10px; }
.article-toc li.active { border-left-color: var(--primary); }
.article-toc li.active a { color: var(--primary); font-weight: 500; }
.article-toc a { color: var(--text-secondary); transition: color 0.15s; }
.article-toc a:hover { color: var(--primary); text-decoration: none; }
.article-toc .toc-l2 { margin-left: 12px; }
.article-toc .toc-l3 { margin-left: 24px; }
.article-toc .toc-l4 { margin-left: 36px; }
.article-main { flex: 1; min-width: 0; }

/* ---------- AI 点评 ---------- */
.ai-review-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}
.ai-review-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--primary);
}
.ai-review-header i { font-size: 16px; }
.ai-review-toggle {
  margin-left: auto; font-size: 13px; color: var(--text-secondary);
  padding: 2px 10px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card-solid);
  transition: all 0.15s;
}
.ai-review-toggle:hover { border-color: var(--primary); color: var(--primary); }
.ai-review-body {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.3s ease;
}
.ai-review-content {
  color: var(--text-secondary); font-size: 14px; line-height: 1.8;
  white-space: pre-wrap; word-break: break-word;
}
.ai-cursor {
  display: inline-block; color: var(--primary); font-weight: bold;
  animation: blink 0.8s infinite;
}
.ai-loading {
  color: var(--text-secondary); font-size: 14px;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1100px) {
  .article-toc { display: none; }
}
.article-title-row { display: flex; align-items: flex-start; gap: 12px; position: relative; }
.article-title-row h1 { margin-right: auto; }
.toc-toggle-wrap { position: relative; flex-shrink: 0; }
.toc-toggle-btn {
  display: none; flex-shrink: 0; margin-top: 6px;
  background: var(--card-solid); border: 1px solid var(--card-border);
  color: var(--text-secondary); border-radius: 8px;
  padding: 6px 14px; font-size: 13px; font-weight: 500;
  cursor: pointer; align-items: center; gap: 6px;
}
.toc-toggle-btn i { font-size: 14px; }
.toc-toggle-btn:hover { border-color: var(--primary); color: var(--primary); }
.toc-toggle-btn.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
@media (max-width: 1100px) {
  .toc-toggle-btn { display: inline-flex; }
}
.mobile-toc-dropdown {
  display: none; position: absolute; top: 100%; right: 0;
  background: var(--card-solid); border: 1px solid var(--card-border);
  border-radius: 8px; padding: 12px 16px; max-height: 60vh;
  overflow-y: auto; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  margin-top: 8px; min-width: 240px; max-width: 320px;
}
.mobile-toc-dropdown.is-show { display: block; }
.mobile-toc-dropdown ol { list-style: none; padding: 0; margin: 0; }
.mobile-toc-dropdown ol ol { padding-left: 16px; }
.mobile-toc-dropdown li { padding: 4px 0; }
.mobile-toc-dropdown a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 14px; transition: color 0.15s; display: block;
}
.mobile-toc-dropdown a:hover { color: var(--primary); }
.mobile-toc-dropdown li.active a { color: var(--primary); font-weight: 500; }

/* Markdown 正文 (orangeheart 主题适配) */
.markdown-body {
  max-width: 860px; margin: 0 auto;
  font-size: 1rem; color: var(--text); line-height: 1.6;
  word-break: break-word; text-align: left;
  font-family: 'Noto Serif SC', Georgia, 'Songti SC', serif;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
  margin: 1.2em 0 1em; padding: 0; font-weight: bold; color: var(--text);
}
.markdown-body h1 { font-size: 2rem; }
.markdown-body h2 {
  font-size: 1.3rem; border-bottom: 2px solid #ef7060;
  counter-increment: h2-counter;
}
.markdown-body h2::before {
  content: counter(h2-counter) ". "; color: #ef7060; font-weight: bold; margin-right: 8px;
}
.markdown-body h3 { font-size: 1.2rem; }
.markdown-body h4 { font-size: 1.1rem; }
.markdown-body p { margin: 0.6em 0; line-height: 1.7; }
.markdown-body ul, .markdown-body ol { margin: 8px 0; padding-left: 25px; }
.markdown-body ul { list-style-type: disc; }
.markdown-body ul ul { list-style-type: square; }
.markdown-body ol { list-style-type: decimal; }
.markdown-body li { padding: 3px 0; line-height: 1.7; }
.markdown-body blockquote {
  display: block; font-size: 0.9em;
  border-left: 3px solid #ef7060; color: var(--text-secondary);
  padding: 10px 10px 10px 20px; margin: 20px 0;
  background: rgba(239,112,96,0.05);
}
.markdown-body a {
  color: #ef7060; font-weight: bold;
  border-bottom: 1px solid #ef7060; text-decoration: none;
}
.markdown-body a:hover { opacity: 0.8; }
.markdown-body img { display: block; margin: 14px auto; max-width: 100%; border-radius: var(--radius); }
.markdown-body table { display: table; text-align: left; margin: 18px 0; width: 100%; border-collapse: collapse; }
.markdown-body table tr { border-top: 1px solid var(--border); }
.markdown-body table tr:nth-child(2n) { background: rgba(0,0,0,0.02); }
.markdown-body table th, .markdown-body table td {
  border: 1px solid var(--border); padding: 8px 12px; text-align: left; font-size: 0.95rem;
}
.markdown-body table th { font-weight: bold; background: var(--input-bg); }
.markdown-body pre {
  background: #f6f8fa; color: #1f2328;
  padding: 38px 22px 18px; border-radius: 8px;
  overflow-x: auto; font-size: 14px; line-height: 1.7;
  font-family: var(--mono); margin: 16px 0;
  border: 1px solid #d8dee4; position: relative;
  text-shadow: none;
}
.markdown-body pre::-webkit-scrollbar { height: 4px; }
.markdown-body pre::-webkit-scrollbar-track { background: transparent; }
.markdown-body pre::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }
html.dark .markdown-body pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }
html.dark .markdown-body pre {
  background: #0f172a; color: #e2e8f0;
  border-color: #334155;
}
.markdown-body code {
  font-size: 0.9rem; padding: 2px 4px; border-radius: 4px;
  margin: 0 2px; color: #ef7060;
  background-color: rgba(27,31,35,0.05);
  font-family: var(--mono); word-break: break-all;
}
.markdown-body pre code {
  background: transparent !important; padding: 0; color: inherit; font-size: 0.9rem;
  margin: 0; border-radius: 0; word-break: normal; white-space: pre;
  text-shadow: none;
}
.markdown-body pre code span {
  background: transparent !important;
}
.markdown-body pre.chroma {
  background: #f6f8fa;
}
html.dark .markdown-body pre.chroma {
  background: #0f172a;
}
/* 代码块红绿灯装饰 */
.markdown-body pre::before {
  content: ""; position: absolute; left: 12px; top: 10px;
  width: 12px; height: 12px; border-radius: 50%;
  background-color: #fc5a5a;
  box-shadow: 20px 0 0 #fdbc40, 40px 0 0 #35cd4b;
}
.markdown-body pre code { display: block; }

/* 代码块复制按�?*/
.code-block-wrap {
  position: relative;
  margin: 16px 0;
}
.code-block-wrap pre {
  margin: 0;
}
.code-copy-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.25);
  color: #888; font-size: 12px; padding: 4px 12px; border-radius: 6px;
  cursor: pointer; line-height: 1.4;
  opacity: 1; transition: background 0.15s, color 0.15s;
}
.code-copy-btn:hover,
.code-copy-btn:focus-visible {
  background: rgba(15,23,42,0.85); color: #fff;
  outline: none;
}
html.dark .code-copy-btn {
  background: rgba(15,23,42,0.72); border-color: rgba(148,163,184,0.24); color: #cbd5e1;
}
html.dark .code-copy-btn:hover,
html.dark .code-copy-btn:focus-visible {
  background: rgba(30,41,59,0.95); color: #fff;
}

/* ---------- 点赞 ---------- */
.actions { max-width: 780px; margin: 28px auto 0; display: flex; align-items: center; gap: 12px; }
#like-btn {
  background: var(--primary); color: #fff; border: none;
  min-height: 32px; padding: 6px 18px; border-radius: 6px;
  font-size: 13px; font-weight: 500;
  transition: opacity 0.15s; cursor: pointer;
}
#like-btn:hover { opacity: 0.85; }
#like-btn:disabled { background: var(--danger); cursor: default; opacity: 0.8; }

/* ---------- 分享按钮 ---------- */
.share-buttons {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto; padding-left: 16px;
  border-left: 1px solid var(--border);
}
html.dark .share-buttons { border-left-color: rgba(255,255,255,0.1); }
.share-label { color: var(--muted); font-size: 13px; }
.share-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.15s;
}
.share-btn:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.share-btn[data-share="wechat"]:hover { background: #07c160; border-color: #07c160; }
.share-btn[data-share="weibo"]:hover { background: #ff8200; border-color: #ff8200; }
.share-btn[data-share="twitter"]:hover { background: #1da1f2; border-color: #1da1f2; }
.share-btn[data-share="copy"]:hover { background: #6b7280; border-color: #6b7280; }
html.dark .share-btn { border-color: rgba(255,255,255,0.15); color: #9ca3af; }
html.dark .share-btn:hover { color: #fff; }

/* ---------- QR 模态框 ---------- */
.qr-modal {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.5);
  align-items: center; justify-content: center;
}
.qr-modal.show { display: flex; }
.qr-modal-content {
  background: #fff; border-radius: 12px; padding: 32px;
  text-align: center; position: relative; max-width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
html.dark .qr-modal-content { background: #1f2937; }
.qr-modal-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: none; font-size: 22px;
  cursor: pointer; color: #999; line-height: 1;
}
.qr-modal-close:hover { color: #333; }
html.dark .qr-modal-close { color: #9ca3af; }
html.dark .qr-modal-close:hover { color: #f9fafb; }
.qr-modal-title { font-size: 16px; font-weight: 600; margin: 0 0 16px; }
.qr-modal-img { margin-bottom: 12px; }
.qr-modal-img img { width: 200px; height: 200px; border-radius: 8px; }
.qr-modal-url { font-size: 12px; color: #999; word-break: break-all; }
html.dark .qr-modal-url { color: #9ca3af; }
#float-actions {
  position: fixed; bottom: 40px; right: 30px; z-index: 999;
  display: flex; flex-direction: column; gap: 10px;
}
#float-actions button {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: var(--primary); color: #fff;
}
#float-actions button:hover {
  transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
#float-actions button:active { transform: scale(0.95); }
#btn-top { display: none; }  /* 默认隐藏，滚动后显示 */
html.dark #float-actions button {
  background: #334155; color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
html.dark #float-actions button:hover {
  background: var(--primary); color: #fff;
}

/* ---------- 评论 ---------- */
.comment-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.comment-form textarea {
  padding: 10px 4px; border: none; border-bottom: 2px solid var(--input-border);
  border-radius: 0; min-height: 90px; resize: vertical;
  font: inherit; background: transparent; font-size: 15px;
  transition: border-color 0.2s;
}
.comment-form textarea:focus {
  outline: none; border-bottom-color: var(--text);
}
.comment-form button {
  align-self: flex-end; background: var(--primary); color: #fff;
  border: none; padding: 6px 20px; border-radius: 20px;
  font-weight: 500; font-size: 13px;
  transition: background 0.2s; cursor: pointer;
}
.comment-form button:hover { background: var(--primary-light); }
.emoji-picker-wrap { position: relative; display: inline-block; }
.emoji-toggle { background: none !important; border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; font-size: 15px; cursor: pointer; line-height: 1.5; color: var(--text); }
.emoji-toggle:hover { background: var(--border) !important; }
html.dark .emoji-toggle { color: #e5e7eb; }
.emoji-picker {
  position: absolute; bottom: 100%; left: 0; margin-bottom: 6px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12); padding: 8px;
   z-index: 100; display: none;
}
html.dark .emoji-picker { background: #1f2937; border-color: #374151; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.emoji-picker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; }
.emoji-picker-btn {
  background: none !important; border: none; border-radius: 2px;
  cursor: pointer; line-height: 1.3;
  text-align: center; transition: background 0.1s;
}
.emoji-picker-btn:hover { background: #f0f0f0 !important; }
html.dark .emoji-picker-btn:hover { background: #374151 !important; }
/* 等级徽章 */
.level-badge {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px;
  border-radius: 10px; line-height: 1.6; vertical-align: middle;
}
.level-badge-1 { background: #e5e7eb; color: #6b7280; }
.level-badge-2 { background: #dbeafe; color: #2563eb; }
.level-badge-3 { background: #d1fae5; color: #059669; }
.level-badge-4 { background: #fef3c7; color: #d97706; }
.level-badge-5 { background: #fce7f3; color: #db2777; }
.level-badge-6 { background: #ede9fe; color: #7c3aed; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-item {
  padding: 18px 0; border-bottom: 1px solid var(--border);
  display: flex; gap: 14px;
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary); color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.comment-content { flex: 1; min-width: 0; }
.comment-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.comment-head strong { font-weight: 600; font-size: 14px; }
.comment-badge {
  display: inline-block; font-size: 11px; padding: 1px 8px;
  border-radius: 10px; font-weight: 500; vertical-align: middle;
}
.comment-badge-admin {
  background: rgba(var(--primary-rgb), 0.1); color: var(--primary-dark); border: 1px solid rgba(var(--primary-rgb), 0.2);
}
.comment-badge-super {
  background: rgba(234,179,8,0.12); color: #ca8a04; border: 1px solid rgba(234,179,8,0.25);
}
.comment-badge-user {
  background: rgba(107,114,128,0.08); color: #6b7280; border: 1px solid rgba(107,114,128,0.15);
}
html.dark .comment-badge-admin { background: rgba(var(--primary-light-rgb), 0.12); color: var(--primary-light); border-color: rgba(var(--primary-light-rgb), 0.2); }
html.dark .comment-badge-super { background: rgba(250,204,21,0.12); color: #facc15; border-color: rgba(250,204,21,0.2); }
html.dark .comment-badge-user { background: rgba(156,163,175,0.1); color: #9ca3af; border-color: rgba(156,163,175,0.15); }
.comment-body { white-space: pre-wrap; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.comment-actions { display: flex; gap: 12px; margin-top: 8px; align-items: center; }
.comment-like-btn {
  background: none; border: none; color: var(--text-secondary);
  font-size: 12px; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; gap: 4px;
  transition: color 0.15s;
}
.comment-like-btn:hover { color: #dc2626; }
.comment-like-btn.liked { color: #dc2626; }
.comment-like-btn .fa-heart { color: #dc2626; }
.comment-report-trigger {
  background: none; border: none; color: var(--text-secondary);
  font-size: 12px; cursor: pointer; padding: 0; opacity: 0.7;
}
.comment-report-trigger:hover { color: #dc2626; opacity: 1; }

/* ---------- 模态框 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease;
}
.modal-overlay.show { opacity: 1; }
.modal-box {
  background: var(--card-solid); border-radius: var(--radius-lg);
  padding: 28px 32px; min-width: 360px; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: scale(0.9); transition: transform 0.2s ease;
}
.modal-overlay.show .modal-box { transform: scale(1); }
.modal-title {
  font-size: 17px; font-weight: 700; color: var(--text);
  margin: 0 0 12px; display: flex; align-items: center; gap: 10px;
}
.modal-title.warning i { color: #f59e0b; }
.modal-title.danger i { color: #dc2626; }
.modal-title.info i { color: var(--primary); }
.modal-msg { margin: 0 0 20px; font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal-actions .btn {
  padding: 8px 20px; border-radius: 8px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--border); background: var(--card-solid); color: var(--text);
  cursor: pointer; transition: all 0.15s;
}
.modal-actions .btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.modal-actions .btn.danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.modal-actions .btn:hover { opacity: 0.85; }
.comment-sort {
  background: none; border: none; color: var(--text-secondary);
  font-size: 13px; cursor: pointer; padding: 2px 8px;
  border-radius: 4px; text-decoration: none; transition: all 0.15s;
}
.comment-sort:hover { color: var(--primary); }
.comment-sort.active { color: var(--primary); font-weight: 500; }
.reply-btn { background: none; border: none; color: var(--primary); font-size: 12px; cursor: pointer; padding: 0; margin-left: 6px; }
.reply-btn:hover { text-decoration: underline; }
.reply-at { color: var(--primary); font-size: 12px; margin-bottom: 4px; display: inline-block; }
.reply-form { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.reply-form textarea { width: 100%; min-height: 60px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--card-solid); color: var(--text); font-size: 13px; resize: vertical; font-family: var(--sans); }
.reply-form textarea:focus { border-color: var(--primary); outline: none; }
.reply-form-actions { display: flex; gap: 8px; }
.reply-form-actions button { padding: 4px 12px; border-radius: 4px; border: 1px solid var(--border); background: var(--card-solid); color: var(--text); font-size: 12px; cursor: pointer; }
.reply-form-actions button[type="submit"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.muted { color: var(--text-secondary); font-size: 13px; }

/* ---------- 搜索 ---------- */
.search-form { display: flex; gap: 10px; margin-bottom: 24px; align-items: flex-end; }
.search-form input {
  flex: 1; padding: 10px 4px; border: none; border-bottom: 2px solid var(--input-border);
  border-radius: 0; font: inherit; background: transparent; font-size: 15px;
  transition: border-color 0.2s;
}
.search-form input:focus {
  outline: none; border-bottom-color: var(--text);
}
.search-form button {
  background: var(--primary); color: #fff; border: none;
  padding: 10px 28px; border-radius: 6px; font-weight: 500; font-size: 15px;
  transition: background 0.15s; cursor: pointer;
}
.search-form button:hover { background: var(--primary-light); }
mark { background: #fef08a; color: #1f2937; border-radius: 2px; padding: 0 2px; }
html.dark mark { background: #854d0e; color: #fef9c3; }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
}
.form-row { display: flex; gap: 10px; align-items: center; }
.form-row label { flex: 1; }
.form-row button {
  height: 36px; padding: 0 20px;
  background: var(--primary); color: #fff; border: none;
  border-radius: 20px; font-weight: 500; font-size: 13px;
  white-space: nowrap; cursor: pointer; box-sizing: border-box;
  transition: background 0.2s;
}
.form-row button:hover { background: var(--primary-light); }
.form-row button:disabled { opacity: 0.5; cursor: not-allowed; background: var(--text-secondary); }
.form input, .form textarea, .form select {
  padding: 10px 4px; border: none; border-bottom: 2px solid var(--input-border);
  border-radius: 0; font: inherit; background: transparent; font-size: 15px;
  transition: border-color 0.2s;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-bottom-color: var(--text);
}
.form input::placeholder { color: var(--text-secondary); opacity: 0.5; }

/* 密码框带眼睛图标 */
.input-eye-wrap {
  position: relative; display: flex; align-items: center;
}
.input-eye-wrap input {
  width: 100%; padding-right: 36px;
}
.input-eye-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: none; background: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); border-radius: 4px;
  transition: color 0.15s;
}
.input-eye-btn:hover { color: var(--text); }
.input-eye-btn svg { width: 18px; height: 18px; }
.form .primary, button.primary {
  background: var(--primary); color: #fff; border: none;
  padding: 7px 20px; border-radius: 20px;
  font-weight: 500; font-size: 14px;
  transition: background 0.2s, transform 0.2s; cursor: pointer;
  align-self: flex-start;
}
.form .primary:hover, button.primary:hover { background: var(--primary-light); }
.form .primary:active, button.primary:active { transform: scale(0.96); }
.alert {
  background: rgba(220,38,38,0.06); color: var(--danger);
  padding: 10px 14px; border-radius: var(--radius);
  margin-bottom: 14px; font-size: 14px;
  border-left: 3px solid var(--danger);
}
.notice {
  background: rgba(var(--primary-rgb), 0.06); color: var(--primary);
  padding: 10px 14px; border-radius: var(--radius);
  margin-bottom: 14px; font-size: 14px;
  border-left: 3px solid var(--primary);
}

.form .primary:disabled, button.primary:disabled {
  opacity: 0.65;
  cursor: wait;
  background: var(--text-secondary);
}
.form .primary:disabled:hover, button.primary:disabled:hover { background: var(--text-secondary); }

/* ---------- 归档 ---------- */
.archive-timeline { position: relative; padding-left: 24px; }
.archive-timeline::before {
  content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border); border-radius: 2px;
}
.archive-year-block { position: relative; margin-bottom: 8px; }
.archive-year-block::before {
  content: ''; position: absolute; left: -18px; top: 10px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--card-solid);
  z-index: 1;
}
.archive-year-toggle {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-radius: var(--radius); cursor: pointer;
  transition: background 0.15s; user-select: none;
  font-family: var(--serif); font-size: 20px; color: var(--text);
}
.archive-year-toggle:hover { background: rgba(var(--primary-rgb), 0.04); }
html.dark .archive-year-toggle:hover { background: rgba(var(--primary-light-rgb), 0.06); }
.archive-year-title { font-weight: 700; }
.archive-year-count { font-size: 13px; color: var(--text-secondary); font-family: var(--sans); }
.archive-chevron { margin-left: auto; font-size: 18px; color: var(--text-secondary); transition: transform 0.2s; }
.archive-year-body { overflow: hidden; transition: max-height 0.3s ease; }
.archive-month-block { margin: 4px 0 8px 16px; position: relative; }
.archive-month-block::before {
  content: ''; position: absolute; left: -34px; top: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-secondary); border: 1px solid var(--card-solid);
  z-index: 1;
}
.archive-month-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.archive-month-toggle {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: var(--radius); cursor: pointer;
  transition: background 0.15s; user-select: none;
}
.archive-month-toggle:hover { background: rgba(var(--primary-rgb), 0.04); }
html.dark .archive-month-toggle:hover { background: rgba(var(--primary-light-rgb), 0.06); }
.archive-month-chevron { margin-left: auto; font-size: 12px; color: var(--text-secondary); transition: transform 0.2s; }
.archive-month-body { overflow: hidden; transition: max-height 0.3s ease; }
.archive-month-count { font-size: 12px; color: var(--text-secondary); font-weight: 400; }
.archive-list { list-style: none; padding-left: 0; margin: 6px 0 12px; }
.archive-list li {
  padding: 8px 0; display: flex; gap: 16px; align-items: flex-start;
  border-bottom: 1px dotted var(--border);
}
.archive-list li:last-child { border-bottom: none; }
.archive-date { font-size: 12px; color: var(--text-secondary); white-space: nowrap; min-width: 36px; margin-top: 2px; }
.archive-article-info { flex: 1; min-width: 0; }
.archive-article-info a { font-size: 14px; font-weight: 500; color: var(--text); }
.archive-article-info a:hover { color: var(--primary); }
.archive-summary { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.archive-clear { font-size: 13px; margin-left: 10px; font-weight: 400; }

/* ---------- 签到日历 ---------- */
.checkin-section { margin-top: 16px; width: 100%; }
.checkin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.checkin-streak { font-size: 13px; color: var(--text-secondary); }
.checkin-streak strong { color: var(--primary); font-size: 16px; }
.checkin-btn {
  background: var(--success); color: #fff; border: none;
  padding: 6px 18px; border-radius: 20px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: opacity 0.15s;
}
.checkin-btn:hover { opacity: 0.85; }
.checkin-btn:disabled { background: var(--text-secondary); cursor: default; opacity: 0.7; }
.checkin-calendar {
  background: var(--card-solid); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 12px;
}
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.cal-nav {
  width: 28px; height: 28px; border: 1px solid var(--border);
  border-radius: 50%; background: transparent; color: var(--text-secondary);
  font-size: 15px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: all 0.15s; line-height: 1;
}
.cal-nav:hover { border-color: var(--primary); color: var(--primary); }
.cal-title { font-size: 13px; font-weight: 600; color: var(--text); }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
  margin-bottom: 4px;
}
.cal-weekdays span {
  text-align: center; font-size: 11px; color: var(--text-secondary);
  padding: 4px 0; font-weight: 500;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text); border-radius: 50%;
  transition: background 0.15s; position: relative;
}
.cal-day-empty { background: transparent !important; }
.cal-day:hover { background: var(--border); }
.cal-day.cal-checked {
  background: var(--success); color: #fff; font-weight: 600;
}
.cal-day.cal-checked:hover { background: #15803d; }
.cal-day.cal-today {
  box-shadow: 0 0 0 2px var(--primary);
}
.cal-day.cal-checked.cal-today {
  box-shadow: 0 0 0 2px var(--primary);
  background: var(--success);
}
html.dark .cal-day.cal-checked { background: #166534; }
html.dark .cal-day.cal-checked:hover { background: #14532d; }

/* ---------- 贡献热力图 ---------- */
.contrib-section { margin-top: 16px; width: 100%; }
.contrib-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.contrib-title { font-size: 13px; font-weight: 600; color: var(--text); }
.contrib-total { font-size: 12px; color: var(--text-secondary); }
.contrib-wrap { overflow-x: auto; padding-bottom: 4px; }
.contrib-inner { display: flex; gap: 6px; width: max-content; }
.contrib-weekdays {
  display: grid; grid-template-rows: repeat(7, 11px); gap: 3px;
  font-size: 9px; color: var(--text-secondary); line-height: 11px;
  flex-shrink: 0;
}
.contrib-weekdays span:nth-child(odd) { visibility: hidden; }
.contrib-main { display: flex; flex-direction: column; }
.contrib-months {
  display: grid; grid-auto-flow: column; grid-auto-columns: 11px;
  column-gap: 3px; height: 14px;
  font-size: 10px; color: var(--text-secondary); line-height: 14px;
}
.contrib-months span { white-space: nowrap; }
.contrib-grid {
  display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(7, 11px); grid-auto-columns: 11px; gap: 3px;
}
.contrib-cell {
  width: 11px; height: 11px; border-radius: 2px;
  background: var(--border); box-sizing: border-box;
}
.contrib-cell[data-level="1"] { background: rgba(var(--primary-rgb), 0.25); }
.contrib-cell[data-level="2"] { background: rgba(var(--primary-rgb), 0.5); }
.contrib-cell[data-level="3"] { background: rgba(var(--primary-rgb), 0.75); }
.contrib-cell[data-level="4"] { background: var(--primary); }
.contrib-cell.is-empty { visibility: hidden; }
.contrib-cell:not(.is-empty):hover { outline: 1px solid var(--text); outline-offset: 1px; }
.contrib-legend {
  display: flex; align-items: center; gap: 4px; justify-content: flex-end;
  margin-top: 8px; font-size: 11px; color: var(--text-secondary);
}
.contrib-legend .contrib-cell { width: 10px; height: 10px; }


/* ---------- 公开个人主页 ---------- */
.profile-page { max-width: 720px; margin: 0 auto; width: 100%; }
.profile-page-header {
  display: flex; gap: 24px; align-items: center; padding: 28px 32px;
}
.profile-page-avatar { flex-shrink: 0; }
.profile-page-avatar img {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
}
.profile-page-info { flex: 1; min-width: 0; }
.profile-page-info h1 {
  font-size: 22px; font-weight: 700; margin: 0 0 6px; color: var(--text);
}
.profile-page-level { margin-bottom: 6px; }
.profile-page-bio {
  color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin: 0 0 8px;
}
.profile-page-meta {
  display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary);
}
.profile-page-meta i { width: 14px; margin-right: 2px; }
.profile-tabs { padding: 0; }
.profile-tab-nav {
  display: flex; gap: 0; border-bottom: 1px solid var(--border); padding: 0 16px;
}
.profile-tab-nav a {
  padding: 12px 16px; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.15s;
}
.profile-tab-nav a:hover { color: var(--text); }
.profile-tab-nav a.active {
  color: var(--primary); border-bottom-color: var(--primary);
}
.profile-tab-content {
  padding: 20px 24px; min-height: 200px;
}
.profile-tab-content .article-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.profile-tab-content .article-item {
  display: block; position: relative;
  padding: 14px 16px; margin: 0;
  border: none; border-radius: 10px;
  background: none; box-shadow: none;
  cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.profile-tab-content .article-item::after { display: none; }
.profile-tab-content .article-item:not(:last-child)::before {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: -2px;
  border-bottom: 1px solid var(--border);
}
.profile-tab-content .article-item:hover {
  background: rgba(var(--primary-rgb), 0.05);
  transform: none; box-shadow: none;
}
.profile-tab-content .article-item-content { min-width: 0; }
.profile-tab-content .article-item .title {
  font-family: var(--serif);
  font-size: 16px; font-weight: 600; color: var(--text);
  text-decoration: none; display: inline-block; margin-bottom: 6px;
}
.profile-tab-content .article-item .title:hover { color: var(--primary); }
.profile-tab-content .article-item .meta {
  font-size: 12.5px; color: var(--text-secondary); margin: 0 0 8px;
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.profile-tab-content .article-item .meta .dot { margin: 0 4px; opacity: 0.4; }
.profile-tab-content .tags-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 0; }
.profile-tab-content .comment-item {
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.profile-tab-content .comment-item:last-child { border-bottom: none; }
.profile-tab-content .comment-head {
  display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px;
}
.profile-tab-content .comment-head strong { font-size: 14px; }
.profile-tab-content .comment-head .muted { font-size: 12px; }
.profile-tab-content .comment-body {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
  white-space: pre-wrap; margin-bottom: 4px;
}
.profile-tab-content .comment-article-link {
  font-size: 12px; color: var(--text-secondary);
}
.profile-tab-content .comment-article-link a {
  color: var(--primary); text-decoration: none;
}
.profile-tab-content .comment-article-link a:hover { text-decoration: underline; }
.profile-tab-content .empty {
  text-align: center; padding: 48px 0; color: var(--text-secondary); font-size: 14px;
}
@media (max-width: 600px) {
  .profile-page-header { flex-direction: column; text-align: center; padding: 20px; }
  .profile-page-meta { justify-content: center; flex-wrap: wrap; }
  .profile-tab-nav { overflow-x: auto; gap: 0; }
  .profile-tab-nav a { white-space: nowrap; }
  .profile-tab-content { padding: 16px; }
}

/* ---------- 个人中心 ---------- */
.profile-grid { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
@media (max-width: 800px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-avatar-card { text-align: center; }
.profile-avatar {
  width: 130px; height: 130px; border-radius: 50%;
  margin: 0 auto 16px; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 600;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ---------- 页脚 ---------- */
.site-footer {
  text-align: center; color: var(--text-secondary);
  padding: 20px 0; font-size: 13px;
  border-top: 1px solid var(--border); margin-top: 12px;
}
.site-footer p { margin: 4px 0; }

/* ---------- Microsoft Fluent Toast ---------- */
.ms-toast {
  position: fixed; top: 80px; right: 24px; z-index: 10000;
  display: flex; align-items: flex-start; gap: 12px;
  min-width: 300px; max-width: 420px; padding: 14px 18px;
  background: #fff; border-radius: 8px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  transform: translateX(calc(100% + 40px));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
.ms-toast.ms-toast-show { transform: translateX(0); opacity: 1; }
.ms-toast-icon {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; margin-top: 1px;
}
.ms-toast-success .ms-toast-icon { background: #16a34a; }
.ms-toast-error .ms-toast-icon { background: #dc2626; }
.ms-toast-warning .ms-toast-icon { background: #f59e0b; }
.ms-toast-info .ms-toast-icon { background: var(--primary); }
.ms-toast-success { border-left-color: #16a34a; }
.ms-toast-error { border-left-color: #dc2626; }
.ms-toast-warning { border-left-color: #f59e0b; }
.ms-toast-info { border-left-color: var(--primary); }
.ms-toast-body { flex: 1; min-width: 0; }
.ms-toast-msg { font-size: 14px; color: #1f2937; line-height: 1.5; }
.ms-toast-close {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: #9ca3af; padding: 2px; line-height: 0; border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.ms-toast-close svg { display: block; }
.ms-toast-close:hover { color: #374151; background: rgba(0,0,0,0.05); }
html.dark .ms-toast-close { color: #6b7280; }
html.dark .ms-toast-close:hover { color: #d1d5db; background: rgba(255,255,255,0.08); }
.ms-toast-bar-wrap {
  position: absolute; left: 10px; right: 10px; bottom: 5px;
  height: 3px; border-radius: 2px; overflow: hidden;
  background: rgba(0,0,0,0.07);
}
html.dark .ms-toast-bar-wrap { background: rgba(255,255,255,0.1); }
.ms-toast-bar {
  height: 100%; width: 100%; border-radius: 0 0 8px 8px;
  animation: msToastBurn 3s linear forwards;
  transform-origin: right;
}
.ms-toast-success .ms-toast-bar { background: #16a34a; }
.ms-toast-error .ms-toast-bar { background: #dc2626; }
.ms-toast-warning .ms-toast-bar { background: #f59e0b; }
.ms-toast-info .ms-toast-bar { background: var(--primary); }
@keyframes msToastBurn {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
/* ---------- 关于页社交账�?---------- */
.about-author-social {
  display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap;
}
.social-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
  transition: all 0.2s; text-decoration: none !important;
}
.social-link svg { flex-shrink: 0; }
.social-github { background: #24292e; color: #fff; }
.social-github:hover { background: #1b1f23; color: #fff; }
.social-bilibili { background: #fb7299; color: #fff; }
.social-bilibili:hover { background: #ec6090; color: #fff; }
.social-csdn { background: #fc5531; color: #fff; }
.social-csdn:hover { background: #e04a2a; color: #fff; }
html.dark .social-link { color: #fff !important; }

/* ---------- 背景颜色选择器 ---------- */
#color-picker {
  position: absolute; top: 100%; right: 0; margin-top: 6px;
  background: var(--card-solid); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: none; z-index: 200; min-width: 220px;
}
#color-picker.show { display: block; }
#color-picker label {
  display: block; font-size: 12px; color: var(--text-secondary);
  margin-bottom: 8px; font-weight: 500;
}
.cp-mode-tabs {
  display: flex; gap: 0; margin-bottom: 12px;
  background: rgba(0,0,0,0.06); border-radius: 8px; padding: 3px;
}
.cp-tab {
  flex: 1; padding: 5px 0; text-align: center; font-size: 12px;
  border: none; background: transparent; cursor: pointer;
  border-radius: 6px; color: var(--text-secondary); font-weight: 500;
  transition: all 0.15s;
}
.cp-tab.active {
  background: #fff; color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
html.dark .cp-tab.active {
  background: rgba(255,255,255,0.12); color: #f9fafb;
}
.cp-presets {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
}
.cp-presets button {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; transition: all 0.15s; padding: 0;
}
.cp-presets button:hover { transform: scale(1.15); }
.cp-presets button.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.cp-custom {
  border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px;
}
.cp-slider-row {
  display: flex; gap: 8px; align-items: center;
}
.cp-slider-row input[type="color"] {
  width: 36px; height: 30px; padding: 0; border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer; background: none;
}
.cp-slider-row input[type="text"] {
  flex: 1; padding: 4px 8px; font-size: 12px; font-family: var(--mono);
  border: 1px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--text); outline: none;
}
.cp-slider-row input[type="text"]:focus {
  border-color: var(--primary);
}
.cp-clear-wp { margin-top: 8px; font-size: 12px; }
.cp-clear-wp a { color: var(--text); opacity: .6; text-decoration: none; }
.cp-clear-wp a:hover { opacity: 1; color: var(--primary); }
html.dark #color-picker {
  background: rgba(31,41,55,0.96);
  border-color: #374151;
}
html.dark .cp-custom { border-color: #374151; }
html.dark .cp-slider-row input[type="color"] { border-color: #374151; }
html.dark .cp-slider-row input[type="text"] { border-color: #374151; color: #e5e7eb; }
@media (max-width: 768px) {
  #color-picker {
    position: fixed; top: 64px; left: 0; right: 0;
    margin: 0; border-radius: 0; border-left: none; border-right: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
}
html.dark .ms-toast {
  background: #1f2937; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
html.dark .ms-toast-msg { color: #e5e7eb; }
@media (max-width: 480px) {
  .ms-toast { top: auto; bottom: 20px; right: 12px; left: 12px; min-width: auto; max-width: none; transform: translateY(calc(100% + 40px)); }
  .ms-toast.ms-toast-show { transform: translateY(0); }
}

/* ---------- 图片灯箱 ---------- */
.img-lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  justify-content: center; align-items: center; cursor: zoom-out;
}
.img-lightbox.show { display: flex; }
.img-lightbox-img {
  max-width: 90vw; max-height: 90vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  animation: lbFadeIn 0.2s ease;
}
.img-lightbox-close {
  position: absolute; top: 16px; right: 20px;
  width: 40px; height: 40px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: #fff; font-size: 24px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.img-lightbox-close:hover { background: rgba(255,255,255,0.3); }
.markdown-body img { cursor: zoom-in; transition: transform 0.15s; }
.markdown-body img:hover { transform: scale(1.02); }
@keyframes lbFadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

#latest-articles .m-tags {
display: inline-flex;
gap: 10px;
flex-wrap: wrap;
}

.related-articles {
margin-top: 24px;
}
.related-articles .article-item {
padding: 16px 20px;
}

.code-lang-label {
position: absolute;
right: 0;
top: 100%;
margin-top: 4px;
z-index: 2;
font-size: 11px;
font-family: var(--mono);
color: #888;
background: rgba(255,255,255,0.16);
border: 1px solid rgba(255,255,255,0.25);
padding: 2px 10px;
border-radius: 6px;
line-height: 1.5;
user-select: none;
pointer-events: none;
}
html.dark .code-lang-label {
background: rgba(15,23,42,0.72);
border-color: rgba(148,163,184,0.24);
color: #cbd5e1;
}
/* ---------- 留言板 ---------- */
.message-list { display: flex; flex-direction: column; gap: 14px; }
.message-item {
  padding: 20px 24px; border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-solid);
  transition: transform 0.15s, box-shadow 0.15s;
}
.message-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--card-shadow);
}
.message-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.message-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.message-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.message-avatar .avatar-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.message-author { font-weight: 600; font-size: 14px; color: var(--text); }
.message-time { font-size: 12px; color: var(--text-secondary); margin-left: auto; white-space: nowrap; }
.message-content {
  font-size: 14px; line-height: 1.75; color: var(--text);
  white-space: pre-wrap; padding-left: 48px;
}
@media (max-width: 600px) {
  .message-item { padding: 16px; }
  .message-content { padding-left: 0; margin-top: 4px; }
}
html.dark .message-item { background: rgba(31,41,55,0.55); }

/* ---------- 头像可点击跳转个人主页 ---------- */
.avatar-link { text-decoration: none; cursor: pointer; }
.avatar-link:hover { text-decoration: none; }
.comment-avatar .avatar-link,
.message-avatar .avatar-link {
  width: 100%; height: 100%; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.author-name-link { color: inherit; text-decoration: none; transition: color 0.15s; }
.author-name-link:hover { color: var(--primary); }

/* ---------- 导航通知铃铛 + 红点 ---------- */
.nav-bell { position: relative; display: inline-flex; align-items: center; }
.nav-badge {
  position: absolute; top: -6px; right: -8px;
  min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
  background: #e53935; color: #fff; font-size: 11px; line-height: 16px;
  font-weight: 600; text-align: center; border-radius: 8px;
}

/* ---------- 通知列表 ---------- */
.notify-list { list-style: none; margin: 12px 0 0; padding: 0; }
.notify-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--border);
}
.notify-item:last-child { border-bottom: none; }
.notify-unread { background: rgba(var(--primary-rgb), 0.05); border-radius: 8px; }
.notify-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; text-decoration: none;
}
.notify-avatar img { width: 100%; height: 100%; object-fit: cover; }
.notify-body { flex: 1; min-width: 0; }
.notify-text { display: block; color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.6; }
.notify-text:hover { color: var(--primary); }
.notify-text strong { font-weight: 600; }
.notify-article { color: var(--primary); }
.notify-time { font-size: 12px; color: var(--text-secondary); }

/* 留言板表单 */
.guestbook-form-card {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), rgba(var(--primary-rgb), 0.01));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--card-shadow);
}
html.dark .guestbook-form-card {
  background: linear-gradient(135deg, rgba(var(--primary-light-rgb), 0.06), rgba(var(--primary-rgb), 0.02));
}
.guestbook-form-card h2 {
  font-size: 20px; font-weight: 700; margin: 0 0 4px; padding: 0; border: none;
}
.guestbook-form-card .form { margin-top: 16px; }
.guestbook-form-card textarea {
  min-height: 80px; resize: vertical;
  padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font: inherit; font-size: 14px;
  background: var(--card-solid); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.guestbook-form-card textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
html.dark .guestbook-form-card textarea { background: rgba(31,41,55,0.6); }
html.dark .guestbook-form-card textarea:focus {
  box-shadow: 0 0 0 3px rgba(var(--primary-light-rgb), 0.12);
}

/* ---------- Dark mode overrides from partials ---------- */
html.dark { color-scheme: dark; }
html.dark .tag { background: rgba(var(--primary-light-rgb), 0.12); color: var(--primary-light); }
html.dark .tag:hover { background: var(--primary); color: #fff; }

/* Markdown body dark mode */
html.dark .markdown-body { color: #e5e7eb; }
html.dark .markdown-body code { background: #334155; color: #f472b6; }
html.dark .markdown-body pre code { background: transparent !important; color: #e2e8f0; }
html.dark .markdown-body blockquote { background: rgba(239,112,96,0.08); border-left-color: #ef7060; }
html.dark .markdown-body a { color: #ef7060; border-bottom-color: #ef7060; }
html.dark .markdown-body h2 { border-bottom-color: #ef7060; }
html.dark .markdown-body h2::before { color: #ef7060; }
html.dark .markdown-body th { background: #1f2937; }
html.dark .markdown-body th, html.dark .markdown-body td { border-color: #374151; }
html.dark .markdown-body table tr { border-top-color: #374151; }
html.dark .markdown-body table tr:nth-child(2n) { background: rgba(255,255,255,0.02); }

/* Chroma syntax overrides for dark mode */
html.dark .markdown-body pre code span[style*="color:#0550ae"] { color: #61afef !important; }
html.dark .markdown-body pre code span[style*="color:#1f2328"] { color: #e2e8f0 !important; }
html.dark .markdown-body pre code span[style*="color:#cf222e"] { color: #c678dd !important; }
html.dark .markdown-body pre code span[style*="color:#0a3069"] { color: #98c379 !important; }
html.dark .markdown-body pre code span[style*="color:#57606a"] { color: #5c6370 !important; }
html.dark .markdown-body pre code span[style*="color:#900"] { color: #d19a66 !important; }
html.dark .markdown-body pre code span[style*="font-weight:bold"] { color: #d19a66 !important; }

/* Notice/alert dark mode */
html.dark .notice { background: rgba(var(--primary-rgb), 0.1); color: var(--primary-light); }
html.dark .form .primary:disabled, html.dark button.primary:disabled { background: #4b5563; }

/* 暗黑模式下 .primary 按钮：半透明蓝色背景 */
html.dark .form .primary, html.dark button.primary {
  background: rgba(96,165,250,0.18);
  color: var(--primary-light);
  border: 1px solid rgba(96,165,250,0.35);
}
html.dark .form .primary:hover, html.dark button.primary:hover {
  background: rgba(96,165,250,0.3);
  color: #fff;
  border-color: rgba(96,165,250,0.5);
}

.fa-smile-o {
	color: var(--text);
}

/* ---------- 头像框面板 ---------- */
.avatar-frame-grid {
	display: flex; flex-wrap: wrap; gap: 8px;
}
.avatar-frame-item {
	background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px;
	padding: 6px; cursor: pointer; width: 64px; height: 64px; box-sizing: border-box;
	display: flex; align-items: center; justify-content: center; position: relative;
}
.avatar-frame-item:hover { border-color: var(--primary); }
.avatar-frame-item.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.avatar-frame-preview {
	width: 48px; height: 48px; position: relative; display: flex; align-items: center; justify-content: center;
}
.avatar-frame-placeholder {
	width: 40px; height: 40px; border-radius: 50%; background: var(--border);
	display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--text-secondary);
}
.avatar-frame-item.active .avatar-frame-placeholder { background: var(--primary); color: #fff; }
.avatar-frame-placeholder img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-frame-preview-frame {
	position: absolute; top: 50%; left: 50%;
	width: 52.8px; height: 52.8px; transform: translate(-50%, -50%);
	background-size: contain; background-repeat: no-repeat; background-position: center;
	pointer-events: none;
}
/* 头像框选择模态框 */

/* ---------- App 下载弹窗 ---------- */
.app-download-overlay {
	position: fixed; inset: 0; z-index: 10000;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0,0,0,0.6);
	opacity: 0; pointer-events: none;
	transition: opacity .3s;
	backdrop-filter: blur(4px);
}
.app-download-overlay.show {
	opacity: 1; pointer-events: auto;
}
.app-download-modal {
	background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
	border-radius: 20px;
	padding: 28px 24px 24px;
	max-width: 320px;
	width: 88%;
	text-align: center;
	box-shadow: 0 24px 48px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
	position: relative;
	transform: scale(0.9) translateY(20px);
	transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
html.dark .app-download-modal {
	background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
.app-download-overlay.show .app-download-modal {
	transform: scale(1) translateY(0);
}
.app-download-close {
	position: absolute; top: 10px; right: 12px;
	width: 28px; height: 28px;
	background: rgba(0,0,0,0.05);
	border: none; border-radius: 50%;
	font-size: 18px; color: var(--text-secondary);
	cursor: pointer; line-height: 1;
	display: flex; align-items: center; justify-content: center;
	transition: all .2s;
}
html.dark .app-download-close { background: rgba(255,255,255,0.1); }
.app-download-close:hover {
	background: rgba(0,0,0,0.1);
	color: var(--text-primary);
	transform: rotate(90deg);
}
.app-download-top {
	display: flex; flex-direction: column; align-items: center;
	margin-bottom: 20px;
}
.app-download-logo {
	width: 56px; height: 56px; border-radius: 14px;
	object-fit: cover;
}
.app-download-info {
	text-align: center;
}
.app-download-info h3 {
	font-size: 18px; font-weight: 700; margin: 0 0 4px;
	color: #1a1a2e;
}
html.dark .app-download-info h3 { color: #f1f5f9; }
.app-download-info p {
	font-size: 13px; color: #64748b; margin: 0;
}
html.dark .app-download-info p { color: #94a3b8; }
.app-download-qr-wrap {
	margin: 0 auto 16px;
	display: flex; justify-content: center;
}
.app-download-qr-frame {
	display: inline-block;
	padding: 10px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
html.dark .app-download-qr-frame {
	background: #1e293b;
	box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.app-download-hint {
	font-size: 13px; color: #64748b;
	margin-bottom: 18px;
}
html.dark .app-download-hint { color: #94a3b8; }
.app-download-hint i { color: var(--primary); margin-right: 4px; }
.app-download-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 36px;
	background: var(--primary);
	color: #fff;
	border-radius: 12px;
	text-decoration: none;
	font-size: 15px; font-weight: 600;
	box-shadow: 0 4px 14px rgba(37,99,235,0.4);
	transition: all .25s;
	width: 100%;
	justify-content: center;
	box-sizing: border-box;
}
.app-download-btn:hover {
	background: var(--primary-dark);
	box-shadow: 0 6px 20px rgba(37,99,235,0.5);
	transform: translateY(-2px);
}
.app-download-later {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 0;
	background: none;
	border: none;
	font-size: 12px;
	color: #94a3b8;
	cursor: pointer;
	transition: color .2s;
}
.app-download-later:hover { color: var(--text-secondary); }
.frame-modal { display: none; background: rgba(0,0,0,0.5); }
.frame-modal.show { display: flex; }
.frame-modal .avatar-frame-grid {
	justify-content: center; margin-bottom: 20px;
	max-height: 320px; overflow-y: auto;
}

/* ---------- 点赞弹跳动画 ---------- */
@keyframes likeBounce {
  0% { transform: scale(1); }
  30% { transform: scale(0.8); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
#like-btn.like-animate {
  animation: likeBounce 0.4s ease;
}
@keyframes likeCountPop {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-8px); opacity: 0.6; }
  100% { transform: translateY(0); opacity: 1; }
}
#like-btn.like-animate #like-count {
  animation: likeCountPop 0.4s ease;
}

/* ---------- 评论新增入场动画 ---------- */
@keyframes commentEnter {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.comment-item-enter {
  animation: commentEnter 0.4s ease;
}

/* ---------- 评论列表交错入场 ---------- */
.comment-list .comment-item {
  opacity: 0;
  animation: commentEnter 0.35s ease forwards;
}
.comment-list .comment-item:nth-child(1) { animation-delay: 0s; }
.comment-list .comment-item:nth-child(2) { animation-delay: 0.04s; }
.comment-list .comment-item:nth-child(3) { animation-delay: 0.08s; }
.comment-list .comment-item:nth-child(4) { animation-delay: 0.12s; }
.comment-list .comment-item:nth-child(5) { animation-delay: 0.16s; }
.comment-list .comment-item:nth-child(n+6) { animation-delay: 0.2s; }

/* ---------- 搜索结果动画 ---------- */
.search-results li {
  opacity: 0;
  animation: commentEnter 0.3s ease forwards;
}
.search-results li:nth-child(1) { animation-delay: 0s; }
.search-results li:nth-child(2) { animation-delay: 0.05s; }
.search-results li:nth-child(3) { animation-delay: 0.1s; }
.search-results li:nth-child(4) { animation-delay: 0.15s; }
.search-results li:nth-child(5) { animation-delay: 0.2s; }
.search-results li:nth-child(n+6) { animation-delay: 0.25s; }



/* ---------- 文章详情磨砂增强（与新版首页卡片统一） ---------- */
.article-detail {
  background: rgba(255,255,255,0.66);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 16px;
  box-shadow: 0 10px 36px rgba(15,23,42,0.08);
}
html.dark .article-detail {
  background: rgba(24,34,52,0.62);
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 10px 36px rgba(0,0,0,0.28);
}
.article-detail .article-cover {
  border: 1px solid var(--border);
  box-shadow: 0 6px 22px rgba(15,23,42,0.10);
}
