/* ================= 0. RESET CSS & ĐỊNH DẠNG CHUNG ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Be Vietnam Pro", sans-serif;
  background-color: #f5f7fb; /* Nền xám nhạt nhẹ nhàng, dịu mắt */
  color: #2c3e50; /* Màu chữ chính: xanh đen */
  line-height: 1.6;
}

/* ================= 1. MENU CHUNG (Đồng bộ với Trang Chủ) ================= */
.thanh-nav {
  background-color: #ffffff;
  padding: 15px 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Logo chữ phối màu thương hiệu */
.logo a {
  font-family: "Be Vietnam Pro", sans-serif;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -1px;
  text-decoration: none;
  color: #2c3e50;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.logo a .highlight {
  color: #e74c3c;
  margin-left: 6px;
  position: relative;
}

.logo a .highlight::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: 2px;
  width: 5px;
  height: 5px;
  background-color: #f1c40f;
  border-radius: 50%;
}

.logo a:hover {
  transform: scale(1.03);
}

/* Các nút Menu dạng viên thuốc */
.nut-menu a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 20px;
  transition: all 0.3s ease;
  display: inline-block;
}

.nut-menu a.luyendich {
  color: #ffffff;
  background-color: #e74c3c; /* Nút active sáng lên màu đỏ */
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.25);
}

.nut-menu a.trangchu {
  color: #555;
  background-color: transparent;
  margin-right: 10px;
}

.nut-menu a.trangchu:hover {
  background-color: #f0f2f5;
  color: #e74c3c;
}

/* ================= 2. BỐ CỤC KHU VỰC THÂN TRANG (2 CỘT) ================= */
.main-container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  display: flex;
  gap: 30px; /* Khoảng cách giữa Sidebar và Workspace */
  flex-wrap: wrap; /* Tự động xuống hàng trên điện thoại di động */
}

/* --- CỘT TRÁI: DANH SÁCH BÀI HỌC (SIDEBAR) --- */
.sidebar-bai-hoc {
  flex: 1;
  min-width: 280px;
  max-width: 320px;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  align-self: flex-start;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f2f5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.danh-sach-bai {
  list-style: none;
}

.item-bai-hoc {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: #555555;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Trạng thái bài học đang được chọn */
.item-bai-hoc.active-lesson {
  background-color: rgba(231, 76, 60, 0.08); /* Đỏ nhạt */
  color: #e74c3c;
  font-weight: 600;
  border-left: 4px solid #e74c3c;
}

.item-bai-hoc:hover:not(.active-lesson) {
  background-color: #f8f9fa;
  color: #2c3e50;
  padding-left: 20px; /* Hiệu ứng nhích nhẹ sang phải khi di chuột */
}

.so-cau-badge {
  font-size: 11px;
  background-color: #eaeef3;
  color: #7f8c8d;
  padding: 2px 8px;
  border-radius: 10px;
}

.item-bai-hoc.active-lesson .so-cau-badge {
  background-color: #e74c3c;
  color: #ffffff;
}

/* --- CỘT PHẢI: KHU VỰC LUYỆN DỊCH CHÍNH (WORKSPACE) --- */
.workspace-dich {
  flex: 2;
  min-width: 320px;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 35px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Tiêu đề bài học hiện tại */
.ten-bai-hien-tai {
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 25px;
}

/* Thanh tiến trình (Progress Bar) */
.khung-tien-trinh {
  margin-bottom: 30px;
}

.thong-tin-so-cau {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #7f8c8d;
  margin-bottom: 8px;
}

.thanh-ray-ngoai {
  width: 100%;
  height: 8px;
  background-color: #eaeef3;
  border-radius: 4px;
  overflow: hidden;
}

.thanh-chay-trong {
  width: 10%; /* Trạng thái tiến trình chạy (%) */
  height: 100%;
  background-color: #e74c3c;
  border-radius: 4px;
  transition: width 0.4s ease; /* Chuyển động tăng tiến trình mượt mà */
}

/* Hộp hiển thị câu hỏi tiếng Việt */
.hop-tieng-viet {
  background-color: #fdf2f0; /* Nền đỏ cam siêu nhạt, ấm áp */
  border-left: 5px solid #e74c3c;
  padding: 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 25px;
}

.hop-tieng-viet .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #e74c3c;
  font-weight: 700;
  margin-bottom: 6px;
}

.hop-tieng-viet .cau-tieng-viet {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
}

/* Ô văn bản nhập đáp án tiếng Hàn */
.hop-nhap-tieng-han {
  margin-bottom: 25px;
}

.hop-nhap-tieng-han label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #7f8c8d;
  margin-bottom: 8px;
}

.hop-nhap-tieng-han textarea {
  width: 100%;
  height: 120px;
  padding: 16px;
  font-size: 16px;
  font-family: inherit;
  color: #2c3e50;
  border: 2px solid #eaeef3;
  border-radius: 8px;
  outline: none;
  resize: none; /* Khóa không cho người dùng kéo dãn méo hộp */
  transition: all 0.3s ease;
}

/* Trạng thái khi click chuột vào ô gõ chữ */
.hop-nhap-tieng-han textarea:focus {
  border-color: #e74c3c;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.08);
}

/* Cụm nút bấm tương tác bên dưới */
.cum-nut-bam {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Nút Kiểm tra chính màu đỏ */
.btn-check {
  background-color: #e74c3c;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

.btn-check:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

/* Nút Gợi ý màu viền vàng cát */
.btn-hint {
  background-color: #ffffff;
  color: #f1c40f;
  border: 2px solid #f1c40f;
}

.btn-hint:hover {
  background-color: #fdfaf0;
  color: #d4ac0d;
  border-color: #d4ac0d;
}

/* Nút Tiếp theo lùi về bên phải */
.btn-next {
  background-color: #2c3e50;
  color: #ffffff;
  margin-left: auto; /* Tự động đẩy kịch sang lề phải của cụm flex */
}

.btn-next:hover {
  background-color: #1a252f;
  transform: translateY(-2px);
}

/* Hộp gợi ý từ vựng (Ban đầu ẩn đi) */
.hop-goi-y-tu-vung {
  background-color: #fefcf3;
  border-left: 5px solid #f1c40f;
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 25px;
  display: none; /* Trạng thái ẩn mặc định */
}

.title-goi-y {
  font-weight: 700;
  color: #d4ac0d;
  font-size: 13px;
  margin-bottom: 6px;
}

.tu-goi-y {
  font-size: 14px;
  color: #555;
}

/* Hộp kết quả kiểm tra đáp án (Ban đầu ẩn đi) */
.hop-hien-thi-ket-qua {
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
  display: none; /* Trạng thái ẩn mặc định */
}

/* Kết quả đúng: Nút màu xanh lá cây dịu dàng */
.hop-hien-thi-ket-qua.correct {
  background-color: #e8f8f0;
  border-left: 5px solid #2ecc71;
  color: #1e7e34;
}

/* Kết quả sai: Nút màu đỏ cam nhạt */
.hop-hien-thi-ket-qua.incorrect {
  background-color: #fdf3f2;
  border-left: 5px solid #e74c3c;
  color: #bd2130;
}

.status-dich {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dap-an-chuan-title {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 10px;
  margin-bottom: 4px;
  color: #7f8c8d;
}

.cau-dap-an-chuan-text {
  font-size: 16px;
  font-weight: 600;
}
.footer-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1;
  min-width: 250px;
}

/* Cột thương hiệu rộng hơn một chút */
.footer-col.brand-col {
  flex: 1.5;
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

/* Đường gạch ngang nhỏ dưới tiêu đề cột */
.footer-col h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 3px;
  background-color: #e74c3c;
  border-radius: 2px;
}

.footer-col p {
  color: #a6b8c7;
  line-height: 1.8;
  margin-bottom: 15px;
}

/* Logo chữ trong footer */
.footer-logo {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -1px;
  text-decoration: none;
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  margin-bottom: 15px;
}

.footer-logo .highlight {
  color: #e74c3c;
  margin-left: 5px;
}

/* Danh sách liên kết nhanh */
.footer-links-list {
  list-style: none;
}

.footer-links-list li {
  margin-bottom: 12px;
}

.footer-links-list a {
  color: #a6b8c7;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Hiệu ứng trượt nhẹ sang phải và đổi màu khi hover */
.footer-links-list a:hover {
  color: #e74c3c;
  padding-left: 5px;
}

/* Biểu tượng mạng xã hội */
.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: #ffffff;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-btn:hover {
  background-color: #e74c3c;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Thanh bản quyền cuối chân trang */
.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0 auto;
  padding: 25px 20px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  color: #7f8c8d;
  font-size: 13px;
}

.footer-bottom span {
  color: #e74c3c;
  font-weight: 700;
}
/* Responsive cho điện thoại màn hình nhỏ */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column; /* Xếp dọc 2 cột */
  }
  .sidebar-bai-hoc {
    max-width: 100%; /* Giãn cột trái rộng tối đa */
  }
  .btn-next {
    margin-left: 0;
    width: 100%; /* Cho nút tiếp theo tràn hàng ngang */
    justify-content: center;
  }
}
