/* 咖游视觉打磨 v1.0.0
   首页/列表暗夜模式适配 + 移动端体验打磨。
   独立文件 + 版本号入队，避免 CDN 缓存旧样式。
   设计基线：与 post-layout.css 的 sidebar 暗夜风格一致（去容器感、低对比、青蓝点缀）。 */

/* ===== 暗夜模式：首页/列表卡片（可见容器 + 微妙分隔） ===== */
.dark-theme .posts-item,
.dark-theme .card,
.dark-theme .post-card,
.dark-theme .theme-card,
.dark-theme .list-box {
  background: rgba(30,41,59,.6) !important;
  border: 1px solid rgba(71,85,105,.35) !important;
  box-shadow: none !important;
}
.dark-theme .posts-item:hover,
.dark-theme .card:hover,
.dark-theme .post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47,161,79,.45) !important;
  box-shadow: 0 12px 28px rgba(15,23,42,.25) !important;
}
/* 卡片文字 暗夜可读 */
.dark-theme .item-heading a,
.dark-theme .posts-item .item-heading > a { color: #e2e8f0 !important; }
.dark-theme .item-excerpt,
.dark-theme .muted-color,
.dark-theme .muted-2-color,
.dark-theme .meta-time { color: #94a3b8 !important; }
/* 分类/状态胶囊 暗夜 */
.dark-theme .item-tags a,
.dark-theme .item-tags .tag,
.dark-theme .item-tags span {
  background: rgba(14,165,233,.16) !important;
  color: #7dd3fc !important;
  border-color: transparent !important;
}
/* 卡片内 .but（免费资源等）暗夜：去亮蓝/亮黄刺眼，与 sidebar 一致 */
.dark-theme .posts-item .but,
.dark-theme .item-tags a.meta-pay.but {
  background: rgba(51,65,85,.5) !important;
  color: #94a3b8 !important;
  border-color: rgba(71,85,105,.2) !important;
}
.dark-theme .posts-item .but:hover {
  background: rgba(71,85,105,.6) !important;
  color: #cbd5e1 !important;
}

/* ===== 顶栏/导航 暗夜 ===== */
.dark-theme .header,
.dark-theme header {
  background: rgba(15,23,42,.82) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.dark-theme .nav.navbar-nav > li > a,
.dark-theme .menu-item > a,
.dark-theme .navbar-nav > li > a { color: #cbd5e1 !important; }
.dark-theme .navbar-form .form-control,
.dark-theme .search-input .line-form-input {
  background: rgba(30,41,59,.6) !important;
  color: #e2e8f0 !important;
  border-color: rgba(71,85,105,.3) !important;
}
.dark-theme .navbar-toggle,
.dark-theme .toggle-theme { color: #cbd5e1 !important; }

/* ===== Footer 暗夜（深色底，与页面融合） ===== */
.dark-theme footer,
.dark-theme .site-footer,
.dark-theme .footer,
.dark-theme #colophon {
  background: rgba(15,23,42,.75) !important;
  color: #94a3b8 !important;
  border-top: 1px solid rgba(71,85,105,.2) !important;
}
.dark-theme footer a,
.dark-theme .site-footer a { color: #7dd3fc !important; }
/* Footer 内免责声明暗夜适配 */
.dark-theme .kauiu-disclaimer { color: #64748b !important; }
.dark-theme .kauiu-disclaimer .dc-mid { color: #94a3b8 !important; }

/* ===== 移动端打磨 ===== */
@media (max-width: 768px) {
  /* 卡片封面比例锁定，防拉伸变形 */
  .posts-item .item-thumbnail { aspect-ratio: 16 / 9; overflow: hidden; }
  .posts-item .item-thumbnail img,
  .posts-item img.fit-cover { width: 100%; height: 100%; object-fit: cover; }
  /* 标题字号克制，行间舒适 */
  .item-heading { font-size: 16px; line-height: 1.4; margin: 0 0 6px; }
  /* 触摸目标：菜单/搜索按钮 ≥44px */
  .navbar-toggle,
  .main-search-btn.navbar-toggle { min-width: 44px; min-height: 44px; }
  /* hero 搜索框移动端字号 ≥16px（防 iOS 自动缩放） */
  .header-slider-search .line-form-input,
  .header-slider-search .scale-placeholder { font-size: 16px !important; }
}
@media (max-width: 640px) {
  /* hero 高度收敛，避免大图占满首屏 */
  .new-swiper { --m-height: 200px !important; --pc-height: 320px !important; }
  .header-slider-search-more div[style*="font-size"] { font-size: 30px !important; }
  /* 卡片网格已单列，补间距节奏 */
  .posts-row { gap: 14px; }
}

/* =====================================================================
   浅色模式（默认访客看到的就是浅色）视觉打磨
   设计基线：卡片去生硬边框、品牌绿 #2fa14f 点缀、统一缩略图比例。
   ===================================================================== */

/* ===== 首页/列表卡片现代化 ===== */
.white-theme .posts-item,
.white-theme .card,
.white-theme .post-card,
.white-theme .theme-card,
.white-theme .list-box {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .07);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
  overflow: hidden;
  transition: transform .28s cubic-bezier(.22, .61, .36, 1), box-shadow .28s ease, border-color .28s ease;
}
.white-theme .posts-item:hover,
.white-theme .card:hover,
.white-theme .post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
  border-color: rgba(47, 161, 79, .45);
}

/* 缩略图统一 16:9，防拉伸变形（桌面+移动通用） */
.posts-item .item-thumbnail { aspect-ratio: 16 / 9; overflow: hidden; }
.posts-item .item-thumbnail img,
.posts-item img.fit-cover { width: 100%; height: 100%; object-fit: cover; }

/* 分类/状态胶囊：品牌绿点缀 */
.white-theme .item-tags a,
.white-theme .item-tags .tag,
.white-theme .item-tags span {
  background: rgba(47, 161, 79, .12) !important;
  color: #1f7d3c !important;
  border-color: transparent !important;
}

/* 「免费资源」等 but 按钮：与品牌绿一致 */
.white-theme .posts-item .but,
.white-theme .item-tags a.meta-pay.but {
  background: rgba(47, 161, 79, .12) !important;
  color: #1f7d3c !important;
  border-color: transparent !important;
}
.white-theme .posts-item .but:hover {
  background: rgba(47, 161, 79, .2) !important;
  color: #14532d !important;
}

/* ===== 文章页排版打磨 ===== */
.white-theme .wp-posts-content {
  font-size: 16px;
  line-height: 1.85;
  color: #334155;
  letter-spacing: .01em;
}
.white-theme .wp-posts-content img {
  border-radius: 12px;
  margin: 20px auto;
  display: block;
  max-width: 100%;
  height: auto;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .08);
}
.white-theme .wp-posts-content h2,
.white-theme .wp-posts-content h3,
.white-theme .wp-posts-content h4 {
  margin: 1.6em 0 .7em;
  line-height: 1.3;
  color: #0f172a;
}
.white-theme .wp-posts-content h2 { font-size: 1.4em; }
.white-theme .wp-posts-content h3 { font-size: 1.2em; }
.white-theme .wp-posts-content p { margin: 0 0 1.1em; }
.white-theme .wp-posts-content blockquote {
  margin: 1.4em 0;
  padding: 14px 18px;
  border-left: 4px solid #2fa14f;
  background: #f4faf6;
  border-radius: 8px;
  color: #475569;
}
.white-theme .wp-posts-content a {
  color: #1f7d3c;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.white-theme .wp-posts-content a:hover { color: #2fa14f; }
.white-theme .wp-posts-content pre,
.white-theme .wp-posts-content code {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 2px 6px;
  font-size: .92em;
}
.white-theme .wp-posts-content pre { padding: 14px 16px; overflow-x: auto; }

/* ===== 首页大轮播 new-swiper 浅色打磨（圆角阴影统一卡片风、标题保清晰、箭头品牌绿） ===== */
.white-theme .header-slider-container {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(15, 23, 42, .12);
}
/* 收敛桌面高度：首屏更紧凑、露出更多卡片（移动端高度见下方媒体查询） */
.white-theme .new-swiper { --pc-height: 480px !important; }
/* 白色大标题加阴影，亮图上也清晰可读 */
.white-theme .header-slider-search-more.before > div {
  text-shadow: 0 2px 20px rgba(0, 0, 0, .6);
}
/* 左右箭头：品牌绿圆形 */
.white-theme .new-swiper .swiper-button-prev,
.white-theme .new-swiper .swiper-button-next {
  width: 42px;
  height: 42px;
  background: rgba(47, 161, 79, .9);
  border-radius: 50%;
  color: #fff;
  transition: background .2s ease, transform .2s ease;
}
.white-theme .new-swiper .swiper-button-prev:hover,
.white-theme .new-swiper .swiper-button-next:hover { background: #2fa14f; transform: scale(1.08); }
/* 分页圆点：激活态品牌绿 */
.white-theme .new-swiper .swiper-pagination-bullet-active { background: #2fa14f; }

/* ===== 文章页下载按钮统一品牌绿（原 zibll 默认蓝，与全站调性一致） ===== */
.white-theme .pay-box .but.b-theme,
.white-theme .posts-zibpay .but.b-theme {
  background: #2fa14f !important;
  border-color: #2fa14f !important;
  color: #fff !important;
}
.white-theme .pay-box .but.b-theme:hover,
.white-theme .posts-zibpay .but.b-theme:hover {
  background: #27913f !important;
  border-color: #27913f !important;
}

/* ===== Footer 浅色打磨（浅灰底，与页面自然衔接） ===== */
.white-theme footer,
.white-theme .site-footer {
  background: #f8fafc !important;
  color: #64748b !important;
  border-top: 1px solid rgba(15, 23, 42, .08) !important;
}
.white-theme footer a,
.white-theme .site-footer a { color: #475569 !important; }
.white-theme footer a:hover,
.white-theme .site-footer a:hover { color: #2fa14f !important; }
.white-theme footer .container,
.white-theme .site-footer .container { padding-top: 32px; padding-bottom: 32px; }

/* ===== 全局微交互：链接/按钮平滑过渡 + 焦点环 ===== */
a, .but, button { transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease, opacity .2s ease; }
:focus-visible { outline: 2px solid rgba(47, 161, 79, .55); outline-offset: 2px; }

/* ===== Footer 免责声明：三段式，中间段居中 ===== */
.kauiu-disclaimer { margin: 4px 0 8px; }
.kauiu-disclaimer p { margin: 0 0 8px; font-size: 13px; line-height: 1.75; }
.kauiu-disclaimer p:last-child { margin-bottom: 0; }
.kauiu-disclaimer .dc-top { font-weight: 600; }
.kauiu-disclaimer .dc-mid { text-align: center; }
.kauiu-disclaimer .dc-bottom { font-size: 12.5px; }
.kauiu-disclaimer a { color: #2fa14f !important; text-decoration: underline; text-underline-offset: 2px; }

/* 浅色模式：footer 浅灰底，免责声明用中灰字 */
.white-theme .kauiu-disclaimer p { color: #64748b; }
.white-theme .kauiu-disclaimer .dc-top { color: #475569; }
.white-theme .kauiu-disclaimer .dc-mid { color: #475569; }

/* 暗色模式：footer 深底，免责声明用浅色字 */
.dark-theme .kauiu-disclaimer p { color: rgba(255, 255, 255, .58); }
.dark-theme .kauiu-disclaimer .dc-top { color: rgba(255, 255, 255, .82); }
.dark-theme .kauiu-disclaimer .dc-mid { color: rgba(255, 255, 255, .72); }
