/*
 *  __                  __
 * /\ \                /\ \
 * \ \ \___   __  __   \_\ \     __
 *  \ \  _ `\/\ \/\ \  /'_` \  /'__`\
 *   \ \ \ \ \ \ \_\ \/\ \_\ \/\  __/
 *    \ \_\ \_\/`____ \ \___,_\ \____\
 *     \/_/\/_/`/___/> \/__,_ /\/____/
 *                /\___/
 *                \/__/
 *
 * Designed, built, and released under MIT license by @mdo. Learn more at
 * https://github.com/poole/hyde.
 */


/*
 * Contents
 *
 * Global resets
 * Sidebar
 * Container
 * Reverse layout
 * Themes
 */


/*
 * Global resets
 *
 * Update the foundational and global aspects of the page.
 */

html {
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
}
@media (min-width: 48em) {
  html {
    font-size: 16px;
  }
}
@media (min-width: 58em) {
  html {
    font-size: 20px;
  }
}


/*
 * Sidebar
 *
 * Flexible banner for housing site name, intro, and "footer" content. Starts
 * out above content in mobile and later moves to the side with wider viewports.
 */

.sidebar {
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(255,255,255,.5);
  background-color: #202020;
}
@media (min-width: 48em) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 18rem;
    text-align: left;
  }
}

/* Sidebar links */
.sidebar a {
  color: #fff;
}

/* About section */
.sidebar-about h1 {
  color: #fff;
  margin-top: 0;
  font-family: "Abril Fatface","Noto Serif SC",serif;
  font-size: 3.25rem;
}

/* Sidebar nav */
.sidebar-nav {
  margin-bottom: 1rem;
}
.sidebar-nav-item {
  display: block;
  line-height: 1.75;
}
a.sidebar-nav-item:hover,
a.sidebar-nav-item:focus {
  text-decoration: underline;
}
.sidebar-nav-item.active {
  font-weight: bold;
}

/* Sticky sidebar
 *
 * Add the `sidebar-sticky` class to the sidebar's container to affix it the
 * contents to the bottom of the sidebar in tablets and up.
 */

@media (min-width: 48em) {
  .sidebar-sticky {
    position: absolute;
    right:  1rem;
    bottom: 1rem;
    left:   1rem;
  }
}


/* Container
 *
 * Align the contents of the site above the proper threshold with some margin-fu
 * with a 25%-wide `.sidebar`.
 */

.content {
  padding-top:    4rem;
  padding-bottom: 4rem;
}

@media (min-width: 48em) {
  .content {
    max-width: 38rem;
    margin-left: 20rem;
    margin-right: 2rem;
  }
}

@media (min-width: 64em) {
  .content {
    margin-left: 22rem;
    margin-right: 4rem;
  }
}


/*
 * Reverse layout
 *
 * Flip the orientation of the page by placing the `.sidebar` on the right.
 */

@media (min-width: 48em) {
  .layout-reverse .sidebar {
    left: auto;
    right: 0;
  }
  .layout-reverse .content {
    margin-left: 2rem;
    margin-right: 20rem;
  }
}

@media (min-width: 64em) {
  .layout-reverse .content {
    margin-left: 4rem;
    margin-right: 22rem;
  }
}



/*
 * Themes
 *
 * As of v1.1, Hyde includes optional themes to color the sidebar and links
 * within blog posts. To use, add the class of your choosing to the `body`.
 */

/* Base16 (http://chriskempson.github.io/base16/#default) */

/* Red */
.theme-base-08 .sidebar {
  background-color: #ac4142;
}
.theme-base-08 .content a,
.theme-base-08 .related-posts li a:hover {
  color: #ac4142;
}

/* Orange */
.theme-base-09 .sidebar {
  background-color: #d28445;
}
.theme-base-09 .content a,
.theme-base-09 .related-posts li a:hover {
  color: #d28445;
}

/* Yellow */
.theme-base-0a .sidebar {
  background-color: #f4bf75;
}
.theme-base-0a .content a,
.theme-base-0a .related-posts li a:hover {
  color: #f4bf75;
}

/* Green */
.theme-base-0b .sidebar {
  background-color: #90a959;
}
.theme-base-0b .content a,
.theme-base-0b .related-posts li a:hover {
  color: #90a959;
}

/* Cyan */
.theme-base-0c .sidebar {
  background-color: #75b5aa;
}
.theme-base-0c .content a,
.theme-base-0c .related-posts li a:hover {
  color: #75b5aa;
}

/* Blue */
.theme-base-0d .sidebar {
  background-color: #6a9fb5;
}
.theme-base-0d .content a,
.theme-base-0d .related-posts li a:hover {
  color: #6a9fb5;
}

/* Magenta */
.theme-base-0e .sidebar {
  background-color: #aa759f;
}
.theme-base-0e .content a,
.theme-base-0e .related-posts li a:hover {
  color: #aa759f;
}

/* Brown */
.theme-base-0f .sidebar {
  background-color: #8f5536;
}
.theme-base-0f .content a,
.theme-base-0f .related-posts li a:hover {
  color: #8f5536;
}
/* 文章头部布局 */
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
/* === 文章标题和元信息布局 === */

/* 移除原有的文章标题样式，使用新的布局 */
.posts .post {
  margin-bottom: 1rem; /* 减小文章间距 */
}
.posts .post .post-title {
  display: flex;
  align-items: baseline; /* 基线对齐 */
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
  flex-wrap: wrap; /* 允许在小屏幕上换行 */
  gap: 0.5rem;
  position: relative;
}

/* 标题前面的圆点 */
.posts .post .post-title::before {
  content: "·";
  color: #000;
  font-weight: bold;
  margin-right: 0.25rem;
}

/* 标题链接样式 */
.posts .post .post-title a {
  text-decoration: none;
  color: #333;
  font-size: 1.25rem;
  font-weight: bold;
  order: 1; /* 确保标题在第一位置 */
  font-family: "KaiTi", "楷体", "STKaiti","BiauKai", "DFKai-SB", "Noto Serif SC","Microsoft JhengHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial,serif;
}

.posts .post .post-title a:hover {
  color: #268bd2;
}

/* 行内元信息容器 */
.posts .post .post-meta-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #666;
  font-weight: normal;
  white-space: nowrap;
  order: 2; /* 在标题后面 */
}

/* 日期样式 */
.posts .post .post-date {
  color: #888;
  font-style: italic;
}

/* 分类标签样式 */
.posts .post .post-categories {
  display: flex;
  gap: 0.5rem;
}

.posts .post .category {
  background: #f0f0f0;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.75rem;
  color: #555;
}

/* 文章摘要样式 */
.posts .post .post-excerpt {
  color: #444;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-left: 1rem; /* 缩进与圆点对齐 */
  padding-left: 0.5rem;
  border-left: 2px solid #f0f0f0;
  font-family: "FangSong","仿宋","Fangsong", "Noto Serif SC","Microsoft JhengHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial,serif;
  font-weight: bold;
}
/* === 最新文章特殊样式 === */
.posts .post:first-child {
  position: relative;
  padding-top: 1rem;
}

/* 最新文章的横线边框 */
.posts .post:first-child::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;  
  height: 2px;
  background: #000; /* 渐变横线 */
  border-radius: 1px;
}
.content {
  color: #222;
  font-family: 'Noto Serif SC',"SimSun", "宋体", "Songti", "Microsoft JhengHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, serif; /* 正文使用宋体 */
  font-weight: bold; /* 加粗 */
  line-height: 1.7;
}

/* 确保代码块保持等宽字体且不加粗 */
.content code, 
.content pre {
  font-family: "Monaco", "Menlo", "Consolas", "Courier New", monospace;
  font-weight: normal; /* 代码不加粗 */
}

/* === Related Posts 相关文章样式 === */
.related {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eaeaea;
}

.related h2 {
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #111;
}

.related-posts {
  list-style: none;
  padding-left: 0;
}

.related-posts li {
  margin-bottom: 0.75rem;
}

.related-posts h3 {
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  margin: 0;
}

.related-posts a {
  text-decoration: none;
  color: #111;
  display: block;
}

.related-posts a:hover {
  color: #268bd2;
}

.related-posts small {
  display: block;
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.25rem;
}


/* 响应式设计 */
@media (max-width: 768px) {
  .posts .post .post-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .posts .post .post-title::before {
    margin-right: 0;
    margin-bottom: 0.25rem;
  }
  
  .posts .post .post-excerpt {
    margin-left: 0;
    border-left: none;
    padding-left: 0;
  }
  .posts .post:first-child {
    padding-top: 1.25rem;
  }
}
  .posts .post .post-title a,
  .posts .post .post-excerpt,
  .content {
    text-shadow: none; /* 移除文字阴影，移动端渲染更好 */
  }
}
/* 修复版：确保路径正确且不覆盖侧边栏 */
body {
    position: relative;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: url("/images/background.jpg");
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    opacity: 0.175; /* 很淡的背景 */
    z-index: -1;
    pointer-events: none;
}

/* 确保内容区域可读 */
.content {
    background: transparent; /* 改为透明 */
    position: relative;
    z-index: 1;
}
.sidebar {
    background: rgba(32, 32, 32, 0.95);
}
/* 移除文章区域的背景色 */
.post, .page {
    background: transparent; /* 改为透明 */
    /* 或者保留轻微透明度 */
    /* background: rgba(255, 255, 255, 0.1); */
}

/* 移除分页器的背景色 */
.pagination {
    background: transparent;
}

/* 确保文章标题区域透明 */
.post-title {
    background: transparent;
}

/* 文章摘要区域透明 */
.post-excerpt {
    background: transparent;
    border-left: 2px solid rgba(240, 240, 240, 0.3); /* 改为半透明边框 */
}
/* 增强文字对比度 */
.post-title a {
    color: #222; /* 更深的颜色 */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8); /* 文字阴影增强可读性 */
}

.post-excerpt {
    color: #333; /* 深灰色 */
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
}

/* 分类标签保持轻微背景但半透明 */
.posts .post .category {
    background: rgba(240, 240, 240, 0.7); /* 半透明背景 */
    color: #333;
}
/* 翻页器样式优化 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eaeaea;
}

.pagination-item {
    text-decoration: none;
    font-size: 1.5rem; /* 增大箭头大小 */
    font-weight: bold;
    color: #333;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8); /* 半透明背景 */
}

.pagination-item:hover:not(span) {
    background: #333;
    color: white;
    border-color: #333;
}

.pagination-item.older {
    order: 2; /* 确保 → 在右边 */
}

.pagination-item.newer {
    order: 1; /* 确保 ← 在左边 */
}

/* 禁用状态的箭头 */
.pagination-item[disabled], 
.pagination-item:disabled {
    color: #ccc;
    border-color: #eee;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.5);
}

/* 移动端优化 */
@media (max-width: 48em) {
    .pagination-item {
        font-size: 1.25rem;
        padding: 0.4rem 0.8rem;
    }
}
/* 右上角固定图片 - 修改版 (位于遮罩下) */
#corner-image-container {
    position: fixed; /* 固定定位 */
    bottom: 20px;      /* 距顶部距离，可调 */
    right: 20px;    /* 距右侧距离，可调 */
    width: 300px;   /* 缩小宽度 (原为500px) */
    height: 300px;  /* 缩小高度 (原为500px) */
    z-index: -2;    /* 关键！设置为小于遮罩z-index(-1)的值，使其位于遮罩之下 */
    pointer-events: none; /* 鼠标事件穿透，不影响操作 */
}
#corner-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 完整显示图片，不会被拉伸 */
    opacity: 0.8; /* 可选：如果觉得图片太显眼，可以稍微降低不透明度 */
}
/* 移动端隐藏此图片 */
@media (max-width: 48em) {
    #corner-image-container {
        display: none;
    }
}
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content {
  display: block;
  margin: auto;
  max-width: 90%;
  max-height: 80%;
  margin-top: 5%;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.close:hover {
  color: #bbb;
}

.caption {
  text-align: center;
  color: #ccc;
  padding: 10px 20px;
  position: absolute;
  bottom: 20px;
  width: 100%;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.3s;
  user-select: none;
  background-color: rgba(0,0,0,0.5);
  border-radius: 0 3px 3px 0;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}
/* 响应式设计 */
@media (max-width: 768px) {
  .album-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .lightbox-content {
    max-width: 95%;
    max-height: 70%;
  }
}
/* 文章内图片卡片样式（仿相册） */
.post-image-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 1.5rem 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.post-image-card img {
    width: 100%;
    height: auto;
    display: block;
}

.post-image-caption {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    background: rgba(255,255,255,0.9);
    border-top: 1px solid #eee;
}
