/* 搜索页布局和补充样式 */
.search-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 16px;
  width: 1200px;
  margin: 30px auto;
}

.search-page-layout .search-content {
  width: auto;
  min-width: 0;
  min-height: 600px;
}

.search-main {
  margin-top: -25px;
  padding: 0 24px 28px;
}

.search-form {
  display: flex;
  gap: 10px;
  margin: 16px 0 20px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e4e4ea;
  border-radius: 6px;
  background: #fff;
}

.search-input-wrap:focus-within {
  border-color: #fb7299;
  box-shadow: 0 0 0 3px rgba(251, 114, 153, 0.1);
}

.search-input-icon {
  margin-right: 8px;
  color: #999;
  font-size: 24px;
  line-height: 1;
}

.search-input-wrap input {
  flex: 1;
  width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  color: #333;
  font: inherit;
}

.search-clear {
  display: none;
  border: 0;
  background: transparent;
  color: #999;
  cursor: pointer;
  font-size: 20px;
}

.search-clear.show {
  display: block;
}

.search-submit {
  min-width: 86px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #fb7299, #e85f89);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.search-tags-section {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.search-tags-group {
  padding: 14px 16px;
  border: 1px solid #f0f0f4;
  border-radius: 8px;
  background: #fff;
}

.search-tags-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.search-tags-header h2 {
  margin: 0;
  color: #333;
  font-size: 16px;
}

.time-filter {
  display: flex;
  gap: 6px;
}

.time-filter a {
  padding: 3px 9px;
  border-radius: 12px;
  color: #888;
  font-size: 12px;
}

.page-book-detail .book-author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.page-book-detail .book-author .icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.time-filter a.active,
.time-filter a:hover {
  background: #fff0f4;
  color: #e85f89;
}

.search-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid #f0f0f4;
  border-radius: 16px;
  color: #666;
  font-size: 13px;
}

.tag-item:hover {
  border-color: #fb7299;
  color: #e85f89;
}

.tag-rank {
  color: #999;
  font-size: 11px;
}

.tag-item.top3 .tag-rank {
  color: #e85f89;
  font-weight: 700;
}

.clear-history-btn {
  padding: 0;
  border: 0;
  background: none;
  color: #999;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.clear-history-btn:hover {
  color: #e85f89;
}

.empty-tags {
  color: #999;
  font-size: 13px;
}

.result-stats {
  margin: 6px 0 18px;
  color: #777;
}

.result-stats strong {
  color: #e85f89;
}

.search-results-list {
  padding-top: 0;
}

.search-result-item {
  min-width: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0f0f4;
}

.search-result-item .rank-modules-works-item-content {
  padding-right: 16px;
}

.search-result-item .rank-modules-works-item-author {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-item .rank-modules-works-item-desc {
  max-height: 44px;
}

.search-download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
}

.search-download-links a {
  color: #888;
}

.search-download-links a:hover {
  color: #e85f89;
}

.search-result-actions {
  min-width: 96px;
}

.search-result-actions .rank-modules-works-item-btn-read {
  width: 96px;
  font-size: 13px;
}

.btn-add-shelf {
  width: 96px;
  min-height: 32px;
  border: 1px solid #fb7299;
  border-radius: 18px;
  background: #fff;
  color: #e85f89;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.btn-add-shelf:hover {
  background: #fff0f4;
}

.search-book-count {
  color: #999;
  font-size: 12px;
}

.search-empty {
  height: 260px;
  gap: 14px;
}

.search-empty a {
  color: #e85f89;
}

.search-sidebar {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.search-rank-section {
  padding: 16px 14px 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.search-rank-title {
  margin: 0 0 10px;
  padding: 0 0 10px 10px;
  border-bottom: 1px solid #f0f0f4;
  border-left: 3px solid #fb7299;
  color: #333;
  font-size: 17px;
  line-height: 1.2;
}

.search-side-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-side-item {
  display: grid;
  grid-template-columns: 22px 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 74px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f3f6;
}

.search-side-item:last-child {
  border-bottom: 0;
}

.search-side-rank {
  color: #999;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.search-side-item:nth-child(-n+3) .search-side-rank {
  color: #e85f89;
}

.search-side-cover {
  display: block;
  width: 44px;
  height: 58px;
  overflow: hidden;
  border-radius: 4px;
  background: #f3f3f6;
}

.search-side-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-side-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.search-side-name {
  overflow: hidden;
  color: #444;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-side-name:hover {
  color: #e85f89;
}

.search-side-meta {
  overflow: hidden;
  color: #999;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-side-empty {
  padding: 20px 0;
  color: #999;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1200px) {
  .search-page-layout {
    width: auto;
    margin: 24px 16px;
  }
}

@media (max-width: 900px) {
  .search-page-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .search-page-layout {
    gap: 12px;
    margin: 16px 10px;
  }

  .search-main {
    padding: 0 14px 20px;
  }

  .search-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-result-item {
    padding-left: 26px;
  }

  .search-result-item .rank-modules-works-item-cover {
    width: 72px;
    height: 96px;
    margin-right: 10px;
  }

  .search-result-item .rank-modules-works-item-content {
    padding: 0;
  }

  .search-result-actions {
    display: none;
  }

  .search-tags-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
.rank-modules-works-item-stat-label {
    font-style: normal;
    margin-top: 1px;
    font-size: 13px;
    color: #b34747;
}