/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

/* Card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
    transform: translateY(-4px);
}

/* Tab indicator */
.tab-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    transition: all 0.3s ease;
}

/* Progress bar */
#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Fixed header with slide effect */
header.sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    width: 100% !important;
    transition: transform 0.3s ease-in-out !important;
}

header.sticky.hide {
    transform: translateY(-100%);
}

/* Modern sidebar navigation */
#sidebar {
    transition: all 0.3s ease;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

#sidebar::-webkit-scrollbar {
    width: 4px;
}

#sidebar::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 4px;
}

#sidebar.scroll-up {
    top: 100px;
}

/* Modern navigation item styles */
.nav-item {
    position: relative;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 2px 0;
}

.nav-item:hover {
    background: #f9fafb;
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-item.active .nav-text {
    color: white;
}

.nav-item.active span:first-child {
    filter: brightness(1.2);
}

/* Add padding to main content */
main {
    transition: padding-top 0.3s ease;
}


/* Screenshot container styles */
.screenshot-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 2px;
    border-radius: 0.5rem;
    margin: 2rem 0;
}
.screenshot-container img {
    background: white;
    display: block;
    width: 100%;
    height: auto;
}
.screenshot-container:hover img {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Enhanced screenshot styles */
.screenshot-wrapper {
    position: relative;
    margin: 2rem 0;
    animation: slide-up 0.6s ease-out;
}

.screenshot-wrapper img {
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.screenshot-wrapper img:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 35px -5px rgb(0 0 0 / 0.15), 0 12px 15px -8px rgb(0 0 0 / 0.15);
}

/* Floating animation for screenshots */
@keyframes float-subtle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.group:hover img {
    animation: float-subtle 3s ease-in-out infinite;
}

/* Loading skeleton for images */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Image loading animation */
@keyframes imageLoad {
    from {
        opacity: 0;
        filter: blur(5px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* Zoom on click */
.screenshot-zoom {
    cursor: zoom-in;
}

.screenshot-zoom.zoomed {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    z-index: 9999;
    cursor: zoom-out;
    max-width: 90vw;
    max-height: 90vh;
}

/* Dark overlay when zoomed */
.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    display: none;
}

.zoom-overlay.active {
    display: block;
}

/* Responsive images */
@media (max-width: 768px) {
    .screenshot-wrapper img {
        border-radius: 0.5rem;
    }
    
    .screenshot-zoom.zoomed {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Print styles */
@media print {
    .screenshot-wrapper {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .screenshot-wrapper img {
        max-width: 100%;
        box-shadow: none;
    }
    
    .group:hover img {
        animation: none;
    }
    
    img {
        max-width: 100%;
        page-break-inside: avoid;
        break-inside: avoid;
    }
}