/* ================================================
   top-streaming.css – Wicion Tops RESPONSIVO + Modal
   ================================================ */

:root {
    --bg: #050505;
    --text: #ffffff;
    --muted: rgba(255,255,255,.65);
    --accent: #00d2ff;
    --danger: #e50914;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.home-body {
    min-height: 100vh;
    background: #050505;
    color: var(--text);
    font-family: 'Outfit', Arial, Helvetica, sans-serif;
    display: block !important;
}

/* HEADER */
.top-header {
    width: 100%;
    height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #050505;
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 800;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e50914;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.login-icon-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.07);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.login-icon-btn svg {
    width: 22px;
    height: 22px;
}

/* OCULTAR PORTADA */
.hero {
    display: none !important;
}

/* BOTONES */
.platform-tabs {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 16px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    background: #050505;
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: sticky;
    top: 68px;
    z-index: 90;
    scrollbar-width: none;
}

.platform-tabs::-webkit-scrollbar {
    display: none;
}

.platform-tab {
    flex: 0 0 auto;
    height: 42px;
    border-radius: 999px;
    padding: 0 18px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.82);
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.platform-tab.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* SECCIÓN */
.top-section {
    width: 100%;
    padding: 26px 0 60px;
    background: #050505;
}

.section-title {
    width: 100%;
    margin: 0 0 20px;
    padding: 0 20px;
    font-size: clamp(1.45rem, 6vw, 2rem);
    line-height: 1.15;
    font-weight: 900;
    text-align: center;
}

/* CARRUSEL */
.carousel-shell {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 8px 0 72px;
}

.streaming-track {
    display: flex;
    gap: 16px;
    width: max-content;
    padding-left: 20px;
    will-change: transform;
}

.stream-card {
    flex: 0 0 160px;
    width: 160px;
    height: 240px;
    position: relative;
    border-radius: 14px;
    background: #151515;
    overflow: visible;
    cursor: pointer;
    transition: transform .18s ease;
}

.stream-card:hover {
    transform: scale(1.05);
    z-index: 8;
}

.card-poster {
    width: 160px;
    height: 240px;
    object-fit: cover;
    display: block;
    border-radius: 14px;
}

.card-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 42px 10px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,.94));
    border-radius: 0 0 14px 14px;
}

.card-title {
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    margin-top: 3px;
    font-size: .7rem;
    color: rgba(255,255,255,.65);
}

.rank-number {
    position: absolute;
    left: -4px;
    bottom: -24px;
    font-size: 76px;
    line-height: 1;
    font-weight: 900;
    font-family: Arial Black, Impact, sans-serif;
    color: transparent;
    -webkit-text-stroke: 3px rgba(255,255,255,.85);
    z-index: 2;
    pointer-events: none;
}

/* ESTADOS */
.loader,
.top-error {
    margin: 20px;
    color: var(--muted);
}

.top-error {
    color: #ffd0d0;
    background: rgba(229,9,20,.12);
    border: 1px solid rgba(229,9,20,.28);
    padding: 14px 18px;
    border-radius: 12px;
}

/* MODAL LOGIN */
.login-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(10px);
}

.login-modal.is-open {
    display: flex;
}

.login-card {
    width: min(420px, 100%);
    background: rgba(10,10,14,.98);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    padding: 30px 24px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
}

.login-card h2 {
    margin: 0 0 22px;
    text-align: center;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.field-group {
    margin-bottom: 16px;
}

.field-label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255,255,255,.75);
    font-size: .82rem;
}

.login-card input {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.07);
    color: #fff;
    outline: none;
}

.input-code {
    text-align: center;
    letter-spacing: 8px;
    font-weight: 800;
}

.btn-primary.full,
.btn-secondary.full {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    text-decoration: none;
    margin-top: 8px;
    font-size: .95rem;
    font-weight: 800;
    cursor: pointer;
}

.btn-primary.full {
    border: 0;
    background: linear-gradient(135deg, #00d2ff, #0099dd);
    color: #001018;
}

.btn-secondary.full {
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.8);
    border: 1px solid rgba(255,255,255,.12);
}

.alert.alert-danger {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(248,113,113,.12);
    border: 1px solid rgba(248,113,113,.28);
    color: #ffc9c9;
    font-size: .88rem;
}

.muted-text {
    color: rgba(235,240,255,.65);
    font-size: .88rem;
    line-height: 1.5;
}

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

/* MODAL DETALLE */
body.modal-open {
    overflow: hidden !important;
}

.detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(12px);
}

.detail-modal.is-open {
    display: flex;
}

.detail-modal-box {
    width: min(1080px, 100%);
    max-height: min(88vh, 820px);
    overflow: auto;
    border-radius: 26px;
    background: #070707;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 30px 100px rgba(0,0,0,.85);
    position: relative;
}

.detail-close {
    position: sticky;
    top: 14px;
    float: right;
    z-index: 5;
    margin: 14px 14px 0 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(0,0,0,.62);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.detail-loading {
    padding: 70px 24px;
    text-align: center;
    color: rgba(255,255,255,.7);
}

.detail-hero {
    min-height: 440px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: end;
    padding: 80px 36px 36px;
    background-size: cover;
    background-position: center;
}

.detail-poster {
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
}

.detail-kicker {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.detail-main h2 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: .98;
    font-weight: 950;
}

.detail-tagline {
    color: rgba(255,255,255,.7);
    font-size: 1.05rem;
    margin: 0 0 14px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.86);
    font-size: .82rem;
    font-weight: 800;
}

.detail-overview {
    max-width: 680px;
    color: rgba(255,255,255,.83);
    line-height: 1.65;
    margin: 0;
}

.detail-actions {
    margin-top: 18px;
}

.detail-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: #fff;
    color: #000;
    text-decoration: none;
    font-weight: 900;
}

.detail-trailer {
    padding: 26px 36px 0;
}

.detail-trailer iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 20px;
    background: #111;
}

.detail-no-trailer {
    margin: 26px 36px 0;
    padding: 20px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.7);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 22px;
    padding: 30px 36px 36px;
}

.detail-grid h3 {
    margin: 0 0 14px;
    font-size: 1.15rem;
}

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

.cast-pill,
.provider-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 9px;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
}

.cast-pill img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.cast-pill strong,
.provider-pill span {
    display: block;
    color: #fff;
    font-size: .84rem;
    line-height: 1.15;
}

.cast-pill span,
.provider-pill small,
.detail-muted {
    display: block;
    color: rgba(255,255,255,.58);
    font-size: .75rem;
    line-height: 1.25;
}

.provider-grid {
    display: grid;
    gap: 10px;
}

.provider-pill img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
}

/* MÓVIL */
@media (max-width: 720px) {
    .top-header {
        height: 72px;
        padding: 0 18px;
    }

    .brand {
        font-size: 1.25rem;
    }

    .brand-mark {
        width: 46px;
        height: 46px;
    }

    .platform-tabs {
        top: 72px;
        padding: 14px 14px;
        justify-content: flex-start;
    }

    .platform-tab {
        height: 40px;
        padding: 0 16px;
        font-size: .78rem;
    }

    .top-section {
        padding-top: 24px;
    }

    .section-title {
        text-align: left;
        padding: 0 18px;
        margin-bottom: 18px;
    }

    .streaming-track {
        padding-left: 18px;
        gap: 14px;
    }

    .stream-card {
        flex: 0 0 128px;
        width: 128px;
        height: 192px;
    }

    .card-poster {
        width: 128px;
        height: 192px;
    }

    .rank-number {
        font-size: 62px;
        bottom: -18px;
        -webkit-text-stroke: 2px rgba(255,255,255,.85);
    }

    .card-title {
        font-size: .72rem;
    }

    .card-meta {
        font-size: .66rem;
    }

    .detail-modal {
        padding: 0;
        align-items: stretch;
    }

    .detail-modal-box {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .detail-hero {
        min-height: auto;
        grid-template-columns: 112px 1fr;
        gap: 16px;
        padding: 70px 18px 24px;
        align-items: end;
    }

    .detail-main h2 {
        font-size: 1.75rem;
    }

    .detail-overview {
        grid-column: 1 / -1;
        font-size: .9rem;
    }

    .detail-meta {
        gap: 6px;
    }

    .detail-meta span {
        font-size: .72rem;
        min-height: 26px;
    }

    .detail-trailer {
        padding: 18px;
    }

    .detail-no-trailer {
        margin: 18px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        padding: 18px;
    }
}
.streaming-track {
    touch-action: pan-y;
    cursor: grab;
}

.streaming-track.is-dragging {
    cursor: grabbing;
}

.top-section {
    padding-bottom: 35px !important;
}

.carousel-shell {
    padding-bottom: 55px !important;
}

.trailers-section {
    display: block !important;
    width: 100%;
    padding: 40px 5vw 70px;
    background: #062842;
    margin-top: 10px;
}

.trailers-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.trailers-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.trailers-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 900;
}

.trailer-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.trailer-tab {
    border: 1px solid #00f5d4;
    background: transparent;
    color: #fff;
    border-radius: 999px;
    padding: 7px 18px;
    font-weight: 800;
    cursor: pointer;
    font-size: .78rem;
}

.trailer-tab.active {
    background: #79ffd9;
    color: #001018;
}

.trailers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.trailer-card {
    color: #fff;
}

.trailer-thumb {
    position: relative;
    height: 126px;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
}

.trailer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trailer-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 42px;
    color: #fff;
    text-shadow: 0 4px 18px rgba(0,0,0,.7);
}

.trailer-card h3 {
    margin: 10px 0 2px;
    font-size: .95rem;
    line-height: 1.15;
}

.trailer-card p {
    margin: 0;
    font-size: .78rem;
    color: rgba(255,255,255,.75);
}

@media (max-width: 720px) {
    .trailers-section {
        padding: 32px 18px 60px;
    }

    .trailers-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .trailer-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
    }

    .trailer-tab {
        flex: 0 0 auto;
    }

    .trailers-grid {
        display: flex;
        overflow-x: auto;
        gap: 14px;
        padding-bottom: 10px;
    }

    .trailer-card {
        flex: 0 0 230px;
    }
}
.detail-trailer {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    border-radius: 18px;
    overflow: hidden;
    margin-top: 22px;
}

.detail-trailer iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.trailer-modal-content {
    padding: 28px;
}

.trailer-modal-content h2 {
    margin: 0 0 8px;
    color: #fff;
}

.trailer-modal-content p {
    margin: 0 0 18px;
    color: rgba(255,255,255,.75);
}