
/* ====== POPULAR EXAMS ====== */
.popular-exams-box {
  margin: 30px auto 20px;
  max-width: 600px;
  background: #fff0f3;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(255,0,0,0.05);
}
.popular-exams-box h3 {
  margin-top: 0;
  font-size: 18px;
  color: #d90429;
  text-align: center;
}
#popular-exams-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
#popular-exams-list li {
  padding: 8px 12px;
  border-bottom: 1px solid #ffd6e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  gap: 8px;
  cursor: pointer;
}
#popular-exams-list li:hover {
  background: #ffe0e8;
}
#popular-exams-list li:last-child {
  border-bottom: none;
}
#popular-exams-list .pop-exam-title {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#popular-exams-list .pop-exam-count {
  color: #d90429;
  font-weight: bold;
  font-size: 14px;
  margin-left: 8px;
}

/* ====== COMMENTS MODAL ====== */
#comment-modal .modal-content {
  max-width: 500px;
  width: 95vw;
}
#comments-list {
  margin-bottom: 10px;
}
#comments-list .comment-item {
  border-bottom: 1px solid #eee;
  padding: 8px 0;
  font-size: 15px;
}
#comments-list .comment-rating {
  color: #fbbf24;
  font-size: 16px;
  margin-right: 6px;
}
#comments-list .comment-text {
  display: inline;
}
#comments-list .comment-date {
  color: #888;
  font-size: 12px;
  margin-left: 8px;
}

/* ====== SHARING BUTTONS ====== */
#share-box {
  display: flex;
  align-items: center;
  gap: 6px;
}
#share-box button {
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
#share-fb { background: #1877f2; color: #fff; }
#share-fb:hover { background: #145db2; }
#share-zalo { background: #008fe5; color: #fff; }
#share-zalo:hover { background: #005fa3; }
#share-copy { background: #eee; color: #222; }
#share-copy:hover { background: #ccc; }

@media (max-width: 600px) {
  .popular-exams-box, .favorites-box {
    max-width: 98vw;
    padding: 10px;
  }
  #popular-exams-list li, #favorites-list li {
    font-size: 14px;
    padding: 6px 4px;
  }
  #share-box span { font-size: 13px; }
  .donate-button {
    width: 100%;
  }
}
/* RESET CƠ BẢN */
html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(135deg, #f0f4f8 0%, #dbeafe 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* CONTAINER CHÍNH */
.container {
  max-width: 800px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 35px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(30, 41, 59, 0.06);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

h1 {
  font-size: 28px;
  margin-bottom: 20px;
}

/* INPUT & SELECT CHUNG */
input[type="text"], select {
  width: 100%;
  max-width: 400px;
  padding: 12px 20px;
  margin: 10px auto;
  display: block;
  font-size: 16px;
  border-radius: 50px; /* 👈 Bo tròn Google-style */
  border: 1px solid #ccc;
  box-sizing: border-box;
  outline: none;
  transition: box-shadow 0.2s ease;
  appearance: none; /* 👈 ẩn mũi tên mặc định */
  background-color: white;
  background-image: url("data:image/svg+xml,%3Csvg fill='gray' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center; /* 👈 mũi tên sang trái một chút */
  background-size: 16px;
  transition: box-shadow 0.2s ease;
}

input[type="text"]:focus {
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
}

select:disabled {
  background-color: #f1f1f1;
  color: #999;
  cursor: not-allowed;
  border-color: #ccc;
  opacity: 0.7;
}

/* COMBOBOX SELECTORS */
.selectors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.selectors select {
  width: 160px;
}

select:focus {
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
}

input[type="text"]:hover,
select:hover {
  border-color: #888;
}

/* FILE VIEWER */
#file-viewer {
  margin: 40px auto;
  max-width: 1000px;
  padding: 10px;
  text-align: center;
}

#file-viewer iframe {
  width: 100%;
  height: 90vh;
  border: none;
}

#file-viewer a {
  display: inline-block !important;
  transition: all 0.2s ease;
}

#file-viewer a:active {
  transform: translateY(-1px) !important;
}

#file-viewer img {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* GỢI Ý TỰ ĐỘNG */
.suggestion-box {
  list-style: none;
  padding: 0;
  margin-top: 0;
  max-height: 300px;
  overflow-y: auto;
  width: 100%;
  max-width: 400px;
  margin: auto;
  border: 1px solid #ddd;
  border-top: none;
  background: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border-radius: 0 0 12px 12px;
  z-index: 100;
  position: relative;
}

.suggestion-box li {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font-size: 15px;
  cursor: pointer;
}

.suggestion-box li:hover {
  background: #f1f3f4;
}

.suggestion-box li::before {
  content: "";
  margin-right: 8px;
  font-size: 14px;
}

.suggestion-box li.active {
  background-color: #e8f0fe;
}

/* NÚT ỦNG HỘ */
#donate-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #ffb703;
  color: black;
  border: none;
  padding: 10px 16px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  z-index: 999;
  transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

#donate-btn:hover {
  background-color: #fb8500; /* Màu cam đậm hơn */
  color: white;
  transform: scale(1.05); /* Nhẹ nhàng phóng to lên một chút */
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
}

/* MODAL NỘI DUNG */
.modal-content {
  background: white;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-sizing: border-box;
  position: relative;
  text-align: left;
}

/* FORM TRONG MODAL */
.modal-content input,
.modal-content select {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  font-size: 16px;
  box-sizing: border-box;
}

.modal-content button[type="submit"] {
  background-color: #219ebc;
  color: white;
  border: none;
  padding: 12px;
  font-size: 16px;
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.modal-content button[type="submit"]:hover {
  background-color: #197a9b;
}

/* NÚT ĐÓNG MODAL */
#close-modal {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 24px;
  cursor: pointer;
}

/* RESPONSIVE CHO MOBILE */
@media (max-width: 480px) {
  .modal-content {
    margin: 10% auto;
    padding: 15px;
  }

  .modal-content input,
  .modal-content select {
    font-size: 14px;
  }

  .modal-content button[type="submit"] {
    font-size: 14px;
    padding: 10px;
  }
}

/* Nút Facebook góc trái */
#facebook-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 999;
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

#facebook-btn:hover {
  transform: scale(1.1);
}

#facebook-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Nút Bảng Xếp Hạng */
#leaderboard-btn {
  position: absolute;
  top: 20px;
  right: 155px; /* dịch qua trái so với nút donate */
  background-color: #8ecae6;
  color: black;
  border: none;
  padding: 10px 16px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  z-index: 999;
  transition: background 0.3s ease;
}

#leaderboard-btn:hover {
  background-color: #219ebc;
  color: white;
  transform: scale(1.05);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 16px;
}

.ranking-table thead {
  background-color: #f1f3f4;
}

.ranking-table th, .ranking-table td {
  padding: 12px;
  border-bottom: 1px solid #ddd;
  text-align: center;
}

.ranking-table tr:hover {
  background-color: #f9f9f9;
}

.ranking-table td:first-child {
  font-weight: bold;
  font-size: 18px;
}

.modal-content h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 22px;
  color: #333;
}

.upgrade-box {
  background: #fff3cd;
  padding: 16px;
  border: 1px solid #ffeeba;
  border-radius: 10px;
  margin: 20px auto;
  max-width: 600px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  text-align: center;
}

.progress-bar {
  background-color: #e0e0e0;
  border-radius: 20px;
  overflow: hidden;
  height: 20px;
  width: 100%;
  margin: 10px auto 16px;
  box-sizing: border-box;
}

.progress-fill {
  background: linear-gradient(90deg, #00c9a7, #00b4d8);
  height: 100%;
  width: 0%;
  transition: width 0.6s ease;
}

#support-btn {
  background-color: #fb6f92;
  color: white;
  border: none;
  padding: 10px 16px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  z-index: 999;
  transition: background 0.3s ease;
}

#support-btn:hover {
  background-color: #d35d7d;
}

#close-upgrade-modal {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 24px;
  cursor: pointer;
}

.favorites-box {
  margin: 40px auto 20px;
  max-width: 600px;
  background: #f0f4ff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(0,0,0,0.05);
}

.favorites-box h3 {
  margin-top: 0;
  font-size: 18px;
  color: #333;
  text-align: center;
}

#favorites-list {
  list-style: none;
  padding: 0;
}

#favorites-list li {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
  transition: background 0.2s ease;
}

#favorites-list li:hover {
  background: #e3eaff;
}

.bookmark-toggle {
  background-color: #ffd166;
  color: #333;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.bookmark-toggle:hover {
  background-color: #fcbf49;
}

#favorites-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.remove-fav {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #888;
}

.remove-fav:hover {
  color: red;
}

/* ===== CUSTOM DROPDOWN (Thay cho select) ===== */

.custom-dropdown {
  position: relative;
  width: 160px;
  margin: 10px;
  font-size: 16px;
  user-select: none;
}

.dropdown-selected {
  background-color: white;
  border: 1px solid #ccc;
  padding: 12px 16px;
  border-radius: 50px;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: relative;
  text-align: left;
  padding-right: 36px; /* chừa chỗ cho mũi tên */
}

.dropdown-selected::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg fill='gray' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.dropdown-options {
  list-style: none; /* ✅ bỏ dấu chấm gốc */
  padding: 0;
  margin: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 240px;
  overflow-y: auto;
  z-index: 999;
  display: none;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Chrome, Edge */
.dropdown-options::-webkit-scrollbar {
  width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 8px;
}

.dropdown-options::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  transition: background 0.2s ease;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.dropdown-options li {
  list-style: none; /* ✅ loại bỏ dấu chấm từng dòng */
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 15px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.5;
  text-align: middle;
}

.dropdown-options li:hover {
  background-color: #f1f3f4;
}

/* Optional: active item */
.dropdown-options li.active {
  background-color: #e8f0fe;
  font-weight: bold;
}

/* Responsive fix nếu cần */
@media (max-width: 480px) {
  .custom-dropdown {
    width: 100%;
    max-width: 400px;
  }
}

.custom-dropdown.disabled .dropdown-selected {
  background-color: #f1f1f1;
  color: #999;
  cursor: not-allowed;
  border-color: #ccc;
  opacity: 0.6;
}

.custom-dropdown.disabled .dropdown-selected::after {
  opacity: 0.4;
}

.donate-button {
  background-color: #ffffff;
  display: flex;
  width: 568px;
  height: 100px;
  margin: 20px auto;
  position: relative;
  border-radius: 6px;
  transition: 0.3s ease-in-out;
  overflow: hidden;
}

.donate-button:hover {
  transform: scale(1.03);
}

.donate-button:hover .left-side {
  width: 100%;
}

.left-side {
  background-color: #5de2a3;
  width: 110px;
  height: 100px;
  border-radius: 4px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: 0.3s;
  flex-shrink: 0;
  overflow: hidden;
}

.right-side {
  width: calc(100% - 110px);
  display: flex;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  justify-content: space-between;
  white-space: nowrap;
  transition: 0.3s;
}

.right-side:hover {
  background-color: #f9f7f9;
}

.arrow {
  width: 18px;
  height: 18px;
  margin-right: 15px;
}

.new {
  font-size: 18px;
  font-family: "Lexend Deca", sans-serif;
  margin-left: 16px;
}

.card {
  width: 60px;
  height: 40px;
  background-color: #c7ffbc;
  border-radius: 6px;
  position: absolute;
  display: flex;
  z-index: 10;
  flex-direction: column;
  align-items: center;
  box-shadow: 9px 9px 9px -2px rgba(77, 200, 143, 0.72);
}

.card-line {
  width: 55px;
  height: 10px;
  background-color: #80ea69;
  border-radius: 2px;
  margin-top: 7px;
}

.buttons {
  width: 8px;
  height: 8px;
  background-color: #379e1f;
  box-shadow: 0 -10px 0 0 #26850e, 0 10px 0 0 #56be3e;
  border-radius: 50%;
  margin-top: 5px;
  transform: rotate(90deg);
  margin: 10px 0 0 -30px;
}

.post {
  width: 55px;
  height: 65px;
  background-color: #dddde0;
  position: absolute;
  z-index: 11;
  bottom: 10px;
  top: 100px;
  border-radius: 6px;
  overflow: hidden;
}

.post-line {
  width: 42px;
  height: 8px;
  background-color: #545354;
  position: absolute;
  border-radius: 0px 0px 3px 3px;
  right: 7px;
  top: 8px;
}

.post-line:before {
  content: "";
  position: absolute;
  width: 42px;
  height: 8px;
  background-color: #757375;
  top: -8px;
}

.screen {
  width: 42px;
  height: 20px;
  background-color: #ffffff;
  position: absolute;
  top: 22px;
  right: 7px;
  border-radius: 3px;
}

.numbers {
  width: 10px;
  height: 10px;
  background-color: #838183;
  box-shadow: 0 -16px 0 0 #838183, 0 16px 0 0 #838183;
  border-radius: 2px;
  position: absolute;
  transform: rotate(90deg);
  left: 22px;
  top: 52px;
}

.numbers-line2 {
  width: 10px;
  height: 10px;
  background-color: #aaa9ab;
  box-shadow: 0 -16px 0 0 #aaa9ab, 0 16px 0 0 #aaa9ab;
  border-radius: 2px;
  position: absolute;
  transform: rotate(90deg);
  left: 22px;
  top: 66px;
}

.donate-button:hover .card {
  animation: slide-top 1.2s cubic-bezier(0.645, 0.045, 0.355, 1) both;
}

.donate-button:hover .post {
  animation: slide-post 1s cubic-bezier(0.165, 0.84, 0.44, 1) both;
}

.dollar {
  position: absolute;
  font-size: 14px;
  font-family: "Lexend Deca", sans-serif;
  width: 100%;
  left: 0;
  top: 0;
  color: #4b953b;
  text-align: center;
}

.donate-button:hover .dollar {
  animation: fade-in-fwd 0.3s 1s backwards;
}

@keyframes slide-top {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-60px) rotate(90deg);
  }

  60% {
    transform: translateY(-60px) rotate(90deg);
  }

  100% {
    transform: translateY(-5px) rotate(90deg);
  }
}

@keyframes slide-post {
  50% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-60px);
  }
}

@keyframes fade-in-fwd {
  0% {
    opacity: 0;
    transform: translateY(-5px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

#feedback-btn {
  position: absolute;
  top: 22px;
  right: 320px;
  z-index: 999;
  background: #f704c2;
  color: #222;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

#feedback-btn:hover {
  background: #df1aad;
  color: white;
  transform: translateY(-1px);
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#note-btn {
  position: absolute;
  top: 22px;
  right: 435px;
  z-index: 999;
  background: #9a9899;
  color: #222;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

#note-btn:hover {
  background: #b1afb0;
  color: white;
  transform: translateY(-1px);
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Hiệu ứng mở modal */
@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Dark Mode */
body.dark-mode {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f1f5f9;
}

.dark-mode .container {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.dark-mode h1, .dark-mode h2, .dark-mode h3 {
  color: #ffffff;
}

.dark-mode input[type="text"], .dark-mode select {
  background-color: #2c2c2c;
  color: #e0e0e0;
  border-color: #444;
}

.dark-mode .suggestion-box {
  background-color: #2c2c2c;
  border-color: #444;
}

.dark-mode .upgrade-box {
  background-color: #2c2c2c;
  border-color: #444;
}

.dark-mode .donate-button {
  background-color: #1e1e1e;
}

.dark-mode .suggestion-box li:hover {
  background-color: #383838;
}

.dark-mode .modal-content {
  background-color: #1e1e1e;
}

.dark-mode .ranking-table thead {
  background-color: #2c2c2c;
}

.dark-mode .ranking-table tr:hover {
  background-color: #2c2c2c;
}

.dark-mode .favorites-box, .dark-mode .popular-exams-box {
  background-color: #2c2c2c;
}

.dark-mode .custom-dropdown .dropdown-selected {
  background-color: #2c2c2c;
  border-color: #444;
}

.dark-mode .custom-dropdown .dropdown-options {
  background-color: #2c2c2c;
  border-color: #444;
}

/* Theme Toggle Button */
#theme-toggle {
  position: absolute;
  top: 20px;
  left: 70px; /* Next to the Facebook button */
  z-index: 1000;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#theme-toggle svg {
  width: 20px;
  height: 20px;
  color: #555;
  transition: all 0.3s ease;
}

#theme-toggle-moon-icon {
  display: none;
}

.dark-mode #theme-toggle {
  background: #2c2c2c;
  border-color: #444;
}

.dark-mode #theme-toggle svg {
  color: #e0e0e0;
}

.dark-mode #theme-toggle-sun-icon {
  display: none;
}

.dark-mode #theme-toggle-moon-icon {
  display: block;
}

#request-exam-btn {
  position: absolute;
  top: 20px;
  left: 115px; /* Next to the theme toggle button */
  z-index: 1000;
  background-color: #ffb703;
  color: black;
  border: none;
  padding: 10px 16px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#request-exam-btn:hover {
  background-color: #fb8500;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#mock-test-btn {
  position: absolute;
  top: 20px;
  left: 250px;
  z-index: 1000;
  background-color: #4ecdc4;
  color: black;
  border: none;
  padding: 10px 16px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#mock-test-btn:hover {
  background-color: #3ba39c;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#close-request-modal {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 24px;
  cursor: pointer;
}

/* ====== NOTIFICATION BOX ====== */
#notification-box {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-left: 4px solid #667eea;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  max-width: 350px;
  z-index: 9999;
  animation: slideInRight 0.3s ease-out;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

#notification-box.success {
  border-left-color: #10b981;
}

#notification-box.info {
  border-left-color: #667eea;
}

#notification-box.warning {
  border-left-color: #f59e0b;
}

#notification-box.error {
  border-left-color: #ef4444;
}

#notification-box-content {
  flex: 1;
}

#notification-box-title {
  font-weight: bold;
  font-size: 16px;
  margin: 0 0 4px 0;
  color: #1f2937;
}

#notification-box-message {
  font-size: 14px;
  color: #666;
  margin: 0;
}

#notification-box-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: color 0.2s;
}

#notification-box-close:hover {
  color: #333;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

#notification-box.hide {
  animation: slideOutRight 0.3s ease-in;
}

.dark-mode #notification-box {
  background: #2d2d2d;
  border-left-color: #667eea;
}

.dark-mode #notification-box-title {
  color: #fff;
}

.dark-mode #notification-box-message {
  color: #ccc;
}

.dark-mode #notification-box-close {
  color: #999;
}

.dark-mode #notification-box-close:hover {
  color: #fff;
}

@media (max-width: 600px) {
  #notification-box {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

.dark-mode .header-buttons {
  background-color: #1e1e1e;
}

@media (max-width: 1024px) {
    .header-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 10px 0;
    }

    #facebook-btn,
    #theme-toggle,
    #request-exam-btn,
    #donate-btn,
    #leaderboard-btn,
    #feedback-btn,
    #note-btn,
    #mock-test-btn {
        position: relative;
        top: unset;
        left: unset;
        right: unset;
        transform: none;
        margin: 5px;
    }

    #facebook-btn, #theme-toggle {
        width: 40px;
        height: 40px;
    }
    
}

/* ====== SKELETON LOADER FOR VIEWER (Phase 2 UX) ====== */
.skeleton-loader {
  background: rgba(243, 244, 246, 0.7);
  border-radius: 16px;
  padding: 35px;
  max-width: 600px;
  margin: 30px auto;
  border: 1px solid rgba(229, 231, 235, 0.5);
  animation: pulse 1.6s infinite ease-in-out;
}
.dark-mode .skeleton-loader {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(255, 255, 255, 0.05);
}
.skeleton-title {
  height: 24px;
  background: #e5e7eb;
  border-radius: 6px;
  width: 50%;
  margin: 0 auto 25px;
}
.dark-mode .skeleton-title {
  background: #334155;
}
.skeleton-body {
  height: 400px;
  background: #e5e7eb;
  border-radius: 12px;
  width: 100%;
}
.dark-mode .skeleton-body {
  background: #334155;
}
@keyframes pulse {
  0% { opacity: 0.55; }
  50% { opacity: 1; }
  100% { opacity: 0.55; }
}

/* ====== MATCHED STRING HIGHLIGHTING ====== */
.highlight {
  color: #1a73e8;
  font-weight: bold;
  background-color: rgba(26, 115, 232, 0.1);
  padding: 1px 3px;
  border-radius: 3px;
}
.dark-mode .highlight {
  color: #8ab4f8;
  background-color: rgba(138, 180, 248, 0.15);
}
