/* ============================================================
 * 文章页自定义样式：标题+正文卡片化
 * 参考 xinghuisama.top 的连贯设计
 * ★ 已接入全站公共布局规范（common_layout.css）
 * ============================================================ */

/* ★ 主内容容器：统一为 1152px 居中，顶部留 84px 给悬浮顶栏 */
#content-inner.layout {
  width: 100%;
  max-width: var(--layout-max, 1152px);
  margin: 0 auto;
  padding: var(--layout-pad-top, 84px) var(--layout-pad-x, 40px) var(--layout-pad-bottom, 24px);
  box-sizing: border-box;
}

/* 文章主体容器：毛玻璃卡片 */
#post {
  /* ★ 映射到公共规范 */
  background: var(--layout-glass, rgba(20, 30, 50, 0.5));
  -webkit-backdrop-filter: blur(var(--layout-blur, 12px)) saturate(var(--layout-sat, 140%));
  backdrop-filter: blur(var(--layout-blur, 12px)) saturate(var(--layout-sat, 140%));
  border-radius: var(--layout-radius, 24px);
  padding: var(--layout-card-pad-x, 20px);
  margin-bottom: var(--layout-gap, 24px);
  border: 1px solid var(--layout-line, rgba(255, 255, 255, 0.08));
  box-shadow: var(--layout-shadow, 0 8px 32px rgba(0, 0, 0, 0.15));
  position: relative;
  box-sizing: border-box;
}

/* 标题区：隐藏封面背景，只保留标题 */
#page-header.post-bg {
  background: transparent !important;
  background-image: none !important;
  padding-bottom: 0;
  margin-bottom: 0;
  min-height: auto;
  height: auto;
}

#post-info {
  margin-bottom: 0;
  padding-bottom: var(--layout-card-pad-head-bottom, 12px);
  border-bottom: 1px solid var(--layout-line, rgba(255, 255, 255, 0.08));
}

#post-info .post-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

#post-info .post-meta {
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* 正文内容 */
#article-container {
  line-height: 1.8;
  font-size: 15px;
  margin-top: var(--layout-card-pad-head-y, 16px);
  min-width: 0; /* 防止 flex 溢出 */
}

/* 代码块 */
#article-container pre,
#article-container code {
  border-radius: 8px;
}

/* 引用块 */
#article-container blockquote {
  border-left: 4px solid rgba(100, 255, 218, 0.3);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
}

/* ============================================================
 * 响应式断点（与全站公共规范一致）
 * ============================================================ */

/* ≥1024px：保持双列 */
@media (min-width: 1024px) {
  #content-inner.layout {
    display: flex;
    flex-direction: row;
    gap: var(--layout-gap, 24px);
  }
  #article-container {
    flex: 1;
    min-width: 0;
  }
  #aside-content {
    width: 300px;
    flex-shrink: 0;
  }
}

/* <1024px：单列堆叠 */
@media (max-width: 1023px) {
  #content-inner.layout {
    display: flex;
    flex-direction: column;
  }
  #aside-content {
    width: 100%;
    margin-top: var(--layout-gap, 24px);
  }
}

/* 平板横屏 / 小笔记本：整体更紧凑 */
@media (max-width: 1200px) {
  #post {
    padding: var(--layout-card-pad-x, 16px);
  }
}

/* 手机 */
@media (max-width: 768px) {
  #post {
    padding: var(--layout-card-pad-x, 12px);
  }
  #post-info .post-title {
    font-size: 24px;
  }
}
