/* ==========================================================================
   Apple 设计风格 · 站点增强样式
   目标：卡片圆角、柔和阴影、留白节奏、SF 字体栈、克制的动效
   ========================================================================== */

/* ---------- Apple 字体栈 ---------- */
body,
.main-header,
.main-footer {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
    "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

/* ---------- Apple 风格变量 ---------- */
:root {
  --ap-bg: #f5f5f7;
  --ap-card: #ffffff;
  --ap-text: #1d1d1f;
  --ap-text-2: #6e6e73;
  --ap-text-3: #86868b;
  --ap-line: rgba(0, 0, 0, 0.08);
  --ap-radius: 18px;
  --ap-radius-sm: 12px;
  --ap-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --ap-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(0, 0, 0, 0.1);
  --ap-accent: #0071e3;
}

body {
  background: var(--ap-bg);
  color: var(--ap-text);
}

/* ==========================================================================
   软件卡片 · Apple 风格
   ========================================================================== */
.posts-item.style-app-card {
  padding: 14px;
  border-radius: var(--ap-radius);
  background: var(--ap-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  border: 1px solid transparent;
  transition: transform 0.32s cubic-bezier(0.25, 0.1, 0.25, 1),
              box-shadow 0.32s cubic-bezier(0.25, 0.1, 0.25, 1),
              border-color 0.32s ease;
  align-items: center;
  will-change: transform;
}

.posts-item.style-app-card:hover {
  transform: translateY(-2px) scale(1.012);
  box-shadow: var(--ap-shadow-hover);
  border-color: var(--ap-line);
}

/* 图标：更圆润的连续圆角 + 细描边 */
.posts-item.style-app-card .item-header {
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  margin-right: 14px;
}

.posts-item.style-app-card .item-media {
  width: 68px;
  height: 68px;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #fafafa, #f0f0f2);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.posts-item.style-app-card .item-image,
.posts-item.style-app-card .item-image img {
  width: 68px;
  height: 68px;
  display: block;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.posts-item.style-app-card:hover .item-image img {
  transform: scale(1.06);
}

.posts-item.style-app-card .item-body {
  height: 68px;
  overflow: hidden;
}

.posts-item.style-app-card .item-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 20px;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}

.posts-item.style-app-card .item-title a {
  color: var(--ap-text);
}

.posts-item.style-app-card .app-v {
  color: var(--ap-text-3);
  font-weight: 400;
  font-size: 12px;
}

.posts-item.style-app-card .app-content .text-muted {
  font-size: 12px;
  line-height: 17px;
  color: var(--ap-text-3);
}

.posts-item.style-app-card .app-meta {
  margin-top: 2px;
}

.posts-item.style-app-card .meta-ico {
  font-size: 11.5px;
  color: var(--ap-text-3);
  display: flex;
  gap: 10px;
}

/* 大卡片（相关软件 / style-app-max） */
.posts-item.style-app-max {
  padding: 16px;
  border-radius: var(--ap-radius);
  background: var(--ap-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: transform 0.32s cubic-bezier(0.25, 0.1, 0.25, 1),
              box-shadow 0.32s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.posts-item.style-app-max:hover {
  transform: translateY(-3px);
  box-shadow: var(--ap-shadow-hover);
}

/* ==========================================================================
   文章详情页 · Apple 风格
   ========================================================================== */

/* 主卡片 */
.app-detail-card {
  background: var(--ap-card);
  border-radius: var(--ap-radius);
  box-shadow: var(--ap-shadow);
  padding: 32px;
  margin-bottom: 24px;
}

/* 面包屑 */
.app-breadcrumb {
  font-size: 12.5px;
  color: var(--ap-text-3);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.app-breadcrumb a {
  color: var(--ap-text-3);
  transition: color 0.2s ease;
}

.app-breadcrumb a:hover {
  color: var(--ap-accent);
}

/* 头部：图标 + 信息 */
.app-head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.app-head-ico {
  flex: 0 0 128px;
  width: 128px;
  height: 128px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(145deg, #fafafa, #f0f0f2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.app-head-ico img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  display: block;
}

.app-head-info {
  flex: 1;
  min-width: 0;
}

.app-head-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ap-text);
}

.app-head-title .app-ver {
  font-size: 15px;
  font-weight: 500;
  color: var(--ap-text-3);
  margin-left: 8px;
  letter-spacing: 0;
}

/* 徽章 */
.app-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ap-text-2);
  background: rgba(0, 0, 0, 0.05);
  border-radius: 980px;
  padding: 4px 11px;
  line-height: 1.4;
}

/* 简介 */
.app-summary {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ap-text-2);
  margin: 0 0 20px;
  max-width: 680px;
}

/* 元信息条 */
.app-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--ap-radius-sm);
  padding: 14px 4px;
  margin-bottom: 24px;
}

.app-meta-item {
  flex: 1;
  min-width: 110px;
  text-align: center;
  padding: 0 12px;
  border-right: 1px solid var(--ap-line);
}

.app-meta-item:last-child {
  border-right: 0;
}

.app-meta-label {
  display: block;
  font-size: 11px;
  color: var(--ap-text-3);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.app-meta-value {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ap-text);
}

/* 主按钮（Apple 蓝） */
.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.app-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ap-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  border: 0;
  border-radius: 980px;
  padding: 12px 28px;
  cursor: pointer;
  transition: background 0.24s ease, transform 0.16s ease;
}

.app-btn-primary:hover {
  background: #0077ed;
  transform: scale(1.02);
}

.app-btn-primary:active {
  transform: scale(0.99);
}

.app-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ap-accent);
  padding: 12px 18px;
  border-radius: 980px;
  transition: background 0.24s ease;
}

.app-btn-secondary:hover {
  background: rgba(0, 113, 227, 0.08);
}

/* 正文排版 */
.app-detail-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ap-text-2);
  letter-spacing: -0.005em;
  word-break: break-word;
  overflow: hidden;
}

.app-detail-content p {
  margin-bottom: 16px;
}

.app-detail-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: var(--ap-radius-sm);
}

.app-detail-content h1,
.app-detail-content h2,
.app-detail-content h3 {
  color: var(--ap-text);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 28px 0 12px;
}

.app-detail-content blockquote {
  background: rgba(0, 0, 0, 0.025);
  border-left: 3px solid var(--ap-accent);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 0 0 20px;
  color: var(--ap-text-2);
}

.app-detail-content blockquote p:last-child {
  margin-bottom: 0;
}

/* 上一篇 / 下一篇 */
.app-nav-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--ap-line);
  font-size: 13.5px;
  color: var(--ap-text-3);
}

.app-nav-links a {
  color: var(--ap-accent);
  transition: opacity 0.2s ease;
}

.app-nav-links a:hover {
  opacity: 0.7;
}

/* 区块标题 */
.app-section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ap-text);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 相关推荐区 */
.app-related {
  background: var(--ap-card);
  border-radius: var(--ap-radius);
  box-shadow: var(--ap-shadow);
  padding: 28px 24px 16px;
  margin-top: 24px;
}

/* ==========================================================================
   首页打磨
   ========================================================================== */

/* 最近更新卡片 */
.posts-hot-list {
  border-radius: var(--ap-radius);
  box-shadow: var(--ap-shadow);
  border: 0;
  overflow: hidden;
}

.posts-hot-list .news_title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  padding: 18px 20px 12px;
}

.posts-hot-list .card-body {
  padding: 0 20px 16px;
}

.posts-hot-list .card-title {
  padding: 5px 0;
  font-size: 13px;
}

.posts-hot-list .card-title a {
  color: var(--ap-text);
  transition: color 0.2s ease;
}

.posts-hot-list .card-title a:hover {
  color: var(--ap-accent);
}

.posts-hot-list .badge-index {
  border-radius: 5px;
  font-size: 10.5px;
  padding: 2px 6px;
  font-weight: 600;
}

/* 分类区块标题 */
.io-slider-tab {
  margin-bottom: 14px;
}

.tab-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ap-text);
}

/* 分类小胶囊 */
.slider-ul {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 980px;
  padding: 3px;
}

.slider-li.tab-item {
  border-radius: 980px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 26px;
  padding: 0 14px;
  color: var(--ap-text-2);
  transition: background 0.24s ease, color 0.24s ease;
}

.slider-li.tab-item.active {
  background: #fff;
  color: var(--ap-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-more {
  color: var(--ap-accent);
  font-size: 12.5px;
  font-weight: 500;
}

/* 内容主卡片 */
.content-card {
  border-radius: var(--ap-radius);
  box-shadow: var(--ap-shadow);
  padding: 24px;
}

/* 首屏轮播圆角 */
.carousel-swiper {
  border-radius: var(--ap-radius);
  overflow: hidden;
  box-shadow: var(--ap-shadow);
}

/* 导航胶囊（Apple 风） */
.header-nav.blur-bg {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-radius: 980px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* 页脚 */
.main-footer .footer {
  border-radius: var(--ap-radius);
}

/* ---------- 响应式 ---------- */
@media (max-width: 991.98px) {
  .app-head {
    gap: 16px;
  }
  .app-head-ico,
  .app-head-ico img {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    flex: 0 0 88px;
  }
  .app-head-title {
    font-size: 22px;
  }
  .app-detail-card {
    padding: 20px;
  }
}

@media (max-width: 767.98px) {
  .app-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .app-badges {
    justify-content: center;
  }
  .app-actions {
    justify-content: center;
  }
  .app-meta-bar {
    padding: 12px 0;
  }
  .app-meta-item {
    min-width: 50%;
    border-right: 0;
    margin-bottom: 10px;
  }
}

/* 相关推荐卡片：四列布局（覆盖主题的默认宽度） */
.app-related .ajax-list-body {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}
.app-related .posts-item.style-app-card {
  flex: 0 0 calc(25% - 16px);
  max-width: calc(25% - 16px);
  margin: 8px;
}
@media (max-width: 991.98px) {
  .app-related .posts-item.style-app-card { flex: 0 0 calc(50% - 16px); max-width: calc(50% - 16px); }
}
@media (max-width: 575.98px) {
  .app-related .posts-item.style-app-card { flex: 0 0 calc(100% - 16px); max-width: calc(100% - 16px); }
}

/* ===== 卡片尺寸最终调整：更舒展 ===== */
.posts-item.style-app-card {
  padding: 16px;
  min-height: 108px;
}
.posts-item.style-app-card .item-header {
  flex: 0 0 72px; width: 72px; height: 72px; margin-right: 16px;
}
.posts-item.style-app-card .item-media,
.posts-item.style-app-card .item-image,
.posts-item.style-app-card .item-image img {
  width: 72px; height: 72px;
}
.posts-item.style-app-card .item-media { border-radius: 18px; }
.posts-item.style-app-card .item-body { height: auto; min-height: 72px; }
.posts-item.style-app-card .item-title { font-size: 15px; line-height: 21px; margin-bottom: 4px; }
.posts-item.style-app-card .app-content .text-muted { font-size: 12.5px; line-height: 18px; }
.posts-item.style-app-card .app-meta { margin-top: 6px; }

/* ===== 首屏三栏等高（对齐 macwk：278px） ===== */
.io-carousel-max { align-items: stretch; }
.io-carousel-max .carousel-swiper,
.io-carousel-max .swiper-slide,
.io-carousel-max .swiper-slide .media-content { height: 278px; }
.io-carousel-max .posts-hot-list { height: 278px; overflow: hidden; }
.io-carousel-max .posts-hot-list .card-body { overflow-y: auto; }
.io-carousel-max .col-xl-3.d-none.d-xl-flex { height: 278px; }
.io-carousel-max .col-xl-3 .media { height: calc(50% - 6px); }
.io-carousel-max .col-xl-3 .media-content { height: 100%; }

/* ===== 首屏等高（强制覆盖主题） ===== */
#module_id_0 .io-carousel-max { align-items: flex-start !important; }
#module_id_0 .io-carousel-max .carousel-swiper,
#module_id_0 .io-carousel-max .swiper-slide { height: 278px !important; }
#module_id_0 .io-carousel-max .posts-hot-list { height: 278px !important; max-height: 278px !important; }
#module_id_0 .io-carousel-max .posts-hot-list .card-body { max-height: 225px; overflow-y: auto; }
#module_id_0 .io-carousel-max .col-xl-3 { height: 278px !important; }
#module_id_0 .io-carousel-max .col-xl-3 .media { height: calc(50% - 6px) !important; min-height: 0 !important; }

/* ===== 收尾微调 ===== */
/* 轮播分页居中 */
#module_id_0 .carousel-swiper .swiper-pagination {
  left: 0; right: 0; width: 100%; text-align: center; bottom: 12px;
}
#module_id_0 .carousel-swiper .swiper-pagination-bullet {
  width: 7px; height: 7px; margin: 0 3px; background: rgba(255,255,255,.55); opacity: 1;
}
#module_id_0 .carousel-swiper .swiper-pagination-bullet-active {
  background: #fff; width: 18px; border-radius: 4px;
}
/* 卡片网格间距收紧 */
.ajax-list-body { margin: -7px; }
.ajax-list-body > .posts-item { margin: 7px; }
/* 分类区块之间留白 */
.io-slider-tab { margin-top: 10px; }
/* 滚动条更细腻 */
.posts-hot-list .card-body::-webkit-scrollbar { width: 4px; }
.posts-hot-list .card-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 2px; }
