* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.header {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    text-align: center;
    padding: 20px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.recharge-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.mobile-input {
    display: flex;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.mobile-input:focus-within {
    border-color: #667eea;
}

.country-code {
    background: #f8f9fa;
    padding: 12px 15px;
    border-right: 1px solid #e1e8ed;
    font-weight: 600;
    color: #666;
}

input[type="tel"] {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 16px;
}

select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    outline: none;
    transition: border-color 0.3s;
}

select:focus {
    border-color: #667eea;
}

.plan-options {
    display: flex;
    gap: 15px;
}

.plan-card {
    flex: 1;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.plan-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.plan-data {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.plan-validity {
    font-size: 12px;
    opacity: 0.8;
}

.recharge-btn {
    width: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.recharge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.recharge-btn:active {
    transform: translateY(0);
}

.selected-plan {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #e1e8ed;
}

.selected-plan h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

#plan-details p {
    margin-bottom: 8px;
    color: #666;
}

#plan-details span {
    color: #333;
    font-weight: 600;
}

@media (max-width: 480px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .plan-options {
        flex-direction: column;
    }
    
    .recharge-form {
        padding: 20px;
    }
}
/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.recharge-btn, .plan-card {
    position: relative;
    overflow: hidden;
}

/* Loading state */
.recharge-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Success animation */
@keyframes success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-animation {
    animation: success-pulse 0.3s ease-in-out;
}
/* Success Page Styles */
.success-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.success-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: success-bounce 0.6s ease-out;
}

@keyframes success-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-content h2 {
    color: #28a745;
    margin-bottom: 25px;
    font-size: 28px;
}

#rechargeDetails {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: left;
}

#rechargeDetails p {
    margin-bottom: 10px;
    color: #333;
}

#rechargeDetails strong {
    color: #28a745;
}

.back-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Mobile responsive for camera */
@media (max-width: 480px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 15px;
    }
    
    .camera-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .capture-btn, .cancel-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .success-content {
        padding: 30px 20px;
    }
    
    .success-icon {
        font-size: 60px;
    }
    
    .success-content h2 {
        font-size: 24px;
    }
}
/* Failure Page Styles */
.failure-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.failure-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.failure-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: failure-shake 0.6s ease-out;
}

@keyframes failure-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.failure-content h2 {
    color: #dc3545;
    margin-bottom: 25px;
    font-size: 28px;
}

#failureMessage {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #f5c6cb;
}

#failureMessage p {
    margin-bottom: 10px;
    line-height: 1.5;
}

#failureMessage strong {
    color: #dc3545;
}
.refresh-info {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #ffeaa7;
}

.refresh-info p {
    margin: 0;
    font-weight: 600;
}

#countdown {
    color: #dc3545;
    font-weight: bold;
    font-size: 18px;
}

.refresh-btn {
    background: linear-gradient(45deg, #28a745, #20c997) !important;
}

.refresh-btn:hover {
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4) !important;
}