/* 主搜索框样式 */
.main-search-container {
  margin: 0 auto 2rem;
  max-width: 600px;
}

.main-search-form {
  position: relative;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.main-search-input {
  width: 100%;
  height: 50px;
  border-radius: 60px;
  padding: 0 50px 0 20px;
  font-size: 1rem;
  border: 1px solid #e1e5e9;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.main-search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(112, 73, 240, 0.1);
  outline: none;
}

.main-search-button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition-base);
}

.main-search-button:hover {
  filter: brightness(1.1);
  transform: translateY(-50%) scale(1.05);
}

.search-clear-button {
  position: absolute;
  right: 55px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-base);
  font-size: 1rem;
}

.search-clear-button:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

.search-keyword {
  color: var(--primary-color);
  font-weight: 600;
}

/* 搜索结果样式 */
#searchResults {
  transition: opacity 0.3s ease;
}

.search-count {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* 私有链接标记 */
.private-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
  padding: 4px;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  z-index: 3;
  transition: all 0.3s ease;
}

.site-card:hover .private-badge {
  background: rgba(112, 73, 240, 0.1);
  transform: scale(1.1);
}

.private-badge i {
  font-size: 14px;
}

/* 搜索结果标题图标 */
#searchResults .category-icon {
  background: var(--primary-gradient);
  box-shadow: 0 4px 10px rgba(112, 73, 240, 0.15);
}

#searchResults .category-heading {
  margin-bottom: 1.5rem;
}

#searchResults .category-heading::after {
  width: 80px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .main-search-input {
    height: 45px;
    font-size: 0.9rem;
  }

  .main-search-button {
    width: 35px;
    height: 35px;
  }
}

/* 移除搜索框的原生叉叉按钮 */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}

input[type="search"]::-ms-clear {
  display: none;
}

input[type="search"]::-ms-reveal {
  display: none;
}

.search-summary {
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 500;
}
