/*
Theme Name: POP Tv One
Author: Dilusha Disanayaka
Version: 1.0
*/

/* ========================================================================= */
/* START: ALL CUSTOM STYLES FOR POP TV ONE - V11.2 MASTER STYLESHEET (Unified Look)
/* ========================================================================= */

/* --- 1. Global & Header Styles --- */
html, body { 
    background-color: #141414; 
    color: #ffffff; 
    font-family: 'Poppins', sans-serif; 
    margin: 0; 
    overflow-x: hidden !important;
    max-width: 100vw;
}
a { color: #e50914 !important; text-decoration: none !important; }
a:hover { color: #ffffff !important; }

/* ... (Header and Menu styles remain exactly the same) ... */
.site-header {
    background-color: rgba(12, 13, 18, 0.9);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(51, 51, 51, 0.5);
    position: fixed; top: 0; left: 0; width: 100%; z-index: 99999;
    padding: 8px 4%; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box;
}
.site-branding a { color: #ffffff !important; font-size: 24px; font-weight: 700; text-decoration: none !important; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; }
.main-navigation li::before { display: none !important; content: none !important; }
.main-navigation li a {
    color: #b0b0b0 !important; font-size: 15px !important; font-weight: 500 !important; text-transform: uppercase; letter-spacing: 0.8px; text-decoration: none !important;
    transition: color 0.3s ease; position: relative; padding-bottom: 5px; display: flex; align-items: center; gap: 8px;
}
.main-navigation li a::before {
    font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 16px; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased;
    display: inline-block; font-style: normal; font-variant: normal; text-rendering: auto; line-height: 1;
}
/* Assigning the actual icon character based on the CSS class from the menu editor */
.main-navigation li.fa-home a::before { content: "\f015"; }
.main-navigation li.fa-question-circle a::before { content: "\f059"; }
.main-navigation li.fa-comment-dots a::before { content: "\f4ad"; }
.main-navigation li.fa-compass a::before { content: "\f14e"; }
.main-navigation li.fa-search a::before { content: "\f002"; }
.main-navigation li a:hover, .main-navigation .current-menu-item > a { color: #ffffff !important; }
.main-navigation .current-menu-item > a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background-color: #e50914; animation: loadIndicator 0.5s ease-out forwards;
}
@keyframes loadIndicator { from { width: 0; } to { width: 100%; } }

/* --- 3. Homepage Section --- */
.homepage-section { margin-bottom: 50px; padding: 0 50px; position: relative; }
.section-title a { font-size: 20px; font-weight: 700; color: #ffffff !important; text-decoration: none !important; margin-bottom: 20px; display: inline-block; }

/* === 4. THE UNIVERSAL "KissAsia Compact" LOOK for ALL Grids & Sliders === */
.grid-item { margin: 0 8px; }
.grid-item a { display: block; background: none; border-radius: 8px; overflow: visible; /* Allows hover effect to be seen */ text-decoration: none; transition: transform 0.3s ease; box-shadow: none; }
.grid-item a:hover { transform: scale(1.05); }

.grid-item-image-wrapper { position: relative; padding-top: 150%; background-color: #222; border-radius: 8px; overflow: hidden; }
.grid-item-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }

.grid-item-title {
    padding: 8px 12px !important; font-weight: 600; color: #cccccc !important; font-size: 13px !important; line-height: 1.4;
    text-align: left; transition: color 0.3s ease; white-space: normal !important; overflow: hidden !important;
    display: -webkit-box !important; -webkit-line-clamp: 2 !important; line-clamp: 2 !important; -webkit-box-orient: vertical !important;
    height: 44px !important; min-height: 44px !important; max-height: 44px !important;
    box-sizing: border-box !important;
}
.grid-item a:hover .grid-item-title { color: #e50914 !important; }

/* --- 5. Arrow Positioning for Sliders --- */
/* ... (Arrow code remains the same) ... */
.slick-prev, .slick-next { width: 40px; height: 100%; background: transparent !important; z-index: 10; }
.slick-prev { left: -50px; } .slick-next { right: -50px; }
.slick-prev:before, .slick-next:before { font-family: 'slick'; font-size: 30px !important; line-height: 1; color: #999 !important; opacity: 0; transition: all 0.3s ease-in-out; }
.slick-slider:hover .slick-prev:before, .slick-slider:hover .slick-next:before { opacity: 1; }
.slick-prev:hover:before, .slick-next:hover:before { color: #e50914 !important; }
.slick-disabled:before { display: none !important; }

/* === 8. THE NEW UNIFIED ARCHIVE PAGE STYLES === */
.archive-title { display: none !important; }
.grid-layout { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 20px; 
    padding: 20px 4%; 
}

/* --- 9. User Login/Profile Styles (V3 - Intelligent Click Dropdown) --- */

/* This section aligns the menu and the profile icon to the right */
.header-right-section {
    display: flex;
    align-items: center;
    gap: 40px; /* Space between the menu and the profile icon/button */
}

.site-user-actions {
    position: relative; /* Essential for the dropdown positioning */
}

/* --- Logged-Out User Styles --- */
.signin-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #333;
    color: #fff !important;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease;
}
.signin-button:hover {
    background-color: #e50914;
}

/* --- Logged-In User Styles --- */
.user-profile-menu {
    cursor: pointer;
}
.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* --- The Dropdown Itself (Hidden by default) --- */
.profile-dropdown {
    display: none; /* <-- HIDDEN BY DEFAULT */
    position: absolute;
    top: 120%;
    right: 0;
    background-color: #222;
    border-radius: 8px;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.7);
    z-index: 1000;
    padding: 0;
    overflow: hidden;
}

/* --- THE MAGIC FIX! --- */
/* When the .user-profile-menu has the 'active' class (added by JS), show the dropdown */
.user-profile-menu.active .profile-dropdown {
    display: block; /* <-- SHOWN ON CLICK! */
}

/* --- Styles for inside the dropdown --- */
.dropdown-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #1a1a1a;
}
.dropdown-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}
.dropdown-header strong {
    font-size: 16px;
    color: #fff;
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #ccc !important;
    border-top: 1px solid #333;
}
.profile-dropdown a.logout-link {
    color: #ff4d4d !important;
}
.profile-dropdown a:hover {
    background-color: #333;
    color: #fff !important;
}

/* --- 10. Explore & Archive Page "Compact Portrait" Grid Layout (DESKTOP ONLY) --- */

@media (min-width: 769px) {
    /* This styles the main grid container */
    #live-filter-results,
    .grid-layout {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
        padding: 20px 4%;
    }
}

/* We don't need to repeat the .grid-item styles, they are universal! */
/* So we just need to ensure the hover effects are applied */

/* === THIS IS THE SNIPPET YOU ASKED FOR! === */

/* This makes sure the portrait aspect ratio is applied on these pages */
#live-filter-results .grid-item-image-wrapper,
.grid-layout .grid-item-image-wrapper {
    padding-top: 150% !important; 
}

/* This makes sure the simple hover transition is applied */
#live-filter-results .grid-item a,
.grid-layout .grid-item a {
    transition: transform 0.3s ease;
}

/* This adds the ZOOM IN effect on hover */
#live-filter-results .grid-item a:hover,
.grid-layout .grid-item a:hover {
    transform: scale(1.05);
}

/* This makes sure the title has a smooth color transition */
#live-filter-results .grid-item-title,
.grid-layout .grid-item-title {
    transition: color 0.3s ease;
}

/* This makes the TITLE TURN RED on hover */
#live-filter-results .grid-item a:hover .grid-item-title,
.grid-layout .grid-item a:hover .grid-item-title {
    color: #e50914 !important;
}

/* --- 11. Custom Popup Maker "Glassmorphism" Theme (Final Polish) --- */

/* The background overlay (No Change) */
.pum-overlay {
    background-color: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* The main popup container (SIZE ADJUSTED!) */
.pum-container {
    max-width: 450px !important; /* <-- ලොකු ගතිය අඩු කළා (500px to 450px) */
    background-color: rgba(30, 30, 30, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6) !important;
    padding: 30px !important;
}

/* The title "Chat With Us" (No Change) */
.pum-title {
    color: #ffffff !important;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 22px !important;
    font-weight: 600 !important;
}

/* The content text (No Change) */
.pum-content p.custom-popup-content {
    color: #cccccc !important;
    text-align: center;
    font-size: 16px !important;
    margin-bottom: 25px !important;
}

/* Button Styles (No Change) */
.popup-buttons { display: flex; gap: 15px; }
.popup-button { flex: 1; padding: 12px 20px; color: #fff !important; text-align: center; font-size: 16px !important; font-weight: 600 !important; border-radius: 8px; transition: background-color 0.3s ease; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.facebook-button { background-color: #3b5998 !important; }
.messenger-button { background-color: #0084ff !important; }
.popup-button:hover { background-color: #e50914 !important; }

/* === THE NEW & IMPROVED CLOSE BUTTON! === */
.pum-close {
    /* Removing all default styles */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    height: auto !important;
    width: auto !important;
    
    /* Our new styles */
    position: absolute !important;
    top: 2px !important;
    right: 25px !important;
    font-size: 14px !important; /* <-- Size එක පොඩි කළා */
    font-weight: 600 !important;
    color: #aaa !important; /* Default color is grey */
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* THE NEW HOVER EFFECT! */
.pum-close:hover {
    color: #e50914 !important; /* <-- Hover වන විට රතු පාට වෙනවා! */
}

/* --- 12. AJAX Search Overlay Styles (Cinematic Glassmorphism Popup Modal) --- */
#poptv-search-overlay,
.search-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(4, 7, 14, 0.52) !important;
    backdrop-filter: blur(10px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(150%) !important;
    z-index: 9999999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 40px 20px 60px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}
#poptv-search-overlay.active,
.search-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
#poptv-search-overlay .search-modal-box,
.search-modal-box {
    position: relative !important;
    width: 95vw !important;
    max-width: 1380px !important;
    margin: 15px auto !important;
    background: rgba(14, 18, 30, 0.62) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 22px !important;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.75), 0 0 50px rgba(229, 9, 20, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    backdrop-filter: blur(24px) saturate(170%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(170%) !important;
    overflow: hidden !important;
    transform: scale(0.94) translateY(-20px) !important;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: 88vh !important;
}
#poptv-search-overlay.active .search-modal-box,
.search-overlay.active .search-modal-box {
    transform: scale(1) translateY(0) !important;
}
#poptv-search-overlay .search-modal-box::before,
.search-modal-box::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, transparent 0%, #e50914 30%, #00c6ff 70%, transparent 100%) !important;
    z-index: 10 !important;
}
.search-modal-header {
    padding: 22px 28px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.03) !important;
}
.search-input-row {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
}
.search-input-wrapper {
    position: relative !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 16px !important;
    padding: 0 16px !important;
    height: 56px !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    box-sizing: border-box !important;
}
.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: #e50914 !important;
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.4), inset 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}
.search-submit-icon-btn {
    background: transparent !important;
    border: none !important;
    color: #e50914 !important;
    font-size: 20px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 10px 0 0 !important;
    transition: transform 0.3s ease, color 0.3s ease !important;
    outline: none !important;
}
.search-submit-icon-btn:hover {
    transform: scale(1.2) !important;
    color: #00c6ff !important;
}
.search-input-wrapper .search-form {
    flex: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}
.search-input-wrapper .search-field {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
}
.search-input-wrapper .search-field::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
    font-weight: 400 !important;
}
.search-input-wrapper .search-field::-webkit-search-cancel-button,
.search-input-wrapper .search-field::-webkit-search-decoration {
    -webkit-appearance: none !important;
    display: none !important;
}
.search-clear-btn {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 19px !important;
    cursor: pointer !important;
    padding: 6px !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s ease !important;
    outline: none !important;
}
.search-clear-btn:hover {
    color: #ff3b30 !important;
    transform: scale(1.15) !important;
}
.search-modal-close-btn {
    position: relative !important;
    width: 50px !important;
    height: 56px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    font-size: 20px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    flex-shrink: 0 !important;
    outline: none !important;
}
.search-modal-close-btn:hover {
    background: #e50914 !important;
    border-color: #ff3b30 !important;
    color: #ffffff !important;
    transform: scale(1.05) !important;
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.6) !important;
}
.search-quick-tags {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding-top: 2px !important;
}
.quick-tag-label {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #ff3b30 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin-right: 4px !important;
}
.search-pill-btn {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 5px 15px !important;
    border-radius: 20px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    user-select: none !important;
}
.search-pill-btn:hover {
    background: rgba(229, 9, 20, 0.3) !important;
    border-color: #e50914 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.35) !important;
}
.press-enter-badge {
    margin-left: auto !important;
    font-size: 11.5px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.press-enter-badge kbd {
    background: rgba(229, 9, 20, 0.2) !important;
    border: 1px solid rgba(229, 9, 20, 0.5) !important;
    color: #ff4b5c !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}
.search-modal-body {
    padding: 26px 28px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex: 1 !important;
    box-sizing: border-box !important;
    min-height: 320px !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(229, 9, 20, 0.5) rgba(255, 255, 255, 0.04) !important;
}
.search-modal-body::-webkit-scrollbar {
    width: 6px !important;
}
.search-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 4px !important;
}
.search-modal-body::-webkit-scrollbar-thumb {
    background: rgba(229, 9, 20, 0.5) !important;
    border-radius: 4px !important;
}
.search-spinner {
    display: none !important;
}
.search-spinner.is-active {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 50px 20px !important;
    gap: 14px !important;
    color: #ffffff !important;
}
.search-spinner-pulse {
    width: 44px !important;
    height: 44px !important;
    border: 3px solid rgba(229, 9, 20, 0.2) !important;
    border-top: 3px solid #e50914 !important;
    border-radius: 50% !important;
    animation: poptv-spin 0.8s linear infinite !important;
}
.search-hint-state {
    text-align: center !important;
    padding: 50px 20px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}
.hint-icon-box {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.25) 0%, rgba(229, 9, 20, 0.05) 70%) !important;
    border: 1px solid rgba(229, 9, 20, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 18px !important;
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.2) !important;
    animation: poptv-glow-pulse 3s infinite alternate ease-in-out !important;
}
.hint-icon-box i {
    font-size: 28px !important;
    color: #e50914 !important;
}
.search-hint-state h3 {
    font-size: 21px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.3px !important;
    font-family: inherit !important;
}
.search-hint-state p {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    max-width: 520px !important;
    margin: 0 0 22px 0 !important;
    line-height: 1.5 !important;
    font-family: inherit !important;
}
.hint-kbd-shortcuts {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    font-size: 12.5px !important;
    color: rgba(255, 255, 255, 0.45) !important;
}
.hint-kbd-shortcuts kbd {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 5px !important;
    padding: 3px 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}
.search-results-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
    transition: opacity 0.25s ease !important;
}
.search-results-grid .grid-item-image-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-top: 138% !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #090c14 !important;
    border-radius: 8px !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black) !important;
}
.search-results-grid .grid-item-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 8px !important;
}
.search-results-grid .grid-item-title {
    padding: 6px 6px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-align: center !important;
    background: transparent !important;
}
/* Animated Neon Running Border Button */
.search-view-all-row {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    padding: 24px 0 10px !important;
    display: flex !important;
    justify-content: center !important;
}
.neon-flow-btn-wrapper {
    position: relative !important;
    display: inline-block !important;
    padding: 2.5px !important;
    border-radius: 50px !important;
    background: linear-gradient(90deg, #e50914, #00c6ff, #ff3b30, #ff8a00, #e50914) !important;
    background-size: 300% 300% !important;
    animation: poptvBorderRun 3s linear infinite !important;
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.45) !important;
}
@keyframes poptvBorderRun {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.neon-flow-btn-wrapper .view-all-results-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 11px 30px !important;
    border-radius: 48px !important;
    background: #0e121d !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    letter-spacing: 0.3px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
.neon-flow-btn-wrapper .view-all-results-link * {
    color: #ffffff !important;
}
.neon-flow-btn-wrapper .view-all-results-link i {
    color: #00c6ff !important;
    font-size: 15px !important;
    transition: transform 0.3s ease, color 0.3s ease !important;
}
.neon-flow-btn-wrapper .view-all-results-link i.fa-arrow-right {
    color: #ff3b30 !important;
}
.neon-flow-btn-wrapper:hover {
    box-shadow: 0 0 35px rgba(0, 198, 255, 0.7), 0 0 30px rgba(229, 9, 20, 0.8) !important;
    transform: scale(1.04) !important;
    transition: all 0.3s ease !important;
}
.neon-flow-btn-wrapper:hover .view-all-results-link {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.95), rgba(180, 5, 15, 0.95)) !important;
}
.neon-flow-btn-wrapper:hover .view-all-results-link i {
    color: #ffffff !important;
    transform: translateX(3px) !important;
}
.no-results {
    color: #ccc;
    text-align: center;
    font-size: 16px;
    padding: 40px 20px;
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    #poptv-search-overlay,
    .search-overlay {
        padding: 15px 10px 40px !important;
    }
    #poptv-search-overlay .search-modal-box,
    .search-modal-box {
        width: 98vw !important;
        margin: 5px auto !important;
        max-height: 94vh !important;
        border-radius: 18px !important;
    }
    .search-modal-header {
        padding: 16px 14px 14px !important;
        gap: 12px !important;
    }
    .search-input-wrapper {
        height: 48px !important;
        padding: 0 12px !important;
    }
    .search-input-wrapper .search-field {
        font-size: 15px !important;
    }
    .search-modal-close-btn {
        width: 44px !important;
        height: 48px !important;
        font-size: 18px !important;
    }
    .search-modal-body {
        padding: 14px !important;
    }
    .search-results-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    .press-enter-badge {
        display: none !important;
    }
}
@media (max-width: 480px) {
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --- 13. SINGLE POST "PRO-LEVEL" LAYOUT --- */
.single-post-layout {
    display: flex;
    flex-wrap: wrap; /* On small screens, columns will stack */
    gap: 40px;
    padding: 40px 4%;
}
.post-left-column {
    flex: 1;
    min-width: 300px; /* Minimum width for the poster */
    max-width: 350px; /* Maximum width, like a phone screen */
}
.post-right-column {
    flex: 2;
    min-width: 300px;
}
.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.entry-title {
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid #e50914;
    padding-bottom: 15px;
}
/* Make sure styles from your Custom HTML block work well */
.entry-content .meta-info-box {
    margin-top: 0;
}

/* --- 14. SINGLE POST - FAVORITE OVERLAY (FOR KYLE PHILLIPS' PLUGIN) --- */

.post-thumbnail {
    position: relative; /* This is crucial for the overlay */
}

/* The button generated by the plugin has the class 'wpfp-link' */
.post-thumbnail .wpfp-link {
    position: absolute !important;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7) !important;
    color: #fff !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important; /* Circle shape */
    border: 2px solid #fff !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-size: 20px !important; /* Icon size */
}
.post-thumbnail .wpfp-link:hover {
    background-color: #e50914 !important;
    transform: scale(1.1);
}

/* The plugin doesn't use Font Awesome by default, so we add it with CSS */
/* Hide the default text */
.wpfp-link span {
    display: none;
}

/* When it's the "Add to Favorites" button */
.wpfp-link.wpfp-add::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 400; /* Regular style for empty heart */
    content: "\f004";
}
    
/* When it's the "Remove from Favorites" button */
.wpfp-link.wpfp-remove::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900; /* Solid style for filled heart */
    content: "\f004";
    color: #e50914;
}

/* --- 15. THE FINAL "NO-PLUGIN" FAVORITE SYSTEM --- */

/* The Button on Single Post Page */
.poptv-post-actions { margin-bottom: 25px; }
button.poptv-favorite-button {
    display: inline-flex; align-items: center; gap: 10px;
    background-color: rgba(30, 30, 30, 0.7);
    color: #fff; padding: 10px 20px; border-radius: 25px;
    font-weight: 600; font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer; transition: all 0.3s ease;
}
button.poptv-favorite-button:hover {
    background-color: #e50914; transform: scale(1.05);
}
button.poptv-favorite-button i { transition: all 0.3s ease; }

/* When Favorited */
button.poptv-favorite-button.favorited {
    background-color: #e50914;
}
button.poptv-favorite-button.favorited i {
    font-weight: 900; /* Solid heart */
    color: #fff;
}

/* The Favorites Page Layout */
.favorites-page-grid,
.history-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 40px 4%;
}

/* --- 16. ANIMATING LOGO/TITLE EFFECT --- */

.branding-container {
    position: relative; /* Needed for positioning the items on top of each other */
    display: block;
    width: 150px; /* Adjust this width to fit your logo/title */
    height: 30px; /* Adjust this height to fit your logo/title */
}

.site-title-text,
.site-logo-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.8s ease-in-out; /* The beautiful fade animation! */
}

/* Style for the text */
.site-title-text {
    color: #ffffff !important;
    font-size: 24px;
    font-weight: 700;
}

/* Style for the logo image */
.site-logo-image {
    height: 60px; /* <-- ඔබට අවශ්‍ය උස මෙතනට යොදන්න (උදා: 45px) */
    width: auto;  /* Width will adjust automatically */
    position: absolute;
    top: 50%; /* Vertically center the logo */
    transform: translateY(-50%);
}

/* The class that makes them visible */
.branding-container .active {
    opacity: 1;
}

/* --- 17. Dropdown Icon Spacing --- */
.profile-dropdown a i.fa-solid {
    width: 20px; /* Aligns the text nicely */
}

/* --- 18. "REAL DATABASE" STAR RATING --- */

.poptv-real-rating-section {
    background-color: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.rating-stars {
    display: inline-block;
    direction: rtl; /* Right-to-left magic */
}

.rating-stars span {
    font-size: 30px;
    color: #444; /* Empty star color */
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Hover effect for non-rated stars */
.rating-stars:not(.rated) span:hover,
.rating-stars:not(.rated) span:hover ~ span {
    color: #f5c518;
}

/* The style for stars that are selected (either by hover or click) */
.rating-stars span.selected,
.rating-stars span.selected ~ span {
    color: #f5c518;
}

.rating-text {
    margin-top: 0; /* Adjusted for flex alignment */
    font-size: 16px;
    color: #888;
    font-weight: 500;
}

.rating-text .average-rating,
.rating-text .vote-count {
    color: #fff;
    font-weight: 700;
}

/* ========================================================================= */
/* START: RED GLOW HOVER EFFECT (FIXED - NO FLICKERING)
/* ========================================================================= */

/* 1. Base Styles for Grid Items */
.homepage-carousel .slick-slide, 
#live-filter-results .grid-item,
.grid-layout .grid-item {
    position: relative;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* THE FIX: Add an invisible border initially to reserve space */
    border: 3px solid transparent; 
    
    /* Ensure no layout shift */
    box-sizing: border-box; 
    z-index: 1;
}

/* 2. Style the Link inside (Background color) */
.homepage-carousel .slick-slide a, 
#live-filter-results .grid-item a,
.grid-layout .grid-item a {
    display: block;
    background: #1a1a1a;
    border-radius: 6px; /* Slightly smaller radius to fit inside border */
    overflow: hidden;
    height: 100%;
}

/* 3. HOVER EFFECT (Stable) */
.homepage-carousel .slick-slide:hover, 
#live-filter-results .grid-item:hover,
.grid-layout .grid-item:hover {
    /* Zoom Effect */
    transform: scale(1.05);
    
    /* Bring to Front */
    z-index: 100;
    
    /* Red Glow Shadow */
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.7), 
                0 0 40px rgba(229, 9, 20, 0.3);
    
    /* Change Border Color to Red */
    border-color: #e50914;
}

/* 4. Text Color Change on Hover */
.homepage-carousel .slick-slide:hover .grid-item-title, 
#live-filter-results .grid-item:hover .grid-item-title,
.grid-layout .grid-item:hover .grid-item-title {
    color: #e50914 !important;
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.8);
}
/* END: ALL CUSTOM STYLES */

/* ========================================================================= */
/* POP TV ONE - V-FINAL MASTER STYLESHEET
/* ========================================================================= */

/* --- 1. Global & Header Styles --- */
body { background-color: #141414; color: #ffffff; font-family: 'Poppins', sans-serif; margin: 0; }
a { color: #e50914 !important; text-decoration: none !important; }
a:hover { color: #ffffff !important; }

.site-header {
    background-color: rgba(12, 13, 18, 0.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(51, 51, 51, 0.5); position: fixed; top: 0; left: 0; width: 100%; z-index: 99999;
    padding: 10px 4%; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box;
}
.site-branding a { display: inline-block; color: inherit; text-decoration: none; }
.header-right-section { display: flex; align-items: center; gap: 40px; }

/* --- 2. Desktop Menu Styles --- */
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; }
/* ... (all other desktop menu styles are correct) ... */

/* --- 3. Homepage Sliders & Grids --- */
/* ... (all grid and slider styles are correct) ... */

/* --- 4. Single Post & Comments --- */
/* ... (all single post and comment styles are correct) ... */

/* ========================================================================= */
/* START: RESPONSIVE & MOBILE MENU STYLES (Definitive Version)
/* ========================================================================= */

/* --- 1. Default State (Desktop View) --- */

/* On desktop, the hamburger icon and the mobile menu container are completely hidden */
.hamburger-icon {
    display: none;
}

.mobile-menu-container {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-menu-container.active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}


/* --- 3. Triggering Mobile View (for tablets and phones) --- */
@media (max-width: 768px) {

    /* Hide the original desktop navigation menu */
    .header-right-section .main-navigation {
        display: none;
    }

    /* Show our hamburger icon */
    .hamburger-icon {
        display: block;
        cursor: pointer;
        font-size: 24px;
        color: #ffffff;
    }

    /* Styles for the content INSIDE the mobile menu */
    .mobile-user-profile {
        text-align: center;
        padding-bottom: 20px;
        margin-bottom: 20px;
        border-bottom: 1px solid #444;
    }

    .mobile-avatar {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        margin: 0 auto 15px;
        border: 2px solid #fff;
    }

    .mobile-user-profile strong {
        color: #fff;
        font-size: 16px;
    }

    .mobile-navigation ul, #mobile-extra-menu {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-navigation li a, #mobile-extra-menu li a {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 16px 10px;
        border-bottom: 1px solid #333;
        color: #ccc !important;
        font-weight: 500;
        font-size: 15px;
        text-transform: capitalize;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .mobile-navigation li a:hover, #mobile-extra-menu li a:hover {
        background-color: #333;
        color: #e50914 !important;
    }

    .mobile-navigation li:last-child a, #mobile-extra-menu li:last-child a {
        border-bottom: none;
    }

    /* Adjust main site layout for mobile if needed */
    .single-post-layout {
        flex-direction: column;
    }

    .grid-layout, .favorites-page-grid, .history-page-grid {
        padding: 20px 2%; /* Reduce side padding on mobile */
    }
}

/* =========================================================================
   CUSTOM ANIMATION STYLES
   ========================================================================= */

/* Genre Tags Hover Effect */
.genre-tag:hover {
    background-color: #e50914 !important; /* රතු පාටට මාරු වීම */
    transform: translateY(-2px); /* සියුම්ව ඉහළට එසවීම */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Download Buttons Hover Effect */
.download-button:hover {
    transform: translateY(-2px); /* සියුම්ව ඉහළට එසවීම */
    box-shadow: 0 0 15px 5px rgba(229, 9, 20, 0.6); /* රතු පාට glow එකක් */
}

/* =========================================================================
   V4 - FINAL POLISH & SCROLLABLE CONTENT STYLES
   ========================================================================= */

/* 1. IMDb Bar එකට Box එකක් එකතු කිරීම */
.meta-info-box {
    background-color: #181818; /* අනිත් boxes වලට සමාන පසුබිම් පාටක් */
    border: 1px solid #333;   /* සියුම් рамкаවක් */
    border-left: 4px solid #e50914; /* වම්පස රතු ඉර එලෙසම තබා ගැනීම */
    border-radius: 8px;       /* වටකුරු කොන් */
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

/* 2. Scroll කළ හැකි Boxes සඳහා පොදු Styles */
.scrollable-content {
    position: relative; /* ඊතලය ස්ථානගත කිරීමට */
    overflow-y: auto;   /* සිරස් scroll bar එක එක් කිරීම */
    padding-right: 15px; /* Scroll bar එකට ඉඩ තැබීමට */
}

/* 3. Description Box එකේ Scroll කිරීම */
.description-box {
    max-height: none !important; /* Fully expand description without truncating */
    padding-left: 15px;
}
.description-text {
    color: #ccc;
}

/* 4. Episode List එකේ Scroll කිරීම */
.episode-list-container {
    max-height: 480px; /* Episode 10ක් පමණ පෙන්වීමට උස. මීට වඩා දිග නම් scroll වේවි */
}
.episode-list {
    padding: 0 15px;
}

/* 5. අපේ Theme එකට ගැළපෙන Custom Scrollbar */
.scrollable-content::-webkit-scrollbar {
    width: 8px;
}
.scrollable-content::-webkit-scrollbar-track {
    background: #222;
    border-radius: 4px;
}
.scrollable-content::-webkit-scrollbar-thumb {
    background: #e50914; /* තේමාවේ රතු පාට */
    border-radius: 4px;
}
.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #ff3333;
}

/* 6. Scroll Indicator Arrow (ඊතලය) */
.scroll-indicator {
    position: sticky;       /* Scroll කරන විට පතුලේම රැඳීමට */
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: #e50914;
    font-size: 24px;
    text-shadow: 0 0 10px #e50914;
    opacity: 0;             /* මුලින් සඟවා තැබීම */
    transition: opacity 0.3s ease;
    pointer-events: none;   /* Click වීම වැළැක්වීමට */
}

/* ඊතලය පෙන්වීමට භාවිතා කරන class එක */
.scroll-indicator.visible {
    opacity: 1;
}

/* අනෙකුත් පැරණි styles එලෙසම තබාගන්න, මේවා අලුතෙන් එකතු කරන්න */
.meta-item{display:flex;align-items:center;font-size:15px;}.meta-item strong{text-transform:uppercase;font-weight:600;margin-right:8px;}.genre-tag{background-color:#333;color:#fff!important;padding:4px 10px;border-radius:5px;margin-left:6px;font-size:13px!important;}.imdb-rating{background:#f5c518;color:#000!important;font-weight:700;padding:4px 8px;border-radius:5px;}
.accordion-item{border:1px solid #333;border-radius:8px;overflow:hidden;margin-bottom:20px;}.accordion-header{background:#222;padding:15px 20px;color:#e50914!important;font-weight:700;cursor:pointer;position:relative;user-select:none;}.accordion-header::after{content:'▼';font-size:12px;position:absolute;right:20px;top:50%;transform:translateY(-50%);transition:transform .3s ease;}.accordion-item.active .accordion-header::after{transform:translateY(-50%) rotate(180deg);}.accordion-content{max-height:0;overflow:hidden;transition:max-height .5s ease-out, padding .3s ease;background:#1a1a1a;padding:0 20px;}.accordion-item.active .accordion-content{max-height:2000px!important;padding:20px 20px!important;display:block!important;}
.super-download-section{padding:25px;border-radius:12px;background:#181818;text-align:center;margin-top:30px;border:1px solid #333;}.download-intro-text{color:#00aaff;font-size:18px;font-weight:700;margin-bottom:25px;}.episode-item{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #2a2a2a;}.episode-item:last-child{border-bottom:none;}.episode-name{font-size:16px;}.download-button{display:inline-block;color:#fff!important;padding:8px 18px;text-decoration:none;border-radius:5px;font-weight:700;margin-left:10px;}.download-button-video{background-color:#e50914;}.download-button-sub{background-color:#333;}

/* ========================================================================= */
/* START: MOBILE VIEW FINAL POLISH & FIXES
/* ========================================================================= */

@media (max-width: 768px) {

    /* --- FIX 1: Hide the redundant user profile icon from the main header --- */
    .header-right-section .site-user-actions {
        display: none;
    }

} /* Don't remove this closing bracket */


/* --- FIX 2: Assign the correct icons inside the slide-out mobile menu --- */

/* First, set up the basic style for ALL icons in the mobile menu */
.mobile-navigation .menu-item a::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900; /* Use solid style icons */
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    font-size: 16px; /* Icon size */
    width: 20px;     /* Ensures all text aligns neatly */
}

/* Second, assign the specific icon character for each menu item */
/* NOTE: These classes (e.g., .fa-home) must be added in your WordPress Menu Editor */
.mobile-navigation .fa-home a::before { content: "\f015"; }
.mobile-navigation .fa-question-circle a::before { content: "\f059"; }
.mobile-navigation .fa-comment-dots a::before { content: "\f4ad"; }
.mobile-navigation .fa-compass a::before { content: "\f14e"; }
.mobile-navigation .fa-search a::before { content: "\f002"; }

/* --- FIX 3: Hide the default WordPress menu pseudo-elements (the unwanted boxes/crosses) --- */
.mobile-navigation li::before {
    display: none !important;
    content: none !important;
}

/* --- FIX 4: Styling for the new mobile-only search icon in the header --- */

/* By default, hide the mobile search icon on desktop */
.mobile-search-icon {
    display: none;
}

@media (max-width: 768px) {
    /* On mobile, show the search icon */
    .mobile-search-icon {
        display: block;
        cursor: pointer;
        font-size: 22px; /* A bit smaller than the menu icon */
        color: #fff;
    }
    
    /* Make the header right section a flex container to align icons */
    .header-right-section {
        display: flex;
        align-items: center;
        gap: 25px; /* Adjust the space between the search and menu icons */
    }
}

/* --- FIX 5: Hide the "Search" item ONLY from the slide-out mobile menu --- */
@media (max-width: 768px) {
    
    /* This targets the menu item with the 'fa-search' class, 
       but ONLY when it is inside the mobile navigation container */
    #mobile-navigation .menu-item.fa-search {
        display: none;
    }
    
}

/* ========================================================================= */
/* START: MOBILE VIEW FIXES (Bug Fix Session)
/* ========================================================================= */

/* Bug #1 Fix: Single Post Layout on Mobile */
@media (max-width: 768px) {
    .single-post-layout {
        /* We already have flex-direction: column here, which is good. */
        /* The main fix is to prevent horizontal overflow */
        padding: 20px 4%; /* Reduce padding on mobile */
        overflow-x: hidden; /* This stops horizontal scrolling! */
    }

    /* Ensure elements inside don't try to be too wide */
    .post-left-column, .post-right-column {
        flex: 1 1 100%; /* Allows items to take full width but not more */
        min-width: 0; /* Important reset for flex items */
        max-width: 100%;
    }
    
    .entry-content, .meta-info-box, .super-download-section {
        word-wrap: break-word; /* Force long words to break */
        overflow-wrap: break-word;
    }
}

/* Bug #2, #3 & Explore Fix: Grid Layout for Search, Favorites, History, Explore on Mobile */
@media (max-width: 768px) {

    #poptv-search-results,
    #live-filter-results,
    .favorites-page-grid,
    .history-page-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px 4%;
    }

    /* Make grid item titles a bit smaller on mobile for these pages */
    #poptv-search-results .grid-item-title,
    #live-filter-results .grid-item-title,
    .favorites-page-grid .grid-item-title,
    .history-page-grid .grid-item-title {
        font-size: 13px !important;
        min-height: 36px;
    }
}

/* ========================================================================= */
/* START: ALL MOBILE VIEW BUG FIXES (Final Perfected Version)
/* ========================================================================= */

@media (max-width: 768px) {

    /* --- Single Post: Layout & Overflow Fix --- */
    .single-post-layout {
        padding: 20px 4%;
        overflow-x: hidden;
    }
    .post-left-column, .post-right-column {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
    }
    .entry-content {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* --- Single Post: THE PERFECT IMDb BAR FIX --- */
    .meta-info-box {
        display: flex;
        flex-wrap: wrap; /* Allow items to wrap */
        justify-content: space-between; /* This is the magic! Pushes items to the ends */
        align-items: center; /* Vertically align items on the same line */
        gap: 15px;
    }
    .meta-item:nth-child(3) { /* Target only the 3rd item (Genre) */
        flex-basis: 100%; /* Make the Genre box take full width, forcing it to a new line */
    }
    .meta-item {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    /* --- Single Post: Episode List Button Alignment Fix --- */
    .episode-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .episode-item div {
        display: flex;
        gap: 10px;
        width: 100%;
    }
    .download-button {
        flex-grow: 1;
        text-align: center;
        margin-left: 0 !important;
    }

    /* --- Grid Layout Fix for Search, Explore, Favorites, History --- */
    #poptv-search-results,
    #live-filter-results,
    .favorites-page-grid,
    .history-page-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px 4%;
    }
    
    /* V31: Mobile Title Fix (Ultimate Specificity) */
    
    /* 1. Global Grid Titles (Search, Explore, Favorites, History) */
    #poptv-search-results .grid-item-title,
    #live-filter-results .grid-item-title,
    #poptv-favorites-container .grid-item-title,
    #poptv-history-container .grid-item-title,
    .favorites-page-grid .grid-item-title,
    .history-page-grid .grid-item-title {
        /* Height Fix */
        min-height: 52px !important; 
        height: 52px !important; 
        max-height: 52px !important;
        line-height: 1.3 !important;
        
        /* Font and Clipping Fixes */
        font-size: 10px !important; 
        font-weight: 600 !important;
        -webkit-line-clamp: 2 !important; 
        line-clamp: 2 !important; 
        
        /* Layout overrides */
        padding: 5px 8px !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        white-space: normal !important;
        
        /* Added for absolute safety */
        margin: 0 !important;
    }
    
    /* 2. Home Page Slider Titles (Alternative Selector) */
    .homepage-carousel .grid-item-title {
        min-height: 52px !important; 
        height: 52px !important; 
        max-height: 52px !important;
        line-height: 1.3 !important;
        
        font-size: 10px !important;
        font-weight: 600 !important;
        -webkit-line-clamp: 2 !important; 
        line-clamp: 2 !important; 
        overflow: hidden !important;
    }
}

/* --- END OF FIXES --- */