/* TV Video Hub 1.1.64 — Cinematic Feel Update
   Jeden czysty etap: delikatny filmowy feeling bez przeładowania efektami. */

:root {
    --tvm-cinema-bg-1: rgba(7, 18, 34, 0.98);
    --tvm-cinema-bg-2: rgba(8, 48, 72, 0.84);
    --tvm-cinema-accent: #38cfff;
    --tvm-cinema-accent-soft: rgba(56, 207, 255, 0.18);
    --tvm-cinema-panel: rgba(9, 22, 39, 0.76);
    --tvm-cinema-border: rgba(130, 225, 255, 0.20);
    --tvm-cinema-text: #f4fbff;
    --tvm-cinema-muted: rgba(232, 247, 255, 0.72);
}

.tvm-video-hub {
    position: relative;
    overflow: clip;
    isolation: isolate;
}

.tvm-video-hub::before {
    content: "";
    position: fixed;
    inset: -18vh -18vw;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(circle at 16% 18%, var(--tvm-cinema-accent-soft), transparent 28%),
        radial-gradient(circle at 84% 20%, rgba(36, 104, 174, 0.18), transparent 34%),
        linear-gradient(135deg, var(--tvm-cinema-bg-1), var(--tvm-cinema-bg-2));
    filter: saturate(1.04);
    animation: tvmCinemaAmbient 18s ease-in-out infinite alternate;
}

.tvm-video-hub::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, black, transparent 72%);
}

@keyframes tvmCinemaAmbient {
    from { transform: translate3d(-1.5%, -1.2%, 0) scale(1); }
    to { transform: translate3d(1.4%, 1.6%, 0) scale(1.035); }
}

.tvm-card,
.tvm-video-card,
.tvm-mobile-shell__card,
.tvm-static-panel-rail__button,
.tvm-video-modal__related-list button,
.tvm-video-ended__grid button {
    transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, border-color .24s ease, filter .24s ease;
}

.tvm-card:hover,
.tvm-video-card:hover,
.tvm-mobile-shell__card:hover,
.tvm-static-panel-rail__button:hover,
.tvm-video-modal__related-list button:hover,
.tvm-video-ended__grid button:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.32), 0 0 0 1px var(--tvm-cinema-border);
    filter: saturate(1.04);
}

.tvm-card:active,
.tvm-video-card:active,
.tvm-mobile-shell__card:active,
.tvm-live-panel:active,
.tvm-hero-action:active,
.tvm-live-action:active {
    transform: scale(0.985);
}

.tvm-card img,
.tvm-video-card img,
.tvm-mobile-shell__card img,
.tvm-card iframe,
.tvm-video-card iframe {
    transition: transform .55s cubic-bezier(.2,.8,.2,1), filter .35s ease;
}

.tvm-card:hover img,
.tvm-video-card:hover img,
.tvm-mobile-shell__card:hover img {
    transform: scale(1.035);
    filter: contrast(1.03) saturate(1.06);
}

.tvm-card [class*="play"],
.tvm-video-card [class*="play"],
.tvm-mobile-shell__card [class*="play"] {
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 26px rgba(0,0,0,.34), 0 0 0 1px rgba(255,255,255,.14) inset;
}

.tvm-video-modal__dialog,
.tvm-modal__dialog,
.tvm-static-panel-shell {
    animation: tvmCinemaModalIn .28s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes tvmCinemaModalIn {
    from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.982); filter: blur(2px); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}

.tvm-modal__backdrop {
    backdrop-filter: blur(18px) saturate(1.08);
    background: radial-gradient(circle at 50% 15%, rgba(41, 190, 255, .12), transparent 32%), rgba(1, 7, 14, .72);
}

.tvm-video-modal__player,
.tvm-modal__video {
    position: relative;
    overflow: hidden;
    background: #02070d;
    box-shadow: 0 24px 80px rgba(0,0,0,.48), 0 0 0 1px var(--tvm-cinema-border);
}

.tvm-video-modal__player::before,
.tvm-modal__video::before {
    content: "TV";
    position: absolute;
    left: 14px;
    top: 12px;
    z-index: 4;
    padding: 5px 9px;
    border-radius: 999px;
    font: 700 10px/1 Inter, Roboto, Arial, sans-serif;
    letter-spacing: .14em;
    color: var(--tvm-cinema-text);
    background: rgba(2, 12, 22, .54);
    border: 1px solid rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.tvm-live-panel--live .tvm-live-panel__badge,
.tvm-live-panel--live .tvm-live-panel__screen-box,
.tvm-live-modal__badge {
    position: relative;
}

.tvm-live-panel--live .tvm-live-panel__badge::before,
.tvm-live-panel--live .tvm-live-panel__screen-box::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 999px;
    background: #ff375f;
    box-shadow: 0 0 0 0 rgba(255, 55, 95, .5);
    animation: tvmLivePulse 1.65s ease-out infinite;
    vertical-align: middle;
}

@keyframes tvmLivePulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 55, 95, .52); }
    70% { box-shadow: 0 0 0 12px rgba(255, 55, 95, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 55, 95, 0); }
}

.tvm-cinema-watch-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 18px 0 22px;
    padding: 16px 18px;
    border-radius: 22px;
    color: var(--tvm-cinema-text);
    background: linear-gradient(135deg, rgba(8,26,48,.78), rgba(18, 84, 112, .42));
    border: 1px solid var(--tvm-cinema-border);
    box-shadow: 0 18px 48px rgba(0,0,0,.24);
    backdrop-filter: blur(16px);
}

.tvm-cinema-watch-band strong {
    display: block;
    font-size: clamp(18px, 2.4vw, 25px);
    line-height: 1.1;
    letter-spacing: -.02em;
}

.tvm-cinema-watch-band span {
    display: block;
    margin-top: 4px;
    color: var(--tvm-cinema-muted);
    font-size: 14px;
}

.tvm-cinema-watch-band a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    color: #031019;
    background: linear-gradient(135deg, #dff8ff, var(--tvm-cinema-accent));
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(56,207,255,.22);
}

.tvm-cinema-skeleton {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.tvm-video-hub.tvm-is-loading .tvm-cinema-skeleton {
    display: grid;
}

.tvm-cinema-skeleton__card {
    min-height: 190px;
    border-radius: 22px;
    background: linear-gradient(110deg, rgba(255,255,255,.07), rgba(255,255,255,.15), rgba(255,255,255,.07));
    background-size: 240% 100%;
    border: 1px solid rgba(255,255,255,.08);
    animation: tvmSkeleton 1.35s ease-in-out infinite;
}

@keyframes tvmSkeleton {
    from { background-position: 120% 0; }
    to { background-position: -120% 0; }
}

.tvm-video-modal__dialog.tvm-mini-player-ready .tvm-video-modal__player {
    transition: transform .28s ease, width .28s ease, height .28s ease, box-shadow .28s ease;
}

body.tvm-video-modal-scrolled .tvm-video-modal__dialog.tvm-mini-player-ready .tvm-video-modal__player {
    position: sticky;
    top: 12px;
    z-index: 12;
    max-width: 420px;
    margin-left: auto;
    border-radius: 18px;
}

.tvm-cinema-preview-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 3;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--tvm-cinema-text);
    background: rgba(2, 12, 22, .62);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(10px);
    font: 800 10px/1 Inter, Roboto, Arial, sans-serif;
    letter-spacing: .08em;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}

.tvm-card:hover .tvm-cinema-preview-badge,
.tvm-video-card:hover .tvm-cinema-preview-badge,
.tvm-mobile-shell__card:hover .tvm-cinema-preview-badge {
    opacity: 1;
    transform: translateY(0);
}

.tvm-card.tvm-cinema-active,
.tvm-video-card.tvm-cinema-active,
.tvm-mobile-shell__card.tvm-cinema-active {
    box-shadow: 0 24px 65px rgba(0,0,0,.36), 0 0 0 1px rgba(56,207,255,.46), 0 0 38px rgba(56,207,255,.12);
}

@media (max-width: 760px) {
    .tvm-cinema-watch-band {
        align-items: stretch;
        flex-direction: column;
        margin: 14px 0 18px;
        padding: 15px;
        border-radius: 20px;
    }

    .tvm-cinema-watch-band a {
        width: 100%;
    }

    .tvm-card:hover,
    .tvm-video-card:hover,
    .tvm-mobile-shell__card:hover,
    .tvm-static-panel-rail__button:hover,
    .tvm-video-modal__related-list button:hover,
    .tvm-video-ended__grid button:hover {
        transform: none;
    }

    .tvm-card:active,
    .tvm-video-card:active,
    .tvm-mobile-shell__card:active {
        transform: scale(.985);
    }

    .tvm-cinema-skeleton {
        grid-template-columns: 1fr;
    }

    body.tvm-video-modal-scrolled .tvm-video-modal__dialog.tvm-mini-player-ready .tvm-video-modal__player {
        position: relative;
        top: auto;
        max-width: none;
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tvm-video-hub::before,
    .tvm-live-panel--live .tvm-live-panel__badge::before,
    .tvm-live-panel--live .tvm-live-panel__screen-box::after,
    .tvm-cinema-skeleton__card,
    .tvm-video-modal__dialog,
    .tvm-modal__dialog,
    .tvm-static-panel-shell {
        animation: none;
    }

    .tvm-card,
    .tvm-video-card,
    .tvm-mobile-shell__card,
    .tvm-static-panel-rail__button,
    .tvm-video-modal__related-list button,
    .tvm-video-ended__grid button {
        transition: none;
    }
}
