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

.menu {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  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: 18px;
  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;
}

.content-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
}

#container {
  display: flex;
  justify-content: center;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
}

.card {
  position: absolute;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.5s ease-in-out;
  opacity: 0;
}

#image-upload {
  top: 20px;
  right: -250px;
  width: 250px;
  opacity: 1;
}

#loading {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
}

.card-success {
  background-color: rgba(76, 175, 80, 0.9);
  color: white;
}

.card-error {
  background-color: rgba(244, 67, 54, 0.9);
  color: white;
}

.card.show {
  opacity: 1;
}

input[type="file"] {
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 5px;
  width: 100%;
  margin-top: 10px;
}

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

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

@media screen and (max-width: 768px) {
  .menu {
    flex-direction: column;
    align-items: center;
  }

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

  #video-feed,
  #canvas {
    width: 100%;
    height: auto;
  }

  #image-upload {
    position: static;
    width: 100%;
    margin-bottom: 20px;
  }

  .content-wrapper {
    padding: 0 20px;
  }
}

