/* Importing Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  font-family: Arial, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background: #f4f6f8;
}

h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 30px;
}

/* body {
    background: url("images/lib-statue.avif");
    background-size: cover;
    background-position: 30% center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    ;
} */

/* .wrapper {
    width: 100%;
    min-height: 110vh;
    background: rgba(39, 39, 39, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
} */

.nav {
  margin-bottom: 20px;
  position: relative;
  top: 0;
  display: flex;
  justify-content: space-around;
  width: 100%;
  height: 60px;
  line-height: 60px;
  /* Old background: background: linear-gradient(39,39,39,0.6) ; */
  background: linear-gradient(90deg, #1a2980 0%, #26d0ce 100%);
  /* Example: blue to teal gradient, adjust as you like */
  z-index: 100;
  border-radius: 15px;
}

.nav-logo {
  display: flex; /* Make container flex */
  align-items: center; /* Center vertically */
  gap: 10px; /* Space between logo and text (if any) */
}

.nav-logo img {
  max-height: 40px;
  width: auto;
  display: block;
  padding-right: 20px;
  filter: drop-shadow(0 0 3px white)
    drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.nav-menu ul {
  display: flex;
}

.nav-menu ul li {
  list-style-type: none;
}

.nav-menu ul li .link {
  text-decoration: none;
  font-weight: 500;
  color: #fff;
  padding-bottom: 15px;
  margin: 0 25px;
}

.link:hover,
.active {
  border-bottom: 2px solid #fff;
}

.nav-menu ul li .btn {
  width: 130px;
  height: 40px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.3s ease;
}

.nav-menu ul li .btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #333;
}

.nav-button .btn {
  width: 130px;
  height: 40px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.3s ease;
}

.nav-menu ul li .btn.white-btn {
  background: rgba(255, 255, 255, 0.7);
}

#registerBtn {
  margin-left: 15px;
}

.controls {
  margin-top: 20px;
}

.btn {
  background-color: #3498db;
  color: white;
  padding: 10px 16px;
  margin: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

.btn:hover {
  background-color: #2980b9;
}

.controls form {
  margin-top: 10px;
}

.btn.white-btn {
  background: rgba(255, 255, 255, 0.7);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn.white-btn:hover {
  background: rgba(255, 255, 255, 0.5);
}

.nav-menu-btn {
  display: none;
}

/*------ Login and register form box style ------ */
.form-box {
  position: fixed;
  /* Make it overlay the whole page */
  top: 0;
  left: 0;
  width: 100vw;
  /* Full viewport width */
  height: 100vh;
  /* Full viewport height */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  /* Optional: darken background */
  z-index: 9999;
  /* Make sure it's on top */
  border: none;
  border-radius: 0;
  padding: 0;
}

.login-container {
  position: relative;
  background-color: #26d0ce;
  border-radius: 15px;
  padding: 50px;
  width: 500px;
  display: flex;
  flex-direction: column;
  transition: opacity 1s;
  opacity: 1;
}

.register-container {
  position: relative;
  background-color: #26d0ce;
  border-radius: 15px;
  padding: 50px;
  display: flex;
  flex-direction: column;
  transition: opacity 1s;
  opacity: 0;
}

.close-btn {
  position: relative;
  top: -30px;
  right: -20px;
  font-size: 25px;
  color: #fff;
  cursor: pointer;
}
.close-btn:hover {
  color: #000000;
}

.close-btn-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.top span {
  color: #fff;
  margin-left: 5px;
  padding: 10px 0;
  display: flex;
  justify-content: center;
}

.top span a {
  font-weight: 500;
  color: #fff;
  margin-left: 5px;
}

header {
  color: #fff;
  font-size: 30px;
  text-align: center;
  padding: 10px 0 30px 0;
}

.two-forms {
  display: flex;
  gap: 10px;
}

.input-field {
  font-size: 15px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  height: 50px;
  width: 100%;
  padding: 0 10px 0 45px;
  border: none;
  border-radius: 30px;
  outline: none;
  transition: 0.2s ease;
}

.input-field:hover,
.input-field:focus {
  background: rgba(255, 255, 255, 0.25);
}

::-webkit-input-placeholder {
  color: #fff;
}

.input-box i {
  position: relative;
  top: -35px;
  left: 17px;
  color: #fff;
}

.submit {
  font-size: 15px;
  font-weight: 500;
  width: 100%;
  height: 45px;
  color: black;
  border: none;
  border-radius: 30px;
  outline: none;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.submit:hover {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 1px 5px 7px 1px rgba(255, 255, 255, 0.2);
}

.two-col {
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: small;
  margin-top: 10px;
}

.two-col .one {
  display: flex;
  gap: 5px;
}

.two-label a {
  text-decoration: none;
  color: #fff;
}

.two label a:hover {
  text-decoration: underline;
}

@media only screen and (max-width: 768px) {
  .nav-button {
    display: none;
  }

  .nav-menu.responsive {
    top: 100px;
  }

  .nav-menu {
    position: fixed;
    top: -2000px;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 90vh;
    backdrop-filter: blur(20px);
    transition: 0.3s;
  }

  .nav-menu ul {
    flex-direction: column;
    align-items: center;
  }

  .nav-menu-btn {
    display: block;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    z-index: 200;
  }

  .nav-menu-btn i {
    font-size: 25px;
    color: #fff;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
  }

  .nav-menu-btn i:hover {
    background: rgba(255, 255, 255, 0.15);
  }

  .form-box {
    width: 90%;
  }

  .login-container,
  .register-container {
    width: 100%;
  }
}

@media only screen and (max-width: 500px) {
  .wrapper {
    min-height: 100vh;
  }

  .form-box {
    width: 100%;
    height: 500px;
    padding: 0 20px;
  }

  .register-container .two-forms {
    flex-direction: column;
    gap: 0;
  }

  .nav-logo {
    font-size: 20px;
  }

  .nav-menu ul li .link {
    margin: 0 10px;
  }

  .nav-button .btn {
    width: 100px;
    height: 35px;
  }

  .login-container,
  .register-container {
    width: 100%;
    padding: 0 20px;
    margin-top: 100px;
  }

  #registerBtn {
    margin-left: 0;
    /* Remove offset in mobile menu */
  }

  .nav-menu ul li .btn {
    margin: 10px auto;
    /* Center buttons horizontally */
    display: block;
  }

  .close-btn {
    top: 10px;
    right: 5px;
  }
}

/* Style for buttons in the nav menu */

/* Style for Terms & Conditions in the Sign Up */
.tc-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
}
.tc-dialog {
  max-width: 900px;
  width: 92vw;
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  color: #111;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.tc-close {
  float: right;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}
html[data-theme="dark"] .tc-dialog {
  background: #0b1220;
  color: #fff;
  border: 1px solid #22314f;
}
html[data-theme="dark"] .tc-close {
  color: #fff;
}
/* put this in your main CSS file */
.tc-overlay[hidden] {
  display: none !important;
}

/* ===== Dark Mode Overrides (append at END of file) ===== */
html[data-theme="dark"] body {
  background: #0b1220; /* page bg */
  color: #e5e7eb; /* base text */
}

/* Navbar gradient + link contrast */
html[data-theme="dark"] .nav {
  background: linear-gradient(90deg, #0b2540 0%, #136d84 100%);
  color: #fff;
}
html[data-theme="dark"] .link {
  color: #fff;
}
html[data-theme="dark"] .link.active,
html[data-theme="dark"] .link:hover {
  border-bottom-color: #fff;
}

/* Dark mode overrides */
html[data-theme="dark"] .nav-menu ul li .btn {
  background: #334155;
  color: #e5e7eb;
}
html[data-theme="dark"] .nav-menu ul li .btn:hover {
  background: #3b475e;
}

/* Burger button on mobile */
html[data-theme="dark"] .nav-menu-btn {
  color: #fff;
}
html[data-theme="dark"] .nav-menu-btn i {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}
html[data-theme="dark"] .nav-menu-btn i:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Buttons (keep your sizes/rounding; just recolor) */
html[data-theme="dark"] .btn {
  background: #334155; /* slate-700-ish */
  color: #e5e7eb;
}
html[data-theme="dark"] .btn:hover {
  background: #3b475e;
}
html[data-theme="dark"] .btn.white-btn {
  background: #273244; /* darker "white" button in dark */
  color: #e5e7eb;
}
html[data-theme="dark"] .btn.white-btn:hover {
  background: #323d53;
}

/* Modal backdrop & cards */
html[data-theme="dark"] .form-box {
  background: rgba(0, 0, 0, 0.6); /* darker overlay */
}
html[data-theme="dark"] .login-container,
html[data-theme="dark"] .register-container {
  background-color: #1f2a37; /* card bg */
  color: #e5e7eb;
}

/* Close button & headings */
html[data-theme="dark"] .close-btn {
  color: #e5e7eb;
}
html[data-theme="dark"] .close-btn:hover {
  color: #cbd5e1;
}
html[data-theme="dark"] header {
  color: #e5e7eb;
}
html[data-theme="dark"] .top span,
html[data-theme="dark"] .top span a {
  color: #e5e7eb;
}

/* Inputs */
html[data-theme="dark"] .input-field {
  background: rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
}
html[data-theme="dark"] .input-field:hover,
html[data-theme="dark"] .input-field:focus {
  background: rgba(255, 255, 255, 0.18);
}
html[data-theme="dark"] ::-webkit-input-placeholder {
  color: #cbd5e1;
}
html[data-theme="dark"] .input-box i {
  color: #cbd5e1;
}

/* Submit button inside modals */
html[data-theme="dark"] .submit {
  background: rgba(255, 255, 255, 0.16);
  color: #e5e7eb;
}
html[data-theme="dark"] .submit:hover {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 1px 5px 7px 1px rgba(0, 0, 0, 0.3);
}

/* Small text/links in modals */
html[data-theme="dark"] .two-col {
  color: #e5e7eb;
}
html[data-theme="dark"] .two label a,
html[data-theme="dark"] .two-label a {
  color: #e5e7eb;
}

/* icon (light mode) */
.theme-icon {
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  margin-left: 15px;
  user-select: none;
  color: #fff; /* visible on your blue navbar */
  transition: transform 0.2s, opacity 0.2s;
}
.theme-icon:hover {
  transform: scale(1.15);
  opacity: 0.9;
}

/* icon (dark mode) */
html[data-theme="dark"] .theme-icon {
  color: #ffe08a; /* warm sun/moon tint (optional) */
}

/* Dark mode: make card/question text white */
html[data-theme="dark"] .card,
html[data-theme="dark"] .quiz-box,
html[data-theme="dark"] .flashcard,
html[data-theme="dark"] .question-box {
  background: #1e293b; /* dark slate */
  color: #ffffff !important; /* white text */
  border: 1px solid #334155;
}

/* ensure all text inside is white */
html[data-theme="dark"] .card *,
html[data-theme="dark"] .quiz-box *,
html[data-theme="dark"] .flashcard *,
html[data-theme="dark"] .question-box * {
  color: #ffffff !important;
}

/* Headings in dark mode */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
  color: #ffffff !important;
}

/* ==== Flashcard - light defaults (keep if not present) ==== */
.flashcard,
#flashcard,
.flashcard-card,
.card.flashcard {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  transition: background 0.25s, color 0.25s, border-color 0.25s,
    box-shadow 0.25s;
}

/* If you use front/back faces */
.flashcard .front,
.flashcard .back {
  background: inherit;
  color: inherit;
  border-radius: inherit;
}

/* ==== Flashcard - dark mode ==== */
html[data-theme="dark"] .flashcard,
html[data-theme="dark"] #flashcard,
html[data-theme="dark"] .flashcard-card,
html[data-theme="dark"] .card.flashcard {
  background: #111827 !important; /* dark card */
  color: #f8fafc !important; /* near-white text */
  border-color: #374151 !important; /* subtle border */
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45) !important;
}

/* Ensure ALL text/icons inside the card turn light */
html[data-theme="dark"] .flashcard *,
html[data-theme="dark"] #flashcard *,
html[data-theme="dark"] .flashcard-card *,
html[data-theme="dark"] .card.flashcard * {
  color: #f8fafc !important;
}

/* If your prompt/answer have their own classes */
html[data-theme="dark"] .flashcard .question,
html[data-theme="dark"] .flashcard .answer {
  color: #f8fafc !important;
}

/* ===== Flashcards & Quiz Buttons ===== */

/* Light mode (default) */
.quiz-button-inline,
.quiz-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #3498db; /* bright blue */
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.quiz-button-inline:hover,
.quiz-button:hover {
  background: #0a3b5c;
}

/* Dark mode override */
html[data-theme="dark"] .quiz-button-inline,
html[data-theme="dark"] .quiz-button {
  background: #092d81; /* deeper blue for dark mode */
  color: #f8fafc;
}

html[data-theme="dark"] .quiz-button-inline:hover,
html[data-theme="dark"] .quiz-button:hover {
  background: #1e40af;
}

/* Mobile menu sheet */
@media only screen and (max-width: 768px) {
  html[data-theme="dark"] .nav-menu {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
  }
}

/* ==== Footer Styles ==== */

footer {
  background: linear-gradient(90deg, #1a2980 0%, #26d0ce 100%);
  color: #f8f8f8;
  padding: 50px;
  border-radius: 8px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
}

.footer-left {
  flex: 1;
  min-width: 250px;
}

.footer-left h2 {
  margin-bottom: 15px;
}

.footer-left p {
  margin: 5px 0;
}

.footer-right {
  flex: 1;
  min-width: 300px;
}

.footer-right form {
  display: flex;
  flex-direction: column;
}

.footer-right input,
.footer-right textarea {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #000;
}

.footer-right input::placeholder,
.footer-right textarea::placeholder {
  color: #666; /* medium gray so it's readable */
}

.footer-right button {
  padding: 10px;
  background: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
}

.social-icons a {
  color: #f8f8f8;
  margin: 0 10px;
  text-decoration: none;
  font-size: 18px;
}

/* ==== Footer Dark Mode Overrides ==== */
html[data-theme="dark"] footer {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #e5e7eb; /* light gray text */
}

html[data-theme="dark"] .footer-right input,
html[data-theme="dark"] .footer-right textarea {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
}

html[data-theme="dark"] .footer-right input::placeholder,
html[data-theme="dark"] .footer-right textarea::placeholder {
  color: #94a3b8;
}

html[data-theme="dark"] .footer-right button {
  background: #334155;
  color: #f1f5f9;
}
html[data-theme="dark"] .footer-right button:hover {
  background: #475569;
}

html[data-theme="dark"] .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

html[data-theme="dark"] .social-icons a {
  color: #f1f5f9;
}
