.tvs-slideshow {
    position: relative;
    overflow: hidden;
    background: #000;
    margin: 0 auto;
}
.tvs-slide {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
}
.tvs-slide.is-active { display: flex; }

/* Ảnh */
.tvs-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* iframe chung */
.tvs-slide iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}

/* YouTube — giữ tỉ lệ 16:9 */
.tvs-slide-youtube iframe {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: 100%;
}

/* YouTube playlist (IFrame API) */
.tvs-yt-playlist,
.tvs-yt-playlist iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}

/* Fallback link — hiển thị nhỏ ở góc dưới, chỉ hiện khi hover */
.tvs-fallback {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,.7);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 15;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}
.tvs-slide:hover .tvs-fallback {
    opacity: 1;
    pointer-events: auto;
}
.tvs-fallback p {
    margin: 0 0 4px;
    font-size: 12px;
}
.tvs-fallback a {
    color: #4fc3f7;
    text-decoration: underline;
}

/* Thông báo lỗi URL không hợp lệ */
.tvs-error {
    background: #ffebee;
    color: #b71c1c;
    padding: 20px;
    border-radius: 8px;
    font-size: 16px;
    max-width: 90%;
    text-align: center;
    line-height: 1.6;
}
.tvs-error code {
    background: rgba(0,0,0,.08);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    word-break: break-all;
}

/* Badge số thứ tự */
.tvs-index-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 20;
    font-family: monospace;
}

/* Progress bar */
.tvs-progress {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,.15);
    z-index: 10;
}
.tvs-progress-bar {
    height: 100%;
    width: 0;
    background: #ff3b30;
    transition: width linear;
}

.tvs-empty {
    padding: 20px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 4px;
}