html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.main-container {
  flex: 1;
}
body {
  background-color: #141414;
  color: white;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: black;
  padding: 15px 30px;
  border-bottom: 1px solid #ffbb00;
}

.navbar-links {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
  padding: 0;
  margin: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

#userDropdown,
#myquizresults,
#upload-sect,
#moderation,
#logout {
  visibility: hidden;
  opacity: 0;
}

#navbar-login {
  visibility: hidden;
  opacity: 0;
}

.show {
  visibility: visible !important;
  opacity: 1 !important;
}

.navbar-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.navbar-links li {
  position: relative;
}

.navbar-links li a,
.navbar-links li .dropbtn {
  color: white;
  text-decoration: none;
  font-size: 16px;
  padding: 5px 0;
  position: relative;
  display: inline-block;
  transition: color 0.3s ease-in-out;
}

.navbar-links li a:hover {
  color: #ffbb00;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 80px;
}

.logo {
  width: 75px;
  height: auto;
  cursor: pointer;
  transition: opacity 0.3s ease-in-out;
}

.logo2 {
  width: 170px;
  height: auto;
  left: 50%;
  transform: translateX(-40%);
  cursor: pointer;
  transition: opacity 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-container:hover .logo {
  content: url("/common/logoyellow.png");
}
.logo-container:hover .logo2 {
  content: url("/common/textyellow.png");
}

.navbar-links li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #ffbb00;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease-in-out;
}

.navbar-links li a:hover::after {
  transform: scaleX(1);
}

.dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.dropbtn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 0;
  text-decoration: none;
}

.dropbtn:hover {
  color: #ffbb00;
}

.dropdown-content {
  top: 100%;
  display: none;
  position: absolute;
  background-color: rgb(15, 14, 14);
  border: 1px solid #faca2a;
  min-width: 200px;
  padding: 10px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
  left: 0;
  z-index: 1000;
  white-space: nowrap;
}

.dropdown-content .header {
  font-size: 18px;
  color: #faca2a;
}

.dropdown-content a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 5px 0;
}

.dropdown-content.show {
  display: flex;
}

.dropdown-content a:hover {
  text-decoration: underline;
}

.dropdown:hover #semester-list {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

#semester-list li {
  list-style: none;
}

.semester-item:hover *,
.category-list li:hover * {
  color: rgb(232, 220, 115) !important;
}

#category-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: flex-start;
}
.dropbtn:hover,
.dropdown:hover .dropbtn {
  color: #ffbb00;
}

#userName,
#userEmail,
#userRole {
  color: #ffbb00;
  font-weight: bold;
}

#userDropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.dropdown-content span {
  color: #ffbb00;
  font-weight: bold;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.column h3 {
  margin: 0;
  color: #faca2a;
  font-size: 16px;
  border-bottom: 1px solid #faca2a;
  padding-bottom: 5px;
}

.column a {
  color: white;
  text-decoration: none;
  padding: 3px 0;
  transition: color 0.3s ease-in-out;
}

.column a:hover {
  text-decoration: underline;
  color: #ffbb00;
}

.category-list {
  display: none;
}

.semester-item,
.category-list li {
  list-style: none;
}

.semester-item.open .category-list {
  display: block;
}

.semester-item.open .arrow {
  transform: rotate(180deg);
}

.dropdown-content {
  display: none;
}

.arrow {
  margin-left: 5px;
  transition: transform 0.3s ease-in-out;
  width: 40px;
  height: 40px;
  vertical-align: middle;
}

.dropdown:hover .arrow {
  transform: rotate(180deg);
}

.hamburger {
  display: none;
  font-size: 24px;
  background: #ffbb00;
  border: none;
  color: #000000;
  cursor: pointer;
  margin-left: auto;
}

@media (min-width: 1231px) {
  .document-card:hover {
    background-color: #ffbb00;
    color: #000;
  }

  .document-card:hover .document-title {
    color: #000;
  }

  .document-card:hover .documents-category {
    color: #000;
  }

  .document-card:hover .popularity {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
}

@media (max-width: 1230px) {
  .document-card {
    box-sizing: border-box;
    width: 95%;
    border: 0.2px solid #ffbb00;
  }

  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    overflow-x: hidden;
  }

  .navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .navbar-links {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    gap: 10px;
    display: none;
    padding-left: 20px;
  }

  .navbar-links.show {
    display: flex;
  }

  .navbar-links li {
    width: 100%;
  }

  .hamburger {
    display: block;
  }

  .dropdown {
    width: 100%;
    position: relative;
  }

  .dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 100%;
    display: none;
    flex-direction: column;
    border: none;
    background-color: black;
    padding: 10px;
    transition: none;
    z-index: 1000;
    overflow: hidden;
  }

  .dropdown.show .dropdown-content {
    display: flex;
  }

  .dropdown-content a {
    padding: 10px;
    display: block;
    width: 100%;
    text-align: left;
  }

  .dropdown-content a:hover {
    background-color: rgba(255, 187, 0, 0.2);
  }

  .dropdown-content .row {
    flex-direction: column;
    width: 100%;
  }

  .semester-item {
    list-style: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid #ffbb00;
    max-width: 100%;
    width: 100%;
  }

  .arrow {
    margin-left: 5px;
    transition: transform 0.3s ease-in-out;
  }

  .dropdown:hover .arrow {
    transform: rotate(180deg);
  }

  .semester-item .arrow {
    transition: transform 0.3s ease-in-out;
  }

  .semester-item.open .arrow {
    transform: rotate(180deg);
  }

  .category-list {
    display: none;
    padding-left: 10px;
    flex-direction: column;
  }

  .category-list li {
    list-style: none;
    padding: 5px 0;
  }

  #semester-list.show {
    display: flex !important;
  }
}

@media (min-width: 1231px) {
  .logo-item {
    display: block;
  }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.pagination img {
  width: 40px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.pagination img:hover {
  transform: scale(1.4);
}

#page-indicator-bottom,
#page-indicator-top {
  padding: 5px 15px;
  font-size: 20px;
  font-weight: bold;
  color: #ffbb00;
  background-color: black;
  border: 2px solid #ffbb00;
  border-radius: 8px;
  margin: 0 10px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.account-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.account-modal.show {
  opacity: 1;
  visibility: visible;
}

#deleteAccountBtn {
  background-color: #ffbb00;
  color: #000;
  border: none;
  padding: 10px 15px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  text-align: center;
  border-radius: 5px;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

#deleteAccountBtn:hover {
  background-color: #ffd35b;
}

.modal-content {
  background-color: black;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 2px solid #ffbb00;
}

.modal-content label {
  display: block;
  margin-top: 10px;
  color: #ffbb00;
  font-weight: bold;
}

.modal-content button {
  margin: 10px;
  padding: 8px 15px;
  border: 2px solid #ffbb00;
  border-radius: 4px;
  cursor: pointer;
  background: black;
  color: #ffbb00;
  font-weight: bold;
  transition: background 0.3s ease, color 0.3s ease;
}

.modal-content button:hover {
  background-color: #ffbb00;
  color: black;
}

.modal-content h2 {
  color: #ffbb00;
  font-weight: bold;
}

.modal-content select,
.modal-content input {
  width: 40%;

  padding: 8px;
  margin-top: 5px;
  border: 2px solid #ffbb00;
  border-radius: 4px;
  text-align: center;
  background-color: black;
  color: #ffbb00;
  font-weight: bold;
  outline: none;
  transition: border 0.3s ease;
}

.modal-content select:hover,
.modal-content input:hover,
.modal-content select:focus,
.modal-content input:focus {
  border-color: white;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.site-footer {
  background-color: #000000;
  color: #ffbb00;
  padding: 15px 0;
  text-align: center;
  font-size: 1rem;
  border-top: 1px solid #ffbb00;
  margin-top: 30px;
}

.site-footer a {
  margin-top: 20px;
  color: #ffbb00;
  text-decoration: none;
  font-weight: bold;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 1552px) {
  .logo,
  .logo2 {
    display: none !important;
  }
}
