/* Container & Swiper Setup */
.yt-shorts-container {
    width: 100%;
    padding: 20px 0;
    position: relative;
}

.yt-shorts-container .swiper-slide {
    width: 280px; 
    height: 480px; 
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    background-color: #000;
}

.yt-shorts-container .swiper-slide:hover {
    transform: scale(1.03);
}

.yt-shorts-container .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Play Button Overlay */
.yt-shorts-container .play-btn-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.yt-shorts-container .swiper-slide:hover .play-btn-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.yt-shorts-container .play-btn-overlay svg {
    width: 60px;
    height: 60px;
    fill: white;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Popup Modal Background */
.shorts-popup-modal {
    display: none; 
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Darker background for better focus */
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

/* Popup Inner Container - FIXED FOR SHORTS */
.shorts-popup-content {
    position: relative;
    width: 100%;
    max-width: 420px; 
    /* Force strict 9:16 vertical aspect ratio */
    aspect-ratio: 9 / 16; 
    max-height: 90vh; /* Prevent it from being taller than the screen */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.shorts-popup-content iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Close Button */
.shorts-popup-close {
    position: absolute;
    top: -45px; /* Moves it above the video */
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    z-index: 10;
}

@media (max-width: 500px) {
    .shorts-popup-content {
        border-radius: 0;
        max-height: 100vh;
    }
    .shorts-popup-close { 
        right: 15px; 
        top: 15px; 
        text-shadow: 0 0 10px #000; 
        z-index: 10;
    }
}