.search-mobile-back,
#search-mobile-clear,
.search-title-mobile,
.search-mobile-filters,
.search-filter-toggle {
    display: none;
}

.search-filter-sheet {
    position: fixed;
    inset: auto 0 0;
    width: min(100%, 500px);
    max-width: 100%;
    max-height: min(82dvh, 740px);
    margin: 0 auto;
    padding: 12px 22px calc(20px + env(safe-area-inset-bottom));
    overflow: hidden;
    border: 1px solid #323745;
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: #0f141c;
    color: #f7f8fb;
    box-shadow: 0 -10px 45px #0006;
}

.search-filter-sheet[open] {
    display: flex;
    flex-direction: column;
}

.search-filter-sheet::backdrop {
    background: #0009;
    backdrop-filter: none;
}

.search-sheet-handle {
    width: 38px;
    height: 4px;
    flex-shrink: 0;
    margin: 0 auto 24px;
    border-radius: 4px;
    background: #697080;
}

.search-sheet-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.search-sheet-heading h2 {
    margin: 0;
    font-size: 20px;
}

.search-sheet-heading button {
    padding: 0 4px;
    color: #d5dae4;
    font-size: 27px;
    line-height: 1;
}

.search-sheet-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 12px;
    border: 1px solid #333b4b;
    border-radius: 24px;
    background: #1a212d;
    color: #aab1c0;
}

.search-sheet-search svg {
    width: 17px;
    height: 17px;
}

.search-sheet-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: white;
    font-size: 13px;
}

.search-sheet-options {
    min-height: 0;
    overflow-y: auto;
    margin-top: 10px;
    overscroll-behavior: contain;
}

.search-sheet-option {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 49px;
    padding: 12px 0;
    border-bottom: 1px solid #ffffff08;
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
}

.search-sheet-option input {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
    margin: 0;
    accent-color: #ff0065;
}

.search-sheet-option small {
    margin-left: auto;
    color: #a3adbf;
    font-size: 12px;
}

.search-sheet-apply {
    flex-shrink: 0;
    margin-top: 22px;
    padding: 15px;
    border-radius: 15px;
    background: #ff0064;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.dracinmax-header .header-search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #f4f4f7;
    font-size: 12px;
}

.header-search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

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

.dracinmax-header .header-search:focus-within {
    border-color: #ff4b8a80;
}

#header-search-clear {
    flex-shrink: 0;
    padding: 0 2px;
    color: #d6d4de;
    font-size: 21px;
    line-height: 1;
}

@media (min-width: 761px) {
    .dracinmax-header .header-actions .header-mobile-search {
        display: none;
    }

    .dracinmax-header .header-actions .header-search {
        justify-content: flex-start;
        width: clamp(230px, 25vw, 355px);
        margin: 0;
        padding: 8px 13px;
    }

    .search-page .search-bar {
        display: none;
    }

    .search-page .search-main {
        padding-top: 35px;
    }
}

@media (min-width: 761px) and (max-width: 1000px) {
    .dracinmax-header .header-actions .header-search {
        width: 190px;
    }
}

@media (max-width: 760px) {
    .dracinmax-header .header-actions .header-search {
        display: none;
    }
}

.search-page .site-header {
    position: relative;
}

.search-main {
    position: relative;
    isolation: isolate;
    min-height: 65vh;
    padding: 38px 5% 55px;
}

.search-main::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: url("../images/genre-waves.svg") center bottom / cover no-repeat;
    opacity: .12;
    pointer-events: none;
    content: "";
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 13px;
    width: min(100%, 640px);
    margin: 0 auto;
    padding: 6px 7px 6px 20px;
    border: 1px solid #30303c;
    border-radius: 30px;
    background: #14161e;
    color: #a4a9b9;
}

.search-bar:focus-within {
    border-color: #ff377d90;
    box-shadow: 0 0 0 3px #ff12610a;
}

.search-bar input {
    width: 100%;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    outline: none;
    background: transparent;
    color: white;
    font-size: 14px;
}

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

.search-submit {
    padding: 10px 22px;
    border-radius: 22px;
    background: #ff075f;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.search-welcome {
    padding: 26px 0 5px;
    text-align: center;
}

.search-art {
    position: relative;
    width: 300px;
    height: 155px;
    margin: 0 auto 10px;
}

.search-art-glass {
    position: absolute;
    z-index: 1;
    top: 27px;
    left: 95px;
    width: 114px;
    height: 114px;
    filter: drop-shadow(0 0 17px #ff075f55);
}

.search-art-card {
    position: absolute;
    display: grid;
    place-items: center;
    width: 73px;
    height: 91px;
    border: 1px solid #ff3b7c21;
    border-radius: 8px;
    background: linear-gradient(130deg, #43102940, #1a101c20);
    color: #5e354c;
}

.search-art-play {
    top: 42px;
    left: 12px;
    transform: rotate(-23deg);
}

.search-art-play svg {
    width: 30px;
    height: 30px;
}

.search-art-picture {
    top: 9px;
    right: 12px;
    width: 99px;
    transform: rotate(18deg);
    color: #382033;
}

.search-art-picture svg {
    width: 58px;
    height: 58px;
}

.search-spark {
    position: absolute;
    color: #97053f;
    font-size: 19px;
}

.search-spark-one {
    top: 10px;
    left: 90px;
}

.search-spark-two {
    right: 40px;
    bottom: 4px;
    color: #4d0f2c;
    font-size: 15px;
}

.search-welcome h1 {
    margin: 0 0 9px;
    font-size: clamp(27px, 3vw, 36px);
    letter-spacing: -.9px;
}

.search-welcome h1 span {
    color: #ff0061;
}

.search-welcome > p {
    margin: 0;
    color: #aaaebd;
    font-size: 14px;
    line-height: 1.6;
}

.search-suggestions {
    margin-top: 28px;
}

.search-suggestions h2 {
    margin: 0 0 13px;
    color: #e2e1e7;
    font-size: 13px;
    font-weight: 600;
}

.suggestion-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.suggestion-list button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 35px;
    padding: 9px 12px;
    border: 1px solid #292b37;
    border-radius: 7px;
    background: #13161f;
    font-size: 11px;
}

.suggestion-list svg {
    width: 15px;
    height: 15px;
    color: #a2a9bc;
}

.suggestion-list button:hover {
    border-color: #ff17646b;
    background: #251421;
}

.search-results-section {
    max-width: 1300px;
    margin: 35px auto 0;
}

#search-term {
    color: #ff0061;
}

.search-result-controls,
.search-result-filters,
.search-view-switch {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-result-controls {
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 20px 0 25px;
}

.search-result-filters {
    flex-wrap: wrap;
}

.search-result-filters select {
    min-width: 180px;
    height: 43px;
    padding: 10px 14px;
    border: 1px solid #2c303d;
    border-radius: 8px;
    background: #11151d;
    color: #f1f0f5;
    font: inherit;
    font-size: 13px;
}

.search-view-switch {
    gap: 0;
    overflow: hidden;
    border: 1px solid #2a2d39;
    border-radius: 9px;
}

.search-view-switch button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    font-size: 13px;
}

.search-view-switch svg {
    width: 17px;
    height: 17px;
}

.search-view-switch [aria-pressed="true"] {
    background: #ff0061;
    color: white;
}

.search-result-card {
    position: relative;
    display: block;
    min-width: 0;
}

.search-result-poster {
    position: relative;
    display: block;
    aspect-ratio: 4 / 4.8;
    overflow: hidden;
    border: 1px solid #ffffff12;
    border-radius: 8px;
    background: #22141e;
    isolation: isolate;
}

.search-poster-art {
    position: absolute;
    z-index: -2;
    top: 0;
    left: 50%;
    height: 100%;
    aspect-ratio: 1;
    transform: translateX(-50%);
    background: url("../images/drama-posters.png") var(--art-x) var(--art-y) / 300% 300%;
    transition: filter .2s;
}

.search-result-card:hover .search-poster-art {
    filter: brightness(1.13);
}

.search-result-poster::after {
    position: absolute;
    z-index: -1;
    inset: 50% 0 0;
    background: linear-gradient(transparent, #05050bc9);
    content: "";
}

.search-result-episode {
    position: absolute;
    top: 9px;
    left: 9px;
    padding: 5px 8px;
    border-radius: 5px;
    background: #ff075d;
    font-size: 12px;
    font-weight: 700;
}

.search-cover-title {
    position: absolute;
    right: 9px;
    bottom: 12px;
    left: 9px;
    font-family: Georgia, serif;
    font-size: clamp(17px, 1.8vw, 27px);
    font-style: italic;
    line-height: 1.05;
    text-align: center;
}

.search-result-copy {
    display: block;
    margin: 9px 32px 0 3px;
}

.search-result-link {
    display: block;
    width: 100%;
    min-width: 0;
}

.search-result-card .search-card-menu {
    top: auto;
    right: -3px;
    bottom: 8px;
}

.search-results.is-list .search-result-link {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-result-copy strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.search-result-copy > span {
    display: block;
    margin-top: 4px;
    color: #a8b0c2;
    font-size: 12px;
}

.search-results.is-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.search-results.is-list .search-result-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border: 1px solid #242633;
    border-radius: 9px;
    background: #101218;
}

.is-list .search-result-poster {
    width: 90px;
    flex-shrink: 0;
}

.is-list .search-cover-title {
    font-size: 14px;
}

.is-list .search-result-episode {
    top: 4px;
    left: 4px;
    padding: 4px;
    font-size: 9px;
}

@media (max-width: 1050px) and (min-width: 761px) {
    .search-results {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .search-results.is-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.search-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.search-results-heading h1 {
    margin: 0;
    font-size: 24px;
}

#search-reset {
    color: #ff85b0;
    font-size: 12px;
}

#search-result-count {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 24px 16px;
    margin-top: 22px;
}

.search-results .poster {
    display: block;
}

.search-result-meta {
    color: #9fa3b2;
    font-size: 11px;
}

.search-empty {
    grid-column: 1 / -1;
    padding: 45px 15px;
    border: 1px dashed #34303c;
    border-radius: 12px;
    color: #aaa6b5;
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

#search-more {
    display: block;
    margin: 30px auto 0;
    padding: 12px 25px;
    border: 1px solid #38313f;
    border-radius: 8px;
    color: #d0cad8;
    font-size: 13px;
}

@media (max-width: 760px) {
    .search-result-controls {
        gap: 15px;
    }

    .search-result-filters {
        width: 100%;
        gap: 10px;
    }

    .search-result-filters select {
        min-width: 0;
        width: calc(50% - 5px);
        padding: 9px;
        font-size: 11px;
    }

    .search-results.is-list {
        grid-template-columns: 1fr;
    }

    .search-cover-title {
        font-size: 24px;
    }

    .search-main {
        min-height: 70vh;
        padding: 24px 5% 35px;
    }

    .search-bar {
        gap: 9px;
        padding-left: 14px;
    }

    .search-bar input {
        font-size: 12px;
    }

    .search-submit {
        padding: 10px 15px;
        font-size: 12px;
    }

    .search-welcome {
        padding-top: 24px;
    }

    .search-welcome > p {
        font-size: 12px;
    }

    .search-art {
        transform: scale(.9);
        margin-bottom: 0;
    }

    .suggestion-list {
        gap: 8px;
    }

    .search-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 12px;
    }

    .search-results .poster-title {
        font-size: 24px;
    }

    .search-results .card-title {
        font-size: 13px;
    }

    .search-results-heading h1 {
        font-size: 20px;
    }
}

/* Pencarian mobile memakai toolbar ringkas dan filter panel bawah. */
@media (max-width: 760px) {
    .search-page .site-header.dracinmax-header {
        display: none;
    }

    .search-page .search-main {
        padding: calc(20px + env(safe-area-inset-top)) 5% 35px;
        min-height: 80vh;
    }

    .search-main::before {
        display: none;
    }

    .search-mobile-back {
        position: absolute;
        top: calc(32px + env(safe-area-inset-top));
        left: 5%;
        display: grid;
        place-items: center;
        width: 25px;
        height: 25px;
        padding: 0;
        color: #e7eaf1;
    }

    .search-bar {
        gap: 9px;
        width: calc(100% - 38px);
        min-height: 49px;
        margin: 0 0 27px auto;
        padding: 8px 13px;
        border-color: #2d3544;
        background: #141a24;
    }

    .search-bar > [data-icon] svg {
        width: 19px;
        height: 19px;
    }

    .search-bar input {
        padding: 5px 0;
        font-size: 14px;
    }

    #search-query::-webkit-search-cancel-button {
        -webkit-appearance: none;
    }

    .search-submit {
        display: none;
    }

    #search-mobile-clear {
        display: block;
        padding: 0 2px;
        color: #c5ccda;
        font-size: 26px;
        line-height: 1;
    }

    .search-results-section {
        margin-top: 0;
    }

    .search-results-heading {
        align-items: center;
        min-height: 35px;
    }

    .search-results-heading h1 {
        font-size: 18px;
        font-weight: 500;
        line-height: 1.5;
    }

    .search-title-desktop,
    #search-reset,
    .search-result-controls {
        display: none;
    }

    .search-title-mobile {
        display: inline;
    }

    #search-result-count {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .search-filter-toggle {
        display: grid;
        place-items: center;
        width: 33px;
        height: 33px;
        flex-shrink: 0;
        padding: 7px;
        border: 1px solid #292f3d;
        border-radius: 8px;
        color: #b8c0d0;
    }

    .search-filter-toggle svg {
        width: 18px;
        height: 18px;
    }

    .search-mobile-filters {
        display: flex;
        gap: 12px;
        margin: 18px 0;
    }

    .search-mobile-filters button {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        min-height: 39px;
        min-width: 95px;
        padding: 10px 15px;
        border: 1px solid #303745;
        border-radius: 24px;
        background: #0e131c;
        font-size: 12px;
    }

    .search-mobile-filters svg {
        width: 15px;
        height: 15px;
    }

    .search-results {
        gap: 23px 13px;
        margin-top: 0;
    }

    .search-result-poster {
        aspect-ratio: 3 / 4;
    }

    .search-result-copy {
        margin: 8px 32px 0 1px;
    }

    .search-result-copy strong {
        font-size: 13px;
    }

    .search-result-copy > span {
        font-size: 12px;
    }

    .search-cover-title {
        font-size: clamp(21px, 6vw, 33px);
    }

    .search-result-episode {
        top: 8px;
        left: 7px;
        padding: 5px 7px;
        font-size: 11px;
    }
}
