.video-preview-square {
    max-width: 480px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    border-radius: 8px;
}

.video-preview-square video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
}

video:fullscreen {
    position: static;
    transform: none;
    min-width: unset;
    min-height: unset;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 600px) {
    .video-preview-square {
        max-width: 100%;
    }
}
