/* Modern Minimalist Video Player Styles */
/* Dark theme with rounded corners and custom controls */

:root {
    --player-primary: #00C2FF;
    --player-secondary: #8A2BE2;
    --player-bg: rgba(10, 10, 31, 0.95);
    --player-control-bg: rgba(26, 26, 58, 0.9);
    --player-text: #FFFFFF;
    --player-text-muted: #A0A0A0;
    --player-border: rgba(0, 194, 255, 0.3);
    --player-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Video Player Modal */
#video-player-modal {
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Video Player Container */
.video-player-container {
    position: relative;
    max-width: 1200px;
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: var(--player-bg);
    box-shadow: var(--player-shadow);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.video-player-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--player-control-bg);
    border: 2px solid var(--player-border);
    color: var(--player-text);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.video-player-close:hover {
    background: var(--player-primary);
    border-color: var(--player-primary);
    transform: rotate(90deg);
}

/* Video Element */
.video-player-video {
    width: 100%;
    display: block;
    background: #000;
    cursor: pointer;
}

/* Hide native controls */
.video-player-video::-webkit-media-controls {
    display: none !important;
}

.video-player-video::-webkit-media-controls-enclosure {
    display: none !important;
}

/* Custom Controls Container */
.video-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    padding: 24px 20px 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.video-player-container:hover .video-player-controls,
.video-player-container.playing .video-player-controls.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Always show controls on mobile */
@media (max-width: 768px) {
    .video-player-controls {
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
    }
}

/* Progress Bar */
.video-progress-container {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: height 0.2s ease;
}

.video-progress-container:hover {
    height: 8px;
}

.video-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--player-primary), var(--player-secondary));
    border-radius: 3px;
    transition: width 0.1s linear;
}

.video-progress-handle {
    position: absolute;
    top: 50%;
    right: -8px;
    width: 16px;
    height: 16px;
    background: var(--player-text);
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}

.video-progress-container:hover .video-progress-handle {
    transform: translateY(-50%) scale(1);
}

/* Buffer Bar */
.video-buffer-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Controls Row */
.video-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Control Buttons */
.video-control-btn {
    background: none;
    border: none;
    color: var(--player-text);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-width: 40px;
    min-height: 40px;
}

.video-control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.video-control-btn:active {
    transform: scale(0.95);
}

/* Play/Pause Button */
.video-play-btn {
    background: linear-gradient(135deg, var(--player-primary), var(--player-secondary));
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
}

.video-play-btn:hover {
    background: linear-gradient(135deg, #00A2DF, #7520D1);
    transform: scale(1.15);
}

/* Time Display */
.video-time {
    font-size: 0.9rem;
    color: var(--player-text);
    font-weight: 500;
    min-width: 100px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.video-time-separator {
    margin: 0 4px;
    color: var(--player-text-muted);
}

/* Volume Control */
.video-volume-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-volume-slider {
    width: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: width 0.3s ease;
    overflow: hidden;
}

.video-volume-container:hover .video-volume-slider {
    width: 80px;
}

.video-volume-level {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--player-primary), var(--player-secondary));
    border-radius: 2px;
    transition: width 0.1s ease;
}

/* Spacer */
.video-controls-spacer {
    flex: 1;
}

/* Menu Button */
.video-menu-btn {
    position: relative;
}

.video-menu-dropdown {
    position: absolute;
    bottom: 56px;
    right: 0;
    background: var(--player-control-bg);
    border: 1px solid var(--player-border);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-menu-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.video-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: var(--player-text);
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.video-menu-item.active {
    color: var(--player-primary);
    background: rgba(0, 194, 255, 0.1);
}

/* Loading Spinner */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--player-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-loading.active {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Play Overlay */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-player-container.paused .video-play-overlay {
    opacity: 1;
}

.video-play-overlay-btn {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--player-primary), var(--player-secondary));
    border: none;
    border-radius: 50%;
    color: var(--player-text);
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 194, 255, 0.4);
    transition: all 0.3s ease;
    pointer-events: all;
}

.video-play-overlay-btn:hover {
    transform: scale(1.1);
}

.video-play-overlay-btn:active {
    transform: scale(0.95);
}

/* Fullscreen Styles */
.video-player-container:fullscreen {
    border-radius: 0;
    max-width: none;
}

.video-player-container:-webkit-full-screen {
    border-radius: 0;
    max-width: none;
}

.video-player-container:-moz-full-screen {
    border-radius: 0;
    max-width: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-player-container {
        border-radius: 16px;
    }

    .video-player-close {
        top: -40px;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .video-play-btn {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .video-control-btn {
        font-size: 1.1rem;
        min-width: 36px;
        min-height: 36px;
        padding: 6px;
    }

    .video-time {
        font-size: 0.85rem;
        min-width: 90px;
    }

    .video-volume-slider {
        width: 0;
    }

    .video-volume-container:hover .video-volume-slider {
        width: 60px;
    }

    .video-play-overlay-btn {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .video-controls-row {
        gap: 8px;
    }

    .video-player-controls {
        padding: 20px 16px 16px;
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .video-control-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .video-progress-container {
        height: 8px;
    }

    .video-progress-handle {
        transform: translateY(-50%) scale(1);
    }

    .video-volume-slider {
        width: 60px;
    }
}

/* Accessibility */
.video-control-btn:focus-visible {
    outline: 2px solid var(--player-primary);
    outline-offset: 2px;
}

.video-progress-container:focus-visible {
    outline: 2px solid var(--player-primary);
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Error State */
.video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--player-text);
    padding: 2rem;
}

.video-error-icon {
    font-size: 3rem;
    color: #EF4444;
    margin-bottom: 1rem;
}

.video-error-message {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.video-error-btn {
    background: linear-gradient(135deg, var(--player-primary), var(--player-secondary));
    color: var(--player-text);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-error-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 194, 255, 0.4);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.video-control-btn.pulsing {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
