

#search-view [hidden] { display: none !important; }

#search-view:has(#dedicated-search:not(:placeholder-shown)) .search-hero { display: none; }

.srch-box {
    position: relative;
    z-index: 30;
    width: min(720px, 100%);
}

#search-view .srch-box .srch-bar {
    width: 100%;
    margin-bottom: 0;
}

#search-view .srch-box .srch-bar:hover,
#search-view .srch-box .srch-bar:focus-within { transform: none; }

.srch-clear {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, .5);
    cursor: pointer;
    font-size: .95rem;
    transition: background .15s ease, color .15s ease;
}

.srch-clear:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.srch-clear:focus-visible,
.srch-opt:focus-visible,
.srch-recent-x:focus-visible,
.srch-sg-clear:focus-visible,
.srch-person:focus-visible,
.srch-more:focus-visible,
.srch-none-btn:focus-visible,
.srch-reset:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.srch-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 560px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    border-radius: 20px;
    background: rgba(16, 17, 27, .82);
    border: 1px solid rgba(255, 255, 255, .09);
    border-top-color: rgba(255, 255, 255, .17);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 10px rgba(0, 0, 0, .3);
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .18) transparent;
    animation: srch-drop .16s ease-out;
}

@keyframes srch-drop {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.srch-suggest.is-busy .srch-opt:not(.srch-opt-all) { opacity: .5; }

.srch-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 7px 10px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #fff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .12s ease, opacity .15s ease;
}

.srch-opt.is-active { background: rgba(var(--primary-rgb), .16); }

.srch-opt-thumb {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.srch-opt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.srch-opt-thumb.is-round { height: 40px; border-radius: 50%; }

.srch-opt-thumb.is-icon {
    height: 40px;
    border-radius: 12px;
    color: rgba(255, 255, 255, .6);
    font-size: .9rem;
}

.srch-opt-thumb.is-flat { background: none; box-shadow: none; height: 32px; }

.srch-opt-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.srch-opt-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .8);
}

.srch-opt-title mark { background: none; color: #fff; font-weight: 800; }

.srch-opt-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .5);
}

.srch-opt-star i { font-size: .7em; color: rgba(255, 255, 255, .55); }
.srch-dot { opacity: .6; }

.srch-opt-kind {
    flex: none;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .58);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.srch-opt-all { min-height: 52px; margin-top: 2px; }
.srch-opt-all .srch-opt-title { color: rgba(255, 255, 255, .88); }
.srch-opt-all:not(:first-child) { border-top: 1px solid rgba(255, 255, 255, .06); border-radius: 0 0 13px 13px; }
.srch-opt-all.is-active { border-radius: 13px; }

.srch-kbd {
    flex: none;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-bottom-width: 2px;
    color: rgba(255, 255, 255, .5);
    font-family: inherit;
    font-size: .66rem;
    font-weight: 700;
}

.srch-sg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px 6px 12px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .42);
}

.srch-sg-clear {
    padding: 6px 10px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: rgba(255, 255, 255, .62);
    font-family: inherit;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}

.srch-sg-clear:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.srch-recent { display: flex; align-items: center; gap: 4px; }
.srch-recent .srch-opt { min-height: 46px; }
.srch-recent .srch-opt-title { color: rgba(255, 255, 255, .86); font-weight: 500; }

.srch-recent-x {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 4px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: rgba(255, 255, 255, .4);
    cursor: pointer;
    font-size: .85rem;
    transition: background .12s ease, color .12s ease;
}

.srch-recent-x:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.srch-sg-empty,
.srch-sg-loading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 12px 10px;
    font-size: .86rem;
    color: rgba(255, 255, 255, .55);
}

.srch-sg-empty strong { color: rgba(255, 255, 255, .85); font-weight: 700; }

.srch-sg-loading { flex-direction: row; align-items: center; gap: 10px; padding: 14px 12px; }

#search-view .srch-filters[data-fade="r"] {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
}

#search-view .srch-filters[data-fade="l"] {
    -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 56px), transparent);
    mask-image: linear-gradient(to left, #000 calc(100% - 56px), transparent);
}

#search-view .srch-filters[data-fade="lr"] {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent);
}

#search-view .srch-sort {
    display: flex;
    margin: 12px 0 22px;
    min-height: 44px;
}

#search-view .srch-count { min-width: 0; }
#search-view .srch-count strong { color: #fff; font-weight: 800; }
.srch-count-f { color: rgba(255, 255, 255, .45); font-weight: 600; }

#search-view .srch-sort-right { flex-wrap: nowrap; gap: 8px; }

.srch-select {
    position: relative;
    flex: none;
    display: inline-flex;
    align-items: center;
    height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .09);
    color: rgba(255, 255, 255, .7);
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.srch-select > i {
    position: absolute;
    left: 13px;
    font-size: .74rem;
    opacity: .75;
    pointer-events: none;
}

.srch-select::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: .6;
    pointer-events: none;
}

.srch-select select {
    height: 100%;
    padding: 0 32px 0 32px;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: dark;
    outline: none;
}

.srch-select select option { background: #12131c; color: #fff; }

.srch-select:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.srch-select:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }

.srch-select.is-set {
    background: rgba(var(--primary-rgb), .16);
    border-color: rgba(var(--primary-rgb), .45);
    color: #fff;
}

.srch-reset {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: rgba(255, 255, 255, .6);
    font-family: inherit;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}

.srch-reset i { font-size: .75em; }
.srch-reset:hover { color: #fff; background: rgba(255, 255, 255, .06); }

#search-view[data-mode="empty"] .search-sort-chips { display: none; }

#search-view .srch-pagination:empty { margin: 0; }

#search-view.srch-people-mode .srch-genres,
#search-view.srch-people-mode .srch-sep,
#search-view.srch-people-mode .srch-select,
#search-view.srch-people-mode .search-sort-chips { display: none; }

.srch-people {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: -6px 0 22px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.srch-people::-webkit-scrollbar { display: none; }

.srch-people-label {
    flex: none;
    margin-right: 4px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .4);
}

.srch-person {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 44px;
    padding: 4px 16px 4px 4px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .045);
    color: rgba(255, 255, 255, .85);
    font-family: inherit;
    font-size: .84rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.srch-person img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: rgba(255, 255, 255, .06); }
.srch-person:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .16); color: #fff; }

.srch-grid-loading,
.srch-grid-note,
.srch-none,
.srch-none-label { grid-column: 1 / -1; }

.srch-grid-loading { display: flex; justify-content: center; padding: 60px 0; }
.srch-grid-note { display: flex; justify-content: center; padding: 40px 0; }

.srch-none {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 40px 20px 30px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .07);
}

.srch-none-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .4);
    font-size: 1.3rem;
}

.srch-none h3 {
    margin: 0;
    font-family: var(--font-display, inherit);
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .9);
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.srch-none p {
    margin: 0;
    max-width: 440px;
    font-size: .9rem;
    color: rgba(255, 255, 255, .55);
    text-wrap: balance;
}

.srch-none-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }

.srch-none-btn,
.srch-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid rgba(var(--primary-rgb), .45);
    background: rgba(var(--primary-rgb), .16);
    color: #fff;
    font-family: inherit;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.srch-none-btn:hover,
.srch-more:hover { background: rgba(var(--primary-rgb), .26); border-color: rgba(var(--primary-rgb), .6); }

.srch-none-btn.is-quiet {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .12);
}

.srch-none-btn.is-quiet:hover { background: rgba(255, 255, 255, .09); }

.srch-more { min-width: 180px; }
.srch-more i { font-size: .8em; opacity: .85; }
.srch-more:disabled { cursor: default; opacity: .75; }

.srch-none-label,
.srch-trend-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 0;
    font-family: var(--font-display, inherit);
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .85);
}

.srch-none-label i,
.srch-trend-head h2 i { font-size: .85em; color: var(--primary); }

#search-view .srch-placeholder.has-trend { padding: 6px 16px 0; }
#search-view .srch-placeholder.has-trend .search-placeholder-orb,
#search-view .srch-placeholder.has-trend h2 { display: none; }
#search-view .srch-placeholder.has-trend p { margin: 0; font-size: .86rem; }

.srch-trend { width: 100%; margin: 18px 0 80px; }
.srch-trend.is-empty { display: none; }
.srch-trend-head { margin-bottom: 14px; }
.srch-trend-head h2 { margin: 0; }

.srch-trend:not(.is-ready) .srch-trend-head { display: none; }

@media (max-width: 780px) {
    #search-view .srch-trend-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        padding: 0 !important;
    }

    #search-view .srch-trend-grid > .row__poster-container { width: 100% !important; }
}

@media (max-width: 420px) {
    #search-view .srch-trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 780px) {
    .srch-box { width: 100%; }

    .srch-suggest { border-radius: 18px; padding: 4px; }
    .srch-opt { min-height: 60px; padding: 8px; }
    .srch-recent .srch-opt { min-height: 48px; }
    .srch-recent-x { width: 44px; height: 44px; margin-right: 0; }
    .srch-opt-kind { padding: 2px 7px; font-size: .6rem; }

    #search-view .srch-sort { margin: 8px 0 16px; min-height: 0; }
    #search-view .srch-sort-right { padding-bottom: 2px; }
    .srch-select { height: 40px; }
    .srch-select select { font-size: .8rem; }

    .srch-people { margin: -2px 0 16px; }
    .srch-none { padding: 30px 16px 24px; }
    .srch-trend { margin-top: 10px; }
}

@media (max-width: 480px) {
    #search-view .srch-sort-right { flex-wrap: wrap; overflow: visible; }
    #search-view .srch-sort-right .srch-select { flex: 1 1 0; min-width: 0; }
    #search-view .srch-sort-right .srch-select select { width: 100%; }
    #search-view .srch-sort-right .search-sort-chips { flex: 1 1 100%; order: 3; }
    #search-view .srch-sort-right .search-sort-chips .sort-chip { flex: 1 1 0; justify-content: center; }
    #search-view .srch-sort-right .srch-reset { order: 2; padding: 0 8px; }
}

@media (pointer: coarse) {
    .srch-kbd { display: none; }
    .srch-clear { width: 40px; height: 40px; }
    .srch-select { height: 42px; }
    .srch-reset { min-height: 40px; }
    .srch-sg-clear { min-height: 40px; }
}

html.no-gpu .srch-suggest {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(16, 17, 27, .98);
}

html.reduce-motion .srch-suggest,
html.reduce-motion .srch-opt,
html.reduce-motion .srch-clear,
html.reduce-motion .srch-recent-x,
html.reduce-motion .srch-select,
html.reduce-motion .srch-person,
html.reduce-motion .srch-more,
html.reduce-motion .srch-none-btn { animation: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
    .srch-suggest,
    .srch-opt,
    .srch-clear,
    .srch-recent-x,
    .srch-select,
    .srch-person,
    .srch-more,
    .srch-none-btn { animation: none; transition: none; }
}
