/* Universal Video Compatibility Styles */

/* Improve video rendering and playback on all platforms */
video {
    /* Enable hardware acceleration */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);

    /* Improve rendering performance */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;

    /* Ensure proper video sizing */
    max-width: 100%;
    height: auto;

    /* Universal optimizations */
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;

    /* Prevent zoom on double tap */
    touch-action: manipulation;

    /* Better video object fitting */
    object-fit: contain;
}

/* Flutter video player specific improvements */
flt-platform-view video,
.flt-platform-view video {
    /* Force hardware acceleration for Flutter video players */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);

    /* Improve touch handling */
    pointer-events: auto;

    /* Better rendering */
    -webkit-appearance: none;
    appearance: none;
}

/* Better touch targets for video controls */
.video-controls {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    video {
        /* Better scaling on retina displays */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Prevent video from being highlighted on touch */
video::selection {
    background: transparent;
}

video::-moz-selection {
    background: transparent;
}