.video-popup-wrapper {
    display: inline-block;
    margin: 10px 0;
}

.video-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.video-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.video-popup-btn:active {
    transform: translateY(0);
}

.video-popup-btn svg {
    flex-shrink: 0;
}

.video-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.video-popup-overlay.no-overlay {
    background: transparent;
    pointer-events: none;
}

.video-popup-overlay.no-overlay .video-popup-content {
    pointer-events: auto;
}

.video-popup-overlay.no-overlay .video-popup-close {
    pointer-events: auto;
}

.video-popup-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.video-popup-content {
    position: relative;
    width: fit-content;
    max-width: 90vw;
    margin: 0 auto;
}

@keyframes slideUp {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Fade */
@keyframes anim-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animation-fade .video-popup-content {
    animation: anim-fade 0.3s ease;
}

/* Fade + Slide Down */
@keyframes anim-fade-slide-down {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animation-fade-slide-down .video-popup-content {
    animation: anim-fade-slide-down 0.4s ease;
}

/* Fade + Slide Up */
@keyframes anim-fade-slide-up {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animation-fade-slide-up .video-popup-content {
    animation: anim-fade-slide-up 0.4s ease;
}

/* Fade + Zoom */
@keyframes anim-fade-zoom {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animation-fade-zoom .video-popup-content {
    animation: anim-fade-zoom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Slide Right */
@keyframes anim-slide-right {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.animation-slide-right .video-popup-content {
    animation: anim-slide-right 0.4s ease;
}

/* Slide Left */
@keyframes anim-slide-left {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.animation-slide-left .video-popup-content {
    animation: anim-slide-left 0.4s ease;
}

/* Newspaper */
@keyframes anim-newspaper {
    from {
        opacity: 0;
        transform: scale(0) rotate(720deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.animation-newspaper .video-popup-content {
    animation: anim-newspaper 0.7s ease;
}

/* Bounce */
@keyframes anim-bounce {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.animation-bounce .video-popup-content {
    animation: anim-bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Flip Horizontal */
@keyframes anim-flip-horizontal {
    from {
        opacity: 0;
        transform: perspective(1000px) rotateY(-90deg);
    }
    to {
        opacity: 1;
        transform: perspective(1000px) rotateY(0deg);
    }
}

.animation-flip-horizontal .video-popup-content {
    animation: anim-flip-horizontal 0.6s ease;
}

/* Flip Vertical */
@keyframes anim-flip-vertical {
    from {
        opacity: 0;
        transform: perspective(1000px) rotateX(-90deg);
    }
    to {
        opacity: 1;
        transform: perspective(1000px) rotateX(0deg);
    }
}

.animation-flip-vertical .video-popup-content {
    animation: anim-flip-vertical 0.6s ease;
}

/* Rotate In */
@keyframes anim-rotate-in {
    from {
        opacity: 0;
        transform: rotate(-360deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

.animation-rotate-in .video-popup-content {
    animation: anim-rotate-in 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Elastic */
@keyframes anim-elastic {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    55% {
        opacity: 1;
        transform: scale(1.2);
    }
    75% {
        transform: scale(0.85);
    }
    90% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.animation-elastic .video-popup-content {
    animation: anim-elastic 0.9s ease-out;
}

/* Swing In */
@keyframes anim-swing {
    0% {
        opacity: 0;
        transform: rotate(-10deg) scale(0.8);
    }
    50% {
        transform: rotate(5deg) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

.animation-swing .video-popup-content {
    animation: anim-swing 0.7s ease;
}

/* Blur In */
@keyframes anim-blur {
    from {
        opacity: 0;
        filter: blur(20px);
    }
    to {
        opacity: 1;
        filter: blur(0px);
    }
}

.animation-blur .video-popup-content {
    animation: anim-blur 0.5s ease;
}

/* Glow In */
@keyframes anim-glow {
    0% {
        opacity: 0;
        box-shadow: 0 0 0 rgba(0, 115, 170, 0);
        transform: scale(0.8);
    }
    50% {
        box-shadow: 0 0 60px rgba(0, 115, 170, 0.8);
    }
    100% {
        opacity: 1;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        transform: scale(1);
    }
}

.animation-glow .video-popup-content {
    animation: anim-glow 0.6s ease;
}

/* Jello */
@keyframes anim-jello {
    0%, 100% {
        transform: scale3d(1, 1, 1);
    }
    30% {
        transform: scale3d(1.25, 0.75, 1);
    }
    40% {
        transform: scale3d(0.75, 1.25, 1);
    }
    50% {
        transform: scale3d(1.15, 0.85, 1);
    }
    65% {
        transform: scale3d(0.95, 1.05, 1);
    }
    75% {
        transform: scale3d(1.05, 0.95, 1);
    }
}

.animation-jello .video-popup-content {
    animation: anim-jello 0.9s ease;
}

/* Rubber Band */
@keyframes anim-rubber {
    0% {
        transform: scale3d(1, 1, 1);
    }
    30% {
        transform: scale3d(1.25, 0.75, 1);
    }
    40% {
        transform: scale3d(0.75, 1.25, 1);
    }
    50% {
        transform: scale3d(1.15, 0.85, 1);
    }
    65% {
        transform: scale3d(0.95, 1.05, 1);
    }
    75% {
        transform: scale3d(1.05, 0.95, 1);
    }
    100% {
        transform: scale3d(1, 1, 1);
    }
}

.animation-rubber .video-popup-content {
    animation: anim-rubber 0.8s ease;
}

.video-popup-close {
    position: absolute;
    top: -50px;
    right: -10px;
    background: white;
    color: black;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000000;
}

.video-popup-close:hover {
    background: #ff4444;
    color: white;
    transform: rotate(90deg);
}

.video-popup-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: black;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.video-popup-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.video-popup-custom-container {
    position: relative;
    width: 800px;
    height: 600px;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    margin: 0 auto;
}

.video-popup-custom-container .popup-element {
    position: absolute;
    padding: 10px;
}

.video-popup-custom-container .text-element {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 16px;
    border-radius: 5px;
    text-align: left;
}

.video-popup-custom-container .image-element img {
    max-width: 100%;
    height: auto;
    display: block;
}

.video-popup-custom-container .video-element iframe {
    display: block;
    width: 100%;
    height: 100%;
}

.video-popup-custom-container .video-element video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-popup-custom-container .element-controls {
    display: none !important;
}

@media (max-width: 768px) {
    .video-popup-content {
        width: 95%;
    }
    
    .video-popup-close {
        top: -40px;
        width: 35px;
        height: 35px;
        font-size: 25px;
    }
    
    .video-popup-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}
