/* 搜索框组件样式 */
.header-search-row {
  position: relative;
}

.search-box {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: none;
  z-index: 1000;
  min-width: 300px;
  border-radius: 4px;
  margin-top: 10px;
}

.search-box.active {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-input-wrapper {
  display: flex;
  gap: 10px;
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

.search-submit-btn {
  padding: 8px 20px;
  background: #ff7d5f;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.search-submit-btn:hover {
  background: #ff7d5f;
}

.search-close-btn {
  position: absolute;
  top: -8px;
  right: 0px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 24px;
  height: 24px;
  line-height: 1;
  transition: color 0.3s ease;
}

.search-close-btn:hover {
  color: #333;
}

/* 搜索结果页面样式 */
.search-results-container {
  padding: 40px 0;
  min-height: 60vh;
}

.search-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.search-header h1 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #333;
  font-weight: 600;
}

.search-info {
  font-size: 16px;
  color: #666;
  margin: 0;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.search-result-item {
  padding: 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.search-result-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #007bff;
  transform: translateY(-2px);
}

.result-type-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #007bff;
  color: #fff;
  border-radius: 12px;
  font-size: 12px;
  margin-bottom: 10px;
  font-weight: 500;
}

.result-type-badge.news {
  background: #28a745;
}

.result-type-badge.school {
  background: #17a2b8;
}

.result-type-badge.album {
  background: #ffc107;
  color: #333;
}

.result-type-badge.webpage {
  background: #6c757d;
}

.result-title {
  font-size: 20px;
  margin: 10px 0;
  font-weight: 600;
}

.result-title a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.result-title a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.result-excerpt {
  color: #555;
  line-height: 1.6;
  margin: 10px 0;
  font-size: 15px;
}

.result-meta {
  display: flex;
  gap: 15px;
  font-size: 14px;
  color: #888;
  margin-top: 10px;
  flex-wrap: wrap;
}

.result-category {
  color: #666;
  display: flex;
  align-items: center;
}

.result-category::before {
  content: '📁';
  margin-right: 5px;
}

.result-date::before {
  content: '📅';
  margin-right: 5px;
}

.search-highlight {
  background-color: #fff3cd;
  padding: 2px 4px;
  border-radius: 2px;
  font-weight: 600;
  color: #856404;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  background: #f8f9fa;
  border-radius: 8px;
}

.no-results p {
  font-size: 18px;
  margin: 0;
}

.no-results .suggestion {
  margin-top: 15px;
  font-size: 14px;
  color: #888;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  min-width: 40px;
  text-align: center;
}

.pagination a:hover {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.pagination .current {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
  font-weight: 600;
}

.pagination .disabled {
  color: #ccc;
  cursor: not-allowed;
  pointer-events: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .search-box {
    right: -50px;
    min-width: 280px;
  }

  .search-header h1 {
    font-size: 24px;
  }

  .result-title {
    font-size: 18px;
  }

  .result-excerpt {
    font-size: 14px;
  }

  .result-meta {
    font-size: 13px;
  }
}
