/* ------------------------------------
 * Typecho Default Theme
 * @update  2026-03-12
 * --------------------------------- */

/* ==================
 * 核心全局设置
 * ================== */
html, body {
  overflow-x: hidden;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

body {
  background-color: #FFF;
  color: #444;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
  font-size: 87.5%;
  -webkit-font-smoothing: antialiased;
}

a { color: #3354AA; text-decoration: none; }
a:hover { color: #444; }

h1, h2, h3, h4, h5, h6 { font-weight: bold; }

/* 容器 */
.container {
  margin: 0 auto;
  width: 100%;
  max-width: 952px;
  box-sizing: border-box;
}

/* ==================
 * 头部与导航
 * ================== */
#header {
  padding-top: 35px;
  border-bottom: 1px solid #EEE;
}

#logo {
  color: #333;
  font-size: 2.5em;
}

#nav-menu {
  display: flex;
  flex-wrap: wrap;
  margin: 25px 0 0;
  padding: 0;
}

#nav-menu a {
  padding: 0 20px;
  height: 32px;
  line-height: 32px;
  color: #444;
  border: 1px solid #EEE;
  border-bottom: none;
}

/* ==================
 * 文章布局
 * ================== */
.post {
  padding: 15px 0 20px;
  border-bottom: 1px solid #EEE;
}

.post-title {
  margin: .83em 0;
  font-size: 1.4em;
  text-align: left;
}

.post-meta {
  margin-top: -0.5em;
  padding: 0;
  color: #999;
  font-size: .92857em;
  text-align: left;
  list-style: none;
}

.post-meta li {
  display: inline-block;
  margin: 0 8px 0 0;
  padding-left: 12px;
  border-left: 1px solid #EEE;
}

.post-meta li:first-child {
  margin-left: 0;
  padding-left: 0;
  border: none;
}

/* 隐藏 分类 和 评论 */
.post-meta li:nth-child(3),
.post-meta li:nth-child(4) {
  display: none;
}

/* 文章内容 */
.post-content {
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-content img,
.post-content video {
  max-width: 100%;
  height: auto;
}

/* 代码块：横向滚动更优雅 */
pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  box-sizing: border-box;
}

/* 行内代码：允许换行 */
code {
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==================
 * 页脚
 * ================== */
#footer {
  padding: 3em 0;
  text-align: center;
  color: #999;
}

/* ==================
 * 手机端深度优化
 * ================== */
@media (max-width: 767px) {
  body {
    font-size: 92%;
    font-weight: 500;
  }

  .container {
    padding-left: 35px;
    padding-right: 35px;
    width: 100%;
  }

  #header,
  .post-title,
  .post-meta,
  .archive-title,
  #logo {
    text-align: left;
  }

  .post-content {
    line-height: 1.8;
  }

  #nav-menu a {
    margin: 5px 2px 5px 0;
  }
}

/* ==================
 * 侧边栏样式
 * ================== */
body #secondary .widget {
  background: none;
  border: none;
  box-shadow: none;
  margin-bottom: 15px;
  padding: 0;
}

body #secondary .widget-title {
  font-size: 15px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #ddd;
  display: block;
}

body #secondary .widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

body #secondary .widget-list li {
  padding: 4px 0;
  border-bottom: none;
  line-height: 1.5;
}