/* --- Premium Expanding Search Bar --- */
.search-box-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 38px; /* Initial icon width */
    height: 38px;
    overflow: visible; /* Allow dropdown to show outside wrapper bounds */
}

/* Active State (Expanded) */
.search-input-wrapper.active {
    width: 300px; /* Matches dropdown width */
    background: #141414;
    border-color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    overflow: visible; /* Keep visible so dropdown shows */
}

.search-input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: #fff;
    padding: 0 40px 0 16px; /* Space for icons */
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-input-wrapper.active .search-input {
    opacity: 1;
    pointer-events: auto;
}

.search-input:focus {
    outline: none;
}

.search-icon-btn, .search-close-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
}

.search-icon-btn {
    right: 8px; /* Icon stays on right */
    width: 24px;
    height: 24px;
    z-index: 2;
}


.search-close-btn {
    right: 60px; /* Moved left — mic now sits to its right */
    font-size: 18px;
    color: #aaa;
    z-index: 3;
    width: 24px;
    height: 24px;
}

.search-mic-btn {
    position: absolute;
    top: 58%;
    transform: translateY(-50%);
    right: 36px; /* Now sits between close btn and search icon */
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
    z-index: 3;
    display: none; /* JS will enable if supported */
    transition: color 0.2s;
}

.search-mic-btn:hover {
    color: #e50914;
}

.search-mic-btn.listening {
    color: #e50914;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: translateY(-50%) scale(1); opacity: 1; }
    50% { transform: translateY(-50%) scale(1.2); opacity: 0.8; }
    100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

.search-close-btn:hover {
    color: #fff;
}

/* Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px; /* Matches Expanded Input */
    background: #141414;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    z-index: 1000;
    margin-top: 4px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.premium-search-header {
    padding: 10px 16px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #e50914;
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
}

.premium-search-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #222;
    text-decoration: none !important;
    transition: background 0.2s;
}

.premium-search-item:hover {
    background: #2a2a2a;
}

.search-poster {
    width: 32px;
    height: 44px;
    border-radius: 3px;
    object-fit: cover;
    margin-right: 12px;
    background: #333;
}

.search-info h6 {
    font-size: 13px;
    margin: 0;
    color: #fff;
    line-height: 1.2;
}

.search-info span {
    font-size: 11px;
    color: #999;
}

.search-empty {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #777;
}
 /* Premium OTT Search Dropdown Styles */
#search-suggestions {
    background: #141414; /* Deep Dark Background */
    border: 1px solid #333;
    border-top: none;
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    border-radius: 0 0 12px 12px;
    width: 300px; /* Slightly wider for comfort */
    left: auto;
    right: 0;
    overflow: hidden;
    margin-top: 2px;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    max-height: 480px; /* Cap dropdown height */
}

/* Scrollable results area inside the dropdown */
#search-suggestions .search-scroll-area {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 400px; /* Hard cap — scroll kicks in after this */
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #e50914 #1a1a1a;
    scroll-behavior: smooth;
}

/* Webkit custom scrollbar */
#search-suggestions .search-scroll-area::-webkit-scrollbar {
    width: 4px;
}
#search-suggestions .search-scroll-area::-webkit-scrollbar-track {
    background: #1a1a1a;
}
#search-suggestions .search-scroll-area::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 2px;
}
#search-suggestions .search-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #ff1a1a;
}

/* Sticky section header */
#search-suggestions .premium-search-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* View-all footer link */
.search-view-all {
    display: block;
    text-align: center;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #e50914;
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.search-view-all:hover {
    background: #222;
    color: #ff4444;
}

/* Style the input field to match the dark theme */
#search-query {
    background-color: #141414 !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    padding-left: 15px;
    border-radius: 4px; /* Slightly rounded */
    height: 45px; /* Comfortable height */
}

#search-query:focus {
    background-color: #191919 !important;
    border-color: transparent !important; /* Removed red search focus border */
    box-shadow: none !important;
    color: #fff !important;
}

#search-query::placeholder {
    color: #888;
}

.premium-search-header {
    padding: 10px 16px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #e50914; /* Brand Red */
    text-transform: uppercase;
    letter-spacing: 1.2px;
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
}

.premium-search-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #222;
    transition: all 0.2s ease;
    text-decoration: none !important;
    background: #141414;
    position: relative;
}

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

.premium-search-item:hover {
    background: #1f1f1f;
    padding-left: 20px; /* Subtle slide effect */
}

.premium-search-item:hover .search-title {
    color: #e50914;
}

.search-poster-container {
    position: relative;
    flex-shrink: 0;
    margin-right: 12px;
}

.search-poster {
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    background-color: #333;
}

.search-info {
    flex-grow: 1;
    min-width: 0;
}

.search-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-meta {
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}
/* =========================================================
   QAUSAINFLIX — DESKTOP SEARCH MICROPHONE FIX
   ========================================================= */


/* =========================================================
   QAUSAINFLIX — DESKTOP SEARCH CLEAN IMPLEMENTATION
   ========================================================= */

/* =========================================================
   QAUSAINFLIX — FINAL DESKTOP SEARCH CONTROL
   Single search button / no microphone / no red ring
   ========================================================= */

@media (min-width: 1200px) {

    /* Search container */
    header > nav.navbar.iq-navbar
    .search-box-container {
        position: relative !important;
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        z-index: 50 !important;
    }

    /* Wrapper NEVER draws a second border/ring */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active {
        position: relative !important;

        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;

        background: transparent !important;

        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;

        border-radius: 12px !important;

        overflow: visible !important;

        transition: none !important;
    }

    /* Remove browser/focus decoration from wrapper */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper:focus,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper:focus-within,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active:focus,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active:focus-within {
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
    }

    /* Actual search button */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn {
        position: absolute !important;

        top: 50% !important;
        right: 0 !important;

        transform: translateY(-50%) !important;

        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        padding: 0 !important;
        margin: 0 !important;

        background: rgba(255,255,255,.065) !important;

        border: 1px solid rgba(255,255,255,.10) !important;
        outline: 0 !important;
        box-shadow: none !important;

        border-radius: 12px !important;

        color: rgba(255,255,255,.92) !important;

        z-index: 100 !important;
    }

    /* Same appearance when active/focused */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active
    .search-icon-btn,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:focus,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:focus-visible,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:active {
        background: rgba(255,255,255,.065) !important;

        border: 1px solid rgba(255,255,255,.10) !important;

        outline: 0 !important;
        box-shadow: none !important;

        color: rgba(255,255,255,.92) !important;
    }

    /* Hover only */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:hover {
        background: rgba(255,255,255,.105) !important;
        border-color: rgba(255,255,255,.16) !important;
    }

    /* Completely remove microphone */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-mic-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    /* No pseudo-element can create another ring */
    header > nav.navbar.iq-navbar
    .search-box-container::before,
    header > nav.navbar.iq-navbar
    .search-box-container::after,
    header > nav.navbar.iq-navbar
    .search-input-wrapper::before,
    header > nav.navbar.iq-navbar
    .search-input-wrapper::after,
    header > nav.navbar.iq-navbar
    .search-icon-btn::before,
    header > nav.navbar.iq-navbar
    .search-icon-btn::after {
        content: none !important;
        display: none !important;

        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    /* Do not allow the old red active icon styling */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active
    .search-icon-btn {
        color: rgba(255,255,255,.92) !important;
    }
}


/* =========================================================
   QAUSAINFLIX — FINAL SEARCH SINGLE-FRAME FIX
   Remove outer wrapper frame; keep one premium button only
   ========================================================= */

@media (min-width: 1200px) {

    header > nav.navbar.iq-navbar
    .search-box-container {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;

        padding: 0 !important;
        margin: 0 !important;

        border: 1px solid rgba(255,255,255,.10) !important;
        border-radius: 12px !important;

        background: rgba(255,255,255,.065) !important;

        outline: 0 !important;
        box-shadow: none !important;
    }

    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:hover {
        border-color: rgba(255,255,255,.16) !important;
        background: rgba(255,255,255,.105) !important;
    }

    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:focus,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:focus-visible,
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-icon-btn:active {
        border-color: rgba(255,255,255,.12) !important;
        outline: 0 !important;
        box-shadow: none !important;
    }
}


/* =========================================================
   QAUSAINFLIX — REMOVE FINAL WHITE SEARCH EDGE
   ========================================================= */

@media (min-width: 1200px) {

    header > nav.navbar.iq-navbar
    .search-box-container,
    header > nav.navbar.iq-navbar
    .search-box-container *,
    header > nav.navbar.iq-navbar
    .search-input-wrapper,
    header > nav.navbar.iq-navbar
    .search-input-wrapper.active {
        outline: none !important;
        box-shadow: none !important;
    }

    header > nav.navbar.iq-navbar
    .search-box-container:focus,
    header > nav.navbar.iq-navbar
    .search-box-container:focus-within,
    header > nav.navbar.iq-navbar
    .search-input-wrapper:focus,
    header > nav.navbar.iq-navbar
    .search-input-wrapper:focus-within {
        outline: none !important;
        border-color: transparent !important;
        box-shadow: none !important;
    }

    header > nav.navbar.iq-navbar
    .search-icon-btn {
        outline: none !important;
        box-shadow: none !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    header > nav.navbar.iq-navbar
    .search-icon-btn:focus,
    header > nav.navbar.iq-navbar
    .search-icon-btn:focus-visible,
    header > nav.navbar.iq-navbar
    .search-icon-btn:active {
        outline: none !important;
        box-shadow: none !important;
    }
}


/* =========================================================
   QAUSAINFLIX — FINAL SEARCH FUNCTIONAL STATE
   Closed = 42px button
   Active = expanding search field
   ========================================================= */

@media (min-width: 1200px) {

    /* CLOSED */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper:not(.active) {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;

        background: transparent !important;
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
    }

    /* ACTIVE — THIS MUST EXPAND */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active {
        width: 300px !important;
        min-width: 300px !important;
        height: 42px !important;
        min-height: 42px !important;

        background: rgba(14,15,22,.96) !important;

        border: 1px solid rgba(255,255,255,.12) !important;
        border-radius: 12px !important;

        outline: 0 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,.28) !important;

        overflow: visible !important;
    }

    /* INPUT BECOMES VISIBLE ONLY WHEN ACTIVE */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active
    .search-input {
        width: 100% !important;
        height: 42px !important;

        opacity: 1 !important;
        pointer-events: auto !important;

        color: #fff !important;
    }

    /* SEARCH BUTTON REMAINS ON RIGHT */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active
    .search-icon-btn {
        right: 0 !important;
        top: 50% !important;

        width: 42px !important;
        height: 42px !important;

        background: transparent !important;
        border: 0 !important;

        outline: 0 !important;
        box-shadow: none !important;

        color: rgba(255,255,255,.92) !important;
    }

    /* No red focus */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-input-wrapper.active
    .search-input:focus {
        outline: none !important;
        box-shadow: none !important;
    }

    /* No microphone */
    header > nav.navbar.iq-navbar
    .search-box-container
    .search-mic-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}


/* =========================================================
   QAUSAINFLIX — PREMIUM SEARCH RESULTS SCROLLBAR
   Subtle neutral scrollbar — no red
   ========================================================= */

@media (min-width: 1200px) {

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-scroll-area {
        scrollbar-width: thin !important;
        scrollbar-color:
            rgba(255,255,255,.20)
            rgba(255,255,255,.025) !important;
    }

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-scroll-area::-webkit-scrollbar {
        width: 5px !important;
    }

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-scroll-area::-webkit-scrollbar-track {
        background: rgba(255,255,255,.025) !important;
        border-radius: 10px !important;
    }

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-scroll-area::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.20) !important;
        border-radius: 10px !important;
        border: 1px solid rgba(0,0,0,.20) !important;
    }

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-scroll-area::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,.34) !important;
    }

    /* Keep View All footer clean */
    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-view-all {
        color: rgba(255,255,255,.82) !important;
        background: rgba(8,9,13,.96) !important;
        border-top: 1px solid rgba(255,255,255,.08) !important;
    }

    header > nav.navbar.iq-navbar
    #search-suggestions
    .search-view-all:hover {
        color: #fff !important;
        background: rgba(255,255,255,.06) !important;
    }
}


/* =========================================================
   QAUSAINFLIX — SEARCH RESULT ARROW FINAL POLISH
   Remove red accent from result navigation arrows
   ========================================================= */

@media (min-width: 1200px) {

    #search-suggestions .premium-search-item::after {
        color: rgba(255,255,255,.72) !important;
        border-color: rgba(255,255,255,.72) !important;
        background: transparent !important;
    }

    #search-suggestions .premium-search-item:hover::after {
        color: rgba(255,255,255,.96) !important;
        border-color: rgba(255,255,255,.96) !important;
    }

    #search-suggestions .premium-search-item i,
    #search-suggestions .premium-search-item .search-arrow {
        color: rgba(255,255,255,.72) !important;
    }

    #search-suggestions .premium-search-item:hover i,
    #search-suggestions .premium-search-item:hover .search-arrow {
        color: rgba(255,255,255,.96) !important;
    }
}


/* ============================================================
 * QAUSAINFLIX SEARCH / FILTER FOUNDATION — PHASE 1E
 * Visual-only.
 * Search/API/filter/sessionStorage logic remains untouched.
 * ============================================================ */

.qf-search-form {
    gap: var(--qf-space-2);
}

.qf-search-form #search-query {
    background: var(--qf-surface);
    border-color: var(--qf-border-subtle);
    border-radius: var(--qf-radius-lg);
    color: var(--qf-text-strong);
    transition:
        border-color var(--qf-motion-fast) var(--qf-ease-standard),
        box-shadow var(--qf-motion-fast) var(--qf-ease-standard),
        background-color var(--qf-motion-fast) var(--qf-ease-standard);
}

.qf-search-form #search-query:focus {
    border-color: rgba(var(--qf-primary-rgb), 0.55) !important;
    background: var(--qf-surface-elevated) !important;
    box-shadow:
        0 0 0 3px rgba(var(--qf-primary-rgb), 0.12) !important;
}

.qf-search-form #search-query::placeholder {
    color: var(--qf-text-subtle);
}

.qf-search-form #movie-search {
    min-height: var(--qf-control-height-md);
    border: 0;
    border-radius: var(--qf-radius-md);
    background: var(--qf-primary);
    color: #fff;
}

.qf-search-form #movie-search:hover {
    background: var(--qf-primary-hover);
}

.qf-search-filters {
    padding: var(--qf-space-3) 0;
}

.qf-search-filters .label {
    color: var(--qf-text-muted);
    font-weight: var(--qf-weight-medium);
}

.qf-search-filters .search-filter-item {
    display: inline-flex;
    align-items: center;
    gap: var(--qf-space-2);
    min-height: var(--qf-control-height-sm);
    padding: 6px 10px;
    border: 1px solid rgba(var(--qf-primary-rgb), 0.28);
    border-radius: var(--qf-radius-pill);
    background: rgba(var(--qf-primary-rgb), 0.12);
    color: var(--qf-text-strong);
}

.qf-search-filters .search-filter-item i {
    color: var(--qf-text-muted);
}

.qf-search-filters .search-clear-btn {
    color: var(--qf-text-muted);
}

.qf-search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: var(--qf-space-2);
    list-style: none;
}

.qf-search-panel .search-short-panel-link {
    cursor: pointer;
    border: 1px solid var(--qf-border-subtle);
    border-radius: var(--qf-radius-pill);
    background: var(--qf-chip-bg);
    color: var(--qf-text);
    padding: 8px 14px;
    transition:
        background-color var(--qf-motion-fast) var(--qf-ease-standard),
        border-color var(--qf-motion-fast) var(--qf-ease-standard),
        color var(--qf-motion-fast) var(--qf-ease-standard),
        transform var(--qf-motion-fast) var(--qf-ease-standard);
}

.qf-search-panel .search-short-panel-link:hover {
    background: var(--qf-chip-bg-hover);
    border-color: var(--qf-border-strong);
    color: var(--qf-text-strong);
    transform: translateY(-1px);
}

.qf-search-panel .search-short-panel-link.active {
    background: rgba(var(--qf-primary-rgb), 0.18);
    border-color: rgba(var(--qf-primary-rgb), 0.42);
    color: #fff;
}

.qf-popular-search-panel .popular-search-panel-link {
    min-height: var(--qf-control-height-sm);
    padding: 8px 10px;
    border-radius: var(--qf-radius-md);
    color: var(--qf-text);
    transition:
        background-color var(--qf-motion-fast) var(--qf-ease-standard),
        color var(--qf-motion-fast) var(--qf-ease-standard);
}

.qf-popular-search-panel .popular-search-panel-link:hover {
    background: var(--qf-chip-bg);
    color: var(--qf-text-strong);
}

@media (max-width: 767.98px) {
    .qf-search-panel {
        gap: var(--qf-space-2);
    }

    .qf-search-panel .search-short-panel-link {
        padding: 7px 11px;
    }

    .qf-search-filters {
        gap: var(--qf-space-2) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qf-search-form #search-query,
    .qf-search-panel .search-short-panel-link,
    .qf-popular-search-panel .popular-search-panel-link {
        transition: none;
    }
}

/* ============================================================
 * QAUSAINFLIX — PHASE 4.4 SEARCH EXPERIENCE
 *
 * Visual-only Search page polish.
 * Search API, filters, history and DOM hooks remain untouched.
 * ============================================================ */

@media (min-width: 1200px) {

    /* --------------------------------------------------------
       SEARCH PAGE FRAME
       -------------------------------------------------------- */

    body.search-page {
        background:
            radial-gradient(
                circle at 50% 0%,
                rgba(111, 45, 255, 0.055),
                transparent 34%
            ),
            var(--qf-bg, #03070a);
    }

    body.search-page .search-title {
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: var(--qf-space-6, 2rem) !important;

        /* Qausainflix Phase 4.9D:
           Override legacy .search-title truncation on the Search page. */
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    body.search-page .search-title h2,
    body.search-page .search-title h3,
    body.search-page .search-title h4 {
        font-size: clamp(1.8rem, 2.2vw, 2.5rem);
        font-weight: 800;
        letter-spacing: -0.035em;
        line-height: 1.08;
    }

    body.search-page .search-title p {
        margin-top: 0.7rem;
        color: var(--qf-text-muted, rgba(255,255,255,.62));
        white-space: normal;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    /* --------------------------------------------------------
       MAIN SEARCH INPUT
       -------------------------------------------------------- */

    body.search-page .qf-search-form {
        max-width: 920px;
        margin-left: auto;
        margin-right: auto;
    }

    body.search-page .qf-search-form #search-query {
        height: 54px !important;
        min-height: 54px !important;
        padding: 0 18px !important;
        border-radius: 14px !important;
        background: rgba(255,255,255,.045) !important;
        border: 1px solid rgba(255,255,255,.10) !important;
        box-shadow:
            0 8px 28px rgba(0,0,0,.18),
            inset 0 1px 0 rgba(255,255,255,.025);
        font-size: 15px;
        transition:
            border-color .2s ease,
            background-color .2s ease,
            box-shadow .2s ease;
    }

    body.search-page .qf-search-form #search-query:focus {
        background: rgba(255,255,255,.065) !important;
        border-color: rgba(var(--qf-primary-rgb), .45) !important;
        box-shadow:
            0 0 0 3px rgba(var(--qf-primary-rgb), .10),
            0 10px 32px rgba(0,0,0,.20) !important;
    }

    body.search-page .qf-search-form #movie-search {
        width: 54px;
        min-width: 54px;
        height: 54px;
        margin-left: 8px;
        border-radius: 14px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 22px rgba(var(--qf-primary-rgb), .20);
    }

    /* --------------------------------------------------------
       ACTIVE FILTERS
       -------------------------------------------------------- */

    body.search-page .qf-search-filters {
        max-width: 920px;
        margin: 18px auto 0;
        min-height: 0;
    }

    body.search-page .qf-search-filters .label {
        color: var(--qf-text-muted, rgba(255,255,255,.58));
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .02em;
    }

    body.search-page .qf-search-filters .search-filter-item {
        min-height: 32px;
        padding: 7px 11px;
        border-radius: 999px;
        background: rgba(var(--qf-primary-rgb), .10);
        border: 1px solid rgba(var(--qf-primary-rgb), .22);
        color: var(--qf-text-strong, #fff);
        font-size: 12px;
        font-weight: 600;
    }

    /* --------------------------------------------------------
       CATEGORY + GENRE PANELS
       -------------------------------------------------------- */

    body.search-page .qf-search-panel {
        min-height: 0;
        padding: 14px 16px;
        border-radius: 16px;
        background: rgba(255,255,255,.025);
        border: 1px solid rgba(255,255,255,.065);
        box-shadow: 0 8px 26px rgba(0,0,0,.12);
    }

    body.search-page .qf-search-panel .search-short-panel-link {
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 7px 12px;
        margin: 3px;
        border-radius: 999px;
        background: rgba(255,255,255,.045);
        border: 1px solid rgba(255,255,255,.075);
        color: var(--qf-text-muted, rgba(255,255,255,.68));
        font-size: 12px;
        font-weight: 600;
        transition:
            background-color .18s ease,
            border-color .18s ease,
            color .18s ease,
            transform .18s ease;
    }

    body.search-page .qf-search-panel .search-short-panel-link:hover {
        background: rgba(var(--qf-primary-rgb), .10);
        border-color: rgba(var(--qf-primary-rgb), .24);
        color: var(--qf-text-strong, #fff);
        transform: translateY(-1px);
    }

    body.search-page .qf-search-panel .search-short-panel-link.active {
        background: rgba(var(--qf-primary-rgb), .18);
        border-color: rgba(var(--qf-primary-rgb), .38);
        color: var(--qf-text-strong, #fff);
        box-shadow: 0 4px 14px rgba(var(--qf-primary-rgb), .12);
    }

    /* --------------------------------------------------------
       POPULAR SEARCHES
       -------------------------------------------------------- */

    body.search-page .qf-popular-search-panel {
        margin-top: 16px;
    }

    body.search-page .qf-popular-search-panel .popular-search-panel-link {
        padding: 8px 12px;
        border-radius: 10px;
        background: rgba(255,255,255,.035);
        border: 1px solid rgba(255,255,255,.055);
    }

    body.search-page .qf-popular-search-panel .popular-search-panel-link:hover {
        background: rgba(255,255,255,.065);
        border-color: rgba(var(--qf-primary-rgb), .20);
    }

    /* --------------------------------------------------------
       EMPTY STATE
       -------------------------------------------------------- */

    body.search-page #no-data-found,
    body.search-page #no_result,
    body.search-page .search-not-found {
        margin-top: 22px;
    }

    body.search-page .search-not-found {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* --------------------------------------------------------
       RESULT AREA
       -------------------------------------------------------- */

    body.search-page #search_list {
        margin-top: 28px;
    }

}

@media (max-width: 1199.98px) {

    /* Qausainflix Phase 4.9D:
       Reset legacy .search-title truncation on tablet/mobile. */
    body.search-page .search-title {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: 100%;
    }

    body.search-page .search-title p {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    body.search-page .qf-search-form #search-query {
        min-height: 48px;
        height: 48px;
        border-radius: 12px !important;
    }

    body.search-page .qf-search-panel .search-short-panel-link {
        margin: 2px;
    }

}

@media (prefers-reduced-motion: reduce) {

    body.search-page .qf-search-form #search-query,
    body.search-page .qf-search-panel .search-short-panel-link {
        transition: none;
    }

}
