/* Import font từ Google Fonts (tuỳ chọn) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Reset CSS mặc định */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif; 
  background-color: #f4f4f4; 
  color: #333; 
  line-height: 1.6;
}

.container {
  width: 90%; 
  margin: 20px auto; 
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 
  border-radius: 8px; 
  overflow: hidden; 
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1 {
  text-align: center;
  padding: 20px;
  background-color: #007bff; /* Màu xanh dương */
  color: #fff;
}

#content {
  padding: 20px;
}

#content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 35px;
}

#content li, #content h6 {
  /* Các thuộc tính chung cho li và h6 */
  
 
  font-weight: normal; /* Đảm bảo font-weight giống nhau */
  font-size: inherit; /* Kế thừa font-size từ phần tử cha */
  line-height: inherit; /* Kế thừa line-height từ phần tử cha */
  font-family: inherit; /* Kế thừa font-family từ phần tử cha */
}

#content img {

 max-width: 500px;
    max-height: 500px;
    width: auto;
    height: auto;
}
#content li .imd img {
  filter: grayscale(100%);
  vertical-align: middle;
      margin: 5px;
}
#content p .imd img {
  vertical-align: middle;
      margin: 3px;
}
.question p {
  font-weight: bold;
  color: #444;
}
ul img {
    filter: grayscale(100%);
	vertical-align: middle;
      margin: 5px;
}

ul {
  list-style-type: none;
  padding: 0;
}

li, h6 {
  background-color: #eee;
  margin: 5px 0;
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color: 0.3s ease;
}

li:hover, h6:hover {
  background-color: #ddd;
}

li.selected, h6.selected {
  background-color: #cce5ff;
  color: #004085;
}

li.correct, h6.correct {
  background-color: #d4edda;
  color: #155724;
}

li.incorrect {
  background-color: #f8d7da;
  color: #721c24;
}

h6 {
  
    font-size: 20px;
    font-weight: 100;
   
    margin-block-start: -10px;
    margin-block-end: -10px;
    margin-inline-start: -10px;    
	margin-inline-end: -10px;
  
}

.result {
  margin-top: 20px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  text-align: center;
}

button {
  display: block;  
  padding: 10px;
  margin-top: 20px;
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  background-color: #218838;
}
li.disabled, h6.disabled {
  pointer-events: none; 
  opacity: 0.6; 
}

li.correct {
  background-color: #d4edda;
  color: #155724;
}

li.incorrect {
  background-color: #f8d7da;
  color: #721c24;
}

.progress-bar {
  width: 100%;
  background-color: #b7b7b7;
  border-radius: 5px;
  margin-top: 20px;
  overflow: hidden; 
  cursor: pointer;
}

.progress {
  height: 20px;
  background-color: #007bff; 
  border-radius: 5px;
  transition: width 0.6s ease; 
}

.progress-text {
  text-align: center;
  padding: 5px 0;
  color: #fff;
  font-weight: bold;
}

.toolbar-bottom {
  background-color: #f0f0f0; 
  padding: 10px 20px;
  text-align: center;
  font-weight: bold;
  border-top: 1px solid #ddd; 
  margin-top: auto;
}
/* Thiết kế lại nút 'Chọn bài trắc nghiệm khác' */
#chooseAnotherTest {
    /* Bố cục */
    display: block;           /* Giữ nguyên dạng khối */
    width: fit-content;       /* Chiều rộng vừa đủ nội dung */
    margin: 30px auto 20px auto; /* Căn giữa, tăng khoảng cách trên dưới */

    /* Giao diện */
    background-color: #007bff; /* Màu xanh dương chủ đạo */
    color: #ffffff;           /* Chữ trắng */
    border: none;             /* Bỏ viền */
    padding: 12px 28px;       /* Điều chỉnh padding cho cân đối */
    font-size: 1rem;          /* Kích thước chữ chuẩn */
    font-weight: 500;         /* Độ đậm vừa phải */
    border-radius: 8px;       /* Bo góc nhiều hơn cho mềm mại */
    cursor: pointer;
    text-align: center;
    text-decoration: none;    /* Bỏ gạch chân nếu có */

    /* Hiệu ứng */
    transition: background-color 0.25s ease, box-shadow 0.2s ease, transform 0.15s ease; /* Hiệu ứng mượt mà */
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.15); /* Bóng đổ xanh nhẹ */
}

#chooseAnotherTest:hover {
    background-color: #0056b3; /* Màu xanh đậm hơn khi hover */
    box-shadow: 0 5px 10px rgba(0, 123, 255, 0.25); /* Bóng đổ rõ hơn khi hover */
    transform: translateY(-2px); /* Hiệu ứng nhấc lên nhẹ */
}

#chooseAnotherTest:active {
    background-color: #004085; /* Màu xanh đậm nhất khi nhấn */
    transform: translateY(0); /* Trở lại vị trí cũ khi nhấn */
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.15); /* Bóng đổ khi nhấn */
}

#linkList {
  display: none;
  list-style: none;
  padding: 20px;
  background-color: #f9f9f9;
}

#linkList li {
  margin-bottom: 5px;
  border: none;
  background-color: transparent; 
}
#content p { /* Hoặc .question nếu bạn thêm class="question" cho thẻ p */
  
 margin-top: 20px;
  color: #212529; /* Màu chữ đậm hơn */
}
table {
  border-collapse: collapse; /* Gộp đường viền của các ô */
  width: 100%; /* Chiều rộng của bảng */
}

th, td {
  border: 1px solid black; /* Đường viền cho các ô */
  padding: 8px; /* Khoảng cách giữa nội dung và đường viền */
  text-align: left; /* Căn lề trái cho nội dung trong ô */
}

th {
  background-color: #f2f2f2; /* Màu nền cho tiêu đề cột */
}
#studyHistoryTable table {
    width: 100%;
    border-collapse: collapse; /* Xóa khoảng trống giữa các ô */
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
}

#studyHistoryTable th, #studyHistoryTable td {
    padding: 12px 15px; /* Khoảng cách bên trong các ô */
    border: 1px solid #ddd; /* Đường viền cho ô */
}

#studyHistoryTable th {
    background-color: #f4f4f4; /* Màu nền cho tiêu đề */
    font-weight: bold;
    text-align: center;
}

#studyHistoryTable tr:nth-child(even) {
    background-color: #f9f9f9; /* Màu nền cho hàng chẵn */
}

#studyHistoryTable tr:hover {
    background-color: #f1f1f1; /* Hiệu ứng hover */
}

#studyHistoryTable td {
    text-align: center;
}

#studyHistoryTable {
    max-width: 100%;
    overflow-x: auto; /* Thanh cuộn ngang cho màn hình nhỏ */
}
.question-block {
  border: 2px solid transparent;
  border-radius: 10px;
  padding-top: 10px;
  margin-bottom: 20px;
  transition: border-color 0.3s;
  position: relative;
}

.question-block.completed {
  border-color: #28a745; /* màu xanh viền khi đã chọn */
}

.question-block.completed::after {
 
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}
/* Container chính của hộp chat */
.support-box {
  /* Giữ các thuộc tính vị trí, kích thước, nền, bóng đổ cũ */
  position: fixed;
  /* bottom: 80px; /* Có thể cần điều chỉnh vị trí Y */
  /* right: 20px; */
  bottom: 20px; /* Đặt lại vị trí gần nút gốc hơn nếu muốn */
  right: 20px;
  width: 500px; /* Chiều rộng tổng thể */
  height: 60vh; /* Chiều cao tổng thể */
  background: white;
  border-radius: 16px; /* Bo góc */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden; /* Quan trọng */
  z-index: 1000;

  /* --- THAY ĐỔI QUAN TRỌNG --- */
  display: none; /* Mặc định ẩn */
  flex-direction: row; /* Sắp xếp con theo hàng ngang (header trái, iframe phải) */
}

/* Khi hộp chat được mở (có class visible) */
.support-box.visible {
  display: flex; /* Hiện và áp dụng flexbox */
}

/* Thanh header dọc bên trái */
.support-header-bar {
  background: #007bff; /* Màu nền xanh */
  color: white;
  width: 55px; /* Chiều rộng cố định cho thanh dọc */
  height: 100%; /* Chiều cao 100% của container */
  padding: 10px 0; /* Padding trên dưới */
  display: flex;
  flex-direction: column; /* Sắp xếp logo và nút đóng theo chiều dọc */
  justify-content: space-between; /* Đẩy logo lên trên, nút đóng xuống dưới */
  align-items: center; /* Căn giữa theo chiều ngang */
  flex-shrink: 0; /* Không cho phép thanh này co lại */
  box-sizing: border-box; /* Tính cả padding vào width */
}

/* Logo/Title trong header */
.support-header-bar .header-logo {
  font-size: 14px;
  font-weight: bold;
  margin-top: 10px; /* Khoảng cách trên */
  /* Có thể xoay chữ nếu muốn */
  /* writing-mode: vertical-rl; */
  /* transform: rotate(180deg); */
}

/* Phần chứa nút đóng */
.support-header-bar .header-controls {
   margin-bottom: 5px; /* Khoảng cách dưới */
}

/* Nút đóng (X) */
.support-header-bar .close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px; /* Kích thước nút X */
  cursor: pointer;
  padding: 0; /* Bỏ padding mặc định */
  line-height: 1; /* Căn chỉnh chiều cao */
}
 .support-header-bar .close-btn:hover {
   opacity: 0.8; /* Hiệu ứng hover đơn giản */
}


/* Iframe chứa nội dung chat */
.support-box iframe {
  flex-grow: 1; /* Chiếm hết không gian ngang còn lại */
  height: 100%; /* Chiếm hết chiều cao */
  border: none; /* Bỏ viền */
  width: auto; /* Để flex-grow kiểm soát chiều rộng */
}

/* --- CSS cho nút bật/tắt gốc --- */
.support-toggle-btn {
  /* Giữ nguyên CSS cũ cho nút này */
  position: fixed;
  bottom: 20px;
  right: 20px;
  /* ... các thuộc tính khác ... */
  z-index: 999; /* Nằm dưới hộp chat khi mở */
}

 /* --- Responsive cho màn hình nhỏ --- */
 @media (max-width: 768px) {
   .support-box {
     width: 95%;
     height: 80vh;
     bottom: 10px; /* Điều chỉnh vị trí */
     right: 2.5%;
   }
   .support-header-bar {
      width: 45px; /* Thu nhỏ thanh header */
   }
    .support-header-bar .header-logo {
       font-size: 12px;
    }
    .support-header-bar .close-btn {
       font-size: 20px;
    }
 }
/* --- CSS Nâng Cấp cho Nút Trợ Lý AI --- */
.support-toggle-btn {
  position: fixed;
  bottom: 25px; /* Hơi nâng lên một chút */
  right: 25px;  /* Hơi cách lề một chút */
  background: linear-gradient(145deg, #0088ff, #0061c5); /* Gradient xanh dương hiện đại */
  color: #fff;
  border: none;
  padding: 10px 20px; /* Điều chỉnh padding */
  border-radius: 12px; /* Bo góc vuông vắn hơn, hiện đại hơn */
  cursor: pointer;
  font-size: 16px;
  font-weight: 600; /* Giữ nguyên hoặc 500 */
  font-family: 'Roboto', sans-serif; /* Đảm bảo font được áp dụng */
  letter-spacing: 0.5px; /* Tăng khoảng cách chữ một chút */
  box-shadow: 0 4px 10px rgba(0, 97, 197, 0.2), /* Bóng mờ chính */
              0 1px 3px rgba(0, 0, 0, 0.1);       /* Bóng nhẹ gần hơn */
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1); /* Transition mượt mà hơn */
  z-index: 999;
  display: inline-flex; /* Sử dụng flex để căn chỉnh icon và text */
  align-items: center;
  gap: 8px; /* Khoảng cách giữa icon và text */
  white-space: nowrap; /* Không xuống dòng */
}

.support-toggle-btn:hover {
  background: linear-gradient(145deg, #007ae0, #0055b0); /* Gradient đậm hơn khi hover */
  transform: translateY(-3px); /* Hiệu ứng nhấc lên nhẹ */
  box-shadow: 0 7px 18px rgba(0, 97, 197, 0.3), /* Bóng đổ rõ hơn khi hover */
              0 3px 6px rgba(0, 0, 0, 0.15);
}

.support-toggle-btn:active {
  transform: translateY(0px); /* Hiệu ứng nhấn xuống */
  background: #0056b3; /* Màu nền đậm khi nhấn */
  box-shadow: 0 2px 5px rgba(0, 97, 197, 0.2); /* Bóng đổ nhỏ hơn khi nhấn */
}


#content img {
  max-width: 80vw; /* Tối đa 80% chiều rộng màn hình thiết bị */
  max-height: 80vh; /* Tối đa 80% chiều cao màn hình */
  width: auto;
  height: auto;
}
/* --- HIERARCHY STYLING START --- */
#lessonHierarchyContainer {
    padding: 20px;
    border-bottom: 1px solid #eee; /* Separator line */
}

.folder-node {
    margin-bottom: 5px;
}

.folder-node > summary {
    cursor: pointer;
    font-weight: bold;
    padding: 1px 12px;
    background-color: #f0f0f0;
    border-radius: 4px;
    list-style: none; /* Remove default triangle */
    position: relative;
    transition: background-color 0.2s ease;
    border: 1px solid #ddd;
}
.folder-node > summary:hover {
    background-color: #e0e0e0;
}

/* Custom folder icon */
.folder-node > summary::before {
    content: '📁'; /* Folder icon */
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s ease-in-out;
    font-size: 1em;
}
.folder-node[open] > summary::before {
    content: '📂'; /* Open folder icon */
    /* transform: rotate(90deg); */ /* Optional rotation */
}


/* Indentation for nested levels */
.folder-node > details,
.folder-node > div.lesson-item {
    margin-left: 25px; /* Indent nested items */
    padding-left: 10px;
    border-left: 2px dotted #ccc; /* Vertical line for structure */
    margin-top: 5px;
}
.folder-node > details {
     border-left: none; /* Don't double border details */
     padding-left: 0;
}


.lesson-item {    
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.95em;
    position: relative; /* For viewed marker */
}
.lesson-item::before {
     content: '📄'; /* Document icon for lessons */
     margin-right: 8px;
     font-size: 0.9em;
}


.lesson-item:hover {
    background-color: #e7f3ff; /* Light blue hover */
    border-color: #aaccff;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.2);
}

/* Styling for viewed/completed lessons */
.lesson-item.viewed {
    background-color: #f0fff0; /* Light green background */
    border-color: #c0e0c0;
    color: #555; /* Slightly dimmer text */
    font-style: italic;
}
.lesson-item.viewed::after {
    content: '✓'; /* Checkmark */
    color: green;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}
.lesson-item.viewed:hover {
     background-color: #e0f0e0; /* Darker green hover */
}

/* --- HIERARCHY STYLING END --- */
/* Kiểu nút Hướng dẫn */
.help-button {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 33px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    padding: 0;}

.help-button:hover {
  background-color: #efefef; /* Màu nền khi hover */
}

.help-icon {
  margin-right: 8px;
  font-weight: bold;
  font-size: 16px;
  color: #555; /* Màu biểu tượng */
}
/* Kiểu hộp thoại hướng dẫn (modal) */
.help-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  overflow-y: auto;
  font-family: sans-serif; /* Đặt font-family cụ thể */
  line-height: 1.5; /* Đặt line-height cụ thể */
}

.help-modal-content {
  position: relative;
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.help-modal-content h2 {
  color: #333;
  font-size: 24px;
  margin-bottom: 10px;
  border-bottom: 2px solid #ccc;
  padding-bottom: 5px;
}

.help-modal-content ol {
  list-style-type: decimal;
  margin-left: 20px;
  margin-bottom: 15px;
  padding-left: 0;
}

.help-modal-content li {
  color: #555;
  font-size: 16px;
  margin-bottom: 8px;
}

.help-modal-content li b {
  color: #333;
}

.help-modal-content p {
  color: #555;
  font-size: 16px;
  margin-bottom: 10px;
}

.help-close {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #aaa;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.help-close:hover,
.help-close:focus {
  color: #333;
}

/* Responsive (cho thiết bị di động) */
@media (max-width: 768px) {
  .help-modal-content {
    width: 95%;
    margin: 10% auto;
  }
}
.stats-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

/* --- Test Area Styling --- */
#testArea {
    padding: 20px;
}

/* --- Stats and History Section --- */
.stats-section {
  margin-top: 30px;
  padding: 30px 20px;
  border-top: 1px solid #dee2e6;
  background-color: #f8f9fa; /* Light background for section */
}
.stats-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}
.chart-container {
  max-width: 800px;
  margin: 0 auto 30px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border: 1px solid #eee;
}
#studyHistoryTable {
    max-width: 100%;
    overflow-x: auto; /* Horizontal scroll for small screens */
    margin-top: 20px;
}
#studyHistoryTable table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em; /* Slightly smaller font */
}
#studyHistoryTable th, #studyHistoryTable td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: center;
}
#studyHistoryTable th {
    background-color: #e9ecef;
    font-weight: bold;
}
#studyHistoryTable tr:nth-child(even) {
    background-color: #f8f9fa;
}
#studyHistoryTable tr:hover {
    background-color: #f1f1f1;
}
#studyHistoryTable td:nth-child(3) { /* Align lesson title left */
    text-align: left;
}

/* --- AUTHENTICATION SECTION (FINGERPRINT & MEMBERSHIP) --- */
#auth-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

.auth-block {
    text-align: center;
}

.auth-block h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #6c757d;
    font-weight: normal;
}

#fingerprint-container, 
#membership-input-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #e9ecef;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

#fingerprint-display {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    font-family: 'Courier New', Courier, monospace;
}

#membership-code-input {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 8px;
    background-color: #fff;
    color: #333;
    width: 250px; /* Give it a fixed width */
}

#copy-fingerprint-btn, #save-membership-btn {
    display: inline-block;
    margin: 0;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    background-color: #007bff;
    border: 1px solid #007bff;
    border-radius: 4px;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

#copy-fingerprint-btn:hover, #save-membership-btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

#membership-status {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: bold;
    min-height: 1.2em;
}

/* --- BACKUP & RESTORE SECTION --- */
.backup-restore {
    padding: 30px 20px;
    margin-top: 10px;
    background-color: #fff;
    border-top: 1px solid #eee;
    text-align: center;
}

.backup-restore h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 20px;
}

.backup-restore-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: center; /* Căn giữa các nút theo chiều dọc */
}

/* Quy tắc chung cho cả button và label để đảm bảo đồng nhất */
.backup-restore-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: #007bff; /* MÀU XANH ĐỒNG NHẤT */
    margin: 0; /* Ghi đè margin từ quy tắc button chung */
    line-height: 1.5; /* Đảm bảo chiều cao dòng nhất quán */
}

.backup-restore-actions .btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}


.backup-restore .note {
    font-size: 0.85rem;
    color: #6c757d;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
  .container {
    width: 95%;
    margin: 10px auto; /* Adjust margin */
  }
  #pageTitle {
      font-size: 1.5em;
  }
  .folder-node > summary, .lesson-item {
      padding: 8px 10px;
      font-size: 0.9em;
  }
   .folder-node > details, .folder-node > div.lesson-item {
        margin-left: 15px; /* Reduce indent on mobile */
        padding-left: 8px; /* Reduce padding */
   }


   .stats-section, .backup-restore {
       padding: 15px;
   }
   #studyHistoryTable th, #studyHistoryTable td {
        padding: 8px 10px;
   }
   #content li, #content h6 { /* Options size */
       padding: 10px 12px;
   }
   #content p { /* Question text size */
       font-size: 0.95em;
   }

/* FILE: style.css (Thêm vào cuối) */

/* === CSS MỚI CHO THANH TÌM KIẾM === */
.search-bar-container {
    display: block; /* Đảm bảo container chiếm đủ chiều rộng */
    padding: 15px 20px; /* Giữ hoặc điều chỉnh padding nếu cần */
    margin-bottom: 15px; /* Khoảng cách dưới */
    background-color: #f8f9fa; /* Màu nền cũ */
    border-bottom: 1px solid #eee; /* Đường kẻ dưới cũ */
    box-sizing: border-box; /* Quan trọng */
}

.search-bar-input {
    display: block; /* Hiển thị dạng khối */
    width: 100%; /* Chiếm toàn bộ chiều rộng của container */
    padding: 10px 15px; /* Padding bên trong ô input */
    font-size: 1rem; /* Kích thước chữ */
    line-height: 1.5; /* Chiều cao dòng */
    color: #495057; /* Màu chữ */
    background-color: #fff; /* Màu nền ô input */
    background-clip: padding-box;
    border: 1px solid #ced4da; /* Viền ô input */
    border-radius: 0.25rem; /* Bo góc nhẹ */
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); /* Bóng đổ nhẹ bên trong */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; /* Hiệu ứng chuyển động */
    box-sizing: border-box; /* Rất quan trọng: đảm bảo width 100% bao gồm cả padding và border */
    margin: 0; /* Bỏ margin mặc định nếu có */
}

.search-bar-input:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff; /* Đổi màu viền khi focus */
    outline: 0; /* Bỏ đường viền focus mặc định */
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(0, 123, 255, 0.25); /* Thêm hiệu ứng bóng đổ khi focus */
}
/* === HẾT CSS MỚI === */

/* Optional: Add margin below filter before hierarchy starts */
#lessonHierarchyContainer {
    /* padding-top: 10px; */ /* Adjust existing padding if needed */
}

/* Optional: Add margin below filter before hierarchy starts */
#lessonHierarchyContainer {
    /* padding-top: 10px; */ /* Adjust existing padding if needed */
}
/* FILE: style.css (Thêm vào) */

.lesson-item.highlighted {
    background-color: #fff3cd; /* Màu vàng nhạt làm nổi bật */
    border-color: #ffeeba;
    font-weight: bold; /* Chữ đậm hơn */
}

/* Có thể thêm hiệu ứng khi hover vào mục đã highlight */
.lesson-item.highlighted:hover {
    background-color: #ffeeba;
    border-color: #ffdb8b;
}

}
/* === THÊM CSS CHO NÚT TOÀN MÀN HÌNH === */

/* Style chung cho các nút điều khiển trong header AI */
.support-header-bar .control-btn,
.support-header-bar .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 22px; /* Đồng nhất kích thước với nút close */
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: opacity 0.2s ease;
    width: 30px; /* Đảm bảo nút có chiều rộng để click */
    height: 30px; /* Đảm bảo nút có chiều cao để click */
    display: flex; /* Căn giữa icon */
    align-items: center;
    justify-content: center;
}

.support-header-bar .control-btn:hover,
.support-header-bar .close-btn:hover {
    opacity: 0.8;
}

/* Sắp xếp các nút điều khiển trong header */
.support-header-bar .header-controls {
   display: flex;
   flex-direction: column; /* Xếp chồng dọc */
   align-items: center;
   gap: 8px; /* Khoảng cách giữa nút toàn màn hình và nút đóng */
   margin-bottom: 10px; /* Khoảng cách với đáy */
}


/* CSS cho container khi ở chế độ toàn màn hình */
#supportContainer:fullscreen {
    /* Có thể thêm style khác nếu muốn, ví dụ nền khác */
    background-color: #ffffff;
    padding: 0; /* Bỏ padding khi fullscreen */
    border-radius: 0; /* Bỏ bo góc khi fullscreen */
}

/* Căn chỉnh lại header và iframe khi fullscreen */
#supportContainer:fullscreen .support-header-bar {
   border-radius: 0;
}

#supportContainer:fullscreen iframe {
   border-radius: 0;
}

/* Ẩn nút bật/tắt gốc khi AI đang ở chế độ toàn màn hình */
/* Lưu ý: Selector này có thể không hoạt động 100% trên mọi trình duyệt */
#supportContainer:fullscreen ~ .support-toggle-btn {
    display: none !important; /* Ưu tiên ẩn nút gốc */
}

/* === KẾT THÚC CSS THÊM === */

/* --- Membership Modal Styles --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1050;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: translateY(-50px);
  transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #333;
}

.modal-content p {
  margin: 15px 0;
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
}

.modal-buttons {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.modal-buttons button {
  padding: 10px 25px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.1s;
  margin: 0; /* Override general button margin */
}

#modalCancelBtn {
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
}

#modalCancelBtn:hover {
  background-color: #e0e0e0;
}

#modalOkBtn {
  background-color: #007bff;
  color: #fff;
}

#modalOkBtn:hover {
  background-color: #0056b3;
}