/* 全局重置与基础设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* 容器样式 - 统一限制最大宽度并居中 */
.container {
  margin: 0 auto;
  width: 100%; /* 确保小屏幕占满宽度 */
}

/* 标题区域样式 */
.post-header {
  width: 100%; /* 占满容器宽度 */
  text-align: center;
  margin: 0 auto 20px;
  padding: 0 15px;
  box-sizing: border-box;
}

.post-header h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.4; /* 优化长标题换行 */
}

/* 图片响应式样式 */
.responsive-img {
  max-width: 100%; /* 小屏幕占满宽度 */
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 分隔线样式 */
.divider {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid #f5f5f5; /* 浅灰色分隔线 */
  width: 60%; 
}

/* 正文内容样式 - 核心自适应调整 */
.post-content {
  width: 100%; /* 小屏幕默认占满宽度 */
  max-width: 550px; /* 大屏幕最大宽度 */
  padding: 0 15px;
  margin: 0 auto; /* 始终水平居中 */
  box-sizing: border-box;
}

/* 首行缩进段落样式 */
.indent-paragraph {
  text-indent: 2em;
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* 页脚样式 */
.post-footer {
  padding: 15px;
  margin: 15px 0;
  width: 100%; /* 占满父容器宽度 */
  box-sizing: border-box;
}

/* 返回顶部按钮适配 */
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
}

/* 小屏幕适配（767px以下） */
@media (max-width: 767px) {
  .post-header h1 {
    font-size: 1.5rem; /* 缩小标题字体 */
  }
  
  .indent-paragraph {
    font-size: 0.95rem; /* 优化正文阅读体验 */
    text-indent: 1.5em; /* 适当减小缩进 */
  }
  
  .post-content, .post-footer {
    padding: 0 10px; /* 减小内边距 */
  }
  
  .divider {
    margin: 1rem 0; /* 减小分隔线间距 */
  }
}

/* 大屏幕适配（1024px以上） */
@media (min-width: 1024px) {
  .post-header {
    max-width: 550px; /* 与正文宽度一致 */
  }
  
  .responsive-img {
    max-width: 550px; /* 与正文宽度匹配 */
  }
}