/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    background: #080808;
}


body {
    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            #101010 0%,
            #080808 40%,
            #050505 100%
        );

    color: #ffffff;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


/* =========================================
   CABEÇALHO
========================================= */

.search-header {

    height: 70px;

    display: flex;
    align-items: center;

    gap: 16px;

    padding:
        0
        clamp(18px, 4vw, 50px);

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.08);

    background:
        rgba(8, 8, 8, 0.92);

    position: sticky;
    top: 0;

    z-index: 50;

    backdrop-filter:
        blur(15px);
}


.search-header h1 {

    font-size: 21px;
    font-weight: 700;

}


.back-button {

    width: 42px;
    height: 42px;

    border: 0;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.08);

    color: white;

    font-size: 34px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;

}


.back-button:hover {

    background:
        rgba(255, 255, 255, 0.15);

    transform:
        scale(1.05);

}


/* =========================================
   PÁGINA
========================================= */

.search-page {

    width: min(
        1400px,
        calc(100% - 36px)
    );

    margin:
        0
        auto;

    padding:
        35px
        0
        80px;

}


/* =========================================
   CAMPO DE PESQUISA
========================================= */

.search-box {

    width: 100%;

    min-height: 58px;

    display: flex;
    align-items: center;

    gap: 14px;

    padding:
        0
        18px;

    background:
        #171717;

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius:
        14px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;

}


.search-box:focus-within {

    background:
        #1c1c1c;

    border-color:
        rgba(255, 255, 255, 0.35);

    box-shadow:
        0
        0
        0
        3px
        rgba(255, 255, 255, 0.04);

}


.search-box svg {

    width: 25px;
    height: 25px;

    fill:
        #a5a5a5;

    flex-shrink: 0;

}


.search-box input {

    width: 100%;

    border: 0;
    outline: 0;

    background:
        transparent;

    color:
        white;

    font-size:
        17px;

}


.search-box input::placeholder {

    color:
        #777;

}


.clear-search {

    width: 34px;
    height: 34px;

    flex-shrink: 0;

    border: 0;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.08);

    color:
        #cccccc;

    font-size:
        24px;

    cursor: pointer;

}


/* =========================================
   MENSAGEM
========================================= */

.search-message,
.no-results {

    min-height:
        390px;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    text-align: center;

    color:
        #888;

}


.search-big-icon {

    font-size:
        65px;

    margin-bottom:
        18px;

    color:
        #555;

}


.search-message h2,
.no-results h2 {

    color:
        #e5e5e5;

    font-size:
        21px;

    margin-bottom:
        8px;

}


.search-message p,
.no-results p {

    font-size:
        14px;

}


/* =========================================
   SEÇÕES
========================================= */

.result-section {

    margin-top:
        42px;

}


.section-heading {

    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom:
        18px;

}


.section-heading h2 {

    font-size:
        21px;

}


.section-heading span {

    color:
        #777;

    font-size:
        14px;

}


/* =========================================
   GRID
========================================= */

.results-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(170px, 1fr)
        );

    gap:
        24px
        16px;

}


/* =========================================
   CARD
========================================= */

.search-card {

    display: block;

    min-width: 0;

    color:
        white;

    text-decoration:
        none;

    border-radius:
        12px;

    transition:
        transform 0.2s ease;

}


.search-card:hover {

    transform:
        translateY(-5px);

}


.search-card-image {

    position: relative;

    width: 100%;

    aspect-ratio:
        16 / 9;

    overflow: hidden;

    border-radius:
        10px;

    background:
        #181818;

}


.search-card-image img {

    width: 100%;
    height: 100%;

    display: block;

    object-fit:
        cover;

    transition:
        transform 0.3s ease;

}


.search-card:hover
.search-card-image img {

    transform:
        scale(1.05);

}


/* SOMBRA */

.search-card-image::after {

    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.55),
            transparent 55%
        );

    pointer-events: none;

}


/* PLAY */

.search-card-play {

    position: absolute;

    left: 12px;
    bottom: 10px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.92);

    color:
        black;

    font-size:
        14px;

    z-index: 2;

    opacity: 0;

    transform:
        scale(0.8);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;

}


.search-card:hover
.search-card-play {

    opacity: 1;

    transform:
        scale(1);

}


/* =========================================
   INFORMAÇÕES
========================================= */

.search-card-info {

    padding:
        10px
        3px
        0;

}


.search-card-info h3 {

    font-size:
        15px;

    line-height:
        1.3;

    white-space:
        nowrap;

    overflow:
        hidden;

    text-overflow:
        ellipsis;

}


.search-card-meta {

    display: flex;
    align-items: center;

    gap: 7px;

    margin-top:
        6px;

    color:
        #888;

    font-size:
        12px;

}


.search-type {

    color:
        #bcbcbc;

}


/* =========================================
   RESPONSIVO
========================================= */

@media (
    max-width: 600px
) {

    .search-header {

        height:
            62px;

        padding:
            0
            14px;

    }


    .search-page {

        width:
            calc(100% - 28px);

        padding-top:
            22px;

    }


    .search-box {

        min-height:
            54px;

    }


    .search-box input {

        font-size:
            16px;

    }


    .results-grid {

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap:
            20px
            11px;

    }


    .search-card-info h3 {

        font-size:
            14px;

    }


    .search-card-play {

        opacity:
            1;

        transform:
            scale(0.9);

    }

}

/* =========================================
   RESPEITAR ELEMENTOS ESCONDIDOS
========================================= */

[hidden] {
    display: none !important;
}