* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  font-size: 14px;
  background-color: #f8f9fa;
  color: #333;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 50px 0;
}

.display-none {
  display: none;
}

form,
.gpa-container {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  text-align: center;
  margin: 0 50px;
}


form.edit {
  background: rgb(230, 250, 250);
  box-shadow: 0 4px 50px rgba(120, 180, 180, 0.71);
}

/* Input fields */
input,
select {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
}

/* Buttons*/
button {
  padding: 10px 15px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  background-color: #218838;
}

/* Course list*/
ul#courseList {
  list-style-type: none;
  padding: 0;
  margin: 10px;
  width:300px;
  width:80%;
}

li {
  background-color: #FFFFFF;
  margin: 5px 0;
  padding: 10px;
  border-radius: 4px;
  text-align: left;
  display: flex;
  flex-direction: colun;
  justify-content: space-between;
  align-items: center;
  
  
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

li .first-box {
  height: max-content;
  width: max-content;
  display: flex;
}

li .course {
  display: flex;
  gap: 10px;
  
  
}

li .course ul {
  display: flex;
  gap: 5px;
}

li button {
  margin-left: 10px;
  padding: 5px 10px;
  background-color: #dc3545;
  /* For delete */
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
}


li button:hover {
  opacity: 0.8;
}

li .remark {
  
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 4px;
}

/* Loading UI*/

ul:has(li:not(.loading)) li.loading {
  display: none;
}

li.loading {
  position: relative;
  background-color: #e9ecef;
  overflow: hidden;
}

li.loading p {
  width: max-content;
}

li.loading button,
li.loading p {
  color: transparent;
  background: rgba(158, 159, 150, .12);
  ;
  border-radius: 20%;
}

li.loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 100%);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    left: -150%;
  }
  
  50% {
    left: 50%;
  }
  
  100% {
    left: 150%;
  }
}

#gpaResult {
  margin-top: 20px;
  font-size: 18px;
  color: #333;
}

h1 {
  margin-bottom: 20px;
}

h3 {
  margin-top: 20px;
  font-size: 18px;
}

.form-row {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-bottom: 10px;
}

/* Navbar and Hamburger Menu */
.navbar {
  position: fixed;
  top: 0;
  right: 0;
  padding: 10px;
  z-index: 100;
}

.navbar button {
  background: unset;
}

.navbar:has(.menu-modal:not(.display-none)) .open {
  display: none;
}

.navbar:has(.menu-modal.display-none) .close {
  display: none;
}

.hamburger {
  font-size: 30px;
  border: none;
  color: #333;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 20px;
  z-index: 101;
}

.menu-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: 250px;
  height: 100%;
  background-color: rgb(238, 239, 240);
  
  color: black;
  padding: 20px;
  box-shadow: -5px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 100;
  
}

.menu-modal ul {
  list-style: none;
  padding: 30px 0;
  
}

.menu-modal ul li {
  background: unset;
  margin: 0;
  padding-block: 10px;
  
}

body:has(.menu-modal li input.edit-nd-del:checked) ul#courseList {
  button {
    display: none;
  }
  
  .course {
    display: flex;
    flex-direction: row;
    justify-content: center;
  }
  
}

/* Page content*/
.content {
  margin-top: 80px;
  padding: 20px;
  text-align: center;
}

/* Sending some rows to one line for smaller screens*/
@media screen and (max-width: 568px) {}

/* smaller screens */
@media (max-width: 668px) {
  .hamburger {
    font-size: 25px;
  }
  
  .menu-modal {
    width: 200px;
  }
  
  .form-row {
    flex-direction: row;
    gap: 10px;
  }
  
  .form-row input,
  .form-row select {
    margin: 0;
  }
  
  li .course {
    flex-direction: column;
    gap: 5px;
    width: 150px;
  }
  
  li .course ul {
    display: flex;
    gap: 5px;
  }
}