/* Universal Search System Styles */
.search-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 500px;
  width: calc(100vw - 40px);
}

.search-box {
  position: relative;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  padding: 12px 16px;
}

#search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e5e5e5;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}

#search-input::placeholder {
  color: rgba(229, 229, 229, 0.5);
}

.search-icon {
  margin-right: 8px;
  color: rgba(229, 229, 229, 0.5);
  font-size: 18px;
}

.search-shortcut {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 12px;
  color: rgba(229, 229, 229, 0.6);
  font-family: monospace;
}

#search-results {
  display: none;
  max-height: 400px;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 0;
}

#search-results.visible {
  display: block;
}

#search-results::-webkit-scrollbar {
  width: 8px;
}

#search-results::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

#search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

#search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.search-result-group {
  margin-bottom: 12px;
}

.search-result-group-title {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(229, 229, 229, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-result-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-left: 2px solid transparent;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: #e5e5e5;
}

.search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: #e5e5e5;
  margin: 0 0 4px 0;
}

.search-result-snippet {
  font-size: 13px;
  color: rgba(229, 229, 229, 0.7);
  margin: 0;
  line-height: 1.4;
}

.search-highlight {
  background: rgba(229, 229, 229, 0.2);
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: 600;
}

.no-results {
  padding: 20px 16px;
  text-align: center;
  color: rgba(229, 229, 229, 0.5);
  font-size: 14px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .search-container {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }
  
  .search-shortcut {
    display: none;
  }
  
  #search-results {
    max-height: 300px;
  }
}

/* Animation */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-box {
  animation: fadeInDown 0.3s ease;
}
