/* 搜索框模态框样式 */
.header_search {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
}

.header_search.active {
  opacity: 1;
  visibility: visible;
}

.header_search .Xc_total {
  max-width: 500px !important;
  width: 70% !important;
  background: var(--background);
  border-radius: var(--radius-wrap);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transform: scale(0.9);
  transition: all 0.35s ease;
}

.header_search.active .Xc_total {
  transform: scale(1);
}

.header_search_all {
  padding: 20px;
}

.Xc_search_inner {
  display: flex;
  gap: 20px;
}

@media (max-width: 768px) {
  .Xc_search_inner {
    flex-direction: column;
  }
  
  .header_search .Xc_total {
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* 搜索框关闭按钮 */
.header_search_close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--main);
  font-size: 20px;
  font-weight: bold;
  transition: all 0.35s ease;
  z-index: 10;
  background: var(--classB);
  border-radius: 50%;
  border: 2px solid var(--classA);
  box-shadow: var(--box-shadow);
}

/* 添加X符号 */
.header_search_close::before {
  content: "×";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: bold;
  color: inherit;
}

.header_search_close:hover {
  color: var(--theme);
  background: var(--classC);
  border-color: var(--theme);
  transform: rotate(90deg);
}

/* 夜间模式下关闭按钮样式 */
html[data-night='night'] .header_search_close {
  color: var(--routine);
  background: var(--classC);
  border-color: var(--classA);
}

html[data-night='night'] .header_search_close:hover {
  color: var(--theme);
  background: var(--classB);
  border-color: var(--theme);
}

/* 搜索框内部布局 */
.Xc_search_inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 热门文章样式 */
.Xc_ranking {
  width: 100%;
  margin-top: 20px;
}

.Xc_ranking .title {
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--main);
}

.header_fiery .result {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header_fiery .result .item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-inner);
  background: var(--classD);
  transition: all 0.35s ease;
}

.header_fiery .result .item:hover {
  background: var(--classC);
  transform: translateX(5px);
}

.header_fiery .result .item .sort {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  text-align: center;
  line-height: 20px;
  border-radius: 50%;
  background: var(--theme);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

.header_fiery .result .item .text {
  flex: 1;
  margin-right: 10px;
  color: var(--main);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header_fiery .result .item .views {
  color: var(--minor);
  font-size: 12px;
}
