html, body {
    overflow: hidden;
    height: 100%; 
    margin: 0;
    padding: 0;
}

body.hidden {
    visibility: hidden; 
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(var(--vh, 1vh) * 100);
    background-color: white;
}

.video-wrapper {
    background-color: black;
    width: 57%;
    padding-top: calc(min(42.19%, 600px)); 
    margin-top: 50px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 95%;
    max-width: 787.5px;
    max-height: 571.5px;
    gap: 5px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

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

video:hover {
    cursor: pointer;
}

.video-info {
    position: absolute;
    bottom: min(43vw, 600px);
    left: 0;
    width: 100%; 
    text-align: center;
    font-size: 18px;
    font-family: monospace;
    padding: 10px;
    box-sizing: border-box;
}

.video-info img {
    width: 100%; 
    height: auto; 
    max-width: 700px;
    display: none;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .video-wrapper {
        width: 95%;
        height: 15%;
        padding-top: 50%;
    }
    
    .video-grid {
        width: 90%;
    }

    .video-info {
        bottom: 70vw;
        left: 0; /* Fix the left alignment */
        text-align: center; 
    }

    .video-info img {
        max-width: 600px; 
    }
}

@media (max-width: 500px) {
    .video-wrapper {
        width: 95%;
        height: 12%;
        padding-top: 50%; 
    }
    
    .video-grid {
        width: 95%;
    }

    .video-info {
        bottom: 72vw;
        left: 0;
        text-align: center; 
    }

    .video-info img {
        max-width: 400px;
    }
}

video::-webkit-media-controls {
    display: none !important;
}