* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f0f4f8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #333;
}

.menu {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  padding: 10px;
  background-color: #ffffff;
  border-radius: 50px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.menu > a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 16px;
  margin: 0 15px;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.menu > a:hover,
.menu > a.active {
  background-color: #4a90e2;
  color: #ffffff;
}

.container {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  padding: 30px;
  width: 90%;
  max-width: 600px;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 24px;
}

.upload-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

input[type="file"] {
  display: none;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background-color: #4a90e2;
  color: white;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-success {
  background-color: #28a745;
  color: white;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

input[type="text"] {
  width: 100%;
  padding: 12px;
  margin: 15px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

.notification {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.notification.show {
  display: block;
}

.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

#loadingBarContainer {
  width: 100%;
  background-color: #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 20px;
  display: none;
}

#loadingBar {
  width: 0;
  height: 8px;
  background-color: #4a90e2;
  transition: width 0.3s ease;
}

#matchingImages {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 15px;
}

#matchingImages img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

#matchingImages img:hover {
  transform: scale(1.05);
}

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

@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 20px;
  }

  .menu {
    flex-direction: column;
    align-items: center;
  }

  .menu > a {
    margin: 5px 0;
  }
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
}

.spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

.loader p {
  color: white;
  margin-top: 10px;
  font-size: 18px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

