body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-image: url('bg.jpg');
  background-size: cover;
  background-repeat: repeat;
}

button {
  font-size: 1.2rem;
  padding: 10px 20px;
  background-color: #0d900f;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #9bb316;
}

.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  /*justify-content: center;*/
  min-height: 100vh;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.3);
}

.upload-container {
  text-align: center;
  background-color: rgba(229, 255, 191, 0.8);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
}

.upload-container h1 {
  color: #333;
  margin-bottom: 20px;
}

#imageUpload {
  margin-bottom: 20px;
}

#predictButton {
  font-size: 1.2rem;
  padding: 10px 20px;
  background-color: #1fbc19;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#predictButton:hover {
  background-color: #128a3c;
}

.result-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.result-container h2 {
  color: #fff;
  text-align: center;
  margin-bottom: 20px;
}

.processed-image-container,
.predictions-container  {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 20px;
  background-color: rgba(13, 89, 101, 0.8);
  border-radius: 15px;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
  margin: 10px;
}

#processedImage {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

#predictionsTable {
  width: 100%;
  border-collapse: collapse;
}

#predictionsTable th {
  background-color: #1fbc19;
  color: #fff;
  border: 1px solid #fff;
  padding: 8px;
}

#predictionsTable td {
  border: 1px solid #fff;
  padding: 8px;
  text-align: left;
  color: #fff;
}

/* Bar Graph Styles */

.predictions-container-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 20px;
  background-color: rgba(70, 20, 105, 0.8);
  border-radius: 15px;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
  margin: 10px;
}

.predictions-container-bar h2 {
  color: #fff;
  margin-bottom: 20px;
}

#barGraph {
  margin-top: 20px;
}

.bar {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.bar-label {
  width: 400px;
  text-align: right;
  padding-right: 10px;
  color: #23d068;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-percentage {
  flex-grow: 1;
  background-color: #66c2a5;
  height: 30px;
  border-radius: 5px;
}

.bar-value {
  margin-left: 15px;
  color: #fff;
}

/* NAVIGATION BAR */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  color: white;
  font-size: large;
  background-color: rgba(0, 0, 0, 0.3);
}

.nav-links {
  display: flex;
  gap: 15px;
}

.nav-links a {
  font-size: 1.2rem;
  padding: 10px 20px;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.nav-links a:hover {
  background-color: #128a3cc7;
}

/* Screen size updater */

.hidden {
  display: none;
}

@media screen and (max-width: 768px) {
  .result-container {
    flex-direction: column;
    align-items: center;
  }

  .processed-image-container,
  .predictions-container {
    width: auto;
    height: auto;
    margin: 10px 0;
  }

  /*bar graph styles*/
  .bar-label {
    width: 200px;
  }

  .bar-percentage {
    height: 15px;
  }

  /* NAVIGATION BAR */
  .nav-links {
    display: flex;
    gap: 8px;
  }

  .nav-links a {
    /* text size, padding, and border radius decreased */
    font-size: 1rem;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
  }
}