/* 1/3高度的头图样式 */
#page-header.one_third_page {
    height: 33.33vh !important;
    position: relative;
    /* background-attachment: fixed; */ /* Temporarily removed */
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat;
}

/* 电脑屏幕中等宽度 */
@media (max-width: 1366px) {
    #page-header.one_third_page {
        background-position: center center !important;
        background-size: cover !important;
    }
}

/* 平板端 */
@media (max-width: 1024px) {
    #page-header.one_third_page {
        background-attachment: scroll;
        background-position: center center !important;
        background-size: cover !important;
    }
}

/* 小平板端 */
@media (max-width: 768px) {
    #page-header.one_third_page {
        background-position: center center !important;
        background-size: cover !important;
    }
}

/* 手机端 */
@media (max-width: 600px) {
    #page-header.one_third_page {
        background-attachment: scroll;
        background-position: center center !important;
        background-size: cover !important;
        background-repeat: no-repeat;
    }
}

#page-header.one_third_page #site-info {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 10px;
    width: 100%;
}

/* 作者信息框样式 */
.author-info-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 10;
    width: 300px;
}

.author-info-box.dark-mode {
    color: #fff;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 10px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.6);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.author-description {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* 雪花特效相关样式 */
.snowflake {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    filter: drop-shadow(0 0 5px white);
    pointer-events: none;
    opacity: 0.8;
    will-change: transform; /* 提高性能 */
    z-index: 2;
}

.snow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

/* 移动设备上降低特效复杂度 */
@media (max-width: 768px) {
    .snowflake {
        filter: none; /* 移除阴影效果 */
    }
}

/* 修复头部背景图位置 */
#page-header.full_page {
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat;
    /* background-attachment: fixed; */ /* Temporarily removed */
}

/* 电脑屏幕中等宽度 - 全页面模式 */
@media (max-width: 1366px) {
    #page-header.full_page {
        background-position: center center !important;
        background-size: cover !important;
    }
}

/* 平板端 - 全页面模式 */
@media (max-width: 1024px) {
    #page-header.full_page {
        background-position: center center !important;
        background-size: cover !important;
        background-attachment: scroll;
    }
}

/* 小平板端 - 全页面模式 */
@media (max-width: 768px) {
    #page-header.full_page {
        background-position: center center !important;
        background-size: cover !important;
    }
}

/* 手机端 - 全页面模式 */
@media (max-width: 600px) {
    #page-header.full_page {
        background-position: center center !important;
        background-size: cover !important;
        background-attachment: scroll;
    }
}

/* 添加适用于平板的媒体查询 */
@media (min-width: 601px) and (max-width: 1024px) {
    #page-header.one_third_page,
    #page-header.full_page {
        background-position: center center !important;
        background-size: cover !important;
        background-attachment: scroll;
    }
} 

/* 搜索框相关动画 */
@keyframes to_show {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes to_hide {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes titleScale {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes search_close {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.7);
  }
}

/* 搜索结果关键词高亮 */
#local-search .search-dialog .local-search__hit-item .search-keyword {
  color: #f47466;
  font-weight: bold;
}

/* 搜索结果为空提示样式 */
#local-search__hits-empty {
  padding: 10px;
  text-align: center;
  color: #888;
  font-size: 14px;
}

/* 伸展搜索框样式 */
.expandable-search {
  display: flex;
  align-items: center;
  position: relative;
}

.expandable-search .search-input {
  width: 0;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--font-color);
  font-size: 16px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.expandable-search .search-input.expanded {
  width: 180px;
  padding: 5px 5px 5px 0;
  border-bottom: 2px solid var(--btn-bg);
}

.expandable-search .search-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: inherit;
  margin-left: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 媒体查询适配移动设备 */
@media (max-width: 768px) {
  .expandable-search .search-input.expanded {
    width: 140px;
  }
}

/* 适应深色模式 */
[data-theme="dark"] .expandable-search .search-input {
  color: #eee;
  border-bottom-color: #555;
}

[data-theme="dark"] .expandable-search .search-input.expanded {
  border-bottom-color: var(--btn-bg);
}

/* 桌面版搜索框样式优化 */
.desktop-search {
  margin-right: 10px;
  position: relative;
}

.desktop-search .search-input {
  font-size: 14px;
}

.desktop-search .search-input.expanded {
  width: 150px;
}

/* 移动端侧栏搜索框样式优化 */
.mobile-search {
  width: 100%;
  margin: 5px 0;
}

.mobile-search .search-input.expanded {
  width: calc(100% - 40px);
  border-bottom: 2px solid var(--btn-bg);
}

.mobile-search .search-button {
  padding: 8px;
  margin-left: auto;
}

/* 在深色模式下修改搜索框的样式 */
[data-theme="dark"] .expandable-search .search-input.expanded {
  color: #eee;
  border-bottom-color: #555;
}

/* 处理浮动页面头部的搜索框样式 */
#page-header.nav-fixed .expandable-search .search-input {
  color: var(--font-color);
}

#page-header.nav-fixed .expandable-search .search-button {
  color: var(--font-color);
}

/* 处理主页全屏模式下的搜索框样式 */
#page-header:not(.nav-fixed) .expandable-search .search-input {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#page-header:not(.nav-fixed) .expandable-search .search-button {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#page-header:not(.nav-fixed) .expandable-search .search-input.expanded {
  border-bottom-color: rgba(255, 255, 255, 0.7);
}

/* 移动端侧栏搜索样式 */
#sidebar-dSearch {
  display: inline-block;
}

#sidebar-dSearch>input {
  border: none;
  opacity: 1;
  outline: none;
  width: 35px;
  text-indent: 2px;
  transition: all .5s;
  background: transparent;
  color: var(--font-color);
}

#sidebar-dSearch>input:focus {
  width: 150px;
  border-bottom: 1px solid var(--btn-bg);
}

/* 修改搜索结果页样式 */
.archive-header {
  position: relative;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.archive-header .archive-page-counter {
  position: relative;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--font-color);
}

.search-header .search-page-info {
  font-size: 1rem;
  margin-top: 10px;
  color: #666;
}

/* 半页高度(50%)的头图样式 */
#page-header.half_page {
    height: 50vh !important;
    position: relative;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat;
}

/* 电脑屏幕中等宽度 - 半页模式 */
@media (max-width: 1366px) {
    #page-header.half_page {
        background-position: center center !important;
        background-size: cover !important;
    }
}

/* 平板端 - 半页模式 */
@media (max-width: 1024px) {
    #page-header.half_page {
        background-attachment: scroll;
        background-position: center center !important;
        background-size: cover !important;
    }
}

/* 小平板端 - 半页模式 */
@media (max-width: 768px) {
    #page-header.half_page {
        background-position: center center !important;
        background-size: cover !important;
    }
}

/* 手机端 - 半页模式 */
@media (max-width: 600px) {
    #page-header.half_page {
        background-attachment: scroll;
        background-position: center center !important;
        background-size: cover !important;
        background-repeat: no-repeat;
    }
}

#page-header.half_page #site-info {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 10px;
    width: 100%;
}

/* 作者信息框样式 */
.author-info-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 10;
    width: 300px;
}

.author-info-box.dark-mode {
    color: #fff;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 10px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.6);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.author-description {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    color: #fff;
} 