/* Custom Video Player Styles for Meta Humans LTD */

.video-player {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Rajdhani', sans-serif;
}

/* Video Element */
.video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Video Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-player:hover .video-overlay {
    opacity: 1;
    pointer-events: auto;
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(0, 212, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-button i {
    font-size: 32px;
    color: white;
    margin-left: 4px;
}

.play-button:hover {
    background: rgba(0, 212, 255, 1);
    transform: scale(1.1);
}

/* Video Controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-player:hover .video-controls {
    opacity: 1;
}

/* Progress Bar */
.progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 15px;
}

.progress-filled {
    height: 100%;
    background: linear-gradient(45deg, #00d4ff, #8b5cf6);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 16px;
    height: 16px;
    background: #00d4ff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

/* Main Controls */
.controls-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Control Buttons */
.video-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.video-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.video-controls button:active {
    transform: translateY(0);
}

/* Time Display */
.time-display {
    color: white;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.current-time, .total-time {
    color: #00d4ff;
    font-weight: 600;
}

/* Volume Control */
.volume-control {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    position: relative;
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.volume-control:hover .volume-slider {
    opacity: 1;
}

.volume-filled {
    height: 100%;
    background: linear-gradient(45deg, #00d4ff, #8b5cf6);
    border-radius: 2px;
    width: 100%;
}

.volume-handle {
    position: absolute;
    top: 50%;
    left: 100%;
    width: 12px;
    height: 12px;
    background: #00d4ff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0, 212, 255, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.volume-slider:hover .volume-handle {
    opacity: 1;
}

/* Playback Speed */
.playback-speed {
    position: relative;
}

.btn-speed {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none;
    color: white;
    padding: 8px 12px !important;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: auto !important;
    height: 40px;
}

.btn-speed:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.speed-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.speed-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.speed-option {
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.speed-option:hover {
    background: rgba(0, 212, 255, 0.2);
}

.speed-option[data-selected="true"] {
    color: #00d4ff;
    font-weight: 600;
}

/* Fullscreen Styles */
.video-player:fullscreen {
    background: #000;
}

.video-player:fullscreen .video-element {
    object-fit: contain;
}

.video-player:fullscreen .video-controls {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

/* Loading State */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.video-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-top: 3px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.video-loading p {
    color: white;
    font-size: 14px;
}

/* Error State */
.video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.video-error i {
    font-size: 48px;
    color: #ff6b6b;
    margin-bottom: 15px;
}

.video-error p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Modal Integration */
.video-modal .video-player {
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 800px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .controls-main {
        flex-direction: column;
        gap: 10px;
    }
    
    .controls-left, .controls-right {
        width: 100%;
        justify-content: center;
    }
    
    .time-display {
        font-size: 12px;
    }
    
    .video-controls button {
        min-width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
    }
    
    .play-button i {
        font-size: 24px;
    }
    
    .video-modal .video-player {
        width: 95vw;
        height: 95vh;
    }
}

@media (max-width: 480px) {
    .video-controls {
        padding: 15px;
    }
    
    .controls-left, .controls-right {
        gap: 5px;
    }
    
    .video-controls button {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 6px;
    }
    
    .time-display {
        font-size: 11px;
    }
    
    .volume-slider {
        width: 40px;
    }
    
    .speed-menu {
        min-width: 100px;
    }
    
    .speed-option {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Keyboard Focus Styles */
.video-controls button:focus {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* Animation Keyframes */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Picture in Picture Styles */
.video-player[data-pip="true"] {
    border: 2px solid #00d4ff;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .video-controls,
    .video-overlay,
    .progress-handle,
    .volume-handle,
    .speed-menu {
        transition: none;
    }
    
    .play-button:hover {
        transform: none;
    }
    
    .video-controls button:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .video-controls button {
        border: 1px solid white;
    }
    
    .progress-bar {
        border: 1px solid white;
    }
    
    .volume-slider {
        border: 1px solid white;
    }
} 