/*
    details-screen.css
    Estilos da tela de detalhes de série.
    Usado por: details-screen.html + home.detailsScreen.js

    Escala para TV: tamanhos de fonte, espaçamentos e dimensões usam
    clamp() com unidades vw para se adaptarem de 720p até 4K sem
    precisar de uma bateria de media queries por resolução.

    Ajuste: os tetos de clamp() foram reduzidos e o coeficiente de
    vw foi achatado, porque em TVs grandes (1080p/4K com viewport
    reportado maior) os elementos ficavam desproporcionalmente
    grandes em relação ao mesmo layout visto num monitor comum.
*/

#details-root {
    display: none;
    width: 100%;
    height: 100%;
    position: fixed;
    inset: 0;
    z-index: 500;
    color: #fff;
    background-color: #000000;
}

#btn-back-details {
    position: absolute;
    border: none;
    width: 100px;
    height: fit-content;
    top: 16px;
    left: 24px;
    background-color: rgba(255, 0, 0, 0);
    z-index: 9999;
}

#btn-back-details svg {
    color: rgba(255, 255, 255, 0.9) !important;
}

#details-root .details-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
}



#details-root .details-hero {
    position: relative;
    width: 58%;
    height: 100%;
    padding: clamp(18px, 2.6vw, 44px);
    padding-top: 100px;
    padding-bottom: 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-position: center;
    background-color: #000000;
}

#details-root .details-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(19, 14, 14, 0.082) 0%, rgba(0, 0, 0, 0.1) 30%, rgb(0, 0, 0) 130%),
        linear-gradient(0deg, rgb(0, 0, 0) 0%, rgba(0, 0, 0, .15) 55%, rgba(0, 0, 0, .55) 100%);
}

#details-root .details-hero::before {
    content: '';
    position: absolute;
    left: 0;
    top: -30%;
    width: 100%;
    height: 120%;
    background-color: rgba(0, 0, 0, 0.4);
}


.details-hero-group {
    display: flex;
    flex-direction: column;
    gap: clamp(2px, 0.5vw, 7px);
}

#details-root .details-hero-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.details-hero-content> :first-child {
    margin-bottom: 8px !important;
}

.details-hero-content> :last-child {
    margin-top: 10px !important;
}

#details-root .details-logo {
    width: clamp(260px, 8vw, 320px);
    max-width: 260px;
    max-height: 60px;
    height: 80px;
    display: none;
    object-fit: contain;
    object-position: left bottom;
    align-self: flex-start;
}

#details-root .details-title-text {
    font-size: clamp(24px, 2.6vw, 38px);
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0 0 14px 0;
}

#details-root .details-meta-row {
    display: flex;
    align-items: center;
    gap: 9px;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    font-size: clamp(12px, 1.45vw, 14px);
    color: #ebebeb;
    font-weight: 500;
}

#details-root .badge {
    width: 0;
    height: 0;
    padding: 10px 11px;
    border-radius: 2px !important;
}

#details-root #details-age-rating-text {
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 0.2;
    position: relative;
    letter-spacing: -1.5px;
    margin-left: -1.5px;
    font-size: 16px;
    font-family: "Bebas Neue", sans-serif !important;
    font-weight: 500;
    font-style: normal;
    border-radius: 2px;
    transform: scaleY(0.8);
    transform-origin: top;
}


/* #details-root .details-meta-row */
.badge-hd {
    width: 22px;
    height: 15px;
    font-size: 9.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    border-radius: 2px;
    color: #e2e2e2;
    line-height: 0;
    text-align: center;
    background-color: #000000b0;
}

/* #details-root .details-meta-row */
.details-type-media-badge {
    width: 22px;
    height: 15px;
    font-size: 9.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    border-radius: 2px;
    color: #e2e2e2;
    line-height: 0;
    text-align: center;
    background-color: #42464d;
    background-color: #000000b0;
}

#details-hero-evaluation {
    display: block;
    font-size: clamp(12px, 1.45vw, 14px);
    display: -webkit-box;
    font-weight: 500;
    color: #26e488
        /* #3cffa1 */
        !important;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#details-root .details-desc {
    max-width: clamp(230px, 31vw, 350px);
    font-size: clamp(12px, 1.45vw, 14px);
    color: #e0e0e0;
    opacity: 1 !important;
    line-height: 1.40;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    font-weight: 500;
    -webkit-box-orient: vertical;
    font-family: 'Inter', sans-serif !important;
    overflow: hidden;
    z-index: 9;
}

#details-root .details-action {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.5vw, 24px);
    cursor: pointer;
    color: #fff;
    font-weight: 600;
    height: fit-content;
    width: fit-content;
    border-radius: 6px;
    transition: transform .15s ease, outline-color .15s ease;
}

#details-root #details-btn-play {
    width: 8em;
}

#details-root #details-btn-list {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: none;
    font-size: 0.75em;
    cursor: pointer;
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: auto;
    height: 3.3em;
    flex-shrink: 0;
    border-radius: 4px;
}


#details-root .details-action.focused {
    outline: 3px solid #fff;
    transform: scale(1.05);
}

#details-root .details-action.icon-only.focused {
    outline: none;
}

#details-root .details-action.icon-only.focused .ico,
#details-root .details-action.icon-only.focused span:last-child {
    color: #fff;
    text-decoration: underline;
}

#details-root .details-action.active .ico {
    color: #2b9df4;
}

/* botão de play: fundo branco sempre, outline azul quando focado */
#details-root .details-action.play.focused {
    outline-color: #ffffff;
    outline-offset: 3px;
}




.details-tab-nav {
    flex-direction: row;
    width: 100%;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 26px;
    height: auto;
    margin-bottom: 20px;
    position: relative;
    display: none;
    /*   z-index: 99; */
}

.tab-nav-bar {
    position: absolute;
    top: 0;
    background-color: rgba(255, 255, 255, 0.165);
    height: 1px;
    width: 100%;
}

.details-tab-nav .tab-nav-item {
    position: relative;
    font-size: 0.8rem;
    font-weight: 600;
    padding-top: 12px;
    color: #e8e8e8;
}

.details-tab-nav .tab-nav-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 100%;
    height: 3px;
    background-color: #149dff;
}




















#details-root .details-episodes {
    position: relative;
    width: 40%;
    height: 100%;
    padding: clamp(20px, 2vw, 36px) clamp(18px, 1.6vw, 30px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#details-root .details-episodes::-webkit-scrollbar {
    display: none;
}

/* Overlay/sombra na costura entre o hero e o painel de episódios,
   pra suavizar a transição em vez de cortar seco pro preto. */
#details-root .details-episodes::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: clamp(90px, 7vw, 140px);
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.4) 40%,
            rgba(0, 0, 0, 0.8) 75%,
            #000000 100%);
}


#details-root .top-bar-details-episodes {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    height: auto;
    gap: 10px;
    /* margin-bottom: 8px; */
}

#details-root .group-episodes-top-bar {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
}


#details-root .details-episodes-title {
    position: relative;
    display: block;
    font-size: clamp(13px, 1.1vw, 18px);
    font-weight: 600;
}

#details-root #btn-open-season-options,
#details-root .details-more-infos {
    font-size: clamp(12px, 0.75vw, 13px);
    color: rgba(255, 255, 255, 0.855);
    background-color: #ffffff2d;
    height: 24px;
    padding-left: 8px;
    width: auto;
    display: flex;
    border-radius: 2px;
    align-items: center;
    justify-content: center;
    border: none;
    z-index: 10;
}

#details-root .details-episodes-list {
    flex: 1;
    overflow-y: auto;
    position: relative;
    z-index: 2;
    margin-top: 16px;
    display: none;
    animation: opacity-open-screen 1.40s ease;
}

#details-root .details-episodes-list.tab-active {
    display: block;
}

#details-root .details-episodes-list::-webkit-scrollbar {
    display: none;
}

#details-root .details-ep-row {
    display: flex;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 0px;
    cursor: pointer;
}

#details-root .details-ep-row.focused {
    background: #242527;
}

#details-root .details-ep-thumb {
    position: relative;
    flex: 0 0 clamp(110px, 9vw, 140px);
    height: clamp(62px, 5vw, 78px);
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    overflow: hidden;
}

#details-root .details-ep-duration {
    position: absolute;
    right: 6px;
    bottom: 6px;
    font-size: 10px;
    display: flex;
    flex-direction: row;
    gap: 4px;
    background: rgba(0, 0, 0, .7);
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 10;
}

#details-root .details-ep-info {
    flex: 1;
    min-width: 0;
}

#details-root .details-ep-title {
    font-size: clamp(12px, 0.85vw, 13px);
    font-weight: 700;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#details-root .details-ep-num {
    color: #fff;
}

#details-root .details-ep-desc {
    font-size: clamp(11px, 0.75vw, 12px);
    color: rgba(255, 255, 255, 0.65);
    color: #a6aaaf;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#details-root .details-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .4);
    font-size: 15px;
    z-index: 2;
}

/* ════════════════════════════════════════
   TETO RÍGIDO PRA TELAS GRANDES (TVs 1080p/4K)
   Em resoluções muito largas, o vw sozinho ainda deixa tudo
   maior do que deveria em relação ao restante do layout — então
   travamos os valores no teto do clamp acima e não deixamos
   crescer mais, independente da largura reportada pela TV.
════════════════════════════════════════ */
@media (min-width: 1600px) {
    #details-root .details-title-text {
        font-size: 38px;
    }

    #details-root .details-meta-row,
    #details-root .details-desc,
    #details-root .details-action {
        font-size: 14px;
    }

    #details-root .details-action.icon-only {
        font-size: 12px;
    }

    #details-root .details-episodes-title {
        font-size: 18px;
    }

    #details-root .details-season-label {
        font-size: 13px;
    }

    #details-root .details-ep-title {
        font-size: 13px;
    }

    #details-root .details-ep-desc {
        font-size: 12px;
    }

    #details-root .details-ep-thumb {
        flex-basis: 140px;
        height: 78px;
    }

    #details-root .details-logo {
        max-width: 320px;
        max-height: 100px;
    }
}





.details-ep-item {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.details-ep-thumb {
    position: relative;
    width: 160px;
    /* ajuste conforme seu layout */
    flex-shrink: 0;
}

.details-ep-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    /* evita overflow de texto */
}

.bar-progress-keepWatching {
    opacity: 1;
    width: 40%;
    height: 3px;
    background: #149dff;
    border-radius: 10px;
    /* gruda no fundo do container */
    position: relative;
    z-index: 2;
}



.box-bar-progress-keepWatching {
    margin-top: auto;
    width: 100%;
    height: 3px;
    position: relative;
    background-color: #2e2e2e;
    border-radius: 10px;
    z-index: 1;
}


.thumb-overlay-watched {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
}











.container-more-info {
    flex-direction: column;
    height: auto;
    width: 100%;
    position: relative;
    background-color: #000000;
    display: none;
    z-index: 10;
    overflow-y: auto;
    animation: opacity-open-screen 1.65s ease;
}

.container-more-info.tab-active {
    display: flex !important;
}

.container-more-info::-webkit-scrollbar {
    display: none;
}

.row-more-infos {
    display: grid;
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    box-sizing: border-box;
}

.card-more-infos {
    /*     background: #10161f;
    border: 1px solid #1c2530; */
    background: #a7050500;
    border-radius: 8px;
    padding: 0px;
}

.card-more-infos h2 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #ffffff;
}

.about-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.about-item:last-child {
    margin-bottom: 0;
}

.about-item .icon {
    width: 20px;
    height: 20px;
    border-radius: 8px;
    background: #1a233000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.about-item .icon svg {
    color: #4b5568 !important;
    color: #a0a0a0 !important;
}

.about-item .label-info {
    font-size: 0.72rem;
    color: rgb(255, 255, 255, 0.950);
    display: block;
}

.about-item .value-info {
    font-size: 0.78rem;
    color: #a6aaaf;
    line-height: 1.35;
}

.badge-status {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 2px;
}

.group-age-rating-more-info {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 6px;
}

#more-info-age-rating-text {
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 0.2;
    position: relative;
    margin-left: -1.5px;
    font-size: 15px;
    font-family: "Bebas Neue", sans-serif !important;
    font-weight: 500;
    font-style: normal;
    border-radius: 2px;
    transform: scaleY(0.8);
    transform-origin: top;
}



.badge-status.ended {
    background: #d30a0a;
}

.details-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    row-gap: 10px;
    column-gap: 6px;
    align-items: start;
}

.details-grid dt {
    background: #2b9df400;
    color: #cfd6dd;
    color: rgba(255, 255, 255, 0.950);
    font-size: 0.72rem;
    /* font-weight: 600; */
    padding: 3px 0px;
    border-radius: 4px;
    white-space: nowrap;
}

.details-grid dd {
    font-size: 0.78rem;
    color: #d5dae0;
    color: #a6aaaf;
    line-height: 1.4;
    padding-top: 2px;
}

#card-more-infos-cast {
    margin-top: 30px;
}

.cast-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    /*  margin-top: 40px; */
    margin-bottom: 16px;
}

.cast-header h2 {
    margin-bottom: 0;
}

.cast-header .count {
    font-size: 0.75rem;
    color: #8b96a3;
}

.cast-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 14px;
}

.cast-card {
    text-align: center;
}

.cast-card img,
.cast-card .no-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1c2530;
    display: block;
    margin: 0 auto 8px;
    background: #1a2330;
}

.cast-card .no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #46536a;
}

.cast-card .actor-name {
    font-size: 0.74rem;
    font-weight: 600;
    color: #e6e8ea;
    line-height: 1.25;
}

.cast-card .character {
    font-size: 0.68rem;
    color: #8b96a3;
    margin-top: 2px;
    line-height: 1.25;
}

#loading-more-info {
    position: absolute;
    inset: 0;
    background-color: #000000c5;
    display: flex;
    align-items: center;
    justify-content: center;
}



















.container-season-menu {
    width: auto;
    height: auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    background-color: rgba(255, 0, 0, 0);
}

.season-options {
    width: 100%;
    height: fit-content;
    display: flex;
    flex-direction: column;
    color: #ffffffda;
    font-size: 0.9em;
    position: absolute;
    max-height: 200px;
    overflow-y: auto;
    top: 30px;
    left: 50%;
    transform: translate(-50%);
    border-radius: 4px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border: none;
    display: none;
    z-index: 9;
}

.season-options::-webkit-scrollbar {
    display: none;
}

.season-options> :first-child {
    border-radius: 4px 4px 0 0;
}

.season-options> :last-child {
    border-radius: 0 0 4px 4px;
    border-bottom: none;
}

.season-item {
    width: 100%;
    height: 34px;
    display: flex;
    font-size: 0.85rem;
    top: 0;
    justify-content: center;
    align-items: center;
    background-color: #1f1f1f;
}







































/* Alvo: Largura lógica de até 960px com alta densidade (Retina/HiDPI) */
/* @media screen and (max-width: 960px) and (min-resolution: 2dppx) { */
/* Alvo: Largura lógica de até 960px COM densidade de pixels igual ou maior a 2 */
@media screen and (max-width: 960px) and (-webkit-min-device-pixel-ratio: 2),
screen and (max-width: 960px) and (min-resolution: 192dpi) {
    /* 
    #details-root .details-hero::after {
        content: '';
        position: fixed;
        top: 0;
        transform: scaleX(-1);
        width: 100%;
        height: 100%;
        background-image: url('/img/overlay3.png');
        background-size: 100% 100%;
        opacity: 0.99;
        background-position: center;
        background-repeat: no-repeat;
    } */

    /*  #details-root .details-hero::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #0000009a;
    } */




}























@media only screen and (max-width: 780px) {
    #details-root .details-wrapper {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }

    #details-root .details-hero {
        position: relative;
        padding-top: 0px !important;
        margin-top: 0 !important;
        width: 100% !important;
        flex: 0 0 42% !important;
        height: auto !important;
        min-height: 0;
        background-repeat: no-repeat;
    }

    #details-root .details-hero-content {
        max-width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        z-index: 999;
    }

    #details-root .details-hero::after {
        content: '';
        position: absolute;
        inset: 0;
        top: -100px;
        left: -10rex;
        height: 600px;
        width: 600px;
        z-index: 1;
        transform: rotate(-25deg);
        background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 20%, rgba(0, 0, 0, 0.5) 45%, transparent 70%);
    }


    #details-root .details-hero::before {
        position: absolute;
        bottom: 0%;
        top: -15%;
        width: 100%;
        background: linear-gradient(to top, rgb(0, 0, 0) 0%, rgba(0, 0, 0, 0.4) 30%, transparent 60%);
    }

    #details-root .details-logo {
        max-width: 180px;
        max-height: 50px;
        display: none;
        object-fit: contain;
    }

    #details-root .details-title-text {
        font-size: clamp(20px, 6vw, 30px);
        margin: 0 0 8px 0;
    }

    #details-root .details-desc {
        margin-top: 2px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        display: -webkit-box;
        font-weight: 500;
        color: #e0e0e0;
        /*   font-size: 13px; */
        /*      font-size: 12px;
         */
    }

    .btn-play,
    .btn-more-info,
    .btn-ghost {
        outline: none !important;
    }


    .details-tab-nav {
        display: flex;
    }


    #details-hero-evaluation {}

    #details-root .details-meta-row {
        /*  display: none; */
    }

    #details-root .badge {
        padding: 8px 10px;
    }

    #details-root #details-age-rating-text {
        font-size: 15px;
    }

    #details-root .details-meta-row .badge-hd {
        padding: 1px 5px;
        font-size: 10px;
    }

    #details-root .details-meta-row .details-type-media-badge {
        padding: 1px 5px;
        font-size: 10px;
        line-height: 1.20;
    }

    #details-root .details-episodes-list {
        padding-right: 0px;
    }

    #details-root .details-episodes {
        position: relative;
        width: 100%;
        flex: 1 1 0%;
        min-height: 0;
        padding-top: 12px;
        overflow-y: auto;
        background: #000000 !important;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        z-index: 999999;
    }

    /* class ativada via js */
    .episode-list-full-screen {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        will-change: transform;
    }
}