/* Custom CSS for MobileRecharge.digital */

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Custom Button Styles */
.btn-primary {
    background-color: #2563eb;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #1e40af;
    transform: scale(1.05);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: #f97316;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: #ea580c;
    transform: scale(1.05);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* Form Styles */
.form-section {
    position: relative;
    z-index: 10;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(249, 115, 22, 0.05) 100%);
    z-index: -1;
}

/* Operator Selection Buttons */
.operator-btn {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    position: relative;
}

.operator-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.operator-btn.selected {
    border-color: #2563eb !important;
    background-color: #eff6ff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

/* Amount Selection Buttons */
.amount-btn {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    position: relative;
}

.amount-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.amount-btn.selected {
    border-color: #2563eb !important;
    background-color: #eff6ff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

/* Form validation styles */
.form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Spinner animation */
.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form button improvements */
#next-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#next-btn:not(:disabled):hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

#next-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}

/* Mobile menu improvements */
@media (max-width: 768px) {
    #mobile-menu {
        transition: all 0.3s ease;
        max-height: 0;
        overflow: hidden;
    }
    
    #mobile-menu.show {
        max-height: 300px;
    }
    
    #mobile-menu-btn {
        transition: all 0.3s ease;
    }
    
    #mobile-menu-btn:hover {
        transform: scale(1.1);
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .operator-btn, .amount-btn {
        -webkit-tap-highlight-color: transparent;
    }
    
    .operator-btn:active, .amount-btn:active {
        transform: scale(0.98);
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .operator-btn, .amount-btn {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Mobile form improvements */
    .form-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .form-section .max-w-2xl {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    /* Mobile grid adjustments */
    .operator-btn, .amount-btn {
        min-height: 80px;
    }
}

/* Large screen improvements */
@media (min-width: 1024px) {
    .form-section .max-w-2xl {
        max-width: 42rem;
    }
    
    .operator-btn, .amount-btn {
        min-height: 100px;
        transition: all 0.3s ease;
    }
    
    .operator-btn:hover, .amount-btn:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    }
    
    /* Large screen form improvements */
    .form-section {
        padding: 4rem 0;
    }
    
    .form-section .bg-white {
        padding: 2rem;
    }
}

/* Extra large screen improvements */
@media (min-width: 1280px) {
    .form-section .max-w-2xl {
        max-width: 48rem;
    }
    
    .operator-btn, .amount-btn {
        min-height: 120px;
    }
    
    /* Better spacing on large screens */
    .form-section .space-y-6 > div {
        margin-bottom: 2rem;
    }
}

/* High resolution display improvements */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .operator-btn img, .amount-btn img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
