/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* Gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Video container */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Card hover effects */
.tutorial-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.tutorial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.tutorial-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.play-button {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #3b82f6;
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

/* Progress indicators */
.progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(#3b82f6 0deg 180deg, #e5e7eb 180deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle::before {
    content: '';
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    position: absolute;
}

.progress-text {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 600;
    color: #3b82f6;
}

/* Category filters */
.category-filter {
    transition: all 0.3s ease;
}

.category-filter.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    transform: scale(1.05);
}

/* Mobile navigation */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
}

.mobile-menu .relative {
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
}

.mobile-menu:not(.active) .relative {
    transform: translateX(-100%);
}

/* Sticky header */
.sticky-header {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .video-container {
        border-radius: 12px;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
}

/* Full screen video modal styles */
#videoModal:fullscreen {
    background: black;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#videoModal:-webkit-full-screen {
    background: black;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#videoModal:-moz-full-screen {
    background: black;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#videoModal:-ms-fullscreen {
    background: black;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#videoModal:fullscreen .video-container,
#videoModal:-webkit-full-screen .video-container,
#videoModal:-moz-full-screen .video-container,
#videoModal:-ms-fullscreen .video-container {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    padding-bottom: 0;
}

#videoModal:fullscreen video,
#videoModal:-webkit-full-screen video,
#videoModal:-moz-full-screen video,
#videoModal:-ms-fullscreen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
