html,
body {
  height: 100%;
  margin: 0;
}

body {
  position: relative;
  background-color: white;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-position: center center;
  min-height: 100vh;
  margin: 0;
  background-attachment: fixed;
  transition: background-color 0.5s ease;
}
ul {
  list-style: none;
  line-height: 2rem;
  /* user-select: none; */
}
details > summary {
  list-style: none;
}

.tree summary {
  cursor: pointer;
  transition: color 0.3s ease;
  position: relative;
  padding-left: 1em;
}
.tree summary:hover {
  color: #0056b3;
}

.tree summary::marker {
  display: none;
}

.tree summary::-webkit-details-marker {
  display: none;
}

ul li {
  position: relative;
  transition: background-color 0.3s ease;
  padding-left: 0.2em;
  display: flex;
  align-items: center;
}
ul li::before {
  position: absolute;
  left: -10px;
  top: 0px;
  border-left: 2px solid gray;
  border-bottom: 2px solid gray;
  content: "";
  width: 8px;
  height: 1rem;
}

ul li::after {
  position: absolute;
  left: -10px;
  bottom: 0px;
  border-left: 2px solid gray;
  content: "";
  width: 10px;
  height: 100%;
}

ul li:last-child::after {
  display: none;
}

ul.tree > li:after,
ul.tree > li::before {
  display: none;
}
ul summary::before {
  position: absolute;
  content: "+";
  font-weight: bold;
  font-size: 1rem;
  border: 2px solid gray;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  left: -1.25em;
  top: 0.3em;
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
  transform: rotate(90deg);
  z-index: 5;
}

ul details[open] > summary::before {
  content: "~";
  font-weight: bold;
  transform: rotate(180deg);
}
details[open] > summary {
  color: black;
  font-weight:550;
}
details[close] > summary {
  color: black;
  font-weight:550;
}

.checkbox {
  position: relative;
  bottom: -3px;
}

details p {
  color: gray;
  margin: 0.05em 0 0.1em 1.8em;
  transition: color 0.5s ease-in-out;
}
details p:hover {
  color: black;
}

header {
  display: flex;
  flex-direction: column;
  padding: 0.5;
  height: auto;
  background-color: #ffffff;
}

.firstrow {
  display: flex;
  align-items: center;
  margin: 0;
}
header img {
  padding: 0.1em;
  margin: 1em;
  margin-bottom: 0;
  width: 50px;
  height: auto;
}

header h1 {
  padding-top: 0.2em;
  margin: 0;
  color: #5282ba;
  font-size: 3rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  font-family: "Akaya Telivigala", system-ui;
  font-weight: 400;
  font-style: normal;
  transition: color 0.5s ease-in-out;
}
header h1:hover {
  color:#769ecb;
}
header p {
  color: rgb(97, 98, 106);
  transition: color 0.5s ease-in-out;
}
header p:hover {
  color: black;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(1.5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}

.beautiful-button {
  cursor: pointer;
  position: relative;
  z-index: 0;
  border-radius: 10px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.beautiful-button:before {
  content: "";
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff7300,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #ff0000
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  -webkit-filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing-button-85 20s linear infinite;
  transition: opacity 0.3s ease-in-out;
  border-radius: 10px;
}

@keyframes glowing-button-85 {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 400% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.beautiful-button:after {
  z-index: -1;
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #fffffff8;
  left: 0;
  top: 0;
  border-radius: 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.popup {
  background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 8px;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 30px 60px -12px,
    rgba(0, 0, 0, 0.3) 0px 18px 36px -18px;
  padding: 10px;
  max-width: 80%;
  width: 400px;
  text-align: center;
  position: relative;
  z-index: 1001;
}
.popsem {
  justify-content: center !important;
  padding: 5px 30px 5px 30px !important;
}

.close-btn {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  color: #eeeeee;
  position: absolute;
  top: 1.3em;
  right: 1em;
  cursor: pointer;
  transition: color 0.3s, transform 0.2s;
  width: 0;
  height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.close-btn {
  -webkit-tap-highlight-color: transparent;
}

.close-btn::before,
.close-btn::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: rgb(80, 80, 80);
  transition: background-color 0.3s, transform 0.2s;
}

.close-btn::before {
  transform: rotate(45deg);
}

.close-btn::after {
  transform: rotate(-45deg);
}

.close-btn:hover::before,
.close-btn:hover::after {
  background-color: #444;
}

.close-btn:hover {
  transform: rotate(90deg);
}

.popup h2 {
  color: #79a1cf;
  font-family: "Akaya Telivigala", system-ui;
  margin-bottom: 10px;
  font-size: 2em !important;
}

.popup p {
  color: #555;
  margin-bottom: 20px;
  font-size: 1em !important;
}

.sem,
.course {
  display: flex;
  flex-wrap: nowrap;
  justify-content: stretch;
  overflow-x: auto;
  gap: 10px;
  padding: 1em 0.5em 1em 0.5em;
  background: white;
  box-shadow: 0px 5px 10px rgba(26, 34, 39, 0.081);
  transition: background-color 0.4s ease-in-out;
}

.popsem {
  display: flex;
  flex-wrap: wrap;
  justify-content: stretch;
  overflow-x: auto;
  gap: 10px;
  padding: 1em 0.5em 1em 0.5em;
  background: white;
  box-shadow: 0px 5px 10px rgba(26, 34, 39, 0.081);
  transition: background-color 0.4s ease-in-out;
  background-color: rgba(255, 255, 255, 0.149);
  border-radius: 12px;
  margin: 10px;
  padding: 24px 16px 24px 16px !important;
}
.sem {
  box-shadow: inset 0px 4px 10px rgba(155, 156, 158, 0.139);

}
.sem:hover , .course:hover {
  background: rgb(241, 241, 241);
}
.course,
.popsem {
  flex-wrap: wrap;
  overflow-x: auto;
  box-shadow: none;
}
.sem button,
.course input,
.popup button {
  background-color: #f8fafb;
  color: rgb(36, 36, 37);
  border: 2px solid rgb(86, 88, 90);
  border-radius: 25px;
  padding: 8px 16px;
  font-size: 1.21rem;
  scale: 0.85;
    font-family: Helvetica, Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.3s, color 0.2s, transform 0.2s;
  box-shadow: 0 5px 12px rgba(94, 92, 92, 0.1);
}
.popsem button {
  scale: 1 !important;
  flex: 1 1 30% !important;
}

.sem button:hover,
.course input:hover,
.popup button:hover {
  background-color: #73a5de;;
  color: rgb(0, 0, 0);
  transform: translateY(-3px);
}

.sem button:active,
.course input:active {
  background-color: #b2b2b2;
  transform: translateY(0);
}
.sem button,
.course input,
.popup button {
  -webkit-tap-highlight-color: transparent !important;
}

.infoheader {
  display: flex;
  flex-direction: column;
  background-color: #9b9b9b09;
  padding: 1em;
  box-shadow: 2px 2px 20px rgba(155, 156, 158, 0.269);
  transition: background-color 0.5s ease-in-out;
}
.infoheader:hover {
   background-color: #fdfdfd;
}

.infoheader h1 {
  font-size: 2em;
  color: rgb(27, 27, 27);
  margin: 0;
}

.infoheader > .subheader-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.infoheader h2 {
  font-size: 1.5em;
  color: rgb(97, 98, 106);
  margin: 0;
  transition: color 0.5s ease-in-out;
}
.infoheader h2:hover {
  color: rgb(0, 0, 0);
}

.infoheader p {
  font-size: 1.4em;
  color: rgb(97, 98, 106);
  line-height: 1.5;
  margin: 0;
  transition: color 0.5s ease-in-out;
}
.infoheader p:hover {
  color: black;
}

@media (max-width: 480px) {
  .popup {
    width: 90%;
    padding: 15px;
  }

  .popup h2 {
    font-size: 20px;
  }

  .popup p {
    font-size: 14px;
  }

  .popup button {
    font-size: 12px;
    padding: 8px 12px;
  }
  .infoheader:hover {
   background-color: #fdfdfd;
  }
  .sem:hover, .course:hover {
    background: linear-gradient(to bottom, transparent, #d3cfcf17) !important;
  }
  .course {
    max-height: 11.9em;
    overflow-x: auto;
  }
}

.pyqbutton {
    font-family: Helvetica, Arial, sans-serif;
  font-weight: 200;
  font-style: normal;
  font-size: 1rem;
  z-index: 50;
  position: fixed;
  bottom: 20px;
  right: 20px; 
  width: 60px;
  height: 60px;
  border-radius: 50%; 
  background-color: #111;
  color: rgb(0, 0, 0);
  display: flex;
  justify-content: center; 
  align-items: center; 
  cursor: pointer; 
  border: none; 
  user-select: none; 
}

/* Footer Styles */
footer {
  background: linear-gradient(to bottom, transparent, #d3cfcf7e);
  color: #484848;
  text-align: center;
  padding: 1rem 0;
  position: relative;
  bottom: 0;
  margin-top: 17.5em;
  width: 100%;
  transition: color 0.5s ease-out, background-color 0.5s ease-in-out;
  z-index: 100;
}
footer:hover {
  color: #0578cf;
  background-color: #dadadac5;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-content p {
  margin: 0.5rem 0;
}

.footer-content a {
  color: #0b0b0b;
  text-decoration: none;
  transition: color 0.5s ease-out;
}

.footer-content a:hover {
  text-decoration: underline;
  color: #0578cf;
}

.social-media {
  margin: 1rem 0;
}

.social-media a {
  margin: 0 0.5rem;
  color: #4a4545;
  text-decoration: none;
}

.social-media a:hover {
  text-decoration: underline;
}

.akaya-telivigala-regular {
    font-family: Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-style: normal;
}



/*dark buttom*/
.theme-toggle {
  position: relative;
  z-index: 5;
   -webkit-tap-highlight-color: transparent;
  width: 50px;
  height: 50px; 
  background-color: transparent; 
  border: none;
  cursor: pointer;
}

.theme-toggle .sun-and-moon {
  position: absolute;
  right: 5px; 
  top: 50%;
  transform: translateY(-50%);
  fill: currentColor;
  transition: fill 0.3s ease;
}
/* Initial SVG styling */
.theme-toggle .sun-and-moon {
  transition: transform 0.3s ease, fill 0.3s ease;
}

.secondrow {
  display: inline-flex;
}



/* Default (Light Theme) */
body {
  background-color: white;
  color: black;
}

header, .infoheader, .sem, .pyqbutton, .course, .popup, footer {
  background-color: rgb(247, 247, 247);
  color: black;
}

.theme-toggle .sun-and-moon {
  fill: black;
}

.gpt-btn {
  width: 20px;
  height: 20px;
  background-image: url('ChatGPT.webp');
  background-size: contain;
  background-position: center;
  border: none;
  cursor: pointer;
  margin-left: 8px;
  background-color: transparent;
}

/* Dark Theme */
body.dark-theme .popup {
  background-image: linear-gradient(135deg, #080120 0%, #091940 100%);
}
body.dark-theme .popup button ,
body.dark-theme button,
body.dark-theme .course input {
  background-color: transparent;
  border-color: #d2d2d2;
  color: white;
}

body.dark-theme {
  background-color: #000000;
  color: #ffffff;
  transition: background-color 0.5s ease;
}

body.dark-theme header,
body.dark-theme .infoheader,
body.dark-theme .sem,
body.dark-theme .course,
body.dark-theme .popup,
body.dark-theme footer {
  background-color: #050505;
  color: #000000;
  transition: background-color 0.5s ease;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme p {
  color: #e5e5e5;
}

body.dark-theme .theme-toggle .sun-and-moon {
  fill: #ffffff;
}

body.dark-theme a {
  color: #e3e3e3;
}

body.dark-theme a:hover,
body.dark-theme .subheader-row h2:hover,
body.dark-theme .subheader-row p:hover {
  color: #ffffff;
}

body.dark-theme .popup-overlay {
  background-color: rgba(0, 0, 0, 0.8);
  background: linear-gradient(135deg, #00000097 0%, #01081bb6 100%);
}
body.dark-theme footer {
  background-color: rgba(0, 0, 0, 0.8);
  background: linear-gradient(135deg, #000000 0%, #01081b 100%);
  transition: background-color 3s ease;
}

body.dark-theme .beautiful-button:after {
  background: #010134;
}

body.dark-theme details[open] > summary {
  color: #018be0;
}

body.dark-theme ul summary::before {
  background-color: #000000;
}


.noStyling {
  all: unset;
}
