/* SMMBOXD PANEL - Mobile Optimization CSS */
/* Critical mobile-first optimizations for better performance */

/* Mobile-first base styles */
@media (max-width: 768px) {
    /* Reduce font sizes for mobile */
    html {
        font-size: 14px;
    }
    
    /* Optimize body for mobile */
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }
    
    /* Container optimizations */
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    /* Hero section mobile optimizations */
    .hero-section-new,
    .addfunds-hero,
    .services-hero {
        padding: 2rem 0;
        min-height: 70vh;
    }
    
    .hero-content-new,
    .hero-content-enhanced {
        padding: 1rem;
    }
    
    .hero-title-new,
    .hero-title-enhanced {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-description-new,
    .hero-description-enhanced {
        font-size: 1rem !important;
        margin-bottom: 2rem;
    }
    
    .hero-actions-new {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-new {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }
    
    /* Stats grid mobile */
    .stats-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card-new {
        padding: 1.5rem 1rem;
    }
    
    .stat-number-new {
        font-size: 1.8rem;
    }
    
    .stat-label-new {
        font-size: 0.8rem;
    }
    
    /* Content grid mobile */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Card optimizations */
    .card-enhanced {
        margin-bottom: 1.5rem;
    }
    
    .card-header-enhanced {
        padding: 1rem 1.5rem;
    }
    
    .card-body-enhanced {
        padding: 1.5rem;
    }
    
    .header-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .header-content h3 {
        font-size: 1.1rem;
    }
    
    .header-content p {
        font-size: 0.8rem;
    }
    
    /* Quick amounts mobile */
    .quick-amounts-enhanced {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .quick-amount-btn-enhanced {
        padding: 1rem 0.75rem;
    }
    
    .quick-amount-btn-enhanced .amount {
        font-size: 1rem;
    }
    
    .quick-amount-btn-enhanced .label {
        font-size: 0.7rem;
    }
    
    /* Form controls mobile */
    .form-control-enhanced {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .amount-input-group-enhanced {
        max-width: 100%;
    }
    
    /* Payment methods mobile */
    .payment-methods-enhanced {
        gap: 0.75rem;
    }
    
    .payment-method-enhanced {
        padding: 1rem;
    }
    
    .payment-method-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .payment-method-info {
        width: 100%;
    }
    
    .payment-logo-enhanced {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .payment-details h4 {
        font-size: 1rem;
    }
    
    .payment-details p {
        font-size: 0.8rem;
    }
    
    /* Balance display mobile */
    .balance-display-enhanced {
        margin-top: 1.5rem;
    }
    
    .balance-card {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .balance-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .balance-amount {
        font-size: 1.5rem;
    }
    
    /* Balance info mobile */
    .balance-info-enhanced {
        gap: 1rem;
    }
    
    .balance-current,
    .balance-after {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem 0;
    }
    
    .balance-actions-enhanced {
        gap: 0.75rem;
    }
    
    .btn-enhanced {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    
    /* Filters mobile */
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filters-header {
        padding: 1rem 1.5rem;
    }
    
    .filters-body {
        padding: 1.5rem;
    }
    
    .filters-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* Table mobile optimizations */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    
    .table-enhanced {
        font-size: 0.8rem;
    }
    
    .table-enhanced thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .table-enhanced tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .category-header-enhanced {
        padding: 1rem 0.75rem !important;
    }
    
    .category-info {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .category-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .category-details h4 {
        font-size: 1rem;
    }
    
    .service-count {
        font-size: 0.75rem;
    }
    
    .service-info h5 {
        font-size: 0.9rem;
    }
    
    .service-description {
        font-size: 0.75rem;
    }
    
    .service-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    .price-amount {
        font-size: 1rem;
    }
    
    .price-label {
        font-size: 0.7rem;
    }
    
    .min-badge,
    .max-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .btn-enhanced.btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    /* Header stats mobile */
    .header-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .stat-item {
        width: 100%;
        max-width: 200px;
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* No services mobile */
    .no-services {
        padding: 2rem 1rem;
    }
    
    .no-services-content i {
        font-size: 2rem;
    }
    
    .no-services-content h4 {
        font-size: 1rem;
    }
    
    .no-services-content p {
        font-size: 0.8rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-title-new,
    .hero-title-enhanced {
        font-size: 1.75rem !important;
    }
    
    .hero-description-new,
    .hero-description-enhanced {
        font-size: 0.9rem !important;
    }
    
    .stats-grid-new {
        grid-template-columns: 1fr;
    }
    
    .quick-amounts-enhanced {
        grid-template-columns: 1fr;
    }
    
    .card-header-enhanced {
        padding: 0.75rem 1rem;
    }
    
    .card-body-enhanced {
        padding: 1rem;
    }
    
    .header-content h3 {
        font-size: 1rem;
    }
    
    .header-content p {
        font-size: 0.75rem;
    }
    
    .table-enhanced {
        font-size: 0.75rem;
    }
    
    .table-enhanced thead th {
        padding: 0.5rem 0.25rem;
        font-size: 0.7rem;
    }
    
    .table-enhanced tbody td {
        padding: 0.5rem 0.25rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .btn-new:hover,
    .btn-enhanced:hover,
    .card-enhanced:hover,
    .stat-card-new:hover,
    .quick-amount-btn-enhanced:hover,
    .payment-method-enhanced:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Increase touch targets */
    .btn-new,
    .btn-enhanced {
        min-height: 44px;
        min-width: 44px;
    }
    
    .quick-amount-btn-enhanced {
        min-height: 60px;
    }
    
    .payment-method-enhanced {
        min-height: 80px;
    }
    
    /* Improve tap feedback */
    .btn-new:active,
    .btn-enhanced:active,
    .quick-amount-btn-enhanced:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    /* Reduce animations on mobile */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }
    
    /* Optimize images */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* Reduce shadows for better performance */
    .card-enhanced,
    .stat-card-new,
    .balance-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Simplify gradients */
    .hero-background-new,
    .hero-background-enhanced {
        background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    }
    
    .hero-pattern,
    .hero-glow {
        display: none;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section-new,
    .addfunds-hero,
    .services-hero {
        min-height: 50vh;
        padding: 1rem 0;
    }
    
    .hero-title-new,
    .hero-title-enhanced {
        font-size: 1.5rem !important;
    }
    
    .hero-description-new,
    .hero-description-enhanced {
        font-size: 0.9rem !important;
        margin-bottom: 1rem;
    }
    
    .stats-grid-new {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .stat-card-new {
        padding: 1rem 0.5rem;
    }
    
    .stat-number-new {
        font-size: 1.2rem;
    }
    
    .stat-label-new {
        font-size: 0.7rem;
    }
}

/* Signup Page Mobile Optimizations */
@media (max-width: 768px) {
    /* Signup form mobile optimizations */
    .signup-container-ultra {
        padding: 30px 20px !important;
        margin: 0 15px !important;
        max-width: none !important;
        border-radius: 20px !important;
    }
    
    .signup-title-ultra {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }
    
    .signup-subtitle-ultra {
        font-size: 0.9rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .signup-logo-ultra {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Form inputs mobile optimization */
    .input-ultra {
        padding: 12px 16px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
        border-radius: 8px !important;
        min-height: 48px !important; /* Better touch target */
    }
    
    .input-ultra:focus {
        border-color: #00D4AA !important;
        box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1) !important;
    }
    
    /* Password toggle buttons mobile optimization */
    .password-toggle-ultra {
        right: 12px !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        transition: all 0.2s ease !important;
    }
    
    .password-toggle-ultra:active {
        transform: scale(0.95) !important;
        background: rgba(0, 212, 170, 0.2) !important;
    }
    
    /* Checkbox mobile optimization */
    .checkbox-ultra {
        padding: 12px 0 !important;
        margin: 15px 0 !important;
    }
    
    .checkmark-ultra {
        width: 24px !important;
        height: 24px !important;
        border-radius: 6px !important;
        margin-top: 0 !important;
    }
    
    .checkbox-text-ultra {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        padding-left: 8px !important;
    }
    
    /* Submit button mobile optimization */
    .btn-ultra-primary {
        padding: 14px 24px !important;
        font-size: 16px !important;
        min-height: 48px !important;
        border-radius: 8px !important;
        margin-top: 20px !important;
    }
    
    .btn-ultra-primary:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* Password strength indicator mobile */
    .password-strength-ultra {
        margin-top: 8px !important;
    }
    
    .strength-bar-ultra {
        height: 3px !important;
        border-radius: 2px !important;
    }
    
    .strength-text-ultra {
        font-size: 0.8rem !important;
        margin-top: 4px !important;
    }
    
    /* Password match indicator mobile */
    .password-match-ultra {
        margin-top: 8px !important;
        font-size: 0.8rem !important;
    }
    
    /* Form groups mobile spacing */
    .form-group-ultra {
        margin-bottom: 20px !important;
    }
    
    /* Features section mobile */
    .features-grid-ultra {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 15px !important;
    }
    
    .feature-item-ultra {
        padding: 20px 15px !important;
        border-radius: 15px !important;
    }
    
    .feature-icon-ultra {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
        margin-bottom: 15px !important;
    }
    
    .feature-item-ultra h4 {
        font-size: 1.1rem !important;
        margin-bottom: 8px !important;
    }
    
    .feature-item-ultra p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    /* Alert messages mobile */
    .signup-alert-ultra {
        padding: 12px 16px !important;
        border-radius: 10px !important;
        margin-bottom: 20px !important;
        font-size: 0.9rem !important;
    }
    
    /* Content card mobile */
    .signup-content-card-ultra {
        padding: 25px 20px !important;
        margin: 0 15px !important;
        border-radius: 15px !important;
    }
    
    /* Form footer mobile */
    .form-footer-ultra {
        margin-top: 25px !important;
        padding-top: 20px !important;
    }
    
    .form-footer-ultra p {
        font-size: 0.9rem !important;
    }
    
    .login-link-ultra {
        font-size: 0.9rem !important;
        padding: 8px 12px !important;
        border-radius: 6px !important;
        display: inline-block !important;
        margin-top: 8px !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .signup-container-ultra {
        padding: 25px 15px !important;
        margin: 0 10px !important;
    }
    
    .signup-title-ultra {
        font-size: 1.6rem !important;
    }
    
    .signup-subtitle-ultra {
        font-size: 0.85rem !important;
    }
    
    .signup-logo-ultra {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.3rem !important;
    }
    
    .input-ultra {
        padding: 10px 14px !important;
        font-size: 16px !important;
        min-height: 44px !important;
    }
    
    .password-toggle-ultra {
        right: 10px !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    .btn-ultra-primary {
        padding: 12px 20px !important;
        font-size: 15px !important;
        min-height: 44px !important;
    }
    
    .feature-item-ultra {
        padding: 15px 12px !important;
    }
    
    .feature-icon-ultra {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.1rem !important;
    }
}

/* Touch device specific optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .signup-container-ultra:hover,
    .feature-item-ultra:hover,
    .btn-ultra-primary:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Add touch feedback */
    .btn-ultra-primary:active,
    .password-toggle-ultra:active,
    .checkbox-ultra:active {
        transform: scale(0.95) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* Improve touch targets */
    .password-toggle-ultra {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    .checkbox-ultra {
        min-height: 44px !important;
    }
    
    .login-link-ultra {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .header-icon,
    .filters-icon,
    .table-icon,
    .category-icon,
    .balance-icon,
    .payment-logo-enhanced,
    .signup-logo-ultra,
    .feature-icon-ultra {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-pattern,
    .hero-glow {
        display: none;
    }
    
    .btn-new:hover,
    .btn-enhanced:hover,
    .card-enhanced:hover,
    .stat-card-new:hover {
        transform: none;
    }
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    /* Ensure proper contrast in dark mode */
    .form-control-enhanced {
        background: rgba(15, 23, 42, 0.9);
        border-color: rgba(71, 85, 105, 0.5);
    }
    
    .form-control-enhanced:focus {
        border-color: #10B981;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    }
}
