/* =====================================================
   LESSON PLAYER PAGE - giong vanthemmo.com
   Font Roboto Vietnamese
   ===================================================== */

.lp-body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  background: #f5f6f8;
  margin: 0;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.lp-header {
  height: 54px;
  background: #1f6feb;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.lp-header-back {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  color: #fff; text-decoration: none;
  transition: background .15s;
}
.lp-header-back:hover { background: rgba(255,255,255,.15); color: #fff; }
.lp-header-title {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .85rem;
}
.lp-header-actions a {
  color: #fff; text-decoration: none;
  display: flex; align-items: center; gap: 5px;
}
.lp-header-actions a:hover { opacity: .85; }
.lp-progress-box {
  background: rgba(255,255,255,.15);
  border-radius: 6px;
  padding: 4px 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem;
}
.lp-progress-box strong { font-size: .92rem; }

/* ===== LAYOUT 2 COLUMNS ===== */
.lp-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  min-height: calc(100vh - 54px);
}

@media (max-width: 991px) {
  .lp-layout { grid-template-columns: 1fr; }
}

/* ===== MAIN: VIDEO + INFO + TABS ===== */
.lp-main { background: #fff; }

.lp-video-wrap {
  background: #000;
  aspect-ratio: 16/9;
  position: relative;
  max-height: 75vh;
}
.lp-video-wrap iframe {
  width: 100%; height: 100%;
  border: 0;
}
.lp-video-no { color: #fff; display: flex; align-items: center; justify-content: center; height: 100%; flex-direction: column; gap: 12px; }

.lp-info-panel {
  padding: 20px 24px;
  border-bottom: 1px solid #eef0f4;
}
.lp-lesson-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}
.lp-nav-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.lp-nav-btn {
  padding: 7px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: .88rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.lp-nav-btn:hover:not(:disabled) { background: #f5f7fa; color: #1f6feb; border-color: #1f6feb; }
.lp-nav-btn.primary { background: #1f6feb; color: #fff; border-color: #1f6feb; }
.lp-nav-btn.primary:hover { background: #1858c4; color: #fff; }
.lp-nav-btn:disabled, .lp-nav-btn[aria-disabled='true'] { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ===== TABS ===== */
.lp-tabs {
  display: flex;
  gap: 28px;
  padding: 0 24px;
  border-bottom: 1px solid #eef0f4;
  background: #fff;
}
.lp-tab {
  padding: 14px 0;
  color: #64748b;
  font-weight: 500;
  font-size: .92rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.lp-tab:hover { color: #1f6feb; }
.lp-tab.active { color: #1f6feb; border-bottom-color: #1f6feb; font-weight: 600; }

.lp-tab-content {
  padding: 24px;
  min-height: 200px;
}

/* Discussion form */
.lp-discuss-form {
  margin-top: 20px;
  padding: 16px;
  background: #fafbfc;
  border: 1px solid #eef0f4;
  border-radius: 10px;
}
.lp-discuss-form .form-control {
  border: 1px solid #e6e8ec;
  resize: vertical;
}
.lp-discuss-form .form-control:focus {
  border-color: #1f6feb;
  box-shadow: 0 0 0 .15rem rgba(31,111,235,.15);
}

.lp-comment {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}
.lp-comment-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f6feb, #16a34a);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.lp-comment-body { flex: 1; }
.lp-comment-name { font-weight: 600; font-size: .9rem; }
.lp-comment-time { color: #94a3b8; font-size: .75rem; margin-left: 8px; }
.lp-comment-text { color: #334155; font-size: .9rem; margin-top: 4px; }

/* Documents list */
.lp-doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
  transition: all .15s;
}
.lp-doc-item:hover { border-color: #1f6feb; background: #f8faff; }
.lp-doc-icon {
  width: 40px; height: 40px;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.lp-doc-info { flex: 1; min-width: 0; }
.lp-doc-info strong { display: block; font-size: .92rem; }
.lp-doc-info small { color: #94a3b8; font-size: .78rem; }
.lp-doc-action .btn { padding: 6px 14px; font-size: .85rem; }

/* ===== RIGHT SIDEBAR ===== */
.lp-sidebar {
  background: #fff;
  border-left: 1px solid #eef0f4;
  overflow-y: auto;
  max-height: calc(100vh - 54px);
}
.lp-sidebar-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #eef0f4;
}
.lp-sidebar-head h6 {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.lp-sidebar-search {
  position: relative;
}
.lp-sidebar-search input {
  width: 100%;
  border: 1px solid #e6e8ec;
  border-radius: 8px;
  padding: 8px 12px 8px 36px;
  font-size: .88rem;
}
.lp-sidebar-search i {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.lp-sec {
  border-bottom: 1px solid #eef0f4;
}
.lp-sec-head {
  padding: 12px 18px;
  display: flex; align-items: center; gap: 8px;
  background: #fafbfc;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  color: #1a1a1a;
  user-select: none;
}
.lp-sec-head i.toggle-icon {
  margin-left: auto;
  color: #94a3b8;
  transition: transform .2s;
  font-size: .8rem;
}
.lp-sec.collapsed .toggle-icon { transform: rotate(-90deg); }
.lp-sec.collapsed .lp-sec-body { display: none; }

.lp-sec-body { padding: 4px 0; }

.lp-lesson-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px 9px 32px;
  text-decoration: none;
  color: #334155;
  font-size: .86rem;
  transition: background .15s;
  border-left: 3px solid transparent;
}
.lp-lesson-item:hover { background: #f5f7fa; color: #1f6feb; }
.lp-lesson-item.active { background: rgba(31,111,235,.08); color: #1f6feb; border-left-color: #1f6feb; font-weight: 600; }
.lp-lesson-item .lesson-radio {
  width: 16px; height: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.lp-lesson-item.done .lesson-radio {
  background: #16a34a;
  border-color: #16a34a;
}
.lp-lesson-item.done .lesson-radio::after {
  content: '\F26E';  /* bi-check */
  font-family: 'bootstrap-icons';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: .68rem;
}
.lp-lesson-title-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lp-lesson-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  font-size: .73rem;
  color: #94a3b8;
  padding-left: 32px;
}
.lp-lesson-meta i { font-size: .85rem; }

/* ===== v108b: Lesson card VERTICAL - thumbnail nhỏ ở trên, tiêu đề + meta xuống dòng dưới ===== */
.lp-sec-head-main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lp-sec-title { font-weight: 700; font-size: .92rem; color: #1a1a1a; line-height: 1.3; }
.lp-sec-meta-line { font-size: .72rem; color: #64748b; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lp-sec-meta-line .lp-sec-dot { margin: 0 2px; color: #cbd5e1; }
.lp-sec-meta-line i { font-size: .78rem; }

.lp-lesson-card {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 14px 6px;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.lp-lesson-card.active { background: #fff7e6; border-left-color: #f59e0b; }
.lp-lesson-card.active .lp-lesson-title-text { color: #b45309; font-weight: 700; }
.lp-lesson-card.done .lp-lesson-title-text { color: #16a34a; }
.lp-lesson-card:hover { background: #f8fafc; }
.lp-lesson-card:hover .lp-lesson-thumb img { transform: scale(1.02); }

.lp-lesson-thumb {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 16 / 9;
  background: #1e293b;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  align-self: flex-start;
}
.lp-lesson-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .22s ease; }
.lp-lesson-thumb.no-thumb { background: linear-gradient(135deg, #334155 0%, #1e293b 100%); }
.lp-lesson-thumb.no-thumb::before {
  content: '\F4F4';
  font-family: 'bootstrap-icons';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.4); font-size: 32px;
}
.lp-lesson-index {
  position: absolute; top: 6px; left: 6px;
  background: rgba(15,23,42,.88); color: #fbbf24;
  font-size: .7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  line-height: 1.3;
}
.lp-lesson-dur {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,.82); color: #fff;
  font-size: .72rem; font-weight: 600;
  padding: 2px 7px; border-radius: 4px;
  display: flex; align-items: center; gap: 3px;
  line-height: 1.3;
}
.lp-lesson-dur i { font-size: .72rem; }
.lp-lesson-done-badge {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #16a34a; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .92rem;
  box-shadow: 0 2px 6px rgba(22,163,74,.35);
}

.lp-lesson-info {
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 0 2px;
}
.lp-lesson-card .lp-lesson-title-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.4;
  font-size: .92rem;
  font-weight: 700;
  color: #1e293b;
}

.lp-lesson-meta-extra {
  padding: 0 14px 12px 14px;  /* căn trái cùng padding với card (14px) */
  margin-top: 2px;
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}
.lp-lesson-meta-extra:empty { display: none; }

/* Section body: tách các card bằng đường mỏng */
.lp-sec-body .lp-lesson-card + .lp-lesson-meta-extra { border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; }
.lp-sec-body .lp-lesson-card { border-bottom: 1px solid #f1f5f9; }
.lp-sec-body .lp-lesson-card:last-child,
.lp-sec-body .lp-lesson-meta-extra:last-child { border-bottom: none; }

/* Anti-screen capture overlay */
.lp-no-click {
  position: absolute;
  top: 38px; right: 0;
  width: 130px; height: 36px;
  background: transparent;
  z-index: 10;
  pointer-events: auto;
}

/* =====================================================
   V11 - Player giống giao diện video mẫu: mở/ẩn nội dung khóa học
   ===================================================== */
.lp-body {
  --lp-sidebar-width: 380px;
}
.lp-layout {
  grid-template-columns: minmax(0, 1fr) var(--lp-sidebar-width) !important;
  background: #000;
  align-items: start;
}
.lp-main {
  min-width: 0;
  background: #fff;
}
.lp-video-wrap {
  background: #000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: calc(100vh - 54px);
}
.lp-video-wrap iframe {
  display: block;
  background: #000;
}
.lp-body.lp-sidebar-closed .lp-layout {
  grid-template-columns: minmax(0, 1fr) !important;
}
.lp-body.lp-sidebar-closed .lp-sidebar {
  display: none;
}
.lp-sidebar {
  width: var(--lp-sidebar-width);
  height: calc(100vh - 54px);
  max-height: calc(100vh - 54px) !important;
  overflow-y: auto;
  position: sticky;
  top: 54px;
  z-index: 50;
  box-shadow: -8px 0 18px rgba(15, 23, 42, .06);
}
.lp-sidebar-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding: 18px 18px 14px !important;
}
.lp-sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.lp-sidebar-title-row h6 {
  margin: 0 !important;
  font-size: 1.05rem !important;
  color: #0f172a;
}
.lp-sidebar-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .16s ease;
}
.lp-sidebar-close:hover {
  color: #1f6feb;
  background: #edf5ff;
}
.lp-sidebar-search input {
  height: 40px;
  border-radius: 8px !important;
  background: #fff;
}
.lp-sec {
  border-bottom: 1px solid #edf2f7 !important;
}
.lp-sec-head {
  padding: 14px 18px !important;
  background: #fff !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}
.lp-sec-body {
  padding: 0 0 8px !important;
}
.lp-lesson-item {
  margin: 0;
  padding: 12px 18px !important;
  border-left: 0 !important;
  gap: 10px !important;
  color: #334155 !important;
  font-weight: 500;
}
.lp-lesson-item.active {
  background: #eaf3ff !important;
  color: #0f172a !important;
  font-weight: 600;
}
.lp-lesson-item:hover {
  background: #f3f7ff !important;
}
.lp-lesson-meta {
  padding: 0 18px 10px 48px !important;
  margin-top: -5px !important;
}
.lp-lesson-item.active + .lp-lesson-meta {
  background: #eaf3ff;
}
.lp-floating-content-btn {
  display: none;
  position: fixed;
  right: 14px;
  top: 108px;
  z-index: 120;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(0,0,0,.72);
  color: #fff;
  border-radius: 6px;
  padding: 9px 12px;
  gap: 8px;
  align-items: center;
  font-size: .86rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.lp-floating-content-btn:hover {
  background: rgba(31,111,235,.95);
}
.lp-body.lp-sidebar-closed .lp-floating-content-btn {
  display: inline-flex;
}
.lp-info-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px !important;
}
.lp-lesson-title {
  margin: 0 !important;
  flex: 1;
}
.lp-nav-btns {
  flex-shrink: 0;
}

@media (min-width: 1200px) {
  .lp-body.lp-sidebar-open .lp-video-wrap {
    min-height: min(72vh, 720px);
  }
  .lp-body.lp-sidebar-closed .lp-video-wrap {
    min-height: min(76vh, 760px);
  }
}

@media (max-width: 991.98px) {
  .lp-layout {
    display: block !important;
    min-height: calc(100vh - 54px);
  }
  .lp-header {
    height: auto;
    min-height: 54px;
    padding: 8px 10px;
    gap: 8px;
  }
  .lp-header-title {
    font-size: .9rem;
  }
  .lp-header-actions {
    gap: 8px;
  }
  .lp-header-actions > a {
    display: none;
  }
  .lp-progress-box {
    padding: 4px 8px;
  }
  .lp-sidebar {
    display: block !important;
    position: fixed;
    top: 54px;
    right: 0;
    width: min(92vw, 380px);
    height: calc(100vh - 54px);
    max-height: calc(100vh - 54px) !important;
    transform: translateX(0);
    transition: transform .22s ease;
    z-index: 200;
    box-shadow: -12px 0 32px rgba(15,23,42,.22);
  }
  .lp-body.lp-sidebar-closed .lp-sidebar {
    transform: translateX(104%);
  }
  .lp-body.lp-sidebar-open::before {
    content: '';
    position: fixed;
    inset: 54px 0 0 0;
    background: rgba(15,23,42,.32);
    z-index: 180;
  }
  .lp-floating-content-btn {
    right: 8px;
    top: 76px;
    padding: 8px 10px;
    font-size: .8rem;
  }
  .lp-floating-content-btn span {
    display: none;
  }
  .lp-info-panel {
    display: block;
    padding: 16px !important;
  }
  .lp-lesson-title {
    font-size: 1rem;
    margin-bottom: 12px !important;
  }
  .lp-nav-btns {
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .lp-nav-btn {
    white-space: nowrap;
    padding: 7px 10px;
  }
  .lp-tabs {
    overflow-x: auto;
    gap: 20px;
    padding: 0 16px;
  }
  .lp-tab-content {
    padding: 16px;
  }
  .lp-video-wrap {
    max-height: none;
    aspect-ratio: 16/9;
  }
}

/* =====================================================
   V12 - Player học viên gọn, không lộ link/nút YouTube
   ===================================================== */
.lp-video-wrap {
  background: #000 !important;
  overflow: hidden !important;
}
.lp-youtube-secure-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: #000;
  overflow: hidden;
  display: block;
}
.lp-youtube-player,
.lp-youtube-player iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block !important;
  background: #000 !important;
}
/* Không cho học viên click trực tiếp vào iframe YouTube để mở logo/link YouTube */
.lp-youtube-player iframe {
  pointer-events: none !important;
}
.lp-youtube-mask {
  position: absolute;
  z-index: 12;
  pointer-events: auto;
}
.lp-mask-top {
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: linear-gradient(to bottom, rgba(0,0,0,.72), rgba(0,0,0,0));
}
.lp-mask-bottom-right {
  right: 0;
  bottom: 0;
  width: min(34%, 260px);
  height: 86px;
  background: linear-gradient(135deg, rgba(0,0,0,0), rgba(0,0,0,.72));
}
.lp-center-play {
  position: absolute;
  z-index: 24;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: #0ea5e9;
  color: #fff;
  font-size: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 36px rgba(0,0,0,.28);
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
}
.lp-center-play:hover {
  background: #1f6feb;
  transform: translate(-50%, -50%) scale(1.06);
}
.lp-youtube-secure-shell.is-playing .lp-center-play {
  opacity: 0;
  pointer-events: none;
}
.lp-youtube-secure-shell:hover .lp-youtube-controls,
.lp-youtube-secure-shell:not(.is-playing) .lp-youtube-controls {
  opacity: 1;
  transform: translateY(0);
}
.lp-youtube-controls {
  position: absolute;
  z-index: 25;
  left: 14px;
  right: 14px;
  bottom: 12px;
  min-height: 42px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, .82);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.lp-control-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lp-control-btn:hover {
  background: rgba(255,255,255,.22);
}
.lp-progress-range {
  flex: 1;
  min-width: 80px;
  accent-color: #1f6feb;
}
.lp-time-current,
.lp-time-duration {
  min-width: 42px;
  color: rgba(255,255,255,.9);
  font-size: .82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
/* Bỏ overlay cũ vì V12 đã khóa click YouTube bằng player riêng */
.lp-no-click { display: none !important; }

@media (min-width: 992px) {
  .lp-video-wrap {
    aspect-ratio: auto !important;
    height: clamp(520px, calc(100vh - 186px), 820px) !important;
    max-height: none !important;
  }
  .lp-body.lp-sidebar-open .lp-video-wrap,
  .lp-body.lp-sidebar-closed .lp-video-wrap {
    min-height: 0 !important;
  }
  .lp-main {
    background: #fff !important;
  }
  .lp-layout {
    align-items: stretch !important;
  }
}

@media (max-width: 991.98px) {
  .lp-youtube-secure-shell {
    min-height: auto;
  }
  .lp-center-play {
    width: 54px;
    height: 54px;
    font-size: 1.75rem;
  }
  .lp-youtube-controls {
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 14px;
    padding: 7px 8px;
    gap: 7px;
  }
  .lp-control-btn {
    width: 30px;
    height: 30px;
  }
  .lp-time-current,
  .lp-time-duration {
    min-width: 34px;
    font-size: .72rem;
  }
  .lp-mask-top { height: 42px; }
  .lp-mask-bottom-right { height: 62px; width: 42%; }
}
@media (hover: none) {
  .lp-youtube-controls {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* ============ QUALITY SELECTOR (gắn vào icon ⚙️) ============ */
.lp-quality-box {
  position: relative;
  display: inline-flex;
}
.lp-quality-menu {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  background: rgba(20, 23, 28, .96);
  border-radius: 10px;
  padding: 6px 0;
  min-width: 200px;
  z-index: 50;
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
}
.lp-quality-menu.show {
  display: block;
  animation: lpFadeIn .15s ease-out;
}
@keyframes lpFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.lp-quality-title {
  color: #94a3b8;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 4px;
  font-weight: 700;
}
.lp-quality-divider {
  height: 1px;
  background: rgba(255,255,255,.12);
  margin: 8px 0 6px;
}
.lp-quality-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  background: transparent;
  border: 0;
  color: #e2e8f0;
  font-size: .88rem;
  padding: 9px 14px;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  transition: background .12s;
}
.lp-quality-menu button:hover { background: rgba(255,255,255,.08); }
.lp-quality-menu button.active {
  color: #4da3ff;
  font-weight: 800;
}
.lp-quality-menu button.active::after {
  content: '\F26E';
  font-family: 'bootstrap-icons';
  margin-left: auto;
  font-size: .95rem;
}
.q-tag {
  margin-left: 8px;
  background: rgba(255,255,255,.08);
  color: #94a3b8;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .5px;
}
.q-tag-hot {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}

/* ============ MOBILE: tab Thảo luận cuối + Quality compact ============ */
@media (max-width: 767.98px) {
  /* Tabs scrollable ngang */
  .lp-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px;
    gap: 16px;
  }
  .lp-tabs::-webkit-scrollbar { display: none; }
  .lp-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 12px 0;
    font-size: .88rem;
  }

  /* Quality menu compact - grid 2 cột */
  .lp-quality-menu {
    min-width: 170px;
    right: -6px;
    padding: 6px 0;
  }
  .lp-quality-menu button {
    padding: 8px 12px;
    font-size: .82rem;
  }
  .lp-quality-title { font-size: .65rem; padding: 6px 12px 6px; }
  .q-tag { font-size: .62rem; padding: 1px 5px; margin-left: 6px; }
}

/* Mobile rất nhỏ: tránh tràn khung video */
@media (max-width: 420px) {
  .lp-quality-menu {
    min-width: 156px;
    right: 0;
    bottom: calc(100% + 6px);
  }
}

/* =====================================================
   V13: Quality dropdown compact + sidebar document download
   ===================================================== */
.lp-quality-box { position: relative !important; display: inline-flex !important; }
.lp-quality-menu {
  display: block !important;
  position: absolute !important;
  right: 0 !important;
  bottom: calc(100% + 10px) !important;
  width: 178px !important;
  min-width: 178px !important;
  max-width: 178px !important;
  padding: 6px !important;
  margin: 0 !important;
  background: rgba(15, 23, 42, .98) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 42px rgba(0,0,0,.45) !important;
  z-index: 80 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(8px) scale(.98) !important;
  transition: opacity .12s ease, transform .12s ease, visibility .12s ease !important;
  backdrop-filter: blur(10px) !important;
}
.lp-quality-menu.show,
.lp-quality-menu.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}
.lp-quality-title {
  color: #cbd5e1 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  padding: 7px 9px 8px !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  margin: 0 0 4px !important;
  font-weight: 800 !important;
}
.lp-quality-menu button[data-lp-quality] {
  all: unset;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  min-height: 32px !important;
  padding: 8px 9px !important;
  border-radius: 8px !important;
  color: #e5edf7 !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}
.lp-quality-menu button[data-lp-quality]:hover { background: rgba(255,255,255,.09) !important; }
.lp-quality-menu button[data-lp-quality].active { background: rgba(37, 99, 235, .20) !important; color: #7db8ff !important; }
.lp-quality-menu button[data-lp-quality].active::after {
  content: '\F26E';
  font-family: 'bootstrap-icons';
  margin-left: auto;
  font-size: 13px;
}
.lp-quality-menu .q-tag {
  margin-left: auto !important;
  border-radius: 999px !important;
  padding: 2px 6px !important;
  background: rgba(148, 163, 184, .16) !important;
  color: #cbd5e1 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}
.lp-quality-menu .q-tag-hot { background: linear-gradient(135deg, #f59e0b, #ef4444) !important; color: #fff !important; }

.lp-doc-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 0;
  color: #1f6feb;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.lp-doc-count:hover { text-decoration: underline; }
.lp-sidebar-doc-list {
  display: none;
  margin: -2px 16px 10px 42px;
  padding: 8px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
}
.lp-sidebar-doc-list.open { display: grid; gap: 6px; }
.lp-sidebar-doc-list a {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 7px;
  border-radius: 7px;
  color: #1e3a5f;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.lp-sidebar-doc-list a:hover { background: #eaf3ff; color: #0b66d8; }
.lp-sidebar-doc-list a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-sidebar-doc-list a small { color: #64748b; font-weight: 600; }
.lp-duration-meta { white-space: nowrap; }

@media (max-width: 767.98px) {
  .lp-quality-menu {
    right: -8px !important;
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    bottom: calc(100% + 8px) !important;
  }
  .lp-quality-menu button[data-lp-quality] { min-height: 30px !important; font-size: 12px !important; padding: 7px 8px !important; }
  .lp-quality-title { font-size: 10px !important; padding: 6px 8px 7px !important; }
  .lp-quality-menu .q-tag { font-size: 9px !important; padding: 2px 5px !important; }
  .lp-sidebar-doc-list { margin-left: 34px; margin-right: 10px; }
}

/* =====================================================
   V15: Quality menu ẩn mặc định + nút tài liệu gọn
   ===================================================== */
.lp-quality-box {
  position: relative !important;
  display: inline-flex !important;
}
.lp-quality-menu,
.lp-quality-menu:not(.show):not(.is-open),
.lp-quality-menu[hidden] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.lp-quality-menu.show,
.lp-quality-menu.is-open {
  display: flex !important;
  flex-direction: column !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  position: absolute !important;
  right: 0 !important;
  bottom: calc(100% + 10px) !important;
  width: 184px !important;
  min-width: 184px !important;
  max-width: 184px !important;
  padding: 7px !important;
  margin: 0 !important;
  background: rgba(15, 23, 42, .98) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.48) !important;
  z-index: 9999 !important;
  transform: translateY(0) scale(1) !important;
  backdrop-filter: blur(10px) !important;
}
.lp-quality-menu button[data-lp-quality] {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #e5edf7 !important;
  min-height: 32px !important;
  border-radius: 9px !important;
  padding: 8px 9px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}
.lp-quality-menu button[data-lp-quality]:hover { background: rgba(255,255,255,.09) !important; }
.lp-quality-menu button[data-lp-quality].active { background: rgba(37,99,235,.22) !important; color: #93c5fd !important; }
.lp-quality-title {
  color: #cbd5e1 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  padding: 7px 9px 8px !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  margin-bottom: 4px !important;
}

.lp-doc-pack {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 520px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff, #eef6ff);
  box-shadow: 0 8px 22px rgba(37, 99, 235, .08);
}
.lp-doc-pack-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex: 0 0 auto;
}
.lp-doc-pack-info {
  flex: 1;
  min-width: 0;
}
.lp-doc-pack-info strong {
  display: block;
  color: #0f172a;
  font-size: .95rem;
}
.lp-doc-pack-info small {
  color: #64748b;
  font-size: .8rem;
}
.lp-doc-gradient-btn,
.lp-doc-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  text-decoration: none;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff !important;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(37,99,235,.22);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.lp-doc-gradient-btn {
  min-height: 36px;
  padding: 8px 14px;
  font-size: .86rem;
}
.lp-doc-pill {
  min-height: 24px;
  padding: 4px 10px;
  font-size: .73rem;
  line-height: 1;
}
.lp-doc-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  font-size: .68rem;
}
.lp-doc-gradient-btn:hover,
.lp-doc-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37,99,235,.28);
  opacity: .96;
}
/* Ẩn giao diện tài liệu cũ để không còn link dài trong sidebar */
.lp-sidebar-doc-list { display: none !important; }

@media (max-width: 767.98px) {
  .lp-quality-menu.show,
  .lp-quality-menu.is-open {
    width: 164px !important;
    min-width: 164px !important;
    max-width: 164px !important;
    right: -4px !important;
    bottom: calc(100% + 8px) !important;
    padding: 6px !important;
  }
  .lp-quality-menu button[data-lp-quality] {
    min-height: 30px !important;
    padding: 7px 8px !important;
    font-size: 12px !important;
  }
  .lp-doc-pack {
    max-width: none;
    padding: 12px;
  }
  .lp-doc-pack-icon {
    width: 40px;
    height: 40px;
  }
  .lp-doc-gradient-btn {
    padding: 8px 12px;
    font-size: .82rem;
  }
}

/* =====================================================
   V16: Tab bài học chuyển trong trang, không tải lại web
   ===================================================== */
.lp-tab-pane {
  display: none;
}
.lp-tab-pane.active {
  display: block;
}
.lp-tab[role="tab"] {
  user-select: none;
}

/* ===== V36 targeted fix: lesson player spacing + mobile clean ===== */
.lp-main,
.lp-player-area,
.lp-player-stage {
  min-width: 0;
}
.lp-video-wrap,
.lp-youtube-secure-shell,
.lp-local-secure-shell {
  min-height: 0 !important;
  aspect-ratio: 16 / 9;
}
.lp-video-wrap iframe,
.lp-youtube-secure-shell iframe,
.lp-local-secure-shell video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  display: block;
}
.lp-quality-menu:not(.show):not(.is-open) {
  display: none !important;
}
.lp-doc-pack,
.lp-doc-gradient-btn,
.lp-doc-pill {
  text-decoration: none !important;
}
@media (min-width: 992px) {
  .lp-body.lp-sidebar-open .lp-video-wrap,
  .lp-body.lp-sidebar-closed .lp-video-wrap {
    max-height: calc(100vh - 155px);
  }
  .lp-body.lp-sidebar-open .lp-main {
    width: 100% !important;
  }
}
@media (max-width: 991.98px) {
  .lp-body {
    overflow-x: hidden;
  }
  .lp-topbar {
    gap: 8px;
    padding: 8px 10px;
  }
  .lp-course-title {
    font-size: 14px;
    line-height: 1.25;
  }
  .lp-actions {
    gap: 6px;
  }
  .lp-video-wrap,
  .lp-youtube-secure-shell,
  .lp-local-secure-shell {
    width: 100% !important;
    max-height: none !important;
  }
  .lp-lesson-foot {
    flex-wrap: wrap;
    gap: 8px;
  }
  .lp-doc-gradient-btn {
    min-height: 34px;
  }
}
@media (max-width: 575.98px) {
  .lp-topbar {
    align-items: flex-start;
  }
  .lp-right-progress {
    font-size: 11px;
    padding: 6px 8px;
  }
  .lp-lesson-title {
    font-size: 15px;
  }
  .lp-bottom-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .lp-tab {
    flex: 0 0 auto;
  }
}

/* =====================================================
   V37: sửa khoảng đen bên phải player khi mở sidebar nội dung
   Nguyên nhân: v36 đã trừ width sidebar thêm một lần cho .lp-main
   trong khi .lp-layout đã chia grid 1fr + sidebar rồi.
   ===================================================== */
@media (min-width: 992px) {
  .lp-body.lp-sidebar-open .lp-main,
  .lp-body.lp-sidebar-closed .lp-main {
    width: 100% !important;
    max-width: 100% !important;
  }
  .lp-layout {
    background: #fff !important;
  }
  .lp-body.lp-sidebar-open .lp-video-wrap,
  .lp-body.lp-sidebar-closed .lp-video-wrap {
    width: 100% !important;
  }
}

/* =====================================================
   V38: Mobile-only auto hide custom YouTube controls
   Chỉ mobile: thanh điều khiển tự ẩn khi video đang chạy.
   Desktop giữ nguyên.
   ===================================================== */
@media (max-width: 991.98px) and (hover: none) {
  .lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-youtube-controls {
    opacity: 0 !important;
    transform: translateY(14px) !important;
    pointer-events: none !important;
  }
  .lp-youtube-secure-shell.controls-visible .lp-youtube-controls,
  .lp-youtube-secure-shell:not(.is-playing) .lp-youtube-controls,
  .lp-youtube-secure-shell.is-quality-open .lp-youtube-controls {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }
  .lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-mask-bottom-right {
    opacity: 0;
  }
}

/* =====================================================
   V39: Khóa lại player YouTube trên web/mobile
   - Chặn click trực tiếp vào iframe để không mở Share/YouTube.
   - Che các vùng native UI của YouTube: share/logo/title overlay.
   - Mobile: bỏ mảng đen dư bên dưới nội dung bài học.
   ===================================================== */
.lp-youtube-click-guard {
  position: absolute;
  inset: 0;
  z-index: 14;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}
.lp-youtube-mask {
  z-index: 16;
  pointer-events: none !important;
}
.lp-youtube-controls,
.lp-center-play,
.lp-floating-content-btn,
.lp-quality-menu {
  z-index: 30;
}
.lp-mask-top {
  height: 72px !important;
  background: linear-gradient(to bottom, rgba(0,0,0,.86) 0%, rgba(0,0,0,.56) 52%, rgba(0,0,0,0) 100%) !important;
}
.lp-mask-bottom-left {
  left: 0;
  bottom: 0;
  width: min(36%, 280px);
  height: 86px;
  background: linear-gradient(45deg, rgba(0,0,0,.86) 0%, rgba(0,0,0,.56) 45%, rgba(0,0,0,0) 100%);
}
.lp-mask-bottom-right {
  opacity: 1 !important;
  width: min(42%, 320px) !important;
  height: 96px !important;
  background: linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.62) 46%, rgba(0,0,0,.9) 100%) !important;
}
.lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-mask-bottom-right,
.lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-mask-bottom-left,
.lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-mask-top {
  opacity: 1 !important;
}
@media (max-width: 991.98px) {
  html,
  body,
  .lp-body,
  .lp-layout,
  .lp-main,
  .lp-tab-content {
    background: #fff !important;
  }
  .lp-layout {
    min-height: auto !important;
  }
  .lp-tab-content {
    min-height: 0 !important;
    padding-bottom: 18px !important;
  }
  .lp-mask-top {
    height: 50px !important;
  }
  .lp-mask-bottom-left {
    width: 38%;
    height: 70px;
  }
  .lp-mask-bottom-right {
    width: 44% !important;
    height: 74px !important;
  }
}

/* =====================================================
   V40: Mobile/Web - bỏ khung đen/xám che YouTube quá to
   - Giữ lớp chặn click toàn player để không mở Share/YouTube.
   - Không dùng mảng mask tối màu lớn gây xấu giao diện.
   - Dọn nền đen dư dưới nội dung trên mobile.
   ===================================================== */
.lp-youtube-click-guard {
  position: absolute !important;
  inset: 0 !important;
  z-index: 18 !important;
  background: transparent !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}
.lp-youtube-mask,
.lp-mask-top,
.lp-mask-bottom-left,
.lp-mask-bottom-right {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-youtube-mask,
.lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-mask-bottom-right,
.lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-mask-bottom-left,
.lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-mask-top {
  opacity: 0 !important;
}
.lp-youtube-player iframe {
  pointer-events: none !important;
}
@media (max-width: 991.98px) {
  html,
  body,
  main.main-content,
  .lp-body,
  .lp-layout,
  .lp-main,
  .lp-info-panel,
  .lp-tabs,
  .lp-tab-content {
    background: #fff !important;
  }
  .lp-body,
  .lp-layout,
  .lp-main {
    min-height: 0 !important;
    height: auto !important;
  }
  .lp-tab-content {
    min-height: 0 !important;
    padding-bottom: 18px !important;
  }
  nav.main-navbar,
  footer,
  .footer {
    display: none !important;
  }
}

/* =====================================================
   V41: Web + mobile - chặn Share/YouTube và tự ẩn control
   - Click guard phủ toàn bộ iframe để học viên không bấm được link YouTube/Share.
   - Thanh điều khiển tự ẩn sau 2-3 giây khi video đang chạy trên web và mobile.
   - Khi ẩn control sẽ ẩn luôn con trỏ trong vùng video.
   ===================================================== */
.lp-youtube-player,
.lp-youtube-player iframe {
  z-index: 1 !important;
  pointer-events: none !important;
}
.lp-youtube-click-guard {
  position: absolute !important;
  inset: 0 !important;
  z-index: 55 !important;
  background: rgba(255,255,255,0.001) !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}
.lp-youtube-controls,
.lp-center-play,
.lp-quality-menu {
  z-index: 80 !important;
}
.lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open) .lp-youtube-controls {
  opacity: 0 !important;
  transform: translateY(18px) !important;
  pointer-events: none !important;
}
.lp-youtube-secure-shell.controls-visible .lp-youtube-controls,
.lp-youtube-secure-shell:not(.is-playing) .lp-youtube-controls,
.lp-youtube-secure-shell.is-quality-open .lp-youtube-controls {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}
.lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open),
.lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open) .lp-youtube-click-guard,
.lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open) .lp-youtube-player,
.lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open) .lp-youtube-player iframe {
  cursor: none !important;
}
.lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open) .lp-center-play {
  opacity: 0 !important;
  pointer-events: none !important;
}
@media (min-width: 992px) {
  .lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open):hover .lp-youtube-controls {
    opacity: 0 !important;
    transform: translateY(18px) !important;
    pointer-events: none !important;
  }
  .lp-youtube-secure-shell.is-playing.controls-visible:hover .lp-youtube-controls,
  .lp-youtube-secure-shell.is-quality-open:hover .lp-youtube-controls,
  .lp-youtube-secure-shell:not(.is-playing):hover .lp-youtube-controls {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }
}

/* =====================================================
   V42: Web - nút mở nội dung khóa học phải bấm được, gọn dạng icon
   - Không để lớp chặn YouTube đè lên nút mở sidebar.
   - Nút chỉ còn icon nhỏ trên web/mobile, không hiện chữ dài.
   ===================================================== */
.lp-floating-content-btn {
  z-index: 10050 !important;
  pointer-events: auto !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  border-radius: 12px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  background: rgba(15, 23, 42, .72) !important;
  border: 1px solid rgba(255, 255, 255, .38) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.22) !important;
  backdrop-filter: blur(8px);
}
.lp-floating-content-btn span {
  display: none !important;
}
.lp-floating-content-btn i {
  font-size: 1.22rem !important;
  line-height: 1 !important;
}
.lp-floating-content-btn:hover,
.lp-floating-content-btn:focus {
  background: rgba(31, 111, 235, .92) !important;
  color: #fff !important;
  outline: none !important;
}
.lp-youtube-click-guard {
  z-index: 55 !important;
}
.lp-youtube-controls,
.lp-center-play,
.lp-quality-menu {
  z-index: 80 !important;
}
@media (min-width: 992px) {
  .lp-floating-content-btn {
    right: 18px !important;
    top: 92px !important;
  }
}

/* =====================================================
   V43: Web - đưa nút Nội dung khóa học lên thanh tiêu đề,
   thay vị trí Đánh giá khóa học và bỏ nút nổi trên video.
   ===================================================== */
.lp-header-content-btn {
  border: 1px solid rgba(255,255,255,.38) !important;
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
  border-radius: 10px !important;
  height: 38px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: background .16s ease, transform .16s ease, border-color .16s ease !important;
}
.lp-header-content-btn:hover,
.lp-header-content-btn:focus {
  background: rgba(255,255,255,.24) !important;
  border-color: rgba(255,255,255,.62) !important;
  color: #fff !important;
  outline: none !important;
}
.lp-header-content-btn:active {
  transform: translateY(1px) !important;
}
.lp-header-content-btn i {
  font-size: 1.06rem !important;
  line-height: 1 !important;
}
.lp-header-content-btn.is-open {
  background: rgba(255,255,255,.26) !important;
}
.lp-floating-content-btn {
  display: none !important;
}
@media (max-width: 991.98px) {
  .lp-header-actions {
    gap: 6px !important;
  }
  .lp-header-content-btn {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }
  .lp-header-content-btn span {
    display: none !important;
  }
}

/* =====================================================
   V44: header nút nội dung khóa học nhẹ, tiến độ chuyển xuống dưới
   ===================================================== */
.lp-header-content-btn {
  background: linear-gradient(135deg, #ffffff, #f3f7ff) !important;
  color: #0f172a !important;
  border: 1px solid rgba(255,255,255,.92) !important;
  box-shadow: 0 6px 16px rgba(15,23,42,.12) !important;
}
.lp-header-content-btn:hover,
.lp-header-content-btn:focus,
.lp-header-content-btn.is-open {
  background: linear-gradient(135deg, #fff7ed, #ffffff) !important;
  color: #0f172a !important;
  border-color: rgba(255,255,255,.98) !important;
}
.lp-progress-inline {
  color: #0f172a !important;
  background: linear-gradient(135deg, #f8fbff, #edf7ff) !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 8px 18px rgba(37,99,235,.08) !important;
  min-height: 40px !important;
  padding: 6px 12px !important;
  flex-shrink: 0 !important;
}
.lp-progress-inline i { color: #2563eb !important; }
.lp-progress-label { font-size: .72rem; opacity: .72; line-height: 1; }
.lp-progress-inline strong { color: #0f172a !important; font-size: .86rem !important; }
@media (min-width: 992px) {
  .lp-nav-btns { align-items: center !important; gap: 8px !important; }
}
@media (max-width: 767.98px) {
  .lp-header {
    grid-template-columns: auto 1fr auto !important;
  }
  .lp-header-title {
    min-width: 0 !important;
  }
  .lp-header-content-btn {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
  }
  .lp-header-content-btn i { font-size: 1rem !important; }
  .lp-progress-inline {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }
  .lp-nav-btns {
    flex-wrap: wrap;
    justify-content: center !important;
  }
}

/* =====================================================
   V53: Nút Nội dung khóa học + Tiến độ học tập màu loang
   ===================================================== */
.lp-header-content-btn {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 45%, #7c3aed 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 999px !important;
  height: 42px !important;
  padding: 0 18px !important;
  box-shadow: 0 12px 26px rgba(37, 99, 235, .32) !important;
  font-weight: 800 !important;
  letter-spacing: .01em !important;
}
.lp-header-content-btn:hover,
.lp-header-content-btn:focus,
.lp-header-content-btn.is-open {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 52%, #f97316 100%) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 16px 32px rgba(124, 58, 237, .34) !important;
  outline: none !important;
}
.lp-header-content-btn i {
  width: 24px !important;
  height: 24px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255,255,255,.2) !important;
  color: #ffffff !important;
  font-size: 1rem !important;
}
.lp-progress-inline {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 46%, #fff7ed 100%) !important;
  border: 1px solid rgba(37,99,235,.18) !important;
  border-radius: 18px !important;
  min-height: 56px !important;
  padding: 9px 14px !important;
  color: #0f172a !important;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .14) !important;
}
.lp-progress-inline > i {
  width: 36px !important;
  height: 36px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 48%, #2563eb 100%) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(249,115,22,.24) !important;
  font-size: 1.05rem !important;
}
.lp-progress-label {
  color: #334155 !important;
  font-weight: 700 !important;
  opacity: .92 !important;
  font-size: .78rem !important;
  margin-bottom: 3px !important;
}
.lp-progress-inline strong {
  color: #0f172a !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
}
@media (max-width: 767.98px) {
  .lp-header-content-btn {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 14px !important;
  }
  .lp-header-content-btn i {
    width: 26px !important;
    height: 26px !important;
  }
  .lp-progress-inline {
    width: 100% !important;
    justify-content: center !important;
    border-radius: 16px !important;
  }
}


/* ===== V62: progress chip nhỏ gọn + tự hoàn thành video ===== */
.lp-progress-inline {
  min-height: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  padding: 0 16px !important;
  gap: 9px !important;
  background: linear-gradient(135deg, #fff7ed 0%, #eff6ff 100%) !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 8px 16px rgba(37, 99, 235, .08) !important;
  width: auto !important;
}
.lp-progress-inline i {
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #ff7a18, #f97316 55%, #3b82f6) !important;
  color: #fff !important;
  font-size: 14px !important;
  box-shadow: 0 6px 12px rgba(249, 115, 22, .22) !important;
  flex: 0 0 28px !important;
}
.lp-progress-inline strong {
  font-size: .82rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  color: #0f172a !important;
  font-weight: 800 !important;
}
.lp-nav-btns .lp-nav-btn {
  min-height: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
@media (max-width: 575.98px) {
  .lp-progress-inline { height: 40px !important; min-height: 40px !important; padding: 0 12px !important; }
  .lp-progress-inline i { width: 24px !important; height: 24px !important; flex-basis: 24px !important; font-size: 12px !important; }
  .lp-progress-inline strong { font-size: .76rem !important; }
}

/* V72 - Security watermark controlled from Admin > Bảo mật */
.lp-video-wrap.is-security-on {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
.lp-security-watermark {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 38;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(70%, 560px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, calc(var(--lp-wm-opacity, .1) + .18));
  color: rgba(255,255,255,.92);
  font-size: var(--lp-wm-font-size, 12px);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0,0,0,.28);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0,0,0);
  transition: opacity .25s ease, left .45s ease, top .45s ease;
}
.lp-security-watermark.show {
  opacity: max(.22, var(--lp-wm-opacity, .1));
}
.lp-security-watermark img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255,255,255,.85);
  padding: 2px;
  flex: 0 0 26px;
}
.lp-security-watermark span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .lp-security-watermark {
    max-width: calc(100% - 36px);
    padding: 6px 9px;
    font-size: max(10px, calc(var(--lp-wm-font-size, 12px) * .9));
  }
  .lp-security-watermark img {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }
}

/* V90: thong bao video bao ve khi token het han/khong hop le */
.lp-video-source-error {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #fff;
  background: #05070b;
  text-align: center;
  padding: 24px;
  font-weight: 700;
}
.lp-video-source-error i {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 111, 235, .18);
  color: #60a5fa;
  font-size: 1.7rem;
}


/* =====================================================
   V91: Ẩn toàn bộ tiêu đề/icon kênh mặc định của YouTube
   - Không để lộ title/avatar/Watch on YouTube trên vùng player.
   - Iframe vẫn bị khóa click, nguồn video lấy qua token nội bộ.
   ===================================================== */
.lp-youtube-secure-shell {
  background: #000 !important;
  overflow: hidden !important;
}
.lp-youtube-title-shield {
  position: absolute !important;
  z-index: 74 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: clamp(78px, 13%, 136px) !important;
  pointer-events: none !important;
  background: linear-gradient(to bottom, rgba(0,0,0,.98) 0%, rgba(0,0,0,.94) 52%, rgba(0,0,0,.68) 76%, rgba(0,0,0,0) 100%) !important;
}
.lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open) .lp-youtube-title-shield {
  opacity: .06 !important;
  height: 34px !important;
  background: linear-gradient(to bottom, rgba(0,0,0,.42), rgba(0,0,0,0)) !important;
}
.lp-youtube-click-guard {
  z-index: 76 !important;
}
.lp-youtube-controls,
.lp-center-play,
.lp-quality-menu,
.lp-floating-content-btn {
  z-index: 90 !important;
}
@media (max-width: 991.98px) {
  .lp-youtube-title-shield {
    height: 58px !important;
    background: linear-gradient(to bottom, rgba(0,0,0,.96) 0%, rgba(0,0,0,.78) 66%, rgba(0,0,0,0) 100%) !important;
  }
  .lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open) .lp-youtube-title-shield {
    height: 24px !important;
    opacity: .04 !important;
  }
}

/* =====================================================
   V92: Khóa giao diện player học bài
   - Ẩn hẳn title/avatar/tên kênh mặc định của YouTube trong iframe.
   - Không cho toàn bộ trang học cuộn trên desktop; chỉ sidebar Nội dung khóa học cuộn.
   ===================================================== */
.lp-youtube-secure-shell .lp-youtube-player {
  overflow: hidden !important;
}
.lp-youtube-secure-shell .lp-youtube-player iframe {
  top: -78px !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  width: 100% !important;
  height: calc(100% + 156px) !important;
  pointer-events: none !important;
}
.lp-youtube-secure-shell .lp-youtube-title-shield,
.lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open) .lp-youtube-title-shield,
.lp-youtube-secure-shell.is-playing.controls-visible:not(.is-quality-open) .lp-youtube-title-shield,
.lp-youtube-secure-shell:not(.is-playing) .lp-youtube-title-shield {
  position: absolute !important;
  z-index: 118 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 86px !important;
  opacity: 1 !important;
  pointer-events: none !important;
  background: linear-gradient(to bottom, #000 0%, #000 58px, rgba(0,0,0,.92) 72px, rgba(0,0,0,0) 100%) !important;
}
.lp-youtube-controls,
.lp-center-play,
.lp-quality-menu,
.lp-floating-content-btn,
.lp-security-watermark {
  z-index: 130 !important;
}
@media (max-width: 991.98px) {
  .lp-youtube-secure-shell .lp-youtube-player iframe {
    top: -58px !important;
    height: calc(100% + 116px) !important;
  }
  .lp-youtube-secure-shell .lp-youtube-title-shield,
  .lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open) .lp-youtube-title-shield,
  .lp-youtube-secure-shell.is-playing.controls-visible:not(.is-quality-open) .lp-youtube-title-shield,
  .lp-youtube-secure-shell:not(.is-playing) .lp-youtube-title-shield {
    height: 64px !important;
    background: linear-gradient(to bottom, #000 0%, #000 44px, rgba(0,0,0,.86) 54px, rgba(0,0,0,0) 100%) !important;
  }
}
@media (min-width: 992px) {
  /* V99: chỉ khóa cuộn trong trang học. Không khóa html/body toàn site vì làm trang chi tiết khóa học không cuộn được. */
  .lp-body {
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
  }
  .lp-layout {
    height: calc(100vh - 54px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    align-items: stretch !important;
  }
  .lp-main {
    height: calc(100vh - 54px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .lp-video-wrap {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 360px !important;
    max-height: none !important;
    aspect-ratio: auto !important;
  }
  .lp-info-panel,
  .lp-tabs {
    flex: 0 0 auto !important;
  }
  .lp-tab-content {
    flex: 0 0 118px !important;
    min-height: 118px !important;
    overflow-y: auto !important;
  }
  .lp-sidebar {
    height: calc(100vh - 54px) !important;
    max-height: calc(100vh - 54px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
  }
}


/* =====================================================
   V93: Ẩn title/kênh YouTube bằng crop iframe, không phủ nền đen
   - Không dùng mảng đen che player.
   - Dịch iframe lên trên và phóng nhẹ để phần overlay title/avatar của YouTube nằm ngoài khung.
   ===================================================== */
.lp-youtube-secure-shell .lp-youtube-title-shield,
.lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open) .lp-youtube-title-shield,
.lp-youtube-secure-shell.is-playing.controls-visible:not(.is-quality-open) .lp-youtube-title-shield,
.lp-youtube-secure-shell:not(.is-playing) .lp-youtube-title-shield {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  background: transparent !important;
  height: 0 !important;
}
.lp-youtube-secure-shell .lp-youtube-player {
  overflow: hidden !important;
  background: #000 !important;
}
.lp-youtube-secure-shell .lp-youtube-player iframe {
  top: -96px !important;
  left: -1.5% !important;
  right: auto !important;
  bottom: auto !important;
  width: 103% !important;
  height: calc(100% + 192px) !important;
  pointer-events: none !important;
  transform: none !important;
}
@media (max-width: 991.98px) {
  .lp-youtube-secure-shell .lp-youtube-player iframe {
    top: -72px !important;
    left: -2% !important;
    width: 104% !important;
    height: calc(100% + 144px) !important;
  }
}

/* =====================================================
   V94: Cho hiển thị lại title/avatar/tên kênh YouTube
   - Bỏ crop/dịch iframe của V93.
   - Bỏ lớp che tiêu đề YouTube.
   - Vẫn giữ click-guard/token nội bộ để hạn chế lấy link trực tiếp từ HTML.
   ===================================================== */
.lp-youtube-secure-shell .lp-youtube-player {
  overflow: hidden !important;
  background: #000 !important;
}
.lp-youtube-secure-shell .lp-youtube-player iframe {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  pointer-events: none !important;
}
.lp-youtube-title-shield,
.lp-youtube-secure-shell .lp-youtube-title-shield,
.lp-youtube-secure-shell.is-playing.controls-hidden:not(.is-quality-open) .lp-youtube-title-shield,
.lp-youtube-secure-shell.is-playing.controls-visible:not(.is-quality-open) .lp-youtube-title-shield,
.lp-youtube-secure-shell:not(.is-playing) .lp-youtube-title-shield {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  background: transparent !important;
  pointer-events: none !important;
}
.lp-youtube-mask,
.lp-mask-top,
.lp-mask-bottom-left,
.lp-mask-bottom-right,
.lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-youtube-mask,
.lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-mask-bottom-right,
.lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-mask-bottom-left,
.lp-youtube-secure-shell.is-playing:not(.controls-visible):not(.is-quality-open) .lp-mask-top {
  opacity: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  pointer-events: none !important;
}
