/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
}

html {
    background: #0b0b0b;
}

body {
    margin: 0;

    background:
        linear-gradient(
            180deg,
            #080808 0%,
            #101010 35%,
            #0d0d0d 100%
        );

    color: #ffffff;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    min-height: 100vh;

    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}



/* =========================================
   HEADER
========================================= */

.wala-header {
    position: sticky;
    top: 0;
    z-index: 100;

    width: 100%;
    height: 60px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 0 18px;

    background: #000;
}


/* =========================================
   BOTÃO VOLTAR
========================================= */

.back-button {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;

    text-decoration: none;

    font-size: 42px;
    font-weight: 300;
    line-height: 1;

    transition:
        transform .2s ease,
        opacity .2s ease;
}

.back-button:hover {
    opacity: .8;
    transform: translateX(-2px);
}


/* =========================================
   LOGO WALA
========================================= */

.wala-logo {
    color: #20e070;

    font-size: 24px;
    font-weight: 900;

    letter-spacing: -1px;

    text-decoration: none;
}


/* =========================================
   AÇÕES HEADER
========================================= */

.header-actions {
    display: flex;
    align-items: center;

    gap: 17px;
}

.header-btn {
    position: relative;

    width: 32px;
    height: 32px;

    padding: 3px;

    border: 0;

    background: transparent;

    color: white;

    cursor: pointer;
}

.header-btn svg {
    width: 100%;
    height: 100%;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}



/* =========================================
   NOTIFICAÇÃO
========================================= */

.notification-count {
    position: absolute;

    top: -4px;
    right: -5px;

    min-width: 17px;
    height: 17px;

    padding: 0 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #e50914;

    color: #fff;

    border-radius: 50%;

    border: 2px solid #000;

    font-size: 9px;
    font-weight: 800;
}



/* =========================================
   PERFIL
========================================= */

.profile-btn {
    position: relative;

    width: 35px;
    height: 35px;

    padding: 0;

    overflow: hidden;

    border: 0;
    border-radius: 6px;

    background:
        linear-gradient(
            135deg,
            #673ab7,
            #ff8a80
        );

    cursor: pointer;
}

.profile-btn img {
    position: relative;

    z-index: 2;

    width: 100%;
    height: 100%;

    display: block;

object-fit: contain;
}

.profile-fallback {
    position: absolute;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 17px;
    font-weight: 900;

    color: white;
}



/* =========================================
   BUSCA
========================================= */

.search-panel {
    position: sticky;
    top: 64px;

    z-index: 90;

    max-height: 0;

    overflow: hidden;

    opacity: 0;

    padding: 0 22px;

    background: #090909;

    transition:
        max-height .25s ease,
        opacity .2s ease,
        padding .25s ease;
}

.search-panel.active {
    max-height: 90px;

    opacity: 1;

    padding-top: 12px;
    padding-bottom: 14px;
}

.search-box {
    width: 100%;
    max-width: 650px;

    height: 44px;

    display: flex;
    align-items: center;

    margin: auto;

    background: #262626;

    border: 1px solid #444;

    border-radius: 4px;
}

.search-box svg {
    width: 22px;
    height: 22px;

    margin-left: 13px;

    fill: none;

    stroke: #aaa;
    stroke-width: 2;
}

.search-box input {
    flex: 1;

    min-width: 0;

    height: 100%;

    padding: 0 12px;

    border: 0;
    outline: 0;

    background: transparent;

    color: white;

    font-size: 15px;
}

.search-box input::placeholder {
    color: #999;
}

.close-search {
    width: 44px;
    height: 44px;

    border: 0;

    background: transparent;

    color: #bbb;

    font-size: 29px;

    cursor: pointer;
}



/* =========================================
   CONTEÚDO
========================================= */

.wala-content {
    width: 100%;

    padding:
        22px
        0
        60px;
}



/* =========================================
   FILEIRA
========================================= */

.catalog-row {
    margin-bottom: 32px;
}

.catalog-row h2 {
    margin:
        0
        0
        12px
        22px;

    color: #f4f4f4;

    font-size: 19px;
    font-weight: 700;

    letter-spacing: -.25px;
}



/* =========================================
   SLIDER
========================================= */
.cards-slider {
    display: flex;

    gap: 9px;

    overflow-x: auto;
    overflow-y: hidden;

    padding:
        0
        22px
        9px;

    scroll-behavior: smooth;

    scroll-snap-type: x proximity;

    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;
}

.cards-slider::-webkit-scrollbar {
    display: none;
}


/* =========================================
   CARD
========================================= */

.movie-card {
    position: relative;

    flex:
        0
        0
        clamp(145px, 18vw, 235px);

    min-width: 0;

    scroll-snap-align: start;

    border-radius: 6px;

    transition:
        transform .22s ease,
        filter .22s ease;

    outline: none;
}

.card-image {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 6px;

    background: #1b1b1b;
}

.card-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform .28s ease,
        filter .28s ease;
}


/* =========================================
   HOVER
========================================= */

@media (hover: hover) {

    .movie-card:hover {
        z-index: 5;

        transform: scale(1.07);
    }

    .movie-card:hover .card-image img {
        transform: scale(1.04);

        filter: brightness(.82);
    }

    .movie-card:hover .card-play {
        opacity: 1;

        transform:
            translate(-50%, -50%)
            scale(1);
    }
}


/* =========================================
   PLAY NO HOVER
========================================= */

.card-play {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding-left: 3px;

    border:
        2px solid
        rgba(255,255,255,.92);

    border-radius: 50%;

    background:
        rgba(0,0,0,.55);

    color: white;

    font-size: 18px;

    opacity: 0;

    transform:
        translate(-50%, -50%)
        scale(.75);

    transition:
        opacity .2s ease,
        transform .2s ease;

    pointer-events: none;
}


/* =========================================
   BADGE
========================================= */

.badge {
    position: absolute;

    left: 7px;
    bottom: 7px;

    max-width:
        calc(100% - 14px);

    padding:
        4px
        7px;

    background: #e50914;

    color: white;

    border-radius: 2px;

    font-size: 9px;
    font-weight: 800;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================
   PROGRESSO
========================================= */

.watch-progress {
    position: relative;

    width: 72%;
    height: 3px;

    margin:
        6px
        auto
        0;

    overflow: hidden;

    border-radius: 10px;

    background: #4a4a4a;
}

.watch-progress span {
    position: absolute;

    top: 0;
    left: 0;

    height: 100%;

    background: #e50914;

    border-radius: inherit;
}


/* =========================================
   RESULTADO DA BUSCA
========================================= */

.movie-card.search-hidden {
    display: none;
}

.catalog-row.search-hidden {
    display: none;
}

.no-results {
    padding:
        40px
        22px;

    text-align: center;

    color: #aaa;

    font-size: 16px;
}


/* =========================================
   PC
   CARDS QUEBRAM PARA BAIXO
========================================= */

@media (min-width: 901px) {

    .cards-slider {
        display: flex;

        flex-wrap: wrap;

        overflow-x: visible;
        overflow-y: visible;

        width: 100%;

        gap: 12px;

        padding:
            0
            22px
            12px;

        scroll-snap-type: none;
    }

    .movie-card {
        flex:
            0
            0
            clamp(145px, 18vw, 235px);

        scroll-snap-align: none;
    }

}


/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {

    .cards-slider {
        flex-wrap: nowrap;

        overflow-x: auto;
        overflow-y: hidden;
    }

    .movie-card {
        flex-basis:
            clamp(145px, 28vw, 210px);
    }

}


/* =========================================
   CELULAR
========================================= */

@media (max-width: 600px) {

    .wala-header {
        height: 59px;

        padding-left: 17px;
        padding-right: 17px;
    }

    .wala-logo {
        font-size: 22px;
    }

    .header-actions {
        gap: 12px;
    }

    .header-btn {
        width: 28px;
        height: 28px;
    }

    .profile-btn {
        width: 31px;
        height: 31px;
    }

    .search-panel {
        top: 59px;

        padding-left: 17px;
        padding-right: 17px;
    }

    .wala-content {
        padding-top: 19px;
    }

    .catalog-row {
        margin-bottom: 27px;
    }

    .catalog-row h2 {
        margin-left: 17px;

        margin-bottom: 10px;

        font-size: 17px;
    }

    .cards-slider {
        gap: 7px;

        padding-left: 17px;
        padding-right: 17px;

        flex-wrap: nowrap;

        overflow-x: auto;
        overflow-y: hidden;
    }

    .movie-card {
        flex-basis: 42vw;
    }

    .card-image {
        border-radius: 5px;
    }

}


/* =========================================
   CELULAR PEQUENO
========================================= */

@media (max-width: 390px) {

    .movie-card {
        flex-basis: 45vw;
    }

}

/* =========================================================
   ARRASTAR CARROSSEL NO PC
   ========================================================= */

.cards-slider {
    cursor: grab;

    user-select: none;

    -webkit-user-select: none;

    scroll-behavior: auto;
}


.cards-slider.dragging {
    cursor: grabbing;
}


.cards-slider.dragging a {
    pointer-events: none;
}


.cards-slider img {
    user-select: none;

    -webkit-user-select: none;

    -webkit-user-drag: none;

    pointer-events: none;
}


/* =========================================
   HERO / DESTAQUE
========================================= */

.hero-banner {
    position: relative;

    width: 100%;

    height: min(68vh, 650px);
    min-height: 470px;

    overflow: hidden;

    background: #080808;
}


/* =========================================
   IMAGEM
========================================= */

.hero-background {
    position: absolute;

    inset: 0;

    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    transition:
        opacity .4s ease,
        transform 5s ease;

    transform: scale(1.01);
}


/* =========================================
   SOMBRAS
========================================= */

.hero-shadow {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.92) 0%,
            rgba(0,0,0,.72) 28%,
            rgba(0,0,0,.20) 62%,
            rgba(0,0,0,.05) 100%
        ),
        linear-gradient(
            0deg,
            #0b0b0b 0%,
            rgba(11,11,11,.82) 8%,
            transparent 40%
        );
}


/* =========================================
   CONTEÚDO
========================================= */

.hero-content {
    position: absolute;

    z-index: 3;

    left: 5%;
    bottom: 16%;

    width: min(520px, 46vw);
}


.hero-wala {
    display: block;

    margin-bottom: 9px;

    color: #20e070;

    font-size: 14px;
    font-weight: 900;

    letter-spacing: 4px;
}


.hero-content h1 {
    margin:
        0
        0
        13px;

    color: #fff;

    font-size:
        clamp(
            36px,
            5vw,
            70px
        );

    font-weight: 900;

    line-height: .95;

    text-shadow:
        0 3px 15px
        rgba(0,0,0,.5);
}


.hero-meta {
    margin-bottom: 12px;

    color: #fff;

    font-size: 15px;
    font-weight: 700;
}


.hero-content p {
    max-width: 520px;

    margin:
        0
        0
        22px;

    color: #f1f1f1;

    font-size:
        clamp(
            14px,
            1.4vw,
            18px
        );

    line-height: 1.45;

    text-shadow:
        0 2px 5px
        rgba(0,0,0,.8);
}


/* =========================================
   BOTÃO
========================================= */

.hero-buttons {
    display: flex;

    align-items: center;

    gap: 12px;
}


.hero-play {
    min-height: 46px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    padding:
        0
        25px;

    border-radius: 5px;

    background: #fff;

    color: #000;

    text-decoration: none;

    font-size: 17px;
    font-weight: 800;

    transition:
        background .2s ease,
        transform .2s ease;
}


.hero-play:hover {
    background: rgba(255,255,255,.82);

    transform: scale(1.03);
}


.hero-play span {
    font-size: 21px;
}


/* =========================================
   BOLINHAS
========================================= */

.hero-dots {
    position: absolute;

    z-index: 5;

    right: 4%;
    bottom: 35px;

    display: flex;

    gap: 7px;
}


.hero-dot {
    width: 9px;
    height: 9px;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,.35);

    cursor: pointer;

    transition:
        width .25s ease,
        border-radius .25s ease,
        background .25s ease;
}


.hero-dot.active {
    width: 25px;

    border-radius: 10px;

    background: #fff;
}


/* =========================================
   CELULAR
========================================= */

@media (max-width: 700px) {

    .hero-banner {
        height: 58vh;

        min-height: 430px;
    }


    .hero-background {
        background-position: center top;
    }


    .hero-shadow {
        background:
            linear-gradient(
                0deg,
                #0b0b0b 0%,
                rgba(11,11,11,.95) 15%,
                rgba(0,0,0,.30) 65%,
                rgba(0,0,0,.15) 100%
            );
    }


    .hero-content {
        left: 20px;
        right: 20px;

        bottom: 45px;

        width: auto;
    }


    .hero-content h1 {
        font-size: 34px;
    }


    .hero-content p {
        max-width: 420px;

        display: -webkit-box;

        overflow: hidden;

        -webkit-box-orient: vertical;

        -webkit-line-clamp: 3;

        font-size: 13px;
    }


    .hero-meta {
        font-size: 13px;
    }


    .hero-play {
        min-height: 42px;

        padding:
            0
            20px;

        font-size: 15px;
    }


    .hero-dots {
        right: 18px;
        bottom: 17px;
    }

}

/* =========================================
   HERO — AJUSTE PARA CELULAR
========================================= */

@media (max-width: 700px) {

    .hero-banner {
        height: 430px;
        min-height: 430px;
    }

    .hero-background {
        background-size: cover;

        /* mostra melhor o centro/personagem */
        background-position: center center;
    }

    .hero-content {
        left: 17px;
        right: 17px;
        bottom: 42px;
        width: auto;
    }

    .hero-content h1 {
        font-size: 32px;
        line-height: 1;
        max-width: 85%;
    }

    .hero-content p {
        max-width: 90%;
        font-size: 13px;
        line-height: 1.4;

        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    .hero-play {
        min-height: 42px;
        padding: 0 20px;
        font-size: 15px;
    }

    .hero-dots {
        right: 17px;
        bottom: 17px;
    }
}


/* =========================================
   BOTÃO PESQUISAR — HEADER
========================================= */

.search-button {

    width: 42px;
    height: 42px;

    margin-left: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #ffffff;

    background:
        rgba(255, 255, 255, 0.08);

    text-decoration: none;

    transition:
        background 0.2s ease,
        transform 0.2s ease;

}


.search-button svg {

    width: 23px;
    height: 23px;

    fill: currentColor;

}


.search-button:hover {

    background:
        rgba(255, 255, 255, 0.16);

    transform:
        scale(1.05);

}


.search-button:active {

    transform:
        scale(0.94);

}

/* ETIQUETA NOVOS EPISÓDIOS */

.badge-novos-episodios {
    position: absolute;
    top: auto;
    bottom: 5px;
    left: 5px;
    z-index: 5;

    background: #e50914;
    color: #fff;

    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.3px;

    padding: 3px 5px;
    border-radius: 2px;

    white-space: nowrap;
    pointer-events: none;
}

/* ALINHAR TÍTULO E VER TODOS */

.category-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-heading h2 {
    margin: 0 !important;
}

/* VER TODOS — MESMO ESTILO DO LIMPAR TUDO */

.category-see-all {
    display: inline-flex;
    align-items: center;

    margin: 0;
    line-height: 1;

    color: #e5e5e5;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;

    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.category-see-all:hover {
    color: #ffffff;
}

/* ESPAÇO ENTRE O TÍTULO E AS CAPAS */

.catalog-row .category-heading {
    margin-bottom: 14px;
}

/* =========================================
   CORRIGIR IMAGEM DO DESTAQUE NO CELULAR
========================================= */

@media (max-width: 700px) {

    .hero-background {
        background-size: 100% auto;
        background-position: center top;
        background-repeat: no-repeat;
        transform: none;
    }

}


/* =========================================
   CONTINUAR ASSISTINDO — REMOVER
========================================= */

.continue-clear-all {
    background: transparent;
    border: 0;
    color: #ccc;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-right: 18px;
}

.continue-clear-all:hover {
    color: #fff;
}

.continue-row .movie-card {
    position: relative;
}

.continue-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.8);
    color: #fff;

    font-size: 18px;
    cursor: pointer;
}

.continue-remove:hover {
    background: #e50914;
}

@media (hover: hover) {
    .continue-remove {
        opacity: 0;
        transition: opacity .2s ease;
    }

    .continue-row .movie-card:hover .continue-remove,
    .continue-remove:focus-visible {
        opacity: 1;
    }
}

/* CARD COM BOTÃO DE REMOVER */

.continue-card-wrapper {
    position: relative;
    flex: 0 0 auto;
}

.continue-card-wrapper .movie-card {
    display: block;
}

.continue-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 20;

    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;

    background: rgba(0, 0, 0, .85);
    color: white;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.continue-remove:hover {
    background: #e50914;
}

.continue-clear-all {
    background: transparent;
    border: 0;
    color: #ddd;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.continue-clear-all:hover {
    color: white;
}

@media (hover: hover) {
    .continue-remove {
        opacity: 0;
        transition: opacity .2s;
    }

    .continue-card-wrapper:hover .continue-remove,
    .continue-remove:focus-visible {
        opacity: 1;
    }
}


/* =========================================
   CONTINUAR ASSISTINDO
========================================= */

/* Mantém o tamanho original dos cards */
#continueSlider .movie-card {
    position: relative;
}

/* X para remover um filme */
#continueSlider .continue-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 20;

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;

    font-size: 21px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
}

/* Botão limpar tudo */
.continue-clear-all {
    background: transparent;
    border: none;
    color: #e5e5e5;

    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

/* =========================================
   POPUP PERSONALIZADO — WALA FILMES
========================================= */

.wala-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(5px);
}

.wala-confirm-overlay[hidden] {
    display: none !important;
}

.wala-confirm-box {
    width: 100%;
    max-width: 350px;
    box-sizing: border-box;

    padding: 25px 22px;
    border-radius: 14px;

    background: #1c1c1c;
    border: 1px solid #333;

    color: #fff;
    box-shadow: 0 15px 50px rgba(0,0,0,.5);
}

.wala-confirm-box h3 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
}

.wala-confirm-box p {
    margin: 0;
    color: #bbb;
    font-size: 14px;
    line-height: 1.6;
}

.wala-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

.wala-confirm-actions button {
    border: none;
    border-radius: 7px;
    padding: 11px 15px;

    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.wala-confirm-cancel {
    background: #333;
    color: white;
}

.wala-confirm-delete {
    background: #e50914;
    color: white;
}

@media (hover: hover) {
    #continueSlider .continue-remove {
        opacity: 0;
        transition: opacity .2s;
    }

    #continueSlider .movie-card:hover .continue-remove,
    #continueSlider .continue-remove:focus-visible {
        opacity: 1;
    }
}

/* ESPAÇAMENTO DO VER TODOS NA BORDA DIREITA */

.category-heading {
    padding-right: 18px;
}

/* CORRIGIR LAYOUT DO CONTINUAR ASSISTINDO */

#continueSection {
    display: block;
}

#continueSection[hidden] {
    display: none !important;
}

#continueSection .category-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 14px;
}

#continueSection .cards-slider {
    width: 100%;
}



/* =====================================
   TOP 5 FILMES DO WALA
===================================== */

.wala-top5 {
    margin-bottom: 28px;
}

.top5-slider {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 12px 4px 20px;
    scrollbar-width: none;
}

.top5-slider::-webkit-scrollbar {
    display: none;
}

.top5-card {
    position: relative;
    flex: 0 0 210px;
    height: 145px;
    padding-left: 42px;
    text-decoration: none;
    transition: transform .25s ease;
}

.top5-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9px;
    display: block;
}

.top5-numero {
    position: absolute;
    left: 0;
    bottom: -12px;
    z-index: 2;
    font-size: 115px;
    font-weight: 1000;
    line-height: 1;
    color: #111;
    -webkit-text-stroke: 3px #fff;
    pointer-events: none;
}

@media (hover: hover) {
    .top5-card:hover {
        transform: scale(1.04);
    }
}

@media (max-width: 768px) {
    .top5-slider {
        gap: 8px;
    }

    .top5-card {
        flex-basis: 165px;
        height: 112px;
        padding-left: 34px;
    }

    .top5-numero {
        font-size: 90px;
        -webkit-text-stroke: 2px #fff;
    }
}
