body:not(.js-ready) #login-page,
body:not(.js-ready) #qr-modal,
body:not(.js-ready) #help-modal,
body:not(.js-ready) #main-app {
	display: none !important;
}
/* base.css */
:root{
  --font-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
html, body{
  font-family: var(--font-sans);
  background-color: #111827;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none; /* tránh “giả bold” */
}
.header-gradient { background-image: linear-gradient(to right, #e11d48, #f97316); }
.cta-gradient { background-image: linear-gradient(to right, #f43f5e, #f97316); }
.vip-cta-gradient { background-image: linear-gradient(to right, #f59e0b, #fbbf24); }
.nav-active { color: #f43f5e; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.text-shadow { text-shadow: 0 2px 5px rgba(0,0,0,0.6); }
#scroller-container { scroll-snap-type: y mandatory; }
.video-slide { scroll-snap-align: start; height: 100%; }
.vip-glow { box-shadow: 0 0 15px rgba(245, 158, 11, 0.6); }
.page { display: none; height: 100vh; overflow-y: auto; }
.page.page-active { display: block; }
#home-page.page-active { display: flex; }
.page-with-nav { padding-bottom: 80px; }
#home-page { padding-bottom: 0; }
.progress-bar { background-color: rgba(255, 255, 255, 0.3); cursor: pointer; }
.progress-bar-inner { background-color: #f43f5e; transition: width 0.1s linear; }
.rating-stars .fa-star { cursor: pointer; }
.ep-list-scrollbar::-webkit-scrollbar { width: 6px; }
.ep-list-scrollbar::-webkit-scrollbar-track { background: #1f2937; }
.ep-list-scrollbar::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 3px; }
/* Banner Styles */
.banner-slide { display: none; opacity: 0; transition: opacity 0.7s ease-in-out; }
.banner-slide.active { display: block; opacity: 1; }
.banner-dots { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background-color: rgba(255,255,255,0.5); cursor: pointer; transition: background-color 0.3s; }
.banner-dot.active { background-color: white; }

/* Loading Overlay Styles */
#loading-overlay {
	position: fixed; inset: 0; background: rgba(0,0,0,0.6);
	display: flex; justify-content: center; align-items: center; z-index: 10000;
}
.spinner {
	width: 48px; height: 48px; border: 5px solid rgba(255,255,255,0.3);
	border-top-color: #ffe082; border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Custom Alert Styles */
#custom-alert {
	position: fixed; top: -100px; left: 50%; transform: translateX(-50%);
	background-color: #1f2937; color: white; padding: 1rem 1.5rem;
	border-radius: 0.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.5);
	z-index: 11000; transition: top 0.4s ease-in-out;
	display: flex; align-items: center; gap: 0.75rem;
}
#custom-alert.show { top: 20px; }
#custom-alert .fa-circle-check { color: #34d399; }
#custom-alert .fa-circle-xmark { color: #f87171; }
/* CSS for Video Loading Spinner - DÁN VÀO ĐÂY */
.video-loading-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	display: none; /* Mặc định ẩn đi */
	justify-content: center;
	align-items: center;
	width: 60px;
	height: 60px;
	background: rgba(0, 0, 0, 0.5);
	border-radius: 50%;
}
.video-loading-spinner .spinner {
	width: 32px;
	height: 32px;
	border-width: 4px;
	border-top-color: #f97316; /* Màu cam cho hợp theme */
}
/* VIP Plan Selection */
.vip-plan { border: 2px solid transparent; transition: all 0.3s ease; }
.vip-plan.active { border-color: #f59e0b; transform: scale(1.05); box-shadow: 0 0 20px rgba(245, 158, 11, 0.7); }

/* Subtitle Button Active State */
.subtitle-btn.active { background-color: #f43f5e; }

video::cue {
  background: none !important;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  position: unset;
  top: unset;
  left: unset;
  bottom: unset;
  width: unset;
  max-width: unset;
  margin: unset;
  
  color: #fff;
  text-shadow:
    -1px -1px 2px #000,
     1px -1px 2px #000,
    -1px  1px 2px #000,
     1px  1px 2px #000;
  font-size: clamp(16px, 2vw, 25px);
  font-weight: 600;
}
/* PC */
@media (min-width: 769px) {
  video::cue {
	background-color: rgba(0,0,0,0.35) !important;
    border-radius: 10px;
    padding: 0.35em 0.9em;
    font-size: clamp(18px, 2.2vw, 25px);
    line-height: 1.35;
    font-weight: 700;
    white-space: normal !important;
    word-break: break-word !important;
  }
}
/* ===== Reset nền WebKit  ===== */
.player-video::-webkit-media-text-track-display,
.player-video::-webkit-media-text-track-container,
.player-video::-webkit-media-text-track-region,
.player-video::-webkit-media-text-track-display > div {
  background: none !important;
}


/* Mobile */
@media (max-width: 768px) and (orientation: portrait) {
	video::cue {
	font-size: clamp(20px, 5vw, 25px) !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    flex-direction: column !important;
    line-height: 1.26 !important; 
	}
  .player-video::-webkit-media-text-track-display,
  .player-video::-webkit-media-text-track-container,
  .player-video::-webkit-media-text-track-region,
  .player-video::-webkit-media-text-track-display > div {
    background: none !important;
  }
}

/* ===== iOS Safari ===== */
@supports (-webkit-touch-callout: none) {
  .player-video::cue { background: none !important; }
  .player-video::-webkit-media-text-track-display,
  .player-video::-webkit-media-text-track-container,
  .player-video::-webkit-media-text-track-region,
  .player-video::-webkit-media-text-track-display > div {
    background: none !important;
	background-color: rgba(0,0,0,0.35) !important;
    border-radius: 8px !important;
  }
}
#google-btn-container {
	display: none !important;
	visibility: hidden;
}
 .tippy-box[data-theme~='translucent'] {
	background-color: rgba(30, 41, 59, 0.85); /* Màu nền đen mờ hợp với theme */
	backdrop-filter: blur(4px);
	border-radius: 6px;
	border: 1px solid rgba(71, 85, 105, 0.6);
}
.tippy-arrow {
	color: rgba(30, 41, 59, 0.85);
}
#account-info-modal.modal-visible {
	display: flex;
	opacity: 1;
}

/* Lớp để kích hoạt hiệu ứng cho nội dung modal */
#account-info-modal.modal-visible #account-info-modal-content {
	transform: scale(1);
	opacity: 1;
}
/* Lớp để hiển thị modal sessions */
#sessions-modal.modal-visible {
	display: flex;
	opacity: 1;
}

#sessions-modal.modal-visible #sessions-modal-content {
	transform: scale(1);
	opacity: 1;
}

/* Style cho từng item trong danh sách session */
.session-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem;
	background-color: rgba(51, 65, 85, 0.5); /* bg-slate-700/50 */
	border-radius: 0.5rem;
	border: 1px solid rgb(51 65 85);
}
.accordion-item {
    transition: background-color 0.4s ease;
}

.accordion-content {
    /* Phương pháp max-height đáng tin cậy */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out; /* Chuyển đổi mượt mà */
}

#help-modal-content main::-webkit-scrollbar {
  width: 8px; /* Độ rộng của thanh cuộn */
}

/* Phần rãnh của thanh cuộn (nền) */
#help-modal-content main::-webkit-scrollbar-track {
  background: hsl(220, 13%, 18%); /* Màu nền tối, trùng với màu của accordion khi mở */
  border-radius: 10px;
}

/* Phần tay cầm của thanh cuộn */
#help-modal-content main::-webkit-scrollbar-thumb {
  background-color: hsl(220, 9%, 46%); /* Màu xám trung tính */
  border-radius: 10px;
  border: 2px solid hsl(220, 13%, 18%); /* Tạo một khoảng trống nhỏ quanh tay cầm */
}

/* Hiệu ứng khi di chuột vào tay cầm */
#help-modal-content main::-webkit-scrollbar-thumb:hover {
  background-color: hsl(210, 40%, 50%); /* Chuyển sang màu xanh nhạt để có phản hồi */
}
#notification-alert.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.details-summary.collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; /* Luôn giới hạn ở 3 dòng */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Style cho NÚT BẤM "hòa hợp" với nền */
.toggle-summary-btn {
  /* Bỏ nền và viền */
  background: none;
  border: none;
  
  /* Căn chỉnh và màu sắc */
  display: inline-flex;
  align-items: center;
  gap: 0.375rem; /* 6px */
  margin-top: 0.5rem; /* 8px */
  padding: 0.25rem; /* 4px */
  
  /* Màu sắc tinh tế, cùng tông */
  color: #94a3b8; /* text-slate-400 */
  font-size: 0.875rem; /* text-sm */
  font-weight: 600; /* font-semibold */
  cursor: pointer;
  
  /* Hiệu ứng khi di chuột */
  transition: color 0.2s ease;
}

.toggle-summary-btn:hover {
  color: #f43f5e; /* text-rose-500 */
}

/* Container chính để căn giữa nút bấm */
.summary-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#player-page.landscape-mode {
background-color: #000;
}
#player-page.landscape-mode > div {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: auto;
max-width: 95vw; 
max-height: 95vh;
transform: translate(-50%, -50%);
aspect-ratio: 16 / 9;
}

#player-page.landscape-mode .player-video {
width: 100%;
height: 100%;
object-fit: contain; 
}

#player-page.landscape-mode .player-back-btn {
background-color: rgba(0, 0, 0, 0.5);
}