/* Tách từ top-week-slider.php (trước đây nằm inline trong <style>, lặp lại
 * trên mọi lượt tải trang chủ + trang chi tiết video).
 *
 * Đã gộp các selector từng bị định nghĩa 2 lần trong bản gốc (do file gốc
 * có 2 "phiên bản" CSS chồng lên nhau: 1 bản đầu + 1 bản "PHẦN 1/PHẦN 2" ghi
 * đè phía dưới). Giá trị giữ lại là giá trị THỰC SỰ có hiệu lực theo cascade
 * gốc (thuộc tính ở bản sau ghi đè bản trước; thuộc tính chỉ có ở 1 trong 2
 * bản thì vẫn giữ nguyên) - kết quả hiển thị không đổi so với trước. */

.top-week-slider-wrapper {
       padding: 0px 8px;
    background: #1a1a1a;
    border-radius: 8px;
}

.top-week-slider-container {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.top-week-slider {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
}

.top-week-slider::-webkit-scrollbar {
    display: none;
}

.slider-item {
    flex: 0 0 calc(25% - 12px); /* Giữ 4 cột */
    min-width: 180px;
    max-width: 280px;
}


@media (max-width: 1200px) {
    .slider-item {
        flex: 0 0 calc(25% - 10px);
    }
}

@media (max-width: 992px) {
    .slider-item {
        flex: 0 0 calc(33.333% - 10px);
    }
}

@media (max-width: 768px) {
    .slider-item {
        flex: 0 0 calc(50% - 7.5px);
        min-width: unset;
        max-width: unset;
    }
    .slider-thumb {
        padding-top: 150%; /* Tỷ lệ dọc để ảnh to hơn */
    }

}

@media (max-width: 480px) {
    .slider-item {
        flex: 0 0 calc(50% - 7.5px);
        min-width: unset;
        max-width: unset;
    }

    .slider-thumb {
        padding-top: 150%; /* Tỷ lệ dọc để ảnh to hơn */
    }

    .top-week-slider-wrapper {
       padding: 15px 10px 0px 10px;
    }
}

.slider-item-inner {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column; /* Ảnh trên, info dưới */
}

.slider-item-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.slider-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 */
    background: #1a1a1a;
    border-radius: 8px 8px 0 0;
}

.slider-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.slider-item-inner:hover .slider-thumb img {
    transform: scale(1.05);
}



@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slider-item-inner:hover .slider-overlay {
    opacity: 1;
}

.play-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #000;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.slider-item-inner:hover .play-icon {
    transform: scale(1);
}

.slider-info {
    padding: 15px; /* Tăng padding một chút cho thoáng */
    background: #1a1a1a;
    flex-grow: 1;
}

.slider-title {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.3;
}

.slider-title a {
    color: #fff;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 700;
    text-align: left;
    font-style: italic;
}

/* Tiêu đề phụ (màu xám nhạt) */
.sub-title {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
    font-weight: normal;
}

.slider-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #999;
}

.likes-count {
    color: #ff4458;
    font-weight: 600;
}

/* Khối chính chứa số và chữ - Dùng Flexbox nằm ngang */
.rank-and-title {
    display: flex;
    align-items: center; /* Căn giữa theo chiều dọc */
    gap: 12px; /* Khoảng cách giữa số và khối chữ */
}

/* Số Rank màu vàng lớn, nét mảnh giống ảnh mẫu */
.rank-number {
    font-size: 55px;
    font-weight: 700;
    color: #fff5ca;
    line-height: 1;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin-right: -4px;
    font-style: italic;
}

/* Khối chữ (Tiêu đề + Sub) đứng dọc */
.title-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

/* Navigation Arrows - hien ca desktop lan responsive, top duoc JS tinh de can giua anh thumbnail */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: rgba(15,15,15,0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    color: #fff;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.slider-nav svg {
    display: block;
}

@media (max-width: 768px) {
    .slider-nav {
        width: 32px;
        height: 32px;
    }
    .slider-nav svg {
        width: 15px;
        height: 15px;
    }
}

.slider-nav:hover {
    background: #97332a;
    border-color: #97332a;
    box-shadow: 0 4px 16px rgba(151,51,42,0.55);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-prev {
    left: 8px;
}

.slider-next {
    right: 8px;
}

.hot-trending-title {
    text-align: center;
    font-size: 1.3em;
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    margin-top: 8px;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #ff4458 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    text-transform: uppercase;
    border-radius: 8px;
    display: block;
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
}

/* Responsive cho Mobile */
@media (max-width: 768px) {
    .rank-number {
        font-size: 40px;
    }
    .slider-title {
        font-size: 13px;
    }
    .sub-title {
        font-size: 10px;
    }
    .slider-info {
        padding: 10px;
    }
    .rank-and-title {
        gap: 8px;
    }
}
