/* Estilos base para todos los tokens */
.gainovo-card {
    background: transparent;
    padding: 20px;
    margin: 10px 0;
}

.gainovo-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.gainovo-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Colores específicos para cada tipo de botón */
.deposit-btn {
    background: #4CAF50;
    color: white;
}

.withdraw-btn {
    background: #f44336;
    color: white;
}

.metamask-btn {
    background: #f6851b;
    color: white;
}

.contract-btn {
    background: #3498db;
    color: white;
}

.gainovo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    filter: brightness(1.1);
}

.gainovo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Modales */
.gainovo-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

/* Forzar centrado cuando jQuery muestra el modal */
.gainovo-modal[style*="display: block"] {
    display: flex !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gainovo-modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.qr-warning, .withdraw-warning {
    background: #fff3cd;
    color: #856404;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    border-left: 4px solid #ffc107;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 10px;
}

.wallet-address-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    word-break: break-all;
    border: 1px solid #e0e0e0;
}

.wallet-address-text {
    font-family: monospace;
    font-size: 14px;
    color: #333;
    flex: 1;
    margin-right: 10px;
}

.copy-address-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.copy-address-btn:hover {
    background: #e0e0e0;
}

.gainovo-form-group {
    margin-bottom: 20px;
}

.gainovo-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
    font-size: 14px;
}

.gainovo-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.3s ease;
}

.gainovo-form-group input:focus {
    outline: none;
    border-color: #28A977;
    box-shadow: 0 0 0 3px rgba(40, 169, 119, 0.1);
}

/* Contenedor para input y botón MÁX */
.amount-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.amount-input-container input {
    flex: 1;
}

.max-amount-btn {
    background: #4a5568;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
}

.max-amount-btn:hover {
    background: #2d3748;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

.gainovo-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.secondary-btn {
    background: #6c757d;
    color: white;
}

.primary-btn {
    background: #28A977;
    color: white;
}

.primary-btn:hover {
    background: #0F5C3F;
}

/* Botón CERRAR - específico para modales */
.gainovo-modal .close-btn {
    background: #f0f0f0;
    color: #333;
    width: 100%;
    margin-top: 10px;
    font-weight: 600;
    border: 1px solid #ddd;
}

.gainovo-modal .close-btn:hover {
    background: #e0e0e0;
    color: #000;
}

.modal-title {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    flex: 1;
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.toggle-password:hover {
    background: #f0f0f0;
}

.status-message {
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    font-weight: 500;
}

.status-processing {
    background: #cce5ff;
    color: #004085;
    border-left: 4px solid #007bff;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.balance-display {
    font-size: 20px;
    font-weight: bold;
    color: #28a745;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

/* Estilos para el modal de código 2FA */
.codigo-2fa-modal .modal-title {
    color: #0F5C3F;
    font-size: 24px;
    margin-bottom: 10px;
}

.codigo-input {
    width: 100%;
    padding: 15px;
    font-size: 28px;
    text-align: center;
    letter-spacing: 10px;
    border: 2px solid #28A977;
    border-radius: 12px;
    outline: none;
    font-family: monospace;
    font-weight: bold;
    background: #f8fafc;
}

.codigo-input:focus {
    border-color: #0F5C3F;
    box-shadow: 0 0 0 3px rgba(40, 169, 119, 0.2);
}

.codigo-input:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

.confirm-2fa-btn, .cancel-2fa-btn {
    min-width: 120px;
}

/* Animación para el código */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.codigo-input:not(:placeholder-shown) {
    animation: pulse 0.3s ease;
    border-color: #28A977;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .gainovo-buttons {
        flex-direction: column;
    }
    
    .gainovo-btn {
        width: 100%;
    }
    
    .gainovo-modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .amount-input-container {
        flex-direction: column;
    }
    
    .max-amount-btn {
        width: 100%;
    }
    
    .codigo-input {
        font-size: 24px;
        letter-spacing: 6px;
        padding: 12px;
    }
}

/* Modal de retiro pendiente */
.pending-withdraw-modal .gainovo-modal-content {
    max-width: 450px;
}

.pending-info {
    text-align: center;
    padding: 20px 0;
}

.pending-info svg {
    margin-bottom: 15px;
}

.pending-info p {
    margin: 10px 0;
    color: #666;
}

#pending-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-size: 14px;
    text-align: left;
}

#pending-details code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

#pending-timer {
    font-size: 14px;
    color: #e67e22;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Botón reenviar código */
.resend-code-btn {
    background: #f39c12 !important;
}

.resend-code-btn:hover {
    background: #e67e22 !important;
    transform: translateY(-2px);
}

.resend-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Mejoras para el modal de 2FA */
.codigo-2fa-modal .gainovo-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.codigo-2fa-modal .gainovo-modal-actions button {
    flex: 1;
    min-width: 120px;
}

.codigo-input {
    font-size: 24px !important;
    letter-spacing: 8px;
    text-align: center;
    font-weight: bold;
    padding: 15px !important;
}