  /* ============================= */
/* Background & General Layout   */
/* ============================= */
body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #74ebd5, #ACB6E5);
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.button-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 100;
}

.side-icon {
  background: linear-gradient(to right, #6a11cb, #2575fc);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.side-icon:hover {
  transform: scale(1.05);
}


/* ============================= */
/* Modal (Login/Register/Forgot Password) */
/* ============================= */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);

  /* Flex centering */
  display: flex !important; /* make sure flex is active */
  justify-content: center !important;
  align-items: center !important;
}

/* Modal box */
.modal-content {
  background: #ffffff;
  padding: 30px;
  border-radius: 15px;
  width: 350px;
  max-width: 90vw; /* responsive */
  text-align: left;
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.3);
  animation: popIn 0.3s ease-in-out;
  box-sizing: border-box; /* ensure padding included */
  position: relative; /* for z-index context */
}

/* Headings inside modals */
.modal-content h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

/* Input fields */
.modal-content input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

/* Buttons inside modal */
.modal-content button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(to right, #6a11cb, #2575fc);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.3s;
}

.modal-content button:hover {
  background: linear-gradient(to right, #2575fc, #6a11cb);
  transform: scale(1.05);
}

/* 🔹 Forgot Password Link */
.forgot-password {
  text-align: right;
  margin-top: 8px;
}

.forgot-password a {
  color: #2575fc;
  text-decoration: none;
  font-size: 14px;
}

.forgot-password a:hover {
  text-decoration: underline;
}

/* 🔹 Switch Auth Links */
.switch-auth {
  text-align: center;
  margin-top: 10px;
}

.switch-auth a {
  color: #6a11cb;
  font-weight: bold;
  text-decoration: none;
}

.switch-auth a:hover {
  text-decoration: underline;
}

/* ============================= */
/* CGPA Calculator Section       */
/* ============================= */
#gradeSection {
  max-width: 800px;
  margin: 40px auto;
  background: #ffffff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.25);
  animation: popIn 0.3s ease-in-out;
}

#gradeSection h2,
#gradeSection h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

/* Subject row */
.subject {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.subject input,
.subject select {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

/* Add Subject Button */
#addSubject {
  background: linear-gradient(to right, #ff9800, #ff5722);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
  margin-bottom: 15px;
}

#addSubject:hover {
  background: linear-gradient(to right, #ff5722, #ff9800);
  transform: scale(1.05);
}
.removeSubject {
  background-color: #e74c3c; /* red color */
  border: none;
  color: white;
  font-weight: bold;
  font-size: 20px;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
  align-self: center; /* vertically center in flex row */
  user-select: none;
}

.removeSubject:hover {
  background-color: #c0392b; /* darker red on hover */
}


/* Calculate Button */
#cgpaForm button[type="submit"] {
  background: linear-gradient(to right, #6a11cb, #2575fc);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: 0.3s;
  width: 100%;
}

#cgpaForm button[type="submit"]:hover {
  background: linear-gradient(to right, #2575fc, #6a11cb);
  transform: scale(1.05);
}

/* Result box */
#cgpaResult {
  margin-top: 20px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: #2575fc;
  background: #f0f8ff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: inset 0px 2px 5px rgba(0,0,0,0.1);
}

/* ============================= */
/* Animation Effects             */
/* ============================= */
@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================= */
/* Messages (login/register/forgot password) */
/* ============================= */
.message {
  margin-top: 10px;
  font-size: 14px;
}

/* ============================= */
/* Responsive Fixes              */
/* ============================= */
@media (max-width: 500px) {
  .modal-content {
    width: 90%;
  }
  .subject {
    flex-direction: column;
  }
  .button-container {
    flex-direction: column;
    top: 10px;
    right: 10px;
  }
}




