/* ------------------------------------
 * Typecho Default Theme
 *
 * @author  Typecho Team
 * @link  http: //typecho.org/
 * @update  2013-10-28
 * --------------------------------- */

/* ------------------
 * Global style
 * --------------- */

html, body {
  background-color: #FFF;
  color: #444;
  /*font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;*/
  font-family: "Droid Serif", Georgia, "Times New Roman", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "WenQuanYi Micro Hei","Microsoft Yahei", serif;
  font-size: 87.5%;
  overflow: auto;
  height: auto;
}

a {
  color: #000;
  font-weight: bold;
  text-decoration: none;
}
a:hover, a:active {
  color: #000;
  text-decoration: underline;
}
pre, code { 
  background: #F3F3F3;
  font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
  font-size: .92857em;
}
code { padding: 2px 4px; color: #B94A48; }
pre {
  padding: 8px;
  overflow: auto;
  max-height: 400px;
}
pre code {
  padding: 3px;
  color: #444;
}

blockquote {
  margin: 1em 0;
  padding-left: 1.5em;
  border-left: 4px solid #eee;
  color: #666;
}

table {
  border: 1px solid #ddd;
  width: 100%;
}
table th,
table td {
  padding: 5px 10px;
  border: 1px solid #eee;
}
table th {
  background: #f3f3f3;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei","Microsoft Yahei", sans-serif;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 5px;
  border: 1px solid #E9E9E9;
  width: 100%;

  border-radius: 2px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
textarea {
  resize: vertical;
}


/* Special link style */
.post-meta a,
.post-content a,
.widget a,
.comment-content a {
  border-bottom: 1px solid #EEE;
}

.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
  border-bottom-color: transparent;
}

/* ------------------
 * Header
 * --------------- */

#header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 100;
  padding: 20px 0;
  transition: transform 0.25s;
}
.hide {
  transform: translateY(-100%);
}

.header-hidden {
  transform: translateY(-100%);
}

#logo {
  color: #333;
  font-size: 2.5em;
}
#logo img {
    max-height: 64px;
}

.description {
  margin: .5em 0 0;
  color: #999;
  font-style: italic;
}

/* Navigation menu */
#nav-menu {
  margin: 25px 0 0;
  padding: 0;
}
#nav-menu a {
  display: block;
  margin-right: -1px;
  padding: 0 20px;
  border: 1px solid #EEE;
  border-bottom: none;
  height: 32px;
  line-height: 32px;
  color: #444;
  float: left;
}
#nav-menu a:hover,
#nav-menu .current {
  background: #F6F6F6;
}

/* Search */
#search {
  position: relative;
  margin-top: 15px;
}
#search input {
  padding-right: 30px;
}
#search button {
  position: absolute;
  right: 4px;
  top: 2px;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  background: transparent url(img/icon-search.png) no-repeat center center;
  direction: ltr; /* fix RTL language */
  text-indent: -9999em;
}

@media 
(-webkit-min-device-pixel-ratio: 2), 
(min-resolution: 192dpi) {
  #search button {
    background-image: url(img/icon-search@2x.png);
    -webkit-background-size: 24px 24px;
    -moz-background-size: 24px 24px;
    -o-background-size: 24px 24px;
    background-size: 24px 24px;
  }
}


/* ------------------
 * Main
 * --------------- */

.post {
  padding: 2rem 0;
  margin-bottom: 2rem;
  background: rgba(250, 250, 250, 0.5);
  border-radius: 4px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.post-title {
  margin: 0 0 1rem 0;
  font-size: 1.5em;
  font-weight: 600;
  color: #222;
}
.post-meta {
  margin: 0 0 1.5rem 0;
  padding: 0;
  color: #777;
  font-size: 0.9em;
  display: flex;
  gap: 1rem;
}
.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-content {
  line-height: 1.7;
  color: #444;
}

.post-content p {
  margin-bottom: 1.2em;
}
.post .tags {
  clear: both;
}

.post-near {
  list-style: none;
  margin: 30px 0;
  padding: 0;
  color: #999;
}
.post-near li {
  margin: 10px 0;
}

.archive-title {
  margin: 1em 0 0.5em;
  padding-top: 20px;
  color: #333;
  font-size: 1.5em;
  font-weight: 600;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}
.more {
  text-align: center;
}
.more a {
  border: none;
}
.protected .text {
  width: 50%;
}

/* Page nav */

.page-navigator {
  list-style: none;
  margin: 25px 0;
  padding: 0;
  text-align: center;
}
.page-navigator li {
  display: inline-block;
  margin: 0 4px;
}
.page-navigator a {
  display: inline-block;
  padding: 0 10px;
  height: 30px;
  line-height: 30px;
}
.page-navigator a:hover {
  background: #EEE;
  text-decoration: none;
}

.page-navigator .current a {
  color: #444;
  background: #EEE;
}

/* ------------------
 * Comment list
 * --------------- */
#comments {
  padding-top: 15px;
}
.comment-list, .comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list li {
  padding: 14px;
  margin-top: 10px;
  border: 1px solid #EEE;
  border-radius: 12px;
}
.comment-list li.comment-level-odd {
  background: #F6F6F3;
  border-radius: 12px;
}
.comment-list li.comment-level-even {
  background: #FFF;
  border-radius: 12px;
}
.comment-list li.comment-by-author {
  background: #FFF9E8;
  border-radius: 12px;
}
.comment-list li .comment-reply {
  text-align: right;
  font-size: .92857em;
  border-radius: 12px;
}
.comment-meta a {
  color: #999;
  font-size: .92857em;
}
.comment-author {
  display: block;
  margin-bottom: 3px;
  color: #444;
}
.comment-author .avatar {
  float: left;
  margin-right: 10px;
  border-radius: 8px; /* 默认方形头像，圆角为8px */
}
/* 作者头像精准规则 - 仅作用于带有 by-author 类的头像 */
.comment-author .avatar.by-author {
  border-radius: 50% !important;
}

.comment-author cite {
  font-weight: bold;
  font-style: normal;
}

/* Comment reply */
.comment-list .respond {
  margin-top: 30px; /* 增大评论输入模块与评论显示模块之间的距离 */
  border-top: 1px solid #EEE;
  border-radius: 12px;
}
.respond .cancel-comment-reply {
  float: right;
  margin-top: 15px;
  font-size: .92857em;
}

/* 评论表单容器 - 与侧边栏卡片样式一致 */
#comment-form {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 14px;
  margin-top: 20px;
}

#comment-form label {
  display: block;
  margin-bottom: .5em;
  font-weight: bold;
}
#comment-form .required:after {
  content: " *";
  color: #C00;
}

/* 评论输入框样式 - 与侧边栏输入框一致 */
#comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  outline: none;
  font-size: 14px;
  min-height: 120px;
  resize: vertical;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

#comment-form textarea:focus {
  border-color: #8aa7ff;
}

/* 未登录用户信息字段容器 - 改为水平排列 */
.comment-form-user-info {
  display: flex;
  flex-direction: row;
  gap: 15px;
  margin-top: 5px;
  padding-top: 15px;
  border-top: 1px dashed rgba(0,0,0,.06);
}

/* 用户信息输入框样式 - 与侧边栏输入框一致 */
.comment-form-user-info input[type="text"],
.comment-form-user-info input[type="email"],
.comment-form-user-info input[type="url"] {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  outline: none;
  font-size: 14px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.comment-form-user-info input[type="text"]:focus,
.comment-form-user-info input[type="email"]:focus,
.comment-form-user-info input[type="url"]:focus {
  border-color: #8aa7ff;
}

/* 提交按钮样式 - 与侧边栏按钮一致，并与用户信息字段水平排列 */
#comment-form .submit {
  margin-top: 5px; /* 减小按钮与上方模块的间距 */
  height: 36px;
  padding: 0 14px;
  min-width: 96px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fafafa;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}

#comment-form .submit:hover {
  background: #f2f3f5;
}

/* 已登录用户信息样式 */
#comment-form .logged-in-as {
  background: #f0f0f0;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 15px;
}

/* ------------------
 * Comments Module Spacing
 * --------------- */
#comments h3 {
  margin-top: 30px; /* 增大评论标题与上方内容的距离 */
  margin-bottom: 20px; /* 增大评论标题与下方内容的距离 */
}

#comments .comment-list {
  margin-top: 20px; /* 增大评论列表与上方内容的距离 */
}

#comments .comment-list li {
  margin-top: 15px; /* 增大评论项之间的间距 */
  padding: 10px;
  border: none;
  border-top: none;
}

#comments .respond {
  margin-top: -20px; /* 增大评论输入区域与评论列表的距离 */
  border-top: none;
  padding-top: 0;
}

#comments .cancel-comment-reply {
  margin-top: 10px;
}

#comments #response {
  margin-top: 20px; /* 增大评论表单标题与上方内容的距离 */
  margin-bottom: 15px;
}

#comments #comment-form {
  margin-top: 20px; /* 增大评论表单与标题的距离 */
  padding: 10px;
}

#comments #comment-form p {
  margin-bottom: 15px; /* 增大表单元素之间的间距 */
}

#comments .comment-form-user-info {
  margin-top: 15px; /* 增大用户信息区域与上方内容的距离 */
  padding-top: 0;
  border-top: none;
}

#comments .page-navigator {
  margin: 25px 0; /* 增大分页导航与评论内容的距离 */
}

/* ------------------
 * secondary
 * --------------- */
#secondary {
  padding-top: 15px;
  word-wrap: break-word;
}
.widget {
  margin-bottom: 30px;
}
.widget-list {
  list-style: none;
  padding: 0;
}
.widget-list li {
  margin: 5px 0;
  line-height: 1.6;
}

.widget-list li ul {
  margin-left: 15px;
}


/* ------------------
 * Footer 
 * --------------- */
#footer {
  padding: 3em 0;
  line-height: 1.5;
  text-align: center;
  color: #999;
}


/* -----------------
 * Error page
 * -------------- */
.error-page {
  margin-top: 100px;
  margin-bottom: 100px;
}


/* -----------------
 * Content format
 *--------------- */
.post-content, .comment-content {
  line-height: 1.5;
  word-wrap: break-word;
}
.post-content h2, .comment-content h2 {
  font-size: 1.28571em;
}
.post-content img, .comment-content img,
.post-content video, .comment-content video {
  max-width: 100%;
}
.post-content a img,
.comment-content a img {
  background: #FFF;
  position: relative;
  bottom: -4px;  /* hidden img parent link border  */
}
.post-content hr, .comment-content hr {
  margin: 2em auto;
  width: 100px;
  border: 1px solid #E9E9E9;
  border-width: 2px 0 0 0;
}


/* -----------------
 * Misc
 *--------------- */
.aligncenter, div.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.alignleft {
  float: left;
}
.alignright {
  float: right;
}
img.alignleft {
  margin: 0 15px 0 0;
}
img.alignright {
  margin: 0 0 0 15px;
}


/* -----------------
 * Responsive
 *--------------- */
@media (max-width: 767px) {
  body {
    font-size: 81.25%;
  }
  #nav-menu a {
    float: none;
    display: inline-block;
    margin: 0 -2px;
  }
}

@media (max-width: 768px) {
  .post {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0;
  }
  
  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  /* 响应式调整：在小屏幕上将用户信息字段和提交按钮改为垂直排列 */
  .comment-form-user-info {
    flex-direction: column;
  }
}

@media (min-width: 992px) {

}

@media (min-width: 1200px) {
  .container {
    max-width: 952px;
  }
}


/*
 * Hide visually and from screenreaders, but maintain layout
*/
.invisible {
  visibility: hidden;
}

/* -----------------
 * Timeline Layout
 *--------------- */
#timeline {
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  overflow: visible;
}

.post-card {
  margin-bottom: 30px;
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.2);
}

.post-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #999;
  font-size: 0.9em;
}

.post-title {
  margin: 0 0 15px 0;
  color: #999; /* 弱化标题效果 */
  font-weight: 400;
  font-size: 1.2em;
}
.post-title a {
  color: #000;
  text-decoration: none;
}

.post-content {
  margin-bottom: 15px;
  line-height: 1.6;
}

.post-media img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 15px;
}

.post-actions {
  display: flex;
  justify-content: space-around;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.like-btn, .comment-btn, .share-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: #f8f8f8;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.like-btn:hover, .comment-btn:hover, .share-btn:hover {
  background: #f0f0f0;
}

/* 弱化标题效果 */
.post-title {
  color: #999;
  font-weight: 400;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .post-card {
    padding: 15px;
  }
  
  .post-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .like-btn, .comment-btn, .share-btn {
    justify-content: center;
  }
}

/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.sr-only {
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px; }

/*
* Extends the .sr-only class to allow the element to be focusable
* when navigated to via the keyboard: h5bp.com/p
*/
.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto; }

/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
  visibility: hidden; }

/* 新增推特/朋友圈布局样式 */
.post-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 15px;
}

.author-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.author-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.author-name {
  font-size: 0.9em;
  color: #666;
}

.post-title {
  color: #000 !important; /* 强制标题为黑色 */
  font-weight: 500 !important;
  margin: 0;
  flex: 1;
  font-size: 1.8em; /* 约等于40px */
  line-height: 1.2;
}

/* 标题链接默认无下划线 */
.post-title a {
  position: relative;
  text-decoration: none;
}

/* 禁用 hover 时的黑色下划线，换成蓝色动画 */
.post-title a:hover {
  text-decoration: none; /* 去掉黑线 */
  background-image: linear-gradient(#2b6cff, #2b6cff);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px; /* 显示整条蓝线 */
  transition: background-size .2s ease;
}

/* 默认状态下蓝线宽度为 0（隐藏） */
.post-title a {
  background-image: linear-gradient(#2b6cff, #2b6cff);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px; /* 不显示蓝线 */
}


.post-title a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.post-content {
  margin-left: 55px; /* 与头像对齐 */
  line-height: 1.6;
}

#infinite-loader {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.9);
  border: 1px solid #eee;
  color: #666;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 999;
}
#infinite-loader.show { opacity: 1; }

/* 文章模式：左图右文对齐 */
.post-card.is-article .pc-wrap{display:flex;align-items:flex-start;gap:16px}
.post-card.is-article .pc-media{flex:0 0 260px;max-width:260px;aspect-ratio:16/9;border-radius:10px;overflow:hidden;background:#f2f3f5}
.post-card.is-article .pc-media img{width:100%;height:100%;object-fit:cover;display:block}
.post-card.is-article .pc-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.post-card.is-article .pc-title,.post-card.is-article .post-title{margin:0;font-size:18px;line-height:1.4;font-weight:600}
.post-card.is-article .pc-title a{color:#222;text-decoration:none}
.post-card.is-article .pc-title a:hover{text-decoration:underline}
.post-card.is-article .pc-excerpt {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 1.6;

  /* 关键：多行省略 */
  display: -webkit-box;       /* 旧版 webkit 实现 */
  display: box;               /* 老版标准草案（几乎没人用了，但加上无妨） */
  -webkit-line-clamp: 3;      /* 保持3行显示 */
  line-clamp: 3;               /* 保持3行显示 */
  -webkit-box-orient: vertical; /* 必须，webkit 下的方向设置 */

  overflow: hidden;
}
.post-card.is-article .pc-meta{display:flex;align-items:center;gap:8px;color:#8a8f98;font-size:13px;margin-top:auto}
.post-card.is-article .pc-dot{color:#c2c6cc}

/* 推文模式仍用你原样式（如需）： */
.post-card.is-tweet .post-header{margin-bottom:12px}
.post-card.is-tweet .author-info{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.post-card.is-tweet .author-avatar img{border-radius:50%}
.post-card.is-tweet .post-actions{display:flex;gap:16px;margin-top:12px;color:#666;font-size:14px}

/* 窄屏：文章模式上下堆叠 */
@media (max-width:680px){
  .post-card.is-article .pc-wrap{flex-direction:column}
  .post-card.is-article .pc-media{width:100%;max-width:none;flex-basis:auto}
}

/* 文章模式：标题链接禁用原生下划线，避免双线 */
.post-card.is-article .pc-title a,
.post-card.is-article .pc-title a:hover,
.post-card.is-article .pc-title a:focus,
.post-card.is-article .pc-title a:active {
  text-decoration: none !important;
}

/* 搜索高亮样式 */
.search-highlight {
    background-color: #ffeb3b;
    padding: 0 2px;
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(0,0,0,.1);
}

/* 文章类型药丸样式 */
.post-type-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.post-type-tweet {
    background-color: #e1f0ff;
    color: #1a73e8;
}

.post-type-article {
    background-color: #e6f4ea;
    color: #34a853;
}

.pc-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 布局：侧边栏容器 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 卡片外观：白底、细灰边、圆角、无阴影/动画 */
.side-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 14px 14px 12px;
}
.side-card__title {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  color: #222;
}

/* 列表类组件 */
.side-list { list-style: none; margin: 0; padding: 0; }
.side-item { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 0; }
.side-item + .side-item { border-top: 1px dashed rgba(0,0,0,.06); }
.side-link { color: #333; text-decoration: none; }
.side-link:hover { text-decoration: underline; }
.side-meta { color: #8a8f98; font-size: 12px; }
.side-count { color: #8a8f98; font-size: 12px; background: #f4f5f7; border-radius: 999px; padding: 0 8px; }
.side-empty { color: #8a8f98; font-size: 13px; }

/* 搜索框 */
.side-search { display: flex; gap: 8px; }
.side-input {
  flex: 1; height: 34px; padding: 0 10px;
  border: 1px solid rgba(0,0,0,.12); border-radius: 8px; outline: none;
}
.side-input:focus { border-color: #8aa7ff; }
.side-btn {
  height: 34px; padding: 0 10px; border: 1px solid rgba(0,0,0,.12);
  background: #fafafa; border-radius: 8px; cursor: pointer;
}
.side-btn:hover { background: #f2f3f5; }

/* 标签云 */
.side-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.side-tag {
  display: inline-block; padding: 4px 8px; border-radius: 999px;
  background: #f4f5f7; color: #444; font-size: 12px; text-decoration: none;
  border: 1px solid rgba(0,0,0,.06);
}
.side-tag:hover { text-decoration: underline; }

/* 评论片段 */
.side-comment-text { color: #666; }

/* 响应式：窄屏时卡片间距更紧凑 */
@media (max-width: 680px) {
  .sidebar { gap: 6px; }
  .side-card { padding: 12px; border-radius: 10px; }
}

/* 卡片外观：白底、细灰边、圆角 12px（与你全局一致） */
.side-card { background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:12px; padding:14px; }

/* 头部：左标题 + 右图标按钮 */
.side-card__head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.side-card__title { margin:0; font-size:15px; font-weight:600; color:#222; }

.side-search-toggle {
  display:inline-flex; align-items:center; justify-content:center;
  width:32px; height:32px; border:1px solid rgba(0,0,0,.12);
  border-radius:12px; background:#fafafa; cursor:pointer; padding:0;
}
.side-search-toggle:hover { background:#f2f3f5; }
.side-search-toggle img { display:block; }

/* 折叠/展开区域（默认隐藏） */
.side-search {
  overflow:hidden; max-height:0; opacity:0; margin-top:0;
  transition:max-height .25s ease, opacity .25s ease, margin-top .25s ease;
}
.side-search.is-open { max-height:72px; opacity:1; margin-top:10px; }

/* 输入行：与外卡片一致的圆角 12px，单行胶囊 */
.side-input-wrap {
  display:flex; align-items:center; gap:8px; position:relative;
}

.side-input--round {
  flex:1; height:36px; padding:0 40px 0 12px; /* 右侧为图标预留空间 */
  border:1px solid rgba(0,0,0,.12); border-radius:12px; outline:none; font-size:14px; min-width:0;
}
.side-input--round:focus { border-color:#8aa7ff; }

/* 右侧内嵌图标（绝对定位到输入框内最右） */
.side-input-icon {
  position:absolute; right:116px; /* 与按钮宽度 + 间距匹配，下面按钮 96px 宽 + 8px gap => 104；按需微调 */
  top:50%; transform:translateY(-50%); width:18px; height:18px; pointer-events:none; opacity:.75;
}

/* 提交按钮：同样 12px 圆角 */
.side-btn--round {
  height:36px; padding:0 14px; min-width:96px;
  border:1px solid rgba(0,0,0,.12); background:#fafafa; border-radius:12px;
  cursor:pointer; font-size:14px; white-space:nowrap;
}
.side-btn--round:hover { background:#f2f3f5; }

/* 窄屏适配：搜索行可换行，图标回到按钮左侧（避免重叠） */
@media (max-width:480px){
  .side-input-wrap { flex-wrap:wrap; }
  .side-input-icon { right:14px; } /*按钮换行时图标靠输入框右边*/
  .side-btn--round { width:100%; }
}

/* 用户偏好无动画：禁用过渡 */
@media (prefers-reduced-motion: reduce){
  .side-search { transition:none; }
}

.post {
  max-width: 850px;  /* 从700px增加到850px */
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1200px) {
  .container {
    max-width: 1100px;  /* 增加整体容器宽度 */
  }
}

#sidebar {
  max-width: 260px;  /* 建议初始值，可根据需要调整 */
  width: 100%;
}

@media (max-width: 992px) {
  #sidebar {
    max-width: none;  /* 在小屏幕上恢复全宽 */
  }
}

.entry__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: #222;
}
.entry__meta {
  margin-top: 6px;
  color: #888;
  font-size: 14px;
}

.entry__content {
  margin-top: 20px;
  line-height: 1.8;
  color: #333;
}
.entry__content img {
  max-width: 100%;
  height: auto;
}

.entry__footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.entry__author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.entry__authorAvatar img {
  border-radius: 50%;
}
.entry__authorName {
  font-weight: 600;
}

.entry__taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.entry__taxonomy .label {
  color: #888;
  font-size: 13px;
}
.entry__taxonomy .items {
  font-size: 14px;
}
.entry__taxonomy a {
  color: inherit;
  text-decoration: none;
}
.entry__taxonomy a:hover {
  text-decoration: underline;
}

.entry__navigation {
  flex-shrink: 0;
}

.entry__title a {
  position: relative;
  text-decoration: none;
  background-image: linear-gradient(#2b6cff, #2b6cff);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px; /* 初始不显示下划线 */
  transition: background-size .25s ease;
  color: inherit; /* 保持文字颜色 */
}

.entry__title a:hover {
  background-size: 100% 2px; /* hover 时展开整条线 */
}

#main {
    margin-right: 32px; /* 文章页和侧栏的间距 */
}

/* 回复给某人的样式 */
.comment-replyto {
  color: #999;
  margin-left: 4px;
  font-size: .92857em;
}

.comment-body {                                                                                                                                                          
    border-radius: 12px; /* 与输入框圆角一致 */                                                                                                                          
}                   

.like-btn.active { background: #ffecef; }
.comment-btn.active { background: #eef7ff; }
.share-btn.active { background: #eef9f0; }

/* 点赞后切换为实心 ♥ 更直观 */
.like-btn i.fa-solid { color: #e74c3c; }

/* —— 轻提示 Toast —— */
#post-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.82);
  color: #fff;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 9999;
}
#post-toast.show { opacity: 1; }

/* 点击分享按钮时的轻微可视反馈（如你已存在可保留、没有就添加） */
.share-btn.active { background: #eef9f0; }

/* —— 收紧左右留白（扩大整体容器宽度）—— */
@media (min-width: 1200px) {
  /* 你在 style.css 里对 .container 有过多次定义，放在最后能最终生效 */
  .container {
    max-width: 1240px;  /* 比当前更宽，左右空白更小；可在 1200~1320 之间微调 */
  }
}

/* —— 放宽正文区 —— */
.post {
  max-width: 980px;     /* 从 850px 提升，让中间内容更宽；可在 920~1040 间按喜好调 */
}

/* —— 拉大正文与侧边栏的间距 —— */
@media (min-width: 992px) {
  #main {
    margin-right: 56px; /* 原来 32px，按需要可调 48/56/64 */
  }
}

/* （可选）如果你觉得边到边的“内边距”也想更紧凑，可稍减 container 的 padding：
   注意这会影响全站左右呼吸感，谨慎使用 */
.container {
  padding-left: 8px;    /* grid.css 里默认 10px，这里轻微收紧 */
  padding-right: 8px;
}
/* ===== 固定按钮 ===== */
#backHome {
  position: fixed;
  right: 2.3rem;
  bottom: calc(4rem + 3.5rem + env(safe-area-inset-bottom)); /* 在返回顶部按钮上方3.5rem处 */
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  background: #fff9e6; /* 浅黄色背景 */
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  color: #e6a700; /* 深黄色图标 */
  cursor: pointer;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: none;
}

#backHome:hover {
  background: #fff0b3; /* 悬停时稍深的黄色背景 */
  color: #cc9600; /* 悬停时更深的黄色图标 */
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

#backHome:active {
  transform: scale(.98);
}

/* ===== 回到顶部按钮 ===== */
.backtop {
  position: fixed;
  right: 2.3rem;
  bottom: calc(4rem + env(safe-area-inset-bottom)); /* 兼容 iOS 安全区域 */
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: none;                       /* 取消边框 */
  border-radius: 0;                   /* 方形 */
  background: #fff7ed;                /* 柔和橙色背景 */
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  color: #c2410c;                     /* 深橙色图标 */

  cursor: pointer;
  z-index: 9999;

  /* 初始隐藏：位移到下方 + 透明 + 不可点击 */
  transform: translateY(120%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  /* 显隐时：向上/向下“弹出” */
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    opacity .2s ease,
    visibility 0s linear .28s; /* 隐藏完再切 visibility，避免闪烁 */
}

.backtop.backtop--show {
  transform: translateY(0);           /* 向上弹出 */
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    opacity .2s ease,
    visibility 0s;                    /* 立即可见 */
}

.backtop i {
  font-size: 1.25rem;                 /* Remix Icon 尺寸 */
  line-height: 1;
}

.backtop:hover {
  background: #fed7aa;                /* hover 状态更深一点的橙色 */
  color: #9a3412;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.backtop:active {
  transform: translateY(0) scale(.98);
}

/* 适配小屏：稍微缩小尺寸并离边缘近一点 */
@media (max-width: 480px) {
  #backHome {
    right: .9rem;
    bottom: calc(1rem + 3rem + env(safe-area-inset-bottom)); /* 在返回顶部按钮上方3rem处 */
    width: 2.5rem;
    height: 2.5rem;
  }

  .backtop {
    right: .9rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    width: 2.5rem;
    height: 2.5rem;
  }
}
/* —— 目录卡片 —— */
#toc-card {
  margin-top: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  width: 100%;
  box-sizing: border-box;
}

/* 吸附状态：目录卡片样式 */
#toc-card.sticky {
  position: fixed;
  top: 80px;
  width: 244px; /* 与侧边栏宽度一致 */
  max-width: 244px; /* 确保不会超出 */
  z-index: 5;
  box-sizing: border-box;
}

/* 目录内容 */
#toc {
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  padding-right: 4px;
}

/* 滚动条样式 */
#toc::-webkit-scrollbar {
  width: 4px;
}

#toc::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.1);
  border-radius: 2px;
}

#toc::-webkit-scrollbar-track {
  background: transparent;
}

/* 响应式：小屏调整 */
@media (max-width: 768px) {
  #toc-card { 
    position: static; 
    top: auto;
    margin-bottom: 16px; /* 保持与其他卡片一致 */
  }
  #toc { 
    max-height: none;
    padding-right: 0;
  }
}

/* —— 目录：层级缩进与树状线 —— */
.toc-sublist {
  margin-left: 12px;
  padding-left: 10px;
  border-left: 1px dashed rgba(0,0,0,.06);
}

/* —— 母标题（h2）与子标题（h3/h4）在侧栏的可视层级差异 —— */
.toc-level-2 > .toc-link { 
  font-size: 0.95em; 
  font-weight: 600;      /* 母标题略粗 */
  color: #333;
}
.toc-level-3 > .toc-link { 
  font-size: 0.92em; 
  font-weight: 500; 
  color: #555; 
}
.toc-level-4 > .toc-link { 
  font-size: 0.9em;  
  font-weight: 400; 
  color: #777; 
}

/* —— 行分隔（同层之间的分割虚线，延续侧栏风格） —— */
.toc-sublist .side-item + .side-item { 
  border-top: 1px dashed rgba(0,0,0,.06); 
}

/* —— 仅保留锚点偏移，防止吸顶导航遮挡（可按需要调整高度） —— */
:is(h2,h3,h4)[id] { 
  scroll-margin-top: 40px; 
}

/* 设置全局字体 */
:root {
  --primary-font: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 强制覆盖所有文本区域的字体 */
body,
#comments .comment-content,
#secondary .widget,
#footer,
.side-card,
.side-card__title,
.side-list,
.side-item {
  font-family: var(--primary-font) !important;
}

/* 设置文章内容的字体 */
.post, .entry, .post-content {
  font-family: var(--primary-font);
  font-size: 14px;  /* Twitter 的正文字体大小 */
  line-height: 1.5;  /* 提高可读性 */
  color: #333;  /* 深灰色文字 */
  margin-bottom: 1.5rem;  /* 底部间距 */
}

/* 标题字体设置 */
.post-title, .entry-title {
  font-family: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 24px;  /* 标题字体大小略大 */
  font-weight: bold;
  color: #222;  /* 深色字体 */
  margin-bottom: 0.8rem;  /* 标题底部间距 */
}

/* 响应式设计：针对小屏幕（如手机）设置更小的字体 */
@media (max-width: 768px) {
  .post, .entry, .post-content {
    font-size: 14px;  /* 手机设备上使用稍小字体 */
  }

  .post-title, .entry-title {
    font-size: 22px;  /* 手机设备上标题字体略小 */
  }
}
/* 默认状态：目录卡片样式 */
#toc-card {
  position: relative;   /* 默认使用相对定位 */
  z-index: 10;          /* 确保它在内容层之上 */
  width: 100%;          /* 保证卡片宽度占满 */
  padding: 14px 14px 12px;  /* 保持一致的内边距 */
  background: #fff;     /* 背景色保持一致 */
  border: 1px solid rgba(0, 0, 0, 0.08); /* 边框保持一致 */
  border-radius: 12px;  /* 保持圆角 */
  transition: none;     /* 移除动画过渡效果 */
}

/* 吸附状态：目录卡片样式 */
#toc-card.sticky {
  position: fixed;      /* 固定在页面顶部 */
  top: 40px;            /* 顶部80px，确保不会与导航栏重叠 */
  width: 100%;          /* 保证宽度占满 */
  padding: 14px 14px 12px;  /* 保持与默认状态一致的内边距 */
  background: #fff;     /* 背景色保持一致 */
  border: 1px solid rgba(0, 0, 0, 0.08);  /* 保持边框样式不变 */
  border-radius: 12px;  /* 保持圆角 */
}

/* —— 目录内容可滚动 —— */
#toc {
  max-height: calc(100vh - 80px - 32px); /* 视口高度减去顶部间距与卡片内边距 */
  overflow-y: auto;
}

/* 适配小屏幕：禁用固定效果，避免影响布局 */
@media (max-width: 768px) {
  #toc-card {
    position: static;  /* 在小屏幕上恢复为静态定位 */
    width: 100%;       /* 保证宽度 */
  }
  #toc {
    max-height: none;  /* 让目录区域不受限制 */
  }
}
.search-keyword-box {
    margin: 10px 0;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    display: inline-block;
}

.search-keyword-label {
    color: #666;
    margin-right: 5px;
}

.search-keyword-value {
    color: #333;
    font-weight: bold;
}
