/* 1. THE GRID ITEMS (Thumbnails) */
.video-card {
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease;
}

.video-thumb-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
}

.video-card:hover .video-thumb {
    opacity: 0.8;
}

/* 2. THE PLAY BUTTON */
.play-button {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 65px; height: 45px;
    background: rgba(0,0,0,0.8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.video-card:hover .play-button {
    background: #ff0000;
}

.play-icon {
    width: 0; height: 0; 
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid white;
    margin-left: 4px;
}

/* 3. THE LIGHTBOX OVERLAY */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
}

/* 4. THE CINEMATIC VIDEO BOX */
.lightbox-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    background: #000; /* Backdrop for loading */
}

/* CRITICAL FIX: Ensure the inner containers fill the 16/9 ratio */
#player-container, 
#player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 5. THE CLOSE BUTTON */
.close-lightbox {
    position: fixed; /* Fixed so it stays in the corner of the screen */
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 50px;
    font-weight: 300; /* Cleaner thin look */
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    transition: color 0.2s;
}

.close-lightbox:hover {
    color: #ff0000;
}