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

/* ------------------
 * Global style
 * --------------- */
 body {
  background-color: #FFFFFF;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding-top: 160px;
}

.container {
  max-width: 1400px;
  padding: 0 20px;
  margin: 0 auto;
}

a {
  text-decoration: none;
  color: #4e54c8;
  transition: all 0.3s ease;
}

a:hover {
  color: #3a3f9d;
}

pre, code {
  padding: 2px 4px;
  background: #F3F3F0;
  font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
  font-size: .92857em;
}
code { color: #B94A48; }
pre {
  padding: 8px;
  overflow: auto;
  max-height: 400px;
}
pre code {
  padding: 0;
  color: #444;
}

blockquote {
  margin: 1em 1.5em;
  padding-left: 1.5em;
  border-left: 4px solid #F3F3F0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Helvetica Neue", Helvetica, Arial, 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 {
  text-decoration: none;
  color: #666;
  border-bottom: 1px solid #EEE;
}

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

.browsehappy {
  padding: 8px 0;
  background: #FBE3E4;
  color: #8A1F11;
  text-align: center;
}
.browsehappy a {
  color: #8A1F11;
  text-decoration: underline;
  font-weight: bold;
}

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

#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 15px 0;
  border: none;
}

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

/* Navigation menu */
#nav-menu {
  margin-top: 15px;
  padding: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
#nav-menu a {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: 4px;
  color: #333;
  transition: all 0.3s ease;
}
#nav-menu a:hover,
#nav-menu .current {
  background: #4e54c8;
  color: #FFFFFF;
}

#nav-menu a i {
  margin-right: 6px;
}

/* 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 {
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 24px;
  margin-bottom: 24px;
  border: none;
}
.post-title {
  font-size: 1.8em;
  margin: 0 0 16px;
}
.post-title a {
  text-decoration: none;
  color: #333;
}
.post-title a:hover {
  color: #4e54c8;
}
.post-meta {
  color: #666;
  margin-bottom: 16px;
}
.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.5;
}
.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 -1em;
  padding-top: 20px;
  color: #999;
  font-size: 1em;
}
.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;
  background: #FFFFFF;
  border: 1px solid #eee;
  border-radius: 4px;
  text-decoration: none;
}
.page-navigator a:hover {
  background: #EEE;
  text-decoration: none;
}

.page-navigator .current a {
  color: #FFFFFF;
  background: #4e54c8;
  border-color: #4e54c8;
}

/* ------------------
 * Comment list
 * --------------- */
#comments {
  margin-top: 40px;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* 评论列表基础样式 */
.comment-list, 
.comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 评论项容器 */
.comment-list .comment-body {
  position: relative;
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  transition: all 0.3s ease;
}

/* 评论嵌套样式 */
.comment-list .comment-children {
  margin-left: 40px;
  position: relative;
}

/* 嵌套评论的连接线 */
.comment-list .comment-children:before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #eee;
}

/* 评论头部信息布局 */
.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

/* 头像样式 */
.comment-author .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 作者信息样式 */
.comment-author-info {
  flex: 1;
}

.comment-author cite {
  font-style: normal;
  font-weight: 600;
  color: #333;
  font-size: 1.1em;
  display: block;
  margin-bottom: 2px;
}

/* 评论元信息 */
.comment-meta {
  font-size: 0.85em;
  color: #999;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-meta a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.comment-meta a:hover {
  color: #4e54c8;
}

/* 评论内容 */
.comment-content {
  margin: 15px 0;
  line-height: 1.6;
  color: #444;
  word-wrap: break-word;
}

.comment-content p {
  margin: 0;
}

/* 评论回复按钮 */
.comment-reply {
  text-align: right;
  margin-top: 10px;
}

.comment-reply a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 15px;
  color: #666;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.comment-reply a:hover {
  background: #4e54c8;
  color: #fff;
  border-color: #4e54c8;
}

/* 作者评论特殊样式 */
.comment-by-author > .comment-body {
  background: linear-gradient(to right, #f0f4ff, #f8f9fa);
  border-left: 4px solid #4e54c8;
}

/* 评论分页导航 */
.comment-navigator {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.comment-navigator .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 18px;
  color: #666;
  transition: all 0.3s ease;
}

.comment-navigator .page-numbers.current {
  background: #4e54c8;
  color: #fff;
  border-color: #4e54c8;
}

.comment-navigator .page-numbers:hover {
  background: #4e54c8;
  color: #fff;
  border-color: #4e54c8;
}

/* 评论表单响应式布局 */
.comment-form-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .comment-form-fields {
    grid-template-columns: 1fr;
  }
  
  .comment-list .comment-children {
    margin-left: 20px;
  }
  
  .comment-list .comment-children:before {
    left: -10px;
  }
  
  .comment-author .avatar {
    width: 32px;
    height: 32px;
  }
}

/* 评论加载动画 */
@keyframes commentFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comment-body {
  animation: commentFadeIn 0.5s ease forwards;
}

/* 评论悬停效果 */
.comment-body:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* 评论表单样式 */
#respond {
  margin-top: 30px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.respond-title {
  font-size: 1.2em;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

#comment-form {
  display: grid;
  gap: 15px;
}

#comment-form p {
  margin: 0;
}

#comment-form .required {
  color: #e74c3c;
}

#comment-form input[type="text"],
#comment-form input[type="email"],
#comment-form input[type="url"],
#comment-form textarea {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #eee;
  border-radius: 8px;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

#comment-form input:focus,
#comment-form textarea:focus {
  border-color: #4e54c8;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(78,84,200,0.1);
}

#comment-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: #4e54c8;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#comment-form button:hover {
  background: #3a3f9d;
  transform: translateY(-2px);
}

/* 取消回复按钮 */
.cancel-comment-reply {
  margin: 15px 0;
  text-align: right;
}

.cancel-comment-reply a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #ff4757;
  border-radius: 20px;
  color: #ff4757;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.cancel-comment-reply a i {
  font-size: 0.85em;
}

.cancel-comment-reply a:hover {
  background: #ff4757;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.2);
}

/* 当回复模式激活时的样式 */
.respond-active {
  animation: slideIn 0.3s ease;
  border-left: 4px solid #4e54c8;
  padding-left: 20px;
  margin-left: 10px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 评论表单标题在回复模式下的样式 */
.respond-active .respond-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4e54c8;
}

.respond-active .respond-title:before {
  content: '';
  width: 4px;
  height: 20px;
  background: #4e54c8;
  border-radius: 2px;
}

/* 评论为空时的提示 */
.no-comments {
  text-align: center;
  padding: 40px 0;
  color: #666;
}

.no-comments i {
  display: block;
  font-size: 2em;
  color: #ddd;
  margin-bottom: 10px;
}

/* 响应式适配 */
@media (max-width: 767px) {
  #comments {
    padding: 20px;
  }
  
  .comment-list .comment-children {
    margin-left: 15px;
    padding-left: 15px;
  }
  
  .comment-author .avatar {
    width: 32px;
    height: 32px;
  }
  
  #comment-form {
    gap: 10px;
  }
}

/* ------------------
 * secondary
 * --------------- */
#secondary {
  padding-top: 15px;
  word-wrap: break-word;
  width: 25%;
}
.widget {
  margin-bottom: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow: hidden;
}

.widget-title {
  margin: 0;
  padding: 15px 20px;
  font-size: 1.1em;
  border-bottom: 1px solid #eee;
  color: #333;
}

.widget-title i {
  margin-right: 8px;
  color: #4e54c8;
}

.widget-list {
  margin: 0;
  padding: 15px 20px;
  list-style: none;
}

/* 最新文章 */
.recent-posts li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f5f5f5;
}

.recent-posts li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.recent-posts .post-title {
  display: block;
  margin-bottom: 4px;
  color: #333;
  transition: color 0.3s ease;
}

.recent-posts .post-date {
  font-size: 0.85em;
  color: #999;
}

/* 最近评论 */
.recent-comments li {
  display: flex;
  align-items: start;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f5f5f5;
}

.recent-comments li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.comment-avatar {
  margin-right: 12px;
}

.comment-avatar .avatar {
  border-radius: 50%;
}

.comment-content {
  flex: 1;
}

.comment-author {
  margin-bottom: 4px;
  color: #333;
  font-weight: 500;
}

.comment-text {
  color: #666;
  font-size: 0.9em;
}

/* 分类和归档 */
.categories li a,
.archives li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: #666;
  transition: all 0.3s ease;
}

.categories li a:hover,
.archives li a:hover {
  color: #4e54c8;
  padding-left: 8px;
}

.count {
  font-size: 0.85em;
  color: #999;
}

/* 页脚样式 */
#footer {
  margin-top: 60px;
  padding: 40px 0;
  background: #fff;
  border-top: 1px solid #eee;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-info {
  color: #666;
}

.footer-info p {
  margin: 5px 0;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #666;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: #4e54c8;
  color: #fff;
  transform: translateY(-2px);
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.back-to-top.show {
  visibility: visible;
  opacity: 1;
}

.back-to-top a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #4e54c8;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(78, 84, 200, 0.3);
  transition: all 0.3s ease;
}

.back-to-top a:hover {
  background: #3a3f9d;
  transform: translateY(-2px);
}

/* 响应式优化 */
@media (max-width: 767px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  
  .back-to-top {
    right: 20px;
    bottom: 20px;
  }
}


/* -----------------
 * Error page
 * -------------- */
.error-page {
  padding: 60px 0;
  text-align: center;
}

.error-page-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.error-page-icon {
  font-size: 4em;
  color: #4e54c8;
  margin-bottom: 20px;
}

.error-page-title {
  margin: 0 0 20px;
  color: #333;
  font-size: 2em;
}

.error-page-description {
  margin-bottom: 30px;
  color: #666;
}

.error-page-description ul {
  text-align: left;
  margin: 15px 0;
  padding-left: 20px;
}

.error-page-search {
  margin-bottom: 30px;
}

.search-input-group {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

.error-page-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.primary-btn {
  background: #4e54c8;
  color: #fff;
}

.primary-btn:hover {
  background: #3a3f9d;
  color: #fff;
}

/* 归档页面样式 */
.archive-header {
  margin-bottom: 30px;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  text-align: center;
}

.archive-icon {
  font-size: 2.5em;
  color: #4e54c8;
  margin-bottom: 20px;
}

.archive-title {
  margin: 0 0 15px;
  color: #333;
  font-size: 1.8em;
}

.archive-description {
  margin: 15px 0;
  color: #666;
}

.archive-meta {
  color: #999;
  font-size: 0.9em;
}

.archive-post-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.no-content {
  text-align: center;
  padding: 40px 0;
  color: #666;
}

.no-content i {
  font-size: 3em;
  color: #ddd;
  margin-bottom: 15px;
}

/* 响应式优化 */
@media (max-width: 767px) {
  .error-page {
    padding: 30px 0;
  }
  
  .error-page-container {
    padding: 20px;
  }
  
  .error-page-icon {
    font-size: 3em;
  }
  
  .error-page-title {
    font-size: 1.6em;
  }
  
  .archive-header {
    padding: 20px;
  }
  
  .archive-icon {
    font-size: 2em;
  }
  
  .archive-title {
    font-size: 1.4em;
  }
}


/* -----------------
 * 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) {
  #header,
  .post-title,
  .post-meta {
    text-align: center;
  }
}

@media (min-width: 992px) {

}

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


/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
  display: none !important;
  visibility: hidden; }

/*
* 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; }

/* 搜索栏样式优化 */
.site-search {
    margin: 5px 0;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
}

.search-wrapper input.text {
    width: 100%;
    height: 40px;
    padding: 8px 40px 8px 16px;
    border: 2px solid #eee;
    border-radius: 20px;
    background: #fff;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-wrapper input.text:focus {
    border-color: #4e54c8;
    box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.1);
    outline: none;
}

.search-wrapper input.text::placeholder {
    color: #999;
}

.search-wrapper .submit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-wrapper .submit:hover {
    color: #4e54c8;
}

.search-wrapper .submit i {
    font-size: 16px;
}

/* 移动端适配 */
@media (max-width: 767px) {
    .site-search.kit-hidden-tb {
        display: block !important;
    }
    
    .site-search {
        width: 100%;
        margin: 3px 0;
        padding: 0 15px;
    }
    
    .search-wrapper {
        max-width: 100%;
        margin: 0;
    }
    
    .search-wrapper input.text {
        height: 38px;
        font-size: 14px;
        padding: 8px 38px 8px 15px;
    }
    
    .search-wrapper .submit {
        right: 10px;
        width: 30px;
        height: 30px;
    }
    
    .search-wrapper .submit i {
        font-size: 14px;
    }
}

/* 搜索框动画效果 */
@keyframes searchFocus {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.search-wrapper input.text:focus {
    animation: searchFocus 0.3s ease;
}

/* 站点标题样式 */
.site-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* 导航菜单图标 */
#nav-menu a i {
    margin-right: 4px;
}

/* 响应式优化 */
@media (max-width: 767px) {
    #header {
        padding: 10px 0;
    }
    
    .site-search {
        margin: 15px 0;
    }
    
    #nav-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    #nav-menu a {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* 文章卡片增强样式 */
.post-banner {
    margin: -24px -24px 20px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.post-banner img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-banner img:hover {
    transform: scale(1.05);
}

.post-content-wrapper {
    position: relative;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    font-size: 0.9em;
    color: #666;
}

.post-meta li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    border: none;
}

.post-meta i {
    margin-right: 6px;
    color: #4e54c8;
}

/* 阅读更多按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #4e54c8;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.btn i {
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.btn:hover {
    background: #3a3f9d;
    color: #fff;
}

.btn:hover i {
    transform: translateX(4px);
}

/* 分页导航增强 */
.page-navigator-wrapper {
    margin-top: 40px;
}

.page-navigator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-navigator li {
    margin: 0;
}

.page-navigator a,
.page-navigator span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #eee;
    color: #333;
    transition: all 0.3s ease;
}

.page-navigator a:hover,
.page-navigator span:hover {
    background: #4e54c8;
    color: #fff;
}

/* 文章详情页样式 */
.post-title {
    font-size: 2em;
    margin-bottom: 20px;
}

.post-content {
    line-height: 1.8;
    margin-bottom: 30px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-content h2,
.post-content h3 {
    margin: 1.5em 0 1em;
    color: #333;
}

.post-tags {
    margin: 30px 0;
    color: #666;
}

.post-tags a {
    display: inline-block;
    margin: 0 8px 8px 0;
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 15px;
    color: #666;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: #4e54c8;
    color: #fff;
}

.post-near {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-near-item {
    max-width: 45%;
}

.post-near-item.prev {
    text-align: left;
}

.post-near-item.next {
    text-align: right;
}

/* 评论区样式 */
.comments-area {
    margin-top: 40px;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.comments-title,
.comment-reply-title {
    font-size: 1.4em;
    margin-bottom: 20px;
    color: #333;
}

.comments-title i,
.comment-reply-title i {
    margin-right: 8px;
    color: #4e54c8;
}

.comment-list {
    margin: 0;
    padding: 0;
}

.comment-body {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.comment-author {
    color: #333;
    font-weight: 500;
}

.comment-meta {
    margin: 8px 0;
    font-size: 0.9em;
    color: #666;
}

.comment-content {
    margin-top: 12px;
    line-height: 1.6;
}

/* 评论表单 */
.comment-form-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.comment-form p {
    margin: 0 0 15px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.comment-form input.text,
.comment-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.comment-form input.text:focus,
.comment-form textarea:focus {
    border-color: #4e54c8;
    box-shadow: 0 0 0 2px rgba(78, 84, 200, 0.2);
    outline: none;
}

.comment-form-submit {
    text-align: right;
}

/* 响应式优化 */
@media (max-width: 767px) {
    .post-title {
        font-size: 1.6em;
    }
    
    .comment-form-fields {
        grid-template-columns: 1fr;
    }
    
    .post-near {
        flex-direction: column;
        gap: 15px;
    }
    
    .post-near-item {
        max-width: 100%;
    }
}

/* 文章目录样式 */
.post-toc {
    position: sticky;
    top: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.post-toc h3 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 1.1em;
}

.post-toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.post-toc li {
    margin: 8px 0;
    line-height: 1.4;
}

.post-toc a {
    color: #666;
    transition: all 0.3s ease;
}

.post-toc a:hover {
    color: #4e54c8;
    padding-left: 5px;
}

.toc-level-1 { padding-left: 0; }
.toc-level-2 { padding-left: 1em; }
.toc-level-3 { padding-left: 2em; }
.toc-level-4 { padding-left: 3em; }
.toc-level-5 { padding-left: 4em; }
.toc-level-6 { padding-left: 5em; }

/* 代码高亮优化 */
pre {
    position: relative;
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 6px;
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace;
    line-height: 1.5;
}

pre code {
    display: block;
    overflow-x: auto;
    padding: 0;
    font-size: 0.9em;
}

/* 章内容优化 */
.post-content {
    font-size: 1.1em;
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 1.5em 0 1em;
    color: #333;
}

.post-content p {
    margin: 1em 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.post-content blockquote {
    margin: 1em 0;
    padding: 15px 20px 15px 45px;
    background: #f8f9fa;
    border-radius: 6px;
    position: relative;
}

.post-content blockquote::before {
    content: '"';
    position: absolute;
    left: 20px;
    top: 15px;
    font-size: 2em;
    color: #4e54c8;
    font-family: Georgia, serif;
}

/* 响应式优化 */
@media (max-width: 767px) {
    .post-toc {
        display: none;
    }
    
    .post-content {
        font-size: 1em;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 导航栏动画 */
#header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.header-shadow {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* 代码块复制按钮 */
pre {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

pre:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* 图片查看器 */
.img-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.img-viewer.active {
    opacity: 1;
    visibility: visible;
}

.img-viewer img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.img-viewer.active img {
    transform: scale(1);
}

/* 文章目录激活状态 */
.post-toc a.active {
    color: #4e54c8;
    font-weight: 500;
}

/* 图片懒加载占位 */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src][src] {
    opacity: 1;
}

/* 文章列表动画 */
.post {
    animation: slideUp 0.6s ease forwards;
    opacity: 0;
}

.post:nth-child(2) { animation-delay: 0.1s; }
.post:nth-child(3) { animation-delay: 0.2s; }
.post:nth-child(4) { animation-delay: 0.3s; }
.post:nth-child(5) { animation-delay: 0.4s; }

/* 响应式优化 */
@media (max-width: 767px) {
    .copy-btn {
        opacity: 1;
    }
}

/* 修复导航栏遮挡问题 */
body {
    padding-top: 180px; /* 继续增加空间 */
}

/* 主容器布局优化 */
.main-container {
    position: relative;
    z-index: 1; /* 确保内容在导航栏下方 */
    padding-top: 40px; /* 增加顶部间距 */
    margin-top: 20px; /* 添加额外边距 */
}

/* 文章列表容器 */
.post-list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 30px; /* 文章卡片之间的间距 */
    margin-top: 20px; /* 确保与顶部有足够距 */
}

/* 文章卡片优化 */
.post {
    position: relative;
    margin: 0; /* 重置外边距 */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

/* 文章内容包装器 */
.post-content-wrapper {
    padding: 25px;
}

/* 文章标题样式 */
.post-title {
    margin: 0 0 15px;
    font-size: 1.5em;
    line-height: 1.4;
}

.post-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #4e54c8;
}

/* 文章元信息样式 */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    font-size: 0.9em;
    color: #666;
}

/* 文章摘要样式 */
.post-excerpt {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.8;
}

/* 阅读更多按钮 */
.post-more {
    text-align: right;
}

.post-more .btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 20px;
    background: #4e54c8;
    color: #fff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.post-more .btn:hover {
    background: #3a3f9d;
    transform: translateX(5px);
}

/* 分页导航样式优化 */
.page-navigator {
    margin-top: 40px;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* 响应式优化 */
@media (max-width: 767px) {
    body {
        padding-top: 180px;
    }
    
    .main-container,
    #body .container {
        padding-top: 30px;
        margin-top: 15px;
    }
    
    .post-content {
        margin-top: 15px;
        padding-top: 15px;
    }
}

/* 文章特色图片优化 */
.post-banner {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-banner:hover img {
    transform: scale(1.05);
}

/* 侧边栏位置优化 */
#secondary {
    margin-top: 30px;
}

@media (min-width: 768px) {
    #secondary {
        margin-top: 0;
    }
}

/* 全局容器布局优化 */
body {
    padding-top: 160px; /* 继续增加空间 */
}

/* 主容器通用样式 */
.main-container,
#body .container {  /* 添加文章详情页容器样式 */
    position: relative;
    z-index: 1;
    padding-top: 40px;
    margin-top: 20px;
}

/* 文章详情页样式优化 */
.post-content {
    position: relative;
    margin-top: 20px;
    padding-top: 20px;
}

/* 文章标题区域 */
.post-title {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 评论区域 */
#comments {
    margin-top: 40px;
    position: relative;
}

/* 响应式优化 */
@media (max-width: 767px) {
    body {
        padding-top: 180px;
    }
    
    .main-container,
    #body .container {
        padding-top: 30px;
        margin-top: 15px;
    }
    
    .post-content {
        margin-top: 15px;
        padding-top: 15px;
    }
}

/* 主内容区域样式 */
#main {
    width: 75%;
    padding-right: 30px;
}

/* 侧边栏样式 */
#secondary {
    width: 25%;
}

/* 响应式布局优化 */
@media (max-width: 991px) {
    #main {
        width: 100%;
        padding-right: 0;
    }
    
    #secondary {
        width: 100%;
        margin-top: 30px;
    }
}

/* 更小屏幕的优化 */
@media (max-width: 480px) {
    .site-search {
        margin: 2px 0; /* 更小屏幕的边距 */
    }
}

/* 公告栏样式 */
.notice-board {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    position: relative;
}

.notice-board:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--notice-color, #4e54c8);
}

.notice-content {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.notice-content i {
    color: var(--notice-color, #4e54c8);
    font-size: 1.2em;
    padding-top: 3px;
}

.notice-text {
    flex: 1;
    line-height: 1.6;
    color: #444;
}

.notice-text p:last-child {
    margin-bottom: 0;
}

/* 公告栏动画效果 */
@keyframes noticeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notice-board {
    animation: noticeFadeIn 0.5s ease forwards;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .notice-board {
        margin: 15px 0 20px;
    }
    
    .notice-content {
        padding: 15px;
    }
}

/* 添加主题色变量 */
:root {
    --notice-color: <?php echo $this->options->noticeColor ? $this->options->noticeColor : '#4e54c8'; ?>;
}

/* 导航卡片容器 */
.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 导航卡片样式 */
.nav-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
    position: relative;
    overflow: hidden;
}

.nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.nav-card:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--notice-color, #4e54c8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-card:hover:before {
    opacity: 1;
}

/* 导航卡片图标 */
.nav-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--notice-color, #4e54c8);
    border-radius: 10px;
    margin-right: 15px;
    color: #fff;
    font-size: 1.2em;
}

/* 导航卡片内容 */
.nav-card-content {
    flex: 1;
}

.nav-card-content h4 {
    margin: 0 0 5px;
    font-size: 1.1em;
    color: #333;
}

.nav-card-content p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
}

/* 导航卡片箭头 */
.nav-card-arrow {
    margin-left: 15px;
    color: #999;
    transition: transform 0.3s ease;
}

.nav-card:hover .nav-card-arrow {
    transform: translateX(5px);
    color: var(--notice-color, #4e54c8);
}

/* 导航卡片动画 */
@keyframes navCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-cards {
    animation: navCardFadeIn 0.5s ease forwards;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .nav-cards {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 15px 0 20px;
    }
    
    .nav-card {
        padding: 15px;
    }
}