body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to right, #868f96 0%, #596164 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  inset: 0;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("./assets/image-4.jpg") no-repeat center center/cover;
  opacity: 0.5; /* Adjust opacity as needed */
  z-index: -1; /* Ensure the image is behind the content */
}

.roboto-slab {
  font-family: "Arial", serif;
  font-optical-sizing: auto;
  font-weight: 800;
  font-style: normal;
}

.h1 {
  text-align: center;
  font-size: 1.5em;
  color: white;
  margin: 20px 0;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  width: 70%;
  border-radius: 20px;
  padding: 20px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.item {
  opacity: 1;
  flex-shrink: 0;
}

.grade-select,
.credits-select {
  width: 300px;
  text-align: center;
  padding: 10px;
  margin: 10px 0;
  border-radius: 10px;
  background: linear-gradient(
    112.1deg,
    rgb(32, 38, 57) 11.4%,
    rgb(63, 76, 119) 70.2%
  );
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

label {
  padding: 8px;
  border-radius: 5px;
  background: linear-gradient(
    112.1deg,
    rgb(32, 38, 57) 11.4%,
    rgb(63, 76, 119) 70.2%
  );
  color: white;
  flex-shrink: 0;
}

#item-1 {
  margin-top: 50px;
}

option {
  color: black;
}

.output {
  background: linear-gradient(
    109.6deg,
    rgb(204, 228, 247) 11.2%,
    rgb(237, 246, 250) 100.2%
  );
  padding: 10px;
  width: 77%;
  height: 60px;
  text-align: center;
  margin: 10px 0;
  align-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

#btn {
  background: linear-gradient(
    112.1deg,
    rgb(32, 38, 57) 11.4%,
    rgb(63, 76, 119) 70.2%
  );
  color: white;
  padding: 10px;
  width: 30%;
  height: 60px;
  border-radius: 10px;
  border: 0;
  text-align: center;
  margin: 10px 0;
  align-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Media Queries for Responsiveness */
@media (max-width: 1200px) {
  .container {
    width: 80%;
  }

  .grade-select,
  .credits-select {
    width: 250px;
  }
}

@media (max-width: 992px) {
  .container {
    width: 90%;
  }

  .grade-select,
  .credits-select {
    width: 200px;
  }

  .output {
    width: 90%;
  }

  #btn {
    width: 50%;
  }
}

@media (max-width: 768px) {
  .h1 {
    font-size: 1.2em;
  }

  .grade-select,
  .credits-select {
    width: 200px;
  }

  .output {
    width: 100%;
  }

  #btn {
    width: 70%;
  }
}

@media (max-width: 576px) {
  .h1 {
    font-size: 1em;
  }

  .container {
    width: 95%;
    padding: 10px;
  }

  .grade-select,
  .credits-select {
    width: 150px;
  }

  label {
    width: 100px;
  }

  #btn {
    width: 80%;
    height: 50px;
    font-size: 0.9rem;
  }

  .output {
    font-size: 1.5rem;
    padding: 5px;
  }
}

@media (max-width: 430px) {
  .h1 {
    font-size: 0.9em;
  }

  .grade-select,
  .credits-select {
    width: 130px;
    font-size: 0.9rem;
  }

  .output {
    font-size: 1.2rem;
    padding: 5px;
    width: 90%;
  }

  #btn {
    width: 90%;
    height: 50px;
    font-size: 0.8rem;
  }

  label {
    width: 80px;
    font-size: 0.8rem;
  }
}

#btn:active {
  transform: scale(0.98);
  /* Scaling button to 0.98 to its original size */
  box-shadow: 3px 2px 22px 1px rgba(0, 0, 0, 0.24);
  /* Lowering the shadow */
}

/* Dark Mode theme */

body.dark-mode {
  background: radial-gradient(
    circle at -4% -12.9%,
    rgb(74, 98, 110) 0.3%,
    rgb(30, 33, 48) 90.2%
  );
}

body.dark-mode::before {
  background: radial-gradient(
    circle at 18.7% 37.8%,
    rgb(250, 250, 250) 0%,
    rgb(225, 234, 238) 90%
  ); /* opacity: 0.5; Adjust opacity as needed */
}

.dark-mode .h1 {
  color: black;
}

.dark-mode .container {
  background: linear-gradient(to right, #434343 0%, #000000 100%);
}

.dark-mode .grade-select,
.dark-mode .credits-select,
.dark-mode label,
.dark-mode #btn,
.dark-mode .home,
.dark-mode .cgpa {
  background: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
  color: black;
}

.dark-mode .output {
  background: radial-gradient(
    circle at 18.7% 37.8%,
    rgb(250, 250, 250) 0%,
    rgb(225, 234, 238) 90%
  );
}

.dark-mode .navbar {
  background: radial-gradient(
    circle at 24.1% 68.8%,
    rgb(50, 50, 50) 0%,
    rgb(0, 0, 0) 99.4%
  );
}

.dark-mode .toggle-label {
  background: radial-gradient(
    circle at 18.7% 37.8%,
    rgb(250, 250, 250) 0%,
    rgb(225, 234, 238) 90%
  );
}

/* Light Mode */
.navbar {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90vw;
  height: 10vh;
  border-radius: 50px;
  margin-top: 10px;
  padding: 0;
}

.links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.home,
.cgpa {
  background: linear-gradient(
    112.1deg,
    rgb(32, 38, 57) 11.4%,
    rgb(63, 76, 119) 70.2%
  );
  padding: 12px;
  margin: 8px 10px;
  width: 100px;
  border-radius: 50px;
  color: white;
  text-align: center;
}

a {
  text-decoration: none;
}

#checkbox {
  display: none;
}

.toggle-btn {
  height: 8vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
}

.toggle-label {
  width: 5rem;
  height: 2rem;
  background: linear-gradient(
    112.1deg,
    rgb(32, 38, 57) 11.4%,
    rgb(63, 76, 119) 70.2%
  );
  display: inline-block;
  position: relative;
  border-radius: 10rem;
  cursor: pointer;
}

.toggle-ball {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: white;
  display: inline-block;
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  transition: transform 0.2s ease-in;
}

#checkbox:checked + .toggle-label .toggle-ball {
  transform: translateX(2.8rem);
  background-color: black;
}

@media (max-width: 480px) {
  .navbar {
    width: 90vw;
  }

  .home,
  .cgpa {
    width: 100px;
    padding: 8px;
    margin: 5px;
    font-size: 1rem;
  }

  .toggle-ball {
    width: 1.5rem;
    height: 1.5rem;
  }

  .toggle-label {
    width: 4rem;
    height: 1.5rem;
  }
}
