/* Universal Box Sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}


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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: #121212;
}

/* Header */
.header {
    background: #1e1e1e;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1200; /* Ensure header is above other content */
}

.logo-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.nav {
    display: flex;
    gap: 2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    height: auto;
    line-height: 1.2;
    box-sizing: border-box;
}

.nav-link:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.nav-link.active {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: #ff6b6b;
    border-radius: 1px;
}

/* Genre Dropdown */
.genre-dropdown {
    position: relative;
    display: inline-block;
}

.genre-btn {
    background: none;
    border: none;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: white;
    text-decoration: none;
    height: auto;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
}

.genre-btn:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.genre-btn.active {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
    font-weight: 600;
}

.genre-dropdown-menu {
    overflow: hidden;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    min-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1101; /* Ensure it's above the language dropdown and ads */
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.genre-dropdown:hover .genre-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.genre-option {
    display: block;
    color: white;
    padding: 0.75rem 0.5rem;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.8rem;
    white-space: nowrap;
    border-bottom: 1px solid rgba(68, 68, 68, 0.5);
    text-align: center;
}

.genre-option:hover {
    background: #ff6b6b;
}

.genre-option:not(:nth-child(4n)) {
    border-right: 1px solid rgba(68, 68, 68, 0.5);
}

.genre-option:nth-child(n+17) {
    border-bottom: none;
}

.genre-option:nth-child(1) {
    border-radius: 8px 0 0 0;
}

.genre-option:nth-child(4) {
    border-radius: 0 8px 0 0;
}

.genre-option:nth-child(17) {
    border-radius: 0 0 0 8px;
}

.genre-option:nth-child(20) {
    border-radius: 0 0 8px 0;
}

/* Mobile/Desktop Responsive Nav */
.mobile-only {
    display: none;
}

.desktop-nav {
    display: flex;
}

/* Hide burger button on desktop only */
@media (min-width: 1025px) {
    .burger-btn {
        display: none !important;
    }
}

/* Mobile Landscape - Force burger menu */
@media (max-height: 499px) and (min-width: 480px) {
    .desktop-nav {
        display: none !important;
    }

    .burger-btn {
        display: flex !important;
    }

    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 1rem;
        height: auto;
        min-height: 50px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .header-actions {
        margin-left: 0;
        gap: 0.75rem;
    }

    .search-input {
        width: 150px;
        padding: 0.4rem 2rem 0.4rem 0.8rem;
    }
}

/* iPad Portrait & Landscape - Tablet optimization */
@media (min-width: 768px) and (max-width: 1024px) {
    .desktop-nav {
        display: none !important;
    }

    .burger-btn {
        display: flex !important;
    }

    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 2rem;
        height: auto;
    }

    .logo {
        font-size: 1.5rem;
    }

    .header-actions {
        margin-left: 0;
        gap: 1rem;
    }

    .search-input {
        width: 200px;
    }

    /* Language dropdown tablet fix */
    .lang-dropdown {
        right: -5px;
        min-width: 140px;
    }

    /* Mobile click state for tablets */
    .language-switcher.mobile-active .lang-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* iPad specific movie grid - 2 columns */
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .main {
        padding: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

/* Burger Button */
.burger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    margin-left: auto;
}

.burger-line {
    width: 100%;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger-btn.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-btn.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-btn.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* Search Container */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: #2a2a2a;
    border: 1px solid #444;
    color: white;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border-radius: 20px;
    width: 200px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: #ff6b6b;
}

.search-input::placeholder {
    color: #888;
}

.search-btn {
    position: absolute;
    right: 0.25rem;
    background: transparent;
    border: none;
    color: #888;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s ease;
    border-radius: 50%;
}

.search-btn:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.lang-btn {
    background: #2a2a2a;
    border: 1px solid #444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: #333;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1100;
    margin-top: 0.5rem;
}

.language-switcher:hover .lang-dropdown,
.language-switcher:focus-within .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Disable hover on mobile and tablet to prevent conflicts */
@media (max-width: 1024px) {
    .language-switcher:hover .lang-dropdown,
    .language-switcher:focus-within .lang-dropdown {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
    }
}

.lang-option {
    display: block;
    color: white;
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.lang-option:hover {
    background: #ff6b6b;
}

.lang-option:first-child {
    border-radius: 8px 8px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 8px 8px;
}

/* Main Content */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}



/* Hero Section */
.hero {
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-bottom: 15px;
}

/* Movies Section */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

/* Movie Grid - Desktop (4 columns) */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Movie Link Wrapper */
.movie-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    /* Apply border-radius and overflow here to clip content */
    border-radius: 8px;
    overflow: hidden;
}

/* Movie Card */
.movie-card {
    position: relative; /* Make this a positioning context */
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Default overflow */
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

/* Movie Poster Wrapper - Uses CSS custom property for consistent aspect ratio */
.movie-poster-wrapper {
    position: relative;
    overflow: hidden; /* Clip the image inside */
    border-radius: 8px 8px 0 0;
    aspect-ratio: var(--img-aspect-ratio, 4/3);
}

.movie-poster {
    width: 100%;
    height: 100%;
    display: block;
    background: #2a2a2a;
    object-fit: cover;
}

.movie-genre {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.movie-title {
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.load-more-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff5252, #ff4444);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.load-more-btn:hover .load-more-icon {
    transform: scale(1.1);
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.pagination-btn:hover {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.pagination-btn:active {
    transform: translateY(0);
}

.pagination-icon {
    font-size: 1.1rem;
    font-weight: bold;
}

.pagination-text {
    font-size: 0.85rem;
}

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

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.pagination-number:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    border-color: rgba(255, 107, 107, 0.5);
}

.pagination-number.active {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    border-color: #ff5252;
}

.pagination-number.active:hover {
    background: linear-gradient(135deg, #ff5252, #ff4444);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
}

.pagination-dots {
    color: #b0b0b0;
    font-weight: bold;
    padding: 0 0.25rem;
    font-size: 0.9rem;
}

/* Ranking Section Styles */
.ranking-section {
    margin-bottom: 3rem;
}

/* New Ranking Grid Layout */
.ranking-grid-new {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Hàng đầu tiên chứa video top 1 */
.ranking-row-first {
    display: flex;
    justify-content: center;
}

.ranking-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.ranking-row-first {
    justify-content: center;
}

.ranking-row-others {
    justify-content: center;
    flex-wrap: wrap;
}

/* Ensure all ranking cards have same size */
.ranking-card {
    flex: 0 0 auto;
    width: calc(100% / 5);
    position: relative;
    /* Allow icon to overflow */
    overflow: visible;
}

/* Make Top 1 movie stand out */
.ranking-row-first .ranking-card {
    width: calc(100% / 3); /* Larger width for top 1 */
}

/* Ranking Icon Styles */
.ranking-icon {
    position: absolute;
    top: -15px;
    left: -15px;
    z-index: 20;
    height: 60px;
    width: auto;
    object-fit: contain;
    pointer-events: none;
}

/* Specific style for the #1 rank icon to make it larger */
.ranking-badge-1 .ranking-icon {
    height: 90px;
}

/* Wrapper styles for positioning */
.ranking-badge-1,
.ranking-badge-2,
.ranking-badge-3,
.ranking-badge-4,
.ranking-badge-5 {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.ranking-number {
    font-family: 'Arial Black', Arial, sans-serif;
    line-height: 1;
}

.ranking-crown {
    font-size: 0.8rem;
    margin-left: 0.1rem;
}

/* Ranking Card Hover Effects */
.ranking-card:hover .ranking-badge {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.ranking-badge-1:hover {
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

/* Ranking Featured Poster - Consistent aspect ratio with custom property */
.ranking-featured .movie-poster-wrapper {
    position: relative;
    overflow: visible;
    aspect-ratio: var(--img-aspect-ratio, 4/3);
}



.ranking-featured .movie-poster {
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: var(--img-aspect-ratio, 4/3);
}

.ranking-featured:hover .movie-poster {
    transform: scale(1.05);
}

/* Ranking View More Button Styles */
.ranking-view-more {
    margin-top: 2rem;
    text-align: center;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 14px 28px;
    background: #1e1e1e;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border: 2px solid #333;
    position: relative;
    overflow: hidden;
}

.view-more-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    border-color: var(--accent-color);
    background: #2a2a2a;
}

.view-more-text {
    font-weight: 600;
}

.view-more-icon {
    transition: transform 0.2s ease;
    font-size: 0.9rem;
    color: var(--accent-color);
}

.view-more-btn:hover .view-more-icon {
    transform: translateX(4px);
}

/* Keywords Section Styles */
.keywords-section {
    margin-bottom: 3rem;
    padding: 2.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    color: #b0b0b0;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    white-space: nowrap;
}

.keyword-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 107, 107, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.keyword-tag:active {
    transform: translateY(0);
}




/* Hashtag style - simple and clean */

/* Bottom Sheet */
.bottom-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bottom-sheet-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1e1e1e;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 1rem 0 0.5rem 0;
    cursor: pointer;
}

.handle-bar {
    width: 40px;
    height: 4px;
    background: #666;
    border-radius: 2px;
}

.bottom-sheet-content {
    padding: 0 1.5rem 2rem 1.5rem;
}

.bottom-sheet-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Nav Cards Grid */
.nav-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.nav-card {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-card:hover {
    background: #333;
    border-color: #ff6b6b;
    transform: translateY(-2px);
}

.nav-card.active {
    background: #333;
    border-color: #ff6b6b;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}

.nav-card.active .nav-card-icon {
    color: #ff6b6b;
}

.nav-card-icon {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.nav-card-text {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Genre Section */
.genre-section {
    border-top: 1px solid #333;
    padding-top: 1.5rem;
}

.genre-section-title {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.genre-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.genre-card {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: white;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.genre-card:hover {
    background: #ff6b6b;
    transform: scale(1.02);
}

/* Footer */
.footer {
    background: #1e1e1e;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Mobile Responsive - 2 columns */
@media (max-width: 767px) {
    .header {
        display: grid;
        grid-template-rows: auto auto;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 1rem 0;
        padding: 1rem;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-only {
        display: flex;
    }

    /* Row 1: Logo + Burger */
    .logo-link {
        grid-row: 1;
        grid-column: 1;
        justify-self: start;
        order: unset;
    }

    .burger-btn {
        grid-row: 1;
        grid-column: 2;
        justify-self: end;
        margin-left: 0;
        order: unset;
        width: 2.5rem;
        height: 2.5rem;
        padding: 0.75rem;
    }

    .burger-line {
        height: 3px;
    }

    /* Row 2: Language + Search */
    .header-actions {
        grid-row: 2;
        grid-column: 1 / -1;
        justify-self: stretch;
        margin-left: 0;
        gap: 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        order: unset;
    }

    .language-switcher {
        order: 1;
    }

    .search-container {
        order: 2;
        flex: 1;
        max-width: 250px;
        margin-left: 1rem;
    }

    .search-input {
        width: 100%;
    }

    /* Language dropdown mobile fix */
    .lang-dropdown {
        right: -5px;
        min-width: 130px;
        margin-top: 0.25rem;
    }

    /* Mobile click state */
    .language-switcher.mobile-active .lang-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .movie-title {
        font-size: 0.85rem;
    }

    .load-more-btn {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
    }

    /* Pagination responsive - Tablet */
    .pagination {
        gap: 0.4rem;
        padding: 0.6rem 0.8rem;
    }

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

    .pagination-text {
        font-size: 0.8rem;
    }

    .pagination-number {
        width: 2rem;
        height: 2rem;
        font-size: 0.85rem;
    }

    .pagination-numbers {
        margin: 0 0.3rem;
        gap: 0.2rem;
    }

    /* Ranking Section - Tablet */
    .ranking-grid-new {
        gap: 1.2rem;
    }

    .ranking-row {
        gap: 1.2rem;
    }

    .ranking-card {
        width: calc(100% / 2.2);
    }

    .ranking-row-first .ranking-card {
        width: calc(100% / 1.5);
    }

    .ranking-badge {
        min-width: 2.5rem;
        height: 2.5rem;
        top: -12px;
        left: -12px;
    }

    .ranking-badge-1 {
        min-width: 3rem;
        height: 3rem;
        top: -15px;
        left: -15px;
    }

    /* Keywords Section - Tablet */
    .keywords-section {
        padding: 2rem 1.2rem;
        margin-bottom: 2.5rem;
    }

    .keywords-container {
        gap: 0.8rem;
        max-width: 800px;
    }

    .keyword-tag {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 18px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .header {
        display: grid;
        grid-template-rows: auto auto;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 0.75rem 0;
        padding: 0.75rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    /* Row 1: Logo + Burger */
    .logo-link {
        grid-row: 1;
        grid-column: 1;
        justify-self: start;
    }

    .burger-btn {
        grid-row: 1;
        grid-column: 2;
        justify-self: end;
        width: 2.5rem;
        height: 2.5rem;
        padding: 0.75rem;
    }

    .burger-line {
        height: 3px;
    }

    /* Row 2: Language + Search */
    .header-actions {
        grid-row: 2;
        grid-column: 1 / -1;
        justify-self: stretch;
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
        justify-content: space-between;
    }

    .language-switcher {
        order: 1;
        flex-shrink: 0;
    }

    .search-container {
        order: 2;
        flex: 1;
        max-width: 200px;
        margin-left: 0.75rem;
    }

    .search-input {
        width: 100%;
    }

    /* Language dropdown mobile fix for extra small screens */
    .lang-dropdown {
        right: -8px;
        min-width: 120px;
        margin-top: 0.2rem;
    }

    /* Mobile click state */
    .language-switcher.mobile-active .lang-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .movie-grid {
        gap: 0.75rem;
    }

    .movie-genre {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }

    .load-more-btn {
        font-size: 0.85rem;
        padding: 0.75rem 1.25rem;
    }

    /* Pagination responsive - Mobile */
    .pagination {
        gap: 0.3rem;
        padding: 0.5rem 0.6rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }

    .pagination-text {
        display: none; /* Hide text on very small screens */
    }

    .pagination-icon {
        font-size: 1rem;
    }

    .pagination-number {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 0.8rem;
    }

    .pagination-numbers {
        margin: 0 0.2rem;
        gap: 0.15rem;
    }

    .pagination-dots {
        font-size: 0.8rem;
        padding: 0 0.15rem;
    }

    /* Ranking Section - Mobile */
    .ranking-grid-new {
        gap: 1rem;
    }

    .ranking-row {
        gap: 1rem;
        justify-content: center;
    }

    .ranking-row-first {
        justify-content: center;
    }

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

    .ranking-badge {
        min-width: 2rem;
        height: 2rem;
        top: -10px;
        left: -10px;
    }

    .ranking-badge-1 {
        min-width: 2.5rem;
        height: 2.5rem;
        top: -12px;
        left: -12px;
    }

    .ranking-crown {
        font-size: 0.7rem;
    }

    /* Ranking View More Button - Mobile */
    .ranking-view-more {
        margin-top: 1.5rem;
    }

    .view-more-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        gap: 0.4rem;
    }

    .view-more-icon {
        font-size: 0.8rem;
    }

    /* Keywords Section - Mobile */
    .keywords-section {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
        border-radius: 15px;
    }

    .keywords-container {
        gap: 0.6rem;
        justify-content: center;
        max-width: 100%;
    }

    .keyword-tag {
        padding: 0.45rem 0.9rem;
        font-size: 0.75rem;
        border-radius: 16px;
    }
}

/* ===== VIDEO PAGE STYLES ===== */

/* Video Main Layout */
.video-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #1e1e1e;
    border-radius: 8px;
    border: 1px solid #333;
}

.breadcrumb-link {
    color: #ff6b6b;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.breadcrumb-link:hover {
    color: #ff5252;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #666;
    font-size: 0.8rem;
}

.breadcrumb-current {
    color: #e0e0e0;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Video Section Layout */
.video-section {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Video Container (Left Side) */
.video-container {
    background: #1e1e1e;
    border-radius: 12px;
    border: 1px solid #333;
    overflow: hidden;
}

/* Movie Header */
.movie-header {
    padding: 1.5rem;
    border-bottom: 1px solid #333;
}

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



/* Video Player */
.video-player-wrapper {
    padding: 1.5rem;
}

.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    cursor: pointer;
    transition: background 0.3s ease;
}

.video-placeholder:hover {
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
}

.play-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #ff6b6b;
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
    color: #ff5252;
}

.play-icon {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.play-text {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Server Selection */
.server-selection {
    background: #2a2a2a;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #444;
}



.server-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.server-btn {
    background: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #444;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.server-btn:hover {
    background: #333;
    border-color: #ff6b6b;
}

.server-btn.active {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* Movie Actions */
.movie-actions {
    padding: 1.5rem;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.action-stats span {
    color: #b0b0b0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #333;
    border-color: #ff6b6b;
    transform: translateY(-1px);
}

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

.views-display {
    padding-top: 0.65rem;      /* Adjust vertical padding */
    padding-bottom: 0.65rem;   /* Adjust vertical padding */
}

.action-btn.non-clickable {
    cursor: default; /* Keep the cursor as default */
}

.action-btn.non-clickable:hover {
    background: #2a2a2a; /* Prevent background color change on hover */
    border-color: #444; /* Prevent border color change on hover */
    transform: none; /* Prevent transform on hover */
}

/* Movie Details Sidebar (Right Side) */
.movie-details {
    background: #1e1e1e;
    border-radius: 12px;
    border: 1px solid #333;
    overflow: hidden;
    height: fit-content;
    position: sticky;
    top: 2rem;
}









/* Movie Info */
.movie-info {
    padding: 1.5rem;
}

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

.movie-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.genre-tag {
    background: #2a2a2a;
    color: #e0e0e0;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid #444;
}

/* Movie Plot */
.movie-plot {
    margin-bottom: 2rem;
}

.plot-title {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.plot-text {
    color: #b0b0b0;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Movie Details Grid */
.movie-details-grid {
    display: grid;
    gap: 0.75rem;
}

.detail-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(68, 68, 68, 0.3);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-value a {
    color: inherit; /* Inherit color from parent */
    text-decoration: none; /* Remove underline */
    transition: color 0.2s ease;
}

.detail-value a:hover {
    color: #ff6b6b; /* Highlight color on hover */
    text-decoration: none; /* Remove underline on hover */
}

.detail-label {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

.detail-value {
    color: #e0e0e0;
    font-size: 0.9rem;
}

/* Related Movies Section */
.related-movies {
    margin-top: 3rem;
}

.related-movies .section-title {
    margin-bottom: 2rem;
}

/* Mobile Responsive for Video Page */
@media (max-width: 1199px) {
    .video-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .video-container {
        order: 1;
    }

    .movie-details {
        position: static;
        order: 2;
    }
}

@media (max-width: 600px) {
    .ranking-row-first .ranking-card {
        width: calc(100% / 1.6);
    }
}

@media (max-width: 425px) {
    .ranking-row-first .ranking-card {
        width: calc(100% / 1.5);
    }
}

@media (max-width: 767px) {
    /* Language dropdown mobile fix */
    .lang-dropdown {
        right: -55px;
        left: auto;
        min-width: 130px;
        margin-top: 0.25rem;
    }

    /* Mobile click state */
    .language-switcher.mobile-active .lang-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .video-main {
        padding: 1rem;
    }

    .breadcrumb {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .video-title {
        font-size: 1.5rem;
    }

    .movie-meta {
        gap: 0.5rem;
    }

    .movie-meta span {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .video-player-wrapper {
        padding: 1rem;
    }

    .server-selection {
        padding: 1rem;
    }

    .server-buttons {
        gap: 0.5rem;
    }

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

    .movie-actions {
        padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .action-stats {
        gap: 1rem;
    }

    .action-buttons {
        gap: 0.5rem;
    }

    .action-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        justify-content: center;
        min-width: 0;
    }

    .like-btn .like-text {
        display: inline !important;
    }

    .like-btn .like-count {
        display: inline !important;
    }

    .movie-info {
        padding: 1rem;
    }

    .detail-title {
        font-size: 1.3rem;
    }

    .detail-item {
        grid-template-columns: 100px 1fr;
        gap: 0.4rem;
    }

    .detail-label {
        font-size: 0.8rem;
    }

    .detail-value {
        font-size: 0.85rem;
    }

    .plot-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .play-icon {
        font-size: 3rem;
    }

    .play-text {
        font-size: 1rem;
    }



    .server-btn {
        padding: 0.6rem 0.8rem;
        text-align: center;
    }
}

/* ===== BOTTOM NAVIGATION BAR STYLES ===== */

/* Bottom Navigation Bar - Hidden on Desktop */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    border-top: 1px solid #444;
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 9999;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.bottom-nav-bar.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* Drag-to-close functionality */
.bottom-sheet.dragging {
    transition: none !important;
}

.bottom-sheet.dragging .bottom-sheet-content {
    transition: none !important;
}

.bottom-nav-bar.dragging {
    transition: none !important;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #b0b0b0;
    transition: all 0.3s ease;
    padding: 6px 8px;
    border-radius: 12px;
    cursor: pointer;
    min-width: 60px;
    position: relative;
}

/* Distribute space evenly for all items except the menu button */
.bottom-nav-item:not(.bottom-nav-menu) {
    flex: 1;
}




.bottom-nav-item.active {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
    border-radius: 12px;
    transform: translateY(-2px);
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.1);
    color: #ff6b6b;
}

.bottom-nav-item.active .bottom-nav-text {
    font-weight: 600;
}

.bottom-nav-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
    transition: transform 0.3s ease;
}



.bottom-nav-text {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    line-height: 1;
}

/* Special styling for MENU button */
.bottom-nav-menu {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    min-width: 56px; /* Override .bottom-nav-item's min-width */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0; /* Ensure no padding is affecting alignment */
    flex: none; /* Do not grow or shrink, size based on width/height */
}



.bottom-nav-menu .bottom-nav-icon {
    font-size: 1.6rem;
    margin: 0; /* Reset margin */
    padding: 0; /* Reset padding */
    line-height: 1; /* Prevent extra line height */
    display: flex;
    align-items: center;
    justify-content: center;
}



/* Language Grid Styling */
.language-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.language-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.language-card:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    transform: translateY(-2px);
}

.language-card.selected {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* Search Input Section */
.search-input-section {
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-input-field {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input-field:focus {
    outline: none;
    border-color: #ff6b6b;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.search-input-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-submit-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.search-submit-btn:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff7979 100%);
    transform: scale(1.05);
}

/* Search Keywords Grid */
.search-keywords-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.search-keyword {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    cursor: pointer;
}

.search-keyword:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    transform: translateY(-1px);
}

/* Responsive Media Queries for Bottom Navigation */
/* Show bottom navigation on tablet and mobile */
@media (max-width: 1024px) {
    .bottom-nav-bar {
        display: flex;
    }

    /* Hide desktop header on tablet/mobile */
    .header {
        display: none !important;
    }

    /* Add bottom padding to body to prevent content being hidden behind bottom nav */
    body {
        padding-bottom: 80px;
    }
}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .bottom-nav-item {
        min-width: 70px;
        padding: 8px 10px;
    }

    .bottom-nav-icon {
        font-size: 1.5rem;
    }

    .bottom-nav-text {
        font-size: 0.75rem;
    }

    .bottom-nav-menu {
        width: 60px;
        height: 60px;
        min-width: 60px; /* Override for circle shape */

    }

    .bottom-nav-menu .bottom-nav-icon {
        font-size: 1.7rem;
    }
}

/* Mobile specific adjustments */
@media (max-width: 767px) {
    .bottom-nav-item {
        min-width: 55px;
        padding: 6px 6px;
    }

    .bottom-nav-icon {
        font-size: 1.3rem;
    }

    .bottom-nav-text {
        font-size: 0.65rem;
    }

    .bottom-nav-menu {
        width: 52px;
        height: 52px;
        min-width: 52px; /* Override for circle shape */

    }

    .bottom-nav-menu .bottom-nav-icon {
        font-size: 1.5rem;
    }

    .bottom-nav-menu .bottom-nav-text {
        font-size: 0.55rem;
    }
}

/* Extra small mobile adjustments */
@media (max-width: 480px) {
    .bottom-nav-bar {
        padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    }

    .bottom-nav-item {
        min-width: 50px;
        padding: 4px 4px;
    }

    .bottom-nav-icon {
        font-size: 1.2rem;
        margin-bottom: 1px;
    }

    .bottom-nav-text {
        font-size: 0.6rem;
    }

    .bottom-nav-menu {
        width: 48px;
        height: 48px;
        min-width: 48px; /* Override for circle shape */

    }

    .bottom-nav-menu .bottom-nav-icon {
        font-size: 1.4rem;
    }

    .bottom-nav-menu .bottom-nav-text {
        font-size: 0.5rem;
        margin-top: 1px;
    }
}



/* ===== Skeleton Loading Animation ===== */
.skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.skeleton-row-first {
    display: flex;
    justify-content: center;
}

.skeleton-row-others {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.skeleton-card-large {
    width: calc(100% / 3);
}

.skeleton-card-small {
    width: calc((100% / 4) - 1.5rem);
}

.skeleton-poster {
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #2a2a2a;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.skeleton-title-line {
    width: 80%;
    height: 1rem;
    margin-top: 0.75rem;
    background-color: #2a2a2a;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

/* Shimmer Effect */
@keyframes shimmer-animation {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.skeleton-poster::after,
.skeleton-title-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    animation: shimmer-animation 1.5s infinite linear;
}

/* Responsive Skeleton */
@media (max-width: 1024px) {
    .skeleton-card-large {
        width: calc(100% / 1.5);
    }
    .skeleton-row-others {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
        width: 100%;
        max-width: 90%;
        margin: 0 auto;
    }
    .skeleton-card-small {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .skeleton-row-others {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .skeleton-card-large {
        width: calc(100% / 1.2);
    }
}


/* Skeleton Loading Styles */
.skeleton {
    background-color: #2c2c2c; /* Màu nền tối hơn cho skeleton */
    background-image: linear-gradient(
        90deg,
        #2c2c2c 0px,
        #3a3a3a 40px,
        #2c2c2c 80px
    );
    background-size: 600px;
    animation: skeleton-shine 1.6s infinite linear;
    border-radius: var(--radius-md, 8px);
}

.skeleton-poster {
    width: 100%;
    height: 100%; /* Sẽ co giãn theo movie-poster-wrapper */
    display: block;
}

.skeleton-text {
    width: 80%;
    height: 1.2em; /* Chiều cao tương đương với dòng chữ */
    display: inline-block;
    vertical-align: middle;
}

.movie-title .skeleton-text {
    width: 100%;
    height: 1.2em;
}


/* ===== Loading Overlay Styles ===== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#loading-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #444;
    border-top-color: #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes skeleton-shine {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

#top5-loading .movie-poster-wrapper {
    aspect-ratio: 2/3; /* Giữ đúng tỷ lệ cho poster */
    background-color: #2c2c2c;
	border-radius: var(--radius-md, 8px);
}

#top5-loading .movie-title {
    height: 42px; /* Chiều cao cố định cho tiêu đề để tránh layout shift */
    margin-top: 10px;
    display: flex;
    align-items: center;
}


/* ===== ARTICLE CONTAINER STYLES ===== */

/* Article Container - Main wrapper to avoid conflicts */
.article-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #1e1e1e;
    border-radius: 12px;
    border: 1px solid #333;
}

/* Article Element */
.article-container article {
    background: transparent;
}

/* Article Header */
.article-container header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
}

.article-container header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-container header .lead {
    font-size: 1rem;
    color: #b0b0b0;
    max-width: 800px;
    margin: 0 auto;
}

.article-container header .lead strong {
    color: #ff6b6b;
    font-weight: 600;
}

/* Table of Contents */
.article-container .toc {
    background: #2a2a2a;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
}

.article-container .toc strong {
    display: block;
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-container .toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-container .toc ol li {
    margin-bottom: 0.5rem;
}

.article-container .toc ol li:last-child {
    margin-bottom: 0;
}

.article-container .toc ol li a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-container .toc ol li a:hover {
    color: #ff6b6b;
}

/* Article Sections */
.article-container section {
    margin-bottom: 2.5rem;
}

.article-container section h2 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ff6b6b;
    display: inline-block;
}

.article-container section p {
    font-size: 1rem;
    line-height: 1.7;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
}

.article-container section p strong {
    color: #ff6b6b;
    font-weight: 600;
}

.article-container section p em {
    color: #b0b0b0;
    font-style: italic;
}

.article-container section ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-container section ul li {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #e0e0e0;
}

/* Article Links */
.article-container section a {
    color: #ff6b6b;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.article-container section a:hover {
    color: #ff5252;
    text-decoration: underline;
}

/* Article Footer */
.article-container footer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

.article-container footer p em {
    font-style: italic;
}

/* Responsive adjustments for Article */
@media (max-width: 767px) {
    .article-container {
        padding: 1rem;
    }

    .article-container header h1 {
        font-size: 2rem;
    }

    .article-container header .lead {
        font-size: 1rem;
    }

    .article-container section h2 {
        font-size: 1.8rem;
    }

    .article-container section p,
    .article-container section ul li {
        font-size: 1rem;
    }
}

/* ===== FILTER TABS STYLES ===== */

/* Filter Tabs Container */
.filter-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.5rem;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-tab {
    background: transparent;
    border: 1px solid #ff6b6b;
    color: #b0b0b0;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.filter-tab.active {
    background: #ff6b6b;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* Loading Container */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: #ff6b6b;
}

.css-loader {
    width: 40px;
    height: 40px;
    border: 4px solid #444;
    border-top-color: #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Filter Tabs */
@media (max-width: 767px) {
    .filter-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
        padding: 0.4rem;
    }

    .filter-tab {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        flex: 1;
        min-width: calc(50% - 0.2rem);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .filter-tabs {
        gap: 0.3rem;
    }

    .filter-tab {
        padding: 0.7rem 1rem;
    }
}