/* Mobile-optimized video player styles */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
}

/* iOS-specific optimizations */
@supports (-webkit-touch-callout: none) {
    .video-container video {
        /* Optimize for iOS */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }
    
    /* Smaller controls for better touch targets on iOS */
    video::-webkit-media-controls-panel {
        opacity: 0.9;
    }
    
    video::-webkit-media-controls-play-button {
        transform: scale(1.2);
    }
}

/* Low-power mode for iOS */
@media (prefers-reduced-motion: reduce) {
    .video-container video {
        /* Disable animations and transitions */
        transition: none !important;
        animation: none !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-container {
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
    }
}

/* Loading indicator */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 2;
}

/* Error message styling */
.video-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 20px;
    z-index: 3;
}
