/* ============================================================
   家庭日记网站 - 全站样式（CSS3/HTML5 响应式）
   主题通过 CSS 变量由 assets/css/themes/{theme}.css 覆盖
   ============================================================ */

/* ---------- 主题变量（默认主题由 themes/default.css 定义） ---------- */
:root {
  --bg: #f5f7fa;
  --bg-soft: #eef2f6;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #8b95a3;
  --primary: #2f9e83;
  --primary-2: #2a8a72;
  --accent: #f59e0b;
  --danger: #e5484d;
  --border: #e5e9ef;
  --shadow: 0 2px 14px rgba(15, 40, 60, .08);
  --shadow-lg: 0 12px 40px rgba(15, 40, 60, .14);
  --radius: 14px;
  --radius-sm: 9px;
  --header-bg: #ffffff;
  --header-text: #1f2937;
  --footer-bg: #1e2937;
  --footer-text: #cbd5e1;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { opacity: .85; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- 查看密码模糊化 ---------- */
body.locked #app { filter: blur(16px) saturate(.7); pointer-events: none; user-select: none; transition: filter .3s; }
body.locked .site-header { position: relative; z-index: 0; }
.view-lock-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10, 14, 20, .72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.view-lock-box {
  background: var(--card); border-radius: var(--radius);
  padding: 38px 34px; max-width: 380px; width: 100%;
  text-align: center; box-shadow: var(--shadow-lg);
  animation: popIn .35s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes popIn { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.view-lock-icon { font-size: 42px; margin-bottom: 10px; }
.view-lock-box h2 { font-size: 1.25rem; margin-bottom: 6px; }
.view-lock-box p { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.view-lock-form { display: flex; flex-direction: column; gap: 12px; }
.view-lock-form input {
  padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  text-align: center; letter-spacing: 3px; font-size: 1.1rem; outline: none; transition: border .2s;
}
.view-lock-form input:focus { border-color: var(--primary); }
.view-lock-error { color: var(--danger); font-size: .85rem; margin-top: 10px; }

/* ---------- 头部 ---------- */
.site-header {
  background: rgba(255,255,255,.6); color: var(--header-text);
  backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
  position: sticky; top: 0; z-index: 500;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  min-height: 62px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.logo-mark { font-size: 1.5rem; }
.logo-img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.main-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; justify-content: flex-end; }
.nav-user { display: none; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--border);
  border-radius: 10px; width: 46px; height: 46px; font-size: 2rem; font-weight: 800; cursor: pointer;
  color: var(--text); line-height: 1; flex-shrink: 0; align-items: center; justify-content: center;
}
.nav-item {
  padding: 7px 14px; border-radius: 999px; color: var(--muted);
  font-size: .95rem; font-weight: 500;
}
.nav-item:hover { color: var(--primary); background: var(--bg-soft); }
.nav-item.active { color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); font-weight: 700; }
.nav-admin { color: var(--accent); }
.header-user { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; }
.chip-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.chip-name { font-weight: 600; font-size: .95rem; }
.chip-role { font-size: .7rem; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.role-admin { background: #fee2e2; color: #dc2626; }
.role-vip { background: #fef3c7; color: #b45309; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: .95rem; font-weight: 600; cursor: pointer; transition: all .2s;
  background: var(--bg-soft); color: var(--text); line-height: 1.4; text-align: center;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-liked { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.btn-sm { padding: 5px 13px; font-size: .85rem; }
.btn-xs { padding: 3px 10px; font-size: .78rem; }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- 站点公告 ---------- */
.site-notice {
  margin: 14px auto 0; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, var(--card)), var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border));
  border-radius: var(--radius-sm); padding: 10px 16px; color: var(--text);
  font-size: .9rem;
}

/* ---------- 主内容 ---------- */
.site-main { flex: 1; padding-bottom: 50px; }
.page-head { padding: 26px 0 14px; }
.page-head h1 { font-size: 1.7rem; font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-subhead { margin: 30px 0 16px; }
.page-subhead h2 { font-size: 1.25rem; font-weight: 800; }

/* ---------- 首页工具栏 ---------- */
.home-toolbar { display: flex; align-items: center; gap: 14px; padding: 20px 0 8px; flex-wrap: wrap; }
.mode-switch {
  display: inline-flex; background: var(--bg-soft); border-radius: 999px; padding: 4px; gap: 4px;
  border: 1px solid var(--border);
}
.mode-btn {
  padding: 8px 20px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: all .2s;
}
.mode-btn.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }
.mode-icon { font-size: 1.1rem; }

/* 年份筛选（工具栏内，靠右；手机端与搜索一行） */
.year-filter { display: flex; align-items: center; gap: 8px; padding: 0; margin-left: auto; }
.year-label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.year-form { display: inline-flex; }
.year-select {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: .9rem; font-weight: 600;
  outline: none; cursor: pointer; transition: border .2s;
}
.year-select:focus { border-color: var(--primary); }

/* 搜索图标（最右）+ 弹出层 */
.home-search { position: relative; flex: none; }
.search-trigger {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; box-shadow: var(--shadow);
}
.search-trigger:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.search-pop {
  display: none; position: absolute; top: calc(100% + 10px); right: 0; z-index: 600;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow-lg); min-width: 320px;
}
.search-pop.open { display: block; animation: popIn .22s cubic-bezier(.2,.9,.3,1.2); }
.search-pop form { display: flex; gap: 8px; }
.search-pop input {
  flex: 1; min-width: 0; padding: 9px 14px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--bg-soft); outline: none; transition: border .2s;
}
.search-pop input:focus { border-color: var(--primary); background: var(--card); }

.cat-filter { display: flex; gap: 8px; flex-wrap: wrap; padding: 0; flex: 1 1 auto; }
.cat-chip {
  padding: 5px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--border);
  color: var(--muted); font-size: .88rem; font-weight: 500;
}
.cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 瀑布流 ---------- */
/* 按行网格：桌面4列 / 平板2列 / 手机1列，卡片等高 */
.masonry { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.masonry .masonry-item { margin-bottom: 0; display: flex; flex-direction: column; }
.masonry .masonry-link { flex: 1; display: flex; flex-direction: column; }
.masonry-img { height: 240px; object-fit: cover; }
@media (max-width: 1000px) { .masonry { grid-template-columns: repeat(2, 1fr); } .masonry-img { height: 200px; } }
@media (max-width: 640px) { .masonry { grid-template-columns: 1fr; } .masonry-img { height: 240px; object-fit: cover; } }
.masonry-item {
  break-inside: avoid; margin-bottom: 16px; position: relative;
  border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.65);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; border: 1px solid rgba(255,255,255,.5);
}
.masonry-item:hover { transform: translateY(-8px) scale(1.015); box-shadow: 0 18px 40px rgba(60,80,140,.22), 0 4px 12px rgba(0,0,0,.08); }
.masonry-item { box-shadow: 0 6px 16px rgba(60,80,140,.10), 0 2px 4px rgba(0,0,0,.04); }
.masonry-link { display: block; position: relative; }
.pin-badge {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  background: linear-gradient(135deg, #f59e0b, #ef8a07); color: #fff;
  font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
}
.masonry-img { width: 100%; transition: transform .4s; }
.masonry-item:hover .masonry-img { transform: scale(1.04); }
.masonry-noimg {
  height: 160px; display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; background: linear-gradient(135deg, var(--bg-soft), var(--bg));
}
.masonry-overlay {
  position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff;
  opacity: 0; transition: opacity .25s;
}
.masonry-item:hover .masonry-overlay { opacity: 1; }
.masonry-title { font-size: .98rem; font-weight: 700; margin-bottom: 4px; }
.masonry-meta { display: flex; gap: 12px; font-size: .8rem; opacity: .9; }
.family-tag-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px 10px; }
.family-tag {
  font-size: .76rem; background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary); padding: 2px 9px; border-radius: 999px; font-weight: 600;
}
.load-more-wrap { text-align: center; padding: 22px 0 8px; }

/* ---------- 抖音式视频流 ---------- */
.douyin-feed { height: calc(100vh - 62px); overflow-y: auto; scroll-snap-type: y mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; margin: 0 -16px; }
.dy-item {
  position: relative; height: calc(100vh - 62px); scroll-snap-align: start;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: #000;
}
.dy-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.dy-shade { position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.55)); pointer-events: none; }
.dy-info {
  position: absolute; left: 16px; right: 76px; bottom: 26px; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.6); z-index: 2;
}
.dy-user { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.dy-avatar { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); }
.dy-username { font-weight: 700; font-size: 1rem; }
.dy-time { font-size: .8rem; opacity: .85; }
.dy-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.dy-tags { padding: 0; }
.dy-tags .family-tag { background: rgba(255,255,255,.2); color: #fff; }
.dy-detail-link { display: inline-block; margin-top: 8px; font-size: .88rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.6); }
.dy-sidebar { position: absolute; right: 12px; bottom: 60px; display: flex; flex-direction: column; gap: 18px; z-index: 2; }
.dy-act { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #fff; }
.dy-act-icon { font-size: 1.9rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.dy-act-num { font-size: .78rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.dy-loading { text-align: center; color: #fff; padding: 14px; background: #111; }

/* ---------- 详情页 ---------- */
.post-container { max-width: 980px; }
.post-card { background: rgba(255,255,255,.65); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border: 1px solid rgba(255,255,255,.5); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-top: 22px; }
.post-head { padding: 26px 26px 0; }
.post-title { font-size: 1.65rem; font-weight: 800; line-height: 1.35; }
.post-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; margin-top: 12px; }
.post-author { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 600; }
.post-body { padding: 20px 26px; }
.post-content { font-size: 1.02rem; white-space: normal; margin-bottom: 16px; }
.post-videos { margin-bottom: 18px; }
.post-video { width: 100%; max-height: 520px; border-radius: var(--radius-sm); background: #000; }
.post-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.gallery-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); }
.gallery-link img { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; transition: transform .3s; }
.gallery-item:hover .gallery-link img { transform: scale(1.05); }
.gallery-download {
  position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff;
  font-size: .75rem; padding: 4px 10px; border-radius: 999px; opacity: 0; transition: opacity .2s;
}
.gallery-item:hover .gallery-download { opacity: 1; }
.post-attachments { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; }
.post-attachments h3 { font-size: 1rem; margin-bottom: 10px; }
.attach-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--bg-soft); margin-bottom: 8px; color: var(--text);
}
.attach-item:hover { background: color-mix(in srgb, var(--primary) 8%, var(--bg-soft)); }
.attach-icon { font-size: 1.2rem; }
.attach-name { flex: 1; font-weight: 600; font-size: .92rem; word-break: break-all; }
.attach-size { color: var(--muted); font-size: .8rem; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.tag-chip {
  padding: 4px 13px; border-radius: 999px; background: var(--bg-soft); color: var(--text);
  font-size: .85rem; font-weight: 600;
}
.tag-chip:hover { background: var(--primary); color: #fff; }
.tag-family { background: color-mix(in srgb, var(--primary) 13%, transparent); color: var(--primary); }
.post-actions { display: flex; gap: 12px; padding: 14px 26px 24px; border-top: 1px solid var(--border); }

/* ---------- 评论 ---------- */
.comments-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px; margin-top: 20px; }
.comments-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 16px; }
.comment-form { display: flex; gap: 10px; margin-bottom: 20px; }
.comment-form textarea { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); resize: vertical; outline: none; }
.comment-form textarea:focus { border-color: var(--primary); }
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-item { display: flex; gap: 12px; }
.comment-pending { opacity: .6; }
.comment-pending .comment-main { background: #fef9e7; border: 1px dashed #fcd34d; }
.comment-main { flex: 1; background: var(--bg-soft); padding: 10px 14px; border-radius: var(--radius-sm); }
.comment-head { display: flex; justify-content: space-between; margin-bottom: 4px; }
.comment-user { font-weight: 700; font-size: .9rem; }
.comment-time { color: var(--muted); font-size: .78rem; }
.comment-content { font-size: .93rem; }

/* ---------- 认证页 ---------- */
.auth-wrap { max-width: 420px; padding-top: 50px; }
.auth-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 36px 32px; }
.auth-title { font-size: 1.5rem; font-weight: 800; text-align: center; }
.auth-sub { color: var(--muted); text-align: center; font-size: .9rem; margin: 6px 0 22px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-alt { text-align: center; font-size: .9rem; color: var(--muted); margin-top: 18px; }

/* ---------- 表单 ---------- */
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field span { font-size: .86rem; font-weight: 600; color: var(--text); }
.form-field input, .form-field textarea, .form-field select, .form-input, .form-select {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); outline: none; transition: border .2s, box-shadow .2s; width: 100%;
}
.form-field input:focus, .form-field textarea:focus, .form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.form-input-sm, .form-select-sm { padding: 6px 10px; font-size: .85rem; }
.form-select { cursor: pointer; }

/* ---------- 发布页 ---------- */
.publish-form { margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; }
.form-col-main, .form-col-side { display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.side-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 12px; }
.side-hint { color: var(--muted); font-size: .83rem; margin-top: 6px; }
.radio-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; font-size: .93rem; }
.radio-row input { accent-color: var(--primary); width: 16px; height: 16px; }

.upload-zone { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.upload-head { font-weight: 700; font-size: .98rem; margin-bottom: 12px; }
.upload-input { width: 100%; font-size: .9rem; }
.upload-preview { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.upload-group { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 10px; background: var(--bg-soft); }
.upload-group-head { font-weight: 700; font-size: .88rem; margin-bottom: 8px; color: var(--heading); }
.upload-group-row { display: flex; gap: 10px; flex-wrap: wrap; }
.upload-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border); max-width: 260px; width: 100%;
}
.upload-item img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.upload-item .up-item-icon { font-size: 1.4rem; flex-shrink: 0; }
.upload-item .up-item-name { flex: 1; min-width: 0; font-size: .8rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item .up-item-size { font-size: .72rem; color: var(--muted); flex-shrink: 0; }
.upload-summary { margin-top: 10px; font-size: .8rem; color: var(--muted); }
.upload-preview .prev-item {
  position: relative; width: 96px; height: 96px; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-soft);
}
.upload-preview .prev-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview .prev-item video { width: 100%; height: 100%; object-fit: cover; }
.upload-preview .prev-item .prev-file {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: 100%; font-size: .7rem; color: var(--muted); word-break: break-all; padding: 4px; text-align: center;
}
.prev-del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.65); color: #fff; border: none; cursor: pointer; font-size: .75rem; line-height: 1;
}
.tag-editor { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.editor-tag {
  display: inline-flex; align-items: center; gap: 5px; background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary); padding: 3px 10px; border-radius: 999px; font-size: .83rem; font-weight: 600;
}
.editor-tag button { background: none; border: none; color: inherit; cursor: pointer; font-size: .9rem; line-height: 1; }
.family-tag-picker { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.pick-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: .9rem; cursor: pointer; }
.pick-item input { accent-color: var(--primary); width: 15px; height: 15px; }

/* ---------- 族谱 ---------- */
.family-tree { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 20px; overflow-x: auto; }
.tree-row { display: flex; align-items: flex-start; gap: 16px; min-width: 640px; }
.tree-gen-label {
  writing-mode: vertical-lr; text-orientation: mixed;
  font-size: .78rem; font-weight: 800; color: var(--muted); letter-spacing: 4px;
  background: var(--bg-soft); border-radius: 999px; padding: 16px 7px; align-self: center; white-space: nowrap;
}
.tree-nodes { display: flex; flex-wrap: wrap; gap: 22px; flex: 1; justify-content: center; }
.tree-node-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tree-couple { display: flex; align-items: stretch; gap: 12px; }
.tree-card {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 2px solid var(--border); border-radius: var(--radius); padding: 12px 16px 12px 12px;
  transition: all .2s; min-width: 180px;
}
.tree-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.tree-card-small { min-width: 0; padding: 8px 12px 8px 8px; }
.tree-avatar { position: relative; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.tree-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tree-card-small .tree-avatar { width: 40px; height: 40px; }
.tree-info { display: flex; flex-direction: column; }
.tree-name { font-weight: 800; font-size: .98rem; }
.tree-relation { color: var(--muted); font-size: .8rem; }
.tree-years { color: var(--muted); font-size: .76rem; }
.tree-spouse { display: flex; flex-direction: column; gap: 8px; }
.dead-mark {
  position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%;
  background: #6b7280; color: #fff; font-size: .7rem; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--card);
}
.dead-mark-lg {
  position: absolute; right: 2px; bottom: 2px; width: 30px; height: 30px; border-radius: 50%;
  background: #6b7280; color: #fff; font-size: .95rem; display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--card);
}
.node-dead .tree-card { border-color: #d1d5db; background: #f3f4f6; }
.node-dead .tree-name { color: #6b7280; }
.avatar-gray img, .avatar-gray { filter: grayscale(1); }
.dead-badge {
  position: absolute; top: -7px; right: -7px; background: #6b7280; color: #fff;
  font-size: .68rem; padding: 2px 8px; border-radius: 999px; font-weight: 700;
}
.tree-node { position: relative; }
.tree-connector { text-align: center; color: var(--border); padding: 4px 0; min-width: 640px; }

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.member-card {
  display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; transition: all .2s;
}
.member-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.member-dead { background: #f3f4f6; opacity: .82; }
.member-dead .member-name { color: #6b7280; }
.member-avatar { position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-info { min-width: 0; }
.member-name { font-weight: 800; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.member-sub { color: var(--muted); font-size: .82rem; }
.member-years { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.gray-text { color: #6b7280; }
.admin-shortcut { text-align: center; margin: 26px 0 10px; }

.badge { display: inline-block; font-size: .72rem; padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); font-weight: 700; }
.badge-ok { background: #dcfce7; color: #16a34a; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-dead { background: #e5e7eb; color: #4b5563; }
.badge-vip { background: #fef3c7; color: #b45309; }
.badge-private { background: #fee2e2; color: #dc2626; }

/* ---------- 成员详情 ---------- */
.member-detail { padding-top: 22px; }
.member-hero {
  display: flex; gap: 24px; align-items: center; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; flex-wrap: wrap;
}
.hero-dead { background: #f3f4f6; }
.member-hero-avatar { position: relative; width: 120px; height: 120px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.member-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-hero-info { flex: 1; min-width: 260px; }
.member-hero-name { font-size: 1.6rem; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.member-hero-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; margin: 10px 0; }
.member-bio { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 12px 16px; font-size: .93rem; }
.member-rel { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.rel-group h3 { font-size: 1rem; font-weight: 800; margin-bottom: 10px; }
.rel-row { display: flex; gap: 12px; flex-wrap: wrap; }
.rel-card {
  display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 999px;
  box-shadow: var(--shadow); padding: 7px 16px 7px 7px; font-weight: 600; font-size: .9rem;
}
.rel-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.rel-card.member-dead { background: #f3f4f6; color: #6b7280; }

/* ---------- 标签云 ---------- */
.tag-cloud-wrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.tag-group-title { font-size: 1.05rem; font-weight: 800; margin: 8px 0 14px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.cloud-tag {
  padding: 5px 15px; border-radius: 999px; background: var(--bg-soft); color: var(--text);
  font-weight: 600; transition: all .2s;
}
.cloud-tag:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.cloud-tag.active { background: var(--primary); color: #fff; }
.cloud-family { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.cloud-cnt { opacity: .7; font-size: .8em; }

/* ---------- 个人中心 ---------- */
.profile-head { display: flex; align-items: center; gap: 20px; padding: 30px 0 20px; flex-wrap: wrap; }
.profile-avatar { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.mini-list { list-style: none; display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.mini-list li a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--radius-sm); color: var(--text); font-size: .9rem; }
.mini-list li a:hover { background: var(--bg-soft); }
.mini-type { flex-shrink: 0; }
.mini-date { margin-left: auto; color: var(--muted); font-size: .78rem; }

/* ---------- 提示 ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 14px 0; font-size: .92rem; }
.alert-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state p { margin-bottom: 16px; }
.mt-16 { margin-top: 16px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 24px 0; }
.page-btn { padding: 7px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .9rem; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-info { color: var(--muted); font-size: .88rem; }

/* ---------- 底部 ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 26px 0; margin-top: 40px; text-align: center; font-size: .88rem; }
.footer-menu { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 12px; }
.footer-menu a { color: var(--footer-text); font-size: .88rem; }
.footer-menu a:hover { color: #fff; }
.footer-icp { margin-top: 6px; font-size: .82rem; opacity: .85; }
.footer-icp a { color: inherit; }
.footer-icp a:hover { color: #fff; }

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed; right: 18px; bottom: 26px; z-index: 950;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff;
  font-size: 1.25rem; box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 40%, transparent);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s;
  display: flex; align-items: center; justify-content: center;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-2px); }
.video-page .back-top { display: none; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center; flex-direction: column; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 78vh; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox-tools { display: flex; gap: 14px; margin-top: 18px; }
.lightbox-close {
  position: absolute; top: 18px; right: 24px; background: none; border: none; color: #fff;
  font-size: 2rem; cursor: pointer; line-height: 1;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .masonry { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-inner { gap: 10px; padding-top: 8px; padding-bottom: 8px; position: relative; }
  .nav-toggle { display: flex; }
  .header-user { display: none; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 520;
    background: var(--header-bg); border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(0,0,0,.12); flex-direction: column; align-items: stretch;
    padding: 8px 16px 14px; gap: 2px; flex: none;
  }
  .main-nav.open { display: flex; }
  .nav-item { padding: 12px 14px; border-radius: 10px; font-size: .98rem; }
  .nav-user {
    display: flex; flex-direction: column; gap: 9px; margin-top: 8px; padding: 12px 14px 4px;
    border-top: 1px solid var(--border);
  }
  .nav-user-head { display: flex; align-items: center; gap: 9px; }
  .nav-user .btn-block { justify-content: center; }
  .masonry { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .masonry-item { margin-bottom: 12px; }
  .post-head, .post-body { padding: 18px 16px 0; }
  .post-actions { padding: 12px 16px 18px; }
  .comments-card { padding: 18px 16px; }
  .member-hero { padding: 20px; }
  .douyin-feed, .dy-item { height: calc(100vh - 108px); }
  .dy-info { right: 70px; }
}
@media (max-width: 480px) {
  .masonry { grid-template-columns: repeat(2, 1fr); }
  .mode-btn { padding: 7px 14px; font-size: .88rem; }
  .view-lock-box { padding: 30px 22px; }
}

/* ---------- 视频模式：满屏抖音风格 ---------- */
.video-page .site-header, .video-page .site-notice, .video-page .home-toolbar, .video-page .cat-filter, .video-page .year-filter, .video-page .site-footer { display: none !important; }
.video-page .site-main { padding-bottom: 0; }
.video-page .container { padding: 0; }
.video-page .douyin-feed { height: 100vh; height: 100dvh; margin: 0; scroll-snap-type: y mandatory; }
.video-page .dy-item { height: 100vh; height: 100dvh; scroll-snap-align: start; }
.dy-mode-float {
  position: fixed; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  z-index: 900; display: flex; gap: 6px; background: rgba(10, 12, 16, .6);
  border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 5px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.dy-mode-float .mode-btn {
  background: rgba(255,255,255,.16); color: #fff; opacity: 1; font-weight: 700;
  border-radius: 999px; padding: 6px 14px; border: 1px solid rgba(255,255,255,.28);
}
.dy-mode-float .mode-btn:hover { background: rgba(255,255,255,.3); }
.dy-mode-float .mode-btn.active { background: #fff; color: #111; border-color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.dy-year-wrap { position: relative; }
.dy-year-pop {
  display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: rgba(8, 10, 14, .93); border: 1px solid rgba(255,255,255,.35);
  border-radius: 14px; padding: 8px; min-width: 112px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.dy-year-pop.open { display: flex; flex-direction: column; gap: 3px; }
.dy-year-item {
  display: block; padding: 8px 14px; border-radius: 9px; color: #fff;
  font-size: .9rem; font-weight: 700; text-align: center; white-space: nowrap;
}
.dy-year-item:hover { background: rgba(255,255,255,.22); }
.dy-year-item.active { background: #f59e0b; color: #fff; }
.dy-item { touch-action: pan-y; }
.dy-info { bottom: max(24px, env(safe-area-inset-bottom)); }
.dy-sidebar { bottom: max(64px, env(safe-area-inset-bottom) + 40px); }

/* ---------- 手机端布局修复 ---------- */
.home-toolbar { flex-wrap: wrap; }
@media (max-width: 640px) {
  .home-toolbar { flex-direction: row; align-items: center; gap: 10px; flex-wrap: nowrap; }
  .mode-switch { align-self: flex-start; }
  .cat-filter { display: none; }
  .year-filter { flex: 1; min-width: 0; margin-left: 0; }
  .year-label { flex-shrink: 0; }
  .year-form { flex: 1; min-width: 0; display: flex; }
  .year-select { flex: 1; min-width: 0; max-width: none; width: 100%; }
  .home-search { flex: none; }
  .search-pop { right: 0; left: auto; min-width: 0; width: min(78vw, 340px); }
  .post-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .member-hero { flex-direction: column; align-items: flex-start; }
  .member-hero-avatar { width: 96px; height: 96px; }
  .profile-head { flex-direction: column; align-items: flex-start; }
  .comment-form { flex-direction: column; }
  .dy-title { font-size: 1.05rem; }
  .dy-username { font-size: .92rem; }
  .dy-act-icon { font-size: 1.7rem; }
  .dy-sidebar { right: 10px; }
  .view-lock-box { padding: 28px 20px; }
  .masonry { grid-template-columns: 1fr; }
  .masonry-img { object-fit: cover; }
  .back-top { right: 12px; bottom: 18px; width: 42px; height: 42px; }
}
@media (max-width: 400px) {
  .logo-text { font-size: 1rem; }
  .header-user .btn { padding: 5px 11px; }
  .masonry { gap: 9px; }
  .masonry-item { margin-bottom: 9px; }
}
/* 视频转码中占位 */
.transcoding-box{display:flex;align-items:center;justify-content:center;gap:12px;min-height:120px;background:rgba(127,127,127,.08);border-radius:14px;margin:12px 0;padding:20px;text-align:center}
.transcoding-text{color:var(--text2,#888);font-size:14px}
.transcoding-spinner{width:20px;height:20px;border:2px solid rgba(127,127,127,.25);border-top-color:#5b8cff;border-radius:50%;animation:tc-spin 1s linear infinite;flex:0 0 auto}
.dy-transcoding{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:rgba(0,0,0,.45);color:#fff;font-size:13px;z-index:5;backdrop-filter:blur(2px)}
.dy-transcoding .transcoding-spinner{width:28px;height:28px;border-color:rgba(255,255,255,.3);border-top-color:#fff}
@keyframes tc-spin{to{transform:rotate(360deg)}}

/* 灯箱左右切换按钮 */
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; border: none;
  font-size: 2rem; line-height: 1; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox-nav:hover { background: rgba(0,0,0,.75); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
@media (max-width: 640px) { .lightbox-nav { width: 40px; height: 40px; font-size: 1.6rem; } }
/* 视频页隐藏滚动条 */
#douyinFeed, .douyin-feed { scrollbar-width: none; -ms-overflow-style: none; }
#douyinFeed::-webkit-scrollbar, .douyin-feed::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* 家谱树移动端自适应（不横向超宽） */
@media (max-width: 640px) {
  .family-tree { padding: 14px 10px; overflow-x: visible; }
  .tree-row { min-width: 0; flex-direction: column; gap: 10px; }
  .tree-gen-label {
    writing-mode: horizontal-tb; text-orientation: mixed;
    padding: 4px 12px; letter-spacing: 2px; align-self: flex-start;
  }
  .tree-nodes { gap: 12px; justify-content: flex-start; width: 100%; }
  .tree-node-wrap { width: 100%; }
  .tree-couple { flex-direction: column; gap: 8px; width: 100%; }
  .tree-card { min-width: 0; width: 100%; box-sizing: border-box; }
  .tree-spouse { width: 100%; }
  .tree-connector { min-width: 0; }
}
/* 未登录访客头像模糊 */
.tree-avatar.guest-blur img, .member-hero-avatar.guest-blur img { filter: blur(10px); }
.rel-avatar.guest-blur { filter: blur(10px); }
.tree-avatar.guest-blur::after {
  content: ""; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; background: rgba(255,255,255,.15);
}
details.tree-row { display: block; }
details.tree-row > summary.tree-gen-label {
  cursor: pointer; list-style: none; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
}
details.tree-row > summary.tree-gen-label::-webkit-details-marker { display: none; }
.tree-fold-arrow { transition: transform .2s; font-size: .7rem; }
details.tree-row:not([open]) .tree-fold-arrow { transform: rotate(-90deg); }
details.tree-row[open] .tree-fold-arrow { transform: rotate(0); }
details.tree-row > .tree-nodes { margin-top: 12px; }
/* 登录/注册弹窗 */
.auth-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 20px; }
.auth-modal.open { display: flex; }
.auth-modal-box { position: relative; background: var(--card,#fff); border-radius: 16px; padding: 28px 24px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: fdCardIn .25s ease; }
.auth-modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: #999; line-height: 1; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tab { flex: 1; padding: 9px; border: none; background: var(--bg-soft,#f3f4f6); border-radius: 10px; cursor: pointer; font-weight: 700; color: #888; }
.auth-tab.active { background: var(--primary,#5b8def); color: #fff; }
.auth-modal-msg { min-height: 22px; margin-bottom: 10px; font-size: .9rem; }
.auth-modal-msg.err { color: #dc2626; }
.auth-modal-msg.ok { color: #16a34a; }
.auth-modal .form-field input { width: 100%; }
.menu-hide { display:inline-flex; align-items:center; gap:4px; font-size:.82rem; color:#888; white-space:nowrap; cursor:pointer; }
.menu-hide input { margin:0; }
/* ===== 酷炫进场动画 ===== */
.fd-boot {
  position: fixed; inset: 0; z-index: 99999;
  background: radial-gradient(circle at 50% 40%, #1a2332 0%, #0b0f16 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s;
}
.fd-boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.fd-boot-inner { text-align: center; }
.fd-boot-logo {
  width: 92px; height: 92px; margin: 0 auto 22px;
  border-radius: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 900; color: #fff; letter-spacing: 2px;
  background: linear-gradient(135deg, #5b8def, #7b2cbf);
  box-shadow: 0 0 0 0 rgba(91,141,239,.6);
  animation: fdBootLogo 1.1s cubic-bezier(.2,.8,.2,1) both, fdBootGlow 1.6s ease-in-out infinite;
}
@keyframes fdBootLogo {
  0% { transform: scale(.3) rotate(-12deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
@keyframes fdBootGlow {
  0%,100% { box-shadow: 0 0 30px rgba(91,141,239,.5), 0 0 60px rgba(123,44,191,.3); }
  50% { box-shadow: 0 0 50px rgba(91,141,239,.9), 0 0 100px rgba(123,44,191,.6); }
}
.fd-boot-bar {
  width: 180px; height: 3px; margin: 0 auto 14px; border-radius: 3px;
  background: rgba(255,255,255,.12); overflow: hidden;
}
.fd-boot-bar span {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, #5b8def, #00e5ff);
  border-radius: 3px;
  animation: fdBootSlide 1.1s ease-in-out infinite;
}
@keyframes fdBootSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(360%); }
}
.fd-boot-tip { color: rgba(255,255,255,.55); font-size: .85rem; letter-spacing: 3px; }
/* 内容入场 */
body.booted .site-main { animation: fdContentIn .7s ease both; }
@keyframes fdContentIn {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fd-boot { display: none !important; }
}
.logo-title {
  font-size: 1.5rem; font-weight: 900;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  margin-left: 10px; text-decoration: none; white-space: nowrap;
  background: linear-gradient(90deg, #8b0000, #e74c3c, #ff2e2e, #8b0000);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: fdTitleFlow 4s ease-in-out infinite, fdTitleBreath 2.2s ease-in-out infinite;
}
@keyframes fdTitleFlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes fdTitleBreath { 0%,100% { filter: drop-shadow(0 0 2px rgba(139,0,0,.3)); opacity: 1; transform: scale(1); } 50% { filter: drop-shadow(0 0 14px rgba(231,76,60,.85)); opacity: .8; transform: scale(1.04); } }
.logo-title:hover { color: var(--primary); }
/* 卡片浅浅倒影 */
.masonry-item { overflow: visible; }
.masonry-item .masonry-link { border-radius: var(--radius); overflow: hidden; }
.masonry-item::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -14px; height: 14px;
  background: radial-gradient(ellipse at center, rgba(60,80,140,.18), rgba(60,80,140,0) 70%);
  filter: blur(5px); z-index: -1; pointer-events: none;
  transition: opacity .3s;
}
.masonry-item:hover::after { opacity: .5; }