/* ==========================================================================
 * DyingInTheSun · 独立页面 / 分类 / 视频 / 专题 / 标签云 / 文章资源卡 布局增强
 * 参考 ripro.rizhuti.com 的卡片化、蓝紫渐变、清晰信息层级风格
 * 本文件在 header.php 最后加载，保证覆盖同级规则
 * ========================================================================== */

/* ---------- 通用页面头部横幅（ripro 风格蓝紫渐变） ---------- */
.hh-page-hero {
  position: relative;
  margin: 0 0 1.25rem;
  padding: 2.6rem 0 2.4rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 52%, #8b5cf6 100%);
  overflow: hidden;
}
.hh-page-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  background: linear-gradient(to top, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.hh-page-hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: .5px;
  text-shadow: 0 2px 10px rgba(15, 23, 42, .25);
}
.hh-page-hero-sub {
  position: relative;
  z-index: 1;
  margin: .5rem 0 0;
  font-size: .95rem;
  opacity: .92;
}

/* ---------- 通用页面卡片 ---------- */
.hh-page-card {
  border: 1px solid var(--border-color-main);
  border-radius: var(--border-radius-large);
  background: var(--bg-color-main);
  box-shadow: var(--shadow-box-small);
}
.hh-page-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--font-color-main);
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--border-color-main);
}
.hh-page-card-title .iconfont { color: var(--color-primary); }
.hh-page-card-count { font-size: .8rem; font-weight: 500; color: var(--font-color-muted); }

/* ---------- 标签云（大号，对应 ripro tags/） ---------- */
.tag-cloud-lg {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  line-height: 2.1;
}
.tag-cloud-lg .tag-item {
  display: inline-flex;
  align-items: baseline;
  gap: .2rem;
  padding: .28rem .85rem;
  font-weight: 600;
  color: var(--font-color-main);
  background: var(--bg-color-secondary);
  border: 1px solid var(--border-color-main);
  border-radius: 999px;
  text-decoration: none;
  transition: all .22s ease;
}
.tag-cloud-lg .tag-item:hover {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 111, 245, .28);
}
.tag-cloud-lg .hh-tag-count {
  font-size: .68em;
  font-weight: 700;
  color: var(--color-primary);
  opacity: .85;
}
.tag-cloud-lg .tag-item:hover .hh-tag-count { color: #fff; opacity: .9; }

/* ---------- 专题合集（对应 ripro series/） ---------- */
.hh-series-grid { margin: 0 -.5rem; }
.hh-series-grid > [class*="col-"] { padding: 0 .5rem; }
.hh-series-card {
  display: block;
  margin-bottom: 1rem;
  border-radius: var(--border-radius-large);
  overflow: hidden;
  background: var(--bg-color-main);
  border: 1px solid var(--border-color-main);
  box-shadow: var(--shadow-box-small);
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease;
}
.hh-series-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(59, 111, 245, .18);
}
.hh-series-cover {
  position: relative;
  width: 100%;
  padding-top: 56%;
  overflow: hidden;
}
.hh-series-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.hh-series-card:hover .hh-series-cover img { transform: scale(1.06); }
.hh-series-count {
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  z-index: 1;
  padding: .15rem .6rem;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 23, 42, .62);
  border-radius: 999px;
  backdrop-filter: blur(2px);
}
.hh-series-body { padding: .7rem .85rem .85rem; }
.hh-series-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--font-color-main);
}
.hh-series-desc {
  margin-top: .25rem;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--font-color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 视频中心（对应 ripro mediasc） ---------- */
.hh-video-grid { margin: 0 -.5rem; }
.hh-video-grid > [class*="col-"] { padding: 0 .5rem; }
.hh-video-card {
  display: block;
  margin-bottom: 1rem;
  text-decoration: none;
  transition: transform .22s ease;
}
.hh-video-card:hover { transform: translateY(-3px); }
.hh-video-cover {
  position: relative;
  width: 100%;
  padding-top: 56%;
  overflow: hidden;
  border-radius: var(--border-radius-large);
  background: #0f172a;
  box-shadow: var(--shadow-box-small);
}
.hh-video-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease, opacity .3s ease;
}
.hh-video-card:hover .hh-video-cover img { transform: scale(1.05); opacity: .9; }
.hh-video-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  color: #fff;
  background: rgba(59, 111, 245, .92);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .35);
  transition: transform .2s ease, background .2s ease;
}
.hh-video-card:hover .hh-video-play { transform: translate(-50%, -50%) scale(1.08); background: #3b82f6; }
.hh-video-title {
  margin-top: .5rem;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--font-color-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hh-video-card:hover .hh-video-title { color: var(--color-primary); }
.hh-video-meta {
  display: flex;
  gap: .8rem;
  margin-top: .3rem;
  font-size: .76rem;
  color: var(--font-color-muted);
}
.hh-video-meta .iconfont { margin-right: .2rem; }

/* ---------- 分类页横幅（覆盖 style.min.css .category-box，ripro 风格） ---------- */
.card.category-box {
  border: none;
  border-radius: var(--border-radius-large);
  overflow: hidden;
  height: 13.5rem;
  box-shadow: var(--shadow-box-small);
}
.card.category-box .category-item {
  background: linear-gradient(to top, rgba(15, 23, 42, .85) 0%, rgba(15, 23, 42, .25) 55%, rgba(15, 23, 42, 0) 100%);
}
.card.category-box .category-info {
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  padding: 1.1rem 1.3rem;
}
.card.category-box .category-name {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(15, 23, 42, .4);
}
.card.category-box .category-desc {
  color: rgba(255, 255, 255, .9);
  font-weight: 500;
  margin-top: .35rem;
}

/* ---------- 文章页面包屑（ripro 风格：小号、蓝色链接、柔和分隔） ---------- */
.yyds-crumb {
  padding: .55rem .8rem;
  margin-bottom: 12px;
  border: 1px solid var(--border-color-main);
  border-radius: 999px;
  background: var(--bg-color-secondary);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--font-color-muted);
}
.yyds-crumb a { color: var(--color-primary); }
.yyds-crumb a:hover { color: #274bb0; text-decoration: underline; }
.yyds-crumb-sep {
  margin: 0 7px;
  font-style: normal;
  color: var(--border-color-strong, #cfd6e4);
}
.yyds-crumb-current { color: var(--font-color-main); font-weight: 600; }

/* ---------- 文章内视频框（ripro 风格：圆角 + 阴影 + 暗底） ---------- */
.post-content .video-box,
.markdown-body .video-box {
  position: relative;
  overflow: hidden;
  text-align: center;
  margin: 1.1rem auto;
  border-radius: var(--border-radius-large);
  background: #0f172a;
  box-shadow: var(--shadow-box-small);
  max-width: 880px;
}
.post-content .video-box .video-content,
.markdown-body .video-box .video-content {
  width: 100%;
  max-height: 70vh;
  border-radius: var(--border-radius-large);
  background: #000;
  display: block;
}

/* ---------- 侧边栏资源下载卡（ripro 风格白卡 + 蓝紫渐变头） ---------- */
.sidebar-download.hh-widget {
  background-image: none;
  background-color: var(--bg-color-main);
  border: 1px solid var(--border-color-main);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-box-small);
  overflow: hidden;
}
.sidebar-download.hh-widget .download-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: .75rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}
.sidebar-download.hh-widget .download-title::before { display: none; }
.sidebar-download.hh-widget .download-buttons { padding: .9rem 1rem 1.1rem; }

/* 智能粘性侧边栏：内容高于视口时内部滚动，下载卡常驻顶部、底部信息可达 */
.main-sidebar .sidebar-sticky {
  max-height: calc(100vh - 88px - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.main-sidebar .sidebar-sticky::-webkit-scrollbar { width: 6px; }
.main-sidebar .sidebar-sticky::-webkit-scrollbar-thumb {
  background: var(--border-color-main);
  border-radius: 3px;
}
@media (max-width: 991.98px) {
  .main-sidebar .sidebar-sticky { max-height: none; overflow: visible; }
}

/* 资源信息（解压密码/分类/标签）小字 */
.resource-info {
  margin-top: .9rem;
  padding-top: .8rem;
  border-top: 1px dashed var(--border-color-main);
}
.resource-info-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--font-color-main);
  margin-bottom: .4rem;
}
.resource-info-list { display: grid; gap: .2rem; }
.resource-info-item {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: .6rem;
  font-size: .78rem;
  align-items: baseline;
}
.resource-info-item .ri-key { color: var(--font-color-muted); }
.resource-info-item .ri-val {
  color: var(--font-color-main);
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 锁定封面：价格徽标（ripro 风格大号蓝价） */
.hh-dl-cover-price {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  color: #ef4444;
  text-shadow: 0 2px 8px rgba(239, 68, 68, .22);
}
.hh-dl-cover-coupon {
  font-size: 12px;
  font-weight: 600;
  color: #f59e0b;
}

/* ---------- [hide] 付费隐藏内容遮罩（对应 ripro 付费内容） ---------- */
.hh-hide-box {
  position: relative;
  margin: 1.1rem 0;
  padding: 1.4rem 1.2rem;
  border: 1px dashed var(--color-primary);
  border-radius: var(--border-radius-large);
  background: var(--bg-color-secondary);
  overflow: hidden;
  text-align: center;
}
.hh-hide-preview {
  font-size: .9rem;
  line-height: 1.7;
  color: var(--font-color-muted);
}
.hh-hide-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
}
.hh-hide-ico { font-size: 1.6rem; line-height: 1; }
.hh-hide-title { font-size: 1.05rem; font-weight: 700; color: var(--font-color-main); }
.hh-hide-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ef4444;
}
.hh-hide-btn {
  margin-top: .3rem;
  padding: .55rem 1.6rem;
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  box-shadow: 0 6px 16px rgba(59, 111, 245, .3);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hh-hide-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(59, 111, 245, .4); }

/* ---------- 暗色模式微调 ---------- */
:root[data-theme=dark] .hh-page-hero::after {
  background: linear-gradient(to top, var(--bg-color-body), rgba(255, 255, 255, 0));
}
:root[data-theme=dark] .tag-cloud-lg .tag-item { background: var(--bg-color-secondary); }

/* ---------- 文章页 Hero v2（源码猫式：蓝底面包屑 + 白色资源信息卡） ---------- */
.yyds-post-hero.hh-hero-v2 {
  display: block;
  align-items: initial;
  padding: 1rem 0 1.6rem;
}
/* 白字面包屑 */
.hh-hero-crumb {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .15rem;
  margin-bottom: .8rem;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .82);
}
.hh-hero-crumb a { color: rgba(255, 255, 255, .92); }
.hh-hero-crumb a:hover { color: #fff; text-decoration: underline; }
.hh-hero-crumb-sep { font-style: normal; margin: 0 .2rem; opacity: .7; }
.hh-hero-crumb-current { color: #fff; }

/* 资源信息白卡 */
.hh-hero-card {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1.1rem;
  padding: 1rem;
  background: var(--bg-color-main);
  border-radius: var(--border-radius-large);
  box-shadow: 0 8px 28px rgba(15, 35, 95, .18);
}
.hh-hero-cover {
  flex: 0 0 268px;
  max-width: 268px;
  align-self: flex-start;
}
.hh-hero-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--border-radius-medium);
  background: var(--bg-color-secondary);
}
.hh-hero-cover-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 100%;
  aspect-ratio: 16 / 10;
  color: var(--font-color-muted);
  font-size: .8rem;
  border-radius: var(--border-radius-medium);
  background: var(--bg-color-secondary);
}
.hh-hero-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.hh-hero-title {
  margin: 0 0 .55rem;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--font-color-main);
  word-break: break-word;
}
.hh-hero-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .55rem;
}
.hh-hero-badge {
  display: inline-block;
  padding: .12rem .5rem;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 999px;
  color: var(--color-primary);
  background: var(--color-primary-light-5, #eaf1fe);
}
.hh-hero-badge:hover { text-decoration: none; opacity: .85; }
.hh-hero-badge.hh-badge-free { color: #0e9f6e; background: rgba(16, 185, 129, .12); }
.hh-hero-badge.hh-badge-pay { color: #ef4444; background: rgba(239, 68, 68, .1); }
.hh-hero-badge.hh-badge-encrypt { color: #f59e0b; background: rgba(245, 158, 11, .12); }
.hh-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .9rem;
  margin-bottom: .6rem;
  font-size: 12px;
  color: var(--font-color-main-light);
}
.hh-hero-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.hh-hero-meta svg { opacity: .75; }

/* 价格行 */
.hh-hero-price {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin: auto 0 .7rem;
}
.hh-hero-price-num {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  color: #ef4444;
}
.hh-hero-price-tip {
  font-size: .74rem;
  font-weight: 600;
  color: #f59e0b;
}
.hh-hero-price-free {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.15;
  color: #10b981;
}

/* 按钮行 */
.hh-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
}
.hh-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .48rem 1rem;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  border-radius: var(--border-radius-base);
  text-decoration: none;
  transition: filter .18s ease, transform .18s ease, box-shadow .18s ease;
}
.hh-hero-btn:hover { color: #fff; text-decoration: none; filter: brightness(1.08); transform: translateY(-1px); }
.hh-btn-dl { background: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%); box-shadow: 0 4px 14px rgba(239, 68, 68, .3); }
.hh-btn-demo { background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%); box-shadow: 0 4px 14px rgba(245, 158, 11, .28); }
.hh-btn-vip { background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%); box-shadow: 0 4px 14px rgba(59, 130, 246, .28); }
.hh-btn-report { color: var(--font-color-main); background: var(--bg-color-secondary); border: 1px solid var(--border-color-main); box-shadow: none; }
.hh-btn-report:hover { color: var(--color-primary); }

/* ---------- 正文 Tab 锚点导航（详情介绍/相关文章/发表评论） ---------- */
.hh-post-tabs {
  display: flex;
  align-items: stretch;
  gap: .25rem;
  margin: .5rem 0 .8rem;
  padding: .3rem;
  background: var(--bg-color-main);
  border: 1px solid var(--border-color-main);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-box-small);
  overflow-x: auto;
}
.hh-post-tabs .hh-tab {
  position: relative;
  flex: 0 0 auto;
  padding: .45rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--font-color-main-light);
  border-radius: var(--border-radius-base);
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
  white-space: nowrap;
}
.hh-post-tabs .hh-tab:hover { color: var(--color-primary); text-decoration: none; }
.hh-post-tabs .hh-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}

/* ---------- 响应式 ---------- */
@media (max-width: 767.98px) {
  .hh-hero-card { flex-direction: column; gap: .8rem; padding: .8rem; }
  .hh-hero-cover { flex: 0 0 auto; width: 100%; max-width: none; }
  .hh-hero-actions .hh-hero-btn { padding: .42rem .8rem; font-size: .82rem; }
  /* 窄屏：下载按钮允许拉满整行，其余按钮自然换行 */
  .hh-hero-actions .hh-btn-dl { max-width: none; }
}

/* ---------- 暗色模式 ---------- */
:root[data-theme=dark] .hh-hero-card { box-shadow: 0 8px 28px rgba(0, 0, 0, .45); }
:root[data-theme=dark] .hh-hero-badge { background: var(--bg-color-secondary); }
:root[data-theme=dark] .hh-hero-badge.hh-badge-free { color: #34d399; background: rgba(16, 185, 129, .14); }
:root[data-theme=dark] .hh-hero-badge.hh-badge-pay { color: #f87171; background: rgba(239, 68, 68, .16); }
:root[data-theme=dark] .hh-hero-badge.hh-badge-encrypt { color: #fbbf24; background: rgba(245, 158, 11, .16); }
:root[data-theme=dark] .hh-btn-report { color: var(--font-color-main-light); background: var(--bg-color-secondary); }

/* ---------- 文章 Hero：右下角大角标（免费 / 加密下载） ---------- */
.hh-hero-cover { position: relative; }
.hh-corner-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: .42rem 1.1rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  border-radius: 8px;
  transform: rotate(-7deg);
  box-shadow: 0 6px 16px rgba(15, 35, 95, .28);
  pointer-events: none;
}
.hh-corner-badge.is-free { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.hh-corner-badge.is-encrypt { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }

/* ---------- 文章 Hero：顶部下载区（点击下载 → 网盘+提取码 + 邮箱） ---------- */
/* 下载操作区：按钮行在上、展开面板在下（DOM 中面板在前，用 order 换位） */
.hh-hero-download { display: flex; flex-direction: column; margin: .5rem 0 .2rem; }
.hh-hero-download .hh-hero-actions { order: 1; }
.hh-hero-download .hh-dl-panel { order: 2; margin-top: .6rem; }
/* 「点击下载」与其他按钮同行，宽度约为其他按钮两倍 */
.hh-hero-actions .hh-btn-dl {
  flex: 1 1 auto;
  min-width: 8.8rem;
  max-width: 12rem;
  justify-content: center;
  font-size: .92rem;
}
.hh-dl-panel {
  margin-top: .7rem;
  padding: .85rem;
  border: 1px solid var(--border-color-main);
  border-radius: var(--border-radius-large);
  background: var(--bg-color-secondary);
}
.hh-dl-front {
  display: inline-block;
  margin-bottom: .55rem;
  padding: .15rem .6rem;
  font-size: .9rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%);
  border-radius: 6px;
}
.hh-dl-empty { font-size: .85rem; color: var(--font-color-muted); margin-bottom: .5rem; }
/* 加密模式：下载密码 + 邮箱验证门 */
.hh-dl-gate { margin-bottom: .2rem; }
.hh-dl-gate-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.hh-dl-gate-input {
  flex: 1 1 150px; min-width: 130px; height: 40px; padding: 0 .8rem;
  border: 1px solid var(--border-color-main); border-radius: var(--border-radius-base);
  background: var(--bg-color-main); color: var(--font-color-main);
  font-size: .88rem; outline: none;
}
.hh-dl-gate-input:focus { border-color: var(--color-primary); }
.hh-dl-gate-btn {
  flex: 0 0 auto; height: 40px; padding: 0 1.1rem; border: none; cursor: pointer;
  border-radius: var(--border-radius-base); color: #fff; font-weight: 600; font-size: .88rem;
  background: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%);
  transition: filter .18s ease, transform .18s ease;
}
.hh-dl-gate-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.hh-dl-gate-btn:disabled { opacity: .7; cursor: default; transform: none; }
.hh-dl-mail { display: flex; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }
.hh-dl-mail-input {
  flex: 1; min-width: 180px;
  height: 40px; padding: 0 .8rem;
  border: 1px solid var(--border-color-main); border-radius: var(--border-radius-base);
  background: var(--bg-color-main); color: var(--font-color-main);
  font-size: .88rem; outline: none;
}
.hh-dl-mail-input:focus { border-color: var(--color-primary); }
.hh-dl-mail-btn {
  height: 40px; padding: 0 1.1rem;
  border: none; border-radius: var(--border-radius-base); cursor: pointer;
  color: #fff; font-weight: 600; font-size: .88rem;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  transition: filter .18s ease, transform .18s ease;
}
.hh-dl-mail-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.hh-dl-mail-btn:disabled { opacity: .7; cursor: default; transform: none; }
.hh-dl-tip { margin: .55rem 0 0; font-size: .82rem; white-space: pre-line; color: var(--font-color-muted); }
.hh-dl-tip.is-show { color: var(--font-color-main); }
.hh-dl-tip.is-ok { color: #10b981; }
.hh-dl-tip.is-err { color: #ef4444; }

/* 通用网盘下载按钮（文章 Hero 下载区等，不依赖 .sidebar-download 容器） */
.download-buttons { display: flex; flex-direction: column; gap: .6rem; }
.download-buttons .cloud-download-btn {
  display: flex; align-items: stretch; width: 100%;
  border-radius: var(--border-radius-base); overflow: hidden;
  background: linear-gradient(135deg, #161616 0%, #2c2c2c 55%, #2A3A38 100%);
  border: 1px solid rgba(59, 111, 245, .35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25); text-decoration: none;
  transition: all .25s ease;
}
.download-buttons .cloud-download-btn:hover { border-color: rgba(59, 111, 245, .65); box-shadow: 0 4px 18px rgba(0, 0, 0, .35), 0 0 14px rgba(59, 111, 245, .18); }
.download-buttons .cloud-download-btn.cdb-full { align-items: center; color: #a8c4fb; font-weight: 600; font-size: .9rem; padding: .7rem .9rem; }
.download-buttons .cloud-download-btn .cdb-main { flex: 1; display: flex; align-items: center; padding: .7rem .9rem; color: #a8c4fb; font-weight: 600; font-size: .9rem; text-decoration: none; }
.download-buttons .cloud-download-btn .cdb-main:hover { color: #d2e0fd; }
.download-buttons .cloud-download-btn .cdb-pass { display: flex; align-items: center; padding: .7rem .9rem; color: #d2e0fd; font-size: .82rem; background: rgba(59, 111, 245, .12); border-left: 1px solid rgba(59, 111, 245, .4); cursor: pointer; white-space: nowrap; user-select: none; }

/* 资源反馈 / 网盘检测 按钮（灰色系） */
.hh-btn-check { color: var(--font-color-main); background: var(--bg-color-secondary); border: 1px solid var(--border-color-main); box-shadow: none; }
.hh-btn-check:hover { color: var(--color-primary); border-color: var(--color-primary); }
.hh-btn-disabled { opacity: .55; cursor: not-allowed; filter: grayscale(.4); }

/* ---------- 留言板页面 ---------- */
.hh-board-hero { margin-bottom: 1rem; padding: 1.8rem 0 1.6rem; }
.hh-board-hero::after { height: 48px; }
.hh-board-hero .hh-page-hero-title { font-size: 1.5rem; }

/* ---------- 资源反馈：公众号二维码弹窗 ---------- */
.hh-qr-modal { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center; }
.hh-qr-modal[hidden] { display: none; }
.hh-qr-modal-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.hh-qr-modal-box { position: relative; z-index: 1; width: min(92vw, 320px); background: var(--bg-color, #fff); color: var(--font-color-main, #1a1a1a); border: 1px solid var(--border-color-main, #e5e7eb); border-radius: 14px; padding: 1.4rem 1.2rem 1.5rem; text-align: center; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.hh-qr-modal-close { position: absolute; top: .35rem; right: .55rem; border: none; background: transparent; color: var(--font-color-muted, #8a8f98); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.hh-qr-modal-close:hover { color: var(--color-primary, #3b6ff5); }
.hh-qr-modal-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .9rem; }
.hh-qr-modal-img img { width: 200px; height: 200px; max-width: 100%; object-fit: contain; border-radius: 8px; background: #fff; padding: 6px; }
.hh-qr-modal-tip { margin-top: .8rem; font-size: .82rem; color: var(--main-muted-color1, #8a8f98); line-height: 1.5; }

/* ---------- 文章侧边栏「资源下载」容器（由正文顶部 Hero 迁移而来） ---------- */
.hh-sidebar-download .hh-hero-download { margin: 0; }
.hh-sidebar-download .hh-hero-actions { margin-top: 0; }
.hh-sidebar-download .hh-hero-actions .hh-btn-dl { width: 100%; max-width: none; }
.hh-sidebar-download .hh-dl-panel { margin-top: .6rem; }
