/* --- STACK (KARTY) - BEZ ZMIAN --- */
.nmvs-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    perspective: 1000px;
}

.nmvs-card {
    position: relative;
    width: 300px; 
    height: 400px; 
    flex-shrink: 0; 
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: bottom center;
    filter: brightness(0.8);
    z-index: 1;
}

.nmvs-card:hover {
    transform: translateY(-20px) scale(1.05);
    filter: brightness(1.1);
    z-index: 100; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    margin-right: 20px; 
    margin-left: 20px !important; 
}

.nmvs-video-wrap {
    width: 100%;
    height: 100%;
    position: relative;
}

.nmvs-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; 
}

.nmvs-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nmvs-card:hover .nmvs-overlay { opacity: 1; }

.nmvs-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    font-size: 40px;
    color: white;
    background: rgba(255,255,255,0.2);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: transform 0.3s;
}

.nmvs-card:hover .nmvs-play-icon { transform: translate(-50%, -50%) scale(1); }

.nmvs-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    transform: translateY(10px);
    transition: transform 0.3s;
}

.nmvs-card:hover .nmvs-title { transform: translateY(0); }

/* --- LIGHTBOX --- */
.nmvs-lightbox {
    position: fixed;
    inset: 0;
    background-color: var(--nmvs-bg, rgba(0,0,0,0.9));
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

/* Warstwa AMBIENT (Tło) */
.nmvs-ambient-layer {
    position: absolute;
    inset: -10%; 
    width: 120%;
    height: 120%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none; 
}

.nmvs-ambient-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(30px) brightness(0.6) saturate(1.2);
    opacity: 0; 
    transition: opacity 0.5s ease;
}

/* Główny Content */
.nmvs-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    aspect-ratio: var(--nmvs-ratio, 16/9);
    max-height: 90vh; 
    background: black;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    border-radius: 8px;
    overflow: hidden;
    display: block; /* Sztywny blok */
}

.nmvs-main-video {
    /* Zwiększamy do 102%, żeby mieć pewność */
    width: 102%;
    height: 102%;
    object-fit: cover; 
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    
    /* --- TO JEST KLUCZOWE CENTROWANIE --- */
    /* Dzięki temu te 102% rozłoży się równo na wszystkie strony */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Przycisk Zamknięcia (ATOMÓWKA) */
.nmvs-close {
    position: absolute;
    top: 15px;
    right: 15px;
    
    /* Resetujemy wszystko co motyw mógł dodać */
    background: transparent !important; 
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    
    color: white !important;
    font-size: 35px;
    line-height: 1;
    width: auto;
    height: auto;
    cursor: pointer;
    z-index: 20; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}

.nmvs-close:hover { 
    transform: rotate(90deg); 
    opacity: 1;
    background: transparent !important; 
}