/* Custom CSS for GG AI Doodle Website */

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

/* Lazy Loading Styles */
.lazy-image {
    transition: opacity 0.3s ease-in-out;
}

.lazy-image.loaded {
    opacity: 1 !important;
}

.skeleton-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    transition: opacity 0.3s ease-in-out;
}

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

.image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

/* Video Loading Styles */
.video-container {
    position: relative;
    background: #f8f9fa;
}

.video-placeholder {
    transition: all 0.3s ease-in-out;
}

.video-load-btn {
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.3s ease-in-out;
}

.video-load-btn:hover {
    transform: scale(1.05);
}

.lazy-video {
    background: #000;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%);
}

/* Navigation active state */
nav a.active {
    color: #7c3aed;
    font-weight: 600;
}

/* Hero section animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-float {
    animation: float 6s ease-in-out infinite;
}

/* Feature cards hover effect */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Gradient text animation */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Video player custom styling */
video {
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

video::-webkit-media-controls-panel {
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* Mobile menu animation */
.mobile-menu-enter {
    transform: translateX(100%);
}

.mobile-menu-enter-active {
    transform: translateX(0);
    transition: transform 0.3s ease-out;
}

.mobile-menu-exit {
    transform: translateX(0);
}

.mobile-menu-exit-active {
    transform: translateX(100%);
    transition: transform 0.3s ease-in;
}

/* Download buttons hover effect */
.download-btn {
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.download-btn:hover::before {
    left: 100%;
}

/* Art style icons animation */
.art-icon {
    transition: all 0.3s ease;
}

.art-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Loading skeleton */
.skeleton {
    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; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .art-styles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }

    .bg-gray-50 {
        background-color: #2d2d2d;
    }

    .bg-white {
        background-color: #2d2d2d;
    }

    .text-gray-800 {
        color: #ffffff;
    }

    .text-gray-600 {
        color: #b0b0b0;
    }
}

/* Print styles */
@media print {
    nav, .mobile-menu, .download-section, footer {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
button:focus,
a:focus {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gradient-text {
        background: none;
        color: #000;
    }

    .feature-card {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Custom utilities */
.gradient-border {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea, #764ba2) border-box;
    border: 2px solid transparent;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Loading progress bar animations */
.loading-progress {
    background: linear-gradient(90deg, #7c3aed, #ec4899, #7c3aed);
    background-size: 200% 100%;
    animation: loading-shimmer 2s ease-in-out infinite;
}

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

/* Enhanced loading states */
.loading-complete {
    animation: loading-complete 0.5s ease-out;
}

@keyframes loading-complete {
    0% { transform: scaleX(1); }
    50% { transform: scaleX(1.02); }
    100% { transform: scaleX(1); }
}