/* Production CSS Optimizations - FINAL POLISH */

/* Enhanced Browser Support with Vendor Prefixes */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Optimized Transitions with Vendor Prefixes */
.nav-link,
.btn,
.card,
.social-btn,
.gaming-icon {
    -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -moz-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -o-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Transform Support */
.nav-link:hover,
.btn:hover,
.card:hover {
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    -o-transform: translateY(-2px);
    transform: translateY(-2px);
}

/* Optimized Animation Performance */
@-webkit-keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translate3d(0, 40px, 0);
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translate3d(0, 40px, 0);
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

/* Hardware Acceleration for Smooth Animations */
.hero-section,
.category-card,
.gaming-icon,
.nav-link {
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* Optimized Font Rendering */
body,
h1, h2, h3, h4, h5, h6 {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Enhanced Focus Styles for Accessibility */
button:focus,
.nav-link:focus,
input:focus,
textarea:focus {
    outline: 2px solid #8b0000;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.2);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .nav-link,
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {
    *,
    *:before,
    *:after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .navbar,
    .footer,
    .btn,
    .social-btn {
        display: none !important;
    }
    
    .hero-content h1 {
        font-size: 24pt !important;
    }
}

/* Performance Optimizations */
img {
    max-width: 100%;
    height: auto;
}

/* Lazy Loading Enhancement */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* Critical CSS Inlining Prevention */
.below-fold {
    content-visibility: auto;
    contain-intrinsic-size: 300px;
}

/* Fix for Safari iOS */
@media only screen and (max-device-width: 1024px) {
    body {
        -webkit-text-size-adjust: none;
    }
}

/* Enhanced Mobile Experience */
@media (max-width: 768px) {
    /* Improved touch targets */
    .nav-link,
    .btn,
    .social-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }
    
    /* Optimized scrolling */
    .hero-section,
    .category-grid {
        -webkit-overflow-scrolling: touch;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #ffffff;
        --accent-color: #8b0000;
    }
}

/* Performance Monitoring Styles */
.perf-monitor {
    display: none;
}

/* Production Only - Remove Debug Styles */
.debug,
.test-only {
    display: none !important;
}
