/* Reset all elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styling */
body {
  font-family: Arial, sans-serif;
  background-color: rgb(127, 236, 255);
  min-height: 100vh; /* Ensure the body takes full height */
  display: flex;
  flex-direction: column; /* Stack content vertically */
  align-items: center; /* Center horizontally */
}

/* Navbar Styling */
nav {
  background-color: #333;
  padding: 10px 0;
  text-align: center;
  position: sticky; /* Makes the navbar stick to the top */
  top: 0; /* Ensures it's at the very top of the page */
  width: 100%; /* Makes sure it spans the full width of the page */
  z-index: 1000; /* Keeps the navbar on top of other content */
  box-sizing: border-box; /* Ensures padding is included in the width calculation */
}

/* Navbar Links Styling */
nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex; /* Use flexbox for horizontal layout */
  justify-content: center; /* Centers the items */
}

nav ul li {
  margin: 0 20px; /* Adds space between each item */
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  padding: 10px 15px; /* Adds some padding to make the links look better */
  display: inline-block;
}

nav ul li a:hover {
  text-decoration: underline;
}

/* Active Link Styling */
nav ul li a.active {
  color: yellow; /* Highlight the active page with a different color */
}

/* Container Styling for Content */
.container {
  text-align: center;
  background-color: rgb(127, 236, 255);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 80%;
  max-width: 600px;
  margin-top: 120px; /* Added more space for the fixed navbar */
}

h1 {
  color: #333;
}

/* File Upload Section */
#drop-area {
  border: 2px dashed #389aea;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  cursor: pointer;
}

#drop-area p {
  font-size: 18px;
  color: #777;
}

input[type="file"] {
  opacity: 1;
  width: 350px;
  height: 75px;
}

/* Button Styling */
#switchToWebcam, #switchToFile, #takePictureButton, #predictButton, #clearSelectorButton {
  background-color: rgb(0, 0, 0);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
  margin-top: 20px;
}

#switchToWebcam {
  border: 4px solid #2f8be1;
}

#predictButton {
  border: 4px solid #2bc067;
  padding: auto 60px;
}

#clearSelectorButton {
  border: 4px solid #e12f35;
}

/* Hover Effects */
#switchToWebcam:hover,
#switchToFile:hover,
#takePictureButton:hover {
  background-color: rgb(255, 255, 255);
  color: #2f8be1;
}

#switchToWebcam,
#switchToFile,
#takePictureButton {
  border: 4px solid #2f8be1;
}

#predictButton:hover {
  background-color: rgb(255, 255, 255);
  color: #2bc067;
}

#clearSelectorButton:hover {
  background-color: rgb(255, 255, 255);
  color: #e12f35;
}

/* Hide Buttons Initially */
#switchToFile {
  display: none; /* Initially hidden, will be shown when switching back from webcam */
}

#takePictureButton {
  display: none; /* Initially hidden, will be shown when switching to webcam */
}

/* Prediction Result Section */
#result {
  margin-top: 20px;
}

#result h2 {
  color: #333333;
}

#prediction {
  font-size: 18px;
  color: #555;
}

/* Styling for the webcam container */
#webcamContainer {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

video {
  width: 100%;
  max-width: 400px;
  border: 4px solid #389aea;
  border-radius: 10px;
}

/* Responsive Navbar */
@media (max-width: 600px) {
  nav ul {
    flex-direction: column; /* Stack the items vertically on small screens */
    text-align: left;
  }

  nav ul li {
    margin-bottom: 10px; /* Add space between stacked items */
  }
}