/* Video Player Styles */
.video-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-player {
    width: 100%;
    display: block;
}

/* Subtitles Overlay */
.subtitles-overlay {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    pointer-events: none;
    padding: 0 20px;
}

.subtitle {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1.4;
    cursor: pointer;
    pointer-events: auto;
    max-width: 80%;
    transition: all 0.2s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.subtitle:hover {
    background-color: rgba(0, 0, 0, 0.9);
    text-decoration: underline;
    transform: scale(1.02);
}

.subtitle.active {
    background-color: rgba(0, 0, 0, 0.9);
    border: 2px solid #007bff;
}

/* Video Info Section */
.video-info {
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.video-info h2 {
    margin: 0 0 10px 0;
    color: #333;
}

.video-info p {
    margin: 0;
    color: #666;
}

/* Video Controls */
.video-controls {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.video-controls button {
    margin: 0 5px;
}

/* Modal Styles */
.modal-dialog.modal-in-depth {
    max-width: 90%;
    width: 90%;
    height: 90vh;
    margin: 30px auto;
}

.modal-content {
    height: 100%;
    border-radius: 8px;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.modal-body.in-depth-frame-container {
    height: calc(100% - 56px);
    padding: 0;
    overflow: hidden;
}

.in-depth-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Instructions */
.instructions {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 8px;
    color: #495057;
}

.instructions p {
    margin: 5px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-container {
        border-radius: 0;
    }
    
    .subtitles-overlay {
        bottom: 60px;
        padding: 0 10px;
    }
    
    .subtitle {
        font-size: 14px;
        padding: 8px 16px;
        max-width: 90%;
    }
    
    .video-info {
        margin: 10px 0;
        padding: 15px;
    }
    
    .video-info h2 {
        font-size: 20px;
    }
    
    .video-controls {
        margin: 10px 0;
        padding: 10px;
    }
    
    .video-controls button {
        margin: 5px 3px;
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .modal-dialog.modal-in-depth {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        margin: 0;
    }
    
    .modal-content {
        border-radius: 0;
        height: 100vh;
    }
    
    .modal-body.in-depth-frame-container {
        height: calc(100vh - 56px);
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .subtitle {
        font-size: 16px;
        padding: 10px 20px;
    }
    
    .modal-dialog.modal-in-depth {
        max-width: 95%;
        width: 95%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .video-info {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }

    .video-info h2 {
        color: #ffffff;
    }

    .video-info p {
        color: #b0b0b0;
    }

    .video-controls {
        background-color: #2d2d2d;
    }

    .instructions {
        background-color: #3d3d3d;
        color: #e0e0e0;
    }

    .modal-header {
        background-color: #2d2d2d;
        color: #ffffff;
        border-bottom-color: #444;
    }

    .modal-content {
        background-color: #1a1a1a;
    }
}

/* Firefox Mobile Mode Fixes for Swipe */
/* Allow touches to pass through Bootstrap backdrop to swipe bar */
.modal-backdrop {
    pointer-events: none !important;
}

/* Ensure modal content still receives events */
.modal-content {
    pointer-events: auto;
}

/* Swipe bar with higher z-index and touch-action */
#swipeCloseBar {
    z-index: 10000 !important;
    touch-action: pan-x !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    pointer-events: auto !important;
}