* {
    padding: 0;
    margin: 0;
    border: none;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.smart-tv-wrap {
    display: none;
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #000;
}

/* Видео контейнер */
.video-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    z-index: 1;
}

.video-wrap video {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    object-position: bottom center;
    pointer-events: auto;
}

/* Для картинки */
.smart-tv-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom center;
    display: none;
    z-index: 1;
}

/* Контейнер для видимой кнопки */
.button-container {
    position: fixed;
    top: 34px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

/* Видимая кнопка */
.action-button {
    background: #ef6f2e;
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    min-width: 200px;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    font-family: system-ui;
    pointer-events: auto;
    transition: all 0.3s ease;
    display: none;
}

.action-button:hover {
    background: #d45d20;
    transform: scale(1.05);
}

/* Ссылка НЕ на всю область, а только на верхнюю часть (где нет controls) */
.full-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 50px); /* Оставляем место для controls */
    z-index: 10;
    display: block;
    text-decoration: none;
    cursor: pointer;
}

/* Для картинки ссылка на всю область */
.smart-tv-wrap:has(img[style*="display: block"]) .full-link {
    height: 100%;
}



.smart-tv-wrap.media-position-top .video-wrap video {
    top: 0;
    bottom: auto;
    object-position: top center;
}

.smart-tv-wrap.media-position-top img {
    top: 0;
    bottom: auto;
    object-position: top center;
}

.smart-tv-wrap.media-position-bottom .video-wrap video {
    top: auto;
    bottom: 0;
    object-position: bottom center;
}

.smart-tv-wrap.media-position-bottom img {
    top: 0;
    bottom: auto;
    object-position: bottom center;
}

.smart-tv-wrap.media-position-center .video-wrap video {
    top: 50%;
    bottom: auto;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    object-position: center center;
}

.smart-tv-wrap.media-position-center img {
    top: 0;
    bottom: auto;
    object-position: center center;
}

@supports ((object-fit: cover)) {
    .video-wrap video {
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    
.smart-tv-wrap.media-position-top .video-wrap video {
    top: 0;
    bottom: auto;
    object-position: top center;
}

.smart-tv-wrap.media-position-top img {
    top: 0;
    bottom: auto;
    object-position: top center;
}

.smart-tv-wrap.media-position-bottom .video-wrap video {
        top: auto;
        bottom: 0;
        object-position: bottom center;
        -webkit-transform: none;
        transform: none;
    }

    .smart-tv-wrap.media-position-center .video-wrap video {
        top: 0;
        bottom: auto;
        object-position: center center;
        -webkit-transform: none;
        transform: none;
    }
}

@media (max-width: 768px) {
    .button-container {
        top: 34px;
    }
    
    .action-button {
        min-width: 150px;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .full-link {
        height: calc(100% - 40px);
    }
}