/* Version 1 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body {
  text-align: center;
  margin: 0;
  padding: 0;
  /* background-image: url("source/image/background-2.png"); */
  background-color: #777777;
  font-family: "Inter", sans-serif;
}

/* Modal Background */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Modal Box */
.modal-box {
  width: 80%;
  height: 60%;
  background: url('source/image/modal-2.png') no-repeat center center;
  background-size: cover;
  display: block;
  align-items: flex-end;
  justify-content: center;
  padding: 30px;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
}

#studentsModal .modal-box {
  display: block;
}

#studentsModal .data-table {
  width: 100%;
}

.modal-box h1 {
  margin-bottom: 10%;
  font-size: 81px;
  font-family: "Titan One", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: #303030;
}

.modal-box-text {
  position: absolute;
  top: 13%;
  left: 57%;
}


.modal-box button {
  padding: 18px 24px;
  font-size: 24px;
  border: none;
  border-radius: 6px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}

.modal-box button:hover {
  background-color: #0056b3;
}

.hidden {
  display: none;
}




.main-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
  width: 100%;
}

.book-container {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  height: 100vh;
  padding: 0.5rem;
  gap: 0rem;
  flex: 1;
  /* Take all remaining space */
}

/* A4-like pages, scaled to fit 1360x768 */
.page {
  display: none;
  background: white;
  border: 1px solid #ccc;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  aspect-ratio: 1 / 1.414;
  width: 31vw;
  /* smaller width to fit both pages in 1360px */
  max-width: 648px;
  /* max pixel width */
  max-height: 915px;
  /* keeps it under 768px height */
  box-sizing: border-box;
  position: relative;
}

.page.active {
  display: block;
}

/* Right: Sidebar navigation */
.sidebar {
  width: 20%;
  min-width: 250px;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 94%;
  overflow-y: auto;
  margin-left: 2%;
  margin-right: 2%;
  background-color: #fffaf1;
  /* Soft light blue */
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  -ms-overflow-style: none;
  /* Hide scrollbar in IE and Edge */
  scrollbar-width: none;
  /* Hide scrollbar in Firefox */
}

.desktop-sidebar-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1200;
  display: none;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 12px;
  background-color: #ff6f00;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

.desktop-sidebar-toggle:hover {
  background-color: #002244;
}

@media (min-width: 1025px) {
  .desktop-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.desktop-sidebar-collapsed .sidebar {
    display: none;
  }

  body.desktop-sidebar-collapsed #myBook {
    margin-left: 0;
  }
}

.sidebar::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar in Chrome, Safari, Opera */
}

/* Phase 2 Auth Pill Section */
.auth-pill {
  background-color: #ff6f00;
  border-radius: 40px;
  padding: 8px 15px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.user-profile {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 15px;
}

.avatar-circle {
  width: 45px;
  height: 45px;
  background-color: #f0f4f8;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.user-info-text {
  display: flex;
  flex-direction: column;
  color: white;
  overflow: hidden;
}

.user-email,
.login-register-text {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.logout-text-btn {
  background: none;
  border: none;
  color: #a0aec0;
  font-size: 0.8rem;
  padding: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
}

.logout-text-btn:hover {
  color: red;
}

/* Auth Modals */
.auth-modal {
  max-width: 400px;
  background-color: #ffffff;
}

.auth-modal h2 {
  color: #ff6f00;
  margin-bottom: 20px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #4A5568;
}

.form-group input {
  padding: 10px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 1rem;
}

.submit-auth-btn {
  margin-top: 10px;
  background-color: #ff6f00;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}

.submit-auth-btn:hover {
  background-color: #002244;
}

/* Phase 2 Middle Controls Row */
.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.control-btn {
  background-color: #ff6f00;
  color: white;
  border: none;
  border-radius: 12px;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}

.control-btn:hover {
  background-color: #002244;
  transform: translateY(-2px);
}

.control-btn:active {
  transform: translateY(1px);
}

.control-btn span {
  font-size: 1.4rem;
}

.zoom-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 15px;
}

.zoom-btn {
  width: 42px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background-color: #ff6f00;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.18);
  transition: background-color 0.2s, transform 0.2s;
}

.zoom-btn:hover {
  background-color: #002244;
  transform: translateY(-1px);
}

.zoom-btn:active {
  transform: translateY(1px);
}

.zoom-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.zoom-reset-btn {
  width: 52px;
  font-size: 0.9rem;
}

.zoom-level {
  min-width: 54px;
  color: #ff6f00;
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

.page-indicator {
  font-size: 0.95rem;
  color: #333;
  font-weight: 600;
  opacity: 0.8;
}

/* Phase 2 Navigate Pill */
.navigate-pill {
  background-color: #ff6f00;
  border-radius: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  margin-bottom: 25px;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.nav-arrow {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0 10px;
  transition: color 0.2s;
}

.nav-arrow:hover {
  color: #90cdf4;
}

.nav-text {
  font-weight: bold;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

/* Phase 2 Daftar Isi */
.daftar-isi-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.daftar-isi-header {
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  color: #FFF;
  background-color: #ff6f00;
  padding: 12px 0;
  border-radius: 10px 10px 0 0;
  margin: 0;
  letter-spacing: 1px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background-color: #fff3e0;
  /* Light blue backing */
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  border: 1px solid #c3dafe;
  border-top: none;
}

.toc-list li {
  background-color: transparent;
  padding: 12px 15px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, font-weight 0.2s;
  text-align: left;
  border-bottom: 1px solid #c3dafe;
  font-weight: 500;
  color: #7c431c;

  display: flex;
  align-items: center;
  font-weight: bold;
  /* Default untuk Judul BAB */
}

/* Gaya untuk sub-bab (1.1, 1.2, dst) */
.toc-list li.toc-sub {

  font-weight: normal;
}

/* Sub-bab level 4 (Contoh: 1.3.3.1) */
.toc-list li.toc-sub-deep {

  /* Indentasi lebih dalam dari level 3 */
  font-weight: normal;
  font-size: 0.85em;
}

/* Gaya untuk detail kegiatan (1.3.1, dst) */
.toc-list li.toc-sub-inner {

  font-weight: normal;
  font-size: 0.9em;
  color: #555;
}

/* Menampilkan nomor halaman dari atribut data-page */
.toc-list li::after {
  content: attr(data-page);
  margin-left: auto;
}





.toc-list li:last-child {
  border-bottom: none;
}

.toc-list li:hover {
  background-color: #bee3f8;
}

.toc-list li.active {
  background-color: #90cdf4;
  font-weight: 700;
  color: #ff6f00;
}

ul.toc-list {
  padding-inline-start: 0px;
}

/* .sidebar-content{
  margin-right: 10%;
} */

.top-nav-mobile,
.bottom-nav-mobile {
  display: none;
}

.toc-list a {
  color: #7c431c;
  text-decoration: none;
}

/* *---------------- Mobile TOC / Daftar Isi ----------- */
/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.7);
}

/* Modal Content */
.modal-content {
  background-color: #fffbea;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
}

/* Modal Content */
.modal-content-yt {
  background-color: #fffbea;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  margin: auto;
}

.close-button {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
}

.daftar-isi-list {
  list-style-type: none;
  padding: 0;
  font-size: 1.2rem;
}

.daftar-isi-list li {
  margin: 10px 0;
}

.daftar-isi-list a {
  color: #333;
  text-decoration: none;
  font-weight: bold;
}

.top-nav-mobile button,
.bottom-nav-mobile button {
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-bottom-toggle {
  display: none;
}

.top-nav-mobile button img,
.bottom-nav-mobile button img {
  height: 60px;
}

#page0 {
  background-color: transparent;
}

#page0.page {
  border: none;
  box-shadow: none;
}


/* --- Page 2 */
.kata-pengantar {
  color: #000;
  text-align: justify;
  font-size: 0.7rem;
  font-family: "Inter";
  font-weight: 400;
}

.page-padding {
  padding: 2rem 3rem;
}

.kata-pengantar-footer {
  margin-left: auto;
  margin-right: 0;
  width: 50%;
}

.kata-pengantar-footer-text {
  text-align: center;
  font-size: 0.7rem;
}


/* ------Each page CSS------- */


















































































/* ------- Quiz CSS Style---------- */
h1 {
  color: #001f9c;
  font-size: 1.3vw;
  text-align: center;
  margin-top: 2vw;
  margin-bottom: 0.1vw;
}

h3 {
  color: #001f9c;
  text-align: center;
  font-size: 1vw;
  margin-bottom: 1.5vw;
  margin-top: 0px;
}

.question {
  margin-bottom: 1.5vw;
}

.question p {
  font-size: 0.9vw;
  font-weight: 600;
  margin-bottom: 0.8vw;
  text-align: left;
}

.option {
  display: flex;
  align-items: center;
  /* padding: 0.2vw 0.75vw; */
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 0.2vw;
  font-size: 80%;
  background-color: #fff;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-left: 5%;
}

.option span {
  display: inline-block;
  width: 8%;
  background-color: #ccc;
  color: white;
  font-weight: bold;
  text-align: center;
  border-radius: 5px;
  padding: 0.3vw 0;
  /* margin: 0.2vw auto; */
}

.option p {
  width: 90%;
  font-size: 0.8vw;
  background-color: #fff;
  transition: all 0.2s ease;
  text-align: left;
  cursor: pointer;
  margin: 0;
  margin-left: 0.5vw;
  font-weight: normal;
}


.option.correct {
  background-color: #00b300;
  color: white;
  border-color: #00b300;
}

.option.correct p {
  color: white;
  background-color: #32d36e;
}

.option.correct span {
  background-color: #007a00;
}

.option.incorrect,
.option.incorrect p {
  background-color: #f85c5c;
  color: white;
  border-color: #f99;
}

.option.incorrect span {
  background-color: #B53016;
}

.option.disabled {
  pointer-events: none;
  opacity: 0.8;
}

#pageTOC {
  position: relative;
  background-image: url("source/page/Opening\ -\ \(6\).webp");

  background-size: cover;
  background-repeat: no-repeat;

}

#QuizPage-1 {
  background-image: url("source/page/Page\ -\ \(66\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#QuizPage-2 {
  background-image: url("source/page/Page\ -\ \(67\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#QuizPage-3 {
  background-image: url("source/page/Page\ -\ \(68\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#QuizPage-4 {
  background-image: url("source/page/Page\ -\ \(69\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#QuizPage-5 {
  background-image: url("source/page/Page\ -\ \(70\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#QuizPage-6 {
  background-image: url("source/page/Page\ -\ \(71\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#QuizPage-7 {
  background-image: url("source/page/Page\ -\ \(72\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#QuizPage-8 {
  background-image: url("source/page/Page\ -\ \(73\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#QuizPage-9 {
  background-image: url("source/page/Page\ -\ \(74\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#QuizPage-10 {
  background-image: url("source/page/Page\ -\ \(75\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}


#QuizPage-1 .quiz-instruction {
  margin-bottom: 0;
  font-size: 80%;
}

#essaypage-1 {
  background-image: url("source/page/Page\ -\ \(76\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#essaypage-2 {
  background-image: url("source/page/Page\ -\ \(77\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}





.quizpage-inner {
  position: absolute;
  top: 7%;
  left: 10%;
  width: 80%;
}

.quizpage-inner h1 {
  font-size: 100%;
}

.quizpage-inner h3 {
  font-size: 80%;
}

.quizpage-inner p {
  font-size: 80%;
}

.quizpage-inner .option p {
  font-size: 100%;
}

.quizpage-inner .question p:first-child {
  font-size: 80%;
}


/* .quizpage-inner-left{
      margin-top: 2vw;
    } */
.quizpage-inner-match {
  margin-top: 10%;
}

ul.list-instruction-penilaian-akhir {
  margin: 0;
  padding-left: 10%;
  font-size: 100%;
}

.list-instruction-penilaian-akhir li {
  font-size: 80%;
  text-align: left;
  line-height: 14px;
}

.summary {
  position: absolute;
  top: -18%;
  left: 93%;
  text-align: center;
  display: flex;
  flex-direction: row;
  font-size: 100%;
  font-weight: 500;
  background-color: #FFE974;
  border-radius: 16px;
  padding: 0.5vw 1vw;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  z-index: 1;

}

.summary-first {
  top: -10% !important;
}

.summary-mobile {
  display: none;
}

.summary p,
.summary span {
  margin: 0;
  font-size: 1vw;
  color: #0D0D0D;
}

.summary-right span {
  padding-left: 0.7vw;
}

.summary-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 0.7vw;
}

.summary-left p {
  font-size: 0.9vw;
  line-height: 0.2vw;
  font-weight: 500;
}

.summary-left span {
  font-size: 2vw;
  font-weight: bold;
}

.summary-right {
  display: flex;
  flex-direction: column;
  margin-left: 2vw;
  justify-content: center;
}

.summary-right-inner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: left;
}

.restart-btn {
  display: block;
  margin: 1.5rem auto;
  padding: 0.8rem 2rem;
  background-color: #001f9c;
  color: white;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.restart-btn:hover {
  background-color: #0040ff;
}






/* Essay Question Style---- */

.question-block {
  margin-bottom: 0.5vw;
  text-align: left;
}

.question-block p {
  font-size: 100%;
  margin-bottom: 0px;
}

.question-block textarea {
  width: 50%;
  height: 2vw;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.6vw;
  margin-bottom: 0.5vw;
  resize: vertical;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  float: left;
  margin-left: 1vw;
  font-size: 70%;
  font-family: "Inter", sans-serif;
}

.submit-btn {
  background: linear-gradient(to right, #2196F3, #0D8BF2);
  color: #fff;
  border: none;
  padding: 0.6vw 0.9vw;
  border-radius: 8px;
  font-size: 60%;
  cursor: pointer;
  float: left;
  margin-left: 0.5vw;
  margin-bottom: 0.5vw;
}

.answer-box {
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  padding: 0.5vw 1vw;
  clear: both;
  margin-left: 0.7vw;
}

.answer-toggle {
  font-weight: bold;
  color: #0D73EC;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2vw;
  font-size: 60%;
}

.answer-text {
  font-size: 70%;
  color: #444;
  display: block;
}

.arrow {
  font-size: 0.7vw;
}

.answer-box.locked .answer-toggle {
  pointer-events: none;
  opacity: 0.5;
}

.question-block ol {
  padding-left: 1vw;
  margin-bottom: 2%;
}

.question-block ol li {
  font-size: 80%;
}




/* TOC STYLE  */
.toc-header {
  margin-top: 20%;
}

.toc-item {
  display: flex;
  padding: 1% 0;
  cursor: pointer;
  color: #333;
  text-decoration: none;
  font-size: 80%;
  text-align: left;
  margin-left: 5%;
  align-items: center;
}

.page-badge {
  background-color: #FFE470;
  color: #333;
  font-weight: bold;
  font-size: 80%;
  padding: 1%;
  border-radius: 4px;
  min-width: 2vw;
  text-align: center;
  margin-left: 5%;
}













/* QUIZ STYLE - Matching */
h1.heading-1 {
  font-size: 80%;
}

h3.heading-3 {
  margin-bottom: 1%;
  font-size: 80%;
}

.container {
  display: flex;
  justify-content: center;
  position: relative;
  gap: 10%;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 0.7vw;
  z-index: 1;
}

.column p {
  font-size: 80%;
  margin-top: 5%;
  margin-bottom: 0%;
  font-weight: 600;
}

.item {
  padding: 2% 4%;
  border: 2px solid #2C93D6;
  border-radius: 0.5vw;
  font-size: 0.8vw;
  cursor: pointer;
  transition: 0.3s;
  position: relative;
  text-align: left;
}

.item.selected {
  outline: 0.6vw solid #007bff;
  background-color: rgb(255, 255, 194);
}

.correct {
  background-color: #32d36e !important;
  border-color: #32d36e !important;
  color: white;
  pointer-events: none;
}

.incorrect {
  background-color: #f85c5c !important;
  border-color: #f85c5c !important;
  color: white;
}

#canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.score-box {
  font-size: 80%;
  margin-top: 3%;
  font-weight: bold;
  text-align: right;
}


.guide-question-match {
  width: 80%;
  text-align: center;
  margin: 5% auto;
}

p.guide-question-match {
  font-size: 60%;
}








/* TRUE FALSE QUIZ STYLE  */
.question-TF,
.question-TF-2 {
  margin-bottom: 0.5vw;
  text-align: center;
}

.question-TF h3,
.question-TF-2 h3 {
  font-size: 4vw;
  margin-bottom: 1vw;
}

.question-TF ol,
.question-TF-2 ol {
  margin-top: 0.2vw;
  margin-bottom: 0.2vw;
  padding-left: 7%;
}

.options {
  display: flex;
  gap: 1vw;
  margin: 0;
  justify-content: center;
}


ul.list-TF {
  margin: 0;
  text-align: left;
  padding-left: 12%;
}

.list-TF li {
  font-size: 0.8vw;
}

#pageQuiz-TF-1-1 p,
#pageQuiz-TF-2-1 p {
  text-align: left;
  font-size: 0.8vw;
  margin-bottom: 0px;
}

.quiz-instruction {
  margin-top: 18%;
}

#pageQuiz-TF-1-1 {
  background-image: url("source/page/Page\ -\ \(51\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#pageQuiz-TF-1-2 {
  background-image: url("source/page/Page\ -\ \(52\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#pageQuiz-TF-1-3 {
  background-image: url("source/page/Page\ -\ \(53\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}


#pageQuiz-TF-2-1 {
  background-image: url("source/page/Page\ -\ \(63\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#pageQuiz-TF-2-2 {
  background-image: url("source/page/Page\ -\ \(64\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#pageQuiz-TF-2-3 {
  background-image: url("source/page/Page\ -\ \(65\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}


#pageQuizMatch {
  background-image: url("source/page/Page\ -\ \(9\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

ol li {
  text-align: left;
  font-size: 0.8vw;
}

.btn,
.btn-2 {
  padding: 0.4vw 0.8vw;
  border: none;
  font-size: 0.8vw;
  border-radius: 0.2vw;
  background: #f0f0f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: 0.3s;
}

.btn.correct,
.btn-2.correct {
  background-color: #32d36e;
  color: white;
}

.btn.wrong,
.btn-2.wrong {
  background-color: #f85c5c;
  color: white;
}

.answer-box-TF,
.answer-box-TF-2 {
  /* margin-top: 0.2vw; */
  padding: 0.2vw 0.4vw;
  background: #eaffec85;
  border-radius: 0.2vw;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  font-size: 0.8vw;
  display: none;
  color: #00b300;
}

.score {
  font-size: 1vw;
  font-weight: bold;
  margin-top: 1vw;
  text-align: center;
}

.reset-btn,
.reset-btn-2 {
  display: block;
  margin: 0.2vw auto 0;
  padding: 0.4vw 0.8vw;
  font-size: 1vw;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 1vw;
  cursor: pointer;
}






/* Observation Question Style */



#page10,
#page18,
#page52 {
  position: relative;
}

.observation-container {
  position: absolute;
  top: 55%;
  left: 2%;
  width: 20%;
  height: 10%;
}

.observation-container-2 {
  position: absolute;
  top: 19%;
  left: 21%;
  width: 80%;
  height: 10%;
}

.observation-container-3 {
  position: absolute;
  top: 46%;
  left: 21%;
  width: 80%;
  height: 10%;
}

.observation-container-4 {
  position: absolute;
  top: 16%;
  left: 20%;
  width: 80%;
  height: 10%;
}



.observation-container-5 {
  position: absolute;
  top: 74%;
  left: 10%;
  width: 80%;
  height: 10%;
}

.observation-container-6 {
  position: absolute;
  top: 60%;
  left: 10%;
  width: 80%;
  height: 10%;
}

.observation-box {
  /* background-color: #e8f3ff; */
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  /* max-width: 45vw; */
}

.observation-box-left {
  width: 28%;
  height: 100%;
  background-color: #2196f3;
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.observation-box-left p {
  font-size: 60%;
  font-weight: bold;
  line-height: 1.4em;
  text-align: right;
}

/* .observation-box-textarea {
        position: absolute;
        left: 30%;
        top: 50%;
        transform: translateY(-50%);
        width: 70%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    } */

.input-area {
  position: absolute;
  left: 30%;
  top: 50%;
  transform: translateY(-50%);
  width: 65%;
  padding: 5% 0%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}



.input-area textarea {
  width: 70%;
  border-radius: 4px;
  border: none;
  padding: 0.5vw 1vw;
  font-size: 80%;
  resize: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
  font-family: "Inter", sans-serif;
}

.error-message {
  color: rgb(122, 0, 0);
  margin-top: 5px;
  font-size: 60%;
  display: none;
}

.submit-button {
  background-color: #f86f03;
  color: white;
  border: none;
  padding: 0.8vw 1vw;
  font-size: 80%;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-left: 3%;
}

.submit-button button:hover {
  background-color: #1976d2;
}

.answer-box-observation {
  text-align: center;
  margin-top: 5px;
  font-size: 60%;
  display: none;
}








/* When in fullscreen */
:fullscreen .page {
  width: 35vw;
  /* Fullscreen width */
}

/* Webkit browsers (Safari, older Chrome) */
:-webkit-full-screen .page {
  width: 35vw;
  /* Fullscreen width */
}

/* Mozilla Firefox */
:-moz-full-screen .page {
  width: 35vw;
  /* Fullscreen width */
}









/* version 2 */
:root {
  /* Define A4 aspect ratio using CSS variables for easy calculation */
  --a4-ratio: calc(1123 / 794);
  --app-vh: 1vh;
  --app-vw: 1vw;
  /* Height / Width */
  /* These are conceptual for the #myBook element. PageFlip will handle scaling */
}

@supports (height: 100dvh) {
  :root {
    --app-vh: 1dvh;
  }
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  /* Changed to column to accommodate overall layout */
  justify-content: center;
  align-items: center;
  /* min-height: 100vh; */
  background-color: #f0f0f0;
  overflow-x: hidden;
  /* Prevent horizontal scroll from overflowing content */
  box-sizing: border-box;
  overflow-y: hidden;
}

.main-content-wrapper {
  display: flex;
  width: 100%;
  max-width: 1600px;
  /* Limit overall content width for large screens */
  height: 90vh;
  /* Make sure it takes full height if possible */
  align-items: flex-start;
  justify-content: center;
  flex-grow: 1;
  /* Allow it to take up available space */
  box-sizing: border-box;
}


.page-nav-button {
  background-color: #555;
  color: white;
  border: none;
  padding: 10px 15px;
  text-align: left;
  cursor: pointer;
  border-radius: 5px;
  font-size: 0.9em;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.page-nav-button:hover {
  background-color: #007bff;
  transform: translateY(-1px);
}

.page-nav-button.active {
  background-color: #007bff;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

.flip-book-container {
  perspective: 2000px;
  flex-grow: 1;
  /* Allow the book container to take available space */
  display: flex;
  /* Use flex to center the book within its container */
  justify-content: center;
  align-items: center;
  height: 100%;
  /* Take full height of main-content-wrapper */
  overflow: auto;
  padding: 12px;
  box-sizing: border-box;
}

/* The #myBook dimensions are primarily controlled by PageFlip's
    minWidth/maxWidth/minHeight/maxHeight and its parent container's size.
    We set these as initial values, but they will be adjusted by JS and PageFlip. */
#myBook {
  /* Default for desktop: two pages */
  width: auto;
  /* Approx A4_WIDTH * 2 */
  height: auto;
  /* Approx A4_HEIGHT */
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  max-height: 100%;
  margin-left: 5%;
  transform: scale(var(--book-zoom, 1));
  transform-origin: left top;
  transition: transform 0.18s ease;
  position: relative;
  z-index: 1;
}

body.book-zoomed .flip-book-container {
  justify-content: flex-start;
  align-items: flex-start;
  cursor: grab;
  touch-action: none;
}

body.book-zoomed .flip-book-container.is-zoom-panning {
  cursor: grabbing;
}

body.book-zoomed .stf__parent {
  touch-action: none;
}

body.book-zoomed .sidebar {
  position: relative;
  z-index: 20;
}

.page {
  background-color: white;
  border: 1px solid #ccc;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.page--cover {
  background-color: #e0e0e0;
  border: 1px solid #999;
}

.page-content {
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  text-align: center;
}

/* --- Responsive Adjustments for Overall Layout & Sidebar --- */


#pageTOC {
  position: relative;
  background-image: url("source/page/Opening\ -\ \(6\).webp");

  background-size: cover;
  background-repeat: no-repeat;

}





/* Observation Question Style */



#page10,
#page18,
#page52 {
  position: relative;
}

.observation-container-1-1 {
  position: absolute;
  top: 50%;
  left: 2%;
  width: 40%;
  height: 10%;
}

.observation-container-1-2 {
  position: absolute;
  top: 24%;
  left: 22%;
  width: 80%;
  height: 10%;
}

.observation-container-1-3 {
  position: absolute;
  top: 55.5%;
  left: 21%;
  width: 80%;
  height: 10%;
}

.observation-container-1-4 {
  position: absolute;
  top: 27.5%;
  left: 21%;
  width: 80%;
  height: 10%;
}

.observation-container-1-5 {
  position: absolute;
  top: 21%;
  left: 19%;
  width: 80%;
  height: 10%;
}

.observation-container-1-6 {
  position: absolute;
  top: 66%;
  left: 20%;
  width: 80%;
  height: 10%;
}

.observation-container-1-7 {
  position: absolute;
  top: 52%;
  left: 20%;
  width: 80%;
  height: 10%;
}

.observation-container-1-8 {
  position: absolute;
  top: 52%;
  left: 19.5%;
  width: 80%;
  height: 10%;
}

.observation-container-1-9 {
  position: absolute;
  top: 50%;
  left: 18.6%;
  width: 80%;
  height: 10%;
}

.observation-container-1-10 {
  position: absolute;
  top: 57.5%;
  left: 20%;
  width: 80%;
  height: 10%;
}

.observation-container-2-1 {
  position: absolute;
  top: 16.5%;
  left: 19%;
  width: 80%;
  height: 10%;
}

.observation-container-2-2 {
  position: absolute;
  top: 62%;
  left: 2%;
  width: 80%;
  height: 10%;
}


.observation-container-3-1 {
  position: absolute;
  top: 70%;
  left: 3%;
  width: 80%;
  height: 10%;
}


.observation-container-3-2 {
  position: absolute;
  top: 67.5%;
  left: 4%;
  width: 80%;
  height: 10%;
}


.observation-container-3-3 {
  position: absolute;
  top: 61%;
  left: 4%;
  width: 80%;
  height: 10%;
}

.observation-container-3-4 {
  position: absolute;
  top: 45.5%;
  left: 20%;
  width: 80%;
  height: 10%;
}

.observation-container-4-1 {
  position: absolute;
  top: 70%;
  left: 4%;
  width: 80%;
  height: 10%;
}

.observation-container-4-2 {
  position: absolute;
  top: 78%;
  left: 3.5%;
  width: 80%;
  height: 10%;
}

.observation-container-4-3 {
  position: absolute;
  top: 25%;
  left: 4.5%;
  width: 80%;
  height: 10%;
}

.observation-container-4-4 {
  position: absolute;
  top: 37.5%;
  left: 19.5%;
  width: 80%;
  height: 10%;
}

.observation-container-4-5 {
  position: absolute;
  top: 66%;
  left: 19.5%;
  width: 80%;
  height: 10%;
}

.observation-container-4-6 {
  position: absolute;
  top: 70%;
  left: 19.5%;
  width: 80%;
  height: 10%;
}

.observation-container-4-7 {
  position: absolute;
  top: 49.5%;
  left: 19.5%;
  width: 80%;
  height: 10%;
}














.observation-container-geogebra {
  position: absolute;
  top: 51%;
  left: -15%;
  width: 90%;
  height: 12%;
}

.observation-container-geogebra .submit-button {
  padding: 0.8vw 3vw;
}

.observation-box {
  /* background-color: #e8f3ff; */
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  /* max-width: 45vw; */
}

.observation-box-left {
  width: 28%;
  height: 100%;
  background-color: #2196f3;
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.observation-box-left p {
  font-size: 60%;
  font-weight: bold;
  line-height: 1.4em;
  text-align: right;
}

/* .observation-box-textarea {
        position: absolute;
        left: 30%;
        top: 50%;
        transform: translateY(-50%);
        width: 70%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    } */

.input-area {
  position: absolute;
  left: 30%;
  top: 50%;
  transform: translateY(-50%);
  width: 65%;
  padding: 5% 0%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}



.input-area textarea {
  width: 70%;
  border-radius: 4px;
  border: none;
  padding: 0.5vw 1vw;
  font-size: 80%;
  resize: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
  font-family: "Inter", sans-serif;
}

.error-message {
  color: rgb(122, 0, 0);
  margin-top: 5px;
  font-size: 60%;
  display: none;
}

.submit-button {
  background-color: #f86f03;
  color: white;
  border: none;
  padding: 0.8vw 1vw;
  font-size: 80%;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-left: 3%;
}

.submit-button button:hover {
  background-color: #1976d2;
}

.answer-box-observation {
  text-align: center;
  margin-top: 5px;
  font-size: 60%;
  display: none;
}




/* Video Style  */


.video-overlay {
  position: absolute;
  top: 21%;
  left: 10%;
  width: 80%;
  aspect-ratio: 16/9;
}

.video-overlay iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.page-video-button-panel {
  position: absolute;
  top: 18%;
  left: 8%;
  width: 30%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
  z-index: 4;
}

.page-video-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.page-video-image-button:hover,
.page-video-image-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  outline: none;
}

.page-video-image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}



/* .quizpage Match */


.quizpage-inner {
  position: absolute;
  top: 7%;
  left: 10%;
  width: 80%;
}

.quizpage-inner h1 {
  font-size: 100%;
}

.quizpage-inner h3 {
  font-size: 80%;
}

.quizpage-inner p {
  font-size: 100%;
}

.quizpage-inner .option p {
  font-size: 100%;
}

.quizpage-inner .question p:first-child {
  font-size: 70%;
}



/* .quizpage-inner-left{
      margin-top: 2vw;
    } */
.quizpage-inner-match {
  margin-top: 10%;
}

ul.list-instruction-penilaian-akhir {
  margin: 0;
  padding-left: 10%;
  font-size: 80%;
}

.list-instruction-penilaian-akhir li {
  font-size: 80%;
  text-align: left;
  line-height: 12px;
}

.summary {
  position: absolute;
  top: -18%;
  left: -30%;
  text-align: center;
  display: flex;
  flex-direction: row;
  font-size: 100%;
  font-weight: 500;
  background-color: #FFE974;
  border-radius: 16px;
  padding: 0.5vw 1vw;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  z-index: 1;

}

.summary-first {
  top: -10% !important;
}

.summary-mobile {
  display: none;
}

.summary p,
.summary span {
  margin: 0;
  font-size: 1vw;
  color: #0D0D0D;
}

.summary-right span {
  padding-left: 0.7vw;
}

.summary-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 0.7vw;
}

.summary-left p {
  font-size: 0.9vw;
  line-height: 0.2vw;
  font-weight: 500;
}

.summary-left span {
  font-size: 2vw;
  font-weight: bold;
}

.summary-right {
  display: flex;
  flex-direction: column;
  margin-left: 2vw;
  justify-content: center;
}

.summary-right-inner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: left;
}

.restart-btn {
  display: block;
  margin: 1.5rem auto;
  padding: 0.8rem 2rem;
  background-color: #001f9c;
  color: white;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.restart-btn:hover {
  background-color: #0040ff;
}







/* QUIZ STYLE - Matching */
h1.heading-1 {
  font-size: 80%;
}

h3.heading-3 {
  margin-bottom: 1%;
  font-size: 80%;
}

.container {
  display: flex;
  justify-content: center;
  position: relative;
  gap: 10%;
}

.container-match {
  display: flex;
  justify-content: center;
  position: relative;
  gap: 10%;
  width: 100%;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 0.7vw;
  z-index: 1;
}

.column p {
  font-size: 80%;
  margin-top: 5%;
  margin-bottom: 0%;
  font-weight: 600;
}



#canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: auto;
  height: auto;
}








/* TRUE FALSE QUIZ STYLE  */
.question-TF,
.question-TF-2 {
  margin-bottom: 0.5vw;
  text-align: center;
}

.question-TF h3,
.question-TF-2 h3 {
  font-size: 4vw;
  margin-bottom: 1vw;
}

.question-TF ol,
.question-TF-2 ol {
  margin-top: 0.2vw;
  margin-bottom: 0.2vw;
  padding-left: 7%;
}

.options {
  display: flex;
  gap: 1vw;
  margin: 0;
  justify-content: center;
}


ul.list-TF {
  margin: 0;
  text-align: left;
  padding-left: 12%;
}

.list-TF li {
  font-size: 0.8vw;
}

#pageQuiz-TF-1-1 p,
#pageQuiz-TF-2-1 p {
  text-align: left;
  font-size: 0.8vw;
  margin-bottom: 0px;
}

.quiz-instruction {
  margin-top: 18%;
}

#pageQuiz-TF-1-1 {
  background-image: url("source/page/Page\ -\ \(51\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#pageQuiz-TF-1-2 {
  background-image: url("source/page/Page\ -\ \(52\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#pageQuiz-TF-1-3 {
  background-image: url("source/page/Page\ -\ \(53\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}


#pageQuiz-TF-2-1 {
  background-image: url("source/page/Page\ -\ \(63\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#pageQuiz-TF-2-2 {
  background-image: url("source/page/Page\ -\ \(64\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

#pageQuiz-TF-2-3 {
  background-image: url("source/page/Page\ -\ \(65\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}


#pageQuizMatch {
  background-image: url("source/page/Page\ -\ \(9\).webp");
  background-size: cover;
  background-repeat: no-repeat;
}

ol li {
  text-align: left;
  font-size: 0.8vw;
}

.btn,
.btn-2 {
  padding: 0.4vw 0.8vw;
  border: none;
  font-size: 0.8vw;
  border-radius: 0.2vw;
  background: #f0f0f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: 0.3s;
}

.btn.correct,
.btn-2.correct {
  background-color: #32d36e;
  color: white;
}

.btn.wrong,
.btn-2.wrong {
  background-color: #f85c5c;
  color: white;
}

.answer-box-TF,
.answer-box-TF-2 {
  /* margin-top: 0.2vw; */
  padding: 0.2vw 0.4vw;
  background: #eaffec85;
  border-radius: 0.2vw;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  font-size: 0.8vw;
  display: none;
  color: #00b300;
}

.score {
  font-size: 1vw;
  font-weight: bold;
  margin-top: 1vw;
  text-align: center;
}

.reset-btn,
.reset-btn-2 {
  display: block;
  margin: 0.2vw auto 0;
  padding: 0.4vw 0.8vw;
  font-size: 1vw;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 1vw;
  cursor: pointer;
}






/* Evaluasi dan Essay */


.question {
  margin-bottom: 1.5vw;
}

.question p {
  font-size: 0.9vw;
  font-weight: 600;
  margin-bottom: 0.8vw;
  text-align: left;
}

.option {
  display: flex;
  align-items: center;
  /* padding: 0.2vw 0.75vw; */
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 0.2vw;
  font-size: 0.8vw;
  background-color: #fff;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-left: 5%;
}

.option span {
  display: inline-block;
  width: 8%;
  background-color: #ccc;
  color: white;
  font-weight: bold;
  text-align: center;
  border-radius: 5px;
  padding: 0.3vw 0;
  /* margin: 0.2vw auto; */
}

.option p {
  width: 90%;
  font-size: 0.8vw;
  background-color: #fff;
  transition: all 0.2s ease;
  text-align: left;
  cursor: pointer;
  margin: 0;
  margin-left: 0.5vw;
  font-weight: normal;
}


.option.correct {
  background-color: #00b300;
  color: white;
  border-color: #00b300;
}

.option.correct p {
  color: white;
  background-color: #32d36e;
}

.option.correct span {
  background-color: #007a00;
}

.option.incorrect,
.option.incorrect p {
  background-color: #f85c5c;
  color: white;
  border-color: #f99;
}

.option.incorrect span {
  background-color: #B53016;
}

.option.disabled {
  pointer-events: none;
  opacity: 0.8;
}

#zoomReminder {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-family: sans-serif;
  font-size: 16px;
  z-index: 9999;
  display: none;
}

#zoomReminder button {
  margin-left: 12px;
  background: white;
  border: none;
  color: #856404;
  font-weight: bold;
  cursor: pointer;
}



.mobile-auth-wrapper {
  display: none;
}




.mobile-nav-toggle {
  display: none;
}




/* Big Screen view */
@media (min-width: 1900px) {
  .sidebar {
    width: 20vw;
  }

  .toc-list {
    width: 90%;
  }

  .page {
    width: 40vw;
    /* Adjusted for larger screens */
    max-width: 650px;
    /* Keeps it under 768px height */
  }

  .summary {
    left: 93%;
    top: -13% !important;
  }



  /* Essay Question Style---- */

  .question-block p {
    font-size: 120%;
  }

  .question-block textarea {
    height: 2vw;
    margin-bottom: 0.5vw;
    margin-left: 1vw;
    font-size: 80%;
    font-family: "Inter", sans-serif;
  }

  .submit-btn {
    padding: 0.6vw 0.9vw;
    border-radius: 8px;
    font-size: 80%;
    cursor: pointer;
    float: left;
    margin-left: 0.5vw;
    margin-bottom: 0.5vw;
  }

  .answer-box {
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    padding: 0.5vw 1vw;
    clear: both;
    margin-left: 0.7vw;
  }

  .answer-toggle {
    font-weight: bold;
    color: #0D73EC;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2vw;
    font-size: 80%;
  }

  .answer-text {
    font-size: 100%;
    color: #444;
    display: block;
  }

  .question-block ol li {
    font-size: 80%;
  }


  /* Observation  */
  .observation-box-left p {
    font-size: 80%;
  }

  p.guide-question-match {
    font-size: 80%;
  }

  ul.list-instruction-penilaian-akhir {
    font-size: 100%;
  }

  .list-instruction-penilaian-akhir li {
    font-size: 100%;
    line-height: 100%;
  }

  #QuizPage-1 .quiz-instruction {
    font-size: 100%;
  }




  /* Modal Box */
  .modal-box {
    width: 80%;
    height: 60%;
  }


  .modal-box h1 {
    margin-bottom: 10%;
    font-size: 108px;
    font-family: "Titan One", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: #303030;
  }

  .modal-box-text {
    position: absolute;
    top: 13%;
    left: 55%;
  }

  .modal-box button {
    padding: 24px 32px;
    font-size: 32px;
    border-radius: 6px;

  }

}







/* Tablet breakpoint (approx. 768px to 1024px)
    Sidebar collapses to row, book remains primary focus. */
@media (max-width: 1024px) {

  html,
  body {
    min-height: calc(var(--app-vh, 1vh) * 100);
  }

  .main-wrapper {
    flex-direction: column;
    min-height: calc(var(--app-vh, 1vh) * 100);
    height: auto;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    min-height: 60px;
  }

  .book-container {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .page {
    width: 100%;
    max-width: 600px;
    max-height: none;
    position: relative;
  }

  .sidebar {
    display: none;
  }

  .bottom-nav-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
    z-index: 100;
    position: sticky;
    left: 0;
  }

  /* Phase 3: Mobile Headings & Buttons */
  .mobile-icon-btn {
    background: none;
    border: none;
    color: #ff6f00;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hamburger-icon,
  .gear-icon {
    line-height: 1;
  }

  .mobile-auth-pill {
    /* Override desktop auth pill margin/padding for mobile header */
    margin-bottom: 0;
    padding: 6px 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  }

  .mobile-auth-pill .user-info-text {
    max-width: 120px;
    /* Constrain width on mobile */
  }

  .mobile-auth-pill .login-register-text {
    font-size: 0.8rem;
  }

  .mobile-auth-pill .user-email {
    font-size: 0.75rem;
  }

  .mobile-auth-pill .logout-text-btn {
    font-size: 0.7rem;
  }

  .bottom-nav-mobile {
    background-color: transparent;
    height: auto;
    margin-top: 10px;
    flex-direction: column;
    gap: 15px;
  }

  .mobile-bottom-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 38px;
    margin: 0;
    border-radius: 10px;
    background-color: #ff6f00 !important;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.18);
    transition: background-color 0.2s, transform 0.2s;
  }

  .mobile-bottom-toggle:hover {
    background-color: #002244 !important;
    transform: translateY(-1px);
  }

  .mobile-bottom-toggle:active {
    transform: translateY(1px);
  }

  body.mobile-bottom-nav-collapsed .bottom-nav-mobile {
    gap: 8px;
  }

  body.mobile-bottom-nav-collapsed .bottom-nav-mobile .controls-row,
  body.mobile-bottom-nav-collapsed .bottom-nav-mobile .navigate-pill {
    display: none;
  }

  /* Phase 3: Mobile Bottom Controls */
  .mobile-controls-row {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: transparent;
    padding: 0;
  }

  .mobile-zoom-controls {
    width: 100%;
    max-width: 400px;
    margin: -4px auto 0;
  }

  .mobile-page-indicator {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ff6f00;
    /* Use the dark blue for text */
    text-transform: uppercase;
  }

  .mobile-navigate-pill {
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  }


  .kata-pengantar {
    font-size: 0.6rem;
  }

  .kata-pengantar-footer-text {
    font-size: 0.6rem;
  }

  .page-padding {
    padding: 1rem 2rem;
  }



  .item {
    font-size: 100%;
  }





  body {
    padding: 10px;
    min-height: calc(var(--app-vh, 1vh) * 100);
    overflow-x: hidden;
    overflow-y: auto;
  }

  #myBook {
    /* Default for desktop: two pages */
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    max-height: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .main-content-wrapper {
    flex-direction: column;
    /* Stack sidebar and book */
    padding: 10px;
    height: auto;
    /* Allow height to adjust based on content */
    min-height: 90vh;
    /* Ensure it still takes full height if content is small */
    justify-content: flex-start;
  }

  .flip-book-container {
    flex-direction: column;
    width: 100%;
    min-height: 0;
    max-height: calc(var(--app-vh, 1vh) * 100);
    overflow: auto;
  }

  .sidebar {
    width: 100%;
    max-width: 700px;
    /* Limit sidebar width even when full width */
    margin-right: 0;
    margin-bottom: 20px;
    flex-direction: row;
    /* Buttons in a row */
    flex-wrap: wrap;
    /* Allow buttons to wrap */
    justify-content: center;
    align-self: center;
    /* Center the sidebar horizontally */
    height: auto;
    /* Allow sidebar height to be determined by content */
    padding: 10px;
  }

  .sidebar h3 {
    width: 100%;
    /* Make heading take full width */
    margin-bottom: 10px;
    font-size: 1em;
  }

  .page-nav-button {
    flex: 1 1 auto;
    /* Allow buttons to grow/shrink */
    max-width: 120px;
    /* Limit button width on small screens */
    font-size: 0.85em;
    padding: 8px 12px;
  }

  .observation-box-left p {
    font-size: 90%;
  }

  .submit-button {
    padding: 3% 6%;
    font-size: 100%;
    margin-left: 2%;
  }




  /* True False Quiz Style Mobile
      .btn {
        font-size: 1.2vw;
        padding: 1vw 3vw;
      }

      .question h3 {
        font-size: 1.8vw;
      }

      .answer-box {
        font-size: 1.1vw;
      }

      .score {
        font-size: 1.5vw;
      }

      .reset-btn {
        font-size: 1.2vw;
        padding: 1vw 3vw;
      } */


  /* TRUE FALSE QUIZ STYLE  */
  .question-TF,
  .question-TF-2 {
    margin-bottom: 0.2vw;
  }

  .question-TF h3,
  .question-TF-2 h3 {
    font-size: 4vw;
    margin-bottom: 0.5vw;
  }

  .question-TF ol,
  .question-TF-2 ol {
    margin-top: 2vw;
    margin-bottom: 0.2vw;
    padding: 0 0 0 4vw;
  }

  .options {
    gap: 4vw;
  }

  ul.list-TF {
    margin: 0;
  }

  .list-TF li {
    font-size: 100%;
    width: 100%;
  }

  #pageQuiz-TF-1-1 p,
  #pageQuiz-TF-2-1 p {
    font-size: 100%;
    margin-top: 0px;
    margin-bottom: 0px;
  }

  #pageQuiz-TF-1-1 p.quiz-instruction,
  #pageQuiz-TF-2-1 p.quiz-instruction {
    margin-top: 14%;
  }

  .quiz-instruction {
    margin-top: 14%;
  }

  .quiz-instruction.pilihan-ganda {
    margin-top: 16%;
  }

  .quizpage-inner .question p:first-child {
    font-size: 100%;
  }

  ol li {
    font-size: 100%;
  }

  ul.list-instruction-penilaian-akhir {
    font-size: 100%;
  }

  .list-instruction-penilaian-akhir li {
    font-size: 100%;
    line-height: 100%;
  }

  #QuizPage-1 .quiz-instruction {
    font-size: 100%;
  }

  .btn,
  .btn-2 {
    padding: 1vw 4vw;
    font-size: 100%;
    border-radius: 0.2vw;
  }

  .answer-box-TF,
  .answer-box-TF-2 {
    /* margin-top: 0.2vw; */
    padding: 0.2vw 0.4vw;
    border-radius: 0.2vw;
    font-size: 80%;
  }

  .score {
    font-size: 80%;
    margin-top: 6vw;
  }

  .reset-btn,
  .reset-btn-2 {
    margin: 1vw auto 0;
    padding: 2vw 4vw;
    font-size: 100%;
  }

  #gameContainer-1 h1 {
    margin-bottom: 0vw;
  }








  /* QUIZ STYLE - Matching Mobile */
  /* h3.heading-3{
      margin-bottom: 1vw;
      font-size: 3vw;
    }
    .container {
      gap: 10vw;
    }
    h1.heading-1{
      margin-bottom: 0vw;
    }
    .column {
      gap: 3vw;
    }
    .column p{
      font-size: 2.5vw;
      margin-top: 3vw;
      margin-bottom: 0vw;
      font-weight: 600;
    }
    .item {
      padding: 1.2vw 3vw;
      border: 0.5vw solid #2C93D6;
      border-radius: 2vw;
      font-size: 2.8vw;
    }

    .score-box {
      font-size: 3vw;
      margin-top: 5vw;
    }

    .guide-question-match{
      width: 80%;
      text-align: center;
      margin: 0 auto;
      font-size: 2.5vw;
    } */


  .option {
    margin-bottom: 0.5vw;
    font-size: 100%;
  }

  .option span {
    width: 6%;
    font-size: 80%;
    background-color: #ccc;
    color: white;
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
    padding: 0.5vw 0;
    /* margin: 0.2vw auto; */
  }

  .option p {
    width: 90%;
    font-size: 0.8vw;
    background-color: #fff;
    transition: all 0.2s ease;
    text-align: left;
    cursor: pointer;
    margin: 0;
    margin-left: 1vw;
    font-weight: normal;
  }

  .item {
    font-size: 100%
  }

  .container {
    gap: 7vw;
  }

  .column {
    gap: 1.5vw;
  }

  .score-box {
    font-size: 100%;
    margin-top: 5vw;
  }



  .summary {
    top: -25%;
    left: 30%;
    width: 35%;
    font-size: 10%;
    border-radius: 2vw;
    padding: 1vw 2vw;
  }

  .summary-first {
    top: -17% !important;
  }

  .summary-second {
    top: -20% !important;
  }

  .summary p,
  .summary span {
    margin: 0;
    font-size: 2.5vw;
    color: #0D0D0D;
  }

  .summary-right span {
    padding-left: 2vw;
  }

  .summary-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 0.7vw;
  }

  .summary-left p {
    font-size: 2.5vw;
    line-height: 2vw;
    font-weight: 500;
  }

  .summary-left span {
    font-size: 4vw;
  }

  .summary-right {
    margin-left: 2vw;
  }

  .summary-mobile {
    display: flex;
  }




  /* Essay Question Style---- */

  .question-block {
    margin-bottom: 1.5vw;
  }

  .question-block p {
    font-size: 100%;
    margin-bottom: 0.3vw;
  }

  .question-block textarea {
    width: 60%;
    min-height: 4vw;
    padding: 1.5vw 2vw;
    font-size: 100%;
    margin-bottom: 2vw;
    margin-left: 1vw;

  }

  .submit-btn {
    padding: 1.5vw 2vw;
    border-radius: 8px;
    font-size: 80%;
    margin-left: 0.5vw;
    margin-bottom: 0.5vw;
  }

  .answer-box {
    padding: 1vw 2vw;
    margin-left: 0.7vw;
  }

  .answer-toggle {
    margin-bottom: 0.2vw;
    font-size: 80%;
  }

  .answer-text {
    font-size: 80%;
  }

  .arrow {
    font-size: 2vw;
  }

  .question-block ol {
    padding-left: 1vw;
    margin: 0px;
    margin-bottom: 1vw;
  }

  .question-block ol li {
    font-size: 100%;
  }









  /* Modal Box */
  .modal-box {
    width: 80%;
    height: 30%;
  }

  .modal-box h1 {
    margin-bottom: 10%;
    font-size: 54px;
    font-family: "Titan One", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: #303030;
  }

  .modal-box-text {
    position: absolute;
    top: 17%;
    left: 57%;
  }

  .modal-box button {
    padding: 16px 24px;
    font-size: 18px;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
  }

  /* Fullscreen view */

  /* When in fullscreen */
  :fullscreen .page {
    width: 100%;
    /* Fullscreen width */
  }

  /* Webkit browsers (Safari, older Chrome) */
  :-webkit-full-screen .page {
    width: 100%;
    /* Fullscreen width */
  }

  /* Mozilla Firefox */
  :-moz-full-screen .page {
    width: 100%;
    /* Fullscreen width */
  }







  /* --- PERBAIKAN CONTAINER OPSI --- */
  .mcq-option {
    display: flex;
    align-items: center;
    /* KUNCI: Memaksa semua elemen (bubble, teks, dan rumus) sejajar persis di tengah secara vertikal */
    flex-wrap: wrap;
    /* Mengizinkan teks turun ke baris bawah jika layar HP terlalu kecil */
    gap: 4px;
    /* Memberikan jarak antar elemen jika diperlukan (opsional) */
    cursor: pointer;

    /* Pertahankan properti lain yang mungkin sudah Anda miliki seperti padding, margin, dll */
    /* margin-bottom: 10px; */
    line-height: 1.5;
  }

  /* Pastikan radio button asli tersembunyi dengan benar jika Anda menggunakan mcq-bubble */
  .mcq-option input[type="radio"] {
    display: none;
    /* Atau gunakan teknik visually-hidden jika diperlukan untuk aksesibilitas */
  }






  .mobile-auth-wrapper {
    display: initial;
  }

  .mobile-nav-toggle {
    display: initial;
  }









}

/* Mobile breakpoint (approx. < 768px) */
@media (max-width: 767px) {

  /* Quiz page styles Mobile */
  .option {
    font-size: 100%;
  }

  .quizpage-inner {
    position: absolute;
    top: 8%;
    left: 10%;
    width: 80%;
  }

  .quizpage-inner h1 {
    font-size: 100%;
  }

  .quizpage-inner h3 {
    font-size: 70%;
  }

  .quizpage-inner p {
    font-size: 60%;
  }

  .quizpage-inner p.column-title {
    font-size: 70%;
    height: 10%;
    display: flex;
    align-items: center;
    /* vertical center */
    justify-content: center;
    /* horizontal center */
    text-align: center;
    /* ensures multiline text is also centered */
  }

  .quizpage-inner .option p {
    font-size: 60%;
  }

  .guide-question-match {
    margin: 2% auto;
  }




  .toc-header {
    margin-top: 15%;
  }

  .toc-item {
    padding: 1% 0;
    font-size: 70%;
    margin-left: 5%;
  }

  .page-badge {
    font-size: 80%;
    padding: 1%;
    margin-left: 5%;
  }










  .observation-box-left {
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
  }

  .observation-box-left p {
    font-size: 60%;
  }

  .input-area {
    height: 70%;
  }

  .input-area textarea {
    font-size: 60%;
    height: 80%;
  }

  .error-message {
    margin-top: 5px;
    font-size: 80%;
  }

  .submit-button {
    padding: 3%;
    font-size: 80%;
    margin-left: 2%;
  }

  .answer-box-observation {
    font-size: 80%;
  }




  .score-box {
    font-size: 80%;
  }














  /* TRUE FALSE QUIZ STYLE  */

  .list-TF li {
    font-size: 60%;
  }

  #pageQuiz-TF-1-1 p,
  #pageQuiz-TF-2-1 p {
    font-size: 60%;
  }

  #pageQuiz-TF-1-1 p.quiz-instruction,
  #pageQuiz-TF-2-1 p.quiz-instruction {
    margin-top: 14%;
  }

  ol li {
    font-size: 60%;
  }

  ul.list-instruction-penilaian-akhir {
    font-size: 80%;
  }

  .list-instruction-penilaian-akhir li {
    font-size: 80%;
    line-height: 100%;
  }

  .quizpage-inner .question p:first-child {
    font-size: 70%;
    line-height: 110%;
  }

  #QuizPage-1 .quiz-instruction {
    font-size: 60%;
  }

  .quiz-instruction {
    margin-top: 16%;
  }

  .btn,
  .btn-2 {
    padding: 1vw 4vw;
    font-size: 60%;
    border-radius: 0.2vw;
  }

  .answer-box-TF,
  .answer-box-TF-2 {
    margin-top: 1%;
    padding: 0.2vw 0.4vw;
    border-radius: 0.2vw;
    font-size: 60%;
  }

  .score {
    font-size: 60%;
    margin-top: 6vw;
  }

  .reset-btn,
  .reset-btn-2 {
    font-size: 80%;
  }

  .question-TF,
  .question-TF-2 {
    margin-bottom: 3%;
  }



  .summary {
    top: -20%;
    font-size: 20%;
  }

  .summary p,
  .summary span {
    font-size: 3vw;
  }

  .summary-first {
    top: -17% !important;
  }


  .item {
    padding: 1% 4%;
    border: 1px solid #2C93D6;
    border-radius: 1.5vw;
    font-size: 75%;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    text-align: left;
  }














  /* Essay Question Style---- */

  .question-block p {
    font-size: 100%;
  }

  .question-block textarea {
    width: 60%;
    min-height: 4vw;
    padding: 1.5vw 2vw;
    font-size: 70%;
    margin-bottom: 2vw;
    margin-left: 1vw;
  }

  .submit-btn {
    padding: 3%;
    border-radius: 8px;
    font-size: 70%;
    margin-left: 0.5vw;
    margin-bottom: 0.5vw;
  }

  .answer-box {
    padding: 1vw 2vw;
    margin-left: 0.7vw;
  }

  .answer-toggle {
    margin-bottom: 0.2vw;
    font-size: 60%;
  }

  .answer-text {
    font-size: 60%;
  }

  .arrow {
    font-size: 2vw;
  }

  .question-block ol {
    padding-left: 1vw;
    margin: 0px;
    margin-bottom: 1vw;
  }

  .question-block ol li {
    font-size: 70%;
  }


  /* Modal Box */
  .modal-box {
    width: 80%;
    height: 20%;
  }


  .modal-box h1 {
    margin-bottom: 10%;
    font-size: 32px;
    font-family: "Titan One", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: #303030;
  }

  .modal-box-text {
    position: absolute;
    top: 19%;
    left: 55%;
  }

  .modal-box button {
    padding: 12px 16px;
    font-size: 12px;
    border-radius: 6px;

  }

  .page-nav-button {
    font-size: 0.75em;
    padding: 6px 10px;
    margin: 4px;
    /* Smaller margin for tighter fit */
  }

  #myBook {
    /* Default for desktop: two pages */
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    /* Approx A4_WIDTH * 2 */
    height: auto;
    /* Approx A4_HEIGHT */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    max-height: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;

  }


}

/* --- Phase 4 Multiple Choice Quiz Styles --- */
.quiz-page-container,
.score-page-container {
  padding: 30px;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background-color: #f8fbff;
  color: #333;
  border-radius: inherit;
}

.quiz-title {
  color: #ff6f00;
  font-size: 1.8rem;
  margin-bottom: 5px;
  text-align: center;
  font-family: "Poppins", sans-serif;
  font-weight: bold;
}

.quiz-subtitle {
  text-align: center;
  color: #555;
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.quiz-question-block {
  margin-bottom: 20px;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.question-text {
  font-weight: bold;
  color: #ff6f00;
  margin-bottom: 12px;
  font-size: 1rem;
}

.quiz-option {
  display: block;
  margin-bottom: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
  font-size: 0.95rem;
}

.quiz-option:hover {
  background-color: #e6f0fa;
}

.quiz-option input {
  margin-right: 10px;
  cursor: pointer;
}

.quiz-submit-button {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #ff6f00;
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 15px;
  transition: background 0.3s;
}

.quiz-submit-button:hover {
  background-color: #1a3c61;
}

.quiz-submit-button:disabled {
  background-color: #8fa5bc;
  cursor: not-allowed;
}

.quiz-error-msg {
  color: #d32f2f;
  text-align: center;
  margin-top: 15px;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Score UI */
.score-display-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #ff6f00;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(32, 73, 117, 0.3);
}

.score-detail-text {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: bold;
}

.score-success-msg {
  color: #2e7d32;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
}

.quiz-not-completed-box {
  text-align: center;
  margin-top: 50px;
  color: #666;
  font-style: italic;
  padding: 20px;
}

/* --- Locked Pages Overlay --- */
.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 1);
  /* Very dark blue/black */
  z-index: 50;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: inherit;
}

.locked-message-box {
  text-align: center;
  padding: 30px;
  background: rgba(32, 73, 117, 0.95);
  border-radius: 15px;
  width: 70%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  border: 1px solid #4a6fa5;
}

.lock-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.locked-message-box h3 {
  margin-bottom: 10px;
  margin-top: 0;
  font-size: 1.5rem;
  color: white;
  font-family: "Poppins", sans-serif;
}

.locked-message-box p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #e0e6ed;
  margin: 0;
}

/* MCQ Quiz Redesign Phase 4 */
.quiz-page-card {
  border: 4px solid #1a3c61;
  border-radius: 20px;
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-sizing: border-box;
  background-color: #ffffff;
}

.quiz-page-card ul li {
  text-align: left;
  font-size: 10px;
}

.quiz-page-card.bg-light-blue {
  background-color: #f0f7fd;
}

.quiz-page-card.bg-white {
  background-color: #ffffff;
}

.quiz-header-badge {
  display: inline-flex;
  align-items: center;
  background-color: #e2d1eb;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: bold;
  color: #333;
  margin: 8px 10px 3px 10px;
  width: max-content;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-header-badge img {
  width: 18px;
  height: 18px;
  margin-right: 6px;
}

.quiz-section-title {
  text-align: left;
  margin: 3px 10px;
  font-size: 0.85rem;
  color: #000;
  font-weight: 800;
}

.quiz-main-title {
  text-align: left;
  margin: 0 10px 8px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1a3c61;
  text-transform: uppercase;
}

.quiz-form-container {
  background-color: #ffffff;
  border-radius: 20px;
  flex-grow: 1;
  padding: 8px 10px;
  margin: 0 6px 6px 6px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
}

.quiz-page-card.no-header .quiz-form-container {
  margin: 6px;
  padding: 10px;
}

.mcq-item {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.mcq-question {
  font-size: 0.6rem;
  font-weight: 600;
  margin-bottom: 5px;
  line-height: 1.35;
  color: #111;
}

.mcq-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mcq-option {
  display: inline-flex;
  align-items: center;
  border: 2px solid #1a3c61;
  border-radius: 25px;
  padding: 3px 9px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.6rem;
  color: #1a3c61;
  background-color: #fff;
  transition: all 0.2s;
  user-select: none;
}

.mcq-option input[type="radio"] {
  display: none;
}

.mcq-bubble {
  width: 14px;
  height: 14px;
  border: 2px solid #1a3c61;
  border-radius: 50%;
  margin-right: 5px;
  flex-shrink: 0;
  display: inline-block;
  position: relative;
  background-color: #fff;
}

.mcq-option input[type="radio"]:checked+.mcq-bubble::after {
  content: '';
  width: 8px;
  height: 8px;
  background-color: #1a3c61;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mcq-option input[type="radio"]:checked {
  background-color: #e6f2fb;
}

.quiz-submit-button {
  background-color: #ff6f00;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 0;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  width: 60%;
  margin: 15px auto;
  display: inline-block;
  letter-spacing: 1px;
}

.quiz-submit-button:hover {
  background-color: #002244;
}

.quiz-submit-button:disabled {
  background-color: #999;
  cursor: not-allowed;
}

.quiz-score-box {
  background-color: #ffe066;
  border-radius: 20px;
  padding: 10px 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px auto;
  gap: 15px;
  width: max-content;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.qs-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qs-label {
  font-size: 0.9rem;
  font-weight: bold;
  color: #333;
}

.qs-score {
  font-size: 2.2rem;
  font-weight: 800;
  color: #111;
  line-height: 1;
}

.qs-right {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-size: 1rem;
  font-weight: bold;
  color: #111;
}

/* ── Video Overlay – Page 12 ─────────────────── */
.video-container-12 {
  position: absolute;
  top: 35%;
  left: 10%;
  width: 80%;
  height: auto;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  z-index: 10;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.video-container-12 .video-embed-body {
  padding-top: 55.78%; /* 9:16 aspect ratio */
}

/* ── Video Overlay – Page 12 ─────────────────── */
.video-container-13 {
  position: absolute;
  top: 46%;
  left: 12.5%;
  width: 75%;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  z-index: 10;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* ── Video Overlay – Page 12 ─────────────────── */
.video-container-14 {
  position: absolute;
  top: 20%;
  left: 12.5%;
  width: 75%;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  z-index: 10;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* ── Video Overlay – Page 12 ─────────────────── */
.video-container-15 {
  position: absolute;
  top: 21%;
  left: 12.5%;
  width: 75%;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  z-index: 10;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.video-embed-header {
  background: #1a5f7a;
  color: #ffffff;
  padding: 8px 14px;
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-embed-body {
  position: relative;
  width: 100%;
  padding-top: 40%;
  /* scaled down from 56.25% to fit the button */
  background: #0f172a;
}

.video-embed-body iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Force Inter font for all elements inside the book */
#myBook,
#myBook * {
  font-family: 'Inter', sans-serif !important;
}

/* -- Partial Page Lock (Overlay Jawaban) -- */
.partial-lock-overlay {
  position: absolute;
  left: 0;
  width: 100%;
  background: rgb(221, 221, 221);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  user-select: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: opacity 0.5s ease-out;
  cursor: pointer;
}

.page {
  position: relative;
}

.partial-lock-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.partial-lock-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.62);
}

.partial-lock-dialog {
  position: relative;
  width: min(94vw, 520px);
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  color: #1f2937;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
}

.partial-lock-dialog h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.3;
}

.partial-lock-dialog p {
  margin: 0 0 16px;
  color: #4b5563;
  font-size: 0.95rem;
}

.partial-lock-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #4b5563;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.partial-lock-input {
  display: none;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 11px 12px;
  font-size: 1rem;
  outline: none;
}

.partial-lock-input:focus {
  border-color: #f7a422;
  box-shadow: 0 0 0 3px rgba(247, 164, 34, 0.22);
}

.partial-lock-input.text-mode {
  display: block;
}

.partial-lock-answer-fields {
  display: grid;
  gap: 12px;
  margin: 8px 0 14px;
}

.partial-lock-answer-fields.multiple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.partial-lock-answer-field {
  min-width: 0;
}

.partial-lock-answer-label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}

.partial-lock-answer-fields.multiple .partial-lock-math-field {
  min-height: 64px;
  padding: 10px;
  font-size: 1.05rem;
}

.partial-lock-error {
  margin-top: 10px;
  color: #b91c1c;
  font-size: 0.9rem;
}

.partial-lock-math-field {
  width: 100%;
  min-height: 74px;
  box-sizing: border-box;
  padding: 14px;
  margin: 0;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #fdfdfd;
  font-size: 1.35rem;
}

.partial-lock-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
  padding: 5px;
  border-radius: 8px;
  background: #f1f5f9;
}

.partial-lock-tab-btn {
  flex: 1;
  min-width: 0;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.partial-lock-tab-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}

.partial-lock-tab-content {
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.partial-lock-tab-content.active {
  display: grid;
}

.partial-lock-var-tab {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.partial-lock-letter-container {
  display: contents;
}

.partial-lock-calc-btn {
  min-width: 0;
  min-height: 42px;
  padding: 10px 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.partial-lock-calc-btn:hover {
  background: #f1f5f9;
}

.partial-lock-calc-btn-op {
  background: #eff6ff;
  color: #2563eb;
}

.partial-lock-calc-btn-func {
  background: #f8fafc;
  font-size: 0.82rem;
}

.partial-lock-calc-btn-accent {
  background: #6366f1;
  color: #ffffff;
}

.partial-lock-calc-btn-del {
  background: #fff1f2;
  color: #e11d48;
}

.partial-lock-calc-btn-wide {
  grid-column: span 2;
}

.partial-lock-calc-btn-wide-3 {
  grid-column: span 3;
}

.partial-lock-submit {
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 6px;
  background: #f7a422;
  color: #ffffff;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}

.partial-lock-submit:hover {
  background: #dc8f14;
}

@media (max-width: 640px) {
  .partial-lock-answer-fields.multiple {
    grid-template-columns: 1fr;
  }
}



.btn-lihat-jawaban {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 8px 24px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-lihat-jawaban:hover {
  background-color: #ffffff;
  color: #000000;
}












.img-quiz {
  height: 120px;
  display: block;
}

/* Perbaikan Container Utama: Pastikan sejajar dengan baris kalimat */
.math-sqrt,
.math-frac {
  display: inline-flex;
  vertical-align: middle;
  font-family: "Times New Roman", Times, serif;
  line-height: 1;
  /* Font size sedikit dikurangi agar tidak "memakan" line-height paragraf */
  font-size: 0.95em;
}

/* Container utama pecahan agar menyatu dengan teks */
.math-frac {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;
  /* Menjaga agar sejajar di tengah baris kalimat */
  align-items: center;
  text-align: center;
  line-height: 1.1;
  /* Sedikit ruang agar angka tidak berhimpit */
  margin: 0 4px;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.9em;
}

/* Garis pembagi */
.math-frac .top {
  border-bottom: 1px solid black;
  padding: 0 3px 1px 3px;
  /* Garis hanya sepanjang teks + padding tipis */
  width: 100%;
  /* Mengikuti lebar elemen terpanjang (pembilang/penyebut) */
  box-sizing: border-box;
}

/* Penyebut */
.math-frac .bottom {
  padding: 1px 3px 0 3px;
  width: 100%;
  box-sizing: border-box;
}

/* --- PERBAIKAN AKAR --- */
.math-sqrt .tick {
  font-size: 1.1em;
  margin-right: -1px;
  padding-top: 1px;
  /* Memastikan simbol √ menarik garis vinculum ke atas */
  display: flex;
  align-items: center;
}

.math-sqrt .vinculum {
  border-top: 1px solid black;
  /* Padding atas-bawah dikurangi agar akar terlihat lebih rapat */
  padding: 1px 3px 0 2px;
  margin-top: 2px;
}

/* Tambahan: Styling untuk variabel agar terlihat miring (italic) */
.math-frac i,
.math-sqrt i {
  font-style: italic;
  padding: 0 1px;
}

/* Mobile Auth Header at Top of Book */
.mobile-auth-header-top {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-auth-header-top {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0 15px;
    box-sizing: border-box;
    z-index: 1000;
    position: relative;
  }

  .mobile-auth-pill-top {
    display: flex;
    align-items: center;
    background-color: #ff6f00;
    color: white;
    border: none;
    border-radius: 40px;
    padding: 8px 15px;
    width: 100%;
    max-width: 300px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2), 0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-family: inherit;
    gap: 12px;
  }

  .mobile-auth-pill-top .avatar-circle {
    width: 35px;
    height: 35px;
    background-color: #f0f4f8;
    color: #ff6f00;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    flex-shrink: 0;
  }

  .mobile-auth-pill-top .login-text {
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.5px;
  }

  .mobile-auth-pill-top .user-email {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-auth-pill-top .logout-btn-top {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s;
  }
}

/* Mobile-specific Modals (Fixed Position) */
.mobile-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  /* Ensure it is on top of everything */
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  /* Dark overlay */
  justify-content: center;
  align-items: center;
}

.mobile-modal-content {
  background-color: #fffbea;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.mobile-modal-content .close-button {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}

.mobile-modal-content .close-button:hover {
  color: #333;
}

.mobile-modal-content h2 {
  color: #ff6f00;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

/* Hide desktop modals on mobile to prevent conflicts */
@media (max-width: 1024px) {

  #loginModal,
  #registerModal {
    display: none !important;
  }
}

/* Mobile Header: Burger left, Auth pill right */
@media (max-width: 1024px) {
  .mobile-auth-header-top {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  /* Burger Menu Button */
  .mobile-burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: #ff6f00;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    width: 46px;
    height: 46px;
  }

  .mobile-burger-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .mobile-burger-btn:active span {
    background-color: #a0cfff;
  }

  /* TOC Modal special styling */
  .mobile-toc-content {
    background-color: #ffffff;
    max-height: 80vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .mobile-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #ff6f00;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
  }

  .mobile-toc-header h2 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    text-align: left;
  }

  .mobile-toc-header .close-button {
    position: static;
    color: rgba(255, 255, 255, 0.8);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
  }

  .mobile-toc-header .close-button:hover {
    color: white;
  }

  .mobile-toc-list {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
  }

  .mobile-toc-list li a {
    display: block;
    padding: 13px 20px;
    color: #1a3c61;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f4f8;
    transition: background 0.2s;
  }

  .mobile-toc-list li a:hover,
  .mobile-toc-list li a:active {
    background-color: #e8f0fe;
    color: #ff6f00;
  }

  .mobile-toc-list li.mobile-toc-chapter a {
    font-weight: bold;
    background-color: #f5f8ff;
    color: #ff6f00;
    border-left: 4px solid #ff6f00;
    padding-left: 16px;
  }

  .mobile-toc-list li.mobile-toc-chapter a:hover {
    background-color: #dce8ff;
  }

  .mobile-toc-list li a {
    text-align: left;
  }

  /* Container tombol utama pastikan menggunakan flex */
  .mobile-auth-pill-top {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Memberi jarak antar elemen di dalam tombol */
    padding-right: 12px;
    /* Memberi ruang di sisi kanan */
  }

  /* Container Utama */
  .mobile-auth-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
  }

  /* Container Utama */
  .mobile-auth-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
  }

  /* Styling Tombol Refresh Kotak */
  .mobile-refresh-btn {
    width: 40px;
    /* Samakan dengan ukuran mobile-burger-btn Anda */
    height: 40px;
    /* Samakan dengan ukuran mobile-burger-btn Anda */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    /* Ganti warna sesuai tema (misal: transparan atau putih) */
    border: 1px solid #ddd;
    border-radius: 8px;
    /* Sesuaikan lengkungan kotak */
    cursor: pointer;
    color: #333;
    transition: all 0.2s ease;
    flex-shrink: 0;
    /* Agar kotak tidak gepeng saat layar sempit */
  }

  .mobile-refresh-btn:active {
    background-color: #e0e0e0;
    transform: scale(0.95);
  }

  .mobile-refresh-btn svg {
    display: block;
  }
}

/* Gaya dasar modal */
.modal-zoom-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease;
  transform: scale(1.5);
  /* Default untuk desktop */
  background-color: white;
}

/* Responsif untuk Mobile */
@media (max-width: 768px) {
  .modal-zoom-img {
    transform: scale(1);
    /* Kembali normal di mobile */
  }
}
