/* ======================== CUSTOM STYLES ======================== */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Navbar styles */
#navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Screenshot tabs */
.ss-tab {
    background: white;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}
.ss-tab:hover {
    color: #4f46e5;
    border-color: #c7d2fe;
}
.ss-tab.active {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Module card expand animation */
.module-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
}

.module-card.expanded .module-details {
    display: block;
    max-height: 300px;
    opacity: 1;
    padding-top: 8px;
}

.module-card.expanded .module-chevron {
    transform: rotate(180deg);
}

/* Intersection Observer - Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Screenshot filter animation */
.screenshot-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.screenshot-item.hidden-filter {
    opacity: 0;
    transform: scale(0.9);
    position: absolute;
    pointer-events: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection color */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: #312e81;
}

/* Lightbox */
#lightbox {
    transition: opacity 0.3s ease;
}

#lightbox.show {
    display: flex;
    opacity: 1;
}

/* Feature card hover effects */
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card {
    position: relative;
}

.feature-card:hover::before {
    opacity: 1;
}

/* Mobile menu animation */
#mobileMenu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobileMenu.open {
    display: block;
    max-height: 400px;
    opacity: 1;
}

/* Gradient text animation on hover */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Pulse animation for live badge */
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-stats {
        display: none;
    }
    
    #hero h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 640px) {
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
}

/* Print styles */
@media print {
    nav, footer, #lightbox, .ss-tab {
        display: none !important;
    }
    
    body {
        color: black;
        background: white;
    }
    
    section {
        page-break-inside: avoid;
    }
}
