/* Toàn trang */
body {
  background-color: #f8f9fa;
  color: #212529 !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: #000;
}

/* Tiêu đề chính */
h2 {
  font-size: 2.4rem;
  color: #660014 !important;
  margin-bottom: 1rem;
  text-align: center;
}

/* Các phần nhỏ */
h3 {
  color: #e85d04 !important;
  font-size: 1.5rem;
  margin-top: 2rem;
}

/* Danh sách gạch đầu dòng */
ul, ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

/* Phần bảng từ vựng */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background-color: #ffffff;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

table th, table td {
  border: 1px solid #dee2e6;
  padding: 12px;
  text-align: left;
}

table th {
  background-color: #0077b6;
  color: white;
}

/* Highlight collocations */
strong {
  color: #0a9396;
}

/* Các section cách nhau rõ ràng */
section {
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  margin: 2rem auto;
  max-width: 960px;
}
#dictionary-popup {
  position: absolute;
  z-index: 9999;
  background: #fff;
  color: #000;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: none;
  max-width: 240px;
}
#dictionary-popup a {
  color: #0077b6;
  text-decoration: none;
}
#dictionary-popup button {
  margin-top: 6px;
  background: #0a9396;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
#dictionary-popup button:hover {
  background: #007b83;
}
#dictionary-popup a:hover {
  text-decoration: underline;
}
#dictionary-popup .close-btn {
  position: absolute;
  top: 4px;
  right: 8px;
  font-weight: bold;
  cursor: pointer;
}
.custom-highlight {
  padding: 0 2px;
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.highlight-popup {
  position: absolute;
  top: -30px;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  padding: 2px;
  display: flex;
  gap: 2px;
  z-index: 1000;
}

.highlight-popup button {
  background: #eee;
  border: none;
  padding: 3px 5px;
  cursor: pointer;
  font-size: 14px;
}

.highlight-popup button:hover {
  background: #ddd;
}

.note-tooltip {
  position: absolute;
  top: -40px;
  left: 0;
  background: #333;
  color: #fff;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.note-tooltip::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 10px;
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.color-palette {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 10000;
}

.color-btn {
  width: 20px;
  height: 20px;
  border: 1px solid #999;
  border-radius: 3px;
  cursor: pointer;
  outline: none;
  padding: 0;
}

.color-btn:hover {
  border: 2px solid #000;
}

.comment-box {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
  width: 240px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-family: Arial, sans-serif;
}

.comment-box textarea {
  width: 100%;
  min-height: 60px;
  padding: 6px;
  resize: vertical;
  font-size: 14px;
  box-sizing: border-box;
}

.comment-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

.comment-actions button {
  padding: 4px 10px;
  font-size: 13px;
  border: none;
  background-color: #eee;
  cursor: pointer;
  border-radius: 4px;
}

.comment-actions button:hover {
  background-color: #ddd;
}

.listening-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.listening-table th {
  background-color: #0077b6;
  color: #fff;
  padding: 12px;
  text-align: center;
  font-weight: bold;
}

.listening-table td {
  border: 1px solid #dee2e6;
  padding: 12px 16px;
  vertical-align: middle;
}

.listening-table input[type="text"] {
  padding: 6px 10px;
  font-size: 15px;
  width: 100px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

