.focus-info-line .info-rating .rating-label {
    font-weight: bold;
    color: #fff; 
    background: #e50914;
    padding: 2px 6px;
    border-radius: 0px;
    margin-left: 8px;
    display: inline-block;
}

#focus-info-panel .tagline-focus {
    font-size: 20px;
    font-style: italic;
    color: #ccc;
    line-height: 1.4;
    margin-top: 20px;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}
.focus-info-line:last-child {
    margin-bottom: 0;
}

.focus-info-line svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
	margin-right: 8px;
	-webkit-flex-shrink: 0;
	flex-shrink: 0;
}

.focus-info-line .info-score {
	color: #e6b91e;
	font-weight: bold;
}
.actor-card {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    width: 220px;
    margin: 8px 10px;
    text-align: center;
    cursor: pointer;
    outline: none;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    -webkit-transition: -webkit-transform .15s ease-in-out;
    transition: transform .15s ease-in-out;
}
.actor-card img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #0f1a21;
    border: 4px solid transparent;
}
.actor-card .actor-name {
    margin-top: 12px;
    font-size: 18px;
    font-weight: bold;
    color: #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.actor-card .character-name {
    font-size: 16px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.actor-card.focus {
    -webkit-transform: scale(1.05) !important;
    transform: scale(1.05) !important;
}
.actor-card.focus .actor-name {
    color: #14f195;
}
#fixed-highlight-frame {
    position: absolute;
    top: 196px;
    left: 10px;
    width: 992px; 
    height: 558px;
    box-sizing: border-box;
    border: 5px solid transparent;
    box-shadow: 0 0 60px rgba(20, 241, 149, 0);
    z-index: 20;
    pointer-events: none;
    -webkit-transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
#fixed-highlight-frame.active {
    border-color: rgba(20, 241, 149, 0.85);
    box-shadow: 0 0 60px rgba(20, 241, 149, 0.5);
}

/* === #frame-bg-layer: thay thế ::before, set background-image trực tiếp bằng JS === */
#frame-bg-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center center;
    background-image: none;
    opacity: 0;
    z-index: 21;
    -webkit-transition: opacity 0.4s ease-in-out;
    transition: opacity 0.4s ease-in-out;
    background-color: #04101a;
}
#fixed-highlight-frame.active #frame-bg-layer {
    opacity: 1;
}
#wrap.focus-mode-active #fixed-highlight-frame.active #frame-bg-layer {
    opacity: 1;
}

#frame-vignette {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 22;
	background: 
        linear-gradient(to bottom, #04101a 0%, transparent 20%, transparent 80%, #04101a 100%),
        linear-gradient(to right, #04101a 0%, transparent 5%, transparent 95%, #04101a 100%);
    box-shadow: none; 
	display: none;
}
#focus-info-panel {
    position: absolute; bottom: 0; left: 0;
    width: 100%;
    padding: 20px 10px;
    box-sizing: border-box;
    z-index: 23;
}

.h-scroll-track {
    -webkit-transition: -webkit-transform 0.3s ease-in-out;
    transition: transform 0.3s ease-in-out;
}
.card {
    -webkit-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.list-row .card {
    opacity: 0.4;
}
.list-row .card.focus {
    opacity: 1;
}

.list-row .card.focus {
    outline: none !important;
    -webkit-transform: none !important;
    transform: none !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

#backdrop-title-overlay {
    position: absolute;
    bottom: 40px;
    left: 30px;
    right: 30px;
    z-index: 22;
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 3px 15px rgba(0,0,0,0.9);
    /* Khi là text: clamp 1 dòng */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* Khi là img: giới hạn chiều cao tối đa 50% frame (279px) */
    height: 200px;
    /* Dùng flex để img co lại đúng cách thay vì -webkit-box */
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: flex-end;
    align-items: flex-end;
}

#backdrop-title-overlay img {
    /* img tự co xuống theo chiều cao container */
    max-height: 200px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    -webkit-filter: drop-shadow(0 0 6px rgba(0,0,0,1))
                    drop-shadow(0 2px 8px rgba(0,0,0,0.9));
    filter: drop-shadow(0 0 6px rgba(0,0,0,1))
            drop-shadow(0 2px 8px rgba(0,0,0,0.9));
}

#backdrop-logo-overlay {
    position: absolute;
    top: 10px;
    left: 40px;
    width: 932px;
    height: 200px;
    z-index: 23;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease-in-out;
    transition: opacity 0.3s ease-in-out;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}
#backdrop-logo-overlay img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
#wrap.focus-mode-active #backdrop-logo-overlay {
    opacity: 1;
}

#wrap.navbar-has-focus #fixed-highlight-frame.active {
    border-color: #aaa;
    box-shadow: none;
}

#wrap.focus-mode-active #fixed-highlight-frame.active {
    border-color: transparent !important;
    box-shadow: none !important;
}

#wrap.focus-mode-active #backdrop-logo-overlay {
    opacity: 1;
}

#backdrop-provider-logo {

}
#backdrop-provider-logo img {
    height: 30px;
    width: auto;
    /* Giảm xuống 1 drop-shadow để tránh lỗi render trên Tizen 4.0 */
    -webkit-filter: drop-shadow(0 2px 5px rgba(0,0,0,0.8));
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.8));
}
#wrap.details-visible #production-company-logo,
#wrap.details-visible #backdrop-provider-logo {
    opacity: 1;
}

#focus-info-panel .cast-crew-info {
    margin-top: 15px;
	padding-bottom: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
    color: #ccc;
}
#focus-info-panel .cast-crew-info .crew-item:not(:last-child) {
    margin-bottom: 8px; 
}
#focus-info-panel .cast-crew-info span {
    font-weight: bold;
    color: #ccc;
    margin-right: 8px;
}
.focus-info-line .info-status {
    margin-left: 0px;
    font-weight: bold;
    color: #14f195;
    padding: 2px 6px;
    padding-left: 10px;
}
.focus-info-line .info-status::before {
    content: none !important;
}

/* === Frame Status Icons === */
#frame-status-icons {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 25;
    display: -webkit-flex;
    display: flex;
}
.frame-icon + .frame-icon {
    margin-left: 15px;
}
.frame-icon {
    width: 44px;
    height: 44px;
    background-color: rgba(10, 20, 26, 0.7);
    border-radius: 50%;
    display: none;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.frame-icon.visible {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.frame-icon svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

#frame-icon-watchlist.visible {
    border-color: #2962FF;
}
#frame-icon-watchlist.visible svg {
    fill: #2962FF;
}

#frame-icon-watched.visible {
    border-color: #FFD700;
}
#frame-icon-watched.visible svg {
    fill: #FFD700;
}

#wrap.focus-mode-active .nav-bar,
#wrap.focus-mode-active #content-area {
    opacity: 0;
    pointer-events: none;
    -webkit-transition: opacity 0.35s ease-out;
    transition: opacity 0.35s ease-out;
}

#wrap.focus-mode-active #fixed-highlight-frame,
#wrap.focus-mode-active #right {
    opacity: 1;
}

/* === #new-backdrop và #new-poster === */
#new-backdrop, #new-poster {
    position: relative;
    overflow: hidden;
}

/* Lớp phủ làm mờ viền cho backdrop */
#new-backdrop::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10;
    pointer-events: none;
    border-radius: 4px;
    background: 
        linear-gradient(to right, #04101a 0%, transparent 20%, transparent 80%, #04101a 100%),
        linear-gradient(to bottom, #04101a 0%, transparent 15%, transparent 85%, #04101a 100%);
}

/* Lớp phủ làm mờ viền cho poster */
#new-poster::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10;
    pointer-events: none;
    border-radius: 4px;
    background: 
        linear-gradient(to right, #04101a 0%, transparent 25%, transparent 75%, #04101a 100%),
        linear-gradient(to bottom, #04101a 0%, transparent 20%, transparent 80%, #04101a 100%);
}

#detailSubtitle {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: baseline;
    align-items: baseline;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.episode-title-part {
    -webkit-flex-grow: 1;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: normal;
}

.episode-date-part {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    padding-left: 20px;
    color: #ccc;
    font-size: 20px;
    font-style: normal;
}

#backdrop-logo-overlay img,
#detailTitle img {
    /* Giảm xuống 1 drop-shadow để tránh lỗi render trên Tizen 4.0 */
    -webkit-filter: drop-shadow(0 3px 10px rgba(0,0,0,0.7));
    filter: drop-shadow(0 3px 10px rgba(0,0,0,0.7));
}

/* === Thanh tiến trình trên Khung ngắm === */
#frame-progress-container {
    position: absolute;
    bottom: 15px;
    left: 30px;
    right: 30px;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    z-index: 24;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease-in-out;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

#frame-progress-container.visible {
    opacity: 1;
}

#frame-progress-bar {
    height: 100%;
    width: 0%;
    background-color: #E50914;
    border-radius: 3px;
    -webkit-transition: width 0.3s ease;
    transition: width 0.3s ease;
}

/* === Thông tin episode trên backdrop === */
#backdrop-episode-info-overlay {
    position: absolute;
    bottom: 90px;
    left: 30px;
    right: 30px;
    z-index: 22;
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease-in-out;
    transition: opacity 0.3s ease-in-out;
}

/* === Teaser Backdrop Container === */
#teaser-backdrop-container {
    position: absolute;
    top: 10px;
    left: 50px;
    right: 50px;
    height: 220px;
	z-index: 9;
    background-color: #0f1a21;
    overflow: hidden;
    display: block;
}

.slideshow-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center center;
    opacity: 1;
    -webkit-transition: opacity 2s ease-in-out;
    transition: opacity 2s ease-in-out;
}

/* Lớp phủ gradient cho teaser */
#teaser-backdrop-container::after {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: 
        linear-gradient(to right, #04101a 0%, transparent 35%, transparent 65%, #04101a 100%),
        linear-gradient(to bottom, #04101a 0%, transparent 35%, transparent 65%, #04101a 100%);
    z-index: 2; 
}

/* === BỘ 8 HIỆU ỨNG KEN BURNS — đầy đủ prefix -webkit- ===
   Scale tối thiểu 1.15 đảm bảo ảnh luôn đầy khung dù translate bao nhiêu.
   Translate giảm xuống 3% để hiệu ứng nhẹ nhàng, không lộ cạnh.
   Công thức an toàn: scale_min >= 1 + (translate% / 100) * 2
   Ví dụ translate 3% → cần scale >= 1.06, dùng 1.15 để dư an toàn.
   ================================================================ */

/* Phóng to & Lia lên */
@-webkit-keyframes kenburns-in-up {
  0%   { -webkit-transform: scale(1.15) translateY(3%); transform: scale(1.15) translateY(3%); }
  100% { -webkit-transform: scale(1.25) translateY(0);  transform: scale(1.25) translateY(0); }
}
@keyframes kenburns-in-up {
  0%   { transform: scale(1.15) translateY(3%); }
  100% { transform: scale(1.25) translateY(0); }
}

/* Phóng to & Lia xuống */
@-webkit-keyframes kenburns-in-down {
  0%   { -webkit-transform: scale(1.15) translateY(-3%); transform: scale(1.15) translateY(-3%); }
  100% { -webkit-transform: scale(1.25) translateY(0);   transform: scale(1.25) translateY(0); }
}
@keyframes kenburns-in-down {
  0%   { transform: scale(1.15) translateY(-3%); }
  100% { transform: scale(1.25) translateY(0); }
}

/* Phóng to & Lia sang trái */
@-webkit-keyframes kenburns-in-left {
  0%   { -webkit-transform: scale(1.15) translateX(3%); transform: scale(1.15) translateX(3%); }
  100% { -webkit-transform: scale(1.25) translateX(0);  transform: scale(1.25) translateX(0); }
}
@keyframes kenburns-in-left {
  0%   { transform: scale(1.15) translateX(3%); }
  100% { transform: scale(1.25) translateX(0); }
}

/* Phóng to & Lia sang phải */
@-webkit-keyframes kenburns-in-right {
  0%   { -webkit-transform: scale(1.15) translateX(-3%); transform: scale(1.15) translateX(-3%); }
  100% { -webkit-transform: scale(1.25) translateX(0);   transform: scale(1.25) translateX(0); }
}
@keyframes kenburns-in-right {
  0%   { transform: scale(1.15) translateX(-3%); }
  100% { transform: scale(1.25) translateX(0); }
}

/* Thu nhỏ & Lia lên */
@-webkit-keyframes kenburns-out-up {
  0%   { -webkit-transform: scale(1.25) translateY(3%); transform: scale(1.25) translateY(3%); }
  100% { -webkit-transform: scale(1.15) translateY(0);  transform: scale(1.15) translateY(0); }
}
@keyframes kenburns-out-up {
  0%   { transform: scale(1.25) translateY(3%); }
  100% { transform: scale(1.15) translateY(0); }
}

/* Thu nhỏ & Lia xuống */
@-webkit-keyframes kenburns-out-down {
  0%   { -webkit-transform: scale(1.25) translateY(-3%); transform: scale(1.25) translateY(-3%); }
  100% { -webkit-transform: scale(1.15) translateY(0);   transform: scale(1.15) translateY(0); }
}
@keyframes kenburns-out-down {
  0%   { transform: scale(1.25) translateY(-3%); }
  100% { transform: scale(1.15) translateY(0); }
}

/* Thu nhỏ & Lia sang trái */
@-webkit-keyframes kenburns-out-left {
  0%   { -webkit-transform: scale(1.25) translateX(3%); transform: scale(1.25) translateX(3%); }
  100% { -webkit-transform: scale(1.15) translateX(0);  transform: scale(1.15) translateX(0); }
}
@keyframes kenburns-out-left {
  0%   { transform: scale(1.25) translateX(3%); }
  100% { transform: scale(1.15) translateX(0); }
}

/* Thu nhỏ & Lia sang phải */
@-webkit-keyframes kenburns-out-right {
  0%   { -webkit-transform: scale(1.25) translateX(-3%); transform: scale(1.25) translateX(-3%); }
  100% { -webkit-transform: scale(1.15) translateX(0);   transform: scale(1.15) translateX(0); }
}
@keyframes kenburns-out-right {
  0%   { transform: scale(1.25) translateX(-3%); }
  100% { transform: scale(1.15) translateX(0); }
}

/* 8 class kích hoạt Ken Burns
   fill-mode: both — ảnh giữ trạng thái cuối animation (scale lớn → không bị "nhảy" về nhỏ khi animation kết thúc)
   animation-delay được set bởi JS khi cần (fixed frame), CSS không set delay mặc định */
.animate-kenburns-1 { -webkit-animation: kenburns-in-up    15s ease-out both; animation: kenburns-in-up    15s ease-out both; }
.animate-kenburns-2 { -webkit-animation: kenburns-in-down  15s ease-out both; animation: kenburns-in-down  15s ease-out both; }
.animate-kenburns-3 { -webkit-animation: kenburns-in-left  15s ease-out both; animation: kenburns-in-left  15s ease-out both; }
.animate-kenburns-4 { -webkit-animation: kenburns-in-right 15s ease-out both; animation: kenburns-in-right 15s ease-out both; }
.animate-kenburns-5 { -webkit-animation: kenburns-out-up   15s ease-out both; animation: kenburns-out-up   15s ease-out both; }
.animate-kenburns-6 { -webkit-animation: kenburns-out-down 15s ease-out both; animation: kenburns-out-down 15s ease-out both; }
.animate-kenburns-7 { -webkit-animation: kenburns-out-left 15s ease-out both; animation: kenburns-out-left 15s ease-out both; }
.animate-kenburns-8 { -webkit-animation: kenburns-out-right 15s ease-out both; animation: kenburns-out-right 15s ease-out both; }

/* === Ẩn frame status icons (override) === */
#frame-icon-watchlist,
#frame-icon-watched {
    display: none !important;
}

#detailTitle {
}

/* === Info Slide Ticker === */
.info-slide-ticker {
    position: absolute;
    bottom: -310px;
    left: 0;
    right: 0;           /* full width để max-width: 70% tính đúng */
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    padding: 8px 12px;
    min-height: 36px;
    max-width: 70%;
    font-size: 20px;
    line-height: 1.5;
    color: #eee;
    opacity: 0;
    -webkit-transition: opacity 0.4s ease;
    transition: opacity 0.4s ease;
    border-left: 3px solid rgba(20, 241, 149, 0.4);
    background: rgba(4, 16, 26, 0.4);
    box-sizing: border-box;
    overflow: hidden;
    z-index: 24;
}

.info-slide-ticker .slide-icon {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.info-slide-ticker .slide-label {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.info-slide-ticker .slide-text {
    font-size: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-flex: 1;
    flex: 1;
	letter-spacing: 0.1em;
}

/* === #frame-auto-backdrop === */
/* z-index: 22 — nằm trên #frame-bg-layer (21) */
#frame-auto-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 22;
    background-size: cover;
    background-position: center;
    background-color: #04101a;
    opacity: 0;
    pointer-events: none;
    -webkit-transition: opacity 1.5s ease-in-out;
    transition: opacity 1.5s ease-in-out;
}

/* === #frame-clip-wrapper === */
#frame-clip-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 22;
    overflow: hidden !important;
    border-radius: inherit;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Khi nằm trong frame-clip-wrapper, frame-auto-backdrop dùng rule thứ hai này */
#frame-clip-wrapper #frame-auto-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #04101a;
    opacity: 0;
    pointer-events: none;
    -webkit-transition: opacity 0.6s ease-in-out;
    transition: opacity 0.6s ease-in-out;
}

/* Hiển thị logo provider/production khi đang ở focus mode (màn hình chính) */
#wrap.focus-mode-active #backdrop-provider-logo,
#wrap.focus-mode-active #production-company-logo {
    opacity: 1;
}

/* === FRAME MODE B (mặc định khi di chuyển) === */
/* Frame A = 992px (mặc định hiện tại, không đổi) */
/* Frame B = 376px (vừa khít poster) */

/* Frame B: width = height * (2/3) = 558 * 2/3 = 372px — đúng tỷ lệ poster 2:3 */


/* Panel B: dưới frame, cùng chiều rộng frame-mode-b */
#focus-info-panel-b {
    position: absolute;
    top: 760px;
    left: 10px;
    width: 375px;
    padding: 10px 12px;   /* giảm padding */
    box-sizing: border-box;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease-in-out;
    transition: opacity 0.3s ease-in-out;
    background: transparent;
    border-top: none;
}
#focus-info-panel-b.visible {
    opacity: 1;
}

/* Dòng 1: Điểm số — căn giữa */
#fip-b-scores {
    display: block;
    min-height: 28px;
    line-height: 28px;
    overflow: hidden; /* clearfix cho float */
}




/* Tạm dừng Ken Burns khi đang scroll/di chuyển focus */
#fixed-highlight-frame.kb-paused [class*="animate-kenburns"] {
    -webkit-animation-play-state: paused;
    animation-play-state: paused;
}

/* === Frame B poster: 2-layer crossfade — tránh nhấp nháy khi đổi ảnh === */
#frame-poster-layer-a,
#frame-poster-layer-b {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center top;
    background-color: #04101a;
    opacity: 0;
    -webkit-transition: opacity 0.35s ease-in-out;
    transition: opacity 0.35s ease-in-out;
}
#frame-poster-layer-a.active,
#frame-poster-layer-b.active {
    opacity: 1;
}
/* Thanh tiến trình Frame B dùng #frame-progress-container trong frame — không cần CSS riêng */