/* Top Up Balance Modal */
.topup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.topup-modal.active {
    display: flex;
}

.topup-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.topup-modal-content {
    background: rgba(12, 12, 18, 0.98);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 24px;
    width: 90%;
    max-width: 520px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.3);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.topup-modal-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topup-modal-title {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #f8fafc 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topup-modal-close {
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.topup-modal-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.topup-modal-close svg {
    width: 20px;
    height: 20px;
}

.topup-modal-body {
    padding: 32px;
}

.topup-section {
    margin-bottom: 32px;
}

.topup-section:last-child {
    margin-bottom: 0;
}

.topup-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

/* Amount Selection */
.topup-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.topup-amount-btn {
    padding: 16px;
    background: rgba(16, 16, 24, 0.6);
    border: 2px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.topup-amount-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.topup-amount-btn:hover {
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

.topup-amount-btn:hover::before {
    opacity: 1;
}

.topup-amount-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-color: #7c3aed;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.topup-amount-btn.active::before {
    opacity: 0;
}

/* Custom Amount Input */
.topup-custom-amount {
    position: relative;
}

.topup-custom-amount input {
    width: 100%;
    padding: 16px 20px 16px 40px;
    background: rgba(16, 16, 24, 0.6);
    border: 2px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: all 0.3s;
}

.topup-custom-amount input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.topup-custom-amount::before {
    content: '$';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    font-weight: 700;
}

/* Payment Methods */
.topup-payment-methods {
    display: grid;
    gap: 12px;
}

.topup-payment-method {
    padding: 20px;
    background: rgba(16, 16, 24, 0.6);
    border: 2px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 16px;
}

.topup-payment-method:hover {
    border-color: #7c3aed;
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

.topup-payment-method.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(124, 58, 237, 0.05) 100%);
    border-color: #7c3aed;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

.topup-payment-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topup-payment-icon svg {
    width: 24px;
    height: 24px;
    color: #a78bfa;
}

.topup-payment-info {
    flex: 1;
}

.topup-payment-name {
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 4px;
}

.topup-payment-desc {
    font-size: 13px;
    color: #64748b;
}

.topup-payment-check {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(124, 58, 237, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.topup-payment-method.active .topup-payment-check {
    background: #7c3aed;
    border-color: #7c3aed;
}

.topup-payment-check svg {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
}

.topup-payment-method.active .topup-payment-check svg {
    opacity: 1;
}

/* Modal Footer */
.topup-modal-footer {
    padding: 24px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.topup-summary {
    padding: 20px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topup-summary-label {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 600;
}

.topup-summary-amount {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topup-submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.topup-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5);
}

.topup-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.topup-submit-btn svg {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .topup-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .topup-modal-content {
        max-width: 100%;
    }
    
    .topup-modal-header,
    .topup-modal-body,
    .topup-modal-footer {
        padding: 24px 20px;
    }
}
