.video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}
.video-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* VIDEO PLAYER */
.video-player {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(900px, 90vw);
    padding: 12px;
    background: #222;
    border-radius: 10px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
}
.video-player.show {
    display: block;
}

.youtube-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
}

.youtube-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.close-video {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: black; /* white */
    color: white; /* #222 */
    font-size: 24px;
    cursor: pointer;
    z-index: 2;
    box-shadow: none;
    padding: 0;
}

/* VIDEO THUMBNAILS */
.tv-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* POLAROID */
.mini-tv {
    background: white;
    padding: 8px;
    padding-bottom: 18px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* THUMBNAIL */
.tv-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    background: #eee;
}
.tv-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* PLAY BUTTON */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    font-size: 18px;
    padding-left: 3px;
    transition: 0.2s;
}

/* HOVER */
.mini-tv:hover {
    transform: translateY(-4px) rotate(-1deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
}
.mini-tv:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(0, 0, 0, 0.8);
}
.video-title {
    /* font-family: "Courier New", Courier, monospace; */
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
    color: #222;
    margin-top: 10px;
    /* Allows long titles to wrap */
    overflow-wrap: break-word;
}

/* REMOVE OLD TV ELEMENTS */
.antenna,
.tv-controls,
.knob,
.screen-glare {
    display: none;
}

#page6 .section-content {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

#page6 .mini-tv {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;

    background: white;
    padding: 8px 8px 18px;
    border-radius: 6px;

    box-shadow: 0 3px 10px rgba(0,0,0,.2);

    cursor: pointer;
}

#page6 .tv-screen {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;

    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;
    border-radius: 4px;

    background: #ddd;
}

#page6 .tv-screen img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;

    width: 100%;
    height: 100%;
    object-fit: cover;
}

#page6 .video-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;

    /* font-family: "Courier New", Courier, monospace; */
    font-style: italic;
    font-size: 14px;
    text-align: center;

    color: #222;

    margin-top: 10px;
}

@media (min-width: 700px) {
    #page6 .section-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* DESKTOP */
@media (min-width: 700px) {
    .tv-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        max-width: 900px;
    }
}