* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --red: #e50914;
    --background: #050505;
    --text: #ffffff;
    --muted: #a7a7a7;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--background);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}

body {
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}


/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 78px;

    z-index: 100;

    display: flex;
    align-items: center;

    gap: 34px;

    padding:
        0
        clamp(20px, 3.5vw, 58px);

    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, .98),
            rgba(0, 0, 0, .78),
            transparent
        );
}

.logo {
    flex: 0 0 auto;

    width: 68px;
    height: 68px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
}

.logo-image {
    display: block;

    width: 64px;
    height: 64px;

    object-fit: contain;

    border-radius: 50%;
}

.nav-links {
    display: flex;
    align-items: center;

    gap: 31px;

    white-space: nowrap;
}

.nav-link {
    position: relative;

    color: #dddddd;

    text-decoration: none;

    font-size: 15px;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

.nav-link.active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: -13px;

    height: 3px;

    background: var(--red);
}


.search {
    margin-left: auto;

    width:
        clamp(
            190px,
            25vw,
            390px
        );

    height: 43px;

    display: flex;
    align-items: center;

    border: 1px solid #555555;
    border-radius: 24px;

    background:
        rgba(20, 20, 20, .72);

    backdrop-filter: blur(8px);
}

.search-icon {
    padding-left: 15px;

    font-size: 25px;

    color: white;
}

.search input {
    width: 100%;

    padding:
        0
        15px
        0
        9px;

    border: 0;
    outline: 0;

    background: transparent;

    color: white;

    font-size: 14px;
}

.user-area {
    display: flex;
    align-items: center;

    gap: 9px;

    white-space: nowrap;
}

.avatar {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #3d3d3d,
            #151515
        );

    border: 1px solid #666666;

    font-weight: 700;
}

.user-name {
    font-size: 15px;
}

.user-arrow {
    color: #cccccc;
}


/* ============================================================
   HERO
   ============================================================ */

.hero {
    position: relative;

    min-height: 620px;
    height: min(74vh, 760px);

    overflow: hidden;

    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            #151515,
            #292929
        );

    background-position: center;
    background-size: cover;

    transform: scale(1.01);
}

.hero-shade {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, .95) 0%,
            rgba(0, 0, 0, .77) 28%,
            rgba(0, 0, 0, .22) 62%,
            rgba(0, 0, 0, .20) 100%
        ),
        linear-gradient(
            0deg,
            #050505 0%,
            transparent 35%
        );
}

.hero-content {
    position: relative;

    z-index: 3;

    width: min(530px, 50%);

    margin-left:
        clamp(
            22px,
            4.5vw,
            72px
        );

    margin-top: 55px;
}

.hero-meta {
    margin-bottom: 10px;

    color: #e4e4e4;

    font-size: 14px;
}

.hero-content h1 {
    margin:
        0
        0
        12px;

    font-size:
        clamp(
            45px,
            5vw,
            72px
        );

    line-height: .98;

    letter-spacing: -2px;
}

.hero-description {
    max-width: 520px;

    margin:
        0
        0
        20px;

    color: #eeeeee;

    font-size:
        clamp(
            15px,
            1.35vw,
            19px
        );

    line-height: 1.45;

    text-shadow:
        0 2px 10px
        rgba(0, 0, 0, .9);
}

.hero-buttons {
    display: flex;

    gap: 11px;
}

.button {
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding:
        0
        24px;

    border: 0;
    border-radius: 5px;

    font-weight: 650;

    transition:
        transform 130ms ease,
        opacity 130ms ease;
}

.button:hover {
    transform: scale(1.025);
}

.button-play {
    background: white;
    color: black;
}

.button-play span {
    font-size: 21px;
}

.button-secondary {
    color: white;

    border:
        1px solid
        rgba(255, 255, 255, .28);

    background:
        rgba(35, 35, 35, .72);

    backdrop-filter: blur(5px);
}

.button-secondary span {
    font-size: 23px;
}

.hero-quote {
    position: absolute;

    z-index: 3;

    right: 5%;

    top: 34%;

    width: 150px;

    color:
        rgba(
            255,
            255,
            255,
            .88
        );

    font-size: 18px;
    font-style: italic;

    line-height: 1.45;

    text-align: center;
}

.quote-line {
    width: 50px;
    height: 3px;

    margin:
        17px
        auto
        0;

    background: var(--red);
}


/* ============================================================
   SECCIONES
   ============================================================ */

.catalog-section {
    position: relative;

    z-index: 5;

    padding:
        8px
        clamp(18px, 4.3vw, 68px)
        30px;
}

.library-section {
    margin-top: -70px;
}

.catalog-section h2 {
    margin:
        0
        0
        13px;

    font-size:
        clamp(
            20px,
            2vw,
            27px
        );
}

.section-heading {
    display: flex;
    align-items: baseline;

    gap: 12px;
}

.section-heading span {
    color: #777777;

    font-size: 13px;
}


/* ============================================================
   BIBLIOTECA
   ============================================================ */

.movies-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(150px, 1fr)
        );

    gap:
        28px
        13px;
}

.movie-card {
    min-width: 0;

    cursor: pointer;

    transition:
        transform 180ms ease;
}

.movie-card:hover {
    transform: scale(1.055);

    z-index: 10;
}

.poster-wrap {
    position: relative;

    width: 100%;

    aspect-ratio: 2 / 3;

    overflow: hidden;

    border-radius: 5px;

    background: #181818;

    box-shadow:
        0 7px 25px
        rgba(0, 0, 0, .45);
}

.poster {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 200ms ease,
        filter 200ms ease;
}

.movie-card:hover .poster {
    transform: scale(1.03);

    filter: brightness(.75);
}

.poster-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 15px;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            #282828,
            #111111
        );

    color: #bbbbbb;
}

.card-play {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;

    transition:
        opacity 180ms ease;
}

.movie-card:hover .card-play {
    opacity: 1;
}

.card-play span {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding-left: 3px;

    border-radius: 50%;

    color: black;
    background: white;

    font-size: 19px;
}

.movie-title {
    margin-top: 7px;

    color: #eeeeee;

    font-size: 13px;
    font-weight: 600;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ============================================================
   CONTINUAR
   ============================================================ */

.continue-grid {
    display: flex;

    gap: 13px;

    overflow-x: auto;

    scrollbar-width: none;
}

.continue-grid::-webkit-scrollbar {
    display: none;
}

.continue-card {
    flex:
        0
        0
        min(270px, 65vw);

    cursor: pointer;
}

.continue-image {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 5px;

    background: #171717;
}

.continue-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.progress {
    position: absolute;

    left: 8px;
    right: 8px;
    bottom: 7px;

    height: 4px;

    overflow: hidden;

    border-radius: 4px;

    background:
        rgba(
            255,
            255,
            255,
            .35
        );
}

.progress-value {
    height: 100%;

    background: var(--red);
}

.continue-title {
    margin-top: 6px;

    font-size: 13px;
    font-weight: 600;
}


/* ============================================================
   VACÍO
   ============================================================ */

.empty-state {
    min-height: 300px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #777777;
}


/* ============================================================
   FOOTER
   ============================================================ */

footer {
    min-height: 105px;

    display: grid;

    grid-template-columns:
        1fr
        1fr
        1fr;

    align-items: center;

    gap: 20px;

    padding:
        25px
        clamp(20px, 3.5vw, 58px);

    border-top:
        1px solid
        #202020;

    color: #888888;
}

.footer-logo span {
    color: var(--red);

    font-size: 21px;
    font-weight: 900;
}

.footer-logo small {
    margin-left: 5px;

    color: white;

    font-size: 14px;
    font-style: italic;
}

.footer-message {
    text-align: center;

    font-size: 13px;
}

.footer-links {
    display: flex;
    justify-content: flex-end;

    gap: 25px;

    font-size: 13px;
}


/* ============================================================
   PLAYER
   ============================================================ */

.player-modal {
    position: fixed;
    inset: 0;

    z-index: 1000;

    overflow-y: auto;

    background:
        rgba(
            0,
            0,
            0,
            .98
        );
}

.close-player {
    position: fixed;

    top:
        calc(
            15px +
            env(safe-area-inset-top)
        );

    right:
        calc(
            18px +
            env(safe-area-inset-right)
        );

    z-index: 1010;

    width: 45px;
    height: 45px;

    border: 0;
    border-radius: 50%;

    background: #242424;

    color: white;

    font-size: 30px;
}

.player-content {
    width: min(1200px, 100%);

    margin: 0 auto;

    padding:
        70px
        22px
        50px;
}

#moviePlayer {
    display: block;

    width: 100%;

    max-height: 75vh;

    background: black;

    border-radius: 5px;
}

.player-information {
    padding:
        22px
        3px;
}

.player-information h1 {
    margin:
        0
        0
        10px;
}

.player-information p {
    max-width: 750px;

    margin: 0;

    color: #bbbbbb;

    line-height: 1.6;
}


/* ============================================================
   TABLET / CELULAR
   ============================================================ */

@media (max-width: 950px) {

    .nav-links {
        display: none;
    }

    .logo {
        width: 54px;
        height: 54px;
    }

    .logo-image {
        width: 50px;
        height: 50px;
    }

    .search {
        width: auto;
        flex: 1;
    }

    .hero-quote {
        display: none;
    }

    .hero-content {
        width: 60%;
    }

}


@media (max-width: 650px) {

    .navbar {
        height: 65px;

        gap: 10px;

        padding:
            0
            13px;
    }

    .logo {
        min-width: 122px;
    }

    .logo-main {
        font-size: 19px;
    }

    .logo-signature {
        right: 5px;
        bottom: -14px;

        font-size: 12px;
    }

    .search {
        height: 38px;
    }

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

    .search-icon {
        padding-left: 10px;

        font-size: 19px;
    }

    .user-name,
    .user-arrow {
        display: none;
    }

    .avatar {
        width: 34px;
        height: 34px;
    }


    .hero {
        min-height: 570px;

        height: 72vh;

        align-items: flex-end;
    }

    .hero-background {
        background-position: center;
    }

    .hero-shade {
        background:
            linear-gradient(
                0deg,
                #050505 0%,
                rgba(0,0,0,.75) 38%,
                rgba(0,0,0,.08) 75%
            );
    }

    .hero-content {
        width: 100%;

        margin:
            0
            18px
            95px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-description {
        display:
            -webkit-box;

        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;

        overflow: hidden;

        font-size: 14px;
    }

    .button {
        min-height: 43px;

        padding:
            0
            17px;

        font-size: 13px;
    }

    .library-section {
        margin-top: -65px;
    }

    .catalog-section {
        padding:
            8px
            10px
            28px;
    }

    .movies-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );

        gap:
            20px
            7px;
    }

    .movie-title {
        margin-top: 5px;

        font-size: 11px;
    }

    .card-play {
        display: none;
    }

    .movie-card:hover {
        transform: none;
    }

    footer {
        grid-template-columns: 1fr;

        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .player-content {
        padding:
            70px
            0
            30px;
    }

    #moviePlayer {
        border-radius: 0;
    }

    .player-information {
        padding:
            18px
            17px;
    }
}


/* ============================================================
   LOGO PELICULAS TAUTO - GRANDE + EFECTO SCROLL
   ============================================================ */

.logo {
    width: 116px;
    height: 116px;

    transition:
        width .35s ease,
        height .35s ease,
        opacity .35s ease,
        transform .35s ease;
}

.logo-image {
    width: 110px;
    height: 110px;

    transition:
        width .35s ease,
        height .35s ease,
        opacity .35s ease,
        transform .35s ease;
}


/* Cuando el usuario baja por la página */

.navbar.logo-scrolled .logo {
    width: 74px;
    height: 74px;

    opacity: .72;
}

.navbar.logo-scrolled .logo-image {
    width: 70px;
    height: 70px;
}


/* Celular */

@media (max-width: 950px) {

    .logo {
        width: 90px;
        height: 90px;
    }

    .logo-image {
        width: 86px;
        height: 86px;
    }

    .navbar.logo-scrolled .logo {
        width: 58px;
        height: 58px;

        opacity: .72;
    }

    .navbar.logo-scrolled .logo-image {
        width: 54px;
        height: 54px;
    }
}


/* ============================================================
   SELECTOR DE SUBTITULOS
   ============================================================ */

.player-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.player-title-row h1 {
    flex: 1;
}

.subtitle-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.subtitle-control.hidden {
    display: none;
}

.subtitle-control label {
    color: #bbbbbb;
    font-size: 14px;
}

.subtitle-control select {
    min-width: 155px;

    padding:
        9px
        34px
        9px
        12px;

    border:
        1px solid
        rgba(255,255,255,.25);

    border-radius: 6px;

    background: #181818;
    color: white;

    font-size: 14px;

    cursor: pointer;
}

.subtitle-control select:focus {
    outline:
        1px solid
        rgba(255,255,255,.65);
}

@media (max-width: 650px) {

    .player-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .subtitle-control {
        width: 100%;
    }

    .subtitle-control select {
        flex: 1;
    }
}


/* ============================================================
   MENU LATERAL - PELICULAS TAUTO
   ============================================================ */

.library-sidebar {
    position: fixed;
    top: 0;
    left: 0;

    width: 190px;
    height: 100vh;

    padding: 20px 14px;

    box-sizing: border-box;

    background:
        linear-gradient(
            90deg,
            rgba(5, 8, 12, 0.97) 0%,
            rgba(5, 8, 12, 0.92) 75%,
            rgba(5, 8, 12, 0.72) 100%
        );

    z-index: 2000;

    overflow-y: auto;
    overflow-x: hidden;
}


/* ------------------------------------------------------------
   MARCA
   ------------------------------------------------------------ */

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-bottom: 22px;
}

.sidebar-logo {
    width: 88px;
    height: 88px;

    object-fit: cover;

    border-radius: 50%;

    display: block;
}

.sidebar-name {
    margin-top: 8px;

    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    text-align: center;
}


/* ------------------------------------------------------------
   MENU
   ------------------------------------------------------------ */

.sidebar-menu {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

.sidebar-main-button,
.sidebar-sub-button {
    width: 100%;

    border: 0;

    color: rgba(255,255,255,0.78);

    background: transparent;

    font-family: inherit;

    cursor: pointer;

    text-align: left;

    transition:
        background 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease;
}


/* ------------------------------------------------------------
   BOTONES PRINCIPALES
   ------------------------------------------------------------ */

.sidebar-main-button {
    display: flex;
    align-items: center;

    gap: 10px;

    min-height: 44px;

    padding: 10px 12px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;
}

.sidebar-main-button:hover,
.sidebar-main-button:focus-visible {
    color: #ffffff;

    background: rgba(255,255,255,0.10);

    outline: none;
}

.sidebar-main-button.active {
    color: #ffffff;

    background: rgba(51,79,214,0.82);
}


/* ------------------------------------------------------------
   SUBMENU DE GENEROS
   ------------------------------------------------------------ */

.sidebar-submenu {
    display: flex;
    flex-direction: column;

    gap: 2px;

    margin:
        0
        0
        8px
        30px;

    padding-left: 10px;

    border-left:
        1px solid rgba(255,255,255,0.14);
}

.sidebar-sub-button {
    min-height: 30px;

    padding: 6px 8px;

    border-radius: 6px;

    font-size: 13px;
}

.sidebar-sub-button:hover,
.sidebar-sub-button:focus-visible {
    color: #ffffff;

    background: rgba(255,255,255,0.08);

    outline: none;
}

.sidebar-sub-button.active {
    color: #ffffff;

    font-weight: 700;
}


/* ------------------------------------------------------------
   ESPACIO PARA EL CONTENIDO
   ------------------------------------------------------------ */

body {
    padding-left: 190px;
    box-sizing: border-box;
}


/*
 * La barra superior empieza después del menú lateral.
 */
.navbar {
    left: 190px;
    width: calc(100% - 190px);
}


/* ------------------------------------------------------------
   PANTALLAS PEQUEÑAS
   ------------------------------------------------------------ */

@media (max-width: 800px) {

    .library-sidebar {
        width: 150px;
        padding-left: 10px;
        padding-right: 10px;
    }

    body {
        padding-left: 150px;
    }

    .navbar {
        left: 150px;
        width: calc(100% - 150px);
    }

    .sidebar-logo {
        width: 70px;
        height: 70px;
    }

    .sidebar-main-button {
        font-size: 12px;
    }

    .sidebar-submenu {
        margin-left: 20px;
    }
}



/* ============================================================
   PLAYER - SIEMPRE SOBRE EL MENU LATERAL
   ============================================================ */

.player-modal {
    z-index: 5000;
}

.close-player {
    z-index: 5010;
}



/* ============================================================
   PLAYER - SIEMPRE SOBRE EL MENU LATERAL
   ============================================================ */

.player-modal {
    z-index: 5000;
}

.close-player {
    z-index: 5010;
}

