/* WebNav Hub - 组件样式文件 */

/* 搜索功能样式 */
.search-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--card-bg-color);
  border-radius: 25px;
  padding: 0.8rem 1.2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease;
}

.search-box:focus-within {
  box-shadow: 0 4px 20px rgba(255, 144, 0, 0.3);
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1rem;
  outline: none;
  padding: 0 0.5rem;
}

.search-input::placeholder {
  color: #888;
}

.search-icon {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.clear-search {
  color: #888;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  display: none;
}

.clear-search:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.clear-search.show {
  display: block;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--primary-color);
  color: #000;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* 加载动画 */
.loading {
  display: none;
  text-align: center;
  padding: 2rem;
  color: var(--primary-color);
}

.loading.show {
  display: block;
}

.loading i {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* 无结果提示 */
.no-results {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: #888;
}

.no-results.show {
  display: block;
}

.no-results i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.no-results h3 {
  margin: 1rem 0 0.5rem;
  color: var(--text-color);
}

.no-results p {
  margin: 0;
  font-size: 0.9rem;
}