.wl7-widget3 {
    display: block;
    position: fixed;
    bottom: 50px;
    left: 50px;
    z-index: 9999999;
    line-height: 20px;
    text-align: left;
}

.wl7-widget3 > div {
    width: 100%;
    height: 100%;
}

.wl7-container {
    line-height: 20px;
    z-index: 9999999;
    text-align: left;
    position: fixed;
    bottom: 10px;
    left: 50px;
}

.wl7-wrapper {
    position: relative;
    height: 100%;
}

.wl7-items-block {
    position: relative;
    display: flex;
    user-select: none;
    justify-content: center;
    flex-wrap: nowrap;
    transition: opacity 0.4s ease;
    opacity: 1;
}

.wl7-state {
    position: relative;
    box-sizing: border-box;
    cursor: pointer;
    animation: fadeIn 0.5s ease-out;
    transition: width 0.3s ease-in-out, min-width 0.3s ease-in-out;
    width: 130px;
    min-width: 130px;
    height: 220px;
}

.wl7-state:before {
    content: "";
    display: block;
    transition: padding-top 0.3s ease-in-out;
    padding-top: 195px;
}

.wl7-animated {
    box-sizing: border-box;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
    transition: transform 0.2s ease, width 0.3s ease-in-out, height 0.3s ease-in-out;
    transform-origin: left bottom;
}

.wl7-animated-closed {
    transform-origin: left bottom;
}

.wl7-animated-closed:hover {
    transform: scale(1.05);
}

@media (min-width: 1280px) {
    .wl7-animated-opened {
        width: 360px !important;
        height: 590px !important;
    }
}

@media (max-width: 1280px) {
    .wl7-animated-opened {
        width: 300px !important;
        height: 500px !important;
    }
}

.wl7-animated-opened:hover {
    transform: scale(1.05);
}

.wl7-content {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
    transition: border-radius 0.3s ease-out, box-shadow 0.2s ease-out, border-color 0.3s ease;
    border-radius: 20px;
    z-index: 100;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid rgb(255, 255, 255);
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}

.wl7-content-closed:hover,
.wl7-content-opened:hover {
    border-color: rgb(54, 94, 220);
}

.wl7-video {
    z-index: 2;
    box-sizing: border-box;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s ease;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.wl7-video.enter-done {
    opacity: 1;
}

.wl7-gradient-top {
    position: absolute;
    top: -1px;
    right: 0;
    left: 0;
    height: 100px;
    z-index: 30;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.wl7-gradient-bottom {
    position: absolute;
    bottom: -1px;
    right: 0;
    left: 0;
    height: 60px;
    z-index: 30;
    background: linear-gradient(0deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.wl7-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
}

.wl7-progress-track {
    height: 3px;
    background-color: rgba(255, 255, 255, 0.2);
    width: 100%;
    position: relative;
}

.wl7-progress-fill {
    height: 100%;
    background-color: #ff4d4d;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.wl7-close-mini {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    z-index: 1020;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wl7-content-closed:hover .wl7-close-mini {
    opacity: 0.8;
}

.wl7-close-mini:hover {
    opacity: 1 !important;
}

.wl7-close-mini svg {
    width: 12px;
    height: 12px;
}

.wl7-btn-close {
    position: absolute;
    top: 44px;
    right: 12px;
    width: 22px;
    height: 22px;
    z-index: 1010;
    cursor: pointer;
    transition: opacity 0.3s ease-out, background-color 0.2s ease-out;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wl7-btn-playpause {
    position: absolute;
    top: 76px;
    right: 12px;
    width: 22px;
    height: 22px;
    z-index: 50;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wl7-btn-mute {
    position: absolute;
    top: 108px;
    right: 12px;
    width: 22px;
    height: 22px;
    z-index: 50;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wl7-time {
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    font-size: 11px;
    font-weight: 500;
    z-index: 400;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    backdrop-filter: blur(2px);
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.wl7-content-opened:hover .wl7-btn-close,
.wl7-content-opened:hover .wl7-btn-playpause,
.wl7-content-opened:hover .wl7-btn-mute,
.wl7-content-opened:hover .wl7-time {
    opacity: 1;
}

.wl7-cta {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex !important;
    gap: 15px;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    display: none;
}

.wl7-cta.show {
    display: flex !important;
    opacity: 1;
    animation: slideUp 0.3s ease;
}

.wl7-telegram {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2AABEE;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.wl7-max {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #305ffc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.wl7-telegram:hover {
    transform: scale(1.35) rotate(5deg);
    box-shadow: 0 8px 20px rgba(42, 171, 238, 0.6);
    background: #fff;
    transition: all 0.7s ease;
}

.wl7-telegram:hover svg circle {
    fill: #2AABEE;
}

.wl7-telegram:hover svg path {
    fill: white;
}

.wl7-max:hover {
    transform: scale(1.35) rotate(-5deg);
    box-shadow: 0 8px 20px rgba(48, 95, 252, 0.6);
    background: #fff;
    transition: all 0.7s ease;
}

.wl7-max:hover svg path {
    fill: #305ffc;
}

.wl7-cta.show .wl7-telegram,
.wl7-cta.show .wl7-max {
    animation: popIn 0.5s ease-in-out;
}

.wl7-cta.show .wl7-telegram {
    animation-delay: 0.1s;
}

.wl7-cta.show .wl7-max {
    animation-delay: 0.4s;
}

@media (max-width: 768px) {
    .wl7-container {
        bottom: 60px;
        left: 50px;
    }
    
    .wl7-btn-close,
    .wl7-btn-playpause,
    .wl7-btn-mute,
    .wl7-time {
        opacity: 1 !important;
    }
    
    .wl7-close-mini {
        opacity: 0.8 !important;
    }
    
    .wl7-content-closed .wl7-close-mini {
        opacity: 0.8 !important;
    }
}

video::-webkit-media-controls-enclosure {
    overflow: hidden !important;
}

video::-webkit-media-controls-panel {
    width: calc(100% + 30px) !important;
}

video::-moz-controls-download-button,
video::-ms-controls-download-button,
video::-internal-media-controls-download-button {
    display: none !important;
}

video {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    pointer-events: auto;
}

.wl7-widget-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 10000000;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: notificationSlideIn 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-button,
.custom-button-wrapper,
video + .custom-button,
video ~ .custom-button,
.wl7-widget3 .custom-button,
#skip-button,
[aria-label="Skip button"] {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideUp {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes notificationSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes notificationSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ===== ИСПРАВЛЕНИЕ ПОЗИЦИИ ОТКРЫТОГО ВИДЖЕТА ===== */
#openedState,
.wl7-state-opened {
    bottom: 0 !important;
    top: auto !important;
}

#openedState .wl7-animated-opened,
.wl7-state-opened .wl7-animated-opened {
    bottom: 0 !important;
    top: auto !important;
}