body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f6f9;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.app-container {
  margin-top: 50px;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  color: #333;
}

.search-box {
  display: flex;
  margin-top: 15px;
  flex-wrap: nowrap;
}

#searchInput {
  flex: 1;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px 0 0 8px;
  font-size: 16px;
  outline: none;
  transition: border 0.3s, box-shadow 0.3s;
}

#searchInput:focus {
  border-color: #0078d7;
  box-shadow: 0 0 5px rgba(0, 120, 215, 0.4);
}

.clear-btn {
  background: #f44336;
  color: white;
  border: none;
  padding: 12px 16px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.3s, transform 0.2s;
}

.clear-btn:hover {
  background: #d32f2f;
  transform: scale(1.05);
}

.search-btn {
  background: #0078d7;
  color: white;
  border: none;
  padding: 12px 16px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  transition: background 0.3s, transform 0.2s;
}

.search-btn:hover {
  background: #005bb5;
  transform: scale(1.05);
}

.suggestions {
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  position: relative;
}

.suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s;
  animation: fadeIn 0.2s ease-in-out;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: #e0f0ff;
}

.suggestion-item .highlight {
  background-color: #ffeb3b;
  font-weight: bold;
}

.loading {
  display: none;
  text-align: center;
  margin: 20px 0;
  color: #0078d7;
  font-weight: bold;
}

.results {
  margin-top: 20px;
}

.result-item {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  animation: slideIn 0.3s ease forwards;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.result-item:hover {
  background: #f0f8ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-title {
  font-size: 18px;
  font-weight: bold;
  color: #0078d7;
  text-decoration: none;
}

.result-title:hover {
  text-decoration: underline;
}

.result-description {
  margin-top: 8px;
  color: #555;
  font-size: 14px;
}

/* --- Animations --- */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive Styles --- */
@media screen and (max-width: 600px) {
  .search-box {
    flex-wrap: wrap;
  }

  #searchInput {
    flex: 1 1 100%;
    border-radius: 8px;
    margin-bottom: 8px;
  }

  .clear-btn,
  .search-btn {
    flex: 1 1 48%;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 16px;
  }

  .clear-btn {
    margin-right: 4%;
  }
}
