
/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    /* Disable heavy animations on mobile */
    *, *::before, *::after {
        animation-duration: 0.2s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.2s !important;
        scroll-behavior: smooth !important;
    }
    
    /* Optimize images for mobile */
    img {
        max-width: 100%;
        height: auto;
        image-rendering: optimizeSpeed;
    }
    
    /* Reduce background complexity */
    .bg-animation, 
    .floating-elements,
    .floating-orb {
        display: none !important;
    }
    
    /* Simplify gradients */
    .login-card::before,
    .signup-card::before,
    .premium-login-form::before {
        background: none !important;
    }
    
    /* Optimize text rendering */
    body {
        text-rendering: optimizeSpeed;
        -webkit-font-smoothing: subpixel-antialiased;
        -moz-osx-font-smoothing: auto;
    }
    
    /* Keep essential transforms but reduce complexity */
    .submit-btn:hover,
    .method-btn:hover {
        transform: translateY(-1px) !important;
    }
    
    .form-input:focus {
        transform: none !important;
    }
    
    /* Optimize box shadows - keep minimal ones */
    .login-card,
    .signup-card {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    }
    
    .form-input:focus {
        box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.3) !important;
    }
    
    /* Optimize backdrop filters */
    .navbar {
        backdrop-filter: blur(10px) !important;
    }
    
    .login-card,
    .signup-card {
        backdrop-filter: blur(5px) !important;
    }
    
    /* Optimize viewport settings */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* Touch improvements */
    input, button, select, textarea {
        touch-action: manipulation;
    }
    
    /* Prevent zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea {
        font-size: 16px !important;
    }
}

/* Reduce motion for users who prefer it */
@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;
    }
}

/* Mobile memory optimization */
@media (max-width: 768px) {
    /* Limit complex selectors */
    .premium-stats-showcase,
    .premium-features-showcase,
    .live-stats-grid {
        will-change: auto !important;
    }
    
    /* Optimize grid layouts */
    .live-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    /* Reduce padding and margins */
    .signup-card,
    .login-card {
        padding: 1.5rem !important;
        margin: 0.5rem !important;
    }
}
