/* ============ 搜索弹窗 ============ */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  padding: 80px 24px 24px;
  overflow-y: auto;
}
.search-modal.open { display: block; }

.search-box {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.search-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e5e5;
  gap: 12px;
}

.search-header .icon {
  color: #999;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  color: #1a1a1a;
  background: transparent;
}
.search-input::placeholder { color: #bbb; }

.search-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f0f0f0;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
  font-size: 18px;
}
.search-close:hover { background: #e0e0e0; }

.search-results {
  max-height: 60vh;
  overflow-y: auto;
}

.search-result-item {
  display: block;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f7f9fc; }

.search-result-title {
  font-size: 15px;
  font-weight: 600;
  color: #0066CC;
  margin-bottom: 4px;
}

.search-result-url {
  font-size: 12px;
  color: #999;
}

.search-no-result {
  padding: 40px 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* 导航栏搜索图标 */
.nav-search-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: color 0.2s;
}
.nav-search-btn:hover { color: #0066CC; }

@media (max-width: 900px) {
  .search-modal { padding: 60px 16px 16px; }
  .search-box { border-radius: 10px; }
  .search-input { font-size: 15px; }
}