/* ========================================
   Feature Movie Component Styles
   Essential styles that complement Tailwind
   ======================================== */

/* Font family - keeping for consistency */
* {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Hide scrollbar but allow scrolling */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Enable smooth scrolling */
.smooth-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Desktop custom scrollbar - only visible on hover */
@media (min-width: 1024px) {
    .custom-scrollbar {
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
    }

    .custom-scrollbar::-webkit-scrollbar {
        width: 6px;
    }

    .custom-scrollbar::-webkit-scrollbar-track {
        background: transparent;
    }

    .custom-scrollbar::-webkit-scrollbar-thumb {
        background: transparent;
        border-radius: 100px;
    }

    .custom-scrollbar:hover::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
    }

    .custom-scrollbar:hover::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
    }

    @media (prefers-color-scheme: dark) {
        .custom-scrollbar:hover::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
        }

        .custom-scrollbar:hover::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
        }
    }
}

/* Video wrapper styles */
.video-wrapper {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25);
}

/* Timeline styles for desktop */
.timeline-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 0 20px;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-wrapper:hover .timeline-container {
    opacity: 1;
}

/* Mobile timeline always visible */
.mobile-timeline {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6) 50%, transparent);
    padding: 20px 12px 12px;
}

/* Timeline bar and progress */
.timeline-bar {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    flex: 1;
    cursor: pointer;
    margin: 0 16px;
}

.timeline-progress {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6 0%, #8B5CF6 100%);
    border-radius: 2px;
    position: relative;
    transition: width 100ms linear;
}

.timeline-progress::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -3px;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mobile timeline progress */
.mobile-timeline-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.mobile-timeline-fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6 0%, #8B5CF6 100%);
    border-radius: 2px;
    position: relative;
    transition: width 100ms linear;
}

.mobile-timeline-fill::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -2px;
    width: 7px;
    height: 7px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Chapter markers */
.chapter-marker {
    position: absolute;
    top: -2px;
    width: 2px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1px;
    pointer-events: none;
}

.mobile-chapter-marker {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

/* Control buttons */
.control-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Chapter indicator */
.chapter-indicator {
    position: absolute;
    top: 16px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.chapter-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

/* Center play button */
.center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.center-play-btn.show {
    opacity: 1;
}

.center-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(0, 0, 0, 0.8);
}

/* Fullscreen styles */
.fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fullscreen-btn:hover svg {
    transform: scale(1.1);
}

/* Fullscreen video containers */
.video-wrapper.fullscreen-active,
.mobile-video-container.fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
    background: black !important;
}

.fullscreen-active video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Fullscreen controls */
.fullscreen-active .timeline-container,
.fullscreen-active .mobile-timeline {
    opacity: 1 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10000 !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7) 50%, transparent) !important;
    padding: 30px 20px 20px !important;
}

.fullscreen-active .chapter-indicator {
    position: fixed !important;
    z-index: 10001 !important;
}

/* Exit fullscreen hint */
.fullscreen-hint {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10002;
    backdrop-filter: blur(10px);
}

.fullscreen-hint.show {
    opacity: 1;
}

/* Fullscreen mobile specific */
.fullscreen-active .center-play-btn {
    width: 80px !important;
    height: 80px !important;
    z-index: 10001 !important;
}

/* Larger controls in fullscreen */
.fullscreen-active .control-btn {
    width: 40px;
    height: 40px;
}

.fullscreen-active .control-btn svg {
    width: 20px;
    height: 20px;
}

/* Chapter progress bar animation */
.chapter-progress {
    animation: fillProgress linear;
}

@keyframes fillProgress {
    from { width: 0%; }
    to { width: 100%; }
}