/* Search Modal Styles */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 71, 107, 0.2);
  z-index: 9999;
  transition: opacity 0.3s ease;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.search-modal.active {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10vh;
}

.search-modal-container {
  position: relative;
  width: 90%;
  max-width: 700px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: translateY(-50px);
  animation: slideUp 0.4s ease forwards;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
  }
}

.search-modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.search-modal-close {
  background: none;
  border: none;
  color: #00476b;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.search-modal-close:hover {
  transform: rotate(90deg);
  background-color: rgba(0, 71, 107, 0.1);
  color: #00476b;
}

.search-modal-content {
  padding: 30px;
  position: relative;
}

.search-modal-content {
  padding: 30px;
}

.search-modal-title {
  color: #00476b;
  font-size: 28px;
  margin-bottom: 25px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

.search-form {
  display: flex;
  align-items: stretch;
  margin-bottom: 30px;
  background-color: #f8f9fa;
  border-radius: 8px;
  overflow: visible;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
  position: relative;
}

.search-form:focus-within {
  box-shadow: 0 4px 15px rgba(0, 71, 107, 0.2);
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-input {
  width: 100%;
  height: 55px;
  padding: 0 40px 0 20px;
  font-size: 16px;
  border: none;
  background-color: transparent;
  color: #333;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.search-input::placeholder {
  color: #999;
}

.clear-search-input {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 8px;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-search-input:hover {
  color: #00476b;
}

.search-submit {
  width: 55px;
  height: 55px;
  background-color: #00476b;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-submit:hover {
  background-color: #0066cc;
  transform: scale(1.05);
}

.search-submit:active {
  transform: scale(0.95);
}

/* Search History Styles */
.search-history-section {
  margin-bottom: 25px;
  margin-top: 20px;
}

.search-history-title {
  color: #00476b;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.clear-history-btn {
  background: none;
  border: none;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  transition: color 0.3s ease;
}

.clear-history-btn:hover {
  color: #00476b;
}

.search-history-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #f8f9fa;
  color: #00476b;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.search-history-item:hover {
  background-color: #00476b;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-history-item i {
  font-size: 12px;
  opacity: 0.7;
}

/* TAG Quick Search Styles */
.search-tags-section {
  margin-bottom: 30px;
}

.search-tags-title {
  color: #00476b;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
}

.search-tags-title::before {
  content: "#";
  color: #00476b;
  margin-right: 8px;
  font-size: 18px;
}

.search-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-tag {
  padding: 8px 16px;
  background-color: #f8f9fa;
  color: #00476b;
  border-radius: 50px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #e0e6ed;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.search-tag:hover {
  background-color: #00476b;
  color: white;
  border-color: #00476b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 71, 107, 0.3);
}

.search-tag:active {
  transform: translateY(0);
}

.search-tags-section {
  margin-bottom: 25px;
}

.search-tags-title {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-tag {
  background-color: #f0f7ff;
  color: #00476b;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.search-tag:hover {
  background-color: #00476b;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-tag.active {
  background-color: #00476b;
  color: white;
  border-color: #00476b;
}

/* Search Suggestions Styles */
.search-suggestions {
  display: none;
  position: absolute;
  top: 145px;
  left: 30px;
  right: 30px;
  background-color: white;
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0e6ed;
  z-index: 100;
}

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

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

.search-suggestion-item {
  padding: 14px 20px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

.search-suggestion-item:hover {
  background-color: #f8f9fa;
  color: #00476b;
  padding-left: 24px;
}

.search-suggestion-item:hover i {
  color: #00476b;
}

.search-suggestion-item.active {
  background-color: #f0f7ff;
  color: #00476b;
  padding-left: 24px;
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-type {
  margin-left: auto;
  padding: 3px 10px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%);
  color: #00476b;
  border-radius: 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.mr-2 {
  margin-right: 8px;
}

.text-gray-400 {
  color: #adb5bd;
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-modal-container {
    width: 95%;
    margin: 0 10px;
  }
  
  .search-modal-content {
    padding: 20px;
  }
  
  .search-modal-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .search-input {
    height: 50px;
    font-size: 15px;
  }
  
  .search-submit {
    height: 50px;
    width: 50px;
  }
  
  .search-tag {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .search-tags-container {
    gap: 8px;
  }
}

/* 自定义滚动条 */
.search-suggestions::-webkit-scrollbar {
  width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.search-suggestions::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .search-modal-container {
    max-width: 100%;
    padding: 0 15px;
  }
  
  .search-modal-header {
    top: 20px;
    right: 20px;
  }
  
  .search-input {
    padding: 15px 20px;
    font-size: 16px;
  }
  
  .search-submit {
    width: 42px;
    height: 42px;
  }
  
  .search-modal-title {
    font-size: 20px;
    margin-bottom: 20px;
  }
}

/* 滚动条样式 */
.search-suggestions::-webkit-scrollbar {
  width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}