/* Enhanced Video Player Styles */
:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --secondary: #1f2937;
    --accent: #f59e0b;
    --text-light: #f3f4f6;
    --text-gray: #9ca3af;
    --bg-dark: #111827;
    --bg-lighter: #1f2937;
    --border-gray: #374151;
}

/* Video Carousel Container */
.video-carousel-container {
    position: relative;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

/* Video Slide Animations */
.video-slide {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.video-slide.entering {
    animation: slideInFromRight 0.7s ease-out forwards;
}

.video-slide.exiting {
    animation: slideOutToLeft 0.7s ease-out forwards;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(-100px) scale(0.95);
    }
}

/* Enhanced Play Button */
.play-button {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: 3px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.3);
}

.play-button:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 20px 40px rgba(34, 197, 94, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.play-button:active {
    transform: scale(1.05) rotate(2deg);
}

/* YouTube Play Button */
.youtube-play-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

.youtube-play-btn:hover {
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.4);
}

/* Video Type Badges */
.video-type-badge {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    letter-spacing: 0.025em;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.badge-upload {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.badge-youtube {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Video Content Area */
.video-content-area {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-left: 2px solid var(--border-gray);
}

.content-slide {
    animation: fadeInSlide 0.6s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Bar Enhancement */
.progress-bar {
    background: rgba(55, 65, 81, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 8px;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Next Video Preview */
.next-video-preview {
    border-top: 1px solid rgba(55, 65, 81, 0.5);
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.next-video-preview:hover {
    background: rgba(17, 24, 39, 0.9);
    border-top-color: var(--primary);
}

.next-preview-thumbnail {
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.next-preview-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Navigation Arrows */
.nav-arrow {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.nav-arrow:active {
    transform: scale(0.95);
}

/* Video Modal Enhancements */
.video-modal {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
}

.modal-video {
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.5);
    transform: scale(1.1);
}

/* Swipe Instructions */
.swipe-instructions {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.7;
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
    }
}

/* Loading State */
.video-loading {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Video Quality Indicator */
.quality-indicator {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Video Thumbnail Enhancement */
.video-thumbnail {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9) contrast(1.1);
}

.video-thumbnail:hover {
    filter: brightness(1) contrast(1.2);
    transform: scale(1.02);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .video-carousel-container {
        height: 300px !important;
    }
    
    .play-button {
        padding: 1rem !important;
    }
    
    .play-button i {
        font-size: 1.5rem !important;
    }
    
    .nav-arrow {
        display: none !important;
    }
    
    .swipe-instructions {
        display: block !important;
    }
    
    .video-content-area {
        padding: 1.5rem !important;
    }
}

/* Accessibility Improvements */
.play-button:focus,
.nav-arrow:focus,
.modal-close:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .video-type-badge {
        border-width: 2px;
        border-color: white;
    }
    
    .play-button {
        border-width: 3px;
        border-color: white;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .video-slide,
    .play-button,
    .content-slide,
    .progress-fill,
    .modal-video {
        transition: none;
        animation: none;
    }
    
    .swipe-instructions {
        animation: none;
    }
}

/* ===== REEL STYLES ===== */

/* Reel card styles */
.reel-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(55, 65, 81, 0.3);
}

.reel-card:hover {
    box-shadow: 0 25px 50px rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.3);
}

/* Reel play button effects */
.reel-play-btn {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.reel-play-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3), 0 0 60px rgba(34, 197, 94, 0.2);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.reel-play-btn:active {
    transform: scale(1.05);
}

/* Line clamp utility for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Reel modal styles */
#reel-modal {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: reelModalFadeIn 0.3s ease-out;
    z-index: 9999;
}

@keyframes reelModalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

#reel-modal-video {
    animation: reelVideoSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

@keyframes reelVideoSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Mobile responsiveness for reels */
@media (max-width: 768px) {
    .reel-card {
        aspect-ratio: 9/16;
        margin: 0 auto;
    }
    
    #reel-modal-video {
        height: 100vh;
        max-height: 100vh;
        width: 100vw;
        object-fit: cover;
    }
    
    #reel-modal .max-w-md {
        max-width: 100vw;
    }
}

/* Hover effects for reel videos */
.reel-card video {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9);
}

.reel-card:hover video {
    transform: scale(1.1);
    filter: brightness(1);
}

/* Gradient overlays for better text readability */
.reel-card .bg-gradient-to-t {
    transition: background 0.5s ease;
}

.reel-card:hover .bg-gradient-to-t {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent, rgba(0, 0, 0, 0.2)) !important;
}

/* Badge styles for reel type indicators */
.reel-card .bg-gradient-to-r {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Smooth transitions for all reel interactive elements */
.reel-card button,
.reel-card .bg-gradient-to-r,
.reel-card span {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reel card content positioning */
.reel-card .absolute.bottom-0 {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Reel modal close button */
#reel-modal button {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#reel-modal button:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: scale(1.1);
}

/* Reel info overlay in modal */
#reel-modal-info {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Animation for reel cards on load */
.reel-card {
    animation: reelCardFadeIn 0.6s ease-out;
}

@keyframes reelCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Stagger animation for multiple reel cards */
.reel-card:nth-child(1) { animation-delay: 0.1s; }
.reel-card:nth-child(2) { animation-delay: 0.2s; }
.reel-card:nth-child(3) { animation-delay: 0.3s; }
.reel-card:nth-child(4) { animation-delay: 0.4s; }
.reel-card:nth-child(5) { animation-delay: 0.5s; }
.reel-card:nth-child(6) { animation-delay: 0.6s; } 