.gpa-tool-box{
  width: 100%;
  margin-top:50px;
  border: 2px solid #eee;
  padding: 10px;
  border-top-left-radius: 10px ;
  border-bottom-left-radius: 10px;
  border-top-right-radius: 55px ;
  border-bottom-right-radius: 10px;
}
.print-button{
  margin-left:auto !important;
}
.semester-header{
  display:flex;
  justify-content: space-between;
  align-items: center;
  border-bottom:2px solid #eee;
  margin-bottom:10px;
  padding:3px 20px 5px 20px;
}
.semester-footer{
  display:flex;
  justify-content: space-between;
  align-items: center;
  border-top:2px solid #eee;
  margin-bottom:10px;
  padding:3px 20px 5px 20px;
}
.remove-semester{ 
    width: 30px;
    height: 30px;
    margin-bottom:10px;
    margin-top:10px;
    background:#fff !important;
    color:#fff;
    border:none;
    transition: opacity 0.2s ease
    padding:1px;
    border-radius:50%;
    box-shadow: 0 5px 5px rgb(0 0 0 / 0.05);
    cursor:pointer;
}
select.course-grade{
  max-width: 200px;
  height:45px !important;
  border-left: 0px solid #eee !important;
  border-right: 2px solid #eee !important;
  border-top: 2px solid #eee !important;
  border-bottom: 2px solid #eee !important;
  border-top-left-radius: 0px !important;
  border-bottom-left-radius: 0px !important;
  border-top-right-radius: 5px !important;
  border-bottom-right-radius: 5px !important;
  
}
input.course-units{
  max-width: 200px;
  height:45px !important;
  border: 2px solid #eee !important;
  border-radius:0px !important;
  
}
input.course-name{
  max-width: 200px;
  height:45px !important;
  border-left: 2px solid #eee !important;
  border-right: 0px solid #eee !important;
  border-top: 2px solid #eee !important;
  border-bottom: 2px solid #eee !important;
  border-top-left-radius: 5px !important;
  border-bottom-left-radius: 5px !important;
  border-top-right-radius: 0px !important;
  border-bottom-right-radius: 0px !important;
  
}
.remove-course{ 
    width: 30px;
    height: 30px;
    margin-bottom:0px;
    background:#fff !important;
    color:#fff;
    border:none;
    margin-left:10px !important;
    transition: opacity 0.2s ease
    padding:1px;
    border-radius:50%;
    background:#fff;
    box-shadow: 0 5px 5px rgb(0 0 0 / 0.05);
    margin-left:0px;
    cursor:pointer;
}
button.add-course{
    background:#fff !important;
    color:#000;
    line-height:30px !important;
    border:2px solid #eee;
    padding:1px 20px 1px 1px !important;
    border-radius: 30px;
    cursor:pointer;
}

button {
    margin: 3px 3px 0px 0px !important;
    padding: 6px 12px;
    cursor: pointer;
}

.add-course  img{ 
    height: auto !important;
    width: 30px !important;
}

.add-sem-block{
  margin-top:-37px !important;
  margin-bottom:15px;
}
.add-semester{
  border: 2px solid #eee !important;
  color:#000 !important;
  background:#fff !important;
  border-radius: 20px !important;
}
.add-semester:hover{
  box-shadow: 0 10px 5px rgb(0 0 0 / 0.05);

}
/* Container for all semesters */
#semesters-container {
  max-width: 900px;
  margin: 0px auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
}

/* Each semester block */
.semester {
  background: inherit;
  border: 2px solid #eee;
  margin-bottom: 30px;
  border-radius: 10px;
}

.semester h4 {
  margin-top: 0;
  font-weight: 600;
  color: #2c3e50;
}
/* Courses block */
.courses-container{
padding: 5px 20px 20px 20px;
}

/* Buttons */
button {
  cursor: pointer;
  background-color: #4a90e2;
  color: white;
  border: none;
  padding: 8px 16px;
  margin-top: 10px;
  font-size: 14px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #357abd;
}

.input-error {
  border: 2px solid red !important;
  background-color: #ffe6e6 !important;
  
}
.input-duplicate {
  background-color: #fff3e0 !important;
}

.duplicate-error {
  background-color: #fff3e0 !important;
}

/* GPA Results */
.semester-gpa {
  font-weight: 600;
  font-size: 16px;
  margin-top: 8px;
  padding: 1px 12px;
  border-radius: 30px;
  display: inline-block;
  background:#eee;
}

/* Cumulative GPA display */
#cumulative-gpa-circle{
  display: flex;
  justify-content: end;
  margin-top:-120px;
  margin-right:-13px;
  margin-bottom:30px;
 
}
input.error {
    border: 2px solid red;
    background-color: #ffe6e6;
}
#cumulative-gpa {
  display: flex;
  justify-content: center;
  align-items: center; 
  width: 110px;
  height: 110px;
  font-weight: 700;
  font-size:30px;
  background:#eee;
  border: 2px solid #eee;
  padding: 8px 15px;
  border-radius: 50% !important;
  box-shadow: 0 5px 5px rgb(0 0 0 / 0.05);
}
 #cumulative-gpa-circle .cgpp-title{
   margin:45px 10px 0px 0px; 
}
#calc-gpa{
  border-radius:30px;
}
  
.total-credits-container{
margin-top:10px;
}
/* Responsive */
@media (max-width: 600px) {
  .courses-table th,
  .courses-table td {
    font-size: 12px;
    padding: 6px 8px;
  }

  button {
    padding: 6px 12px;
    font-size: 13px;
  }
}


#gpa-calculator {
    background: inherit;
    max-width: 900px;
    margin: 30px auto;
    font-family: Arial, sans-serif;
}

#gpa-calculator h2,
#gpa-calculator h3,
#gpa-calculator h4 {
    margin-top: 0;
}
.gpa-tool-badge{
  margin-top:30px;
}
.gpa-badge {
  width: 100%;
  height:auto;
  display: inline-block;
  border-radius: 10px ;
  padding: 15px ;
  user-select: none;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.05);
}
.gpa-badge p {
    font-size: 1em;
}

.gpa-badge h3 {
   font-size: 1.2em;
}
.gpa-badge a {
    color: #0066cc;
    text-decoration: underline;
}
.gpa-badge.first-class>h3 {
  width: 23%;
  background-color: #4CAF50; /* green */
  padding:1px 10px 1px 10px;
  border-radius:20px;
  margin-top:-25px !important;
  margin-bottom:10px;
  color:#fff;
}

.gpa-badge.second-class-upper>h3 {
  width: 15%;
  background-color: #2196F3; /* blue */
  padding:1px 10px 1px 10px;
  border-radius:20px;
  margin-top:-25px !important;
  margin-bottom:10px;
  color:#fff;
}

.gpa-badge.second-class-lower>h3 {
  width: 17%;
  background-color: #FFC107; /* amber */
  padding:1px 10px 1px 10px;
  border-radius:20px;
  margin-top:-25px !important;
  margin-bottom:10px;
  color:#fff;
}

.gpa-badge.third-class>h3 {
  width: 25%;
  background-color: #FF9800; /* orange */
  padding:1px 10px 1px 10px;
  border-radius:20px;
  margin-top:-25px !important;
  margin-bottom:10px;
  color:#fff;
}

.gpa-badge.pass>h3 {
  width: 12%;
  background-color: #c0392b; /* gray */
  padding:1px 10px 1px 10px;
  border-radius:20px;
  margin-top:-25px !important;
  margin-bottom:10px;
  color:#fff;
}

.gpa-badge.fail>h3 {
  width: 11%;
  background-color: #c0392b; /* red */
  padding:1px 10px 1px 10px;
  border-radius:20px;
  margin-top:-25px !important;
  margin-bottom:10px;
  color:#fff;
  
}

/*. badge bachround */
.gpa-badge.first-class {
  background-color: #d4edda; /* green */
  color: #155724;
}

.gpa-badge.second-class-upper {
  background-color: #cce5ff; /* blue */
  color: #004085;
}

.gpa-badge.second-class-lower {
  background-color: #fff3cd; /* amber */
  color: #856404;
}

.gpa-badge.third-class {
  background-color: #fff3cd; /* orange */
  color: #856404;
}

.gpa-badge.pass {
  background-color: #f8d7da; /* gray */
  color: #721c24;
}

.gpa-badge.fail {
  background-color: #f8d7da; /* red */
  color: #721c24;
}

button {
    margin: 5px 3px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius:5px;
}

button.button {
    background: #eee;
    border: 1px solid #ccc;
    border-radius:5px;
}

button.button-primary {
    background-color: #0073e6;
    color: #fff;
    border: none;
    border-radius:5px;
}

button.button-danger {
    background-color: #dc3232;
    color: #fff;
    border: none;
    border-radius:5px;
}

button:hover {
    opacity: 0.9;
}

.gpa-low {
    background-color: #f8d7da !important;
    color: #721c24;
    border: 2px solid #f8d7da !important;
}

.gpa-mid {
    background-color: #fff3cd !important;
    color: #856404;
    border: 2px solid #fff3cd !important;
}

.gpa-good {
    background-color: #cce5ff !important;
    color: #004085;
    border: 2px solid #cce5ff !important;
}

.gpa-excellent {
    background-color: #d4edda !important;
    color: #155724;
    border: 2px solid #d4edda !important;
}

@media (max-width: 600px) {
    .courses-table th,
    .courses-table td {
        font-size: 14px;
    }

    #gpa-calculator {
        padding: 0px;
    }

    .courses-table input,
    .courses-table select {
        font-size: 14px;
    }
}
@media (max-width: 480px) {
  #gpa-calculator,
  #semesters-container {
    max-width: 100% !important;
    padding: 0px;
  }
  
  /* Courses block */
.courses-container{
padding: 5px 5px 20px 12px;
}
  select.course-grade{
  max-width: 200px;
  padding:7px 10px;
  
}
input.course-units{
  max-width: 80px !important;
  padding:7px 10px;
}
input.course-name{
  max-width: 120px !important;
  padding:7px 10px;
}
.semester-header{
  padding:3px 4px 5px 10px;
}
.semester-footer{
  padding:3px 10px 5px 10px;
}
  .gpa-badge.first-class>h3 {
  width: 42%;
}

.gpa-badge.second-class-upper>h3 {
 width: 38%;
}

.gpa-badge.second-class-lower>h3 {
 width: 40%;

}

.gpa-badge.third-class>h3 {
 width: 55%;
}

.gpa-badge.pass>h3 {
  width: 31%;
}

.gpa-badge.fail>h3 {
  width: 31%; 
}
}

.modal-d {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal-content-d {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease-in-out;
}
.modal-content-d input {
  width: 100%;
  height:35px;
  padding: 6px;
  margin-bottom:6px;
  border: 2px solid #eee !important;
  border-radius: 8px !important;
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center !important;
  align-items: center !important;
  z-index: 9999;
  overflow: auto;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content input {
  width: 100%;
  height:35px;
  padding: 6px;
  margin-bottom:2px !important;
  border: 2px solid #eee !important;
  border-radius: 8px !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}
 #toast-popup{display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #4caf50;
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-size: 16px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.semester-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom:20px;
}
.f-button{
display:flex;
}
.f-button .fprint{
  margin-left:auto !important;

}
.semester-block {
  width: 100%;
  border: 1px solid #eee;
  border-radius:10px;
  padding: 10px;
}

@keyframes glow {
  0% { box-shadow: 0 0 0 rgba(0, 128, 255, 0); }
  50% { box-shadow: 0 0 20px rgba(0, 128, 255, 0.7); }
  100% { box-shadow: 0 0 0 rgba(0, 128, 255, 0); }
}

.result-glow {
  animation: glow 1.5s ease-out 1;
  transition: box-shadow 0.3s ease;
  border-top-left-radius: 10px ;
  border-bottom-left-radius: 10px;
  border-top-right-radius: 55px ;
  border-bottom-right-radius: 10px;
}
