/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: #1a1a1a;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Header Top Row - Logo and Search */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

/* Header Bottom Row - Navigation */
.header-bottom {
    border-top: 1px solid #333;
    padding-top: 1rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fea016;
    flex-shrink: 0;
}

.logo i {
    font-size: 2rem;
}

.logo a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navigation */
.nav {
    width: 100%;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    background-color: #333;
    display: inline-block;
}

.nav-link:hover,
.nav-link.active {
    background-color: #fea016;
    color: #ffffff;
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    /* Hoàn toàn giống nav-link */
    color: #ffffff;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    background-color: #333;

    /* Thêm flex cho icon */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown-toggle.active i {
    transform: rotate(180deg);
}

.dropdown-toggle:hover {
    background-color: #fea016;
    color: #ffffff;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a2a2a;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 0.5rem;
    overflow: hidden;
    border: 1px solid #3a3a3a;
}

.nav-dropdown-content.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown-content a {
    color: #ffffff;
    padding: 0.8rem 1.2rem;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #3a3a3a;
    font-size: 0.9rem;
}

.nav-dropdown-content a:last-child {
    border-bottom: none;
}

.nav-dropdown-content a:hover {
    background-color: #fea016;
    color: white;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background-color: #333;
    border-radius: 25px;
    padding: 0.5rem;
    min-width: 250px;
    max-width: 350px;
    flex-shrink: 0;
}

.search-box input {
    background: none;
    border: none;
    color: #ffffff;
    padding: 0.5rem 1rem;
    flex: 1;
    outline: none;
    font-size: 0.95rem;
}

.search-box input::placeholder {
    color: #999;
}

.search-box button {
    background: none;
    border: none;
    color: #ffffff;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #fea016;
}

/* Form styling for search */
.search-box[type="submit"] {
    background: none;
}

.search-box input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Mobile Search Box */
.mobile-search-box {
    display: none;
    background-color: #333;
    border-radius: 25px;
    padding: 1rem;
    margin: 1rem 0;
    align-items: center;
    border-top: 1px solid #444;
    margin-top: 1.5rem;
}

.mobile-search-box input {
    background: none;
    border: none;
    color: #ffffff;
    padding: 0.5rem 1rem;
    flex: 1;
    outline: none;
    font-size: 0.95rem;
}

.mobile-search-box input::placeholder {
    color: #999;
}

.mobile-search-box button {
    background: none;
    border: none;
    color: #ffffff;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.mobile-search-box button:hover {
    background-color: #fea016;
}

.mobile-search-box.active {
    display: flex;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

/* Mobile Search Toggle */
.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.section-title i {
    color: #fea016;
}

.section-subtitle {
    color: #999;
    font-size: 1rem;
    font-style: italic;
}

/* Movies Grid */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

.movie-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #333;
    flex-shrink: 0;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

/* Lazy loading placeholder */
.movie-poster[loading="lazy"] {
    background-image: linear-gradient(45deg, #333 25%, transparent 25%),
                      linear-gradient(-45deg, #333 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #333 75%),
                      linear-gradient(-45deg, transparent 75%, #333 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: loading-shimmer 1.5s infinite linear;
}

@keyframes loading-shimmer {
    0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
    100% { background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px; }
}

/* Hide shimmer when image loads */
.movie-poster[loading="lazy"]:not([src=""]) {
    background-image: none;
    animation: none;
}

/* Smooth fade-in when image loads */
.movie-poster.loaded {
    opacity: 1;
}

.movie-poster:not(.loaded) {
    opacity: 0.7;
}

/* Performance optimizations */
.movie-poster {
    will-change: opacity;
    contain: layout style paint;
}

/* Critical images should load immediately */
.movie-card:nth-child(-n+3) .movie-poster {
    opacity: 1;
}

/* Movie Title - Giới hạn 2 dòng */
.movie-card h3.movie-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    padding: 0.6rem 0.8rem; /* Padding nhỏ hơn */

    /* Giới hạn 2 dòng */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Cho phép xuống dòng */
    word-break: break-word; /* Ngắt từ dài */

    /* Thiết lập chiều cao phù hợp */
    line-height: 1.2;
    height: 2.6rem; /* Giảm chiều cao để chỉ vừa 2 dòng */
    max-height: 2.6rem; /* Đảm bảo không vượt quá */
    box-sizing: border-box;
}





/* Movie Poster Container */
.movie-poster-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

/* Video Card Badge */
.video-card-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: linear-gradient(135deg, #fea016 0%, #ff8c00 100%);
    color: rgba(255, 255, 255, 0.95);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(254, 160, 22, 0.4);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Hover effects for video card badge */
.movie-card:hover .video-card-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(254, 160, 22, 0.6);
}

/* Filter Tabs for Top Videos */
.filter-tabs {
    display: flex;
    gap: 0.8rem; /* Tăng gap cho desktop */
    margin: 1.5rem 0 2rem 0;
    flex-wrap: wrap;
    justify-content: center; /* Căn giữa cho tất cả kích thước */
    align-items: center;
}

.tab-btn {
    background-color: #333;
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    min-height: 44px; /* Touch-friendly minimum size */
    min-width: 80px;
    text-align: center;
    user-select: none; /* Prevent text selection on touch */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
}

.tab-btn:hover {
    background-color: #fea016;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 160, 22, 0.3);
}

.tab-btn.active {
    background-color: #fea016;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 160, 22, 0.4);
}

.tab-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(254, 160, 22, 0.3);
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .tab-btn:hover {
        transform: none; /* Remove hover transform on touch devices */
    }

    .tab-btn:active {
        background-color: #fea016;
        transform: scale(0.98);
        transition: all 0.1s ease;
    }
}

/* Loading States */
#movies-container {
    position: relative;
    min-height: 300px;
}

.loading {
    color: #cccccc;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
}

.loading i {
    color: #fea016;
    font-size: 1.5rem;
    animation: spin 1s linear infinite;
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    background-color: #333;
    color: #ffffff;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.pagination-btn:hover:not(.disabled) {
    background-color: #fea016;
    transform: translateY(-2px);
}

.pagination-btn.disabled {
    background-color: #1a1a1a;
    color: #666;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-number {
    background-color: #333;
    color: #ffffff;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 40px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.page-number:hover:not(.dots) {
    background-color: #555;
    transform: translateY(-2px);
}

.page-number.active {
    background-color: #fea016;
    color: #ffffff;
}

.page-number.dots {
    background: none;
    color: #999;
    cursor: default;
    padding: 0.8rem 0.5rem;
}

.page-number.dots:hover {
    background: none;
    transform: none;
}

/* Hot Keywords Section */
.hot-keywords-section {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #333;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.keyword-tag {
    background: linear-gradient(135deg, #333 0%, #2a2a2a 100%);
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid #444;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.keyword-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.keyword-tag:hover {
    background: linear-gradient(135deg, #fea016 0%, #e6900f 100%);
    border-color: #fea016;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(254, 160, 22, 0.4);
}

.keyword-tag:hover::before {
    left: 100%;
}

.keyword-tag:nth-child(odd) {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border-color: #3a3a3a;
}

.keyword-tag:nth-child(3n) {
    background: linear-gradient(135deg, #444 0%, #333 100%);
    border-color: #555;
}

.keyword-tag:nth-child(5n) {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-color: #2a2a2a;
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    text-align: center;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #fea016;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffffff;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #333;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #fea016;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #999;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-list {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .search-box {
        min-width: 200px;
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .header-top {
        justify-content: space-between;
        margin-bottom: 0;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.3rem;
    }

    .logo i {
        font-size: 1.6rem;
    }

    .desktop-search {
        display: none;
    }

    .mobile-menu-toggle,
    .mobile-search-toggle {
        display: block;
        z-index: 10;
    }

    .header-bottom {
        display: none;
        margin-top: 1rem;
        border-top: 1px solid #333;
        padding-top: 1rem;
    }

    .header-bottom.active {
        display: block;
    }

    .nav-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
        align-items: center;
    }

    .nav-link {
        text-align: center;
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        border-radius: 20px;
        line-height: 1.2;
    }

    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .filter-tabs {
        gap: 0.8rem;
        margin: 1rem 0 1.5rem 0;
        justify-content: center; /* Căn giữa các tab buttons */
        flex-wrap: wrap; /* Cho phép wrap nếu cần */
        padding: 0.6rem 1rem;
        /* Remove overflow scroll for tablet - use center layout instead */
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 0.7rem 1.6rem;
        font-size: 0.9rem;
        white-space: nowrap;
        flex: 0 0 auto; /* Không grow/shrink, tự động width */
        min-width: 100px; /* Minimum width cho tablet */
        min-height: 44px; /* Touch-friendly minimum size */
        border-radius: 22px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tab-btn:first-child {
        margin-left: 0;
    }

    .tab-btn:last-child {
        margin-right: 0;
    }

    #movies-container {
        min-height: 250px;
    }

    .loading {
        font-size: 0.9rem;
        gap: 0.6rem;
    }

    .loading i {
        font-size: 1.3rem;
    }

    .pagination {
        gap: 0.5rem;
        margin: 2rem 0;
    }

    .pagination-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .page-number {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        min-width: 35px;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .filter-tabs {
        gap: 0.5rem;
        padding: 0.6rem 0.8rem;
        margin: 0.8rem 0 1.2rem 0;
        justify-content: center;
        flex-wrap: wrap;
    }

    .tab-btn {
        padding: 0.6rem 1.1rem;
        font-size: 0.85rem;
        border-radius: 20px;
        font-weight: 600;
        min-height: 44px; /* Touch-friendly minimum size */
        min-width: 120px; /* Đảm bảo text hiển thị đầy đủ */
        /* Cưỡng chế layout 2 buttons per row */
        flex: 1 1 calc(50% - 0.25rem); /* Chính xác 50% width trừ gap */
        max-width: calc(50% - 0.25rem); /* Ngăn mở rộng quá 50% */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    #movies-container {
        min-height: 200px;
    }

    .loading {
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .loading i {
        font-size: 1.2rem;
    }
}

/* Small mobile devices (375px and down) */
@media (max-width: 375px) {
    .filter-tabs {
        gap: 0.5rem;
        padding: 0.6rem 0.8rem;
        margin: 0.8rem 0 1.2rem 0;
        justify-content: center;
        flex-wrap: wrap; /* Cho phép buttons xuống dòng */
    }

    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        border-radius: 20px;
        font-weight: 600;
        min-height: 44px; /* Touch-friendly minimum size */
        min-width: 115px; /* Đảm bảo text hiển thị đầy đủ */
        /* Cưỡng chế layout 2 buttons per row */
        flex: 1 1 calc(50% - 0.25rem); /* Chính xác 50% width trừ gap */
        max-width: calc(50% - 0.25rem); /* Ngăn mở rộng quá 50% */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    #movies-container {
        min-height: 200px;
    }

    .loading {
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .loading i {
        font-size: 1.2rem;
    }
}

/* Very small devices (phones, 320px and down) */
@media (max-width: 320px) {
    .filter-tabs {
        gap: 0.3rem;
        padding: 0.5rem 0.6rem;
        margin: 0.6rem 0 1rem 0;
        justify-content: center;
        flex-wrap: wrap;
    }

    .tab-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
        border-radius: 18px;
        font-weight: 600;
        min-height: 42px; /* Slightly smaller for very small screens */
        min-width: 105px; /* Đảm bảo text hiển thị đầy đủ */
        /* Cưỡng chế layout 2 buttons per row với gap nhỏ */
        flex: 1 1 calc(50% - 0.15rem); /* Chính xác 50% width trừ gap */
        max-width: calc(50% - 0.15rem); /* Ngăn mở rộng quá 50% */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
    }

    .section-title {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    #movies-container {
        min-height: 180px;
    }

    .loading {
        font-size: 0.8rem;
        gap: 0.4rem;
    }

    .loading i {
        font-size: 1.1rem;
    }
}

    .footer-content {
        justify-content: center;
        text-align: center;
    }

    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .section-header {
        text-align: left;
    }

    .hot-keywords-section {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }

    .keywords-container {
        gap: 0.6rem;
    }

    .keyword-tag {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.1rem;
    }

    .logo i {
        font-size: 1.4rem;
    }

    .mobile-menu-toggle,
    .mobile-search-toggle {
        font-size: 1.3rem;
    }

    /* Movie Title Mobile */
    .movie-card h3.movie-title {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem; /* Padding nhỏ hơn cho mobile */
        height: 2.2rem; /* Giảm chiều cao cho mobile */
        max-height: 2.2rem; /* Đảm bảo không vượt quá */
        line-height: 1.1;
    }

    .nav-list {
        gap: 0.3rem;
    }

    .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .dropdown-toggle {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        line-height: 1.2;
        border-radius: 20px;
    }

    /* Navigation Dropdown Mobile */
    .nav-dropdown {
        width: 100%;
        order: 999; /* Đẩy xuống cuối để dropdown hiển thị ở dòng mới */
    }

    .nav-dropdown-content {
        position: static;
        display: none;
        background-color: #1a1a1a;
        box-shadow: none;
        border: none;
        border-radius: 10px;
        margin: 0.5rem 0;
        width: 100%;
    }

    .nav-dropdown-content.show {
        display: block;
    }

    .nav-dropdown-content a {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        border-bottom: 1px solid #333;
        text-align: center;
    }

    .nav-dropdown-content a:last-child {
        border-bottom: none;
    }
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: "›";
    margin: 0 0.5rem;
    color: #666;
    font-size: 1.1rem;
}

.breadcrumb-item a {
    color: #fea016;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.breadcrumb-item.active span {
    color: #cccccc;
    font-size: 0.9rem;
}

.breadcrumb-item i {
    font-size: 0.8rem;
}

/* Video Page Styles */
.video-section {
    margin-bottom: 3rem;
}

.video-header {
    margin-bottom: 1.5rem;
}

.video-title {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: bold;
}

.video-stats-actions {
    background-color: #2a2a2a;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.views-btn {
    background-color: #333;
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.like-btn {
    background-color: #333;
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.like-btn:hover {
    background-color: #fea016;
    transform: translateY(-2px);
}

.like-btn.liked {
    background-color: #e74c3c;
    color: white;
}

.like-btn.liked:hover {
    background-color: #c0392b;
}

.like-count {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.3rem;
}

.like-btn.liked .like-count {
    background-color: rgba(255, 255, 255, 0.3);
}

.like-btn.liked i {
    color: #ffffff;
}

.like-btn.liked i:before {
    content: "\f004"; /* fas fa-heart (solid heart) */
    font-weight: 900;
}

.video-player-container {
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.server-selector {
    background-color: #2a2a2a;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.server-label {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.95rem;
}

.server-btn {
    background-color: #333;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.server-btn:hover {
    background-color: #555;
    transform: translateY(-1px);
}

.server-btn.active {
    background-color: #fea016;
    color: white;
}

.video-player {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.movie-info-section {
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.movie-details h2 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.movie-details h2 i {
    color: #fea016;
}

.movie-description {
    color: #cccccc;
    line-height: 1.8;
    font-size: 1rem;
}

.movie-description p {
    margin-bottom: 1.5rem;
}

.movie-description a {
    color: #fea016;
    text-decoration: none;
}

.movie-tags {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

.tag-group {
    margin-bottom: 1.5rem;
}

.tag-label {
    color: #fea016;
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.8rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    background-color: #333;
    color: #ffffff;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag:hover {
    background-color: #fea016;
    transform: translateY(-2px);
}

/* Recommended Movies Section */
.recommended-section {
    margin-top: 3rem;
}

.view-more-container {
    text-align: center;
    margin-top: 2rem;
}

.view-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #fea016;
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.view-more-link:hover:not(.loading) {
    background-color: #e6900f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 160, 22, 0.3);
}

.view-more-link:hover:not(.loading) .btn-icon {
    transform: translateX(3px);
}

.view-more-link.loading {
    background-color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.view-more-link .btn-icon {
    transition: transform 0.3s ease;
}

.view-more-link .loading-spinner {
    display: none;
}

.view-more-link .loading-spinner i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading state animations */
.view-more-link.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Success state */
.view-more-link.success {
    background-color: #28a745;
}

.view-more-link.success:hover {
    background-color: #218838;
}

/* 404 Error Page Styles */
.error-section {
    padding: 4rem 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    max-width: 800px;
    margin: 0 auto;
}

.error-animation {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.error-animation.animate {
    opacity: 1;
    transform: translateY(0);
}

.error-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.error-number .four {
    font-size: 8rem;
    font-weight: bold;
    color: #fea016;
    text-shadow: 0 4px 8px rgba(254, 160, 22, 0.3);
    animation: bounce 2s infinite;
}

.error-number .zero {
    font-size: 6rem;
    color: #fea016;
    animation: pulse 2s infinite;
}

.error-film-reel {
    margin-top: 1rem;
}

.error-film-reel .spinning {
    font-size: 3rem;
    color: #666;
    animation: spin 3s linear infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.error-title {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: bold;
}

.error-description {
    font-size: 1.2rem;
    color: #cccccc;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #fea016;
    color: white;
}

.btn-primary:hover {
    background-color: #e6900f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 160, 22, 0.3);
}

.btn-secondary {
    background-color: #333;
    color: white;
}

.btn-secondary:hover {
    background-color: #555;
    transform: translateY(-2px);
}

.error-suggestions {
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.error-suggestions h3 {
    color: #fea016;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.error-suggestions ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
}

.error-suggestions li {
    background-color: #333;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.error-suggestions li:hover {
    background-color: #fea016;
    transform: translateY(-2px);
}

.error-suggestions a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: color 0.3s ease;
}

.error-suggestions a:hover {
    color: white;
}

.popular-movies-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

/* Video Page Responsive */
@media (max-width: 768px) {
    .video-title {
        font-size: 1.8rem;
    }

    .video-stats-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0.8rem;
    }

    .views-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .like-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .like-count {
        font-size: 0.75rem;
        padding: 0.15rem 0.4rem;
    }

    .server-selector {
        padding: 0.8rem;
        gap: 0.5rem;
    }

    .server-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .movie-info-section {
        padding: 1.5rem;
    }

    .movie-details h2 {
        font-size: 1.5rem;
    }

    .movie-description {
        font-size: 0.95rem;
    }

    .tag-label {
        font-size: 1rem;
    }

    .tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .view-more-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .view-more-link .loading-spinner {
        font-size: 0.8rem;
    }

    /* 404 Page Mobile */
    .error-section {
        padding: 2rem 0;
        min-height: 50vh;
    }

    .error-number .four {
        font-size: 5rem;
    }

    .error-number .zero {
        font-size: 4rem;
    }

    .error-title {
        font-size: 1.8rem;
    }

    .error-description {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary, .btn-secondary {
        width: 200px;
        justify-content: center;
    }

    .error-suggestions {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .error-suggestions ul {
        grid-template-columns: 1fr;
    }

    .breadcrumb {
        padding: 0.5rem 0;
        margin-bottom: 1rem;
    }

    .breadcrumb-item a,
    .breadcrumb-item span {
        font-size: 0.8rem;
    }
}

    .footer-content {
        justify-content: center;
        text-align: center;
    }



    /* Video Card Badge Mobile */
    .video-card-badge {
        top: 0.3rem;
        left: 0.3rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }

    .pagination-btn span {
        display: none;
    }

    .pagination-btn {
        padding: 0.6rem;
        min-width: 40px;
        justify-content: center;
    }

    .pagination-numbers {
        gap: 0.3rem;
    }

    .page-number {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
        min-width: 30px;
    }

    .keywords-container {
        gap: 0.4rem;
    }

    .keyword-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   ARTICLE CONTENT STYLES - Migrated from PHP files
   ======================================== */

/* Article container styles with harmonious giaodien36 orange theme colors */
.article-container article {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.6;
    margin: 0 auto;
    color: #ffeaa7;
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

/* Header section styling */
.article-container article header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(254, 160, 22, 0.1);
}

/* Main heading (H1) */
.article-container article h1 {
    font-size: 28px;
    margin-bottom: 12px;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.3;
}

/* Lead paragraph styling */
.article-container article .lead {
    font-size: 18px;
    line-height: 1.7;
    color: #ffd280;
    margin-bottom: 0;
    font-weight: 400;
}

/* Section headings (H2) */
.article-container article h2 {
    font-size: 22px;
    margin-top: 32px;
    margin-bottom: 12px;
    color: #ffffff;
    border-left: 4px solid #ffb733;
    padding-left: 12px;
    font-weight: 600;
}

/* Regular paragraphs */
.article-container article p {
    margin-bottom: 16px;
    color: #ffeaa7;
    line-height: 1.7;
}

/* Strong/bold text */
.article-container article strong {
    color: #ffffff;
    font-weight: 600;
}

/* Emphasized text */
.article-container article em {
    color: #ffd280;
    font-style: italic;
}

/* Lists */
.article-container article ul {
    margin: 0 0 16px 20px;
    padding-left: 8px;
}

.article-container article ul li {
    margin-bottom: 8px;
    color: #ffeaa7;
    line-height: 1.6;
}

/* Links */
.article-container article a {
    color: #ffcc66;
    text-decoration: none;
    border-bottom: 1px dotted #ffcc66;
    transition: all 0.3s ease;
    font-weight: 500;
}

.article-container article a:hover {
    color: #fff0b3;
    border-bottom-color: #fff0b3;
    border-bottom-style: solid;
}

/* Table of Contents */
.article-container .toc {
    background-color: #262626;
    border: 1px solid rgba(255, 215, 128, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-container .toc strong {
    color: #ffb733;
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 12px;
}

.article-container .toc ol {
    margin: 0;
    padding-left: 20px;
    counter-reset: toc-counter;
}

.article-container .toc li {
    margin-bottom: 8px;
    color: #ffeaa7;
    line-height: 1.5;
}

.article-container .toc a {
    color: #ffcc66;
    border-bottom: 1px dotted rgba(255, 204, 102, 0.4);
    font-weight: 400;
    text-decoration: none;
}

.article-container .toc a:hover {
    color: #fff0b3;
    border-bottom-color: #fff0b3;
}

/* Footer */
.article-container footer {
    margin-top: 32px;
    font-size: 14px;
    border-top: 1px solid rgba(254, 160, 22, 0.2);
    padding-top: 16px;
    color: #94a3b8;
    font-style: italic;
    background: rgba(26, 26, 26, 0.3);
    padding: 16px;
    border-radius: 6px;
}

/* Sections */
.article-container article section {
    margin-bottom: 24px;
}
