/* ── CSS 变量 ─────────────────────────────────────── */
:root {
  --bg:          #0d0d0f;
  --bg-card:     #161618;
  --bg-header:   #111113;
  --bg-hover:    #1e1e21;
  --border:      #2a2a2e;
  --text:        #f0f0f2;
  --text-muted:  #9a9aa8;
  --text-light:  #636370;
  --accent:      #1abc9c;
  --accent-dark: #16a085;
  --accent-glow: rgba(26,188,156,.18);
  --hot:         #ff2374;
  --hot-bg:      rgba(255,35,116,.12);
  --tag-bg:      #1e1e21;
  --tag-text:    #c0c0cc;
  --radius:      12px;
  --radius-sm:   6px;
  --shadow:      0 4px 20px rgba(0,0,0,.55);
  --shadow-card: 0 8px 18px rgba(0,0,0,.56);
  --max-width:   1200px;
  --font:        -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 60px; /* 给底部导航留空间 */
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

/* ── Container ───────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 12px; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0; }

/* ═══════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════ */
.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  height: 54px;
  gap: 12px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-img {
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  flex-shrink: 0;
  display: block;
}
.logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.3px;
}
.logo-slogan {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 400;
  white-space: nowrap;
}

/* 搜索框 */
.header-search {
  flex: 1;
  max-width: 380px;
  position: relative;
  margin-left: auto;
}
.header-search-input {
  width: 100%;
  height: 34px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0 36px 0 12px;
  border-radius: 17px;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
  font-family: var(--font);
}
.header-search-input::placeholder { color: var(--text-light); }
.header-search-input:focus { border-color: var(--accent); }
.header-search-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center;
  padding: 0;
}
.header-search-btn svg { margin: 0; width: 15px; height: 15px; }

/* 移动端搜索按钮（仅小屏显示） */
.search-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: none; justify-content: center; align-items: center;
  transition: all .2s; flex-shrink: 0;
}
.search-btn svg { margin: 0; width: 15px; height: 15px; }
.search-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ═══════════════════════════════════════════════════
   分类导航
═══════════════════════════════════════════════════ */
.category-nav {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 54px;
  z-index: 190;
}
.category-nav .container {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 12px;
  height: 46px;
  align-items: center;
}
.category-nav .container::-webkit-scrollbar { display: none; }
.cat-link {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all .2s;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.cat-link:hover { color: var(--text); background: var(--bg-hover); }
.cat-link.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════
   顶部横幅广告
═══════════════════════════════════════════════════ */
.global-top-ad { margin: 12px 0; }
.ad-banner-wrapper { width: 100%; margin: 12px 0; grid-column: 1 / -1; }
.ad-carousel {
  width: 100%; height: 80px;
  border-radius: 8px; overflow: hidden;
  position: relative; background: var(--bg-hover);
  border: 1px solid var(--border);
}
.ad-slide { display: none; width: 100%; height: 100%; }
.ad-slide.active { display: block; }
.ad-banner {
  width: 100%; height: 80px;
  border-radius: 8px; overflow: hidden;
  position: relative; border: 1px solid var(--border);
}
.ad-banner:hover { opacity: 0.92; }
.ad-carousel-dots { display: flex; gap: 5px; justify-content: center; margin-top: 6px; }
.ad-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border); cursor: pointer; }
.ad-dot.active { background: var(--accent); }
.ad-link-img { display: block; width: 100%; height: 100%; }
.ad-img-bg { width: 100%; height: 100%; object-fit: cover; }
.ad-badge-minimal {
  position: absolute; top: 5px; right: 5px;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  color: #fff; font-size: 9px; font-weight: 600;
  padding: 2px 5px; border-radius: 3px;
  border: 1px solid rgba(255,255,255,.1);
}

/* ═══════════════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════════════ */
.site-main { padding: 0 0 20px; }
.layout-main { max-width: var(--max-width); }

/* 排序栏 */
.sort-bar {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.sort-btn {
  padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); background: var(--bg-card);
  border: 1px solid var(--border); transition: all .2s;
}
.sort-btn:hover { color: var(--text); border-color: var(--text-muted); }
.sort-btn.active {
  color: #fff; background: var(--accent);
  border-color: var(--accent);
}
.total-count { margin-left: auto; font-size: 12px; color: var(--text-light); }

/* ═══════════════════════════════════════════════════
   卡片列表 - 双列瀑布流
═══════════════════════════════════════════════════ */
.post-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ═══════════════════════════════════════════════════
   CARD
═══════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  overflow: hidden;
  position: relative;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
  transform: translateY(-2px);
}
.card-link { display: flex; flex-direction: column; }

/* 封面图 */
.card-img-wrap {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-hover);
  overflow: hidden;
}
.card-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.card:hover .card-img { transform: scale(1.04); }
.card-img-placeholder { width: 100%; height: 100%; background: var(--bg-hover); }

/* 分类角标 */
.card-badge {
  position: absolute; top: 7px; left: 7px;
  background: var(--accent);
  color: #fff; font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px;
  letter-spacing: 0.2px;
}

/* HOT 角标 */
.card-hot {
  position: absolute; top: 7px; right: 7px;
  background: var(--hot);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  letter-spacing: 0.5px;
  animation: hotPulse 2s ease-in-out infinite;
}
@keyframes hotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .75; }
}

/* 播放遮罩 */
.card-play-icon {
  position: absolute; bottom: 8px; right: 8px;
  width: 28px; height: 28px;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.card-play-icon svg { margin: 0; width: 12px; height: 12px; color: #fff; margin-left: 2px; }

/* 卡片内容区 */
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.card-title {
  font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card:hover .card-title { color: #fff; }

/* 标签 */
.card-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.card-tag {
  font-size: 11px; color: var(--accent);
  background: var(--accent-glow);
  padding: 1px 6px; border-radius: 3px;
}

/* 底部 meta */
.card-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--text-light);
}
.card-meta-item { display: flex; align-items: center; gap: 3px; }
.card-meta-item svg { margin: 0; width: 11px; height: 11px; flex-shrink: 0; }
.card-date { margin-left: auto; }
.card-views { color: var(--text-muted); }
.card-comments { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════
   列表广告插入（与普通卡片并排同尺寸）
═══════════════════════════════════════════════════ */
.ad-card { opacity: .95; }
.ad-card:hover { opacity: 1; }
.ad-mark {
  background: rgba(245,158,11,.15) !important;
  color: #f59e0b !important;
  font-size: 9px !important;
}
.ad-placeholder-inner {
  display: flex; align-items: center; justify-content: center; height: 60px;
  background: var(--bg-hover); border-radius: var(--radius);
  border: 1px dashed var(--border);
}
.ad-slot-label {
  font-size: 12px; color: var(--text-light);
  padding: 5px 12px; border-radius: 4px;
  border: 1px dashed var(--border);
}
.ad-placeholder { height: 70px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-hover); border-radius: 8px; border: 1px dashed var(--border); }
.ad-placeholder-text { color: var(--text-light); font-size: 12px; }
.ad-card-secondary { }
/* 手机端单列布局下隐藏第二条插入广告，避免两条广告竖向堆叠 */
@media (max-width: 640px) { .ad-card-secondary { display: none; } }

/* 广告角标（合规 + 信任）——右上浮层，不拦截点击 */
.ad-card { position: relative; }
.ad-card::before {
  content: "广告";
  position: absolute; top: 6px; right: 6px; z-index: 2;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 10px; padding: 2px 6px; border-radius: 3px;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   POST DETAIL
═══════════════════════════════════════════════════ */
.post-detail { max-width: 820px; margin: 28px auto 0; }
.post-header { margin-bottom: 24px; }
.post-title { font-size: 22px; font-weight: 800; line-height: 1.4; margin-bottom: 14px; letter-spacing: -0.3px; }
.post-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.post-meta span { display: flex; align-items: center; gap: 4px; }
.post-meta svg { margin: 0; width: 13px; height: 13px; }

.post-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.tag {
  font-size: 12px; color: var(--accent);
  background: var(--accent-glow); padding: 4px 12px;
  border-radius: 20px; border: 1px solid rgba(26,188,156,.25);
  transition: background .2s;
}
.tag:hover { background: rgba(26,188,156,.25); }

.post-cover { margin: 24px 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.post-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* 文章页上下横幅广告（尺寸与列表页顶部轮播一致：80px 高）*/
.article-banner { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.article-banner-item {
  display: block; width: 100%; height: 80px;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-hover);
  transition: opacity .2s;
}
.article-banner-item:hover { opacity: .92; }
.article-banner-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-banner-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: 13px;
}

.post-content { font-size: 15px; line-height: 1.85; color: #dddde8; word-break: break-word; }
.post-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 20px 0; border: 1px solid var(--border); }
.post-content p { margin-bottom: 16px; }
.post-content h2 { font-size: 18px; font-weight: 700; margin: 32px 0 16px; color: #fff; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.post-content video,
.post-content iframe {
  width: 100%; max-width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm); margin: 20px 0;
  border: 1px solid var(--border); display: block; background: #000;
}

/* ═══════════════════════════════════════════════════
   相关推荐（图标方块）
═══════════════════════════════════════════════════ */
.related-posts { margin: 48px auto 0; max-width: 820px; border-top: 1px solid var(--border); padding-top: 32px; }
.related-title { font-size: 14px; font-weight: 700; margin-bottom: 18px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.icon-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.related-icon-item { display: flex; flex-direction: column; align-items: center; width: 76px; gap: 8px; }
.squircle-icon {
  width: 76px; height: 76px; border-radius: 20%;
  overflow: hidden; background: var(--bg-card);
  border: 1px solid var(--border); transition: transform .2s;
  display: flex; align-items: center; justify-content: center;
}
.related-icon-item:hover .squircle-icon { transform: scale(1.06); border-color: var(--accent); }
.squircle-icon img { width: 100%; height: 100%; object-fit: cover; }
.squircle-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1a1e, #2a2a2e); color: var(--text-light);
}
.related-icon-title {
  font-size: 11px; line-height: 1.3; color: var(--text-muted);
  text-align: center; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; width: 100%;
}
.related-icon-item:hover .related-icon-title { color: var(--accent); }

/* ═══════════════════════════════════════════════════
   评论
═══════════════════════════════════════════════════ */
.comments-section { margin: 36px auto 0; border-top: 1px solid var(--border); padding-top: 32px; max-width: 820px; }
.comments-title { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.comment-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 12px; flex-wrap: wrap; }
.comment-floor { color: var(--text-muted); }
.comment-user { color: var(--accent); font-weight: 600; }
.comment-reply-to {
  color: var(--text-light); font-size: 11px;
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 1px 8px; border-radius: 10px;
}
.comment-reply-to em { font-style: normal; color: var(--accent); font-weight: 600; }
.comment-time { color: var(--text-light); margin-left: auto; }
.comment-likes { color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 3px; }
.comment-body { font-size: 14px; line-height: 1.6; color: var(--text-muted); padding-left: 20px; word-break: break-word; }
.comment-collapsed { display: none !important; }
/* 嵌套回复：左侧细线 + 缩进 + 浅底色，最多到第 3 级 */
.comment-reply {
  position: relative;
  border-bottom: none;
  border-left: 2px solid var(--border);
  background: linear-gradient(90deg, var(--accent-glow, rgba(26,188,156,0.04)) 0%, transparent 60%);
  padding: 12px 12px 12px 14px;
  margin-top: 4px;
  border-radius: 0 8px 8px 0;
}
.comment-reply.depth-1 { border-left-color: var(--accent); }
.comment-reply.depth-2 { border-left-color: rgba(255,35,118,0.6); }
.comment-reply.depth-3 { border-left-color: var(--text-light); }
.comment-reply .comment-body { padding-left: 0; font-size: 13.5px; }
.comment-reply .comment-floor { font-size: 11px; opacity: .65; }
@media (max-width: 640px) {
  /* 移动端缩进减半，避免内容挤压 */
  .comment-item.depth-1 { margin-left: 14px !important; }
  .comment-item.depth-2 { margin-left: 28px !important; }
  .comment-item.depth-3 { margin-left: 42px !important; }
}
.comments-expand-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 20px; margin-top: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-muted);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all .2s; font-family: var(--font);
}
.comments-expand-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.comments-expand-btn .expand-arrow { transition: transform .3s; }
.comments-expand-btn:hover .expand-arrow { transform: translateY(2px); }

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.site-footer {
  margin-top: 60px; padding: 32px 0 20px;
  border-top: 1px solid var(--border); background: var(--bg-header);
}
.footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; font-weight: 500; color: var(--text-muted); transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { text-align: center; font-size: 11px; color: var(--text-light); }

/* ═══════════════════════════════════════════════════
   手机底部导航栏
═══════════════════════════════════════════════════ */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px; background: var(--bg-header);
  border-top: 1px solid var(--border);
  z-index: 300;
  padding: 0 8px;
}
.mobile-nav-inner {
  max-width: 480px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-around;
  height: 100%;
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; color: var(--text-light); font-size: 10px;
  padding: 6px 12px; border-radius: 8px;
  transition: color .2s; flex: 1;
}
.mobile-nav-item svg { width: 20px; height: 20px; margin: 0; }
.mobile-nav-item.active { color: var(--accent); }
.mobile-nav-item:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════
   分页
═══════════════════════════════════════════════════ */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 32px; padding: 14px 0;
}
.page-btn {
  padding: 6px 18px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; color: var(--text-muted); transition: all .2s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 5px;
  font-size: 13px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 5px;
  background: var(--bg-card); transition: all .2s;
}
.page-num:hover { border-color: var(--accent); color: var(--accent); }
.page-num.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.page-dots { color: var(--text-muted); font-size: 14px; padding: 0 2px; }

/* ═══════════════════════════════════════════════════
   页面标题
═══════════════════════════════════════════════════ */
.page-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.page-title { font-size: 18px; font-weight: 700; }
.page-title::before {
  content: '';
  display: inline-block; width: 3px; height: 18px;
  background: var(--accent); border-radius: 2px;
  margin-right: 8px; vertical-align: middle;
}
.page-count { font-size: 12px; color: var(--text-light); }
.page-h1 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════
   搜索页
═══════════════════════════════════════════════════ */
.search-bar { border-top: 1px solid var(--border); background: var(--bg); padding: 10px 0; }
.search-bar .header-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 12px; display: flex; align-items: center; gap: 8px; }
.search-input {
  flex: 1; background: var(--bg-hover); border: 1px solid var(--border);
  color: var(--text); padding: 8px 14px; border-radius: 8px;
  font-size: 14px; outline: none; transition: border-color .2s; font-family: var(--font);
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-light); }
.search-submit {
  background: var(--accent); color: #fff; border: none;
  padding: 8px 18px; border-radius: 8px; cursor: pointer;
  font-weight: 600; font-size: 13px; transition: background .2s;
  font-family: var(--font); flex-shrink: 0;
}
.search-submit:hover { background: var(--accent-dark); }
.search-page { max-width: 960px; margin: 0 auto; padding-top: 6px; }
.search-page-bar { display: flex; gap: 10px; margin-bottom: 14px; }
.search-page-bar .search-input { flex: 1; font-size: 14px; }
.search-page-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
mark { background: rgba(26,188,156,.2); color: var(--accent); border-radius: 2px; padding: 0 2px; }

/* ═══════════════════════════════════════════════════
   热搜排行
═══════════════════════════════════════════════════ */
.hot-tags-section { margin: 6px 0 28px; }
.hot-tags-title { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.hot-tags-list { display: flex; flex-direction: column; }
.hot-tag-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  color: var(--text); transition: background .2s; cursor: pointer;
}
.hot-tag-item:first-child { border-top: 1px solid var(--border); }
.hot-tag-item:hover { background: var(--bg-hover); }
.hot-tag-rank {
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  background: var(--bg-hover); border-radius: 4px; flex-shrink: 0;
}
.hot-tag-rank.top3 { background: var(--hot); color: #fff; }
.hot-tag-name { font-size: 13px; font-weight: 500; }
.hot-tag-item:hover .hot-tag-name { color: var(--accent); }

/* ═══════════════════════════════════════════════════
   广告：文章内文字广告
═══════════════════════════════════════════════════ */
.post-text-ad-bar { display: flex; flex-direction: column; gap: 5px; margin: 10px 0 18px; }
.post-text-ad-link {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--bg-hover); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 6px;
  color: var(--text); font-size: 13px; transition: background .15s;
}
.post-text-ad-link:hover { background: var(--bg-card); border-left-color: var(--hot); }
.post-text-ad-badge {
  font-size: 9px; font-weight: 700; padding: 2px 4px; border-radius: 3px;
  background: rgba(245,158,11,.15); color: #f59e0b; flex-shrink: 0; letter-spacing: .5px;
}
.post-text-ad-content { flex: 1; }
.post-text-ad-arrow { color: var(--text-muted); font-size: 12px; }
.post-text-ad-placeholder { pointer-events: none; opacity: .3; }

/* ═══════════════════════════════════════════════════
   弹窗广告
═══════════════════════════════════════════════════ */
.ad-popup-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.8);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
}
/* 通用 box（九宫格用） */
.ad-popup-box {
  position: relative; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 14px;
  max-width: min(340px, calc(100vw - 32px));
  width: 100%; padding: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
  animation: popupIn .22s ease;
}
/* 单图 box：不加背景/边距，按图片原尺寸显示 */
.ad-popup-box-single {
  max-width: none; width: auto; padding: 0;
  background: transparent; border: none; box-shadow: none;
}
@keyframes popupIn { from { opacity:0; transform:scale(.92) translateY(12px); } to { opacity:1; transform:none; } }
/* 关闭按钮：盒内右上，单图则外露到图片角外，不被裁 */
.ad-popup-close {
  position: absolute; top: 10px; right: 12px;
  background: var(--bg-hover); border: 1px solid var(--border);
  color: var(--text-muted); width: 28px; height: 28px;
  border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.ad-popup-close:hover { background: var(--border); color: var(--text); }
.ad-popup-box-single .ad-popup-close {
  top: -12px; right: -12px;
  background: rgba(0,0,0,.8); border-color: rgba(255,255,255,.25); color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.ad-popup-single { display: block; line-height: 0; }
/* 单图：按图片原尺寸显示，超出 viewport 时按比例缩放 */
.ad-popup-img {
  display: block;
  width: auto; height: auto;
  max-width: min(600px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  border-radius: 10px;
  object-fit: contain;
}
.ad-popup-box-single .ad-popup-footer { border-top: none; justify-content: center; }
.ad-popup-box-single .ad-popup-skip { color: rgba(255,255,255,.6); border-color: rgba(255,255,255,.2); }
.ad-popup-box-single .ad-popup-ad-badge { display: none; }
.ad-popup-grid-title { font-size: 13px; font-weight: 600; text-align: center; margin-bottom: 12px; color: var(--text); }
.ad-popup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.ad-popup-grid-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 4px; background: var(--bg-hover); border-radius: 8px;
  color: var(--text); transition: background .15s;
}
.ad-popup-grid-item:hover { background: var(--border); }
.ad-popup-grid-icon { width: 50px; height: 50px; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--bg-card); }
.ad-popup-grid-icon img { width: 100%; height: 100%; object-fit: cover; }
.ad-popup-grid-label { font-size: 10px; text-align: center; color: var(--text-muted); line-height: 1.3; max-width: 56px; word-break: break-all; }
.ad-popup-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.ad-popup-skip {
  background: none; border: 1px solid var(--border); color: var(--text-muted);
  padding: 4px 14px; border-radius: 5px; cursor: pointer; font-size: 12px; transition: all .15s;
}
.ad-popup-skip:hover { border-color: var(--accent); color: var(--accent); }
.ad-popup-ad-badge { font-size: 10px; color: var(--text-muted); background: var(--bg-hover); padding: 2px 7px; border-radius: 4px; }

/* ═══════════════════════════════════════════════════
   Icon Banner（详情页 - 按分组分行，每行最多 8 个方形图标）
═══════════════════════════════════════════════════ */
.icon-banner-section { margin: 24px 0 0; display: flex; flex-direction: column; gap: 22px; }
.icon-banner-group { display: flex; flex-direction: column; gap: 12px; }
.icon-banner-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 2px;
}
.icon-banner-flame { font-size: 16px; }
.icon-banner-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.icon-banner-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; transition: transform .2s;
  min-width: 0;
}
.icon-banner-item:hover { transform: translateY(-2px); }
.icon-banner-icon {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 14px;
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-hover), var(--bg-card));
  border: 1px solid var(--border);
  transition: border-color .2s, box-shadow .2s;
}
.icon-banner-icon img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.icon-banner-icon .icon-emoji {
  font-size: 30px; line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}
.icon-banner-item:hover .icon-banner-icon {
  border-color: var(--accent);
  box-shadow: 0 6px 14px rgba(26,188,156,.25);
}
.icon-banner-label {
  font-size: 12px; color: var(--text-muted); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%; text-align: center;
}
.icon-banner-item:hover .icon-banner-label { color: var(--accent); }
.icon-banner-placeholder { opacity: .35; pointer-events: none; }

/* ═══════════════════════════════════════════════════
   一键分享按钮（视频/正文下方）
═══════════════════════════════════════════════════ */
.post-share-bar {
  display: flex; justify-content: center;
  margin: 22px 0 8px;
}
.share-main-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 36px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: .5px;
  border: none; cursor: pointer;
  box-shadow: 0 6px 20px rgba(26,188,156,.35);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.share-main-btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 10px 26px rgba(26,188,156,.5); }
.share-main-btn:active { transform: translateY(0); }
.share-main-btn svg { stroke: #fff; }

/* ═══════════════════════════════════════════════════
   分享卡片弹窗
═══════════════════════════════════════════════════ */
.share-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s, visibility .25s;
}
.share-modal.open {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.share-card {
  position: relative;
  width: 100%; max-width: 420px;
  background: linear-gradient(165deg, #1a1a1f 0%, #15151a 60%, #111115 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 28px 24px 20px;
  box-shadow: 0 30px 60px rgba(0,0,0,.7), 0 0 0 1px rgba(26,188,156,.15);
  transform: translateY(24px) scale(.96);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2);
  overflow: hidden;
}
.share-modal.open .share-card { transform: translateY(0) scale(1); }
.share-card::before {
  content: ''; position: absolute; top: -40%; right: -30%;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(26,188,156,.28), transparent 70%);
  pointer-events: none;
}
.share-card::after {
  content: ''; position: absolute; bottom: -40%; left: -30%;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,35,116,.18), transparent 70%);
  pointer-events: none;
}
.share-card > * { position: relative; z-index: 1; }
.share-card-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  z-index: 2;
}
.share-card-close:hover { background: rgba(255,255,255,.12); color: #fff; }

.share-card-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.share-card-badge {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(26,188,156,.4);
}
.share-card-title {
  font-size: 18px; font-weight: 800; color: #fff;
  margin: 0 0 4px; letter-spacing: -.3px;
}
.share-card-subtitle {
  font-size: 12px; color: var(--text-muted); margin: 0;
}

.share-card-preview {
  display: flex; gap: 12px; align-items: stretch;
  padding: 12px; margin-bottom: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
}
.share-card-preview-text { padding: 16px; }
.share-card-cover {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: 8px; object-fit: cover;
}
.share-card-preview-body {
  display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0; flex: 1;
}
.share-card-post-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.share-card-site {
  font-size: 11px; color: var(--accent); margin-top: 6px;
}

.share-card-link-row {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.share-card-url {
  flex: 1; min-width: 0;
  padding: 10px 14px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  color: var(--text-muted); font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  outline: none;
  transition: border-color .15s;
}
.share-card-url:focus { border-color: var(--accent); color: var(--text); }
.share-card-copy-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 12px rgba(26,188,156,.3);
  transition: filter .15s, transform .15s, background .2s;
}
.share-card-copy-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.share-card-copy-btn.copied { background: #10b981; }
.share-card-copy-btn svg { stroke: #fff; }

.share-card-foot {
  text-align: center; font-size: 11px; color: var(--text-light);
  margin: 8px 0 0; letter-spacing: .3px;
}

@media (max-width: 480px) {
  .share-card { padding: 22px 18px 16px; border-radius: 16px; }
  .share-card-head { gap: 10px; margin-bottom: 16px; }
  .share-card-badge { width: 40px; height: 40px; border-radius: 12px; }
  .share-card-title { font-size: 16px; }
  .share-card-cover { width: 60px; height: 60px; }
}

/* ═══════════════════════════════════════════════════
   上一篇 / 下一篇
═══════════════════════════════════════════════════ */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; margin: 24px 0 0;
  background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.post-nav-col {
  padding: 16px 20px; display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.post-nav-next { border-right: 1px solid var(--border); }
.post-nav-prev { text-align: right; }
.post-nav-label { font-size: 12px; color: var(--text-light); }
.post-nav-link {
  font-size: 14px; color: var(--text); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-nav-link:hover { color: var(--accent); }
.post-nav-empty { font-size: 13px; color: var(--text-light); }

/* ═══════════════════════════════════════════════════
   版权声明
═══════════════════════════════════════════════════ */
.post-copyright {
  margin: 20px 0 0; padding: 16px 0;
  border-top: 1px dashed var(--border);
  font-size: 13px; line-height: 1.85; color: var(--text-muted);
}
.post-copyright p { margin: 0 0 10px; }
.post-copyright p:last-child { margin-bottom: 0; }
.post-copyright a { color: var(--accent); word-break: break-all; }
.post-copyright a:hover { text-decoration: underline; }
.copyright-notice { color: var(--text-light); }

/* ═══════════════════════════════════════════════════
   面包屑 / 空状态
═══════════════════════════════════════════════════ */
.breadcrumb { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-light); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border); }
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state p { font-size: 14px; margin-bottom: 18px; }
.btn-back { display: inline-block; padding: 7px 18px; background: var(--accent); color: #fff; border-radius: 6px; font-size: 13px; font-weight: 600; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (min-width: 960px) {
  .post-list { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .header-search { display: flex; }
  .search-btn { display: none; }
}
@media (max-width: 959px) and (min-width: 641px) {
  .post-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .header-search { display: flex; }
  .search-btn { display: none; }
}
@media (max-width: 640px) {
  body { padding-bottom: 64px; }
  .post-list { grid-template-columns: 1fr; gap: 10px; }
  .header-search { display: none; }
  .search-btn { display: flex; }
  .logo-slogan { display: none; }
  .card-title { font-size: 12px; }
  .card-body { padding: 8px 8px 10px; gap: 5px; }
  .post-title { font-size: 18px; }
  .icon-banner-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .icon-banner-icon { border-radius: 12px; }
  .icon-banner-icon .icon-emoji { font-size: 26px; }
  .icon-banner-label { font-size: 11px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { border-right: none; border-bottom: 1px solid var(--border); }
  .post-nav-prev { text-align: left; }
  .mobile-nav { display: block; }
  .search-page-bar { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════
   社交图标（Header）
═══════════════════════════════════════════════════ */
.header-social {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: 4px;
}
.header-social-link {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all .2s;
}
.header-social-link:hover { color: var(--accent); background: var(--accent-glow); }
.header-social-link svg { width: 16px; height: 16px; margin: 0; }
@media (max-width: 640px) {
  .header-social { display: none; }
}

/* ═══════════════════════════════════════════════════
   卡片改进：阴影 / 圆角 / 懒加载渐显
═══════════════════════════════════════════════════ */
.card {
  box-shadow: var(--shadow-card);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0,0,0,.7);
}
.card-author { color: var(--text-light); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
img.lazy-img { opacity: 0; transition: opacity .35s ease; }
img.lazy-img.loaded { opacity: 1; }

/* ═══════════════════════════════════════════════════
   Hero Banner（首页 / 分类页顶部）
═══════════════════════════════════════════════════ */
.hero-banner {
  position: relative;
  width: 100%;
  min-height: 180px;
  background: linear-gradient(135deg, #0d1f1a 0%, #0d0d0f 100%);
  background-size: cover;
  background-position: center;
  margin: 12px 0 20px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; align-items: center;
  border: 1px solid var(--border);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.45) 100%);
  z-index: 1;
}
.hero-inner {
  position: relative; z-index: 2;
  padding: 28px 32px;
  width: 100%;
}
.hero-title {
  font-size: 26px; font-weight: 800; color: #fff;
  letter-spacing: -0.5px; margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}
.hero-subtitle {
  font-size: 14px; color: rgba(255,255,255,.7);
  margin-bottom: 20px;
}
.hero-search {
  display: flex; align-items: center; gap: 0;
  max-width: 480px;
}
.hero-search-input {
  flex: 1; height: 42px;
  background: rgba(255,255,255,.12); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-right: none;
  color: #fff; padding: 0 16px;
  border-radius: 21px 0 0 21px;
  font-size: 14px; outline: none;
  transition: border-color .2s; font-family: var(--font);
}
.hero-search-input::placeholder { color: rgba(255,255,255,.5); }
.hero-search-input:focus { border-color: var(--accent); }
.hero-search-btn {
  height: 42px; padding: 0 20px;
  background: var(--accent); border: none; border-radius: 0 21px 21px 0;
  color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: background .2s; flex-shrink: 0; font-family: var(--font);
}
.hero-search-btn:hover { background: var(--accent-dark); }
.hero-search-btn svg { width: 16px; height: 16px; margin: 0; }
@media (max-width: 640px) {
  .hero-banner { min-height: 130px; margin: 8px 0 14px; }
  .hero-inner { padding: 18px 16px; }
  .hero-title { font-size: 18px; }
  .hero-subtitle { font-size: 12px; margin-bottom: 14px; }
  .hero-search { max-width: 100%; }
  .hero-search-input { height: 36px; font-size: 13px; }
  .hero-search-btn { height: 36px; padding: 0 14px; font-size: 13px; }
  .hero-search-btn span { display: none; }
}

/* ═══════════════════════════════════════════════════
   多栏 Footer
═══════════════════════════════════════════════════ */
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 32px 12px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.footer-brand-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.footer-brand-row .logo-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
}
.footer-brand-row .logo-icon svg { width: 15px; height: 15px; margin: 0; color: #fff; }
.footer-brand-row .logo-text { font-size: 16px; font-weight: 800; color: var(--accent); }
.footer-slogan { font-size: 12px; color: var(--text-light); line-height: 1.5; }
.footer-col-title { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col-list { display: flex; flex-direction: column; gap: 8px; }
.footer-col-list a { font-size: 13px; color: var(--text-muted); transition: color .2s; }
.footer-col-list a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-hover); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all .2s;
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-glow); }
.footer-social a svg { width: 16px; height: 16px; margin: 0; }
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 20px; padding: 20px 12px 16px; }
}
@media (max-width: 959px) and (min-width: 641px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ═══════════════════════════════════════════════════
   下载浮条
═══════════════════════════════════════════════════ */
.download-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
  background: var(--bg-header); border-top: 1px solid var(--border);
  transform: translateY(100%);
  transition: transform .3s ease;
  display: block !important;
}
.download-bar.visible { transform: translateY(0); }
.download-bar-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
}
.download-bar-icon { flex-shrink: 0; }
.download-bar-icon svg { width: 22px; height: 22px; margin: 0; color: var(--accent); display: block; }
.download-bar-text { flex: 1; font-size: 13px; color: var(--text-muted); }
.download-bar-btn {
  flex-shrink: 0; background: var(--accent); color: #fff; border: none;
  padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .2s; font-family: var(--font);
}
.download-bar-btn:hover { background: var(--accent-dark); }
.download-bar-close {
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--bg-hover); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.download-bar-close:hover { color: var(--text); background: var(--border); }
.download-bar-close svg { width: 12px; height: 12px; margin: 0; }
@media (max-width: 640px) {
  /* 移动端：下载条在底部导航之上 */
  .download-bar { bottom: 56px; }
  .download-bar-text { display: none; }
}

/* ═══════════════════════════════════════════════════
   返回顶部按钮
═══════════════════════════════════════════════════ */
.back-to-top {
  position: fixed; right: 20px; bottom: 80px; z-index: 350;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
  opacity: 0; pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, border-color .2s, color .2s;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { border-color: var(--accent); color: var(--accent); }
.back-to-top svg { width: 18px; height: 18px; margin: 0; }
@media (max-width: 640px) {
  .back-to-top { right: 12px; bottom: 120px; width: 36px; height: 36px; }
}

/* ═══════════════════════════════════════════════════
   分页跳转框
═══════════════════════════════════════════════════ */
.page-jump {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted); margin-left: 8px;
}
.page-jump-input {
  width: 52px; height: 34px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 5px; color: var(--text); font-size: 13px;
  outline: none; transition: border-color .2s; font-family: var(--font);
  -moz-appearance: textfield;
}
.page-jump-input::-webkit-inner-spin-button,
.page-jump-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.page-jump-input:focus { border-color: var(--accent); }
.page-jump-btn {
  height: 34px; padding: 0 12px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 5px; cursor: pointer; font-size: 12px;
  font-weight: 600; transition: background .2s; font-family: var(--font);
}
.page-jump-btn:hover { background: var(--accent-dark); }
/* 移动端：分页单独成行，跳转框也显示 */
@media (max-width: 640px) {
  .pagination { flex-wrap: wrap; gap: 6px; }
  .page-jump { margin-left: 0; width: 100%; justify-content: center; margin-top: 4px; }
  .page-jump-input { width: 46px; height: 32px; }
  .page-jump-btn { height: 32px; padding: 0 10px; }
}

/* ═══════════════════════════════════════════════════
   弹窗 4×5 网格覆盖（对标参考站应用推荐）
═══════════════════════════════════════════════════ */
.ad-popup-grid-4col {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
@media (max-width: 480px) {
  .ad-popup-grid-4col { grid-template-columns: repeat(3, 1fr); }
}

/* ═══════════════════════════════════════════════════
   详情页 post-meta-bar（含分享）
═══════════════════════════════════════════════════ */
.post-meta-bar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 0;
}
.post-meta-bar .post-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: var(--text-muted); flex-wrap: wrap;
}
.post-meta-bar .post-meta span,
.post-meta-bar .post-meta time {
  display: flex; align-items: center; gap: 4px;
}
.post-meta-bar .post-meta svg { margin: 0; }
.meta-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
/* 分享按钮组 */
.post-share { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.share-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border); background: var(--bg-hover);
  color: var(--text-muted); cursor: pointer; transition: all .2s;
  text-decoration: none; font-family: var(--font);
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.share-btn svg { margin: 0; flex-shrink: 0; }
/* 复制成功 toast */
.copy-toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: rgba(26,188,156,.95); color: #fff; padding: 8px 20px;
  border-radius: 20px; font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity .25s, transform .25s;
  z-index: 9998; pointer-events: none; white-space: nowrap;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════════════
   搜索页热搜 Chip 风格
═══════════════════════════════════════════════════ */
.hot-tags-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px;
}
.hot-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  background: var(--bg-hover); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .2s; font-family: var(--font);
}
.hot-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.hot-chip-top { border-color: rgba(255,35,116,.3); color: var(--hot); background: var(--hot-bg); }
.hot-chip-top:hover { background: rgba(255,35,116,.2); }
.hot-chip-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 4px;
  background: var(--bg-card); font-size: 10px; font-weight: 700;
  color: var(--text-light); flex-shrink: 0;
}
.hot-chip-top .hot-chip-rank { background: var(--hot); color: #fff; }

/* ═══════════════════════════════════════════════════
   广告链接：文字装饰 / 颜色一致（防止被局部样式覆盖）
═══════════════════════════════════════════════════ */
.ad-link-img,
.article-banner-item,
.icon-banner-item,
.ad-popup-grid-item,
.post-text-ad-link,
.ad-popup-single {
  text-decoration: none;
  color: inherit;
}

/* 文章 banner hover 反馈（若尚未定义 transform/transition） */
.article-banner-item {
  transition: transform .15s, opacity .2s;
}
.article-banner-item:hover { transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════
   广告响应式微调
═══════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .ad-banner-wrapper { margin: 8px 0 10px; }
}
@media (max-width: 480px) {
  .ad-popup-overlay { padding: 16px; }
  .ad-popup-img { max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); }
  /* 手机端空间小，单图关闭按钮挪到图片内右上角避免被屏幕切 */
  .ad-popup-box-single .ad-popup-close { top: 6px; right: 6px; }
}

/* ═══════════════════════════════════════════════════
   尊重用户减少动效偏好
═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .ad-carousel,
  .ad-slide,
  .article-banner-item,
  .card,
  .icon-banner-item {
    transition: none !important;
    animation: none !important;
  }
  .card:hover,
  .article-banner-item:hover,
  .icon-banner-item:hover {
    transform: none !important;
  }
}

/* ── UI chevron (统一右指向细箭头，避免 AI 感) ── */
.ui-chevron {
  display: inline-block;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: .4;
  transition: opacity .2s, transform .2s;
  flex-shrink: 0;
}
.ui-chevron--left { transform: scaleX(-1); }
.ui-chevron--sm { width: 12px; height: 12px; }

/* 父容器 hover 时 chevron 激活 */
a:hover > .ui-chevron,
button:hover > .ui-chevron,
.line:hover .ui-chevron,
.card:hover .ui-chevron {
  opacity: 1;
  transform: translateX(3px);
}
a:hover > .ui-chevron--left,
.btn-back:hover > .ui-chevron--left {
  transform: scaleX(-1) translateX(3px);
}

/* ── 评论 0 态 UX（避免 gls603 类低评论帖看起来像死站）── */
.meta-comments--empty { opacity: .45; }
.meta-comments--empty svg { stroke-width: 1.5; }

.comments-title .count { color: var(--text-muted); font-weight: 400; font-size: 14px; margin-left: 6px; }
.comments-title .count--empty { color: var(--text-light); }

.no-comments {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px; color: var(--text-light);
  gap: 10px; text-align: center;
}
.no-comments p { margin: 0; font-size: 13px; }
