/* File: assets/movhub-style.css */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;700&display=swap');

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-base);
    margin: 0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.main-header {
    width: 100%;
    background-color: var(--top-bg-default);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}
.main-header .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}
.logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    margin-right: 0;
    flex-shrink: 0;
}
.logo img {
    height: 40px;
    width: auto;
}
.main-nav {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
    flex: 1;
    min-width: 0;
}
.main-nav a {
    text-decoration: none;
    color: var(--text-base);
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
    font-size: 14px;
}
.main-nav a:hover {
    color: var(--primary-text);
}
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}
.header-actions {
    margin-left: auto;
}
.header-right {
    flex-shrink: 0;
}
.search-box-wrapper {
    position: relative;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box > i {
    position: absolute;
    left: 15px;
    color: var(--text-base);
    font-size: 18px;
    z-index: 1;
    pointer-events: none;
}
.search-box input {
    background-color: var(--bg-2);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 15px 10px 42px;
    color: #fff;
    width: 320px;
    min-width: 250px;
    font-size: 14px;
    transition: border-color 0.2s, width 0.2s;
}
.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    width: 380px;
}
.search-box input::placeholder {
    color: var(--text-base);
    opacity: 0.7;
}

/* --- Search Dropdown --- */
.search-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 600px;
    max-width: 90vw;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: none;
    max-height: 80vh;
    overflow-y: auto;
}

.search-dropdown.is-open {
    display: block;
}

.search-dropdown-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-2);
}

.search-dropdown-close {
    background: none;
    border: none;
    color: var(--text-base);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.search-dropdown-close:hover {
    background: var(--bg-color);
    color: #fff;
}

.search-dropdown-body {
    padding: 20px;
}

.search-dropdown .filter-group {
    margin-bottom: 15px;
}

.search-dropdown .filter-group:first-child {
    margin-bottom: 20px;
}

.search-dropdown .filter-group:first-child input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

.search-dropdown .filter-group:first-child input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-dropdown .filters-row {
    margin-bottom: 20px;
}

.search-dropdown .filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.search-dropdown .filter-input,
.search-dropdown .filter-select {
    padding: 10px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    width: 100%;
}

.search-dropdown .filter-input:focus,
.search-dropdown .filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-dropdown .filter-select {
    cursor: pointer;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.search-overlay.is-open {
    display: block;
}

/* --- Hero Slider --- */
.hero-slider {
    width: 100%;
    height: 400px;
}
.swiper, .swiper-wrapper, .swiper-slide {
    width: 100%;
    height: 100%;
}
.swiper-slide {
    position: relative;
    color: #fff;
    display: flex;
    align-items: flex-end;
}
.slide-link {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
}
.slide-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
}
.slide-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 10%, transparent 50%);
}
.slide-content {
    position: relative;
    z-index: 2;
    padding-bottom: 60px;
}
.slide-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}
.slide-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    opacity: 0.8;
}
.slide-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    z-index: 2;
}
.btn-primary {
    background-color: var(--primary-color);
    color: var(--primary-button-text);
}
.btn-primary:hover {
    background-color: var(--primary-color-hover);
}

/* --- Content --- */
.content-wrapper { padding: 40px 20px; }
.cards-row { margin-bottom: 40px; }
.row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.category-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}
.cat-more {
    color: var(--text-base);
    text-decoration: none;
}
.row-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* --- Poster Card --- */
.video-card-poster a {
    text-decoration: none;
}
.card-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-2);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}
.video-card-poster:hover .card-thumbnail {
    transform: scale(1.05);
}
.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
}
.video-card-poster:hover .play-icon {
    opacity: 0.8;
}
.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 4px;
}
.card-title {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-card-poster:hover .card-title {
    color: var(--primary-text);
}

/* --- Footer --- */
.main-footer {
    width: 100%;
    background-color: var(--footer-bg);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}
.main-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
/* --- CSS CHO FOOTER MỚI --- */
.multi-column-footer {
    width: 100%;
    background-color: var(--footer-bg);
    padding: 50px 0 20px 0;
    color: var(--text-base);
    border-top: 1px solid var(--border-color);
}
.multi-column-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.footer-col-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
}
.footer-col p {
    line-height: 1.7;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    margin-bottom: 10px;
}
.footer-col ul a {
    text-decoration: none;
    color: var(--text-base);
    transition: color 0.2s;
}
.footer-col ul a:hover {
    color: var(--primary-text);
}
.social-links {
    display: flex;
    gap: 15px;
}
.social-links a {
    font-size: 20px;
    color: var(--text-base);
    transition: color 0.2s;
}
.social-links a:hover {
    color: var(--primary-text);
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
}
/* --- CSS CHO TRANG VIDEO CHI TIẾT --- */
.video-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 1024px) {
    .video-detail-layout {
        grid-template-columns: 3fr 1fr;
    }
}
.video-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}
.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.video-info-box {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--bg-2);
    border-radius: 8px;
}
.video-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}
.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--text-base);
}
.video-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.related-videos-box {
    background-color: var(--bg-2);
    padding: 20px;
    border-radius: 8px;
}
.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}
.related-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.related-item {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: var(--text-base);
}
.related-item img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.related-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.related-item:hover .related-info h4 {
    color: var(--primary-text);
}
.related-info span {
    font-size: 12px;
}
.not-found-box {
    text-align: center;
    padding: 80px 20px;
}
.not-found-box h2 {
    font-size: 28px;
    margin-bottom: 15px;
}
.not-found-box p {
    margin-bottom: 30px;
}
/* --- CLASS GIỚI HẠN DÒNG CHO TIÊU ĐỀ DÀI --- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* --- CSS CHO BẢNG VIDEO REPONSIVE (Bản sửa lỗi) --- */
.details-row {
    background-color: #272c3a;
}
.details-row.hidden {
    display: none;
}
.details-row.is-open {
    display: table-row;
}
.details-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--text-base);
}
.details-content strong {
    color: #fff;
}
.expand-details-btn i {
    transition: transform 0.2s;
}
/* Xoay mũi tên khi mở */
tr.is-open + .details-row .expand-details-btn i {
    transform: rotate(180deg);
}

/* --- LOGIC ẨN/HIỆN CỘT --- */
/* Mặc định, ẩn các cột không cần thiết trên mobile */
.mobile-hidden {
    display: none;
}
/* Mặc định, hiện các cột chỉ dành cho mobile */
.mobile-only-cell {
    display: table-cell;
}
/* Khi màn hình lớn hơn 768px (máy tính) */
@media (min-width: 768px) {
    /* Hiện lại các cột đã ẩn */
    .mobile-hidden {
        display: table-cell;
    }
    /* Ẩn đi các cột chỉ dành cho mobile */
    .mobile-only-cell {
        display: none;
    }
}
/* CSS chỉnh lại kích thước logo */
.logo img {
    height: 35px; /* Mày có thể chỉnh lại chiều cao này cho vừa ý */
    width: auto;
}
/* --- CSS CHO SLIDER CÓ NỘI DUNG ĐÈ LÊN --- */
.hero-slider {
    position: relative; /* Rất quan trọng để lớp phủ hoạt động */
    height: 400px;
    background-color: var(--bg-2);
}

/* Lớp phủ nội dung tĩnh */
.home-board-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10; /* Nằm trên slider */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    /* Lớp phủ tối màu để chữ dễ đọc hơn */
    background-color: rgba(0, 0, 0, 0.5);
}

.home-board-overlay .home-logo img {
    height: 50px;
    margin-bottom: 25px;
}

.home-board-overlay .heading-xl {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    max-width: 600px;
    line-height: 1.4;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7); /* Thêm bóng đổ cho chữ nổi bật */
}

/* Giấu các nút của slider đi cho gọn gàng */
.hero-slider .swiper-pagination,
.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next {
    display: none;
}
/* --- CSS CHO PHÂN TRANG MỚI (V-PAGINATION) --- */

/* Utility class để căn giữa theo chiều ngang (Nếu chưa có) */
.line-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modern Pagination Style */
.modern-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 0;
    margin-top: 20px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background-color: var(--bg-2);
    color: var(--text-base);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background-color: var(--bg-3);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.pagination-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    cursor: default;
}

.pagination-btn.disabled {
    background-color: var(--bg-3);
    color: var(--text-muted);
    border-color: var(--border-color);
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-nav {
    min-width: 40px;
    padding: 0 10px;
    font-size: 18px;
}

.pagination-nav i + i {
    margin-left: -4px; /* Làm 2 icon sát nhau hơn cho nút double arrow */
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: var(--text-muted);
    font-size: 16px;
    user-select: none;
}

/* Responsive */
@media (max-width: 640px) {
    .modern-pagination {
        gap: 6px;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
    
    .pagination-nav {
        min-width: 36px;
        padding: 0 8px;
        font-size: 16px;
    }
    
    .pagination-ellipsis {
        min-width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* Legacy pagination styles (kept for backward compatibility) */
.v-pagination {
    padding: 20px 0;
    margin-top: 20px;
}

.page-control {
    gap: 10px;
    background-color: var(--bg-2);
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.btn-circle[disabled] {
    background-color: var(--bg-3) !important;
    color: var(--text-muted) !important;
    box-shadow: none;
    cursor: not-allowed;
}

.page-current {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    gap: 5px;
}

.v-form-control {
    padding: 4px;
    width: 50px;
    height: 30px;
    border: 1px solid var(--border-color);
    text-align: center;
    font-size: 16px;
    border-radius: 6px;
    -moz-appearance: textfield;
}

.v-form-control::-webkit-outer-spin-button,
.v-form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* --- ADMIN LAYOUT FIX (MIN-HEIGHT) --- */


/* 2. Admin Wrapper (Bọc Sidebar và Content) */
.admin-wrapper {
    flex-grow: 1; 
    display: flex;
    /* 67px là chiều cao header (khoảng 67px) */
    min-height: calc(100vh - 67px); 
    background-color: var(--bg-color);
}

/* 3. Admin Sidebar (Phần có màu nền full height) */
.admin-sidebar {
    width: 250px; 
    flex-shrink: 0; 
    background-color: var(--top-bg-default); 
    padding: 20px 0;
    border-right: 1px solid var(--border-color);
    /* FIX: Kéo dài Sidebar hết chiều cao của admin-wrapper */
    min-height: 100%; 
}

/* 4. Admin Content Wrapper */
.admin-content-wrapper {
    flex-grow: 1; 
    padding: 40px 20px; 
}

/* 5. Style Sidebar Menu (Để đảm bảo nó hoạt động trong layout mới) */
.sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-base);
    opacity: 0.7;
    text-transform: uppercase;
    padding: 0 20px;
    margin-top: 15px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-base);
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: var(--bg-2); 
    color: #fff;
}

/* 6. Đảm bảo Footer bị đẩy xuống cuối màn hình */
.main-footer {
    margin-top: auto;
}
/* --- FIX LỆCH ICON Ở FOOTER --- */
.footer-col .social-links {
    margin-left: 0;
    padding-left: 0;
}
/* --- CSS CHO HEADER RESPONSIVE (Bản sửa lỗi cuối cùng) --- */
.header-center { display: none; }
.desktop-nav { display: flex; gap: 20px; }
.mobile-nav { display: none; }
.mobile-only-btn, .search-close-btn { display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }
.search-icon-btn { background: none; border: none; color: var(--text-base); font-size: 22px; cursor: pointer; }

/* Media query cho màn hình trung bình */
@media (max-width: 1400px) {
    .main-header .container {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 1024px) {
    .main-header .container {
        gap: 20px;
    }
    .main-nav {
        gap: 15px;
    }
    .main-nav a {
        font-size: 13px;
    }
    .search-box input {
        width: 250px;
        min-width: 200px;
    }
    .search-box input:focus {
        width: 300px;
    }
    .search-dropdown {
        width: 550px;
    }
}

/* Áp dụng cho màn hình mobile (chiều rộng dưới 768px) */
@media (max-width: 768px) {
    .main-header .container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 10px;
        padding: 0 15px;
    }
    .header-left { 
        justify-self: start; 
        gap: 0;
    }
    .header-center { display: block; justify-self: center; }
    .header-right { justify-self: end; }

    .desktop-nav { display: none; }
    .mobile-only-btn { display: block; }
    .header-left .search-box input { 
        display: none; 
    }
    .header-left .search-box > i {
        display: none;
    }
    .search-icon-btn { 
        display: block !important;
        margin: 0;
        padding: 8px;
        background: none;
        border: none;
        color: var(--text-base);
        font-size: 22px;
        cursor: pointer;
    }
    .search-close-btn {
        display: none;
    }
    .search-dropdown {
        width: calc(100vw - 30px);
        left: 15px;
        right: 15px;
        max-width: none;
    }

    /* Menu xổ xuống */
    .mobile-nav {
        background-color: var(--top-bg-default);
        flex-direction: column;
        padding: 0 20px;
        border-top: 1px solid var(--border-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    }
    .mobile-nav.is-open {
        display: flex;
        max-height: 500px; /* Chiều cao đủ lớn để chứa hết menu */
        padding: 10px 20px;
    }
    .mobile-nav a { padding: 10px 0; text-decoration: none; color: var(--text-base); }

    /* Khi ô search được mở */
    .search-box.is-open {
        position: fixed; 
        top: 0; 
        left: 0; 
        right: 0;
        width: 100%;
        background-color: var(--top-bg-default);
        display: flex; 
        align-items: center;
        padding: 15px;
        z-index: 101;
        gap: 10px;
    }
    .search-box.is-open > i {
        display: block !important;
        position: static;
        color: var(--text-base);
        font-size: 18px;
        pointer-events: none;
    }
    .search-box.is-open input { 
        display: block !important; 
        width: 100%; 
        padding-left: 42px;
        padding-right: 40px;
        flex: 1;
    }
    .search-box.is-open .search-icon-btn { 
        display: none !important; 
    }
    .search-box.is-open .search-close-btn {
        display: block !important; 
        position: static;
        background: none;
        border: none;
        color: #fff;
        font-size: 24px;
        cursor: pointer;
        padding: 0;
        transform: none;
    }
}
/* --- CSS CHO KHU VỰC PHIM HOT --- */
.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(50% - 10px); /* Trên mobile, 2 thẻ 1 hàng */
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px; /* Thêm padding để thanh cuộn không che mất bóng đổ */
    /* Ẩn thanh cuộn xấu xí */
    scrollbar-width: none; /* Firefox */
}
.horizontal-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

@media (min-width: 768px) {
    .horizontal-scroll {
        grid-auto-columns: calc(25% - 15px); /* 4 thẻ 1 hàng */
    }
}

@media (min-width: 1024px) {
    .horizontal-scroll {
        grid-auto-columns: calc(20% - 16px); /* 5 thẻ 1 hàng */
    }
}

/* --- Skeleton Loader --- */
.skeleton-loader {
    background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-color) 50%, var(--bg-2) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    margin-bottom: 10px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-indicator {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* --- Keyboard Navigation --- */
.video-card-poster:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 8px;
}

.video-card-poster:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.video-card-poster {
    position: relative;
}

.favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    font-size: 18px;
}

.favorite-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.favorite-btn.active {
    background: rgba(255, 59, 92, 0.9);
    color: #fff;
}

.favorite-btn.active:hover {
    background: rgba(255, 59, 92, 1);
}

.video-info-box .favorite-btn {
    position: static;
    background: var(--bg-2);
    border: 1px solid var(--border-color);
    color: var(--text-base);
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.video-info-box .favorite-btn.active {
    background: rgba(255, 59, 92, 0.2);
    border-color: rgba(255, 59, 92, 0.5);
    color: #ff3b5c;
}

.video-info-box .favorite-btn:hover {
    background: var(--bg-color);
    transform: scale(1.05);
}

.row-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.btn-toggle-scroll {
    background: var(--primary-color);
    color: var(--primary-button-text, #111);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.btn-toggle-scroll:hover {
    opacity: 0.9;
}

/* --- Advanced Search Page --- */
.search-page-header {
    margin-bottom: 30px;
}

.search-page-header h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-base);
}

.search-filters-form {
    background: var(--bg-2);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.search-main-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-base);
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-submit-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--primary-button-text, #111);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: opacity 0.2s;
}

.search-submit-btn:hover {
    opacity: 0.9;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.filter-group label {
    font-size: 14px;
    color: var(--text-base);
    font-weight: 500;
}

.filter-select,
.filter-input {
    padding: 10px 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-base);
    font-size: 14px;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.btn-filter {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--primary-button-text, #111);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-filter:hover {
    opacity: 0.9;
}

.btn-filter-clear {
    padding: 10px 20px;
    background: transparent;
    color: var(--text-base);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-block;
}

.btn-filter-clear:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.search-results {
    margin-top: 30px;
}

.results-info {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-2);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.results-info p {
    margin: 0;
    color: var(--text-base);
}

.results-info strong {
    color: var(--primary-color);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 16px;
    background: var(--bg-2);
    color: var(--text-base);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.pagination-btn:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: var(--primary-button-text, #111);
    border-color: var(--primary-color);
}

.pagination-dots {
    padding: 10px 8px;
    color: var(--text-base);
}

@media (max-width: 768px) {
    .filters-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .btn-filter,
    .btn-filter-clear {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .row-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-toggle-scroll {
        width: 100%;
        justify-content: center;
    }
    
    .btn-toggle-scroll span {
        font-size: 13px;
    }
}
